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>
This commit is contained in:
committed by
Laszlo Ersek
parent
a8c791c15b
commit
93314ae597
@@ -218,6 +218,9 @@
|
|||||||
# The value should be a multiple of 4KB.
|
# The value should be a multiple of 4KB.
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdHighPmmMemorySize|0x400000|UINT32|0x31
|
gUefiOvmfPkgTokenSpaceGuid.PcdHighPmmMemorySize|0x400000|UINT32|0x31
|
||||||
|
|
||||||
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr|0x0|UINT32|0x17
|
||||||
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize|0x0|UINT32|0x32
|
||||||
|
|
||||||
[PcdsDynamic, PcdsDynamicEx]
|
[PcdsDynamic, PcdsDynamicEx]
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
|
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10
|
||||||
|
@@ -172,6 +172,10 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase|gUefiOvmfPkgTokenSpaceGuid.
|
|||||||
0x007000|0x001000
|
0x007000|0x001000
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
|
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
|
||||||
|
|
||||||
|
0x008000|0x001000
|
||||||
|
# Used by XenResetVector to communicate with XenPlatformPei
|
||||||
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr|gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
|
||||||
|
|
||||||
0x010000|0x010000
|
0x010000|0x010000
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize
|
||||||
|
|
||||||
|
@@ -22,6 +22,12 @@ xenPVHMain:
|
|||||||
;
|
;
|
||||||
xor esp, esp
|
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)
|
mov ebx, ADDR_OF(gdtr)
|
||||||
lgdt [ebx]
|
lgdt [ebx]
|
||||||
|
|
||||||
|
@@ -36,3 +36,6 @@
|
|||||||
[Pcd]
|
[Pcd]
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesBase
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPageTablesSize
|
||||||
|
|
||||||
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr
|
||||||
|
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
|
||||||
|
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
%include "CommonMacros.inc"
|
%include "CommonMacros.inc"
|
||||||
|
|
||||||
|
%define PVH_SPACE(Offset) (FixedPcdGet32 (PcdXenPvhStartOfDayStructPtr) + (Offset))
|
||||||
|
|
||||||
%include "PostCodes.inc"
|
%include "PostCodes.inc"
|
||||||
|
|
||||||
%ifdef DEBUG_PORT80
|
%ifdef DEBUG_PORT80
|
||||||
|
Reference in New Issue
Block a user