diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2019-08-13 12:30:51 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-08-21 18:03:49 +0200 |
commit | 93314ae597b3c4c22d1120319fc1669bfb717694 (patch) | |
tree | 1e90f0a5b23cc1ad57c8804055a2a733ddf0d43c /OvmfPkg/XenResetVector | |
parent | a8c791c15be599f5a48f8a70b040fbe0cd3232c0 (diff) | |
download | edk2-93314ae597b3c4c22d1120319fc1669bfb717694.zip edk2-93314ae597b3c4c22d1120319fc1669bfb717694.tar.gz edk2-93314ae597b3c4c22d1120319fc1669bfb717694.tar.bz2 |
OvmfPkg/XenResetVector: Saving start of day pointer for PVH guests
As described in the Xen PVH documentation [1], "ebx: contains the
physical memory address where the loader has placed the boot start info
structure". To have this pointer saved to be able to use it later in the
PEI phase, we allocate some space in the MEMFD for it. We use 'XPVH' as
a signature (for "Xen PVH").
[1] https://xenbits.xenproject.org/docs/unstable/misc/pvh.html
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190813113119.14804-8-anthony.perard@citrix.com>
Diffstat (limited to 'OvmfPkg/XenResetVector')
-rw-r--r-- | OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm | 6 | ||||
-rw-r--r-- | OvmfPkg/XenResetVector/XenResetVector.inf | 3 | ||||
-rw-r--r-- | OvmfPkg/XenResetVector/XenResetVector.nasmb | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm b/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm index 2a17fed..f42df3d 100644 --- a/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm +++ b/OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm @@ -22,6 +22,12 @@ xenPVHMain: ;
xor esp, esp
+ ;
+ ; Store "Start of day" struct pointer for later use
+ ;
+ mov dword[PVH_SPACE (0)], ebx
+ mov dword[PVH_SPACE (4)], 'XPVH'
+
mov ebx, ADDR_OF(gdtr)
lgdt [ebx]
diff --git a/OvmfPkg/XenResetVector/XenResetVector.inf b/OvmfPkg/XenResetVector/XenResetVector.inf index 097fc9b..46b133a 100644 --- a/OvmfPkg/XenResetVector/XenResetVector.inf +++ b/OvmfPkg/XenResetVector/XenResetVector.inf @@ -36,3 +36,6 @@ [Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
+
+ gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr
+ gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
diff --git a/OvmfPkg/XenResetVector/XenResetVector.nasmb b/OvmfPkg/XenResetVector/XenResetVector.nasmb index 0dbc4f2..b2cb405 100644 --- a/OvmfPkg/XenResetVector/XenResetVector.nasmb +++ b/OvmfPkg/XenResetVector/XenResetVector.nasmb @@ -34,6 +34,8 @@ %include "CommonMacros.inc"
+%define PVH_SPACE(Offset) (FixedPcdGet32 (PcdXenPvhStartOfDayStructPtr) + (Offset))
+
%include "PostCodes.inc"
%ifdef DEBUG_PORT80
|