UefiPayloadPkg: Integrate UiApp and BootManagerMenuApp into MultiFv
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4347 To put UiApp.inf and BootManagerMenuApp.inf to proper FV(BDSFV) Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
This commit is contained in:
@ -9,8 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
|
|
||||||
#include "PlatformBootManager.h"
|
#include "PlatformBootManager.h"
|
||||||
#include "PlatformConsole.h"
|
#include "PlatformConsole.h"
|
||||||
#include <Guid/BootManagerMenu.h>
|
|
||||||
#include <Library/HobLib.h>
|
|
||||||
#include <Protocol/FirmwareVolume2.h>
|
#include <Protocol/FirmwareVolume2.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -364,56 +362,3 @@ PlatformBootManagerUnableToBoot (
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Get/update PcdBootManagerMenuFile from GUID HOB which will be assigned in bootloader.
|
|
||||||
|
|
||||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
|
||||||
@param SystemTable A pointer to the EFI System Table.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
|
||||||
@retval other Some error occurs.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
PlatformBootManagerLibConstructor (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
UINTN Size;
|
|
||||||
VOID *GuidHob;
|
|
||||||
UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader;
|
|
||||||
UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile;
|
|
||||||
|
|
||||||
GuidHob = GetFirstGuidHob (&gEdkiiBootManagerMenuFileGuid);
|
|
||||||
|
|
||||||
if (GuidHob == NULL) {
|
|
||||||
//
|
|
||||||
// If the HOB is not create, the default value of PcdBootManagerMenuFile will be used.
|
|
||||||
//
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)GET_GUID_HOB_DATA (GuidHob);
|
|
||||||
if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE (GuidHob)) || (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GenericHeader->Revision == UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION) {
|
|
||||||
BootManagerMenuFile = (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUID_HOB_DATA (GuidHob);
|
|
||||||
if (BootManagerMenuFile->Header.Length < UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU, FileName)) {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
Size = sizeof (BootManagerMenuFile->FileName);
|
|
||||||
Status = PcdSetPtrS (PcdBootManagerMenuFile, &Size, &BootManagerMenuFile->FileName);
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
} else {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
|
LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
|
||||||
CONSTRUCTOR = PlatformBootManagerLibConstructor
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build tools.
|
||||||
@ -48,11 +47,9 @@
|
|||||||
HiiLib
|
HiiLib
|
||||||
PrintLib
|
PrintLib
|
||||||
PlatformHookLib
|
PlatformHookLib
|
||||||
HobLib
|
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiEndOfDxeEventGroupGuid
|
gEfiEndOfDxeEventGroupGuid
|
||||||
gEdkiiBootManagerMenuFileGuid
|
|
||||||
gUefiShellFileGuid
|
gUefiShellFileGuid
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
@ -75,5 +72,4 @@
|
|||||||
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
|
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
|
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
|
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile
|
|
||||||
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape
|
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include <UniversalPayload/ExtraData.h>
|
#include <UniversalPayload/ExtraData.h>
|
||||||
#include <Guid/MemoryTypeInformation.h>
|
#include <Guid/MemoryTypeInformation.h>
|
||||||
#include <Guid/AcpiBoardInfoGuid.h>
|
#include <Guid/AcpiBoardInfoGuid.h>
|
||||||
#include <Guid/BootManagerMenu.h>
|
|
||||||
|
|
||||||
#define ROW_LIMITER 16
|
#define ROW_LIMITER 16
|
||||||
|
|
||||||
@ -437,28 +436,6 @@ PrintMemoryTypeInfoGuidHob (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Print the information in EdkiiBootManagerMenuFileGuid.
|
|
||||||
@param[in] HobRaw A pointer to the start of gEdkiiBootManagerMenuFileGuid HOB.
|
|
||||||
@param[in] HobLength The size of the HOB data buffer.
|
|
||||||
@retval EFI_SUCCESS If it completed successfully.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
PrintBootManagerMenuGuidHob (
|
|
||||||
IN UINT8 *HobRaw,
|
|
||||||
IN UINT16 HobLength
|
|
||||||
)
|
|
||||||
{
|
|
||||||
UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile;
|
|
||||||
|
|
||||||
BootManagerMenuFile = (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUID_HOB_DATA (HobRaw);
|
|
||||||
ASSERT (HobLength >= sizeof (*BootManagerMenuFile));
|
|
||||||
DEBUG ((DEBUG_INFO, " Revision = 0x%x\n", BootManagerMenuFile->Header.Revision));
|
|
||||||
DEBUG ((DEBUG_INFO, " Length = 0x%x\n", BootManagerMenuFile->Header.Length));
|
|
||||||
DEBUG ((DEBUG_INFO, " FileName = %g\n", &BootManagerMenuFile->FileName));
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Mappint table for dump Guid Hob information.
|
// Mappint table for dump Guid Hob information.
|
||||||
// This table can be easily extented.
|
// This table can be easily extented.
|
||||||
@ -471,8 +448,7 @@ GUID_HOB_PRINT_HANDLE GuidHobPrintHandleTable[] = {
|
|||||||
{ &gUefiAcpiBoardInfoGuid, PrintAcpiBoardInfoGuidHob, "gUefiAcpiBoardInfoGuid(Acpi Guid)" },
|
{ &gUefiAcpiBoardInfoGuid, PrintAcpiBoardInfoGuidHob, "gUefiAcpiBoardInfoGuid(Acpi Guid)" },
|
||||||
{ &gUniversalPayloadPciRootBridgeInfoGuid, PrintPciRootBridgeInfoGuidHob, "gUniversalPayloadPciRootBridgeInfoGuid(Pci Guid)" },
|
{ &gUniversalPayloadPciRootBridgeInfoGuid, PrintPciRootBridgeInfoGuidHob, "gUniversalPayloadPciRootBridgeInfoGuid(Pci Guid)" },
|
||||||
{ &gEfiMemoryTypeInformationGuid, PrintMemoryTypeInfoGuidHob, "gEfiMemoryTypeInformationGuid(Memory Type Information Guid)" },
|
{ &gEfiMemoryTypeInformationGuid, PrintMemoryTypeInfoGuidHob, "gEfiMemoryTypeInformationGuid(Memory Type Information Guid)" },
|
||||||
{ &gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)" },
|
{ &gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)" }
|
||||||
{ &gEdkiiBootManagerMenuFileGuid, PrintBootManagerMenuGuidHob, "gEdkiiBootManagerMenuFileGuid(Boot Manager Menu File Guid)" }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
gUniversalPayloadAcpiTableGuid
|
gUniversalPayloadAcpiTableGuid
|
||||||
gUniversalPayloadPciRootBridgeInfoGuid
|
gUniversalPayloadPciRootBridgeInfoGuid
|
||||||
gUniversalPayloadSmbios3TableGuid
|
gUniversalPayloadSmbios3TableGuid
|
||||||
gEdkiiBootManagerMenuFileGuid
|
|
||||||
|
|
||||||
[FeaturePcd.IA32]
|
[FeaturePcd.IA32]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
#
|
#
|
||||||
gBmpImageGuid = { 0x878AC2CC, 0x5343, 0x46F2, { 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }
|
gBmpImageGuid = { 0x878AC2CC, 0x5343, 0x46F2, { 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }
|
||||||
|
|
||||||
##include/Guid/BootManagerMenu.h
|
|
||||||
gEdkiiBootManagerMenuFileGuid = { 0xdf939333, 0x42fc, 0x4b2a, { 0xa5, 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }}
|
|
||||||
gEdkiiDebugPrintErrorLevelGuid = { 0xad82f436, 0x75c5, 0x4aa9, { 0x92, 0x93, 0xc5, 0x55, 0x0a, 0x7f, 0xf9, 0x71 }}
|
gEdkiiDebugPrintErrorLevelGuid = { 0xad82f436, 0x75c5, 0x4aa9, { 0x92, 0x93, 0xc5, 0x55, 0x0a, 0x7f, 0xf9, 0x71 }}
|
||||||
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
|
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
|
||||||
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
|
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
|
||||||
|
@ -441,6 +441,7 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
|
||||||
|
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
|
||||||
gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80, 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }
|
gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80, 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }
|
||||||
|
|
||||||
!if $(SOURCE_DEBUG_ENABLE)
|
!if $(SOURCE_DEBUG_ENABLE)
|
||||||
@ -651,10 +652,9 @@
|
|||||||
NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
|
NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
|
||||||
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
|
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
|
||||||
}
|
}
|
||||||
MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf {
|
MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
|
||||||
<LibraryClasses>
|
|
||||||
NULL|UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
|
||||||
}
|
|
||||||
PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
|
PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
|
||||||
MdeModulePkg/Universal/Metronome/Metronome.inf
|
MdeModulePkg/Universal/Metronome/Metronome.inf
|
||||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||||
|
@ -59,7 +59,7 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
|
|||||||
FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {
|
FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {
|
||||||
SECTION FV_IMAGE = DXEFV
|
SECTION FV_IMAGE = DXEFV
|
||||||
}
|
}
|
||||||
|
!if $(UNIVERSAL_PAYLOAD) == TRUE
|
||||||
!if $(NETWORK_DRIVER_ENABLE) == TRUE
|
!if $(NETWORK_DRIVER_ENABLE) == TRUE
|
||||||
################################################################################
|
################################################################################
|
||||||
[FV.NETWORKFV]
|
[FV.NETWORKFV]
|
||||||
@ -112,6 +112,9 @@ READ_LOCK_CAP = TRUE
|
|||||||
READ_LOCK_STATUS = TRUE
|
READ_LOCK_STATUS = TRUE
|
||||||
|
|
||||||
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
||||||
|
INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf
|
||||||
|
INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
|
||||||
|
!endif
|
||||||
|
|
||||||
[FV.DXEFV]
|
[FV.DXEFV]
|
||||||
FvNameGuid = 8063C21A-8E58-4576-95CE-089E87975D23
|
FvNameGuid = 8063C21A-8E58-4576-95CE-089E87975D23
|
||||||
@ -158,8 +161,6 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
|||||||
!endif
|
!endif
|
||||||
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||||
|
|
||||||
INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf
|
|
||||||
INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
|
|
||||||
INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
|
INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
|
||||||
INF MdeModulePkg/Universal/Metronome/Metronome.inf
|
INF MdeModulePkg/Universal/Metronome/Metronome.inf
|
||||||
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||||
@ -305,6 +306,8 @@ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResour
|
|||||||
|
|
||||||
!if $(UNIVERSAL_PAYLOAD) == FALSE
|
!if $(UNIVERSAL_PAYLOAD) == FALSE
|
||||||
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
||||||
|
INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf
|
||||||
|
INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
|
||||||
#
|
#
|
||||||
# UEFI network modules
|
# UEFI network modules
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user