public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg/XenPlatformPei: Relocate shared_info page mapping
@ 2021-06-28 13:23 Anthony PERARD
  2021-06-29  9:20 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony PERARD @ 2021-06-28 13:23 UTC (permalink / raw)
  To: devel
  Cc: Laszlo Ersek, Ard Biesheuvel, Anthony PERARD, Jan Beulich,
	Andrew Cooper

From: Anthony PERARD <anthony.perard@citrix.com>

Unfortunately, Xen isn't ready to deal with mapping at the top of the
physical address space, so we relocate the mapping after the LAPIC
location.

See this thread about the issue with the mapping:
- https://lore.kernel.org/xen-devel/f8c4151a-6dac-d87c-ef46-eb35ada07bd9@suse.com/

The PhysicalAddressIdentityMapping() call isn't going to do anything
anymore since everything under 4GB is already mapped, but there is no
need to remove the call.

CC: Jan Beulich <JBeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 OvmfPkg/XenPlatformPei/Xen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
index a4e82b356936..9c6641895970 100644
--- a/OvmfPkg/XenPlatformPei/Xen.c
+++ b/OvmfPkg/XenPlatformPei/Xen.c
@@ -569,7 +569,7 @@ CalibrateLapicTimer (
   EFI_STATUS            Status;
 
 
-  SharedInfo = (VOID*)((1ULL << mPhysMemAddressWidth) - EFI_PAGE_SIZE);
+  SharedInfo = (VOID*)((UINTN)PcdGet32 (PcdCpuLocalApicBaseAddress) + SIZE_1MB);
   Status = PhysicalAddressIdentityMapping ((EFI_PHYSICAL_ADDRESS)SharedInfo);
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR,
-- 
Anthony PERARD


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-29 14:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-28 13:23 [PATCH] OvmfPkg/XenPlatformPei: Relocate shared_info page mapping Anthony PERARD
2021-06-29  9:20 ` [edk2-devel] " Laszlo Ersek
2021-06-29 10:07   ` Jan Beulich
2021-06-29 10:35     ` Andrew Cooper
2021-06-29 11:29       ` Laszlo Ersek
2021-06-29 11:41         ` Jan Beulich
2021-06-29 14:43           ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox