UefiPayloadPkg: Get and enter DxeCore for Universal Payload

From gUniversalPayloadExtraDataGuid Guid Hob, get the Dxe FV information,
and get the Dxe Core from the FV.
Also, make sure if there are muliple FV hob, the FV hob pointing to this FV
will be the first in the hob list.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
This commit is contained in:
Zhiguang Liu
2021-05-07 15:41:59 +08:00
committed by mergify[bot]
parent 0ff6de9358
commit b208d37c73
5 changed files with 104 additions and 4 deletions

View File

@@ -33,6 +33,8 @@
#include <Guid/GraphicsInfoHob.h>
#include <UniversalPayload/SmbiosTable.h>
#include <UniversalPayload/AcpiTable.h>
#include <UniversalPayload/UniversalPayload.h>
#include <UniversalPayload/ExtraData.h>
#define LEGACY_8259_MASK_REGISTER_MASTER 0x21
#define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1
@@ -127,6 +129,21 @@ LoadDxeCore (
OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint
);
/**
Find DXE core from FV and build DXE core HOBs.
@param[in] DxeFv The FV where to find the DXE core.
@param[out] DxeCoreEntryPoint DXE core entry point
@retval EFI_SUCCESS If it completed successfully.
@retval EFI_NOT_FOUND If it failed to load DXE FV.
**/
EFI_STATUS
UniversalLoadDxeCore (
IN EFI_FIRMWARE_VOLUME_HEADER *DxeFv,
OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint
);
/**
Transfers control to DxeCore.