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:
Liming Gao
2018-06-27 21:06:35 +08:00
parent e38f26a2f7
commit 0a6f48249a
246 changed files with 4071 additions and 4071 deletions

View File

@@ -1,15 +1,15 @@
/** @file
UEFI and Tiano Custom Decompress Library
UEFI and Tiano Custom Decompress Library
It will do Tiano or UEFI decompress with different verison parameter.
Copyright (c) 2006 - 2015, 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.
Copyright (c) 2006 - 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.
**/
@@ -17,9 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
@param Sd The global scratch data
@param NumOfBits The number of bits to shift and read.
@param NumOfBits The number of bits to shift and read.
**/
VOID
FillBuf (
@@ -62,7 +62,7 @@ FillBuf (
// Calculate additional bit count read to update mBitCount
//
Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits);
//
// Copy NumOfBits of bits from mSubBitBuf into mBitBuf
//
@@ -72,8 +72,8 @@ FillBuf (
/**
Get NumOfBits of bits out from mBitBuf
Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent
NumOfBits of bits from source. Returns NumOfBits of bits that are
Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent
NumOfBits of bits from source. Returns NumOfBits of bits that are
popped out.
@param Sd The global scratch data.
@@ -92,7 +92,7 @@ GetBits (
//
// Pop NumOfBits of Bits from Left
//
//
OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits));
//
@@ -106,7 +106,7 @@ GetBits (
/**
Creates Huffman Code mapping table according to code length array.
Creates Huffman Code mapping table for Extra Set, Char&Len Set
Creates Huffman Code mapping table for Extra Set, Char&Len Set
and Position Set according to code length array.
If TableBits > 16, then ASSERT ().
@@ -157,7 +157,7 @@ MakeTable (
for (Index = 0; Index < NumOfChar; Index++) {
Count[BitLen[Index]]++;
}
Start[0] = 0;
Start[1] = 0;
@@ -173,7 +173,7 @@ MakeTable (
}
JuBits = (UINT16) (16 - TableBits);
Weight[0] = 0;
for (Index = 1; Index <= TableBits; Index++) {
Start[Index] >>= JuBits;
@@ -182,7 +182,7 @@ MakeTable (
while (Index <= 16) {
Weight[Index] = (UINT16) (1U << (16 - Index));
Index++;
Index++;
}
Index = (UINT16) (Start[TableBits + 1] >> JuBits);
@@ -223,7 +223,7 @@ MakeTable (
Sd->mRight[Avail] = Sd->mLeft[Avail] = 0;
*Pointer = Avail++;
}
if (*Pointer < (2 * NC - 1)) {
if ((Index3 & Mask) != 0) {
Pointer = &Sd->mRight[*Pointer];
@@ -250,11 +250,11 @@ MakeTable (
/**
Decodes a position value.
Get a position value according to Position Huffman Table.
@param Sd the global scratch data
@return The position value decoded.
**/
UINT32
@@ -325,7 +325,7 @@ ReadPTLen (
ASSERT (nn <= NPT);
//
// Read Extra Set Code Length Array size
// Read Extra Set Code Length Array size
//
Number = (UINT16) GetBits (Sd, nbit);
@@ -352,7 +352,7 @@ ReadPTLen (
//
// If a code length is less than 7, then it is encoded as a 3-bit
// value. Or it is encoded as a series of "1"s followed by a
// value. Or it is encoded as a series of "1"s followed by a
// terminating "0". The number of "1"s = Code length - 4.
//
if (CharC == 7) {
@@ -362,15 +362,15 @@ ReadPTLen (
CharC += 1;
}
}
FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3));
Sd->mPTLen[Index++] = (UINT8) CharC;
//
// For Code&Len Set,
// For Code&Len Set,
// After the third length of the code length concatenation,
// a 2-bit value is used to indicated the number of consecutive
// a 2-bit value is used to indicated the number of consecutive
// zero lengths after the third length.
//
if (Index == Special) {
@@ -384,13 +384,13 @@ ReadPTLen (
while (Index < nn && Index < NPT) {
Sd->mPTLen[Index++] = 0;
}
return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
}
/**
Reads code lengths for Char&Len Set.
Read in and decode the Char&Len Set Code Length Array, then
generate the Huffman Code mapping table for the Char&Len Set.
@@ -477,7 +477,7 @@ ReadCLen (
/**
Decode a character/length value.
Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
Huffman code mapping table for Extra Set, Code&Len Set and
Position Set.
@@ -499,7 +499,7 @@ DecodeC (
//
// Starting a new block
// Read BlockSize from block header
//
//
Sd->mBlockSize = (UINT16) GetBits (Sd, 16);
//
@@ -556,7 +556,7 @@ DecodeC (
/**
Decode the source data and put the resulting data into the destination buffer.
@param Sd The global scratch data
**/
VOID
@@ -575,7 +575,7 @@ Decode (
for (;;) {
//
// Get one code from mBitBuf
//
//
CharC = DecodeC (Sd);
if (Sd->mBadTableFlag != 0) {
goto Done;
@@ -599,7 +599,7 @@ Decode (
// Process a Pointer
//
CharC = (UINT16) (CharC - (BIT8 - THRESHOLD));
//
// Get string length
//
@@ -630,18 +630,18 @@ Done:
}
/**
Given a compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
Given a compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
to decompress the compressed source buffer.
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
required to decompress the buffer specified by Source and SourceSize.
If the size of the uncompressed buffer or the size of the scratch buffer cannot
be determined from the compressed data specified by Source and SourceData,
be determined from the compressed data specified by Source and SourceData,
then RETURN_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
buffer is returned in DestinationSize, the size of the scratch buffer is returned
in ScratchSize, and RETURN_SUCCESS is returned.
This function does not have scratch buffer available to perform a thorough
This function does not have scratch buffer available to perform a thorough
checking of the validity of the source data. It just retrieves the "Original Size"
field from the beginning bytes of the source data and output it as DestinationSize.
And ScratchSize is specific to the decompression implementation.
@@ -656,16 +656,16 @@ Done:
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed..
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified
is required to decompress the compressed buffer specified
by Source and SourceSize.
@retval RETURN_SUCCESS The size of the uncompressed data was returned
in DestinationSize and the size of the scratch
@retval RETURN_SUCCESS The size of the uncompressed data was returned
in DestinationSize and the size of the scratch
buffer was returned in ScratchSize.
@retval RETURN_INVALID_PARAMETER
The size of the uncompressed data or the size of
the scratch buffer cannot be determined from
the compressed data specified by Source
@retval RETURN_INVALID_PARAMETER
The size of the uncompressed data or the size of
the scratch buffer cannot be determined from
the compressed data specified by Source
and SourceSize.
**/
RETURN_STATUS
@@ -704,10 +704,10 @@ UefiDecompressGetInfo (
Extracts decompressed data to its original form.
This function is designed so that the decompression algorithm can be implemented
without using any memory services. As a result, this function is not allowed to
call any memory allocation services in its implementation. It is the caller's
call any memory allocation services in its implementation. It is the caller's
responsibility to allocate and free the Destination and Scratch buffers.
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
specified by Source is not in a valid compressed data format,
then RETURN_INVALID_PARAMETER is returned.
@@ -718,14 +718,14 @@ UefiDecompressGetInfo (
@param Source The source buffer containing the compressed data.
@param Destination The destination buffer to store the decompressed data
@param Scratch A temporary scratch buffer that is used to perform the decompression.
This is an optional parameter that may be NULL if the
This is an optional parameter that may be NULL if the
required scratch buffer size is 0.
@param Version 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm.
@retval RETURN_SUCCESS Decompression completed successfully, and
@retval RETURN_SUCCESS Decompression completed successfully, and
the uncompressed buffer is returned in Destination.
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
(not in a valid compressed format).
**/
RETURN_STATUS
@@ -815,10 +815,10 @@ UefiTianoDecompress (
Extracts decompressed data to its original form.
This function is designed so that the decompression algorithm can be implemented
without using any memory services. As a result, this function is not allowed to
call any memory allocation services in its implementation. It is the caller's
call any memory allocation services in its implementation. It is the caller's
responsibility to allocate and free the Destination and Scratch buffers.
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
specified by Source is not in a valid compressed data format,
then RETURN_INVALID_PARAMETER is returned.
@@ -829,13 +829,13 @@ UefiTianoDecompress (
@param Source The source buffer containing the compressed data.
@param Destination The destination buffer to store the decompressed data
@param Scratch A temporary scratch buffer that is used to perform the decompression.
This is an optional parameter that may be NULL if the
This is an optional parameter that may be NULL if the
required scratch buffer size is 0.
@retval RETURN_SUCCESS Decompression completed successfully, and
@retval RETURN_SUCCESS Decompression completed successfully, and
the uncompressed buffer is returned in Destination.
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
(not in a valid compressed format).
**/
RETURN_STATUS
@@ -853,16 +853,16 @@ UefiDecompress (
Examines a GUIDed section and returns the size of the decoded buffer and the
size of an optional scratch buffer required to actually decode the data in a GUIDed section.
Examines a GUIDed section specified by InputSection.
Examines a GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports,
then RETURN_UNSUPPORTED is returned.
then RETURN_UNSUPPORTED is returned.
If the required information can not be retrieved from InputSection,
then RETURN_INVALID_PARAMETER is returned.
If the GUID of InputSection does match the GUID that this handler supports,
then the size required to hold the decoded buffer is returned in OututBufferSize,
the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
If InputSection is NULL, then ASSERT().
If OutputBufferSize is NULL, then ASSERT().
If ScratchBufferSize is NULL, then ASSERT().
@@ -905,7 +905,7 @@ TianoDecompressGetInfo (
return RETURN_INVALID_PARAMETER;
}
//
// Get guid attribute of guid section.
// Get guid attribute of guid section.
//
*SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes;
@@ -925,7 +925,7 @@ TianoDecompressGetInfo (
return RETURN_INVALID_PARAMETER;
}
//
// Get guid attribute of guid section.
// Get guid attribute of guid section.
//
*SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes;
@@ -943,16 +943,16 @@ TianoDecompressGetInfo (
/**
Decompress a Tiano compressed GUIDed section into a caller allocated output buffer.
Decodes the GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
Decodes the GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
If the GUID of InputSection does match the GUID that this handler supports, then InputSection
is decoded into the buffer specified by OutputBuffer and the authentication status of this
decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the
data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise,
the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
If InputSection is NULL, then ASSERT().
If OutputBuffer is NULL, then ASSERT().
If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
@@ -960,10 +960,10 @@ TianoDecompressGetInfo (
@param[in] InputSection A pointer to a GUIDed section of an FFS formatted file.
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
@param[in] ScratchBuffer A caller allocated buffer that may be required by this function
as a scratch buffer to perform the decode operation.
@param[out] AuthenticationStatus
as a scratch buffer to perform the decode operation.
@param[out] AuthenticationStatus
A pointer to the authentication status of the decoded output buffer.
See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must

View File

@@ -1,7 +1,7 @@
/** @file
Internal data structure and interfaces defintions for UEFI and Tiano Decompress Library.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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
@@ -115,7 +115,7 @@ GetBits (
/**
Creates Huffman Code mapping table according to code length array.
Creates Huffman Code mapping table for Extra Set, Char&Len Set
Creates Huffman Code mapping table for Extra Set, Char&Len Set
and Position Set according to code length array.
@param Sd The global scratch data
@@ -141,7 +141,7 @@ MakeTable (
Decodes a position value.
Get a position value according to Position Huffman Table.
@param Sd the global scratch data
@return The position value decoded.
@@ -177,7 +177,7 @@ ReadPTLen (
/**
Reads code lengths for Char&Len Set.
Read in and decode the Char&Len Set Code Length Array, then
generate the Huffman Code mapping table for the Char&Len Set.
@@ -191,7 +191,7 @@ ReadCLen (
/**
Decode a character/length value.
Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
Huffman code mapping table for Extra Set, Code&Len Set and
Position Set.

View File

@@ -1,7 +1,7 @@
/** @file
Capsule Library instance to process capsule images.
Copyright (c) 2007 - 2016, 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
@@ -82,7 +82,7 @@ ValidateFmpCapsule (
if (ItemNum == FmpCapsuleHeader->EmbeddedDriverCount) {
//
// No payload element
// No payload element
//
if (((UINT8 *)FmpCapsuleHeader + ItemOffsetList[ItemNum - 1]) < EndOfCapsule) {
return EFI_SUCCESS;
@@ -123,7 +123,7 @@ ValidateFmpCapsule (
}
/**
Process Firmware management protocol data capsule.
Process Firmware management protocol data capsule.
@param CapsuleHeader Points to a capsule header.
@@ -185,15 +185,15 @@ ProcessFmpCapsuleImage (
}
//
// 1. ConnectAll to ensure
// All the communication protocol required by driver in capsule installed
// 1. ConnectAll to ensure
// All the communication protocol required by driver in capsule installed
// All FMP protocols are installed
//
BdsLibConnectAll();
//
// 2. Try to load & start all the drivers within capsule
// 2. Try to load & start all the drivers within capsule
//
SetDevicePathNodeLength (&MemMapNode.Header, sizeof (MemMapNode));
MemMapNode.Header.Type = HARDWARE_DEVICE_PATH;
@@ -230,8 +230,8 @@ ProcessFmpCapsuleImage (
}
Status = gBS->StartImage(
ImageHandle,
&ExitDataSize,
ImageHandle,
&ExitDataSize,
NULL
);
if (EFI_ERROR(Status)) {
@@ -241,7 +241,7 @@ ProcessFmpCapsuleImage (
}
//
// Connnect all again to connect drivers within capsule
// Connnect all again to connect drivers within capsule
//
if (FmpCapsuleHeader->EmbeddedDriverCount > 0) {
BdsLibConnectAll();
@@ -318,7 +318,7 @@ ProcessFmpCapsuleImage (
TempFmpImageInfo = FmpImageInfoBuf;
for (Index2 = 0; Index2 < FmpImageInfoCount; Index2++) {
//
// Check all the payload entry in capsule payload list
// Check all the payload entry in capsule payload list
//
for (Index = FmpCapsuleHeader->EmbeddedDriverCount; Index < ItemNum; Index++) {
ImageHeader = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader + ItemOffsetList[Index]);

View File

@@ -3,13 +3,13 @@
//
// Capsule library instance for DXE_DRIVER and DXE_RUNTIME_DRIVER module types.
//
// 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.
//

View File

@@ -1,7 +1,7 @@
/** @file
Report Status Code Library for DXE Phase.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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
@@ -106,13 +106,13 @@ InternalReportStatusCode (
return EFI_UNSUPPORTED;
}
}
//
// A status code service is present in system, so pass in all the parameters to the service.
//
return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
}
return EFI_UNSUPPORTED;
}
@@ -508,7 +508,7 @@ ReportStatusCodeEx (
//
Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
gBS->RestoreTPL (Tpl);
StatusCodeData = NULL;
if (Tpl <= TPL_NOTIFY) {
//

View File

@@ -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;
}
}
}
//

View File

@@ -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().

View File

@@ -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.

View File

@@ -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.

View File

@@ -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
#

View File

@@ -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.
//

View File

@@ -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.
//
//
//**/
/=#

View File

@@ -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.

View File

@@ -1,7 +1,7 @@
/** @file
Legacy Boot Maintainence UI implementation.
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2018 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
@@ -84,13 +84,13 @@ HII_VENDOR_DEVICE_PATH mLegacyBootOptionHiiVendorDevicePath = {
(UINT8) (sizeof (VENDOR_DEVICE_PATH)),
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
},
{ 0x6bc75598, 0x89b4, 0x483d, { 0x91, 0x60, 0x7f, 0x46, 0x9a, 0x96, 0x35, 0x31 } }
},
{
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
{
{
(UINT8) (END_DEVICE_PATH_LENGTH),
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
}
@@ -151,9 +151,9 @@ OrderLegacyBootOption4SameType (
UINTN BootOrderSize;
UINTN Index;
UINTN StartPosition;
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
CHAR16 OptionName[sizeof ("Boot####")];
UINT16 *BbsIndexArray;
UINT16 *DeviceTypeArray;
@@ -176,11 +176,11 @@ OrderLegacyBootOption4SameType (
ASSERT (*DisBootOption != NULL);
for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) {
UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", BootOrder[Index]);
Status = EfiBootManagerVariableToLoadOption (OptionName, &BootOption);
ASSERT_EFI_ERROR (Status);
if ((DevicePathType (BootOption.FilePath) == BBS_DEVICE_PATH) &&
(DevicePathSubType (BootOption.FilePath) == BBS_BBS_DP)) {
//
@@ -209,7 +209,7 @@ OrderLegacyBootOption4SameType (
if (BbsIndexArray[Index] == (DevOrder[DevOrderCount] & 0xFF)) {
StartPosition = MIN (StartPosition, Index);
NewBootOption[DevOrderCount] = BootOrder[Index];
if ((DevOrder[DevOrderCount] & 0xFF00) == 0xFF00) {
(*DisBootOption)[*DisBootOptionCount] = BootOrder[Index];
(*DisBootOptionCount)++;
@@ -283,7 +283,7 @@ UpdateBBSOption (
UINT16 *DisBootOption;
UINTN DisBootOptionCount;
UINTN BufferSize;
DisMap = NULL;
NewOrder = NULL;
@@ -291,7 +291,7 @@ UpdateBBSOption (
EnBootOption = NULL;
DisBootOption = NULL;
DisMap = mLegacyBootOptionPrivate->MaintainMapData->DisableMap;
Status = EFI_SUCCESS;
@@ -470,7 +470,7 @@ UpdateBBSOption (
CurrentType++;
}
Status = gRT->SetVariable (
VAR_LEGACY_DEV_ORDER,
&gEfiLegacyDevOrderVariableGuid,
@@ -575,8 +575,8 @@ LegacyBootOptionRouteConfig (
}
Status = gBS->LocateProtocol (
&gEfiHiiConfigRoutingProtocolGuid,
NULL,
&gEfiHiiConfigRoutingProtocolGuid,
NULL,
(VOID **) &ConfigRouting
);
if (EFI_ERROR (Status)) {
@@ -594,7 +594,7 @@ LegacyBootOptionRouteConfig (
&BufferSize,
Progress
);
ASSERT_EFI_ERROR (Status);
ASSERT_EFI_ERROR (Status);
Status = UpdateBBSOption (CurrentNVMapData);
@@ -690,7 +690,7 @@ GetMenuEntry (
/**
Create string tokens for a menu from its help strings and display strings
@param HiiHandle Hii Handle of the package to be updated.
@param MenuOption The Menu whose string tokens need to be created
@@ -817,7 +817,7 @@ UpdateLegacyDeviceOrderPage (
DEBUG ((EFI_D_ERROR, "Invalid command ID for updating page!\n"));
return;
}
HiiSetString (mLegacyBootOptionPrivate->HiiHandle, STRING_TOKEN(STR_ORDER_CHANGE_PROMPT), FormTitle, NULL);
CreateLegacyMenuStringToken (mLegacyBootOptionPrivate->HiiHandle, OptionMenu);
@@ -859,12 +859,12 @@ UpdateLegacyDeviceOrderPage (
ASSERT (DefaultOpCodeHandle != NULL);
HiiCreateDefaultOpCode (
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_TYPE_NUM_SIZE_16,
DefaultOpCodeHandle,
EFI_HII_DEFAULT_CLASS_STANDARD,
EFI_IFR_TYPE_NUM_SIZE_16,
*Default++
);
//
// Create the string for oneof tag
//
@@ -886,7 +886,7 @@ UpdateLegacyDeviceOrderPage (
OptionsOpCodeHandle,
DefaultOpCodeHandle //NULL //
);
HiiFreeOpCodeHandle (DefaultOpCodeHandle);
}
@@ -894,8 +894,8 @@ UpdateLegacyDeviceOrderPage (
mLegacyBootOptionPrivate->HiiHandle,
&mLegacyBootOptionGuid,
LEGACY_ORDER_CHANGE_FORM_ID,
mLegacyStartOpCodeHandle,
mLegacyEndOpCodeHandle
mLegacyStartOpCodeHandle,
mLegacyEndOpCodeHandle
);
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
@@ -966,7 +966,7 @@ AdjustOptionValue (
CurrentVal = CurrentNVMap->LegacyBEV;
Default = mLegacyBootOptionPrivate->MaintainMapData->LastTimeNvData.LegacyBEV;
}
//
// First, find the different position
// if there is change, it should be only one
@@ -1245,27 +1245,27 @@ GetLegacyOptionsOrder (
LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyFD;
OptionMenu = &LegacyFDMenu;
break;
case BBS_HARDDISK:
LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyHD;
OptionMenu = &LegacyHDMenu;
break;
case BBS_CDROM:
LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyCD;
OptionMenu = &LegacyCDMenu;
break;
case BBS_EMBED_NETWORK:
LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyNET;
OptionMenu = &LegacyNETMenu;
break;
case BBS_BEV_DEVICE:
LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyBEV;
OptionMenu = &LegacyBEVMenu;
break;
case BBS_UNKNOWN:
default:
ASSERT (FALSE);
@@ -1337,7 +1337,7 @@ GetLegacyOptions (
BEVNum = 0;
EfiBootManagerConnectAll ();
//
// for better user experience
// 1. User changes HD configuration (e.g.: unplug HDD), here we have a chance to remove the HDD boot option
@@ -1431,7 +1431,7 @@ LegacyBootMaintUiLibConstructor (
//
LegacyBootOptionData = AllocateZeroPool (sizeof (LEGACY_BOOT_OPTION_CALLBACK_DATA));
ASSERT (LegacyBootOptionData != NULL);
LegacyBootOptionData->MaintainMapData = AllocateZeroPool (sizeof (LEGACY_BOOT_MAINTAIN_DATA));
ASSERT (LegacyBootOptionData->MaintainMapData != NULL);
@@ -1499,7 +1499,7 @@ LegacyBootMaintUiLibDestructor (
NULL
);
ASSERT_EFI_ERROR (Status);
HiiRemovePackages (mLegacyBootOptionPrivate->HiiHandle);
FreePool (mLegacyBootOptionPrivate->MaintainMapData);

View File

@@ -1,15 +1,15 @@
## @file
# Legacy Boot Maintainence UI module is library for BDS phase.
#
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2015 - 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]

View File

@@ -1,16 +1,16 @@
///** @file
//
//
// String definitions for Legacy Boot Maintainece Ui.
//
// Copyright (c) 2004 - 2015, 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
// 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.
//
//
//**/
/=#
@@ -46,4 +46,4 @@
#language fr-FR "Change Driver Boot Order."
#string STR_DISABLE_LEGACY_DEVICE #language en-US "Disabled"
#language fr-FR "Disabled"

View File

@@ -1,6 +1,6 @@
/** @file
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
@@ -63,4 +63,4 @@ LegacyBmRefreshAllBootOption (
VOID
);
#endif // _INTERNAL_LEGACY_BM_H_
#endif // _INTERNAL_LEGACY_BM_H_

View File

@@ -3,7 +3,7 @@
and manage the legacy boot option, all legacy boot option is getting from
the legacy BBS table.
Copyright (c) 2011 - 2017, 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
@@ -237,7 +237,7 @@ LegacyBmFuzzyMatch (
);
if ((StrCmp (Description, BootOption->Description) == 0) && !BbsIndexUsed[BbsData->BbsIndex]) {
//
// If devices with the same description string are connected,
// If devices with the same description string are connected,
// the BbsIndex of the first device is returned for the other device also.
// So, check if the BbsIndex is already being used, before assigning the BbsIndex.
//
@@ -264,7 +264,7 @@ LegacyBmFuzzyMatch (
);
if ((StrCmp (Description, BootOption->Description) == 0) && !BbsIndexUsed[Index]) {
//
// If devices with the same description string are connected,
// If devices with the same description string are connected,
// the BbsIndex of the first device is assigned for the other device also.
// So, check if the BbsIndex is already being used, before assigning the corrected BbsIndex.
//
@@ -309,7 +309,7 @@ LegacyBmUpdateBbsIndex (
((LegacyDevOrder != NULL) && (*LegacyDevOrderSize != 0))
);
for (Entry = LegacyDevOrder;
for (Entry = LegacyDevOrder;
Entry < (LEGACY_DEV_ORDER_ENTRY *) ((UINT8 *) LegacyDevOrder + *LegacyDevOrderSize);
Entry = (LEGACY_DEV_ORDER_ENTRY *) ((UINTN) Entry + sizeof (BBS_TYPE) + Entry->Length)
) {
@@ -321,8 +321,8 @@ LegacyBmUpdateBbsIndex (
// Delete the old entry
//
CopyMem (
&Entry->Data[Index],
&Entry->Data[Index + 1],
&Entry->Data[Index],
&Entry->Data[Index + 1],
(UINT8 *) LegacyDevOrder + *LegacyDevOrderSize - (UINT8 *) &Entry->Data[Index + 1]
);
Entry->Length -= sizeof (UINT16);
@@ -531,7 +531,7 @@ LegacyBmCreateLegacyBootOption (
if ((BootOption == NULL) || (BbsEntry == NULL)) {
return EFI_INVALID_PARAMETER;
}
LegacyBmBuildLegacyDevNameString (BbsEntry, BbsIndex, sizeof (Description), Description);
//
@@ -574,7 +574,7 @@ LegacyBmCreateLegacyBootOption (
);
FreePool (DevicePath);
FreePool (OptionalData);
return Status;
}
@@ -621,7 +621,7 @@ LegacyBmFillDevOrderBuf (
@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 EfiLegacyDevOrderGuid is
set correctly.
@retval EFI_OUT_OF_RESOURCES Memmory or storage is not enough.
@@ -712,11 +712,11 @@ LegacyBmCreateDevOrder (
DevOrderPtr->BbsType = BBS_HARDDISK;
DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16));
DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) LegacyBmFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data);
DevOrderPtr->BbsType = BBS_CDROM;
DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16));
DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) LegacyBmFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data);
DevOrderPtr->BbsType = BBS_EMBED_NETWORK;
DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16));
DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) LegacyBmFillDevOrderBuf (BbsTable, BBS_EMBED_NETWORK, BbsCount, DevOrderPtr->Data);
@@ -743,7 +743,7 @@ LegacyBmCreateDevOrder (
}
/**
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.
@@ -944,7 +944,7 @@ LegacyBmUpdateDevOrder (
NETIndex++;
}
NewNETPtr = NewPtr->Data;
//
// copy BEV
//
@@ -1164,7 +1164,7 @@ LegacyBmPrintBbsTable (
Set the boot priority for BBS entries based on boot option entry and boot order.
@param BootOption 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.
@@ -1224,7 +1224,7 @@ LegacyBmRefreshBbsTableForBoot (
//
// boot priority always starts at 0
//
Priority = 0;
Priority = 0;
if ((DevicePathType (BootOption->FilePath) == BBS_DEVICE_PATH) &&
(DevicePathSubType (BootOption->FilePath) == BBS_BBS_DP)) {
//
@@ -1255,7 +1255,7 @@ LegacyBmRefreshBbsTableForBoot (
(DevicePathSubType (Option[Index].FilePath) != BBS_BBS_DP)) {
continue;
}
DevType = LegacyBmDeviceType (Option[Index].FilePath);
for (DeviceTypeIndex = 0; DeviceTypeIndex < DeviceTypeCount; DeviceTypeIndex++) {
if (DeviceType[DeviceTypeIndex] == DevType) {
@@ -1284,7 +1284,7 @@ LegacyBmRefreshBbsTableForBoot (
DEBUG_CODE_BEGIN();
LegacyBmPrintBbsTable (LocalBbsTable, BbsCount);
DEBUG_CODE_END();
return Status;
}
@@ -1459,7 +1459,7 @@ LegacyBmRefreshAllBootOption (
PERF_START (NULL, "LegacyBootOptionEnum", "BDS", 0);
//
// Before enumerating the legacy boot option, we need to dispatch all the legacy option roms
// Before enumerating the legacy boot option, we need to dispatch all the legacy option roms
// to ensure the GetBbsInfo() counts all the legacy devices.
//
gBS->LocateHandleBuffer (
@@ -1481,7 +1481,7 @@ LegacyBmRefreshAllBootOption (
for (Index = 0; Index < HandleCount; Index++) {
//
// Start the thunk driver so that the legacy option rom gets dispatched.
// Note: We don't directly call InstallPciRom because some thunk drivers
// Note: We don't directly call InstallPciRom because some thunk drivers
// (e.g. BlockIo thunk driver) depend on the immediate result after dispatching
//
Status = LegacyBios->CheckPciRom (

View File

@@ -1,15 +1,15 @@
## @file
# Legacy Boot Manager module is library for BDS phase.
#
# 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
# 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]
@@ -31,7 +31,7 @@
[Sources]
LegacyBm.c
InternalLegacyBm.h
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec

View File

@@ -1,10 +1,10 @@
/** @file
LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom
LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom
decompression algorithm with the converter for the different arch code.
It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces
and registers them into GUIDed handler table.
Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2012 - 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
@@ -22,16 +22,16 @@
Examines a GUIDed section and returns the size of the decoded buffer and the
size of an scratch buffer required to actually decode the data in a GUIDed section.
Examines a GUIDed section specified by InputSection.
Examines a GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports,
then RETURN_UNSUPPORTED is returned.
then RETURN_UNSUPPORTED is returned.
If the required information can not be retrieved from InputSection,
then RETURN_INVALID_PARAMETER is returned.
If the GUID of InputSection does match the GUID that this handler supports,
then the size required to hold the decoded buffer is returned in OututBufferSize,
the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
If InputSection is NULL, then ASSERT().
If OutputBufferSize is NULL, then ASSERT().
If ScratchBufferSize is NULL, then ASSERT().
@@ -100,16 +100,16 @@ LzmaArchGuidedSectionGetInfo (
/**
Decompress a LZAM compressed GUIDed section into a caller allocated output buffer.
Decodes the GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
Decodes the GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
If the GUID of InputSection does match the GUID that this handler supports, then InputSection
is decoded into the buffer specified by OutputBuffer and the authentication status of this
decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the
data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise,
the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
If InputSection is NULL, then ASSERT().
If OutputBuffer is NULL, then ASSERT().
If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
@@ -117,10 +117,10 @@ LzmaArchGuidedSectionGetInfo (
@param[in] InputSection A pointer to a GUIDed section of an FFS formatted file.
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
@param[out] ScratchBuffer A caller allocated buffer that may be required by this function
as a scratch buffer to perform the decode operation.
@param[out] AuthenticationStatus
as a scratch buffer to perform the decode operation.
@param[out] AuthenticationStatus
A pointer to the authentication status of the decoded output buffer.
See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must
@@ -147,7 +147,7 @@ LzmaArchGuidedSectionExtraction (
UINT32 X86State;
UINT32 OutputBufferSize;
UINT32 ScratchBufferSize;
ASSERT (OutputBuffer != NULL);
ASSERT (InputSection != NULL);
@@ -178,7 +178,7 @@ LzmaArchGuidedSectionExtraction (
);
//
// After decompress, the data need to be converted to the raw data.
// After decompress, the data need to be converted to the raw data.
//
if (!EFI_ERROR (Status)) {
Status = LzmaUefiDecompressGetInfo (
@@ -187,13 +187,13 @@ LzmaArchGuidedSectionExtraction (
&OutputBufferSize,
&ScratchBufferSize
);
if (!EFI_ERROR (Status)) {
x86_Convert_Init(X86State);
x86_Convert(*OutputBuffer, OutputBufferSize, 0, &X86State, 0);
}
}
return Status;
}

View File

@@ -3,7 +3,7 @@
It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces
and registers them into GUIDed handler table.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 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
@@ -20,16 +20,16 @@
Examines a GUIDed section and returns the size of the decoded buffer and the
size of an scratch buffer required to actually decode the data in a GUIDed section.
Examines a GUIDed section specified by InputSection.
Examines a GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports,
then RETURN_UNSUPPORTED is returned.
then RETURN_UNSUPPORTED is returned.
If the required information can not be retrieved from InputSection,
then RETURN_INVALID_PARAMETER is returned.
If the GUID of InputSection does match the GUID that this handler supports,
then the size required to hold the decoded buffer is returned in OututBufferSize,
the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
If InputSection is NULL, then ASSERT().
If OutputBufferSize is NULL, then ASSERT().
If ScratchBufferSize is NULL, then ASSERT().
@@ -98,16 +98,16 @@ LzmaGuidedSectionGetInfo (
/**
Decompress a LZAM compressed GUIDed section into a caller allocated output buffer.
Decodes the GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
Decodes the GUIDed section specified by InputSection.
If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned.
If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
If the GUID of InputSection does match the GUID that this handler supports, then InputSection
is decoded into the buffer specified by OutputBuffer and the authentication status of this
decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the
data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise,
the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
If InputSection is NULL, then ASSERT().
If OutputBuffer is NULL, then ASSERT().
If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
@@ -115,10 +115,10 @@ LzmaGuidedSectionGetInfo (
@param[in] InputSection A pointer to a GUIDed section of an FFS formatted file.
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
@param[out] ScratchBuffer A caller allocated buffer that may be required by this function
as a scratch buffer to perform the decode operation.
@param[out] AuthenticationStatus
as a scratch buffer to perform the decode operation.
@param[out] AuthenticationStatus
A pointer to the authentication status of the decoded output buffer.
See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must
@@ -197,6 +197,6 @@ LzmaDecompressLibConstructor (
&gLzmaCustomDecompressGuid,
LzmaGuidedSectionGetInfo,
LzmaGuidedSectionExtraction
);
);
}

View File

@@ -1,4 +1,4 @@
LzmaCustomDecompressLib is based on the LZMA SDK 16.04.
LZMA SDK 16.04 was placed in the public domain on
2016-10-04. It was released on the
http://www.7-zip.org/sdk.html website.
http://www.7-zip.org/sdk.html website.

View File

@@ -1,7 +1,7 @@
/** @file
LZMA Decompress interfaces
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 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
@@ -105,15 +105,15 @@ GetDecodedSizeOfBuf(
//
/**
Given a Lzma compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
Given a Lzma compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
to decompress the compressed source buffer.
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
required to decompress the buffer specified by Source and SourceSize.
The size of the uncompressed buffer is returned in DestinationSize,
The size of the uncompressed buffer is returned in DestinationSize,
the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned.
This function does not have scratch buffer available to perform a thorough
This function does not have scratch buffer available to perform a thorough
checking of the validity of the source data. It just retrieves the "Original Size"
field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.
And ScratchSize is specific to the decompression implementation.
@@ -126,11 +126,11 @@ GetDecodedSizeOfBuf(
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified
is required to decompress the compressed buffer specified
by Source and SourceSize.
@retval RETURN_SUCCESS The size of the uncompressed data was returned
in DestinationSize and the size of the scratch
@retval RETURN_SUCCESS The size of the uncompressed data was returned
in DestinationSize and the size of the scratch
buffer was returned in ScratchSize.
**/
@@ -158,8 +158,8 @@ LzmaUefiDecompressGetInfo (
Decompresses a Lzma compressed source buffer.
Extracts decompressed data to its original form.
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
specified by Source is not in a valid compressed data format,
then RETURN_INVALID_PARAMETER is returned.
@@ -167,13 +167,13 @@ LzmaUefiDecompressGetInfo (
@param SourceSize The size of source buffer.
@param Destination The destination buffer to store the decompressed data
@param Scratch A temporary scratch buffer that is used to perform the decompression.
This is an optional parameter that may be NULL if the
This is an optional parameter that may be NULL if the
required scratch buffer size is 0.
@retval RETURN_SUCCESS Decompression completed successfully, and
@retval RETURN_SUCCESS Decompression completed successfully, and
the uncompressed buffer is returned in Destination.
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
(not in a valid compressed format).
**/
RETURN_STATUS
@@ -195,7 +195,7 @@ LzmaUefiDecompress (
AllocFuncs.Functions.Free = SzFree;
AllocFuncs.Buffer = Scratch;
AllocFuncs.BufferSize = SCRATCH_BUFFER_REQUEST_SIZE;
DecodedBufSize = (SizeT)GetDecodedSizeOfBuf((UINT8*)Source);
EncodedDataSize = (SizeT) (SourceSize - LZMA_HEADER_SIZE);

View File

@@ -1,7 +1,7 @@
/** @file
LZMA Decompress Library internal header file declares Lzma decompress interfaces.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 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
@@ -23,15 +23,15 @@
#include <Guid/LzmaDecompress.h>
/**
Given a Lzma compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
Given a Lzma compressed source buffer, this function retrieves the size of
the uncompressed buffer and the size of the scratch buffer required
to decompress the compressed source buffer.
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
Retrieves the size of the uncompressed buffer and the temporary scratch buffer
required to decompress the buffer specified by Source and SourceSize.
The size of the uncompressed buffer is returned in DestinationSize,
The size of the uncompressed buffer is returned in DestinationSize,
the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned.
This function does not have scratch buffer available to perform a thorough
This function does not have scratch buffer available to perform a thorough
checking of the validity of the source data. It just retrieves the "Original Size"
field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.
And ScratchSize is specific to the decompression implementation.
@@ -44,11 +44,11 @@
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified
is required to decompress the compressed buffer specified
by Source and SourceSize.
@retval RETURN_SUCCESS The size of the uncompressed data was returned
in DestinationSize and the size of the scratch
@retval RETURN_SUCCESS The size of the uncompressed data was returned
in DestinationSize and the size of the scratch
buffer was returned in ScratchSize.
**/
@@ -65,8 +65,8 @@ LzmaUefiDecompressGetInfo (
Decompresses a Lzma compressed source buffer.
Extracts decompressed data to its original form.
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
If the compressed source data specified by Source is successfully decompressed
into Destination, then RETURN_SUCCESS is returned. If the compressed source data
specified by Source is not in a valid compressed data format,
then RETURN_INVALID_PARAMETER is returned.
@@ -74,13 +74,13 @@ LzmaUefiDecompressGetInfo (
@param SourceSize The size of source buffer.
@param Destination The destination buffer to store the decompressed data
@param Scratch A temporary scratch buffer that is used to perform the decompression.
This is an optional parameter that may be NULL if the
This is an optional parameter that may be NULL if the
required scratch buffer size is 0.
@retval RETURN_SUCCESS Decompression completed successfully, and
@retval RETURN_SUCCESS Decompression completed successfully, and
the uncompressed buffer is returned in Destination.
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
@retval RETURN_INVALID_PARAMETER
The source buffer specified by Source is corrupted
(not in a valid compressed format).
**/
RETURN_STATUS

View File

@@ -4,7 +4,7 @@
Note that if the debug message length is larger than the maximum allowable
record length, then the debug message will be ignored directly.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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
@@ -30,8 +30,8 @@
/**
Prints a debug message to the debug output device if the specified error level is enabled.
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
GetDebugPrintErrorLevel (), then print the message specified by Format and the
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
GetDebugPrintErrorLevel (), then print the message specified by Format and the
associated variable argument list to the debug output device.
If Format is NULL, then ASSERT().
@@ -41,7 +41,7 @@
@param ErrorLevel The error level of the debug message.
@param Format Format string for the debug message to print.
@param ... Variable argument list whose contents are accessed
@param ... Variable argument list whose contents are accessed
based on the format string specified by Format.
**/
@@ -76,7 +76,7 @@ DebugPrint (
//
// Compute the total size of the record.
// Note that the passing-in format string and variable parameters will be constructed to
// Note that the passing-in format string and variable parameters will be constructed to
// the following layout:
//
// Buffer->|------------------------|
@@ -172,7 +172,7 @@ DebugPrint (
if (*Format == '\0') {
//
// Make no output if Format string terminates unexpectedly when
// looking up for flag, width, precision and type.
// looking up for flag, width, precision and type.
//
Format--;
}
@@ -182,7 +182,7 @@ DebugPrint (
//
break;
}
//
// Pack variable arguments into the storage area following EFI_DEBUG_INFO.
//
@@ -205,7 +205,7 @@ DebugPrint (
//
// If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then ASSERT()
// This indicates that the DEBUG() macro is passing in more argument than can be handled by
// This indicates that the DEBUG() macro is passing in more argument than can be handled by
// the EFI_DEBUG_INFO record
//
ASSERT ((CHAR8 *)BaseListMarker <= FormatString);
@@ -235,14 +235,14 @@ DebugPrint (
}
/**
Prints an assert message containing a filename, line number, and description.
Prints an assert message containing a filename, line number, and description.
This may be followed by a breakpoint or a dead loop.
Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
CpuDeadLoop() is called. If neither of these bits are set, then this function
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
CpuDeadLoop() is called. If neither of these bits are set, then this function
returns immediately after the message is printed to the debug output device.
DebugAssert() must actively prevent recursion. If DebugAssert() is called while
processing another DebugAssert(), then DebugAssert() must return immediately.
@@ -366,14 +366,14 @@ DebugAssert (
/**
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
This function fills Length bytes of Buffer with the value specified by
This function fills Length bytes of Buffer with the value specified by
PcdDebugClearMemoryValue, and returns Buffer.
If Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
@param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
@param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
@return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue.
@@ -394,7 +394,7 @@ DebugClearMemory (
/**
Returns TRUE if ASSERT() macros are enabled.
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
PcdDebugProperyMask is set. Otherwise FALSE is returned.
@retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
@@ -411,10 +411,10 @@ DebugAssertEnabled (
}
/**
/**
Returns TRUE if DEBUG() macros are enabled.
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
PcdDebugProperyMask is set. Otherwise FALSE is returned.
@retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
@@ -431,10 +431,10 @@ DebugPrintEnabled (
}
/**
/**
Returns TRUE if DEBUG_CODE() macros are enabled.
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
PcdDebugProperyMask is set. Otherwise FALSE is returned.
@retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
@@ -451,10 +451,10 @@ DebugCodeEnabled (
}
/**
/**
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
PcdDebugProperyMask is set. Otherwise FALSE is returned.
@retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.

View File

@@ -2,7 +2,7 @@
# Debug Library based on report status code library
#
# Debug Library for PEIMs and DXE drivers that sends debug messages to ReportStatusCode
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 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
@@ -36,7 +36,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
PcdLib
ReportStatusCodeLib

View File

@@ -3,9 +3,9 @@
This library instance is no longer used and module using this library
class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined
in PI 1.2 specification.
in PI 1.2 specification.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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
@@ -24,7 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Calling this function causes the system do recovery.
@retval EFI_SUCESS Sucess to do recovery.
@retval Others Fail to do recovery.
**/
@@ -36,7 +36,7 @@ PeiRecoverFirmware (
{
EFI_STATUS Status;
EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery;
Status = PeiServicesLocatePpi (
&gEfiPeiRecoveryModulePpiGuid,
0,

View File

@@ -3,9 +3,9 @@
#
# This library instance is no longer used and module using this library
# class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined
# in PI 1.2 specification.
# in PI 1.2 specification.
#
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 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
@@ -46,5 +46,5 @@
[Ppis]
gEfiPeiRecoveryModulePpiGuid ## CONSUMES

View File

@@ -1,11 +1,11 @@
/** @file
This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode.
This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode.
This library instance is no longer used and module using this library
class should update to directly locate EFI_PEI_S3_RESUME_PPI defined
in PI 1.2 specification.
in PI 1.2 specification.
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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
@@ -25,7 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
This function is responsible for calling the S3 resume vector in the ACPI Tables.
@retval EFI_SUCESS Success to restore config from S3.
@retval Others Fail to restore config from S3.
**/
@@ -37,7 +37,7 @@ AcpiS3ResumeOs (
{
EFI_STATUS Status;
EFI_PEI_S3_RESUME_PPI *S3Resume;
Status = PeiServicesLocatePpi (
&gEfiPeiS3ResumePpiGuid,
0,
@@ -46,6 +46,6 @@ AcpiS3ResumeOs (
);
ASSERT_EFI_ERROR (Status);
return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer());
return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer());
}

View File

@@ -3,9 +3,9 @@
#
# This library instance is no longer used and module using this library
# class should update to directly locate EFI_PEI_S3_RESUME_PPI defined
# in PI 1.2 specification.
# in PI 1.2 specification.
#
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 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

View File

@@ -3,13 +3,13 @@
//
// NULL implementation for PlatformBdsLib library class interfaces.
//
// 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.
//

View File

@@ -1,15 +1,15 @@
## @file
# NULL implementation for PlatformBdsLib library class interfaces.
#
# 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.
#
#
##
[Defines]
@@ -19,7 +19,7 @@
FILE_GUID = 143B5044-7C1B-4904-9778-EA16F1F3D554
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
#
# The following information is for reference only and not required by the build tools.
@@ -36,7 +36,7 @@
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
BaseLib
MemoryAllocationLib
@@ -44,4 +44,4 @@
BaseMemoryLib
DebugLib
PcdLib
GenericBdsLib
GenericBdsLib

View File

@@ -5,7 +5,7 @@
# In SMM, it logs message via SMM Status Code Protocol.
# Otherwise, it logs message to ReportStatusCode() in framework runtime services table or runtime report status code protocol.
#
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 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
@@ -25,7 +25,7 @@
MODULE_TYPE = DXE_RUNTIME_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = ReportStatusCodeLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
CONSTRUCTOR = ReportStatusCodeLibConstruct
DESTRUCTOR = ReportStatusCodeLibDestruct
#

View File

@@ -1,7 +1,7 @@
/** @file
Library constructor & destructor, event handlers, and other internal worker functions.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 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
@@ -26,7 +26,7 @@ EFI_SMM_STATUS_CODE_PROTOCOL *mSmmStatusCodeProtocol;
/**
Locates and caches SMM Status Code Protocol.
**/
VOID
SmmStatusCodeInitialize (
@@ -43,20 +43,20 @@ SmmStatusCodeInitialize (
/**
Report status code via SMM Status Code Protocol.
@param Type Indicates the type of status code being reported.
@param Value Describes the current status of a hardware or software entity.
This included information about the class and subclass that is used to classify the entity
as well as an operation. For progress codes, the operation is the current activity.
For error codes, it is the exception. For debug codes, it is not defined at this time.
@param Instance The enumeration of a hardware or software entity within the system.
A system may contain multiple entities that match a class/subclass pairing.
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
@param Value Describes the current status of a hardware or software entity.
This included information about the class and subclass that is used to classify the entity
as well as an operation. For progress codes, the operation is the current activity.
For error codes, it is the exception. For debug codes, it is not defined at this time.
@param Instance The enumeration of a hardware or software entity within the system.
A system may contain multiple entities that match a class/subclass pairing.
The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
not meaningful, or not relevant. Valid instance numbers start with 1.
@param CallerId This optional parameter may be used to identify the caller.
This parameter allows the status code driver to apply different rules to different callers.
@param CallerId This optional parameter may be used to identify the caller.
This parameter allows the status code driver to apply different rules to different callers.
@param Data This optional parameter may be used to pass additional data
@retval EFI_SUCCESS Always return EFI_SUCCESS.
**/
@@ -99,9 +99,9 @@ InternalGetReportStatusCode (
} else if (mInternalRT != NULL && mInternalRT->Hdr.Revision < 0x20000) {
return ((FRAMEWORK_EFI_RUNTIME_SERVICES*)mInternalRT)->ReportStatusCode;
} else if (!mHaveExitedBootServices) {
//
// Check gBS just in case. ReportStatusCode is called before gBS is initialized.
//
//
// Check gBS just in case. ReportStatusCode is called before gBS is initialized.
//
if (gBS != NULL) {
Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**)&StatusCodeProtocol);
if (!EFI_ERROR (Status) && StatusCodeProtocol != NULL) {
@@ -156,13 +156,13 @@ InternalReportStatusCode (
return EFI_UNSUPPORTED;
}
}
//
// A status code service is present in system, so pass in all the parameters to the service.
//
return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
}
return EFI_UNSUPPORTED;
}
@@ -220,7 +220,7 @@ ReportStatusCodeLibExitBootServices (
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
@@ -242,8 +242,8 @@ ReportStatusCodeLibConstruct (
if (mInSmm) {
Status = mSmmBase->SmmAllocatePool (
mSmmBase,
EfiRuntimeServicesData,
sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE,
EfiRuntimeServicesData,
sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE,
(VOID **) &mStatusCodeData
);
ASSERT_EFI_ERROR (Status);
@@ -257,7 +257,7 @@ ReportStatusCodeLibConstruct (
// If not in SMM mode, then allocate runtime memory for extended status code data.
//
// Library should not use the gRT directly, for it may be converted by other library instance.
//
//
mInternalRT = gRT;
mInSmm = FALSE;
@@ -265,12 +265,12 @@ ReportStatusCodeLibConstruct (
ASSERT (mStatusCodeData != NULL);
//
// Cache the report status code service
//
//
mReportStatusCode = InternalGetReportStatusCode ();
//
// Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
//
//
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
@@ -283,7 +283,7 @@ ReportStatusCodeLibConstruct (
//
// Register notify function for EVT_SIGNAL_EXIT_BOOT_SERVICES
//
//
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
@@ -299,13 +299,13 @@ ReportStatusCodeLibConstruct (
/**
The destructor function of SMM Runtime DXE Report Status Code Lib.
The destructor function frees memory allocated by constructor, and closes related events.
It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS.
It will ASSERT() if that related 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 always returns EFI_SUCCESS.
**/