TianoCore EDK2 master
|
#include <PiDxe.h>
#include <IndustryStandard/Pci.h>
#include <IndustryStandard/PeImage.h>
#include <IndustryStandard/Atapi.h>
#include <IndustryStandard/Scsi.h>
#include <IndustryStandard/Nvme.h>
#include <IndustryStandard/Sd.h>
#include <IndustryStandard/Emmc.h>
#include <Protocol/PciRootBridgeIo.h>
#include <Protocol/BlockIo.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/LoadFile.h>
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleTextIn.h>
#include <Protocol/SimpleTextInEx.h>
#include <Protocol/SimpleTextOut.h>
#include <Protocol/SimpleNetwork.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/PciIo.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/UsbIo.h>
#include <Protocol/DiskInfo.h>
#include <Protocol/NvmExpressPassthru.h>
#include <Protocol/IdeControllerInit.h>
#include <Protocol/BootLogo.h>
#include <Protocol/DriverHealth.h>
#include <Protocol/FormBrowser2.h>
#include <Protocol/RamDisk.h>
#include <Protocol/DeferredImageLoad.h>
#include <Protocol/PlatformBootManager.h>
#include <Guid/MemoryTypeInformation.h>
#include <Guid/FileInfo.h>
#include <Guid/GlobalVariable.h>
#include <Guid/StatusCodeDataTypeId.h>
#include <Guid/StatusCodeDataTypeVariable.h>
#include <Library/PrintLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/HobLib.h>
#include <Library/BaseLib.h>
#include <Library/DevicePathLib.h>
#include <Library/PerformanceLib.h>
#include <Library/PcdLib.h>
#include <Library/PeCoffGetEntryPointLib.h>
#include <Library/UefiBootManagerLib.h>
#include <Library/DxeServicesLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/CapsuleLib.h>
#include <Library/HiiLib.h>
Go to the source code of this file.
Data Structures | |
struct | BM_BOOT_DESCRIPTION_ENTRY |
struct | BM_HOTKEY |
Macros | |
#define | BM_OPTION_NAME_LEN sizeof ("PlatformRecovery####") |
#define | MAX_RECONNECT_REPAIR 10 |
#define | BM_BOOT_DESCRIPTION_ENTRY_SIGNATURE SIGNATURE_32 ('b', 'm', 'd', 'h') |
#define | BM_HOTKEY_SIGNATURE SIGNATURE_32 ('b', 'm', 'h', 'k') |
#define | BM_HOTKEY_FROM_LINK(a) CR (a, BM_HOTKEY, Link, BM_HOTKEY_SIGNATURE) |
Typedefs | |
typedef CHAR16 *(* | BM_GET_BOOT_DESCRIPTION) (IN EFI_HANDLE Handle) |
typedef VOID(* | BM_VARIABLE_VISITOR) (CHAR16 *Name, EFI_GUID *Guid, VOID *Context) |
Enumerations | |
enum | BM_BOOT_TYPE { BmAcpiFloppyBoot , BmHardwareDeviceBoot , BmMessageAtapiBoot , BmMessageSataBoot , BmMessageUsbBoot , BmMessageScsiBoot , BmMiscBoot } |
Variables | |
CHAR16 * | mBmLoadOptionName [] |
BDS library definition, include the file and data structure
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file InternalBm.h.
#define BM_BOOT_DESCRIPTION_ENTRY_SIGNATURE SIGNATURE_32 ('b', 'm', 'd', 'h') |
Definition at line 143 of file InternalBm.h.
Definition at line 173 of file InternalBm.h.
#define BM_HOTKEY_SIGNATURE SIGNATURE_32 ('b', 'm', 'h', 'k') |
Definition at line 161 of file InternalBm.h.
#define BM_OPTION_NAME_LEN sizeof ("PlatformRecovery####") |
Definition at line 106 of file InternalBm.h.
#define MAX_RECONNECT_REPAIR 10 |
Definition at line 113 of file InternalBm.h.
typedef CHAR16 *(* BM_GET_BOOT_DESCRIPTION) (IN EFI_HANDLE Handle) |
Definition at line 98 of file InternalBm.h.
typedef VOID(* BM_VARIABLE_VISITOR) (CHAR16 *Name, EFI_GUID *Guid, VOID *Context) |
Visitor function to be called by BmForEachVariable for each variable in variable storage.
Name | Variable name. |
Guid | Variable GUID. |
Context | The same context passed to BmForEachVariable. |
Definition at line 124 of file InternalBm.h.
enum BM_BOOT_TYPE |
Definition at line 87 of file InternalBm.h.
EFI_STATUS BmConnectUsbShortFormDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
Connect the specific Usb device which match the short form device path.
DevicePath | A short-form device path that starts with the first element being a USB WWID or a USB Class device path |
Connect the specific Usb device which match the short form device path, and whose bus is determined by Host Controller (Uhci or Ehci).
DevicePath | A short-form device path that starts with the first element being a USB WWID or a USB Class device path |
Definition at line 245 of file BmConnect.c.
EFI_DEVICE_PATH_PROTOCOL * BmDelPartMatchInstance | ( | IN EFI_DEVICE_PATH_PROTOCOL * | Multi, |
IN EFI_DEVICE_PATH_PROTOCOL * | Single | ||
) |
Delete the instance in Multi which matches partly with Single instance
Multi | A pointer to a multi-instance device path data structure. |
Single | A pointer to a single-instance device path data structure. |
VOID BmDestroyRamDisk | ( | IN EFI_DEVICE_PATH_PROTOCOL * | RamDiskDevicePath | ) |
EFI_DEVICE_PATH_PROTOCOL * BmExpandLoadFile | ( | IN EFI_HANDLE | LoadFileHandle, |
IN EFI_DEVICE_PATH_PROTOCOL * | FilePath | ||
) |
VOID BmForEachVariable | ( | BM_VARIABLE_VISITOR | Visitor, |
VOID * | Context | ||
) |
Call Visitor function for each variable in variable storage.
Visitor | Visitor function. |
Context | The context passed to Visitor function. |
Definition at line 37 of file BmLoadOption.c.
CHAR16 * BmGetBootDescription | ( | IN EFI_HANDLE | Handle | ) |
Return the boot description for the controller.
Handle | Controller handle. |
Definition at line 1033 of file BmBootDescription.c.
EFI_STATUS BmGetFreeOptionNumber | ( | IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE | LoadOptionType, |
OUT UINT16 * | FreeOptionNumber | ||
) |
Get the Option Number that wasn't used.
LoadOptionType | Load option type. |
FreeOptionNumber | To receive the minimal free option number. |
EFI_SUCCESS | The option number is found |
EFI_OUT_OF_RESOURCES | There is no free option number that can be used. |
EFI_INVALID_PARAMETER | FreeOptionNumber is NULL |
Get the Option Number that wasn't used.
LoadOptionType | The load option type. |
FreeOptionNumber | Return the minimal free option number. |
EFI_SUCCESS | The option number is found and will be returned. |
EFI_OUT_OF_RESOURCES | There is no free option number that can be used. |
EFI_INVALID_PARAMETER | FreeOptionNumber is NULL |
Definition at line 85 of file BmLoadOption.c.
VOID * BmGetNextLoadOptionBuffer | ( | IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE | Type, |
IN EFI_DEVICE_PATH_PROTOCOL * | FilePath, | ||
OUT EFI_DEVICE_PATH_PROTOCOL ** | FullPath, | ||
OUT UINTN * | FileSize | ||
) |
Return the next matched load option buffer. The routine keeps calling BmGetNextLoadOptionDevicePath() until a valid load option is read.
Type | The load option type. It's used to check whether the load option is valid. When it's LoadOptionTypeMax, the routine only guarantees the load option is a valid PE image but doesn't guarantee the PE's subsystem type is valid. |
FilePath | The device path pointing to a load option. It could be a short-form device path. |
FullPath | Return the next full device path of the load option after short-form device path expanding. Caller is responsible to free it. NULL to return the first matched full device path. |
FileSize | Return the load option size. |
Definition at line 1313 of file BmLoadOption.c.
EFI_DEVICE_PATH_PROTOCOL * BmGetNextLoadOptionDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | FilePath, |
IN EFI_DEVICE_PATH_PROTOCOL * | FullPath | ||
) |
Get the next possible full path pointing to the load option.
FilePath | The device path pointing to a load option. It could be a short-form device path. |
FullPath | The full path returned by the routine in last call. Set to NULL in first call. |
Get the next possible full path pointing to the load option. The routine doesn't guarantee the returned full path points to an existing file, and it also doesn't guarantee the existing file is a valid load option. BmGetNextLoadOptionBuffer() guarantees.
FilePath | The device path pointing to a load option. It could be a short-form device path. |
FullPath | The full path returned by the routine in last call. Set to NULL in first call. |
EFI_DEVICE_PATH_PROTOCOL * BmGetRamDiskDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | FilePath | ) |
VOID BmMakeBootOptionDescriptionUnique | ( | EFI_BOOT_MANAGER_LOAD_OPTION * | BootOptions, |
UINTN | BootOptionCount | ||
) |
Enumerate all boot option descriptions and append " 2"/" 3"/... to make unique description.
BootOptions | Array of boot options. |
BootOptionCount | Count of boot options. |
Definition at line 1094 of file BmBootDescription.c.
BOOLEAN BmMatchDevicePaths | ( | IN EFI_DEVICE_PATH_PROTOCOL * | Multi, |
IN EFI_DEVICE_PATH_PROTOCOL * | Single | ||
) |
Function compares a device path data structure to that of all the nodes of a second device path instance.
Multi | A pointer to a multi-instance device path data structure. |
Single | A pointer to a single-instance device path data structure. |
TRUE | If the Single device path is contained within Multi device path. |
FALSE | The Single device path is not match within Multi device path. |
BOOLEAN BmMatchPartitionDevicePathNode | ( | IN EFI_DEVICE_PATH_PROTOCOL * | BlockIoDevicePath, |
IN HARDDRIVE_DEVICE_PATH * | HardDriveDevicePath | ||
) |
Check whether there is a instance in BlockIoDevicePath, which contain multi device path instances, has the same partition node with HardDriveDevicePath device path
BlockIoDevicePath | Multi device path instances which need to check |
HardDriveDevicePath | A device path which starts with a hard drive media device path. |
TRUE | There is a matched device path instance. |
FALSE | There is no matched device path instance. |
VOID BmPrintDp | ( | EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
VOID BmRepairAllControllers | ( | UINTN | ReconnectRepairCount | ) |
Repair all the controllers according to the Driver Health status queried.
ReconnectRepairCount | To record the number of recursive call of this function itself. |
Definition at line 429 of file BmDriverHealth.c.
VOID BmSetMemoryTypeInformationVariable | ( | IN BOOLEAN | Boot | ) |
This routine adjust the memory information for different memory type and save them into the variables for next boot. It resets the system when memory information is updated and the current boot option belongs to boot category instead of application category. It doesn't count the reserved memory occupied by RAM Disk.
Boot | TRUE if current boot option belongs to boot category instead of application category. |
EFI_STATUS BmSetVariableAndReportStatusCodeOnError | ( | IN CHAR16 * | VariableName, |
IN EFI_GUID * | VendorGuid, | ||
IN UINT32 | Attributes, | ||
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Set the variable and report the error through status code upon failure.
VariableName | A Null-terminated string that is the name of the vendor's variable. Each VariableName is unique for each VendorGuid. VariableName must contain 1 or more characters. If VariableName is an empty string, then EFI_INVALID_PARAMETER is returned. |
VendorGuid | A unique identifier for the vendor. |
Attributes | Attributes bitmask to set for the variable. |
DataSize | The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is set, then a SetVariable() call with a DataSize of zero will not cause any change to the variable value (the timestamp associated with the variable may be updated however even if no new data value is provided,see the description of the EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). |
Data | The contents for the variable. |
EFI_SUCCESS | The firmware has successfully stored the variable and its data as defined by the Attributes. |
EFI_INVALID_PARAMETER | An invalid combination of attribute bits, name, and GUID was supplied, or the DataSize exceeds the maximum allowed. |
EFI_INVALID_PARAMETER | VariableName is an empty string. |
EFI_OUT_OF_RESOURCES | Not enough storage is available to hold the variable and its data. |
EFI_DEVICE_ERROR | The variable could not be retrieved due to a hardware error. |
EFI_WRITE_PROTECTED | The variable in question is read-only. |
EFI_WRITE_PROTECTED | The variable in question cannot be deleted. |
EFI_SECURITY_VIOLATION | The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo does NOT pass the validation check carried out by the firmware. |
EFI_NOT_FOUND | The variable trying to be updated or deleted was not found. |
Stop the hotkey processing.
Event | Event pointer related to hotkey service. |
Context | Context pass to this function. |
Definition at line 850 of file BmHotkey.c.
|
extern |
Definition at line 15 of file BmLoadOption.c.