mirror of https://github.com/acidanthera/audk.git
OvmfPkg: detect Xen earlier
This is useful for initializing memory map. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14943 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4c3966e9ff
commit
c7ea55b92b
|
@ -338,14 +338,20 @@ InitializePlatform (
|
|||
)
|
||||
{
|
||||
EFI_PHYSICAL_ADDRESS TopOfMemory;
|
||||
UINT32 XenLeaf;
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n"));
|
||||
|
||||
DebugDumpCmos ();
|
||||
|
||||
XenLeaf = XenDetect ();
|
||||
|
||||
TopOfMemory = MemDetect ();
|
||||
|
||||
InitializeXen ();
|
||||
if (XenLeaf != 0) {
|
||||
DEBUG ((EFI_D_INFO, "Xen was detected\n"));
|
||||
InitializeXen (XenLeaf);
|
||||
}
|
||||
|
||||
ReserveEmuVariableNvStore ();
|
||||
|
||||
|
|
|
@ -69,6 +69,11 @@ PeiFvInitialization (
|
|||
|
||||
EFI_STATUS
|
||||
InitializeXen (
|
||||
UINT32 XenLeaf
|
||||
);
|
||||
|
||||
UINT32
|
||||
XenDetect (
|
||||
VOID
|
||||
);
|
||||
|
||||
|
|
|
@ -119,19 +119,9 @@ XenDetect (
|
|||
**/
|
||||
EFI_STATUS
|
||||
InitializeXen (
|
||||
VOID
|
||||
UINT32 XenLeaf
|
||||
)
|
||||
{
|
||||
UINT32 XenLeaf;
|
||||
|
||||
XenLeaf = XenDetect ();
|
||||
|
||||
if (XenLeaf == 0) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Xen was detected\n"));
|
||||
|
||||
XenConnect (XenLeaf);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue