IntelFrameworkModulePkg: 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>
This commit is contained in:
@@ -43,12 +43,12 @@ BmEndOfBdsPerfCode (
|
||||
|
||||
/**
|
||||
The constructor function register UNI strings into imageHandle.
|
||||
|
||||
It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
||||
|
||||
It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the EFI System Table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The constructor successfully added string package.
|
||||
@retval Other value The constructor can't add string package.
|
||||
|
||||
@@ -432,7 +432,7 @@ BdsCreateLegacyBootOption (
|
||||
);
|
||||
|
||||
FreePool (Buffer);
|
||||
|
||||
|
||||
Buffer = NULL;
|
||||
|
||||
NewBootOrderList = AllocateZeroPool (*BootOrderListSize + sizeof (UINT16));
|
||||
@@ -593,10 +593,10 @@ BdsDeleteAllInvalidLegacyBootOptions (
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Skip Non-Legacy boot option
|
||||
//
|
||||
//
|
||||
if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) {
|
||||
if (BootOptionVar!= NULL) {
|
||||
FreePool (BootOptionVar);
|
||||
@@ -803,7 +803,7 @@ BdsCreateOneLegacyBootOption (
|
||||
/**
|
||||
Add the legacy boot options from BBS table if they do not exist.
|
||||
|
||||
@retval EFI_SUCCESS The boot options are added successfully
|
||||
@retval EFI_SUCCESS The boot options are added successfully
|
||||
or they are already in boot options.
|
||||
@retval EFI_NOT_FOUND No legacy boot options is found.
|
||||
@retval EFI_OUT_OF_RESOURCE No enough memory.
|
||||
@@ -953,7 +953,7 @@ BdsFillDevOrderBuf (
|
||||
@param BbsTable The BBS table.
|
||||
@param BbsCount The BBS Count.
|
||||
|
||||
@retval EFI_SUCCES The buffer is created and the EFI variable named
|
||||
@retval EFI_SUCCES The buffer is created and the EFI variable named
|
||||
VAR_LEGACY_DEV_ORDER and gEfiLegacyDevOrderVariableGuid is
|
||||
set correctly.
|
||||
@retval EFI_OUT_OF_RESOURCES Memmory or storage is not enough.
|
||||
@@ -1044,11 +1044,11 @@ BdsCreateDevOrder (
|
||||
DevOrderPtr->BbsType = BBS_HARDDISK;
|
||||
DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16));
|
||||
DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data);
|
||||
|
||||
|
||||
DevOrderPtr->BbsType = BBS_CDROM;
|
||||
DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16));
|
||||
DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data);
|
||||
|
||||
|
||||
DevOrderPtr->BbsType = BBS_EMBED_NETWORK;
|
||||
DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16));
|
||||
DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_EMBED_NETWORK, BbsCount, DevOrderPtr->Data);
|
||||
@@ -1075,7 +1075,7 @@ BdsCreateDevOrder (
|
||||
}
|
||||
|
||||
/**
|
||||
Add the legacy boot devices from BBS table into
|
||||
Add the legacy boot devices from BBS table into
|
||||
the legacy device boot order.
|
||||
|
||||
@retval EFI_SUCCESS The boot devices are added successfully.
|
||||
@@ -1293,7 +1293,7 @@ BdsUpdateLegacyDevOrder (
|
||||
NETIndex++;
|
||||
}
|
||||
NewNETPtr = NewPtr->Data;
|
||||
|
||||
|
||||
//
|
||||
// copy BEV
|
||||
//
|
||||
@@ -1517,7 +1517,7 @@ PrintBbsTable (
|
||||
Set the boot priority for BBS entries based on boot option entry and boot order.
|
||||
|
||||
@param Entry The boot option is to be checked for refresh BBS table.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.
|
||||
@retval EFI_NOT_FOUND BBS entries can't be found.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to get the legacy device boot order.
|
||||
@@ -1719,7 +1719,7 @@ BdsLibDoLegacyBoot (
|
||||
Status = EfiCreateEventLegacyBootEx(
|
||||
TPL_NOTIFY,
|
||||
BmEndOfBdsPerfCode,
|
||||
NULL,
|
||||
NULL,
|
||||
&LegacyBootEvent
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -1976,7 +1976,7 @@ BdsMatchUsbWwid (
|
||||
|
||||
/**
|
||||
Find a USB device path which match the specified short-form device path start
|
||||
with USB Class or USB WWID device path and load the boot file then return the
|
||||
with USB Class or USB WWID device path and load the boot file then return the
|
||||
image handle. 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.
|
||||
@@ -2133,7 +2133,7 @@ BdsFindUsbDevice (
|
||||
|
||||
/**
|
||||
Expand USB Class or USB WWID device path node to be full device path of a USB
|
||||
device in platform then load the boot file on this full device path and return the
|
||||
device in platform then load the boot file on this full device path and return the
|
||||
image handle.
|
||||
|
||||
This function support following 4 cases:
|
||||
@@ -2365,9 +2365,9 @@ BdsLibBootViaBootOption (
|
||||
} else {
|
||||
DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));
|
||||
}
|
||||
|
||||
|
||||
DEBUG_CODE_END();
|
||||
|
||||
|
||||
//
|
||||
// Report status code for OS Loader LoadImage.
|
||||
//
|
||||
@@ -2421,7 +2421,7 @@ BdsLibBootViaBootOption (
|
||||
REPORT_STATUS_CODE (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MINOR,
|
||||
(EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR)
|
||||
);
|
||||
);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@@ -2690,7 +2690,7 @@ BdsExpandPartitionPartialDevicePathToFull (
|
||||
|
||||
//
|
||||
// Here limit the device path instance number to 12, which is max number for a system support 3 IDE controller
|
||||
// If the user try to boot many OS in different HDs or partitions, in theory,
|
||||
// If the user try to boot many OS in different HDs or partitions, in theory,
|
||||
// the HD_BOOT_DEVICE_PATH_VARIABLE_NAME variable maybe become larger and larger.
|
||||
//
|
||||
InstanceNum = 0;
|
||||
@@ -3214,7 +3214,7 @@ BdsLibEnumerateAllBootOption (
|
||||
|
||||
//
|
||||
// Parse removable media followed by fixed media.
|
||||
// The Removable[] array is used by the for-loop below to create removable media boot options
|
||||
// The Removable[] array is used by the for-loop below to create removable media boot options
|
||||
// at first, and then to create fixed media boot options.
|
||||
//
|
||||
Removable[0] = FALSE;
|
||||
@@ -3629,7 +3629,7 @@ BdsLibGetBootableHandle (
|
||||
UpdatedDevicePath = DevicePath;
|
||||
|
||||
//
|
||||
// Enter to critical section to protect the acquired BlockIo instance
|
||||
// Enter to critical section to protect the acquired BlockIo instance
|
||||
// from getting released due to the USB mass storage hotplug event
|
||||
//
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
@@ -3653,10 +3653,10 @@ BdsLibGetBootableHandle (
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// For removable device boot option, its contained device path only point to the removable device handle,
|
||||
// should make sure all its children handles (its child partion or media handles) are created and connected.
|
||||
// For removable device boot option, its contained device path only point to the removable device handle,
|
||||
// should make sure all its children handles (its child partion or media handles) are created and connected.
|
||||
//
|
||||
gBS->ConnectController (Handle, NULL, NULL, TRUE);
|
||||
gBS->ConnectController (Handle, NULL, NULL, TRUE);
|
||||
//
|
||||
// Get BlockIo protocol and check removable attribute
|
||||
//
|
||||
@@ -4030,7 +4030,7 @@ BdsLibIsValidEFIBootOptDevicePathExt (
|
||||
|
||||
//
|
||||
// Check if it's a valid boot option for network boot device.
|
||||
// Check if there is EfiLoadFileProtocol installed.
|
||||
// Check if there is EfiLoadFileProtocol installed.
|
||||
// If yes, that means there is a boot option for network.
|
||||
//
|
||||
Status = gBS->LocateDevicePath (
|
||||
@@ -4068,7 +4068,7 @@ BdsLibIsValidEFIBootOptDevicePathExt (
|
||||
}
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
BDS Lib functions which relate with connect the device
|
||||
|
||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -109,7 +109,7 @@ BdsLibConnectDevicePath (
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
CopyOfDevicePath = DevicePath;
|
||||
|
||||
|
||||
do {
|
||||
//
|
||||
// The outer loop handles multi instance device paths.
|
||||
@@ -122,7 +122,7 @@ BdsLibConnectDevicePath (
|
||||
FreePool (CopyOfDevicePath);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Next = Instance;
|
||||
while (!IsDevicePathEndType (Next)) {
|
||||
Next = NextDevicePathNode (Next);
|
||||
@@ -203,8 +203,8 @@ BdsLibConnectDevicePath (
|
||||
}
|
||||
|
||||
/**
|
||||
This function will connect all current system handles recursively.
|
||||
|
||||
This function will connect all current system handles recursively.
|
||||
|
||||
gBS->ConnectController() service is invoked for each handle exist in system handler buffer.
|
||||
If the handle is bus type handler, all childrens also will be connected recursively
|
||||
by gBS->ConnectController().
|
||||
@@ -247,8 +247,8 @@ BdsLibConnectAllEfi (
|
||||
}
|
||||
|
||||
/**
|
||||
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().
|
||||
|
@@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Check if we need to save the EFI variable with "ConVarName" as name
|
||||
as NV type
|
||||
If ConVarName is NULL, then ASSERT().
|
||||
|
||||
|
||||
@param ConVarName The name of the EFI variable.
|
||||
|
||||
@retval TRUE Set the EFI variable as NV type.
|
||||
@@ -33,7 +33,7 @@ IsNvNeed (
|
||||
CHAR16 *Ptr;
|
||||
|
||||
ASSERT (ConVarName != NULL);
|
||||
|
||||
|
||||
Ptr = ConVarName;
|
||||
|
||||
//
|
||||
@@ -47,7 +47,7 @@ IsNvNeed (
|
||||
if (((INTN)((UINTN)Ptr - (UINTN)ConVarName) / sizeof (CHAR16)) <= 3) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ((*(Ptr - 3) == 'D') && (*(Ptr - 2) == 'e') && (*(Ptr - 1) == 'v')) {
|
||||
return FALSE;
|
||||
} else {
|
||||
@@ -59,20 +59,20 @@ IsNvNeed (
|
||||
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
|
||||
UpdateSystemTableConsole (
|
||||
IN CHAR16 *VarName,
|
||||
IN EFI_GUID *ConsoleGuid,
|
||||
@@ -108,7 +108,7 @@ UpdateSystemTableConsole (
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get all possible consoles device path from EFI variable
|
||||
//
|
||||
@@ -135,7 +135,7 @@ UpdateSystemTableConsole (
|
||||
FreePool (FullDevicePath);
|
||||
ASSERT (FALSE);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Find console device handle by device path instance
|
||||
//
|
||||
@@ -371,7 +371,7 @@ BdsLibConnectConsoleVariable (
|
||||
FreePool (StartDevicePath);
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
Next = Instance;
|
||||
while (!IsDevicePathEndType (Next)) {
|
||||
Next = NextDevicePathNode (Next);
|
||||
@@ -380,7 +380,7 @@ BdsLibConnectConsoleVariable (
|
||||
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
|
||||
//
|
||||
@@ -791,7 +791,7 @@ EnableQuietBoot (
|
||||
Attribute = EfiBadgingDisplayAttributeCenter;
|
||||
} else {
|
||||
Attribute = EfiBadgingDisplayAttributeCustomized;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Blt != NULL) {
|
||||
@@ -968,7 +968,7 @@ Done:
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
// More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation.
|
||||
// More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation.
|
||||
//
|
||||
if (Blt != NULL) {
|
||||
FreePool (Blt);
|
||||
@@ -1034,7 +1034,7 @@ Done:
|
||||
}
|
||||
|
||||
/**
|
||||
Use SystemTable Conout to turn on video based Simple Text Out consoles. The
|
||||
Use SystemTable Conout to turn on video based Simple Text Out consoles. The
|
||||
Simple Text Out screens will now be synced up with all non video output devices
|
||||
|
||||
@retval EFI_SUCCESS UGA devices are back in text mode and synced up.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Misc BDS library function
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -51,7 +51,7 @@ BdsLibLoadDrivers (
|
||||
//
|
||||
for (Link = BdsDriverLists->ForwardLink; Link != BdsDriverLists; Link = Link->ForwardLink) {
|
||||
Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE);
|
||||
|
||||
|
||||
//
|
||||
// If a load option is not marked as LOAD_OPTION_ACTIVE,
|
||||
// the boot manager will not automatically load the option.
|
||||
@@ -59,7 +59,7 @@ BdsLibLoadDrivers (
|
||||
if (!IS_LOAD_OPTION_TYPE (Option->Attribute, LOAD_OPTION_ACTIVE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If a driver load option is marked as LOAD_OPTION_FORCE_RECONNECT,
|
||||
// then all of the EFI drivers in the system will be disconnected and
|
||||
@@ -68,7 +68,7 @@ BdsLibLoadDrivers (
|
||||
if (IS_LOAD_OPTION_TYPE (Option->Attribute, LOAD_OPTION_FORCE_RECONNECT)) {
|
||||
ReconnectAll = TRUE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Make sure the driver path is connected.
|
||||
//
|
||||
@@ -117,7 +117,7 @@ BdsLibLoadDrivers (
|
||||
gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Process the LOAD_OPTION_FORCE_RECONNECT driver option
|
||||
//
|
||||
@@ -280,7 +280,7 @@ BdsLibRegisterNewOption (
|
||||
// Notes: the description may will change base on the GetStringToken
|
||||
//
|
||||
if (CompareMem (OptionDevicePath, DevicePath, GetDevicePathSize (OptionDevicePath)) == 0) {
|
||||
if (CompareMem (Description, String, StrSize (Description)) == 0) {
|
||||
if (CompareMem (Description, String, StrSize (Description)) == 0) {
|
||||
//
|
||||
// Got the option, so just return
|
||||
//
|
||||
@@ -304,7 +304,7 @@ BdsLibRegisterNewOption (
|
||||
OptionSize += GetDevicePathSize (DevicePath);
|
||||
OptionPtr = AllocateZeroPool (OptionSize);
|
||||
ASSERT (OptionPtr != NULL);
|
||||
|
||||
|
||||
TempPtr = OptionPtr;
|
||||
*(UINT32 *) TempPtr = LOAD_OPTION_ACTIVE;
|
||||
TempPtr += sizeof (UINT32);
|
||||
@@ -316,7 +316,7 @@ BdsLibRegisterNewOption (
|
||||
|
||||
if (UpdateDescription) {
|
||||
//
|
||||
// The number in option#### to be updated.
|
||||
// The number in option#### to be updated.
|
||||
// In this case, we must have non-NULL TempOptionPtr.
|
||||
//
|
||||
ASSERT (TempOptionPtr != NULL);
|
||||
@@ -375,7 +375,7 @@ BdsLibRegisterNewOption (
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// TempOptionPtr must not be NULL if TempOptionSize is not zero.
|
||||
//
|
||||
@@ -406,15 +406,15 @@ BdsLibRegisterNewOption (
|
||||
/**
|
||||
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.
|
||||
|
||||
@@ -456,12 +456,12 @@ GetDevicePathSizeEx (
|
||||
}
|
||||
|
||||
/**
|
||||
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 byte length 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().
|
||||
@@ -503,7 +503,7 @@ StrSizeEx (
|
||||
@retval FALSE The variable data is corrupted.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
ValidateOption (
|
||||
UINT8 *Variable,
|
||||
UINTN VariableSize
|
||||
@@ -559,9 +559,9 @@ ValidateOption (
|
||||
/**
|
||||
Convert a single character to number.
|
||||
It assumes the input Char is in the scope of L'0' ~ L'9' and L'A' ~ L'F'
|
||||
|
||||
|
||||
@param Char The input char which need to change to a hex number.
|
||||
|
||||
|
||||
**/
|
||||
UINTN
|
||||
CharToUint (
|
||||
@@ -703,7 +703,7 @@ BdsLibVariableToOption (
|
||||
//
|
||||
if (*VariableName == 'B') {
|
||||
NumOff = (UINT8) (sizeof (L"Boot") / sizeof (CHAR16) - 1);
|
||||
Option->BootCurrent = (UINT16) (CharToUint (VariableName[NumOff+0]) * 0x1000)
|
||||
Option->BootCurrent = (UINT16) (CharToUint (VariableName[NumOff+0]) * 0x1000)
|
||||
+ (UINT16) (CharToUint (VariableName[NumOff+1]) * 0x100)
|
||||
+ (UINT16) (CharToUint (VariableName[NumOff+2]) * 0x10)
|
||||
+ (UINT16) (CharToUint (VariableName[NumOff+3]) * 0x1);
|
||||
@@ -1004,7 +1004,7 @@ BdsLibOutputStrings (
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VA_END(Args);
|
||||
return Status;
|
||||
}
|
||||
@@ -1298,7 +1298,7 @@ BdsLibGetImageHeader (
|
||||
}
|
||||
|
||||
/**
|
||||
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.
|
||||
**/
|
||||
VOID
|
||||
@@ -1333,7 +1333,7 @@ BdsSetMemoryTypeInformationVariable (
|
||||
}
|
||||
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
@@ -1342,8 +1342,8 @@ BdsSetMemoryTypeInformationVariable (
|
||||
Status = gRT->GetVariable (
|
||||
EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
|
||||
&gEfiMemoryTypeInformationGuid,
|
||||
NULL,
|
||||
&VariableSize,
|
||||
NULL,
|
||||
&VariableSize,
|
||||
NULL
|
||||
);
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
@@ -1474,7 +1474,7 @@ BdsLibSaveMemoryTypeInformation (
|
||||
Identify a user and, if authenticated, returns the current user profile handle.
|
||||
|
||||
@param[out] User Point to user profile handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS User is successfully identified, or user identification
|
||||
is not supported.
|
||||
@retval EFI_ACCESS_DENIED User is not successfully identified
|
||||
@@ -1488,7 +1488,7 @@ BdsLibUserIdentify (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_USER_MANAGER_PROTOCOL *Manager;
|
||||
|
||||
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiUserManagerProtocolGuid,
|
||||
NULL,
|
||||
@@ -1510,15 +1510,15 @@ BdsLibUserIdentify (
|
||||
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,
|
||||
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, 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).
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, 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).
|
||||
@param Data The contents for the variable.
|
||||
|
||||
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
|
||||
@@ -1530,8 +1530,8 @@ BdsLibUserIdentify (
|
||||
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
|
||||
@retval EFI_WRITE_PROTECTED The variable in question is read-only.
|
||||
@retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.
|
||||
@retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
|
||||
or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo
|
||||
@retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
|
||||
or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo
|
||||
does NOT pass the validation check carried out by the firmware.
|
||||
|
||||
@retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
|
||||
|
@@ -1,20 +1,20 @@
|
||||
## @file
|
||||
# General BDS library.
|
||||
#
|
||||
#
|
||||
# General BDS defines and produce general interfaces for platform BDS driver including:
|
||||
# 1) BDS boot policy interface;
|
||||
# 2) BDS boot device connect interface;
|
||||
# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2007 - 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
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
@@ -24,7 +24,7 @@
|
||||
FILE_GUID = e405ec31-ccaa-4dd4-83e8-0aec01703f7e
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION
|
||||
LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION
|
||||
CONSTRUCTOR = GenericBdsLibConstructor
|
||||
|
||||
#
|
||||
@@ -43,7 +43,7 @@
|
||||
String.h
|
||||
String.c
|
||||
GenericBdsStrings.uni
|
||||
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
@@ -76,7 +76,7 @@
|
||||
## SOMETIMES_CONSUMES ## SystemTable # The identifier of memory type information type in system table
|
||||
## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"
|
||||
## SOMETIMES_PRODUCES ## Variable:L"MemoryTypeInformation"
|
||||
gEfiMemoryTypeInformationGuid
|
||||
gEfiMemoryTypeInformationGuid
|
||||
## SOMETIMES_CONSUMES ## Variable:L"BootXXXX" # Boot option variable
|
||||
## SOMETIMES_PRODUCES ## Variable:L"BootXXXX" # Boot option variable
|
||||
## SOMETIMES_CONSUMES ## Variable:L"DriverXXXX" # Driver load option.
|
||||
@@ -138,7 +138,7 @@
|
||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile ## CONSUMES
|
||||
|
||||
#
|
||||
# [BootMode]
|
||||
# [BootMode]
|
||||
# RECOVERY_FULL ## SOMETIMES_CONSUMES # Memory Type Information variable
|
||||
#
|
||||
|
||||
|
@@ -6,13 +6,13 @@
|
||||
// 2) BDS boot device connect interface;
|
||||
// 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 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
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,16 +1,16 @@
|
||||
///** @file
|
||||
//
|
||||
//
|
||||
// String definitions for Boot Option description.
|
||||
//
|
||||
// Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// Copyright (c) 2010 - 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
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
//
|
||||
//**/
|
||||
|
||||
/=#
|
||||
|
@@ -107,7 +107,7 @@ BdsLibGetImageHeader (
|
||||
);
|
||||
|
||||
/**
|
||||
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.
|
||||
**/
|
||||
VOID
|
||||
@@ -125,7 +125,7 @@ BdsSetMemoryTypeInformationVariable (
|
||||
@retval FALSE The variable data is corrupted.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
ValidateOption (
|
||||
UINT8 *Variable,
|
||||
UINTN VariableSize
|
||||
@@ -140,15 +140,15 @@ ValidateOption (
|
||||
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,
|
||||
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, 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).
|
||||
@param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
|
||||
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, 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).
|
||||
@param Data The contents for the variable.
|
||||
|
||||
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
|
||||
@@ -160,8 +160,8 @@ ValidateOption (
|
||||
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
|
||||
@retval EFI_WRITE_PROTECTED The variable in question is read-only.
|
||||
@retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.
|
||||
@retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
|
||||
or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo
|
||||
@retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
|
||||
or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo
|
||||
does NOT pass the validation check carried out by the firmware.
|
||||
|
||||
@retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
|
||||
|
Reference in New Issue
Block a user