From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp03.apple.com (ma1-aaemail-dr-lapp03.apple.com [17.171.2.72]) by mx.groups.io with SMTP id smtpd.web11.3646.1593796926756658900 for ; Fri, 03 Jul 2020 10:22:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=vSQDLB4E; spf=pass (domain: apple.com, ip: 17.171.2.72, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.42/8.16.0.42) with SMTP id 063H5odh011227 for ; Fri, 3 Jul 2020 10:22:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : mime-version : subject : message-id : date : to; s=20180706; bh=/+Cyu0qs15pV5pqAA0mhtvOsIRIGNmD1Y4rPXgBDE0Y=; b=vSQDLB4EuM2W6Iw2SGo1wVONmAQG2VttDf4ABgBiMsv7vPEJSvZFGg0rFoOGHcoaNw4e 9FZSKwqMcvHdfX6HSwW8aN6ioCtJ3+LFDT4700dBXYALSMv8RN9dguPKbHh6XGxlawzM 4vOEFl8xQTWDRdo9StyvoC7ZPDsSkIweiOGJ9MsFvSozCxRdmTroT8FU9Q7gQMtmXBuZ 71ZOn9ZT0k0aUJZqhsobHGUI0MpPe74S15OTQ+YcxsPQ7sO/aKFB311VRJcBOrsBBwC2 zmQJV1dVr0IXrI6LhA6Md1BL7FRYe/yIkk7oafZrLBobRHbPsuqa2Qx/HxD3gk8ZSo7R Tg== Received: from rn-mailsvcp-mta-lapp04.rno.apple.com (rn-mailsvcp-mta-lapp04.rno.apple.com [10.225.203.152]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 31x5458sc7-16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 03 Jul 2020 10:22:05 -0700 Received: from rn-mailsvcp-mmp-lapp03.rno.apple.com (rn-mailsvcp-mmp-lapp03.rno.apple.com [17.179.253.16]) by rn-mailsvcp-mta-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) with ESMTPS id <0QCW00GT1LKRUB90@rn-mailsvcp-mta-lapp04.rno.apple.com> for devel@edk2.groups.io; Fri, 03 Jul 2020 10:22:03 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp03.rno.apple.com by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) id <0QCW00P00LGSNH00@rn-mailsvcp-mmp-lapp03.rno.apple.com> for devel@edk2.groups.io; Fri, 03 Jul 2020 10:22:03 -0700 (PDT) X-Va-A: X-Va-T-CD: e0acb9dc03d22e4581b62f3d752335f3 X-Va-E-CD: 4725668e8063e72cdd7ceccdfdbbbe39 X-Va-R-CD: 6d5bf31f98ebcb7a1b5fb3858bc1dd74 X-Va-CD: 0 X-Va-ID: a2575673-f081-448a-8407-53ad4c86a522 X-V-A: X-V-T-CD: e0acb9dc03d22e4581b62f3d752335f3 X-V-E-CD: 4725668e8063e72cdd7ceccdfdbbbe39 X-V-R-CD: 6d5bf31f98ebcb7a1b5fb3858bc1dd74 X-V-CD: 0 X-V-ID: dbc7cfdb-4261-473a-9f58-6695a2a97515 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-03_13:2020-07-02,2020-07-03 signatures=0 Received: from [17.235.30.145] (unknown [17.235.30.145]) by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) with ESMTPSA id <0QCW00IARLKQ7G00@rn-mailsvcp-mmp-lapp03.rno.apple.com> for devel@edk2.groups.io; Fri, 03 Jul 2020 10:22:03 -0700 (PDT) From: "Andrew Fish" MIME-version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Question about the OVMF and MTRRs? Message-id: <369C9B43-A02C-4AEB-8F02-735E1042ABB2@apple.com> Date: Fri, 03 Jul 2020 10:22:02 -0700 To: edk2-devel-groups-io X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-03_13:2020-07-02,2020-07-03 signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_D3CBA748-B504-4F68-A43E-F210F7B6392F" --Apple-Mail=_D3CBA748-B504-4F68-A43E-F210F7B6392F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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.=20 I=E2=80=99m 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=20 return EFI_UNSUPPORTED; [1] = https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/CpuDxe/CpuDxe.c#L= 429 Thanks, Andrew Fish= --Apple-Mail=_D3CBA748-B504-4F68-A43E-F210F7B6392F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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=E2=80=99m 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;


Thanks,

Andrew Fish
= --Apple-Mail=_D3CBA748-B504-4F68-A43E-F210F7B6392F--