ACK: [PATCH] mtrr: allow uncached type for PCI prefetchable memory
ivanhu
ivan.hu at canonical.com
Mon Nov 19 02:53:24 UTC 2018
Actually, this piece of code is carried from Intel's Linux-ready
Firmware Developer Kit. No one know where is the requirement comes from.
And I got the clarification from Intel Graphics team,
"We do not have such requirement to keep GMAR BAR as "Write Combined".
We only need GMADR to be WC for GOP to optimize BIOS logo displaying, it
is as design to switch GMARD back to UC for other memory type
utilization before transferring control to OS. BIOS need to set the
GMADR to WC during POST for improving GOP performance, and restore it
back to UC before boot to reduce the MTRR variable usage."
No reason for checking not setting the MTRR to UC.
I'll also add the clarification to the commit before push the commit.
Acked-by: Ivan Hu <ivan.hu at canonical.com>
On 11/16/18 4:45 PM, Alex Hung wrote:
> Buglink: https://bugs.launchpad.net/bugs/1781920
>
> IntelĀ® 64 and IA-32 Architectures Software Developer's Manual seems to
> suggest uncachable memory can be used for memory-mapped I/O.
>
> Details can be found in Section 11.3.2 - Choosing a Memory Type
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/bios/mtrr/mtrr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 4948b55a..a614ffbb 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -351,7 +351,7 @@ static int guess_cache_type(
>
> if (pref) {
> *must = 0;
> - *mustnot = WRITE_BACK | UNCACHED;
> + *mustnot = WRITE_BACK;
> } else {
> *must = UNCACHED;
> *mustnot = (~UNCACHED) & (~DEFAULT);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20181119/b4349ca6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20181119/b4349ca6/attachment.sig>
More information about the fwts-devel
mailing list