MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@ -109,7 +109,7 @@ BmFindBootOptionInVariable (
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;
|
||||
UINTN BootOptionCount;
|
||||
UINTN Index;
|
||||
|
||||
|
||||
OptionNumber = LoadOptionNumberUnassigned;
|
||||
|
||||
//
|
||||
@ -233,7 +233,7 @@ BmAdjustFvFilePath (
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (FvHandles != NULL) {
|
||||
FreePool (FvHandles);
|
||||
}
|
||||
@ -242,7 +242,7 @@ BmAdjustFvFilePath (
|
||||
|
||||
/**
|
||||
Check if it's a Device Path pointing to FV file.
|
||||
|
||||
|
||||
The function doesn't garentee the device path points to existing FV file.
|
||||
|
||||
@param DevicePath Input device path.
|
||||
@ -471,13 +471,13 @@ BmMatchUsbWwid (
|
||||
}
|
||||
|
||||
/**
|
||||
Find a USB device which match the specified short-form device path start with
|
||||
Find a USB device which match the specified short-form device path start with
|
||||
USB Class or USB WWID device path. If ParentDevicePath is NULL, this function
|
||||
will search in all USB devices of the platform. If ParentDevicePath is not NULL,
|
||||
this function will only search in its child devices.
|
||||
|
||||
@param DevicePath The device path that contains USB Class or USB WWID device path.
|
||||
@param ParentDevicePathSize The length of the device path before the USB Class or
|
||||
@param ParentDevicePathSize The length of the device path before the USB Class or
|
||||
USB WWID device path.
|
||||
@param UsbIoHandleCount A pointer to the count of the returned USB IO handles.
|
||||
|
||||
@ -499,7 +499,7 @@ BmFindUsbDevice (
|
||||
UINTN Index;
|
||||
BOOLEAN Matched;
|
||||
|
||||
ASSERT (UsbIoHandleCount != NULL);
|
||||
ASSERT (UsbIoHandleCount != NULL);
|
||||
|
||||
//
|
||||
// Get all UsbIo Handles.
|
||||
@ -655,7 +655,7 @@ BmExpandFileDevicePath (
|
||||
UINTN MediaType;
|
||||
EFI_DEVICE_PATH_PROTOCOL *NextFullPath;
|
||||
BOOLEAN GetNext;
|
||||
|
||||
|
||||
EfiBootManagerConnectAll ();
|
||||
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiSimpleFileSystemProtocolGuid, NULL, &HandleCount, &Handles);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@ -780,7 +780,7 @@ BmCachePartitionDevicePath (
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
|
||||
UINTN Count;
|
||||
|
||||
|
||||
if (BmMatchDevicePaths (*CachedDevicePath, DevicePath)) {
|
||||
TempDevicePath = *CachedDevicePath;
|
||||
*CachedDevicePath = BmDelPartMatchInstance (*CachedDevicePath, DevicePath);
|
||||
@ -1670,12 +1670,12 @@ BmIsBootManagerMenuFilePath (
|
||||
/**
|
||||
Attempt to boot the EFI boot option. This routine sets L"BootCurent" and
|
||||
also signals the EFI ready to boot event. If the device path for the option
|
||||
starts with a BBS device path a legacy boot is attempted via the registered
|
||||
gLegacyBoot function. Short form device paths are also supported via this
|
||||
starts with a BBS device path a legacy boot is attempted via the registered
|
||||
gLegacyBoot function. Short form device paths are also supported via this
|
||||
rountine. A device path starting with MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP,
|
||||
MSG_USB_CLASS_DP gets expaned out to find the first device that matches.
|
||||
If the BootOption Device Path fails the removable media boot algorithm
|
||||
is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type
|
||||
If the BootOption Device Path fails the removable media boot algorithm
|
||||
is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type
|
||||
is tried per processor type)
|
||||
|
||||
@param BootOption Boot Option to try and boot.
|
||||
@ -1854,7 +1854,7 @@ EfiBootManagerBoot (
|
||||
Status = EfiCreateEventLegacyBootEx(
|
||||
TPL_NOTIFY,
|
||||
BmEndOfBdsPerfCode,
|
||||
NULL,
|
||||
NULL,
|
||||
&LegacyBootEvent
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@ -1868,7 +1868,7 @@ EfiBootManagerBoot (
|
||||
PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Provide the image with its load options
|
||||
//
|
||||
@ -2021,7 +2021,7 @@ BmMatchPartitionDevicePathNode (
|
||||
3. Non-BlockIo SimpleFileSystem - The boot option points to a device supporting
|
||||
SimpleFileSystem Protocol, but not supporting BlockIo
|
||||
protocol.
|
||||
4. LoadFile - The boot option points to the media supporting
|
||||
4. LoadFile - The boot option points to the media supporting
|
||||
LoadFile protocol.
|
||||
Reference: UEFI Spec chapter 3.3 Boot Option Variables Default Boot Behavior
|
||||
|
||||
@ -2246,7 +2246,7 @@ EfiBootManagerRefreshAllBootOption (
|
||||
// Remove invalid EFI boot options from NV
|
||||
//
|
||||
for (Index = 0; Index < NvBootOptionCount; Index++) {
|
||||
if (((DevicePathType (NvBootOptions[Index].FilePath) != BBS_DEVICE_PATH) ||
|
||||
if (((DevicePathType (NvBootOptions[Index].FilePath) != BBS_DEVICE_PATH) ||
|
||||
(DevicePathSubType (NvBootOptions[Index].FilePath) != BBS_BBS_DP)
|
||||
) && BmIsAutoCreateBootOption (&NvBootOptions[Index])
|
||||
) {
|
||||
@ -2429,7 +2429,7 @@ EfiBootManagerGetBootManagerMenu (
|
||||
UINTN BootOptionCount;
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;
|
||||
UINTN Index;
|
||||
|
||||
|
||||
BootOptions = EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOptionTypeBoot);
|
||||
|
||||
for (Index = 0; Index < BootOptionCount; Index++) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Library functions which relate with boot option description.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -460,7 +460,7 @@ BmGetNetworkDescription (
|
||||
} else {
|
||||
Ip = NULL;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Skip the optional DNS node
|
||||
//
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Library functions which relate with connecting the device.
|
||||
|
||||
Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -107,7 +107,7 @@ EfiBootManagerConnectAll (
|
||||
@retval EFI_OUT_OF_RESOURCES There is no resource to create new handles.
|
||||
@retval EFI_NOT_FOUND Create the handle associate with one device path
|
||||
node failed.
|
||||
@retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device
|
||||
@retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device
|
||||
drivers on the DevicePath.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -167,7 +167,7 @@ EfiBootManagerConnectDevicePath (
|
||||
// Connect all drivers that apply to Handle and RemainingDevicePath,
|
||||
// the Recursive flag is FALSE so only one level will be expanded.
|
||||
//
|
||||
// If ConnectController fails to find a driver, then still give the chance to
|
||||
// If ConnectController fails to find a driver, then still give the chance to
|
||||
// do dispatch, because partial RemainingDevicePath may be in the new FV
|
||||
//
|
||||
// 1. If the connect fail, RemainingDevicepath and handle will not
|
||||
@ -197,8 +197,8 @@ EfiBootManagerConnectDevicePath (
|
||||
}
|
||||
|
||||
/**
|
||||
This function will disconnect all current system handles.
|
||||
|
||||
This function will disconnect all current system handles.
|
||||
|
||||
gBS->DisconnectController() is invoked for each handle exists in system handle buffer.
|
||||
If handle is a bus type handle, all childrens also are disconnected recursively by
|
||||
gBS->DisconnectController().
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Library functions which contain all the code to connect console device.
|
||||
|
||||
Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -104,12 +104,12 @@ BmGetVideoController (
|
||||
}
|
||||
}
|
||||
FreePool (RootBridgeHandleBuffer);
|
||||
|
||||
|
||||
return VideoController;
|
||||
}
|
||||
|
||||
/**
|
||||
Query all the children of VideoController and return the device paths of all the
|
||||
Query all the children of VideoController and return the device paths of all the
|
||||
children that support GraphicsOutput protocol.
|
||||
|
||||
@param VideoController PCI handle of video controller.
|
||||
@ -238,14 +238,14 @@ EfiBootManagerConnectVideoController (
|
||||
)
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL *Gop;
|
||||
|
||||
|
||||
if (VideoController == NULL) {
|
||||
//
|
||||
// Get the platform vga device
|
||||
//
|
||||
VideoController = BmGetVideoController ();
|
||||
}
|
||||
|
||||
|
||||
if (VideoController == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
@ -253,7 +253,7 @@ EfiBootManagerConnectVideoController (
|
||||
//
|
||||
// Try to connect the PCI device path, so that GOP driver could start on this
|
||||
// device and create child handles with GraphicsOutput Protocol installed
|
||||
// on them, then we get device paths of these child handles and select
|
||||
// on them, then we get device paths of these child handles and select
|
||||
// them as possible console device.
|
||||
//
|
||||
gBS->ConnectController (VideoController, NULL, NULL, FALSE);
|
||||
@ -276,20 +276,20 @@ EfiBootManagerConnectVideoController (
|
||||
Fill console handle in System Table if there are no valid console handle in.
|
||||
|
||||
Firstly, check the validation of console handle in System Table. If it is invalid,
|
||||
update it by the first console device handle from EFI console variable.
|
||||
update it by the first console device handle from EFI console variable.
|
||||
|
||||
@param VarName The name of the EFI console variable.
|
||||
@param ConsoleGuid Specified Console protocol GUID.
|
||||
@param ConsoleHandle On IN, console handle in System Table to be checked.
|
||||
@param ConsoleHandle On IN, console handle in System Table to be checked.
|
||||
On OUT, new console handle in system table.
|
||||
@param ProtocolInterface On IN, console protocol on console handle in System Table to be checked.
|
||||
@param ProtocolInterface On IN, console protocol on console handle in System Table to be checked.
|
||||
On OUT, new console protocol on new console handle in system table.
|
||||
|
||||
@retval TRUE System Table has been updated.
|
||||
@retval FALSE System Table hasn't been updated.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
BmUpdateSystemTableConsole (
|
||||
IN CHAR16 *VarName,
|
||||
IN EFI_GUID *ConsoleGuid,
|
||||
@ -326,7 +326,7 @@ BmUpdateSystemTableConsole (
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get all possible consoles device path from EFI variable
|
||||
//
|
||||
@ -352,7 +352,7 @@ BmUpdateSystemTableConsole (
|
||||
FreePool (FullDevicePath);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Find console device handle by device path instance
|
||||
//
|
||||
@ -559,7 +559,7 @@ EfiBootManagerConnectConsoleVariable (
|
||||
FreePool (StartDevicePath);
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
Next = Instance;
|
||||
while (!IsDevicePathEndType (Next)) {
|
||||
Next = NextDevicePathNode (Next);
|
||||
@ -568,7 +568,7 @@ EfiBootManagerConnectConsoleVariable (
|
||||
SetDevicePathEndNode (Next);
|
||||
//
|
||||
// Connect the USB console
|
||||
// USB console device path is a short-form device path that
|
||||
// USB console device path is a short-form device path that
|
||||
// starts with the first element being a USB WWID
|
||||
// or a USB Class device path
|
||||
//
|
||||
@ -583,7 +583,7 @@ EfiBootManagerConnectConsoleVariable (
|
||||
for (Next = Instance; !IsDevicePathEnd (Next); Next = NextDevicePathNode (Next)) {
|
||||
if (DevicePathType (Next) == ACPI_DEVICE_PATH && DevicePathSubType (Next) == ACPI_ADR_DP) {
|
||||
break;
|
||||
} else if (DevicePathType (Next) == HARDWARE_DEVICE_PATH &&
|
||||
} else if (DevicePathType (Next) == HARDWARE_DEVICE_PATH &&
|
||||
DevicePathSubType (Next) == HW_CONTROLLER_DP &&
|
||||
DevicePathType (NextDevicePathNode (Next)) == ACPI_DEVICE_PATH &&
|
||||
DevicePathSubType (NextDevicePathNode (Next)) == ACPI_ADR_DP
|
||||
@ -724,7 +724,7 @@ EfiBootManagerConnectAllDefaultConsoles (
|
||||
}
|
||||
PERF_EVENT ("ConOutReady");
|
||||
|
||||
|
||||
|
||||
Status = EfiBootManagerConnectConsoleVariable (ConIn);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
OneConnected = TRUE;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Library functions which relates with driver health.
|
||||
|
||||
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
@ -92,7 +92,7 @@ BmGetControllerName (
|
||||
|
||||
Status = ComponentName->GetControllerName (
|
||||
ComponentName,
|
||||
ControllerHandle,
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
BestLanguage,
|
||||
&ControllerName
|
||||
@ -131,7 +131,7 @@ BmDisplayMessages (
|
||||
|
||||
ControllerName = BmGetControllerName (
|
||||
DriverHealthInfo->DriverHealthHandle,
|
||||
DriverHealthInfo->ControllerHandle,
|
||||
DriverHealthInfo->ControllerHandle,
|
||||
DriverHealthInfo->ChildHandle
|
||||
);
|
||||
|
||||
@ -181,7 +181,7 @@ BmRepairNotify (
|
||||
|
||||
/**
|
||||
Collect the Driver Health status of a single controller.
|
||||
|
||||
|
||||
@param DriverHealthInfo A pointer to the array containing all of the platform driver health information.
|
||||
@param Count Return the updated array count.
|
||||
@param DriverHealthHandle The handle on which the Driver Health protocol instance is retrieved.
|
||||
@ -218,7 +218,7 @@ BmGetSingleControllerHealthStatus (
|
||||
(VOID **) &DriverHealth
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
|
||||
if (ControllerHandle == NULL) {
|
||||
//
|
||||
@ -471,7 +471,7 @@ BmRepairAllControllers (
|
||||
if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusConfigurationRequired) {
|
||||
ConfigurationRequired = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusRepairRequired) {
|
||||
RepairRequired = TRUE;
|
||||
|
||||
@ -519,7 +519,7 @@ BmRepairAllControllers (
|
||||
FreePool (HiiHandles);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EfiBootManagerFreeDriverHealthInfo (DriverHealthInfo, Count);
|
||||
RepairCount++;
|
||||
} while ((RepairRequired || ConfigurationRequired) && ((MaxRepairCount == 0) || (RepairCount < MaxRepairCount)));
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Hotkey library functions.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -116,7 +116,7 @@ BmIsKeyOptionVariable (
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN Uint;
|
||||
|
||||
|
||||
if (!CompareGuid (Guid, &gEfiGlobalVariableGuid) ||
|
||||
(StrSize (Name) != sizeof (L"Key####")) ||
|
||||
(StrnCmp (Name, L"Key", 3) != 0)
|
||||
@ -375,7 +375,7 @@ BmHotkeyCallback (
|
||||
HotkeyData = &Hotkey->KeyData[Hotkey->WaitingKey];
|
||||
if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) &&
|
||||
(KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) &&
|
||||
(((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ?
|
||||
(((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ?
|
||||
(KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE
|
||||
)
|
||||
) {
|
||||
@ -799,7 +799,7 @@ EfiBootManagerRegisterContinueKeyOption (
|
||||
EFI_STATUS Status;
|
||||
EFI_BOOT_MANAGER_KEY_OPTION KeyOption;
|
||||
VA_LIST Args;
|
||||
|
||||
|
||||
if (mBmContinueKeyOption != NULL) {
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
@ -822,7 +822,7 @@ EfiBootManagerRegisterContinueKeyOption (
|
||||
|
||||
/**
|
||||
Stop the hotkey processing.
|
||||
|
||||
|
||||
@param Event Event pointer related to hotkey service.
|
||||
@param Context Context pass to this function.
|
||||
**/
|
||||
@ -852,7 +852,7 @@ BmStopHotkeyService (
|
||||
/**
|
||||
Start the hot key service so that the key press can trigger the boot option.
|
||||
|
||||
@param HotkeyTriggered Return the waitable event and it will be signaled
|
||||
@param HotkeyTriggered Return the waitable event and it will be signaled
|
||||
when a valid hot key is pressed.
|
||||
|
||||
@retval EFI_SUCCESS The hot key service is started.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Load option library functions which relate with creating and processing load options.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -90,7 +90,7 @@ BmGetFreeOptionNumber (
|
||||
OUT UINT16 *FreeOptionNumber
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
UINTN OptionNumber;
|
||||
UINTN Index;
|
||||
UINT16 *OptionOrder;
|
||||
@ -98,7 +98,7 @@ BmGetFreeOptionNumber (
|
||||
UINT16 *BootNext;
|
||||
|
||||
ASSERT (FreeOptionNumber != NULL);
|
||||
ASSERT (LoadOptionType == LoadOptionTypeDriver ||
|
||||
ASSERT (LoadOptionType == LoadOptionTypeDriver ||
|
||||
LoadOptionType == LoadOptionTypeBoot ||
|
||||
LoadOptionType == LoadOptionTypeSysPrep);
|
||||
|
||||
@ -110,9 +110,9 @@ BmGetFreeOptionNumber (
|
||||
GetEfiGlobalVariable2 (L"BootNext", (VOID**) &BootNext, NULL);
|
||||
}
|
||||
|
||||
for (OptionNumber = 0;
|
||||
for (OptionNumber = 0;
|
||||
OptionNumber < OptionOrderSize / sizeof (UINT16)
|
||||
+ ((BootNext != NULL) ? 1 : 0);
|
||||
+ ((BootNext != NULL) ? 1 : 0);
|
||||
OptionNumber++
|
||||
) {
|
||||
//
|
||||
@ -125,10 +125,10 @@ BmGetFreeOptionNumber (
|
||||
}
|
||||
|
||||
//
|
||||
// We didn't find it in the ****Order array and it doesn't equal to BootNext
|
||||
// We didn't find it in the ****Order array and it doesn't equal to BootNext
|
||||
// Otherwise, OptionNumber equals to OptionOrderSize / sizeof (UINT16) + 1
|
||||
//
|
||||
if ((Index == OptionOrderSize / sizeof (UINT16)) &&
|
||||
if ((Index == OptionOrderSize / sizeof (UINT16)) &&
|
||||
((BootNext == NULL) || (OptionNumber != *BootNext))
|
||||
) {
|
||||
break;
|
||||
@ -203,12 +203,12 @@ EfiBootManagerLoadOptionToVariable (
|
||||
EFI_DEVICE_PATH_PROTOCOL FilePathList[];
|
||||
UINT8 OptionalData[];
|
||||
TODO: FilePathList[] IS:
|
||||
A packed array of UEFI device paths. The first element of the
|
||||
array is a device path that describes the device and location of the
|
||||
Image for this load option. The FilePathList[0] is specific
|
||||
to the device type. Other device paths may optionally exist in the
|
||||
FilePathList, but their usage is OSV specific. Each element
|
||||
in the array is variable length, and ends at the device path end
|
||||
A packed array of UEFI device paths. The first element of the
|
||||
array is a device path that describes the device and location of the
|
||||
Image for this load option. The FilePathList[0] is specific
|
||||
to the device type. Other device paths may optionally exist in the
|
||||
FilePathList, but their usage is OSV specific. Each element
|
||||
in the array is variable length, and ends at the device path end
|
||||
structure.
|
||||
*/
|
||||
VariableSize = sizeof (Option->Attributes)
|
||||
@ -359,7 +359,7 @@ EfiBootManagerAddLoadOptionVariable (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (Option->OptionType != LoadOptionTypeDriver &&
|
||||
if (Option->OptionType != LoadOptionTypeDriver &&
|
||||
Option->OptionType != LoadOptionTypeSysPrep &&
|
||||
Option->OptionType != LoadOptionTypeBoot
|
||||
) {
|
||||
@ -399,7 +399,7 @@ EfiBootManagerAddLoadOptionVariable (
|
||||
}
|
||||
|
||||
/**
|
||||
Sort the load option. The DriverOrder or BootOrder will be re-created to
|
||||
Sort the load option. The DriverOrder or BootOrder will be re-created to
|
||||
reflect the new order.
|
||||
|
||||
@param OptionType Load option type
|
||||
@ -514,7 +514,7 @@ EfiBootManagerInitializeLoadOption (
|
||||
/**
|
||||
Return the index of the load option in the load option array.
|
||||
|
||||
The function consider two load options are equal when the
|
||||
The function consider two load options are equal when the
|
||||
OptionType, Attributes, Description, FilePath and OptionalData are equal.
|
||||
|
||||
@param Key Pointer to the load option to be found.
|
||||
@ -618,15 +618,15 @@ EfiBootManagerDeleteLoadOptionVariable (
|
||||
/**
|
||||
Returns the size of a device path in bytes.
|
||||
|
||||
This function returns the size, in bytes, of the device path data structure
|
||||
specified by DevicePath including the end of device path node. If DevicePath
|
||||
This function returns the size, in bytes, of the device path data structure
|
||||
specified by DevicePath including the end of device path node. If DevicePath
|
||||
is NULL, then 0 is returned. If the length of the device path is bigger than
|
||||
MaxSize, also return 0 to indicate this is an invalidate device path.
|
||||
|
||||
@param DevicePath A pointer to a device path data structure.
|
||||
@param MaxSize Max valid device path size. If big than this size,
|
||||
@param MaxSize Max valid device path size. If big than this size,
|
||||
return error.
|
||||
|
||||
|
||||
@retval 0 An invalid device path.
|
||||
@retval Others The size of a device path in bytes.
|
||||
|
||||
@ -668,12 +668,12 @@ BmGetDevicePathSizeEx (
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the length of a Null-terminated Unicode string. If the length is
|
||||
bigger than MaxStringLen, return length 0 to indicate that this is an
|
||||
Returns the length of a Null-terminated Unicode string. If the length is
|
||||
bigger than MaxStringLen, return length 0 to indicate that this is an
|
||||
invalidate string.
|
||||
|
||||
This function returns the number of Unicode characters in the Null-terminated
|
||||
Unicode string specified by String.
|
||||
Unicode string specified by String.
|
||||
|
||||
If String is NULL, then ASSERT().
|
||||
If String is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@ -716,7 +716,7 @@ BmStrSizeEx (
|
||||
@retval FALSE The variable data is corrupted.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
BmValidateOption (
|
||||
UINT8 *Variable,
|
||||
UINTN VariableSize
|
||||
@ -862,7 +862,7 @@ EFIAPI
|
||||
EfiBootManagerVariableToLoadOptionEx (
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID *VendorGuid,
|
||||
IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option
|
||||
IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@ -1034,7 +1034,7 @@ BmCollectLoadOptions (
|
||||
/**
|
||||
Returns an array of load options based on the EFI variable
|
||||
L"BootOrder"/L"DriverOrder" and the L"Boot####"/L"Driver####" variables impled by it.
|
||||
#### is the hex value of the UINT16 in each BootOrder/DriverOrder entry.
|
||||
#### is the hex value of the UINT16 in each BootOrder/DriverOrder entry.
|
||||
|
||||
@param LoadOptionCount Returns number of entries in the array.
|
||||
@param LoadOptionType The type of the load option.
|
||||
@ -1122,8 +1122,8 @@ EfiBootManagerGetLoadOptions (
|
||||
|
||||
@param LoadOption Pointer to boot option to Free.
|
||||
|
||||
@return EFI_SUCCESS BootOption was freed
|
||||
@return EFI_NOT_FOUND BootOption == NULL
|
||||
@return EFI_SUCCESS BootOption was freed
|
||||
@return EFI_NOT_FOUND BootOption == NULL
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1150,14 +1150,14 @@ EfiBootManagerFreeLoadOption (
|
||||
}
|
||||
|
||||
/**
|
||||
Free an EFI_BOOT_MANGER_LOAD_OPTION array that was allocated by
|
||||
Free an EFI_BOOT_MANGER_LOAD_OPTION array that was allocated by
|
||||
EfiBootManagerGetLoadOptions().
|
||||
|
||||
@param Option Pointer to boot option array to free.
|
||||
@param OptionCount Number of array entries in BootOption
|
||||
|
||||
@return EFI_SUCCESS BootOption was freed
|
||||
@return EFI_NOT_FOUND BootOption == NULL
|
||||
@return EFI_SUCCESS BootOption was freed
|
||||
@return EFI_NOT_FOUND BootOption == NULL
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1230,7 +1230,7 @@ BmIsLoadOptionPeHeaderValid (
|
||||
// Check PE32 or PE32+ magic, and machine type
|
||||
//
|
||||
OptionalHeader = (EFI_IMAGE_OPTIONAL_HEADER32 *) &PeHeader->Pe32.OptionalHeader;
|
||||
if ((OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC ||
|
||||
if ((OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC ||
|
||||
OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) &&
|
||||
EFI_IMAGE_MACHINE_TYPE_SUPPORTED (PeHeader->Pe32.FileHeader.Machine)
|
||||
) {
|
||||
@ -1346,7 +1346,7 @@ BmGetNextLoadOptionBuffer (
|
||||
|
||||
@param LoadOption Pointer to the load option.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER The load option type is invalid,
|
||||
@retval EFI_INVALID_PARAMETER The load option type is invalid,
|
||||
or the load option file path doesn't point to a valid file.
|
||||
@retval EFI_UNSUPPORTED The load option type is of LoadOptionTypeBoot.
|
||||
@retval EFI_SUCCESS The load option is inactive, or successfully loaded and executed.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Misc library functions.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -122,7 +122,7 @@ BmMatchDevicePaths (
|
||||
}
|
||||
|
||||
/**
|
||||
This routine adjust the memory information for different memory type and
|
||||
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
|
||||
@ -163,7 +163,7 @@ BmSetMemoryTypeInformationVariable (
|
||||
}
|
||||
|
||||
//
|
||||
// Only check the the Memory Type Information variable in the boot mode
|
||||
// Only check the the Memory Type Information variable in the boot mode
|
||||
// other than BOOT_WITH_DEFAULT_SETTINGS because the Memory Type
|
||||
// Information is not valid in this boot mode.
|
||||
//
|
||||
@ -172,8 +172,8 @@ BmSetMemoryTypeInformationVariable (
|
||||
Status = gRT->GetVariable (
|
||||
EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
|
||||
&gEfiMemoryTypeInformationGuid,
|
||||
NULL,
|
||||
&VariableSize,
|
||||
NULL,
|
||||
&VariableSize,
|
||||
NULL
|
||||
);
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
@ -304,14 +304,14 @@ BmSetMemoryTypeInformationVariable (
|
||||
then EFI_INVALID_PARAMETER is returned.
|
||||
@param VendorGuid A unique identifier for the vendor.
|
||||
@param Attributes Attributes bitmask to set for the variable.
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
@param 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).
|
||||
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).
|
||||
@param Data The contents for the variable.
|
||||
|
||||
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
BDS library definition, include the file and data structure
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -192,7 +192,7 @@ BmGetFreeOptionNumber (
|
||||
);
|
||||
|
||||
/**
|
||||
This routine adjust the memory information for different memory type and
|
||||
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
|
||||
@ -245,9 +245,9 @@ BmConnectUsbShortFormDevicePath (
|
||||
|
||||
/**
|
||||
Stop the hotkey processing.
|
||||
|
||||
@param Event Event pointer related to hotkey service.
|
||||
@param Context Context pass to this function.
|
||||
|
||||
@param Event Event pointer related to hotkey service.
|
||||
@param Context Context pass to this function.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -265,14 +265,14 @@ BmStopHotkeyService (
|
||||
then EFI_INVALID_PARAMETER is returned.
|
||||
@param VendorGuid A unique identifier for the vendor.
|
||||
@param Attributes Attributes bitmask to set for the variable.
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
@param 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).
|
||||
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).
|
||||
@param Data The contents for the variable.
|
||||
|
||||
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
|
||||
|
@ -24,7 +24,7 @@
|
||||
FILE_GUID = 8D4752BC-595E-49a2-B4AF-F3F57B601DE9
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = UefiBootManagerLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
LIBRARY_CLASS = UefiBootManagerLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
@ -42,7 +42,7 @@
|
||||
BmHotkey.c
|
||||
BmDriverHealth.c
|
||||
InternalBm.h
|
||||
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
|
Reference in New Issue
Block a user