/** Perform Platform PEI initialization. @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @return EFI_SUCCESS The PEIM initialized successfully. **/ EFI_STATUS EFIAPI InitializePlatform ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices ) { EFI_STATUS Status; EFI_PHYSICAL_ADDRESS TopOfMemory; BOOLEAN Xen; DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n")); DebugDumpCmos (); TopOfMemory = MemDetect (); Status = InitializeXen (); Xen = EFI_ERROR (Status) ? FALSE : TRUE; ReserveEmuVariableNvStore (); PeiFvInitialization (); MemMapInitialization (TopOfMemory); MiscInitialization (Xen); BootModeInitialization (); return EFI_SUCCESS; }
/** Perform Platform PEI initialization. @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @return EFI_SUCCESS The PEIM initialized successfully. **/ EFI_STATUS EFIAPI InitializePlatform ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices ) { EFI_STATUS Status; DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n")); DebugDumpCmos (); XenDetect (); if (QemuFwCfgS3Enabled ()) { DEBUG ((EFI_D_INFO, "S3 support was detected on QEMU\n")); mS3Supported = TRUE; Status = PcdSetBoolS (PcdAcpiS3Enable, TRUE); ASSERT_EFI_ERROR (Status); } S3Verification (); BootModeInitialization (); AddressWidthInitialization (); MaxCpuCountInitialization (); PublishPeiMemory (); InitializeRamRegions (); if (mXen) { DEBUG ((EFI_D_INFO, "Xen was detected\n")); InitializeXen (); } // // Query Host Bridge DID // mHostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID); if (mBootMode != BOOT_ON_S3_RESUME) { ReserveEmuVariableNvStore (); PeiFvInitialization (); MemMapInitialization (); NoexecDxeInitialization (); } MiscInitialization (); InstallFeatureControlCallback (); return EFI_SUCCESS; }
/** Perform Platform PEI initialization. @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @return EFI_SUCCESS The PEIM initialized successfully. **/ EFI_STATUS EFIAPI InitializePlatform ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices ) { DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n")); DebugDumpCmos (); XenDetect (); if (QemuFwCfgS3Enabled ()) { DEBUG ((EFI_D_INFO, "S3 support was detected on QEMU\n")); mS3Supported = TRUE; } BootModeInitialization (); PublishPeiMemory (); InitializeRamRegions (); if (mXen) { DEBUG ((EFI_D_INFO, "Xen was detected\n")); InitializeXen (); } // // Query Host Bridge DID // mHostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID); if (mBootMode != BOOT_ON_S3_RESUME) { ReserveEmuVariableNvStore (); PeiFvInitialization (); MemMapInitialization (); } MiscInitialization (); return EFI_SUCCESS; }
/** Perform Platform PEI initialization. @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @return EFI_SUCCESS The PEIM initialized successfully. **/ EFI_STATUS EFIAPI InitializePlatform ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices ) { EFI_PHYSICAL_ADDRESS TopOfMemory; UINT32 XenLeaf; TopOfMemory = 0; DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n")); DebugDumpCmos (); XenLeaf = XenDetect (); if (XenLeaf != 0) { PublishPeiMemory (); PcdSetBool (PcdPciDisableBusEnumeration, TRUE); } else { TopOfMemory = MemDetect (); } if (XenLeaf != 0) { DEBUG ((EFI_D_INFO, "Xen was detected\n")); InitializeXen (XenLeaf); } ReserveEmuVariableNvStore (); PeiFvInitialization (); if (XenLeaf != 0) { XenMemMapInitialization (); } else { MemMapInitialization (TopOfMemory); } MiscInitialization (); BootModeInitialization (); return EFI_SUCCESS; }