REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1678 Use the PcdPlatformRecoverySupport to control the function of platform recovery in BDS. First, set the variable's ("OsIndicationsSupported") EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY bit base on the pcd. It would affect the variable "OsIndications". While the platform does not support the platform recovery, it is inappropriate to set a PlatformRecovery#### variable. So skip setting the variable. But it should remain the behavior of booting from a default file path (such as \EFI\BOOT\BOOTX64.EFI) to be compatible with the previous version UEFI spec. Add memory check before build platform default boot option. If fail to allocate memory for the defualt boot file path, put the system into dead loop to indicate it is unable to boot. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
106 lines
5.3 KiB
INI
106 lines
5.3 KiB
INI
## @file
|
|
# BdsDxe module is core driver for BDS phase.
|
|
#
|
|
# When DxeCore dispatching all DXE driver, this module will produce architecture protocol
|
|
# gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry
|
|
# interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered.
|
|
#
|
|
# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = BdsDxe
|
|
MODULE_UNI_FILE = BdsDxe.uni
|
|
FILE_GUID = 6D33944A-EC75-4855-A54D-809C75241F6C
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = BdsInitialize
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
|
#
|
|
|
|
[Sources]
|
|
Language.h
|
|
Bds.h
|
|
HwErrRecSupport.c
|
|
HwErrRecSupport.h
|
|
Language.c
|
|
BdsEntry.c
|
|
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
[LibraryClasses]
|
|
DevicePathLib
|
|
BaseLib
|
|
MemoryAllocationLib
|
|
UefiDriverEntryPoint
|
|
UefiBootServicesTableLib
|
|
UefiRuntimeServicesTableLib
|
|
ReportStatusCodeLib
|
|
UefiLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
UefiBootManagerLib
|
|
PlatformBootManagerLib
|
|
PcdLib
|
|
PrintLib
|
|
|
|
[Guids]
|
|
gEfiGlobalVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"BootNext" (The number of next boot option)
|
|
## SOMETIMES_PRODUCES ## Variable:L"Boot####" (Boot option variable)
|
|
## SOMETIMES_PRODUCES ## Variable:L"PlatformLang" (Platform supported languange in Rfc4646 format)
|
|
## SOMETIMES_PRODUCES ## Variable:L"Lang" (Platform supported languange in Iso639 format)
|
|
## SOMETIMES_PRODUCES ## Variable:L"Key####" (Hotkey option variable)
|
|
## PRODUCES ## Variable:L"HwErrRecSupport" (The level of platform supported hardware Error Record Persistence)
|
|
## SOMETIMES_PRODUCES ## Variable:L"BootOptionSupport" (The feature supported in boot option menu, value could be: EFI_BOOT_OPTION_SUPPORT_KEY, EFI_BOOT_OPTION_SUPPORT_APP
|
|
## SOMETIMES_PRODUCES (not PcdUefiVariableDefaultLangDeprecate) ## Variable:L"LangCodes" (Value of PcdUefiVariableDefaultLangCodes)
|
|
## PRODUCES ## Variable:L"PlatformLangCodes" (Value of PcdUefiVariableDefaultPlatformLangCodes)
|
|
## PRODUCES ## Variable:L"Timeout" (The time out value in second of showing progress bar)
|
|
## SOMETIMES_PRODUCES ## Variable:L"BootOrder" (The boot option array)
|
|
## SOMETIMES_PRODUCES ## Variable:L"DriverOrder" (The driver order list)
|
|
## SOMETIMES_CONSUMES ## Variable:L"ConIn" (The device path of console in device)
|
|
## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device)
|
|
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)
|
|
gConnectConInEventGuid ## SOMETIMES_CONSUMES ## Event
|
|
gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## GUID
|
|
gEfiEventReadyToBootGuid ## CONSUMES ## Event
|
|
|
|
[Protocols]
|
|
gEfiBdsArchProtocolGuid ## PRODUCES
|
|
gEfiSimpleTextInputExProtocolGuid ## CONSUMES
|
|
gEdkiiVariableLockProtocolGuid ## SOMETIMES_CONSUMES
|
|
gEfiDeferredImageLoadProtocolGuid ## CONSUMES
|
|
|
|
[FeaturePcd]
|
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate ## CONSUMES
|
|
|
|
[Pcd]
|
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes ## CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLang ## SOMETIMES_CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes ## CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel ## CONSUMES
|
|
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## SOMETIMES_CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformRecoverySupport ## CONSUMES
|
|
|
|
[Depex]
|
|
TRUE
|
|
|
|
[UserExtensions.TianoCore."ExtraFiles"]
|
|
BdsDxeExtra.uni
|