public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish" <afish@apple.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>
Subject: Question about the OVMF and MTRRs?
Date: Fri, 03 Jul 2020 10:22:02 -0700	[thread overview]
Message-ID: <369C9B43-A02C-4AEB-8F02-735E1042ABB2@apple.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 635 bytes --]

I noticed for my version of QEMU that MTRR registers are not supported. Is that expected? Or is it something if you get wrong it does not break in QEMU?

Due to no MTRR support the CPU Protocol SetMemoeryAttributes() call is falling [1] and non of the GCD ranges have EFI_MEMORY_UC Attribute. 

I’m not sure but I think the no MTRR case should attempt to set the attributes via page tables via:

return AssignMemoryPageAttributes (NULL, BaseAddress, Length, MemoryAttributes, NULL);

Vs 

return EFI_UNSUPPORTED;

[1] https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/CpuDxe/CpuDxe.c#L429

Thanks,

Andrew Fish

[-- Attachment #2: Type: text/html, Size: 3444 bytes --]

             reply	other threads:[~2020-07-03 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 17:22 Andrew Fish [this message]
2020-07-07 19:08 ` [edk2-devel] Question about the OVMF and MTRRs? Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=369C9B43-A02C-4AEB-8F02-735E1042ABB2@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox