Update edk2 headers to stable202005

We use these to compile libefivar. The particular motivation for this update is
the inclusion of the RISC-V machine definitions that allow us to build the
library on the platform. This support could easily have been submitted as a
small local diff, but the timing of the release coincided with this work, and
it has been over 3 years since these sources were initially imported.

Note that this comes with a license change from regular BSD 2-clause to the
BSD+Patent license. This has been approved by core@ for this particular
project [1].

As with the original import, we retain only the subset of headers that we
actually need to build libefivar. I adapted imp@'s process slightly for this
update:

    # Generate list of the headers needed to build
    cp -r ../vendor/edk2/dist/MdePkg/Include sys/contrib/edk2
    cd lib/libefivar
    make
    pushd `make -V .OBJDIR`
    cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 |
        sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx
    popd

    # Merge the needed files
    cd ../../sys/contrib/edk2
    svn revert -R .
    for i in `cat /tmp/xxx`; do
        svn merge -c VendorRevision svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i
    done
    svn merge -c VendorRevision svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec MdePkg.dec

[1] https://www.freebsd.org/internal/software-license.html
This commit is contained in:
Mitchell Horne 2020-06-04 19:21:41 +00:00
commit 3245fa215a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361802
37 changed files with 2134 additions and 2874 deletions

View File

@ -6,15 +6,9 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. 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.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -34,64 +28,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#pragma warning ( disable : 4200 )
#endif
/**
Verifies the storage size of a given data type.
This macro generates a divide by zero error or a zero size array declaration in
the preprocessor if the size is incorrect. These are declared as "extern" so
the space for these arrays will not be in the modules.
@param TYPE The date type to determine the size of.
@param Size The expected size for the TYPE.
**/
#define VERIFY_SIZE_OF(TYPE, Size) extern UINT8 _VerifySizeof##TYPE[(sizeof(TYPE) == (Size)) / (sizeof(TYPE) == (Size))]
//
// Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
// Section 2.3.1 of the UEFI 2.3 Specification.
//
VERIFY_SIZE_OF (BOOLEAN, 1);
VERIFY_SIZE_OF (INT8, 1);
VERIFY_SIZE_OF (UINT8, 1);
VERIFY_SIZE_OF (INT16, 2);
VERIFY_SIZE_OF (UINT16, 2);
VERIFY_SIZE_OF (INT32, 4);
VERIFY_SIZE_OF (UINT32, 4);
VERIFY_SIZE_OF (INT64, 8);
VERIFY_SIZE_OF (UINT64, 8);
VERIFY_SIZE_OF (CHAR8, 1);
VERIFY_SIZE_OF (CHAR16, 2);
//
// The following three enum types are used to verify that the compiler
// configuration for enum types is compliant with Section 2.3.1 of the
// UEFI 2.3 Specification. These enum types and enum values are not
// intended to be used. A prefix of '__' is used avoid conflicts with
// other types.
//
typedef enum {
__VerifyUint8EnumValue = 0xff
} __VERIFY_UINT8_ENUM_SIZE;
typedef enum {
__VerifyUint16EnumValue = 0xffff
} __VERIFY_UINT16_ENUM_SIZE;
typedef enum {
__VerifyUint32EnumValue = 0xffffffff
} __VERIFY_UINT32_ENUM_SIZE;
VERIFY_SIZE_OF (__VERIFY_UINT8_ENUM_SIZE, 4);
VERIFY_SIZE_OF (__VERIFY_UINT16_ENUM_SIZE, 4);
VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
//
// The Microsoft* C compiler can removed references to unreferenced data items
// if the /OPT:REF linker option is used. We defined a macro as this is a
// a non standard extension
//
#if defined(_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC)
#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)
///
/// Remove global variable from the linked image if there are no references to
/// it after all compiler and linker optimizations have been performed.
@ -112,11 +54,10 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
// warnings.
//
#ifndef UNREACHABLE
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)
#ifdef __GNUC__
///
/// Signal compilers and analyzers that this call is not reachable. It is
/// up to the compiler to remove any code past that point.
/// Not implemented by GCC 4.4 or earlier.
///
#define UNREACHABLE() __builtin_unreachable ()
#elif defined (__has_feature)
@ -218,6 +159,26 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
#endif
#endif
///
/// Tell the code optimizer that the function will return twice.
/// This prevents wrong optimizations which can cause bugs.
///
#ifndef RETURNS_TWICE
#if defined (__GNUC__) || defined (__clang__)
///
/// Tell the code optimizer that the function will return twice.
/// This prevents wrong optimizations which can cause bugs.
///
#define RETURNS_TWICE __attribute__((returns_twice))
#else
///
/// Tell the code optimizer that the function will return twice.
/// This prevents wrong optimizations which can cause bugs.
///
#define RETURNS_TWICE
#endif
#endif
//
// For symbol name in assembly code, an extra "_" is sometimes necessary
//
@ -234,7 +195,7 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);
///
#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
#if __APPLE__
#ifdef __APPLE__
//
// Apple extension that is used by the linker to optimize code size
// with assembly functions. Put at the end of your .S files
@ -376,6 +337,14 @@ struct _LIST_ENTRY {
#define MAX_INT64 ((INT64)0x7FFFFFFFFFFFFFFFULL)
#define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL)
///
/// Minimum values for the signed UEFI Data Types
///
#define MIN_INT8 (((INT8) -127) - 1)
#define MIN_INT16 (((INT16) -32767) - 1)
#define MIN_INT32 (((INT32) -2147483647) - 1)
#define MIN_INT64 (((INT64) -9223372036854775807LL) - 1)
#define BIT0 0x00000001
#define BIT1 0x00000002
#define BIT2 0x00000004
@ -552,21 +521,24 @@ struct _LIST_ENTRY {
#define BASE_8EB 0x8000000000000000ULL
//
// Support for variable length argument lists using the ANSI standard.
// Support for variable argument lists in freestanding edk2 modules.
//
// Since we are using the ANSI standard we used the standard naming and
// did not follow the coding convention
// For modules that use the ISO C library interfaces for variable
// argument lists, refer to "StdLib/Include/stdarg.h".
//
// VA_LIST - typedef for argument list.
// VA_START (VA_LIST Marker, argument before the ...) - Init Marker for use.
// VA_END (VA_LIST Marker) - Clear Marker
// VA_ARG (VA_LIST Marker, var arg size) - Use Marker to get an argument from
// the ... list. You must know the size and pass it in this macro.
// VA_ARG (VA_LIST Marker, var arg type) - Use Marker to get an argument from
// the ... list. You must know the type and pass it in this macro. Type
// must be compatible with the type of the actual next argument (as promoted
// according to the default argument promotions.)
// VA_COPY (VA_LIST Dest, VA_LIST Start) - Initialize Dest as a copy of Start.
//
// example:
// Example:
//
// UINTN
// EFIAPI
// ExampleVarArg (
// IN UINTN NumberOfArgs,
// ...
@ -582,15 +554,21 @@ struct _LIST_ENTRY {
// VA_START (Marker, NumberOfArgs);
// for (Index = 0, Result = 0; Index < NumberOfArgs; Index++) {
// //
// // The ... list is a series of UINTN values, so average them up.
// // The ... list is a series of UINTN values, so sum them up.
// //
// Result += VA_ARG (Marker, UINTN);
// }
//
// VA_END (Marker);
// return Result
// return Result;
// }
//
// Notes:
// - Functions that call VA_START() / VA_END() must have a variable
// argument list and must be declared EFIAPI.
// - Functions that call VA_COPY() / VA_END() must be declared EFIAPI.
// - Functions that only use VA_LIST and VA_ARG() need not be EFIAPI.
//
/**
Return the size of argument that has been aligned to sizeof (UINTN).
@ -631,7 +609,19 @@ struct _LIST_ENTRY {
#define VA_COPY(Dest, Start) __va_copy (Dest, Start)
#elif defined(__GNUC__)
#elif defined(_M_ARM) || defined(_M_ARM64)
//
// MSFT ARM variable argument list support.
//
typedef char* VA_LIST;
#define VA_START(Marker, Parameter) __va_start (&Marker, &Parameter, _INT_SIZE_OF (Parameter), __alignof(Parameter), &Parameter)
#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE)))
#define VA_END(Marker) (Marker = (VA_LIST) 0)
#define VA_COPY(Dest, Start) ((void)((Dest) = (Start)))
#elif defined(__GNUC__) || defined(__clang__)
#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS)
//
@ -736,7 +726,7 @@ typedef CHAR8 *VA_LIST;
This macro initializes Dest as a copy of Start, as if the VA_START macro had been applied to Dest
followed by the same sequence of uses of the VA_ARG macro as had previously been used to reach
the present state of Start.
the present state of Start.
@param Dest VA_LIST used to traverse the list of arguments.
@param Start VA_LIST used to traverse the list of arguments.
@ -791,16 +781,70 @@ typedef UINTN *BASE_LIST;
@return Offset, in bytes, of field.
**/
#ifdef __GNUC__
#if __GNUC__ >= 4
#if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__clang__)
#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field))
#endif
#endif
#ifndef OFFSET_OF
#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
#endif
/**
Portable definition for compile time assertions.
Equivalent to C11 static_assert macro from assert.h.
@param Expression Boolean expression.
@param Message Raised compiler diagnostic message when expression is false.
**/
#ifdef MDE_CPU_EBC
#define STATIC_ASSERT(Expression, Message)
#elif defined(_MSC_EXTENSIONS)
#define STATIC_ASSERT static_assert
#else
#define STATIC_ASSERT _Static_assert
#endif
//
// Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
// Section 2.3.1 of the UEFI 2.3 Specification.
//
STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (INT16) == 2, "sizeof (INT16) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (UINT16) == 2, "sizeof (UINT16) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (INT32) == 4, "sizeof (INT32) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (UINT32) == 4, "sizeof (UINT32) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (INT64) == 8, "sizeof (INT64) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (UINT64) == 8, "sizeof (UINT64) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
//
// The following three enum types are used to verify that the compiler
// configuration for enum types is compliant with Section 2.3.1 of the
// UEFI 2.3 Specification. These enum types and enum values are not
// intended to be used. A prefix of '__' is used avoid conflicts with
// other types.
//
typedef enum {
__VerifyUint8EnumValue = 0xff
} __VERIFY_UINT8_ENUM_SIZE;
typedef enum {
__VerifyUint16EnumValue = 0xffff
} __VERIFY_UINT16_ENUM_SIZE;
typedef enum {
__VerifyUint32EnumValue = 0xffffffff
} __VERIFY_UINT32_ENUM_SIZE;
STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
/**
Macro that returns a pointer to the data structure that contains a specified field of
that data structure. This is a lightweight method to hide information by placing a
@ -820,7 +864,7 @@ typedef UINTN *BASE_LIST;
@return A pointer to the structure from one of it's elements.
**/
#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - OFFSET_OF (TYPE, Field)))
/**
Rounds a value up to the next boundary using a specified alignment.
@ -1213,6 +1257,7 @@ typedef UINTN RETURN_STATUS;
(SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))
#if defined(_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC)
void * _ReturnAddress(void);
#pragma intrinsic(_ReturnAddress)
/**
Get the return address of the calling function.
@ -1227,7 +1272,7 @@ typedef UINTN RETURN_STATUS;
**/
#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
#elif defined(__GNUC__)
#elif defined (__GNUC__) || defined (__clang__)
void * __builtin_return_address (unsigned int level);
/**
Get the return address of the calling function.

View File

@ -1,14 +1,8 @@
/** @file
Guid used to identify HII FormMap configuration method.
Copyright (c) 2009, 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) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
GUID defined in UEFI 2.2 spec.

View File

@ -1,14 +1,8 @@
/** @file
Terminal Device Path Vendor Guid.
Copyright (c) 2006 - 2009, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
@ -42,7 +36,7 @@
{ \
0x37499a9d, 0x542f, 0x4c89, {0xa0, 0x26, 0x35, 0xda, 0x14, 0x20, 0x94, 0xe4 } \
}
#define EFI_SAS_DEVICE_PATH_GUID \
{ \
0xd487ddb4, 0x008b, 0x11d9, {0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \

View File

@ -2,13 +2,7 @@
GUID for UEFI WIN_CERTIFICATE structure.
Copyright (c) 2006 - 2012, 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.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
GUID defined in UEFI 2.0 spec.

View File

@ -1,14 +1,8 @@
/** @file
/** @file
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
Copyright (c) 2006 - 2011, 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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_1_0_H_
@ -43,7 +37,7 @@ typedef struct {
#pragma pack()
//
// Define for Desriptor
// Define for Descriptor
//
#define ACPI_SMALL_ITEM_FLAG 0x00
#define ACPI_LARGE_ITEM_FLAG 0x01
@ -115,7 +109,7 @@ typedef struct {
#pragma pack(1)
///
/// The commond definition of QWORD, DWORD, and WORD
/// The common definition of QWORD, DWORD, and WORD
/// Address Space Descriptors.
///
typedef PACKED struct {
@ -357,7 +351,7 @@ typedef struct {
#define EFI_ACPI_DMA_SPEED_TYPE_A 0x20
#define EFI_ACPI_DMA_SPEED_TYPE_B 0x40
#define EFI_ACPI_DMA_SPEED_TYPE_F 0x60
#define EFI_ACPI_DMA_BUS_MASTER_MASK 0x04
#define EFI_ACPI_DMA_BUS_MASTER 0x04
@ -403,7 +397,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//

View File

@ -1,14 +1,8 @@
/** @file
/** @file
ACPI 2.0 definitions from the ACPI Specification, revision 2.0
Copyright (c) 2006 - 2011, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_2_0_H_
@ -17,7 +11,7 @@
#include <IndustryStandard/Acpi10.h>
//
// Define for Desriptor
// Define for Descriptor
//
#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
@ -103,7 +97,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//
@ -114,7 +108,7 @@ typedef struct {
//
// Extended System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
//
@ -511,7 +505,7 @@ typedef struct {
#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
///
/// "SPCR" Serial Port Concole Redirection Table
/// "SPCR" Serial Port Console Redirection Table
///
#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')

View File

@ -1,14 +1,8 @@
/** @file
/** @file
ACPI 3.0 definitions from the ACPI Specification Revision 3.0b October 10, 2006
Copyright (c) 2006 - 2011, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_3_0_H_
@ -17,7 +11,7 @@
#include <IndustryStandard/Acpi20.h>
//
// Define for Desriptor
// Define for Descriptor
//
#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B
@ -128,7 +122,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//
@ -139,7 +133,7 @@ typedef struct {
//
// Extended System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
//
@ -597,7 +591,7 @@ typedef struct {
///
/// "RSD PTR " Root System Description Pointer
///
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
///
/// "APIC" Multiple APIC Description Table
@ -690,7 +684,7 @@ typedef struct {
#define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
///
/// "SPCR" Serial Port Concole Redirection Table
/// "SPCR" Serial Port Console Redirection Table
///
#define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')

View File

@ -1,14 +1,8 @@
/** @file
/** @file
ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
Copyright (c) 2010 - 2011, 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) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_4_0_H_
@ -86,7 +80,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//
@ -97,7 +91,7 @@ typedef struct {
//
// Extended System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
//
@ -1132,7 +1126,7 @@ typedef struct {
///
/// "RSD PTR " Root System Description Pointer
///
#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
///
/// "APIC" Multiple APIC Description Table
@ -1270,7 +1264,7 @@ typedef struct {
#define EFI_ACPI_4_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'H', 'I')
///
/// "SPCR" Serial Port Concole Redirection Table
/// "SPCR" Serial Port Console Redirection Table
///
#define EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')

View File

@ -1,15 +1,10 @@
/** @file
/** @file
ACPI 5.0 definitions from the ACPI Specification Revision 5.0a November 13, 2013.
Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2011 - 2014, 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) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_5_0_H_
@ -18,7 +13,7 @@
#include <IndustryStandard/Acpi40.h>
//
// Define for Desriptor
// Define for Descriptor
//
#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME 0x0A
#define ACPI_LARGE_GPIO_CONNECTION_DESCRIPTOR_NAME 0x0C
@ -208,7 +203,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//
@ -219,7 +214,7 @@ typedef struct {
//
// Extended System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
//
@ -1207,7 +1202,7 @@ typedef struct {
///
UINT64 ExitBootServicesEntry;
///
/// Timer value logged at the point just prior towhen the OS loader gaining
/// Timer value logged at the point just prior to when the OS loader gaining
/// control back from calls the ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
@ -1876,7 +1871,7 @@ typedef struct {
///
/// "RSD PTR " Root System Description Pointer
///
#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
///
/// "APIC" Multiple APIC Description Table
@ -2063,13 +2058,18 @@ typedef struct {
///
#define EFI_ACPI_5_0_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
///
/// "PCCT" Platform Communications Channel Table
///
#define EFI_ACPI_5_0_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE SIGNATURE_32('P', 'C', 'C', 'T')
///
/// "SLIC" MS Software Licensing Table Specification
///
#define EFI_ACPI_5_0_SOFTWARE_LICENSING_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'C')
///
/// "SPCR" Serial Port Concole Redirection Table
/// "SPCR" Serial Port Console Redirection Table
///
#define EFI_ACPI_5_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')

View File

@ -1,16 +1,11 @@
/** @file
/** @file
ACPI 5.1 definitions from the ACPI Specification Revision 5.1 Errata B January, 2016.
Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
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) 2020, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_5_1_H_
@ -89,7 +84,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//
@ -100,7 +95,7 @@ typedef struct {
//
// Extended System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
//
@ -1160,7 +1155,7 @@ typedef struct {
///
UINT64 ExitBootServicesEntry;
///
/// Timer value logged at the point just prior towhen the OS loader gaining
/// Timer value logged at the point just prior to when the OS loader gaining
/// control back from calls the ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
@ -1874,7 +1869,7 @@ typedef struct {
UINT8 CommandComplete:1;
UINT8 SciDoorbell:1;
UINT8 Error:1;
UINT8 PlatformNotification:1;
UINT8 PlatformNotification:1;
UINT8 Reserved:4;
UINT8 Reserved1;
} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
@ -1892,7 +1887,7 @@ typedef struct {
///
/// "RSD PTR " Root System Description Pointer
///
#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
///
/// "APIC" Multiple APIC Description Table
@ -2084,13 +2079,18 @@ typedef struct {
///
#define EFI_ACPI_5_1_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
///
/// "PCCT" Platform Communications Channel Table
///
#define EFI_ACPI_5_1_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE SIGNATURE_32('P', 'C', 'C', 'T')
///
/// "SLIC" MS Software Licensing Table Specification
///
#define EFI_ACPI_5_1_SOFTWARE_LICENSING_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'C')
///
/// "SPCR" Serial Port Concole Redirection Table
/// "SPCR" Serial Port Console Redirection Table
///
#define EFI_ACPI_5_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')

View File

@ -1,15 +1,10 @@
/** @file
/** @file
ACPI 6.0 definitions from the ACPI Specification Revision 6.0 Errata A January, 2016.
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
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) 2020, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _ACPI_6_0_H_
@ -88,7 +83,7 @@ typedef struct {
//
// Root System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
//
@ -99,7 +94,7 @@ typedef struct {
//
// Extended System Description Table
// No definition needed as it is a common description table header, the same with
// No definition needed as it is a common description table header, the same with
// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
//
@ -1175,7 +1170,7 @@ typedef struct {
///
UINT64 ExitBootServicesEntry;
///
/// Timer value logged at the point just prior towhen the OS loader gaining
/// Timer value logged at the point just prior to when the OS loader gaining
/// control back from calls the ExitBootServices function for UEFI compatible firmware.
/// For non-UEFI compatible boots, this field must be zero.
///
@ -2020,7 +2015,9 @@ typedef struct {
//
// PCCT Subspace type
//
#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00
#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00
#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01
#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02
///
/// PCC Subspace Structure Header
@ -2061,7 +2058,7 @@ typedef struct {
UINT8 CommandComplete:1;
UINT8 SciDoorbell:1;
UINT8 Error:1;
UINT8 PlatformNotification:1;
UINT8 PlatformNotification:1;
UINT8 Reserved:4;
UINT8 Reserved1;
} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
@ -2072,6 +2069,50 @@ typedef struct {
EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status;
} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER;
#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0
#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1
///
/// Type 1 HW-Reduced Communications Subspace Structure
///
typedef struct {
UINT8 Type;
UINT8 Length;
UINT32 DoorbellInterrupt;
UINT8 DoorbellInterruptFlags;
UINT8 Reserved;
UINT64 BaseAddress;
UINT64 AddressLength;
EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
UINT64 DoorbellPreserve;
UINT64 DoorbellWrite;
UINT32 NominalLatency;
UINT32 MaximumPeriodicAccessRate;
UINT16 MinimumRequestTurnaroundTime;
} EFI_ACPI_6_0_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS;
///
/// Type 2 HW-Reduced Communications Subspace Structure
///
typedef struct {
UINT8 Type;
UINT8 Length;
UINT32 DoorbellInterrupt;
UINT8 DoorbellInterruptFlags;
UINT8 Reserved;
UINT64 BaseAddress;
UINT64 AddressLength;
EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
UINT64 DoorbellPreserve;
UINT64 DoorbellWrite;
UINT32 NominalLatency;
UINT32 MaximumPeriodicAccessRate;
UINT16 MinimumRequestTurnaroundTime;
EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister;
UINT64 DoorbellAckPreserve;
UINT64 DoorbellAckWrite;
} EFI_ACPI_6_0_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS;
//
// Known table signatures
//
@ -2079,7 +2120,7 @@ typedef struct {
///
/// "RSD PTR " Root System Description Pointer
///
#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
///
/// "APIC" Multiple APIC Description Table
@ -2281,13 +2322,18 @@ typedef struct {
///
#define EFI_ACPI_6_0_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
///
/// "PCCT" Platform Communications Channel Table
///
#define EFI_ACPI_6_0_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE SIGNATURE_32('P', 'C', 'C', 'T')
///
/// "SLIC" MS Software Licensing Table Specification
///
#define EFI_ACPI_6_0_SOFTWARE_LICENSING_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'C')
///
/// "SPCR" Serial Port Concole Redirection Table
/// "SPCR" Serial Port Console Redirection Table
///
#define EFI_ACPI_6_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')

View File

@ -2,13 +2,8 @@
This file contains AML code definition in the latest ACPI spec.
Copyright (c) 2011, 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) 2019, ARM Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -36,6 +31,7 @@
#define AML_PACKAGE_OP 0x12
#define AML_VAR_PACKAGE_OP 0x13
#define AML_METHOD_OP 0x14
#define AML_EXTERNAL_OP 0x15
#define AML_DUAL_NAME_PREFIX 0x2e
#define AML_MULTI_NAME_PREFIX 0x2f
#define AML_NAME_CHAR_A 0x41
@ -172,4 +168,12 @@
#define AML_EXT_BANK_FIELD_OP 0x87
#define AML_EXT_DATA_REGION_OP 0x88
//
// FieldElement OpCode
//
#define AML_FIELD_RESERVED_OP 0x00
#define AML_FIELD_ACCESS_OP 0x01
#define AML_FIELD_CONNECTION_OP 0x02
#define AML_FIELD_EXT_ACCESS_OP 0x03
#endif

View File

@ -2,14 +2,8 @@
This file contains the Bluetooth definitions that are consumed by drivers.
These definitions are from Bluetooth Core Specification Version 4.0 June, 2010
Copyright (c) 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) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -38,6 +32,21 @@ typedef struct {
UINT16 MajorServiceClass:11;
} BLUETOOTH_CLASS_OF_DEVICE;
///
/// BLUETOOTH_LE_ADDRESS
///
typedef struct {
///
/// 48-bit Bluetooth device address
///
UINT8 Address[6];
///
/// 0x00 - Public Device Address
/// 0x01 - Random Device Address
///
UINT8 Type;
} BLUETOOTH_LE_ADDRESS;
#pragma pack()
#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,12 @@
/** @file
Provides copy memory, fill memory, zero memory, and GUID functions.
The Base Memory Library provides optimized implementations for common memory-based operations.
These functions should be used in place of coding your own loops to do equivalent common functions.
This allows optimized library implementations to help increase performance.
Copyright (c) 2006 - 2016, 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 that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
The Base Memory Library provides optimized implementations for common memory-based operations.
These functions should be used in place of coding your own loops to do equivalent common functions.
This allows optimized library implementations to help increase performance.
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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -25,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
DestinationBuffer. The implementation must be reentrant, and it must handle the case
where SourceBuffer overlaps DestinationBuffer.
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@ -48,7 +42,7 @@ CopyMem (
Fills a target buffer with a byte value, and returns the target buffer.
This function fills Length bytes of Buffer with Value, and returns Buffer.
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer The memory to set.
@ -178,7 +172,7 @@ SetMemN (
Fills a target buffer with zeros, and returns the target buffer.
This function fills Length bytes of Buffer with zeros, and returns Buffer.
If Length > 0 and Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@ -202,7 +196,7 @@ ZeroMem (
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
value returned is the first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
If Length > 0 and SourceBuffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
@ -215,7 +209,7 @@ ZeroMem (
@return 0 All Length bytes of the two buffers are identical.
@retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first
mismatched byte in DestinationBuffer.
**/
INTN
EFIAPI
@ -233,7 +227,7 @@ CompareMem (
address to the highest address for an 8-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@ -260,7 +254,7 @@ ScanMem8 (
address to the highest address for a 16-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
@ -289,7 +283,7 @@ ScanMem16 (
address to the highest address for a 32-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
@ -318,7 +312,7 @@ ScanMem32 (
address to the highest address for a 64-bit value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
@ -340,14 +334,14 @@ ScanMem64 (
);
/**
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
UINTN sized value in the target buffer.
This function searches target the buffer specified by Buffer and Length from the lowest
address to the highest address for a UINTN sized value that matches Value. If a match is found,
then a pointer to the matching byte in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a UINTN boundary, then ASSERT().
If Length is not aligned on a UINTN boundary, then ASSERT().
@ -367,13 +361,13 @@ ScanMemN (
IN UINTN Length,
IN UINTN Value
);
/**
Copies a source GUID to a destination GUID.
This function copies the contents of the 128-bit GUID specified by SourceGuid to
DestinationGuid, and returns DestinationGuid.
If DestinationGuid is NULL, then ASSERT().
If SourceGuid is NULL, then ASSERT().
@ -395,7 +389,7 @@ CopyGuid (
This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.
If there are any bit differences in the two GUIDs, then FALSE is returned.
If Guid1 is NULL, then ASSERT().
If Guid2 is NULL, then ASSERT().
@ -422,7 +416,7 @@ CompareGuid (
GUID value that matches Guid. If a match is found, then a pointer to the matching
GUID in the target buffer is returned. If no match is found, then NULL is returned.
If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 128-bit boundary, then ASSERT().

View File

@ -1,6 +1,6 @@
/** @file
Provides services to print debug and assert messages to a debug output device.
The Debug library supports debug print and asserts based on a combination of macros and code.
The debug library can be turned on and off so that the debug code does not increase the size of an image.
@ -8,14 +8,8 @@
of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is
defined, then debug and assert related macros wrapped by it are the NULL implementations.
Copyright (c) 2006 - 2016, 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 that 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 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -80,15 +74,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
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().
@param ErrorLevel The error level of the debug message.
@param Format The format string for the debug message to print.
@param ... The variable argument list whose contents are accessed
@param ... The variable argument list whose contents are accessed
based on the format string specified by Format.
**/
@ -102,14 +96,64 @@ DebugPrint (
/**
Prints an assert message containing a filename, line number, and description.
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 associated variable argument list to the debug output device.
If Format is NULL, then ASSERT().
@param ErrorLevel The error level of the debug message.
@param Format Format string for the debug message to print.
@param VaListMarker VA_LIST marker for the variable argument list.
**/
VOID
EFIAPI
DebugVPrint (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker
);
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
This function use BASE_LIST which would provide a more compatible
service than VA_LIST.
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().
@param ErrorLevel The error level of the debug message.
@param Format Format string for the debug message to print.
@param BaseListMarker BASE_LIST marker for the variable argument list.
**/
VOID
EFIAPI
DebugBPrint (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN BASE_LIST BaseListMarker
);
/**
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.
@ -134,14 +178,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 The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
@param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
@param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
@return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.
@ -157,7 +201,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.
@ -171,10 +215,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.
@ -188,10 +232,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.
@ -205,10 +249,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.
@ -236,7 +280,7 @@ DebugPrintLevelEnabled (
IN CONST UINTN ErrorLevel
);
/**
/**
Internal worker macro that calls DebugAssert().
This macro calls DebugAssert(), passing in the filename, line number, and an
@ -245,18 +289,22 @@ DebugPrintLevelEnabled (
@param Expression Boolean expression that evaluated to FALSE
**/
#if defined(__clang__) && defined(__FILE_NAME__)
#define _ASSERT(Expression) DebugAssert (__FILE_NAME__, __LINE__, #Expression)
#else
#define _ASSERT(Expression) DebugAssert (__FILE__, __LINE__, #Expression)
#endif
/**
/**
Internal worker macro that calls DebugPrint().
This macro calls DebugPrint() passing in the debug error level, a format
This macro calls DebugPrint() passing in the debug error level, a format
string, and a variable argument list.
__VA_ARGS__ is not supported by EBC compiler, Microsoft Visual Studio .NET 2003
and Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830.
@param Expression Expression containing an error level, a format string,
@param Expression Expression containing an error level, a format string,
and a variable argument list based on the format string.
**/
@ -273,19 +321,19 @@ DebugPrintLevelEnabled (
#define _DEBUG(Expression) DebugPrint Expression
#endif
/**
/**
Macro that calls DebugAssert() if an expression evaluates to FALSE.
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED
bit of PcdDebugProperyMask is set, then this macro evaluates the Boolean
expression specified by Expression. If Expression evaluates to FALSE, then
DebugAssert() is called passing in the source filename, source line number,
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED
bit of PcdDebugProperyMask is set, then this macro evaluates the Boolean
expression specified by Expression. If Expression evaluates to FALSE, then
DebugAssert() is called passing in the source filename, source line number,
and Expression.
@param Expression Boolean expression.
**/
#if !defined(MDEPKG_NDEBUG)
#if !defined(MDEPKG_NDEBUG)
#define ASSERT(Expression) \
do { \
if (DebugAssertEnabled ()) { \
@ -299,19 +347,19 @@ DebugPrintLevelEnabled (
#define ASSERT(Expression)
#endif
/**
/**
Macro that calls DebugPrint().
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED
bit of PcdDebugProperyMask is set, then this macro passes Expression to
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED
bit of PcdDebugProperyMask is set, then this macro passes Expression to
DebugPrint().
@param Expression Expression containing an error level, a format string,
@param Expression Expression containing an error level, a format string,
and a variable argument list based on the format string.
**/
#if !defined(MDEPKG_NDEBUG)
#if !defined(MDEPKG_NDEBUG)
#define DEBUG(Expression) \
do { \
if (DebugPrintEnabled ()) { \
@ -322,13 +370,13 @@ DebugPrintLevelEnabled (
#define DEBUG(Expression)
#endif
/**
/**
Macro that calls DebugAssert() if an EFI_STATUS evaluates to an error code.
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED
bit of PcdDebugProperyMask is set, then this macro evaluates the EFI_STATUS
value specified by StatusParameter. If StatusParameter is an error code,
then DebugAssert() is called passing in the source filename, source line
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED
bit of PcdDebugProperyMask is set, then this macro evaluates the EFI_STATUS
value specified by StatusParameter. If StatusParameter is an error code,
then DebugAssert() is called passing in the source filename, source line
number, and StatusParameter.
@param StatusParameter EFI_STATUS value to evaluate.
@ -375,23 +423,23 @@ DebugPrintLevelEnabled (
#define ASSERT_RETURN_ERROR(StatusParameter)
#endif
/**
Macro that calls DebugAssert() if a protocol is already installed in the
/**
Macro that calls DebugAssert() if a protocol is already installed in the
handle database.
If MDEPKG_NDEBUG is defined or the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
If MDEPKG_NDEBUG is defined or the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
of PcdDebugProperyMask is clear, then return.
If Handle is NULL, then a check is made to see if the protocol specified by Guid
is present on any handle in the handle database. If Handle is not NULL, then
a check is made to see if the protocol specified by Guid is present on the
handle specified by Handle. If the check finds the protocol, then DebugAssert()
If Handle is NULL, then a check is made to see if the protocol specified by Guid
is present on any handle in the handle database. If Handle is not NULL, then
a check is made to see if the protocol specified by Guid is present on the
handle specified by Handle. If the check finds the protocol, then DebugAssert()
is called passing in the source filename, source line number, and Guid.
If Guid is NULL, then ASSERT().
@param Handle The handle to check for the protocol. This is an optional
parameter that may be NULL. If it is NULL, then the entire
@param Handle The handle to check for the protocol. This is an optional
parameter that may be NULL. If it is NULL, then the entire
handle database is searched.
@param Guid The pointer to a protocol GUID.
@ -421,32 +469,32 @@ DebugPrintLevelEnabled (
/**
Macro that marks the beginning of debug source code.
If the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set,
If the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set,
then this macro marks the beginning of source code that is included in a module.
Otherwise, the source lines between DEBUG_CODE_BEGIN() and DEBUG_CODE_END()
Otherwise, the source lines between DEBUG_CODE_BEGIN() and DEBUG_CODE_END()
are not included in a module.
**/
#define DEBUG_CODE_BEGIN() do { if (DebugCodeEnabled ()) { UINT8 __DebugCodeLocal
/**
/**
The macro that marks the end of debug source code.
If the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set,
then this macro marks the end of source code that is included in a module.
Otherwise, the source lines between DEBUG_CODE_BEGIN() and DEBUG_CODE_END()
If the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set,
then this macro marks the end of source code that is included in a module.
Otherwise, the source lines between DEBUG_CODE_BEGIN() and DEBUG_CODE_END()
are not included in a module.
**/
#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)
/**
/**
The macro that declares a section of debug source code.
If the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set,
then the source code specified by Expression is included in a module.
If the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set,
then the source code specified by Expression is included in a module.
Otherwise, the source specified by Expression is not included in a module.
**/
@ -456,10 +504,10 @@ DebugPrintLevelEnabled (
DEBUG_CODE_END ()
/**
/**
The macro that calls DebugClearMemory() to clear a buffer to a default value.
If the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set,
If the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set,
then this macro calls DebugClearMemory() passing in Address and Length.
@param Address The pointer to a buffer.
@ -475,42 +523,42 @@ DebugPrintLevelEnabled (
/**
Macro that calls DebugAssert() if the containing record does not have a
matching signature. If the signatures matches, then a pointer to the data
structure that contains a specified field of that data structure is returned.
This is a lightweight method hide information by placing a public data
structure inside a larger private data structure and using a pointer to the
Macro that calls DebugAssert() if the containing record does not have a
matching signature. If the signatures matches, then a pointer to the data
structure that contains a specified field of that data structure is returned.
This is a lightweight method hide information by placing a public data
structure inside a larger private data structure and using a pointer to the
public data structure to retrieve a pointer to the private data structure.
If MDEPKG_NDEBUG is defined or the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
If MDEPKG_NDEBUG is defined or the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
of PcdDebugProperyMask is clear, then this macro computes the offset, in bytes,
of the field specified by Field from the beginning of the data structure specified
by TYPE. This offset is subtracted from Record, and is used to return a pointer
of the field specified by Field from the beginning of the data structure specified
by TYPE. This offset is subtracted from Record, and is used to return a pointer
to a data structure of the type specified by TYPE.
If MDEPKG_NDEBUG is not defined and the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit
of PcdDebugProperyMask is set, then this macro computes the offset, in bytes,
of field specified by Field from the beginning of the data structure specified
of PcdDebugProperyMask is set, then this macro computes the offset, in bytes,
of field specified by Field from the beginning of the data structure specified
by TYPE. This offset is subtracted from Record, and is used to compute a pointer
to a data structure of the type specified by TYPE. The Signature field of the
data structure specified by TYPE is compared to TestSignature. If the signatures
match, then a pointer to the pointer to a data structure of the type specified by
TYPE is returned. If the signatures do not match, then DebugAssert() is called
with a description of "CR has a bad signature" and Record is returned.
to a data structure of the type specified by TYPE. The Signature field of the
data structure specified by TYPE is compared to TestSignature. If the signatures
match, then a pointer to the pointer to a data structure of the type specified by
TYPE is returned. If the signatures do not match, then DebugAssert() is called
with a description of "CR has a bad signature" and Record is returned.
If the data type specified by TYPE does not contain the field specified by Field,
If the data type specified by TYPE does not contain the field specified by Field,
then the module will not compile.
If TYPE does not contain a field called Signature, then the module will not
If TYPE does not contain a field called Signature, then the module will not
compile.
@param Record The pointer to the field specified by Field within a data
@param Record The pointer to the field specified by Field within a data
structure of type TYPE.
@param TYPE The name of the data structure type to return This
data structure must contain the field specified by Field.
@param TYPE The name of the data structure type to return This
data structure must contain the field specified by Field.
@param Field The name of the field in the data structure specified
@param Field The name of the field in the data structure specified
by TYPE to which Record points.
@param TestSignature The 32-bit signature value to match.
@ -525,5 +573,5 @@ DebugPrintLevelEnabled (
#define CR(Record, TYPE, Field, TestSignature) \
BASE_CR (Record, TYPE, Field)
#endif
#endif

View File

@ -1,17 +1,11 @@
/** @file
Provides library functions to construct and parse UEFI Device Paths.
This library provides defines, macros, and functions to help create and parse
This library provides defines, macros, and functions to help create and parse
EFI_DEVICE_PATH_PROTOCOL structures.
Copyright (c) 2006 - 2013, 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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -22,12 +16,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Determine whether a given device path is valid.
If DevicePath is NULL, then ASSERT().
@param DevicePath A pointer to a device path data structure.
@param MaxSize The maximum size of the device path data structure.
@retval TRUE DevicePath is valid.
@retval FALSE DevicePath is NULL.
@retval FALSE Maxsize is less than sizeof(EFI_DEVICE_PATH_PROTOCOL).
@retval FALSE The length of any node node in the DevicePath is less
than sizeof (EFI_DEVICE_PATH_PROTOCOL).
@retval FALSE If MaxSize is not zero, the size of the DevicePath
@ -81,9 +76,9 @@ DevicePathSubType (
/**
Returns the 16-bit Length field of a device path node.
Returns the 16-bit Length field of the device path node specified by Node.
Returns the 16-bit Length field of the device path node specified by Node.
Node is not required to be aligned on a 16-bit boundary, so it is recommended
that a function such as ReadUnaligned16() be used to extract the contents of
that a function such as ReadUnaligned16() be used to extract the contents of
the Length field.
If Node is NULL, then ASSERT().
@ -119,12 +114,12 @@ NextDevicePathNode (
/**
Determines if a device path node is an end node of a device path.
This includes nodes that are the end of a device path instance and nodes that
This includes nodes that are the end of a device path instance and nodes that
are the end of an entire device path.
Determines if the device path node specified by Node is an end node of a device path.
This includes nodes that are the end of a device path instance and nodes that are the
end of an entire device path. If Node represents an end node of a device path,
Determines if the device path node specified by Node is an end node of a device path.
This includes nodes that are the end of a device path instance and nodes that are the
end of an entire device path. If Node represents an end node of a device path,
then TRUE is returned. Otherwise, FALSE is returned.
If Node is NULL, then ASSERT().
@ -133,7 +128,7 @@ NextDevicePathNode (
@retval TRUE The device path node specified by Node is an end node of a device path.
@retval FALSE The device path node specified by Node is not an end node of a device path.
**/
BOOLEAN
EFIAPI
@ -186,8 +181,8 @@ IsDevicePathEndInstance (
/**
Sets the length, in bytes, of a device path node.
Sets the length of the device path node specified by Node to the value specified
by NodeLength. NodeLength is returned. Node is not required to be aligned on
Sets the length of the device path node specified by Node to the value specified
by NodeLength. NodeLength is returned. Node is not required to be aligned on
a 16-bit boundary, so it is recommended that a function such as WriteUnaligned16()
be used to set the contents of the Length field.
@ -211,15 +206,15 @@ SetDevicePathNodeLength (
/**
Fills in all the fields of a device path node that is the end of an entire device path.
Fills in all the fields of a device path node specified by Node so Node represents
the end of an entire device path. The Type field of Node is set to
END_DEVICE_PATH_TYPE, the SubType field of Node is set to
END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to
END_DEVICE_PATH_LENGTH. Node is not required to be aligned on a 16-bit boundary,
so it is recommended that a function such as WriteUnaligned16() be used to set
the contents of the Length field.
Fills in all the fields of a device path node specified by Node so Node represents
the end of an entire device path. The Type field of Node is set to
END_DEVICE_PATH_TYPE, the SubType field of Node is set to
END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to
END_DEVICE_PATH_LENGTH. Node is not required to be aligned on a 16-bit boundary,
so it is recommended that a function such as WriteUnaligned16() be used to set
the contents of the Length field.
If Node is NULL, then ASSERT().
If Node is NULL, then ASSERT().
@param Node A pointer to a device path node data structure.
@ -233,7 +228,7 @@ SetDevicePathEndNode (
/**
Returns the size of a device path in bytes.
This function returns the size, in bytes, of the device path data structure
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 or invalid, then 0 is returned.
@ -255,15 +250,15 @@ GetDevicePathSize (
This function allocates space for a new copy of the device path specified by DevicePath. If
DevicePath is NULL, then NULL is returned. If the memory is successfully allocated, then the
contents of DevicePath are copied to the newly allocated buffer, and a pointer to that buffer
is returned. Otherwise, NULL is returned.
The memory for the new device path is allocated from EFI boot services memory.
It is the responsibility of the caller to free the memory allocated.
is returned. Otherwise, NULL is returned.
The memory for the new device path is allocated from EFI boot services memory.
It is the responsibility of the caller to free the memory allocated.
@param DevicePath A pointer to a device path data structure.
@retval NULL DevicePath is NULL or invalid.
@retval Others A pointer to the duplicated device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
@ -276,18 +271,18 @@ DuplicateDevicePath (
This function creates a new device path by appending a copy of SecondDevicePath to a copy of
FirstDevicePath in a newly allocated buffer. Only the end-of-device-path device node from
SecondDevicePath is retained. The newly created device path is returned.
If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned.
If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned.
SecondDevicePath is retained. The newly created device path is returned.
If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned.
If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned.
If both FirstDevicePath and SecondDevicePath are NULL, then a copy of an end-of-device-path is
returned.
returned.
If there is not enough memory for the newly allocated buffer, then NULL is returned.
The memory for the new device path is allocated from EFI boot services memory. It is the
responsibility of the caller to free the memory allocated.
@param FirstDevicePath A pointer to a device path data structure.
@param SecondDevicePath A pointer to a device path data structure.
@retval NULL If there is not enough memory for the newly allocated buffer.
@retval NULL If FirstDevicePath or SecondDevicePath is invalid.
@retval Others A pointer to the new device path if success.
@ -312,7 +307,7 @@ AppendDevicePath (
node is returned.
If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path device node
is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
free the memory allocated.
@ -321,7 +316,7 @@ AppendDevicePath (
@retval NULL There is not enough memory for the new device path.
@retval Others A pointer to the new device path if success.
A copy of DevicePathNode followed by an end-of-device-path node
A copy of DevicePathNode followed by an end-of-device-path node
if both FirstDevicePath and SecondDevicePath are NULL.
A copy of an end-of-device-path node if both FirstDevicePath and SecondDevicePath are NULL.
@ -336,18 +331,18 @@ AppendDevicePathNode (
/**
Creates a new device path by appending the specified device path instance to the specified device
path.
This function creates a new device path by appending a copy of the device path instance specified
by DevicePathInstance to a copy of the device path secified by DevicePath in a allocated buffer.
The end-of-device-path device node is moved after the end of the appended device path instance
and a new end-of-device-path-instance node is inserted between.
and a new end-of-device-path-instance node is inserted between.
If DevicePath is NULL, then a copy if DevicePathInstance is returned.
If DevicePathInstance is NULL, then NULL is returned.
If DevicePath or DevicePathInstance is invalid, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
free the memory allocated.
@param DevicePath A pointer to a device path data structure.
@param DevicePathInstance A pointer to a device path instance.
@ -370,11 +365,11 @@ AppendDevicePathInstance (
to hold the size of the device path instance copy.
If DevicePath is NULL, then NULL is returned.
If DevicePath points to a invalid device path, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
free the memory allocated.
If Size is NULL, then ASSERT().
@param DevicePath On input, this holds the pointer to the current device path
instance. On output, this holds the pointer to the next device
path instance or NULL if there are no more device path
@ -399,8 +394,8 @@ GetNextDevicePathInstance (
This function creates a new device node in a newly allocated buffer of size NodeLength and
initializes the device path node header with NodeType and NodeSubType. The new device path node
is returned.
If NodeLength is smaller than a device path header, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
If NodeLength is smaller than a device path header, then NULL is returned.
If there is not enough memory to allocate space for the new device path, then NULL is returned.
The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
free the memory allocated.
@ -443,7 +438,7 @@ IsDevicePathMultiInstance (
This function returns the device path protocol from the handle specified by Handle. If Handle is
NULL or Handle does not contain a device path protocol, then NULL is returned.
@param Handle The handle from which to retrieve the device path protocol.
@return The device path protocol from the handle specified by Handle.
@ -465,7 +460,7 @@ DevicePathFromHandle (
path node for the file specified by FileName is allocated and returned.
The memory for the new device path is allocated from EFI boot services memory. It is the responsibility
of the caller to free the memory allocated.
If FileName is NULL, then ASSERT().
If FileName is not aligned on a 16-bit boundary, then ASSERT().

View File

@ -1,19 +1,13 @@
/** @file
Provides services to allocate and free memory buffers of various memory types and alignments.
The Memory Allocation Library abstracts various common memory allocation operations. This library
allows code to be written in a phase-independent manner because the allocation of memory in PEI, DXE,
and SMM (for example) is done via a different mechanism. Using a common library interface makes it
much easier to port algorithms from phase to phase.
Copyright (c) 2006 - 2013, 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.
The Memory Allocation Library abstracts various common memory allocation operations. This library
allows code to be written in a phase-independent manner because the allocation of memory in PEI, DXE,
and SMM (for example) is done via a different mechanism. Using a common library interface makes it
much easier to port algorithms from phase to phase.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -85,11 +79,11 @@ AllocateReservedPages (
must have been allocated on a previous call to the page allocation services of the Memory
Allocation Library. If it is not possible to free allocated pages, then this function will
perform no actions.
If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
then ASSERT().
If Pages is zero, then ASSERT().
@param Buffer Pointer to the buffer of pages to free.
@param Pages The number of 4 KB pages to free.
@ -108,7 +102,7 @@ FreePages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@ -133,7 +127,7 @@ AllocateAlignedPages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@ -158,7 +152,7 @@ AllocateAlignedRuntimePages (
alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
returned. If there is not enough memory at the specified alignment remaining to satisfy the
request, then NULL is returned.
If Alignment is not a power of two and Alignment is not zero, then ASSERT().
If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
@ -182,13 +176,13 @@ AllocateAlignedReservedPages (
Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
must have been allocated on a previous call to the aligned page allocation services of the Memory
Allocation Library. If it is not possible to free allocated pages, then this function will
Allocation Library. If it is not possible to free allocated pages, then this function will
perform no actions.
If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
Library, then ASSERT().
If Pages is zero, then ASSERT().
@param Buffer Pointer to the buffer of pages to free.
@param Pages The number of 4 KB pages to free.
@ -318,9 +312,9 @@ AllocateReservedZeroPool (
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer.
@ -342,9 +336,9 @@ AllocateCopyPool (
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer.
@ -366,9 +360,9 @@ AllocateRuntimeCopyPool (
AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the
allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there
is not enough memory remaining to satisfy the request, then NULL is returned.
If Buffer is NULL, then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param AllocationSize The number of bytes to allocate and zero.
@param Buffer The buffer to copy to the allocated buffer.
@ -387,18 +381,18 @@ AllocateReservedCopyPool (
Reallocates a buffer of type EfiBootServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -416,10 +410,10 @@ ReallocatePool (
Reallocates a buffer of type EfiRuntimeServicesData.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
@ -427,7 +421,7 @@ ReallocatePool (
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -445,10 +439,10 @@ ReallocateRuntimePool (
Reallocates a buffer of type EfiReservedMemoryType.
Allocates and zeros the number bytes specified by NewSize from memory of type
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and
NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
OldBuffer is freed. A pointer to the newly allocated buffer is returned.
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
@ -456,7 +450,7 @@ ReallocateRuntimePool (
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
@param OldBuffer The buffer to copy to the allocated buffer. This is an optional
parameter that may be NULL.
@return A pointer to the allocated buffer or NULL if allocation fails.
@ -477,7 +471,7 @@ ReallocateReservedPool (
Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the
pool allocation services of the Memory Allocation Library. If it is not possible to free pool
resources, then this function will perform no actions.
If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
then ASSERT().

View File

@ -8,20 +8,14 @@
LibPatchPcdSetPtr() interface. For FeatureFlag/Fixed PCD, the macro interface is
translated to a variable or macro that is auto-generated by build tool in
module's autogen.h/autogen.c.
The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are
only available prior to ExitBootServices(). If access to PCD values are required
The PcdGetXX(), PcdSetXX(), PcdToken(), and PcdGetNextTokenSpace() operations are
only available prior to ExitBootServices(). If access to PCD values are required
at runtime, then their values must be collected prior to ExitBootServices().
There are no restrictions on the use of FeaturePcd(), FixedPcdGetXX(),
PatchPcdGetXX(), and PatchPcdSetXX().
Copyright (c) 2006 - 2017, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -127,7 +121,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param TokenName The name of the PCD token to retrieve a current value for.
@return The Boolean value for the token.
@return The Boolean value for the token.
**/
#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
@ -142,7 +136,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param TokenName The name of the PCD token to retrieve a current value for.
@return A pointer to the buffer.
@return A pointer to the buffer.
**/
#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
@ -246,7 +240,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param TokenName The name of the binary patchable PCD token to set the current value for.
@param Value The 8-bit value to set.
@return Return the Value that was set.
**/
@ -320,17 +314,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Sets a pointer to a binary patchable PCD token buffer based on a token name.
Sets the buffer for the token specified by TokenName. Buffer is returned.
Sets the buffer for the token specified by TokenName. Buffer is returned.
If SizeOfBuffer is greater than the maximum size supported by TokenName, then set SizeOfBuffer
to the maximum size supported by TokenName and return NULL to indicate that the set operation
was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
to the maximum size supported by TokenName and return NULL to indicate that the set operation
was not actually performed. If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be
set to the maximum size supported by TokenName and NULL must be returned.
If TokenName is not a valid token in the token space, then the module will not build.
If TokenName is not a patchable in module PCD, then the module will not build.
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param TokenName The name of the binary patchable PCD token to set the current value for.
@param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param Buffer Pointer to the value to set.
@ -348,10 +342,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
)
/**
Retrieves an 8-bit PCD token value based on a token name.
Returns the 8-bit value for the token specified by TokenName.
If TokenName is not a valid token in the token space, then the module will not build.
@param TokenName The name of the PCD token to retrieve a current value for.
@return 8-bit value for the token specified by TokenName.
@ -460,10 +454,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Retrieves the size of the PCD token based on a token name.
Returns the size of the token specified by TokenName.
If TokenName is not a valid token in the token space, then the module will not build.
@param[in] TokenName The name of the PCD token to retrieve a current value size for.
@return Return the size
@ -474,11 +468,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Retrieve the size of a given PCD token.
Returns the size of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
Returns the size of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value size for.
@ -496,7 +490,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param TokenName The name of the PCD token to retrieve a current value for.
@param Value The 8-bit value to set.
@return Return the Value that was set.
**/
@ -551,17 +545,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Sets a pointer to a PCD token buffer based on a token name.
Sets the buffer for the token specified by TokenName. Buffer is returned.
If SizeOfBuffer is greater than the maximum size supported by TokenName,
then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
to indicate that the set operation was not actually performed. If SizeOfBuffer
is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
Sets the buffer for the token specified by TokenName. Buffer is returned.
If SizeOfBuffer is greater than the maximum size supported by TokenName,
then set SizeOfBuffer to the maximum size supported by TokenName and return NULL
to indicate that the set operation was not actually performed. If SizeOfBuffer
is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported
by TokenName and NULL must be returned.
If TokenName is not a valid token in the token space, then the module will not build.
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param TokenName The name of the PCD token to set the current value for.
@param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param Buffer A pointer to the buffer to set.
@ -571,11 +565,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \
_PCD_SET_MODE_PTR_##TokenName ((SizeOfBuffer), (Buffer))
/**
Sets a Boolean PCD token value based on a token name.
Sets the Boolean value for the token specified by TokenName. Value is returned.
Sets the Boolean value for the token specified by TokenName. Value is returned.
If TokenName is not a valid token in the token space, then the module will not build.
@param TokenName The name of the PCD token to set the current value for.
@ -689,9 +683,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Returns the token number for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space, then the module will not build.
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return Return the token number.
@ -702,14 +696,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Retrieves an 8-bit PCD token value based on a GUID and a token name.
Returns the 8-bit value for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return An 8-bit PCD token value.
@ -720,14 +714,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Retrieves a 16-bit PCD token value based on a GUID and a token name.
Returns the 16-bit value for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return A 16-bit PCD token value.
@ -739,14 +733,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Retrieves a 32-bit PCD token value based on a GUID and a token name.
Returns the 32-bit value for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return A 32-bit PCD token value.
@ -758,14 +752,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Retrieves a 64-bit PCD token value based on a GUID and a token name.
Returns the 64-bit value for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return A 64-bit PCD token value.
@ -777,14 +771,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
Returns a pointer to the buffer for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return A pointer to a PCD token buffer.
@ -796,14 +790,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Retrieves a Boolean PCD token value based on a GUID and a token name.
Returns the Boolean value for the token specified by Guid and TokenName.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to retrieve a current value for.
@param TokenName The name of the PCD token to retrieve a current value for.
@return A Boolean PCD token value.
@ -817,15 +811,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets an 8-bit PCD token value based on a GUID and a token name.
Sets the 8-bit value for the token specified by Guid and TokenName. Value is returned.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to set the current value for.
@param Value The 8-bit value to set.
@param Value The 8-bit value to set.
@return Return the Value that was set.
@ -837,15 +831,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets a 16-bit PCD token value based on a GUID and a token name.
Sets the 16-bit value for the token specified by Guid and TokenName. Value is returned.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to set the current value for.
@param Value The 16-bit value to set.
@param Value The 16-bit value to set.
@return Return the Value that was set.
@ -857,15 +851,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets a 32-bit PCD token value based on a GUID and a token name.
Sets the 32-bit value for the token specified by Guid and TokenName. Value is returned.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to set the current value for.
@param Value The 32-bit value to set.
@param Value The 32-bit value to set.
@return Return the Value that was set.
@ -877,15 +871,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Sets a 64-bit PCD token value based on a GUID and a token name.
Sets the 64-bit value for the token specified by Guid and TokenName. Value is returned.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to set the current value for.
@param Value The 64-bit value to set.
@param Value The 64-bit value to set.
@return Return the Value that was set.
@ -896,25 +890,25 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Sets a pointer to a PCD token buffer based on a GUID and a token name.
Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
Sets the buffer for the token specified by Guid and TokenName. Buffer is returned.
If SizeOfBuffer is greater than the maximum size supported by Guid and TokenName,
then set SizeOfBuffer to the maximum size supported by Guid and TokenName and return
NULL to indicate that the set operation was not actually performed. If SizeOfBuffer
is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by
Guid and TokenName and NULL must be returned.
If TokenName is not a valid token in the token space specified by Guid,
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to set the current value for.
@param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param Buffer Pointer to the buffer to set.
@return Return the pointer to the Buffer that was set.
**/
@ -925,20 +919,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Sets a Boolean PCD token value based on a GUID and a token name.
Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
If TokenName is not a valid token in the token space specified by Guid,
Sets the Boolean value for the token specified by Guid and TokenName. Value is returned.
If TokenName is not a valid token in the token space specified by Guid,
then the module will not build.
If Guid is NULL, then ASSERT().
@param Guid Pointer to a 128-bit unique value that designates
@param Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param TokenName The name of the PCD token to set the current value for.
@param TokenName The name of the PCD token to set the current value for.
@param Value The Boolean value to set.
@return Return the Value that was set.
**/
**/
#define PcdSetExBool(Guid, TokenName, Value) \
LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
#endif
@ -1088,12 +1082,12 @@ LibPcdSetSku (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 8-bit value for the token specified by TokenNumber.
Returns the 8-bit value for the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Returns the 8-bit value for the token specified by TokenNumber.
@return Returns the 8-bit value for the token specified by TokenNumber.
**/
UINT8
@ -1105,12 +1099,12 @@ LibPcdGet8 (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 16-bit value for the token specified by TokenNumber.
Returns the 16-bit value for the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Returns the 16-bit value for the token specified by TokenNumber.
@return Returns the 16-bit value for the token specified by TokenNumber.
**/
UINT16
@ -1122,8 +1116,8 @@ LibPcdGet16 (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 32-bit value for the token specified by TokenNumber.
Returns the 32-bit value for the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1139,7 +1133,7 @@ LibPcdGet32 (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 64-bit value for the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1156,7 +1150,7 @@ LibPcdGet64 (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the pointer to the buffer of the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1173,15 +1167,15 @@ LibPcdGetPtr (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the Boolean value of the token specified by TokenNumber.
Returns the Boolean value of the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Returns the Boolean value of the token specified by TokenNumber.
@return Returns the Boolean value of the token specified by TokenNumber.
**/
BOOLEAN
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
@ -1193,7 +1187,7 @@ LibPcdGetBool (
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@return Returns the size of the token specified by TokenNumber.
@return Returns the size of the token specified by TokenNumber.
**/
UINTN
@ -1205,12 +1199,12 @@ LibPcdGetSize (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 8-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
Returns the 8-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1229,10 +1223,10 @@ LibPcdGetEx8 (
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 16-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1249,9 +1243,9 @@ LibPcdGetEx16 (
/**
Returns the 32-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1268,12 +1262,12 @@ LibPcdGetEx32 (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the 64-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
Returns the 64-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1290,12 +1284,12 @@ LibPcdGetEx64 (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the pointer to the buffer of token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
Returns the pointer to the buffer of token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1312,12 +1306,12 @@ LibPcdGetExPtr (
/**
This function provides a means by which to retrieve a value for a given PCD token.
Returns the Boolean value of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
Returns the Boolean value of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1334,12 +1328,12 @@ LibPcdGetExBool (
/**
This function provides a means by which to retrieve the size of a given PCD token.
Returns the size of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
Returns the size of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@ -1357,8 +1351,8 @@ LibPcdGetExSize (
#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 8-bit value for the token specified by TokenNumber
Sets the 8-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@ -1377,8 +1371,8 @@ LibPcdSet8 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 16-bit value for the token specified by TokenNumber
Sets the 16-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@ -1397,8 +1391,8 @@ LibPcdSet16 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 32-bit value for the token specified by TokenNumber
Sets the 32-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@ -1417,8 +1411,8 @@ LibPcdSet32 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 64-bit value for the token specified by TokenNumber
Sets the 64-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@ -1437,19 +1431,19 @@ LibPcdSet64 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets a buffer for the token specified by TokenNumber to the value
specified by Buffer and SizeOfBuffer. Buffer is returned.
If SizeOfBuffer is greater than the maximum size support by TokenNumber,
then set SizeOfBuffer to the maximum size supported by TokenNumber and
Sets a buffer for the token specified by TokenNumber to the value
specified by Buffer and SizeOfBuffer. Buffer is returned.
If SizeOfBuffer is greater than the maximum size support by TokenNumber,
then set SizeOfBuffer to the maximum size supported by TokenNumber and
return NULL to indicate that the set operation was not actually performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
maximum size supported by TokenName and NULL must be returned.
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
@param[in] Buffer A pointer to the buffer to set.
@ -1468,8 +1462,8 @@ LibPcdSetPtr (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the Boolean value for the token specified by TokenNumber
Sets the Boolean value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@ -1488,13 +1482,13 @@ LibPcdSetBool (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 8-bit value for the token specified by TokenNumber and
Sets the 8-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@ -1513,13 +1507,13 @@ LibPcdSetEx8 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 16-bit value for the token specified by TokenNumber and
Sets the 16-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@ -1538,13 +1532,13 @@ LibPcdSetEx16 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 32-bit value for the token specified by TokenNumber and
Sets the 32-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@ -1563,13 +1557,13 @@ LibPcdSetEx32 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the 64-bit value for the token specified by TokenNumber and
Sets the 64-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@ -1588,18 +1582,18 @@ LibPcdSetEx64 (
/**
This function provides a means by which to set a value for a given PCD token.
Sets a buffer for the token specified by TokenNumber to the value specified by
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
supported by TokenNumber and return NULL to indicate that the set operation
Sets a buffer for the token specified by TokenNumber to the value specified by
Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
supported by TokenNumber and return NULL to indicate that the set operation
was not actually performed.
If Guid is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in, out] SizeOfBuffer The size, in bytes, of Buffer.
@ -1620,13 +1614,13 @@ LibPcdSetExPtr (
/**
This function provides a means by which to set a value for a given PCD token.
Sets the Boolean value for the token specified by TokenNumber and
Sets the Boolean value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The Boolean value to set.
@ -1927,7 +1921,7 @@ LibPcdSetExBoolS (
Secondly, it provides a mechanism for the module that did the registration to intercept
the set operation and override the value been set if necessary. After the invocation of
the callback function, TokenData will be used by PCD service PEIM or driver to modify th
internal data in PCD database.
internal data in PCD database.
@param[in] CallBackGuid The PCD token GUID being set.
@param[in] CallBackToken The PCD token number being set.
@ -1947,17 +1941,17 @@ VOID
/**
Set up a notification function that is called when a specified token is set.
When the token specified by TokenNumber and Guid is set,
then notification function specified by NotificationFunction is called.
When the token specified by TokenNumber and Guid is set,
then notification function specified by NotificationFunction is called.
If Guid is NULL, then the default token space is used.
If NotificationFunction is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates which
namespace to set a value from. If NULL, then the default
@param[in] Guid Pointer to a 128-bit unique value that designates which
namespace to set a value from. If NULL, then the default
token space is used.
@param[in] TokenNumber The PCD token number to monitor.
@param[in] NotificationFunction The function to call when the token
@param[in] NotificationFunction The function to call when the token
specified by Guid and TokenNumber is set.
**/
@ -1972,12 +1966,12 @@ LibPcdCallbackOnSet (
/**
Disable a notification function that was established with LibPcdCallbackonSet().
Disable a notification function that was previously established with LibPcdCallbackOnSet().
If NotificationFunction is NULL, then ASSERT().
If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
and NotificationFunction, then ASSERT().
@param[in] Guid Specify the GUID token space.
@param[in] TokenNumber Specify the token number.
@param[in] NotificationFunction The callback function to be unregistered.
@ -1994,24 +1988,24 @@ LibPcdCancelCallback (
/**
Retrieves the next token in a token space.
Retrieves the next PCD token number from the token space specified by Guid.
If Guid is NULL, then the default token space is used. If TokenNumber is 0,
then the first token number is returned. Otherwise, the token number that
follows TokenNumber in the token space is returned. If TokenNumber is the last
token number in the token space, then 0 is returned.
Retrieves the next PCD token number from the token space specified by Guid.
If Guid is NULL, then the default token space is used. If TokenNumber is 0,
then the first token number is returned. Otherwise, the token number that
follows TokenNumber in the token space is returned. If TokenNumber is the last
token number in the token space, then 0 is returned.
If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates which namespace
@param[in] Guid Pointer to a 128-bit unique value that designates which namespace
to set a value from. If NULL, then the default token space is used.
@param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
@param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD
token number.
@return The next valid token number.
**/
UINTN
UINTN
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid, OPTIONAL
@ -2022,12 +2016,12 @@ LibPcdGetNextToken (
/**
Used to retrieve the list of available PCD token space GUIDs.
Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
in the platform.
If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
@param TokenSpaceGuid Pointer to the a PCD token space GUID
@return The next valid token namespace.
@ -2042,24 +2036,24 @@ LibPcdGetNextTokenSpace (
/**
Sets a value of a patchable PCD entry that is type pointer.
Sets the PCD entry specified by PatchVariable to the value specified by Buffer
and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
NULL to indicate that the set operation was not actually performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
Sets the PCD entry specified by PatchVariable to the value specified by Buffer
and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
NULL to indicate that the set operation was not actually performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
MaximumDatumSize and NULL must be returned.
If PatchVariable is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param[out] PatchVariable A pointer to the global variable in a module that is
@param[out] PatchVariable A pointer to the global variable in a module that is
the target of the set operation.
@param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
@param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param[in] Buffer A pointer to the buffer to used to set the target variable.
@return Return the pointer to the Buffer that was set.
**/
@ -2091,7 +2085,7 @@ LibPatchPcdSetPtr (
@param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
@param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param[in] Buffer A pointer to the buffer to used to set the target variable.
@return The status of the set operation.
**/
@ -2106,26 +2100,26 @@ LibPatchPcdSetPtrS (
/**
Sets a value and size of a patchable PCD entry that is type pointer.
Sets the PCD entry specified by PatchVariable to the value specified by Buffer
and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
NULL to indicate that the set operation was not actually performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
Sets the PCD entry specified by PatchVariable to the value specified by Buffer
and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than
MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
NULL to indicate that the set operation was not actually performed.
If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
MaximumDatumSize and NULL must be returned.
If PatchVariable is NULL, then ASSERT().
If SizeOfPatchVariable is NULL, then ASSERT().
If SizeOfBuffer is NULL, then ASSERT().
If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
@param[out] PatchVariable A pointer to the global variable in a module that is
@param[out] PatchVariable A pointer to the global variable in a module that is
the target of the set operation.
@param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable.
@param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
@param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param[in] Buffer A pointer to the buffer to used to set the target variable.
@return Return the pointer to the Buffer that was set.
**/
@ -2160,7 +2154,7 @@ LibPatchPcdSetPtrAndSize (
@param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable.
@param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer.
@param[in] Buffer A pointer to the buffer to used to set the target variable.
@return The status of the set operation.
**/

View File

@ -2,45 +2,39 @@
Provides services to print a formatted string to a buffer. All combinations of
Unicode and ASCII strings are supported.
Copyright (c) 2006 - 2017, 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 that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
The Print Library functions provide a simple means to produce formatted output
strings. Many of the output functions use a format string to describe how to
format the output of variable arguments. The format string consists of normal
text and argument descriptors. There are no restrictions for how the normal
text and argument descriptors can be mixed. The following end of line(EOL)
The Print Library functions provide a simple means to produce formatted output
strings. Many of the output functions use a format string to describe how to
format the output of variable arguments. The format string consists of normal
text and argument descriptors. There are no restrictions for how the normal
text and argument descriptors can be mixed. The following end of line(EOL)
translations must be performed on the contents of the format string:
- '\\r' is translated to '\\r'
- '\\r\\n' is translated to '\\r\\n'
- '\\n' is translated to '\\r\\n'
- '\\n' is translated to '\\r\\n'
- '\\n\\r' is translated to '\\r\\n'
This does not follow the ANSI C standard for sprint(). The format of argument
descriptors is described below. The ANSI C standard for sprint() has been
followed for some of the format types, and has not been followed for others.
This does not follow the ANSI C standard for sprint(). The format of argument
descriptors is described below. The ANSI C standard for sprint() has been
followed for some of the format types, and has not been followed for others.
The exceptions are noted below.
%[flags][width][.precision]type
[flags]:
- -
- The field is left justified. If not flag is not specified, then the
- -
- The field is left justified. If not flag is not specified, then the
field is right justified.
- space
- space
- Prefix a space character to a number. Only valid for types X, x, and d.
- +
- Prefix a plus character to a number. Only valid for types X, x, and d.
- +
- Prefix a plus character to a number. Only valid for types X, x, and d.
If both space and + are specified, then space is ignored.
- 0
- Pad with 0 characters to the left of a number. Only valid for types
- Pad with 0 characters to the left of a number. Only valid for types
X, x, and d.
- ,
- Place a comma every 3rd digit of the number. Only valid for type d.
@ -53,20 +47,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
[width]:
- *
- The width of the field is specified by a UINTN argument in the
- The width of the field is specified by a UINTN argument in the
argument list.
- number
- The number specified as a decimal value represents the width of
- The number specified as a decimal value represents the width of
the field.
- NOTE: If [width] is not specified, then a field width of 0 is assumed.
[.precision]:
- *
- The precision of the field is specified by a UINTN argument in the
- The precision of the field is specified by a UINTN argument in the
argument list.
- number
- The number specified as a decimal value represents the precision of
- The number specified as a decimal value represents the precision of
the field.
- NOTE: If [.precision] is not specified, then a precision of 0 is assumed.
@ -75,102 +69,102 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- %
- Print a %%.
- c
- The argument is a Unicode character. ASCII characters can be printed
- The argument is a Unicode character. ASCII characters can be printed
using this type too by making sure bits 8..15 of the argument are set to 0.
- x
- The argument is an unsigned hexadecimal number. The characters used are 0..9 and
A..F. If the flag 'L' is not specified, then the argument is assumed
- The argument is an unsigned hexadecimal number. The characters used are 0..9 and
A..F. If the flag 'L' is not specified, then the argument is assumed
to be size int. This does not follow ANSI C.
- X
- The argument is an unsigned hexadecimal number and the number is padded with
zeros. This is equivalent to a format string of "0x". If the flag
'L' is not specified, then the argument is assumed to be size int.
- The argument is an unsigned hexadecimal number and the number is padded with
zeros. This is equivalent to a format string of "0x". If the flag
'L' is not specified, then the argument is assumed to be size int.
This does not follow ANSI C.
- d
- The argument is a signed decimal number. If the flag 'L' is not specified,
then the argument is assumed to be size int.
- The argument is a signed decimal number. If the flag 'L' is not specified,
then the argument is assumed to be size int.
- u
- The argument is a unsigned decimal number. If the flag 'L' is not specified,
- The argument is a unsigned decimal number. If the flag 'L' is not specified,
then the argument is assumed to be size int.
- p
- The argument is a pointer that is a (VOID *), and it is printed as an
- The argument is a pointer that is a (VOID *), and it is printed as an
unsigned hexadecimal number The characters used are 0..9 and A..F.
- a
- The argument is a pointer to an ASCII string.
- The argument is a pointer to an ASCII string.
This does not follow ANSI C.
- S, s
- The argument is a pointer to a Unicode string.
- The argument is a pointer to a Unicode string.
This does not follow ANSI C.
- g
- The argument is a pointer to a GUID structure. The GUID is printed
in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.
- The argument is a pointer to a GUID structure. The GUID is printed
in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.
This does not follow ANSI C.
- t
- The argument is a pointer to an EFI_TIME structure. The time and
date are printed in the format "mm/dd/yyyy hh:mm" where mm is the
month zero padded, dd is the day zero padded, yyyy is the year zero
padded, hh is the hour zero padded, and mm is minutes zero padded.
This does not follow ANSI C.
- The argument is a pointer to an EFI_TIME structure. The time and
date are printed in the format "mm/dd/yyyy hh:mm" where mm is the
month zero padded, dd is the day zero padded, yyyy is the year zero
padded, hh is the hour zero padded, and mm is minutes zero padded.
This does not follow ANSI C.
- r
- The argument is a RETURN_STATUS value. This value is converted to
a string following the table below. This does not follow ANSI C.
- RETURN_SUCCESS
- The argument is a RETURN_STATUS value. This value is converted to
a string following the table below. This does not follow ANSI C.
- RETURN_SUCCESS
- "Success"
- RETURN_LOAD_ERROR
- RETURN_LOAD_ERROR
- "Load Error"
- RETURN_INVALID_PARAMETER
- RETURN_INVALID_PARAMETER
- "Invalid Parameter"
- RETURN_UNSUPPORTED
- RETURN_UNSUPPORTED
- "Unsupported"
- RETURN_BAD_BUFFER_SIZE
- RETURN_BAD_BUFFER_SIZE
- "Bad Buffer Size"
- RETURN_BUFFER_TOO_SMALL
- RETURN_BUFFER_TOO_SMALL
- "Buffer Too Small"
- RETURN_NOT_READY
- RETURN_NOT_READY
- "Not Ready"
- RETURN_DEVICE_ERROR
- RETURN_DEVICE_ERROR
- "Device Error"
- RETURN_WRITE_PROTECTED
- RETURN_WRITE_PROTECTED
- "Write Protected"
- RETURN_OUT_OF_RESOURCES
- RETURN_OUT_OF_RESOURCES
- "Out of Resources"
- RETURN_VOLUME_CORRUPTED
- RETURN_VOLUME_CORRUPTED
- "Volume Corrupt"
- RETURN_VOLUME_FULL
- RETURN_VOLUME_FULL
- "Volume Full"
- RETURN_NO_MEDIA
- RETURN_NO_MEDIA
- "No Media"
- RETURN_MEDIA_CHANGED
- RETURN_MEDIA_CHANGED
- "Media changed"
- RETURN_NOT_FOUND
- RETURN_NOT_FOUND
- "Not Found"
- RETURN_ACCESS_DENIED
- RETURN_ACCESS_DENIED
- "Access Denied"
- RETURN_NO_RESPONSE
- RETURN_NO_RESPONSE
- "No Response"
- RETURN_NO_MAPPING
- RETURN_NO_MAPPING
- "No mapping"
- RETURN_TIMEOUT
- RETURN_TIMEOUT
- "Time out"
- RETURN_NOT_STARTED
- RETURN_NOT_STARTED
- "Not started"
- RETURN_ALREADY_STARTED
- RETURN_ALREADY_STARTED
- "Already started"
- RETURN_ABORTED
- RETURN_ABORTED
- "Aborted"
- RETURN_ICMP_ERROR
- RETURN_ICMP_ERROR
- "ICMP Error"
- RETURN_TFTP_ERROR
- RETURN_TFTP_ERROR
- "TFTP Error"
- RETURN_PROTOCOL_ERROR
- RETURN_PROTOCOL_ERROR
- "Protocol Error"
- RETURN_WARN_UNKNOWN_GLYPH
- RETURN_WARN_UNKNOWN_GLYPH
- "Warning Unknown Glyph"
- RETURN_WARN_DELETE_FAILURE
- RETURN_WARN_DELETE_FAILURE
- "Warning Delete Failure"
- RETURN_WARN_WRITE_FAILURE
- RETURN_WARN_WRITE_FAILURE
- "Warning Write Failure"
- RETURN_WARN_BUFFER_TOO_SMALL
- RETURN_WARN_BUFFER_TOO_SMALL
- "Warning Buffer Too Small"
**/
@ -180,9 +174,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Define the maximum number of characters that are required to
/// encode with a NULL terminator a decimal, hexadecimal, GUID,
/// encode with a NULL terminator a decimal, hexadecimal, GUID,
/// or TIME value.
///
///
/// Maximum Length Decimal String = 28
/// "-9,223,372,036,854,775,808"
/// Maximum Length Hexadecimal String = 17
@ -195,7 +189,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define MAXIMUM_VALUE_CHARACTERS 38
///
/// Flags bitmask values use in UnicodeValueToString() and
/// Flags bitmask values use in UnicodeValueToString() and
/// AsciiValueToString()
///
#define LEFT_JUSTIFY 0x01
@ -497,26 +491,26 @@ UnicodeSPrintAsciiFormat (
[ATTENTION] This function is deprecated for security reason.
Converts a decimal value to a Null-terminated Unicode string.
Converts the decimal number specified by Value to a Null-terminated Unicode
string specified by Buffer containing at most Width characters. No padding of spaces
Converts the decimal number specified by Value to a Null-terminated Unicode
string specified by Buffer containing at most Width characters. No padding of spaces
is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
The number of Unicode characters in Buffer is returned, not including the Null-terminator.
If the conversion contains more than Width characters, then only the first
Width characters are returned, and the total number of characters
Width characters are returned, and the total number of characters
required to perform the conversion is returned.
Additional conversion parameters are specified in Flags.
Additional conversion parameters are specified in Flags.
The Flags bit LEFT_JUSTIFY is always ignored.
All conversions are left justified in Buffer.
If Width is 0, PREFIX_ZERO is ignored in Flags.
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
are inserted every 3rd digit starting from the right.
If RADIX_HEX is set in Flags, then the output buffer will be
If RADIX_HEX is set in Flags, then the output buffer will be
formatted in hexadecimal format.
If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
then Buffer is padded with '0' characters so the combination of the optional '-'
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
then Buffer is padded with '0' characters so the combination of the optional '-'
sign character, '0' characters, digit characters for Value, and the Null-terminator
add up to Width characters.
If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
@ -532,7 +526,7 @@ UnicodeSPrintAsciiFormat (
@param Value The 64-bit signed value to convert to a string.
@param Width The maximum number of Unicode characters to place in Buffer, not including
the Null-terminator.
@return The number of Unicode characters in Buffer, not including the Null-terminator.
**/
@ -894,29 +888,29 @@ AsciiSPrintUnicodeFormat (
[ATTENTION] This function is deprecated for security reason.
Converts a decimal value to a Null-terminated ASCII string.
Converts the decimal number specified by Value to a Null-terminated ASCII string
specified by Buffer containing at most Width characters. No padding of spaces
Converts the decimal number specified by Value to a Null-terminated ASCII string
specified by Buffer containing at most Width characters. No padding of spaces
is ever performed.
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
The number of ASCII characters in Buffer is returned, not including the Null-terminator.
If the conversion contains more than Width characters, then only the first Width
characters are returned, and the total number of characters required to perform
the conversion is returned.
Additional conversion parameters are specified in Flags.
Additional conversion parameters are specified in Flags.
The Flags bit LEFT_JUSTIFY is always ignored.
All conversions are left justified in Buffer.
If Width is 0, PREFIX_ZERO is ignored in Flags.
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
are inserted every 3rd digit starting from the right.
If RADIX_HEX is set in Flags, then the output buffer will be
If RADIX_HEX is set in Flags, then the output buffer will be
formatted in hexadecimal format.
If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
then Buffer is padded with '0' characters so the combination of the optional '-'
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
then Buffer is padded with '0' characters so the combination of the optional '-'
sign character, '0' characters, digit characters for Value, and the Null-terminator
add up to Width characters.
If Buffer is NULL, then ASSERT().
If unsupported bits are set in Flags, then ASSERT().
If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
@ -928,7 +922,7 @@ AsciiSPrintUnicodeFormat (
@param Value The 64-bit signed value to convert to a string.
@param Width The maximum number of ASCII characters to place in Buffer, not including
the Null-terminator.
@return The number of ASCII characters in Buffer, not including the Null-terminator.
**/
@ -967,8 +961,7 @@ AsciiValueToString (
sign character, '0' characters, digit characters for Value, and the
Null-terminator add up to Width characters.
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If an error would be returned, then the function will also ASSERT().
If an error would be returned, then the function will ASSERT().
@param Buffer The pointer to the output buffer for the produced
Null-terminated Ascii string.
@ -1004,7 +997,7 @@ AsciiValueToStringS (
);
/**
Returns the number of characters that would be produced by if the formatted
Returns the number of characters that would be produced by if the formatted
output were produced not including the Null-terminator.
If FormatString is not aligned on a 16-bit boundary, then ASSERT().
@ -1017,7 +1010,7 @@ AsciiValueToStringS (
@param[in] FormatString A Null-terminated Unicode format string.
@param[in] Marker VA_LIST marker for the variable argument list.
@return The number of characters that would be produced, not including the
@return The number of characters that would be produced, not including the
Null-terminator.
**/
UINTN
@ -1028,7 +1021,7 @@ SPrintLength (
);
/**
Returns the number of characters that would be produced by if the formatted
Returns the number of characters that would be produced by if the formatted
output were produced not including the Null-terminator.
If FormatString is NULL, then ASSERT() and 0 is returned.
@ -1039,7 +1032,7 @@ SPrintLength (
@param[in] FormatString A Null-terminated ASCII format string.
@param[in] Marker VA_LIST marker for the variable argument list.
@return The number of characters that would be produced, not including the
@return The number of characters that would be produced, not including the
Null-terminator.
**/
UINTN

View File

@ -3,13 +3,7 @@
Only available to DXE and UEFI module types.
Copyright (c) 2006 - 2008, 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.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

View File

@ -1,17 +1,11 @@
/** @file
The file defines the EFI Debugport protocol.
This protocol is used by debug agent to communicate with the
remote debug host.
Copyright (c) 2006 - 2013, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -35,14 +29,14 @@ typedef struct _EFI_DEBUGPORT_PROTOCOL EFI_DEBUGPORT_PROTOCOL;
// DebugPort member functions
//
/**
/**
Resets the debugport.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@retval EFI_SUCCESS The debugport device was reset and is in usable state.
@retval EFI_DEVICE_ERROR The debugport device could not be reset and is unusable.
**/
typedef
EFI_STATUS
@ -50,19 +44,19 @@ EFI_STATUS
IN EFI_DEBUGPORT_PROTOCOL *This
);
/**
/**
Writes data to the debugport.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@param Timeout The number of microseconds to wait before timing out a write operation.
@param BufferSize On input, the requested number of bytes of data to write. On output, the
number of bytes of data actually written.
@param Buffer A pointer to a buffer containing the data to write.
@param Buffer A pointer to a buffer containing the data to write.
@retval EFI_SUCCESS The data was written.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
**/
typedef
EFI_STATUS
@ -73,20 +67,20 @@ EFI_STATUS
IN VOID *Buffer
);
/**
/**
Reads data from the debugport.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@param Timeout The number of microseconds to wait before timing out a read operation.
@param BufferSize On input, the requested number of bytes of data to read. On output, the
number of bytes of data actually number of bytes
of data read and returned in Buffer.
@param Buffer A pointer to a buffer into which the data read will be saved.
@retval EFI_SUCCESS The data was read.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_TIMEOUT The operation was stopped due to a timeout or overrun.
**/
typedef
EFI_STATUS
@ -97,15 +91,15 @@ EFI_STATUS
OUT VOID *Buffer
);
/**
/**
Checks to see if any data is available to be read from the debugport device.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@retval EFI_SUCCESS At least one byte of data is available to be read.
@retval EFI_DEVICE_ERROR The debugport device is not functioning correctly.
@retval EFI_NOT_READY No data is available to be read.
**/
typedef
EFI_STATUS

View File

@ -2,17 +2,11 @@
The device path protocol as defined in UEFI 2.0.
The device path represents a programmatic path to a device,
from a software point of view. The path must persist from boot to boot, so
from a software point of view. The path must persist from boot to boot, so
it can not contain things like PCI bus numbers that change from boot to boot.
Copyright (c) 2006 - 2016, 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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -39,11 +33,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#pragma pack(1)
/**
This protocol can be used on any device handle to obtain generic path/location
information concerning the physical device or logical device. If the handle does
not logically map to a physical device, the handle may not necessarily support
the device path protocol. The device path describes the location of the device
the handle is for. The size of the Device Path can be determined from the structures
This protocol can be used on any device handle to obtain generic path/location
information concerning the physical device or logical device. If the handle does
not logically map to a physical device, the handle may not necessarily support
the device path protocol. The device path describes the location of the device
the handle is for. The size of the Device Path can be determined from the structures
that make up the Device Path.
**/
typedef struct {
@ -53,20 +47,20 @@ typedef struct {
///< 0x04 Media Device Path.
///< 0x05 BIOS Boot Specification Device Path.
///< 0x7F End of Hardware Device Path.
UINT8 SubType; ///< Varies by Type
///< 0xFF End Entire Device Path, or
///< 0x01 End This Instance of a Device Path and start a new
///< Device Path.
UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define
///< type of data. Size of data is included in Length.
} EFI_DEVICE_PATH_PROTOCOL;
///
/// Device Path protocol definition for backward-compatible with EFI1.1.
///
///
typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;
///
@ -288,6 +282,21 @@ typedef struct {
//
} ACPI_ADR_DEVICE_PATH;
///
/// ACPI NVDIMM Device Path SubType.
///
#define ACPI_NVDIMM_DP 0x04
///
///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
///
/// NFIT Device Handle, the _ADR of the NVDIMM device.
/// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification.
///
UINT32 NFITDeviceHandle;
} ACPI_NVDIMM_DEVICE_PATH;
#define ACPI_ADR_DISPLAY_TYPE_OTHER 0
#define ACPI_ADR_DISPLAY_TYPE_VGA 1
#define ACPI_ADR_DISPLAY_TYPE_TV 2
@ -718,6 +727,18 @@ typedef struct {
UINT8 StopBits;
} UART_DEVICE_PATH;
///
/// NVDIMM Namespace Device Path SubType.
///
#define NVDIMM_NAMESPACE_DP 0x20
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Namespace unique label identifier UUID.
///
EFI_GUID Uuid;
} NVDIMM_NAMESPACE_DEVICE_PATH;
//
// Use VENDOR_DEVICE_PATH struct
//
@ -817,6 +838,22 @@ typedef struct {
UINT64 NamespaceUuid;
} NVME_NAMESPACE_DEVICE_PATH;
///
/// DNS Device Path SubType
///
#define MSG_DNS_DP 0x1F
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Indicates the DNS server address is IPv4 or IPv6 address.
///
UINT8 IsIPv6;
///
/// Instance of the DNS server address.
///
EFI_IP_ADDRESS DnsServerIp[];
} DNS_DEVICE_PATH;
///
/// Uniform Resource Identifiers (URI) Device Path SubType
///
@ -938,6 +975,15 @@ typedef struct {
UINT8 SSId[32];
} WIFI_DEVICE_PATH;
///
/// Bluetooth LE Device Path SubType.
///
#define MSG_BLUETOOTH_LE_DP 0x1E
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
BLUETOOTH_LE_ADDRESS Address;
} BLUETOOTH_LE_DEVICE_PATH;
//
// Media Device Path
//
@ -1047,8 +1093,8 @@ typedef struct {
#define MEDIA_PROTOCOL_DP 0x05
///
/// The Media Protocol Device Path is used to denote the protocol that is being
/// used in a device path at the location of the path specified.
/// The Media Protocol Device Path is used to denote the protocol that is being
/// used in a device path at the location of the path specified.
/// Many protocols are inherent to the style of device path.
///
typedef struct {
@ -1243,6 +1289,7 @@ typedef union {
SAS_DEVICE_PATH Sas;
SASEX_DEVICE_PATH SasEx;
NVME_NAMESPACE_DEVICE_PATH NvmeNamespace;
DNS_DEVICE_PATH Dns;
URI_DEVICE_PATH Uri;
BLUETOOTH_DEVICE_PATH Bluetooth;
WIFI_DEVICE_PATH WiFi;
@ -1300,6 +1347,7 @@ typedef union {
SAS_DEVICE_PATH *Sas;
SASEX_DEVICE_PATH *SasEx;
NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace;
DNS_DEVICE_PATH *Dns;
URI_DEVICE_PATH *Uri;
BLUETOOTH_DEVICE_PATH *Bluetooth;
WIFI_DEVICE_PATH *WiFi;
@ -1321,7 +1369,7 @@ typedef union {
} EFI_DEV_PATH_PTR;
#pragma pack()
#define END_DEVICE_PATH_TYPE 0x7f
#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01

View File

@ -1,15 +1,9 @@
/** @file
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.
This protocol provides service to convert text to device paths and device nodes.
Copyright (c) 2006 - 2008, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -39,8 +33,8 @@ typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE)(
IN CONST CHAR16 *TextDeviceNode
);
);
/**
Convert text to the binary representation of a device node.
@ -57,7 +51,7 @@ typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH)(
IN CONST CHAR16 *TextDevicePath
);
);
///
/// This protocol converts text to device paths and device nodes.

View File

@ -1,15 +1,9 @@
/** @file
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
This protocol provides service to convert device nodes and paths to text.
Copyright (c) 2006 - 2008, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -45,7 +39,7 @@ CHAR16*
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
);
);
/**
Convert a device path to its text representation.
@ -54,7 +48,7 @@ CHAR16*
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
is used.
@param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
text representation for a device node cannot be used.
@ -68,7 +62,7 @@ CHAR16*
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
);
);
///
/// This protocol converts device paths and device nodes to text.

View File

@ -1,15 +1,9 @@
/** @file
EFI_DEVICE_PATH_UTILITIES_PROTOCOL as defined in UEFI 2.0.
EFI_DEVICE_PATH_UTILITIES_PROTOCOL as defined in UEFI 2.0.
Use to create and manipulate device paths and device nodes.
Copyright (c) 2006 - 2010, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -30,15 +24,15 @@
@param DevicePath Points to the start of the EFI device path.
@return Size Size of the specified device path, in bytes, including the end-of-path tag.
@retval 0 DevicePath is NULL
@retval 0 DevicePath is NULL
**/
typedef
UINTN
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
);
/**
Create a duplicate of the specified path.
@ -53,11 +47,11 @@ typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
);
/**
Create a new path by appending the second device path to the first.
If Src1 is NULL and Src2 is non-NULL, then a duplicate of Src2 is returned.
If Src1 is NULL and Src2 is non-NULL, then a duplicate of Src2 is returned.
If Src1 is non-NULL and Src2 is NULL, then a duplicate of Src1 is returned.
If Src1 and Src2 are both NULL, then a copy of an end-of-device-path is returned.
@ -73,11 +67,11 @@ EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
);
);
/**
Creates a new path by appending the device node to the device path.
If DeviceNode is NULL then a copy of DevicePath is returned.
If DeviceNode is NULL then a copy of DevicePath is returned.
If DevicePath is NULL then a copy of DeviceNode, followed by an end-of-device path device node is returned.
If both DeviceNode and DevicePath are NULL then a copy of an end-of-device-path device node is returned.
@ -110,7 +104,7 @@ EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
);
);
/**
Creates a copy of the current device path instance and returns a pointer to the next device path
@ -119,7 +113,7 @@ EFI_DEVICE_PATH_PROTOCOL*
@param DevicePathInstance On input, this holds the pointer to the current device path
instance. On output, this holds the pointer to the next
device path instance or NULL if there are no more device
path instances in the device path.
path instances in the device path.
@param DevicePathInstanceSize On output, this holds the size of the device path instance,
in bytes or zero, if DevicePathInstance is NULL.
If NULL, then the instance size is not output.
@ -133,7 +127,7 @@ EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE)(
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
OUT UINTN *DevicePathInstanceSize
);
);
/**
Creates a device node
@ -156,7 +150,7 @@ EFI_DEVICE_PATH_PROTOCOL*
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
);
);
/**
Returns whether a device path is multi-instance.
@ -171,11 +165,11 @@ typedef
BOOLEAN
(EFIAPI *EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE)(
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
);
///
/// This protocol is used to creates and manipulates device paths and device nodes.
///
///
typedef struct {
EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
@ -187,6 +181,6 @@ typedef struct {
EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
#endif

View File

@ -5,13 +5,7 @@
terminal.
Copyright (c) 2006 - 2011, 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.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

View File

@ -5,14 +5,8 @@
which exposes much more state and modifier information from the input device,
also allows one to register a notification for a particular keystroke.
Copyright (c) 2006 - 2012, 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -190,13 +184,10 @@ typedef struct {
pressed.
@retval EFI_SUCCESS The keystroke information was
returned.
@retval EFI_NOT_READY There was no keystroke data available.
EFI_DEVICE_ERROR The keystroke
information was not returned due to
hardware errors.
@retval EFI_SUCCESS The keystroke information was returned.
@retval EFI_NOT_READY There was no keystroke data available.
@retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
**/
@ -251,18 +242,19 @@ EFI_STATUS
@param KeyData A pointer to a buffer that is filled in with
the keystroke information for the key that was
pressed.
pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState
and KeyData.KeyState.KeyShiftState are 0, then any incomplete
keystroke will trigger a notification of the KeyNotificationFunction.
@param KeyNotificationFunction Points to the function to be
called when the key sequence
is typed specified by KeyData.
@param KeyNotificationFunction Points to the function to be called when the key sequence
is typed specified by KeyData. This notification function
should be called at <=TPL_CALLBACK.
@param NotifyHandle Points to the unique handle assigned to
the registered notification.
@retval EFI_SUCCESS The device state was set
appropriately.
@retval EFI_SUCCESS Key notify was registered successfully.
@retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
data structures.
@ -286,7 +278,7 @@ EFI_STATUS
@param NotificationHandle The handle of the notification
function being unregistered.
@retval EFI_SUCCESS The device state was set appropriately.
@retval EFI_SUCCESS Key notify was unregistered successfully.
@retval EFI_INVALID_PARAMETER The NotificationHandle is
invalid.

View File

@ -6,14 +6,8 @@
a single hardware device or a virtual device that is an aggregation
of multiple physical devices.
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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -27,14 +21,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Protocol GUID defined in EFI1.1.
///
///
#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID
typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL;
///
/// Backward-compatible with EFI1.1.
///
///
typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
//
@ -125,8 +119,8 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
//
// Macro to accept color values in their raw form to create
// a value that represents both a foreground and background
// Macro to accept color values in their raw form to create
// a value that represents both a foreground and background
// color in a single byte.
// For Foreground, and EFI_* value is valid from EFI_BLACK(0x00) to
// EFI_WHITE (0x0F).
@ -148,7 +142,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
//
// We currently define attributes from 0 - 7F for color manipulations
// To internally handle the local display characteristics for a particular character,
// To internally handle the local display characteristics for a particular character,
// Bit 7 signifies the local glyph representation for a character. If turned on, glyphs will be
// pulled from the wide glyph database and will display locally as a wide character (16 X 19 versus 8 X 19)
// If bit 7 is off, the narrow glyph database will be used. This does NOT affect information that is sent to
@ -201,7 +195,7 @@ EFI_STATUS
);
/**
Verifies that all characters in a string can be output to the
Verifies that all characters in a string can be output to the
target device.
@param This The protocol instance pointer.
@ -231,7 +225,7 @@ EFI_STATUS
requested ModeNumber.
@param Rows Returns the geometry of the text output device for the
requested ModeNumber.
@retval EFI_SUCCESS The requested mode information was returned.
@retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
@retval EFI_UNSUPPORTED The mode number was not valid.
@ -286,11 +280,11 @@ EFI_STATUS
);
/**
Clears the output device(s) display to the currently selected background
Clears the output device(s) display to the currently selected background
color.
@param This The protocol instance pointer.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
@retval EFI_UNSUPPORTED The output device is not in a valid text mode.
@ -385,9 +379,9 @@ typedef struct {
} EFI_SIMPLE_TEXT_OUTPUT_MODE;
///
/// The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices.
/// It is the minimum required protocol for any handle supplied as the ConsoleOut
/// or StandardError device. In addition, the minimum supported text mode of such
/// The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices.
/// It is the minimum required protocol for any handle supplied as the ConsoleOut
/// or StandardError device. In addition, the minimum supported text mode of such
/// devices is at least 80 x 25 characters.
///
struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {

View File

@ -2,18 +2,12 @@
Root include file for Mde Package UEFI, UEFI_APPLICATION type modules.
This is the include file for any module of type UEFI and UEFI_APPLICATION. Uefi modules only use
types defined via this include file and can be ported easily to any
environment.
This is the include file for any module of type UEFI and UEFI_APPLICATION. Uefi modules only use
types defined via this include file and can be ported easily to any
environment.
Copyright (c) 2006 - 2010, 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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

View File

@ -1,16 +1,11 @@
/** @file
Defines data types and constants introduced in UEFI.
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that 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.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -114,44 +109,44 @@ typedef union {
///
/// Enumeration of EFI_STATUS.
///@{
#define EFI_SUCCESS RETURN_SUCCESS
#define EFI_LOAD_ERROR RETURN_LOAD_ERROR
#define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER
#define EFI_UNSUPPORTED RETURN_UNSUPPORTED
#define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE
#define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL
#define EFI_NOT_READY RETURN_NOT_READY
#define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR
#define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED
#define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES
#define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED
#define EFI_VOLUME_FULL RETURN_VOLUME_FULL
#define EFI_NO_MEDIA RETURN_NO_MEDIA
#define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED
#define EFI_NOT_FOUND RETURN_NOT_FOUND
#define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED
#define EFI_NO_RESPONSE RETURN_NO_RESPONSE
#define EFI_NO_MAPPING RETURN_NO_MAPPING
#define EFI_TIMEOUT RETURN_TIMEOUT
#define EFI_NOT_STARTED RETURN_NOT_STARTED
#define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED
#define EFI_ABORTED RETURN_ABORTED
#define EFI_ICMP_ERROR RETURN_ICMP_ERROR
#define EFI_TFTP_ERROR RETURN_TFTP_ERROR
#define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR
#define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION
#define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION
#define EFI_CRC_ERROR RETURN_CRC_ERROR
///@{
#define EFI_SUCCESS RETURN_SUCCESS
#define EFI_LOAD_ERROR RETURN_LOAD_ERROR
#define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER
#define EFI_UNSUPPORTED RETURN_UNSUPPORTED
#define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE
#define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL
#define EFI_NOT_READY RETURN_NOT_READY
#define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR
#define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED
#define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES
#define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED
#define EFI_VOLUME_FULL RETURN_VOLUME_FULL
#define EFI_NO_MEDIA RETURN_NO_MEDIA
#define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED
#define EFI_NOT_FOUND RETURN_NOT_FOUND
#define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED
#define EFI_NO_RESPONSE RETURN_NO_RESPONSE
#define EFI_NO_MAPPING RETURN_NO_MAPPING
#define EFI_TIMEOUT RETURN_TIMEOUT
#define EFI_NOT_STARTED RETURN_NOT_STARTED
#define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED
#define EFI_ABORTED RETURN_ABORTED
#define EFI_ICMP_ERROR RETURN_ICMP_ERROR
#define EFI_TFTP_ERROR RETURN_TFTP_ERROR
#define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR
#define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION
#define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION
#define EFI_CRC_ERROR RETURN_CRC_ERROR
#define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA
#define EFI_END_OF_FILE RETURN_END_OF_FILE
#define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE
#define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA
#define EFI_HTTP_ERROR RETURN_HTTP_ERROR
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA
#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM
@ -159,7 +154,7 @@ typedef union {
///
/// Define macro to encode the status code.
///
///
#define EFIERR(_a) ENCODE_ERROR(_a)
#define EFI_ERROR(A) RETURN_ERROR(A)
@ -168,7 +163,7 @@ typedef union {
/// ICMP error definitions
///@{
#define EFI_NETWORK_UNREACHABLE EFIERR(100)
#define EFI_HOST_UNREACHABLE EFIERR(101)
#define EFI_HOST_UNREACHABLE EFIERR(101)
#define EFI_PROTOCOL_UNREACHABLE EFIERR(102)
#define EFI_PORT_UNREACHABLE EFIERR(103)
///@}
@ -193,8 +188,8 @@ typedef union {
/**
Macro that converts a size, in bytes, to a number of EFI_PAGESs.
@param Size A size in bytes. This parameter is assumed to be type UINTN.
Passing in a parameter that is larger than UINTN may produce
@param Size A size in bytes. This parameter is assumed to be type UINTN.
Passing in a parameter that is larger than UINTN may produce
unexpected results.
@return The number of EFI_PAGESs associated with the number of bytes specified
@ -206,13 +201,13 @@ typedef union {
/**
Macro that converts a number of EFI_PAGEs to a size in bytes.
@param Pages The number of EFI_PAGES. This parameter is assumed to be
type UINTN. Passing in a parameter that is larger than
@param Pages The number of EFI_PAGES. This parameter is assumed to be
type UINTN. Passing in a parameter that is larger than
UINTN may produce unexpected results.
@return The number of bytes associated with the number of EFI_PAGEs specified
@return The number of bytes associated with the number of EFI_PAGEs specified
by Pages.
**/
#define EFI_PAGES_TO_SIZE(Pages) ((Pages) << EFI_PAGE_SHIFT)
@ -246,39 +241,43 @@ typedef union {
///
#define EFI_IMAGE_MACHINE_AARCH64 0xAA64
///
/// PE32+ Machine type for RISC-V 32/64/128
///
#define EFI_IMAGE_MACHINE_RISCV32 0x5032
#define EFI_IMAGE_MACHINE_RISCV64 0x5064
#define EFI_IMAGE_MACHINE_RISCV128 0x5128
#if defined (MDE_CPU_IA32)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
(((Machine) == EFI_IMAGE_MACHINE_IA32) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
((Machine) == EFI_IMAGE_MACHINE_IA32)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)
#elif defined (MDE_CPU_IPF)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
(((Machine) == EFI_IMAGE_MACHINE_IA64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)
#elif defined (MDE_CPU_X64)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
(((Machine) == EFI_IMAGE_MACHINE_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
((Machine) == EFI_IMAGE_MACHINE_X64)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
#elif defined (MDE_CPU_ARM)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
(((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
#elif defined (MDE_CPU_AARCH64)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
(((Machine) == EFI_IMAGE_MACHINE_AARCH64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
((Machine) == EFI_IMAGE_MACHINE_AARCH64)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
#elif defined (MDE_CPU_RISCV64)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
((Machine) == EFI_IMAGE_MACHINE_RISCV64)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
@ -286,11 +285,11 @@ typedef union {
///
/// This is just to make sure you can cross compile with the EBC compiler.
/// It does not make sense to have a PE loader coded in EBC.
/// It does not make sense to have a PE loader coded in EBC.
///
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
#else
#error Unknown Processor Type

View File

@ -1,14 +1,8 @@
/** @file
EFI Guid Partition Table Format Definition.
Copyright (c) 2006 - 2011, 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 that 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 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -22,8 +16,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define PRIMARY_PART_HEADER_LBA 1
///
/// EFI Partition Table Signature: "EFI PART".
///
///
#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T')
///
/// Minimum bytes reserve for EFI entry array buffer.
///
#define EFI_GPT_PART_ENTRY_MIN_SIZE 16384
#pragma pack(1)
@ -119,7 +117,7 @@ typedef struct {
/// this partition. By not producing an EFI_BLOCK_IO_PROTOCOL partition, file system
/// mappings will not be created for this partition in UEFI.
/// Bit 2: This bit is set aside to let systems with traditional PC-AT BIOS firmware implementations
/// inform certain limited, special-purpose software running on these systems that a GPT
/// inform certain limited, special-purpose software running on these systems that a GPT
/// partition may be bootable. The UEFI boot manager must ignore this bit when selecting
/// a UEFI-compliant application, e.g., an OS loader.
/// Bits 3-47: Undefined and must be zero. Reserved for expansion by future versions of the UEFI

View File

@ -3,15 +3,9 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that 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.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
These definitions are from UEFI 2.1 and 2.2.
@ -67,7 +61,7 @@ typedef struct {
//
// Value of HII package type
//
//
#define EFI_HII_PACKAGE_TYPE_ALL 0x00
#define EFI_HII_PACKAGE_TYPE_GUID 0x01
#define EFI_HII_PACKAGE_FORMS 0x02
@ -100,7 +94,7 @@ typedef struct {
///
typedef struct {
///
/// The Unicode representation of the glyph. The term weight is the
/// The Unicode representation of the glyph. The term weight is the
/// technical term for a character code.
///
CHAR16 UnicodeWeight;
@ -109,7 +103,7 @@ typedef struct {
///
UINT8 Attributes;
///
/// The column major glyph representation of the character. Bits
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// on when normally displayed; those with zero are off.
///
@ -117,12 +111,12 @@ typedef struct {
} EFI_NARROW_GLYPH;
///
/// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
/// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
/// to accommodate logographic characters.
///
typedef struct {
///
/// The Unicode representation of the glyph. The term weight is the
/// The Unicode representation of the glyph. The term weight is the
/// technical term for a character code.
///
CHAR16 UnicodeWeight;
@ -131,20 +125,20 @@ typedef struct {
///
UINT8 Attributes;
///
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// on when normally displayed; those with zero are off.
///
UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
///
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// The column major glyph representation of the character. Bits
/// with values of one indicate that the corresponding pixel is to be
/// on when normally displayed; those with zero are off.
///
UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
///
/// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
/// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
/// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
/// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
/// be zero.
///
UINT8 Pad[3];
@ -268,7 +262,7 @@ typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT16 Count;
UINT16 Count;
UINT8 BitmapData[1];
} EFI_HII_GIBT_GLYPHS_BLOCK;
@ -831,6 +825,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER {
#define EFI_IFR_FLAG_READ_ONLY 0x01
#define EFI_IFR_FLAG_CALLBACK 0x04
#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
#define EFI_IFR_FLAG_REST_STYLE 0x20
#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
@ -845,7 +840,7 @@ typedef struct _EFI_IFR_DEFAULTSTORE {
} EFI_IFR_DEFAULTSTORE;
//
// Default Identifier of default store
// Default Identifier of default store
//
#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
@ -1498,12 +1493,12 @@ typedef struct _EFI_IFR_SECURITY {
typedef struct _EFI_IFR_FORM_MAP_METHOD {
///
/// The string identifier which provides the human-readable name of
/// The string identifier which provides the human-readable name of
/// the configuration method for this standards map form.
///
EFI_STRING_ID MethodTitle;
///
/// Identifier which uniquely specifies the configuration methods
/// Identifier which uniquely specifies the configuration methods
/// associated with this standards map form.
///
EFI_GUID MethodIdentifier;
@ -1511,8 +1506,8 @@ typedef struct _EFI_IFR_FORM_MAP_METHOD {
typedef struct _EFI_IFR_FORM_MAP {
///
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
///
EFI_IFR_OP_HEADER Header;
///
@ -1527,13 +1522,13 @@ typedef struct _EFI_IFR_FORM_MAP {
typedef struct _EFI_IFR_SET {
///
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
///
EFI_IFR_OP_HEADER Header;
///
/// Specifies the identifier of a previously declared variable store to
/// use when storing the question's value.
/// Specifies the identifier of a previously declared variable store to
/// use when storing the question's value.
///
EFI_VARSTORE_ID VarStoreId;
union {
@ -1547,20 +1542,20 @@ typedef struct _EFI_IFR_SET {
UINT16 VarOffset;
} VarStoreInfo;
///
/// Specifies the type used for storage.
/// Specifies the type used for storage.
///
UINT8 VarStoreType;
} EFI_IFR_SET;
typedef struct _EFI_IFR_GET {
///
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
/// The sequence that defines the type of opcode as well as the length
/// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
///
EFI_IFR_OP_HEADER Header;
///
/// Specifies the identifier of a previously declared variable store to
/// use when retrieving the value.
/// Specifies the identifier of a previously declared variable store to
/// use when retrieving the value.
///
EFI_VARSTORE_ID VarStoreId;
union {
@ -1574,7 +1569,7 @@ typedef struct _EFI_IFR_GET {
UINT16 VarOffset;
} VarStoreInfo;
///
/// Specifies the type used for storage.
/// Specifies the type used for storage.
///
UINT8 VarStoreType;
} EFI_IFR_GET;
@ -1598,9 +1593,9 @@ typedef struct _EFI_IFR_MAP {
///
/// Each enumeration values maps a physical key on a keyboard.
///
typedef enum {
typedef enum {
EfiKeyLCtrl,
EfiKeyA0,
EfiKeyA0,
EfiKeyLAlt,
EfiKeySpaceBar,
EfiKeyA2,
@ -1728,8 +1723,8 @@ typedef struct {
///
CHAR16 ShiftedAltGrUnicode;
///
/// Modifier keys are defined to allow for special functionality that is not necessarily
/// accomplished by a printable character. Many of these modifier keys are flags to toggle
/// Modifier keys are defined to allow for special functionality that is not necessarily
/// accomplished by a printable character. Many of these modifier keys are flags to toggle
/// certain state bits on and off inside of a keyboard driver.
///
UINT16 Modifier;
@ -1737,7 +1732,7 @@ typedef struct {
} EFI_KEY_DESCRIPTOR;
///
/// A key which is affected by all the standard shift modifiers.
/// A key which is affected by all the standard shift modifiers.
/// Most keys would be expected to have this bit active.
///
#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
@ -1830,7 +1825,7 @@ typedef struct {
///
typedef struct _EFI_IFR_ANIMATION {
///
/// Standard opcode header, where Header.OpCode is
/// Standard opcode header, where Header.OpCode is
/// EFI_IFR_ANIMATION_OP.
///
EFI_IFR_OP_HEADER Header;
@ -1849,7 +1844,7 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
///
EFI_HII_PACKAGE_HEADER Header;
///
/// Offset, relative to this header, of the animation information. If
/// Offset, relative to this header, of the animation information. If
/// this is zero, then there are no animation sequences in the package.
///
UINT32 AnimationInfoOffset;
@ -1933,23 +1928,23 @@ typedef struct _EFI_HII_AIBT_EXT4_BLOCK {
typedef struct _EFI_HII_ANIMATION_CELL {
///
/// The X offset from the upper left hand corner of the logical
/// The X offset from the upper left hand corner of the logical
/// window to position the indexed image.
///
UINT16 OffsetX;
///
/// The Y offset from the upper left hand corner of the logical
/// The Y offset from the upper left hand corner of the logical
/// window to position the indexed image.
///
UINT16 OffsetY;
///
/// The image to display at the specified offset from the upper left
/// The image to display at the specified offset from the upper left
/// hand corner of the logical window.
///
EFI_IMAGE_ID ImageId;
///
/// The number of milliseconds to delay after displaying the indexed
/// image and before continuing on to the next linked image. If value
/// The number of milliseconds to delay after displaying the indexed
/// image and before continuing on to the next linked image. If value
/// is zero, no delay.
///
UINT16 Delay;
@ -1961,11 +1956,11 @@ typedef struct _EFI_HII_ANIMATION_CELL {
///
typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
///
/// This is image that is to be reference by the image protocols, if the
/// animation function is not supported or disabled. This image can
/// be one particular image from the animation sequence (if any one
/// of the animation frames has a complete image) or an alternate
/// image that can be displayed alone. If the value is zero, no image
/// This is image that is to be reference by the image protocols, if the
/// animation function is not supported or disabled. This image can
/// be one particular image from the animation sequence (if any one
/// of the animation frames has a complete image) or an alternate
/// image that can be displayed alone. If the value is zero, no image
/// is displayed.
///
EFI_IMAGE_ID DftImageId;
@ -1978,7 +1973,7 @@ typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
///
UINT16 Height;
///
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// animation sequence.
///
UINT16 CellCount;
@ -1990,16 +1985,16 @@ typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
///
/// An animation block to describe an animation sequence that does not cycle,
/// and where the logical window is cleared to the specified color before
/// and where the logical window is cleared to the specified color before
/// the next image is displayed.
///
typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
///
/// This is image that is to be reference by the image protocols, if the
/// animation function is not supported or disabled. This image can
/// be one particular image from the animation sequence (if any one
/// of the animation frames has a complete image) or an alternate
/// image that can be displayed alone. If the value is zero, no image
/// This is image that is to be reference by the image protocols, if the
/// animation function is not supported or disabled. This image can
/// be one particular image from the animation sequence (if any one
/// of the animation frames has a complete image) or an alternate
/// image that can be displayed alone. If the value is zero, no image
/// is displayed.
///
EFI_IMAGE_ID DftImageId;
@ -2012,12 +2007,12 @@ typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
///
UINT16 Height;
///
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// animation sequence.
///
UINT16 CellCount;
///
/// The color to clear the logical window to before displaying the
/// The color to clear the logical window to before displaying the
/// indexed image.
///
EFI_HII_RGB_PIXEL BackgndColor;
@ -2029,16 +2024,16 @@ typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
///
/// An animation block to describe an animation sequence that does not cycle,
/// and where the screen is restored to the original state before the next
/// and where the screen is restored to the original state before the next
/// image is displayed.
///
typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
///
/// This is image that is to be reference by the image protocols, if the
/// animation function is not supported or disabled. This image can
/// be one particular image from the animation sequence (if any one
/// of the animation frames has a complete image) or an alternate
/// image that can be displayed alone. If the value is zero, no image
/// This is image that is to be reference by the image protocols, if the
/// animation function is not supported or disabled. This image can
/// be one particular image from the animation sequence (if any one
/// of the animation frames has a complete image) or an alternate
/// image that can be displayed alone. If the value is zero, no image
/// is displayed.
///
EFI_IMAGE_ID DftImageId;
@ -2051,7 +2046,7 @@ typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
///
UINT16 Height;
///
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// The number of EFI_HII_ANIMATION_CELL contained in the
/// animation sequence.
///
UINT16 CellCount;
@ -2069,14 +2064,14 @@ typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOC
///
/// An animation block to describe an animation sequence that continuously cycles,
/// and where the logical window is cleared to the specified color before
/// and where the logical window is cleared to the specified color before
/// the next image is displayed.
///
typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
///
/// An animation block to describe an animation sequence that continuously cycles,
/// and where the screen is restored to the original state before
/// and where the screen is restored to the original state before
/// the next image is displayed.
///
typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
@ -2086,7 +2081,7 @@ typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
///
typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {
///
/// The previously defined animation ID with the exact same
/// The previously defined animation ID with the exact same
/// animation information.
///
EFI_ANIMATION_ID AnimationId;
@ -2121,7 +2116,7 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
/// token usages.
///
///
/// STRING_TOKEN is not defined in UEFI specification. But it is placed
/// STRING_TOKEN is not defined in UEFI specification. But it is placed
/// here for the easy access by C files and VFR source files.
///
#define STRING_TOKEN(t) t

View File

@ -1,20 +1,36 @@
/** @file
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __UEFI_MULTIPHASE_H__
#define __UEFI_MULTIPHASE_H__
///
/// Attributes of variable.
///
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
///
/// This attribute is identified by the mnemonic 'HR'
/// elsewhere in this specification.
///
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
///
/// Attributes of Authenticated Variable
///
#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
#define EFI_VARIABLE_APPEND_WRITE 0x00000040
///
/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved.
///
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
#ifndef VFRCOMPILE
#include <Guid/WinCertificate.h>
///
/// Enumeration of memory types introduced in UEFI.
@ -83,7 +99,7 @@ typedef enum {
///
EfiPalCode,
///
/// A memory region that operates as EfiConventionalMemory,
/// A memory region that operates as EfiConventionalMemory,
/// however it happens to also support byte-addressable non-volatility.
///
EfiPersistentMemory,
@ -155,25 +171,6 @@ typedef struct {
UINT32 Reserved;
} EFI_TABLE_HEADER;
///
/// Attributes of variable.
///
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
///
/// This attribute is identified by the mnemonic 'HR'
/// elsewhere in this specification.
///
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
///
/// Attributes of Authenticated Variable
///
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
#define EFI_VARIABLE_APPEND_WRITE 0x00000040
///
/// AuthInfo is a WIN_CERTIFICATE using the wCertificateType
/// WIN_CERTIFICATE_UEFI_GUID and the CertType
@ -227,5 +224,6 @@ typedef struct {
///
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
} EFI_VARIABLE_AUTHENTICATION_2;
#endif // VFRCOMPILE
#endif

View File

@ -3,14 +3,8 @@
structure prototypes, global variables and constants that
are needed for porting PXE to EFI.
Copyright (c) 2006 - 2016, 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 that 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>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
32/64-bit PXE specification:

View File

@ -1,18 +1,14 @@
/** @file
Include file that supports UEFI.
This include file must contain things defined in the UEFI 2.6 specification.
If a code construct is defined in the UEFI 2.6 specification it must be included
This include file must contain things defined in the UEFI 2.7 specification.
If a code construct is defined in the UEFI 2.7 specification it must be included
by this include file.
Copyright (c) 2006 - 2016, 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 that 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 - 2019, Intel Corporation. All rights reserved.<BR>
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -35,7 +31,7 @@ typedef enum {
///
AllocateAnyPages,
///
/// Allocate any available range of pages whose uppermost address is less than
/// Allocate any available range of pages whose uppermost address is less than
/// or equal to a specified maximum address.
///
AllocateMaxAddress,
@ -79,7 +75,7 @@ typedef enum {
#define EFI_MEMORY_XP 0x0000000000004000ULL
#define EFI_MEMORY_RO 0x0000000000020000ULL
//
// Physical memory persistence attribute.
// Physical memory persistence attribute.
// The memory region supports byte-addressable non-volatility.
//
#define EFI_MEMORY_NV 0x0000000000008000ULL
@ -88,6 +84,26 @@ typedef enum {
// If all memory has the same reliability, then this bit is not used.
//
#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL
//
// Note: UEFI spec 2.8 and following:
//
// Specific-purpose memory (SPM). The memory is earmarked for
// specific purposes such as for specific device drivers or applications.
// The SPM attribute serves as a hint to the OS to avoid allocating this
// memory for core OS data or code that can not be relocated.
//
#define EFI_MEMORY_SP 0x0000000000040000ULL
//
// If this flag is set, the memory region is capable of being
// protected with the CPU?s memory cryptographic
// capabilities. If this flag is clear, the memory region is not
// capable of being protected with the CPU?s memory
// cryptographic capabilities or the CPU does not support CPU
// memory cryptographic capabilities.
//
#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL
//
// Runtime memory attribute
//
@ -103,26 +119,33 @@ typedef enum {
///
typedef struct {
///
/// Type of the memory region. See EFI_MEMORY_TYPE.
/// Type of the memory region.
/// Type EFI_MEMORY_TYPE is defined in the
/// AllocatePages() function description.
///
UINT32 Type;
///
/// Physical address of the first byte of the memory region. Must aligned
/// on a 4 KB boundary.
/// Physical address of the first byte in the memory region. PhysicalStart must be
/// aligned on a 4 KiB boundary, and must not be above 0xfffffffffffff000. Type
/// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function description
///
EFI_PHYSICAL_ADDRESS PhysicalStart;
///
/// Virtual address of the first byte of the memory region. Must aligned
/// on a 4 KB boundary.
/// Virtual address of the first byte in the memory region.
/// VirtualStart must be aligned on a 4 KiB boundary,
/// and must not be above 0xfffffffffffff000.
///
EFI_VIRTUAL_ADDRESS VirtualStart;
///
/// Number of 4KB pages in the memory region.
/// NumberOfPagesNumber of 4 KiB pages in the memory region.
/// NumberOfPages must not be 0, and must not be any value
/// that would represent a memory page with a start address,
/// either physical or virtual, above 0xfffffffffffff000.
///
UINT64 NumberOfPages;
///
/// Attributes of the memory region that describe the bit mask of capabilities
/// for that memory region, and not necessarily the current settings for that
/// for that memory region, and not necessarily the current settings for that
/// memory region.
///
UINT64 Attribute;
@ -188,7 +211,7 @@ EFI_STATUS
On output, it is the size of the buffer returned by the firmware if
the buffer was large enough, or the size of the buffer needed to contain
the map if the buffer was too small.
@param[in, out] MemoryMap A pointer to the buffer in which firmware places the current memory
@param[out] MemoryMap A pointer to the buffer in which firmware places the current memory
map.
@param[out] MapKey A pointer to the location in which firmware returns the key for the
current memory map.
@ -209,7 +232,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_GET_MEMORY_MAP)(
IN OUT UINTN *MemoryMapSize,
IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
OUT UINTN *MapKey,
OUT UINTN *DescriptorSize,
OUT UINT32 *DescriptorVersion
@ -306,8 +329,8 @@ EFI_STATUS
@retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances
present in the system.
2) No drivers were connected to ControllerHandle.
@retval EFI_SECURITY_VIOLATION
The user has no permission to start UEFI device drivers on the device path
@retval EFI_SECURITY_VIOLATION
The user has no permission to start UEFI device drivers on the device path
associated with the ControllerHandle or specified by the RemainingDevicePath.
**/
typedef
@ -654,7 +677,8 @@ EFI_STATUS
/**
Enumerates the current variable names.
@param[in, out] VariableNameSize The size of the VariableName buffer.
@param[in, out] VariableNameSize The size of the VariableName buffer. The size must be large
enough to fit input string supplied in VariableName buffer.
@param[in, out] VariableName On input, supplies the last VariableName that was returned
by GetNextVariableName(). On output, returns the Nullterminated
string of the current variable.
@ -665,9 +689,14 @@ EFI_STATUS
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The next variable was not found.
@retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.
VariableNameSize has been updated with the size needed to complete the request.
@retval EFI_INVALID_PARAMETER VariableNameSize is NULL.
@retval EFI_INVALID_PARAMETER VariableName is NULL.
@retval EFI_INVALID_PARAMETER VendorGuid is NULL.
@retval EFI_INVALID_PARAMETER The input values of VariableName and VendorGuid are not a name and
GUID of an existing variable.
@retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of
the input VariableName buffer.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
**/
@ -688,15 +717,14 @@ EFI_STATUS
then EFI_INVALID_PARAMETER is returned.
@param[in] VendorGuid A unique identifier for the vendor.
@param[in] Attributes Attributes bitmask to set for the variable.
@param[in] 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[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE or
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero
causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
set, then a SetVariable() call with a DataSize of zero will not cause any change to
the variable value (the timestamp associated with the variable may be updated however
even if no new data value is provided,see the description of the
EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
@param[in] Data The contents for the variable.
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
@ -708,10 +736,9 @@ EFI_STATUS
@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
does NOT pass the validation check carried out by the firmware.
@retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set,
but the AuthInfo does NOT pass the validation check carried out by the firmware.
@retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
**/
@ -859,10 +886,10 @@ EFI_STATUS
@retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
understood.
@retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
@retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
@retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
image from being loaded. NULL is returned in *ImageHandle.
@retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
@retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
platform policy specifies that the image should not be started.
**/
typedef
@ -901,15 +928,15 @@ EFI_STATUS
/**
Terminates a loaded EFI image and returns control to boot services.
@param[in] ImageHandle Handle that identifies the image. This parameter is passed to the
@param[in] ImageHandle Handle that identifies the image. This parameter is passed to the
image on entry.
@param[in] ExitStatus The image's exit code.
@param[in] ExitDataSize The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS.
@param[in] ExitData The pointer to a data buffer that includes a Null-terminated string,
optionally followed by additional binary data. The string is a
description that the caller may use to further indicate the reason
for the image's exit. ExitData is only valid if ExitStatus
is something other than EFI_SUCCESS. The ExitData buffer
optionally followed by additional binary data. The string is a
description that the caller may use to further indicate the reason
for the image's exit. ExitData is only valid if ExitStatus
is something other than EFI_SUCCESS. The ExitData buffer
must be allocated by calling AllocatePool().
@retval EFI_SUCCESS The image specified by ImageHandle was unloaded.
@ -1009,10 +1036,10 @@ EFI_STATUS
EfiResetShutdown the data buffer starts with a Null-terminated
string, optionally followed by additional binary data.
The string is a description that the caller may use to further
indicate the reason for the system reset. ResetData is only
valid if ResetStatus is something other than EFI_SUCCESS
unless the ResetType is EfiResetPlatformSpecific
where a minimum amount of ResetData is always required.
indicate the reason for the system reset.
For a ResetType of EfiResetPlatformSpecific the data buffer
also starts with a Null-terminated string that is followed
by an EFI_GUID that describes the specific type of reset to perform.
**/
typedef
VOID
@ -1440,7 +1467,7 @@ typedef enum {
///
ByRegisterNotify,
///
/// Retrieve the set of handles from the handle database that support a
/// Retrieve the set of handles from the handle database that support a
/// specified protocol.
///
ByProtocol
@ -1529,7 +1556,7 @@ EFI_STATUS
@param[in] Protocol Provides the protocol to search by.
This parameter is only valid for a SearchType of ByProtocol.
@param[in] SearchKey Supplies the search key depending on the SearchType.
@param[in, out] NoHandles The number of handles returned in Buffer.
@param[out] NoHandles The number of handles returned in Buffer.
@param[out] Buffer A pointer to the buffer to return the requested array of handles that
support Protocol.
@ -1547,7 +1574,7 @@ EFI_STATUS
IN EFI_LOCATE_SEARCH_TYPE SearchType,
IN EFI_GUID *Protocol, OPTIONAL
IN VOID *SearchKey, OPTIONAL
IN OUT UINTN *NoHandles,
OUT UINTN *NoHandles,
OUT EFI_HANDLE **Buffer
);
@ -1565,6 +1592,7 @@ EFI_STATUS
@retval EFI_NOT_FOUND No protocol instances were found that match Protocol and
Registration.
@retval EFI_INVALID_PARAMETER Interface is NULL.
Protocol is NULL.
**/
typedef
@ -1668,10 +1696,10 @@ typedef struct {
@retval EFI_INVALID_PARAMETER CapsuleCount is 0.
@retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.
@retval EFI_UNSUPPORTED The capsule type is not supported on this platform.
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
is compatible with this platform but is not capable of being submitted or processed
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
is compatible with this platform but is not capable of being submitted or processed
in runtime. The caller may resubmit the capsule prior to ExitBootServices().
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
the capsule is compatible with this platform but there are insufficient resources to process.
**/
@ -1699,10 +1727,10 @@ EFI_STATUS
@retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and
MaximumCapsuleSize and ResetType are undefined.
@retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
is compatible with this platform but is not capable of being submitted or processed
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule
is compatible with this platform but is not capable of being submitted or processed
in runtime. The caller may resubmit the capsule prior to ExitBootServices().
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
@retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates
the capsule is compatible with this platform but there are insufficient resources to process.
**/
@ -1755,11 +1783,14 @@ EFI_STATUS
#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED 0x0000000000000008
#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED 0x0000000000000010
#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY 0x0000000000000040
#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH 0x0000000000000080
//
// EFI Runtime Services Table
//
#define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80))
#define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70))
#define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60))
#define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50))
#define EFI_2_40_SYSTEM_TABLE_REVISION ((2 << 16) | (40))
@ -1770,7 +1801,7 @@ EFI_STATUS
#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00))
#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10))
#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02))
#define EFI_SYSTEM_TABLE_REVISION EFI_2_60_SYSTEM_TABLE_REVISION
#define EFI_SYSTEM_TABLE_REVISION EFI_2_70_SYSTEM_TABLE_REVISION
#define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION
#define EFI_RUNTIME_SERVICES_SIGNATURE SIGNATURE_64 ('R','U','N','T','S','E','R','V')
@ -2171,11 +2202,10 @@ typedef struct {
#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI"
#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI"
#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI"
#if defined (MDE_CPU_IA32)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
#elif defined (MDE_CPU_IPF)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA64
#elif defined (MDE_CPU_X64)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
#elif defined (MDE_CPU_EBC)
@ -2183,10 +2213,17 @@ typedef struct {
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM
#elif defined (MDE_CPU_AARCH64)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64
#elif defined (MDE_CPU_RISCV64)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64
#else
#error Unknown Processor Type
#endif
//
// The directory within the active EFI System Partition defined for delivery of capsule to firmware
//
#define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\"
#include <Uefi/UefiPxe.h>
#include <Uefi/UefiGpt.h>
#include <Uefi/UefiInternalFormRepresentation.h>

View File

@ -2,19 +2,13 @@
# This Package provides all definitions, library classes and libraries instances.
#
# It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
# EFI1.10/UEFI2.6/PI1.4 and some Industry Standards.
# EFI1.10/UEFI2.7/PI1.7 and some Industry Standards.
#
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# (C) Copyright 2016 - 2020 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 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.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
@ -24,7 +18,7 @@
PACKAGE_NAME = MdePkg
PACKAGE_UNI_FILE = MdePkg.uni
PACKAGE_GUID = 1E73767F-8F52-4603-AEB4-F29B510B6766
PACKAGE_VERSION = 1.06
PACKAGE_VERSION = 1.08
[Includes]
@ -36,9 +30,6 @@
[Includes.X64]
Include/X64
[Includes.IPF]
Include/Ipf
[Includes.EBC]
Include/Ebc
@ -48,6 +39,9 @@
[Includes.AARCH64]
Include/AArch64
[Includes.RISCV64]
Include/RiscV64
[LibraryClasses]
## @libraryclass Provides most usb APIs to support the Hid requests defined in Usb Hid 1.1 spec
# and the standard requests defined in Usb 1.1 spec.
@ -131,9 +125,17 @@
## @libraryclass Provides a service to retrieve the PE/COFF entry point from a PE/COFF image.
PeCoffGetEntryPointLib|Include/Library/PeCoffGetEntryPointLib.h
## @libraryclass Provides services to return the PCI segment information.
PciSegmentInfoLib|Include/Library/PciSegmentInfoLib.h
## @libraryclass Provides services to access PCI Configuration Space on a platform with multiple PCI segments.
PciSegmentLib|Include/Library/PciSegmentLib.h
## @libraryclass The multiple segments PCI configuration Library Services that carry out
## PCI configuration and enable the PCI operations to be replayed during an
## S3 resume. This library class maps directly on top of the PciSegmentLib class.
S3PciSegmentLib|Include/Library/S3PciSegmentLib.h
## @libraryclass Provides services to access PCI Configuration Space.
PciLib|Include/Library/PciLib.h
@ -233,6 +235,22 @@
## @libraryclass provides EFI_FILE_HANDLE services
FileHandleLib|Include/Library/FileHandleLib.h
## @libraryclass provides helper functions to prevent integer overflow during
# type conversion, addition, subtraction, and multiplication.
##
SafeIntLib|Include/Library/SafeIntLib.h
## @libraryclass Provides a service to retrieve a pointer to the Standalone MM Services Table.
# Only available to MM_STANDALONE, SMM/DXE Combined and SMM module types.
MmServicesTableLib|Include/Library/MmServicesTableLib.h
## @libraryclass Module entry point library for standalone MM drivers.
StandaloneMmDriverEntryPoint|Include/Library/StandaloneMmDriverEntryPoint.h
## @libraryclass Provides a unit test framework
#
UnitTestLib|Include/Library/UnitTestLib.h
[LibraryClasses.IA32, LibraryClasses.X64]
## @libraryclass Abstracts both S/W SMI generation and detection.
##
@ -246,6 +264,10 @@
#
SmmMemLib|Include/Library/SmmMemLib.h
## @libraryclass Provides services for Smm IO Operation.
#
SmmIoLib|Include/Library/SmmIoLib.h
## @libraryclass Provides services to enable/disable periodic SMI handlers.
#
SmmPeriodicSmiLib|Include/Library/SmmPeriodicSmiLib.h
@ -257,16 +279,6 @@
## @libraryclass Provides services to log the SMI handler registration.
SmiHandlerProfileLib|Include/Library/SmiHandlerProfileLib.h
[LibraryClasses.IPF]
## @libraryclass The SAL Library provides a service to make a SAL CALL.
SalLib|Include/Library/SalLib.h
## @libraryclass Provides library services to make PAL Calls.
PalLib|Include/Library/PalLib.h
## @libraryclass Provides library services to make Extended SAL Calls.
ExtendedSalLib|Include/Library/ExtendedSalLib.h
[Guids]
#
# GUID defined in UEFI2.1/UEFI2.0/EFI1.1
@ -319,9 +331,6 @@
## Include/Guid/Mps.h
gEfiMpsTableGuid = { 0xEB9D2D2F, 0x2D88, 0x11D3, { 0x9A, 0x16, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }}
## Include/Guid/SalSystemTable.h
gEfiSalSystemTableGuid = { 0xEB9D2D32, 0x2D88, 0x11D3, { 0x9A, 0x16, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }}
## Include/Protocol/AuthenticationInfo.h
gEfiAuthenticationChapLocalGuid = { 0xC280C73E, 0x15CA, 0x11DA, { 0xB0, 0xCA, 0x00, 0x10, 0x83, 0xFF, 0xCA, 0x4D }}
@ -427,6 +436,15 @@
## Include/Guid/Cper.h
gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }}
## Include/Guid/Cper.h
gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }}
## Include/Guid/Cper.h
gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }}
## Include/Guid/Cper.h
gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }}
## Include/Guid/Cper.h
gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }}
@ -572,9 +590,6 @@
# GUIDs defined in UEFI2.5
#
## Include/Guid/PropertiesTable.h
gEfiPropertiesTableGuid = { 0x880aaca3, 0x4adc, 0x4a04, {0x90, 0x79, 0xb7, 0x47, 0x34, 0x8, 0x25, 0xe5 }}
## Include/Guid/SystemResourceTable.h
gEfiSystemResourceTableGuid = { 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80 }}
@ -633,6 +648,28 @@
gEfiHiiImageDecoderNameJpegGuid = { 0xefefd093, 0x0d9b, 0x46eb, { 0xa8, 0x56, 0x48, 0x35, 0x07, 0x00, 0xc9, 0x08 }}
gEfiHiiImageDecoderNamePngGuid = { 0xaf060190, 0x5e3a, 0x4025, { 0xaf, 0xbd, 0xe1, 0xf9, 0x05, 0xbf, 0xaa, 0x4c }}
#
# GUIDs defined in UEFI2.7
#
## Include/Guid/Btt.h
gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }}
# GUIDs defined in UEFI2.8
#
## Include/Guid/JsonCapsule.h
gEfiJsonConfigDataTableGuid = { 0x87367f87, 0x1119, 0x41ce, { 0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }}
gEfiJsonCapsuleDataTableGuid = { 0x35e7a725, 0x8dd2, 0x4cac, { 0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }}
gEfiJsonCapsuleResultTableGuid = { 0xdbc461c3, 0xb3de, 0x422a, { 0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }}
gEfiJsonCapsuleIdGuid = { 0x67d6f4cd, 0xd6b8, 0x4573, { 0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }}
## Include/Guid/HiiPlatformSetupFormset.h
gEfiHiiResetStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
# GUIDs defined in UEFI2.8a
#
## Include/Guid/RtPropertiesTable.h
gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }}
#
# GUID defined in PI1.0
#
@ -741,12 +778,26 @@
## Include/Guid/GraphicsInfoHob.h
gEfiGraphicsDeviceInfoHobGuid = { 0xe5cb2ac9, 0xd35d, 0x4430, { 0x93, 0x6e, 0x1d, 0xe3, 0x32, 0x47, 0x8d, 0xe7 }}
## Include/Guid/SmramMemoryReserve.h
gEfiSmmSmramMemoryGuid = { 0x6dadf1d1, 0xd4cc, 0x4910, { 0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d }}
#
# GUID defined in PI1.6
#
## Include/Protocol/DiskInfo.h
gEfiDiskInfoSdMmcInterfaceGuid = { 0x8deec992, 0xd39c, 0x4a5c, { 0xab, 0x6b, 0x98, 0x6e, 0x14, 0x24, 0x2b, 0x9d }}
#
# GUID defined in Windows UEFI Firmware Update Platform doc
#
## Include/IndustryStandard/WindowsUxCapsule.h
gWindowsUxCapsuleGuid = { 0x3b8c8162, 0x188c, 0x46a4, { 0xae, 0xc9, 0xbe, 0x43, 0xf1, 0xd6, 0x56, 0x97}}
#
# GUID indicates the tiano custom compress/decompress algorithm.
#
gTianoCustomDecompressGuid = { 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 }}
[Guids.IA32, Guids.X64]
## Include/Guid/Cper.h
gEfiIa32X64ErrorTypeCacheCheckGuid = { 0xA55701F5, 0xE3EF, 0x43de, { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }}
@ -899,6 +950,29 @@
## Include/Ppi/SecPlatformInformation.h
gEfiSecPlatformInformation2PpiGuid = { 0x9e9f374b, 0x8f16, 0x4230, {0x98, 0x24, 0x58, 0x46, 0xee, 0x76, 0x6a, 0x97 } }
#
# PPIs defined in PI 1.5.
#
## Include/Ppi/SecHobData.h
gEfiSecHobDataPpiGuid = { 0x3ebdaf20, 0x6667, 0x40d8, {0xb4, 0xee, 0xf5, 0x99, 0x9a, 0xc1, 0xb7, 0x1f } }
## Include/Ppi/MmAccess.h
gEfiPeiMmAccessPpiGuid = { 0x268f33a9, 0xcccd, 0x48be, { 0x88, 0x17, 0x86, 0x5, 0x3a, 0xc3, 0x2e, 0xd6 }}
## Include/Ppi/MmControl.h
gEfiPeiMmControlPpiGuid = { 0x61c68702, 0x4d7e, 0x4f43, { 0x8d, 0xef, 0xa7, 0x43, 0x5, 0xce, 0x74, 0xc5 }}
#
# PPIs defined in PI 1.7.
#
## Include/Ppi/PeiCoreFvLocation.h
gEfiPeiCoreFvLocationPpiGuid = { 0x52888eae, 0x5b10, 0x47d0, { 0xa8, 0x7f, 0xb8, 0x22, 0xab, 0xa0, 0xca, 0xf4 }}
## Include/Ppi/DelayedDispatch.h
gEfiPeiDelayedDispatchPpiGuid = { 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }}
[Protocols]
## Include/Protocol/Pcd.h
gPcdProtocolGuid = { 0x11B34006, 0xD85B, 0x4D0A, { 0xA2, 0x90, 0xD5, 0xA5, 0x71, 0x31, 0x0E, 0xF7 }}
@ -1091,29 +1165,6 @@
## Include/Protocol/LegacyRegion2.h
gEfiLegacyRegion2ProtocolGuid = {0x70101eaf, 0x85, 0x440c, {0xb3, 0x56, 0x8e, 0xe3, 0x6f, 0xef, 0x24, 0xf0 } }
## Include/Protocol/McaInitPmi.h
gEfiSalMcaInitPmiProtocolGuid = { 0xb60dc6e8, 0x3b6f, 0x11d5, {0xaf, 0x9, 0x0, 0xa0, 0xc9, 0x44, 0xa0, 0x5b } }
## Include/Protocol/ExtendedSalBootService.h
gEfiExtendedSalBootServiceProtocolGuid = { 0xde0ee9a4, 0x3c7a, 0x44f2, {0xb7, 0x8b, 0xe3, 0xcc, 0xd6, 0x9c, 0x3a, 0xf7 } }
## Include/Protocol/ExtendedSalServiceClasses.h
gEfiExtendedSalBaseIoServicesProtocolGuid = { 0x5aea42b5, 0x31e1, 0x4515, {0xbc, 0x31, 0xb8, 0xd5, 0x25, 0x75, 0x65, 0xa6 } }
gEfiExtendedSalStallServicesProtocolGuid = { 0x53a58d06, 0xac27, 0x4d8c, {0xb5, 0xe9, 0xf0, 0x8a, 0x80, 0x65, 0x41, 0x70 } }
gEfiExtendedSalRtcServicesProtocolGuid = { 0x7e97a470, 0xefdb, 0x4d02, {0x8f, 0xce, 0x61, 0x90, 0xd2, 0x7b, 0xa2, 0x96 } }
gEfiExtendedSalVariableServicesProtocolGuid = { 0x4ecb6c53, 0xc641, 0x4370, {0x8c, 0xb2, 0x3b, 0x0e, 0x49, 0x6e, 0x83, 0x78 } }
gEfiExtendedSalMtcServicesProtocolGuid = { 0x899afd18, 0x75e8, 0x408b, {0xa4, 0x1a, 0x6e, 0x2e, 0x7e, 0xcd, 0xf4, 0x54 } }
gEfiExtendedSalResetServicesProtocolGuid = { 0x7d019990, 0x8ce1, 0x46f5, {0xa7, 0x76, 0x3c, 0x51, 0x98, 0x67, 0x6a, 0xa0 } }
gEfiExtendedSalStatusCodeServicesProtocolGuid = { 0xdbd91d, 0x55e9, 0x420f, {0x96, 0x39, 0x5e, 0x9f, 0x84, 0x37, 0xb4, 0x4f } }
gEfiExtendedSalFvBlockServicesProtocolGuid = { 0xa2271df1, 0xbcbb, 0x4f1d, {0x98, 0xa9, 0x06, 0xbc, 0x17, 0x2f, 0x07, 0x1a } }
gEfiExtendedSalMpServicesProtocolGuid = { 0x697d81a2, 0xcf18, 0x4dc0, {0x9e, 0x0d, 0x06, 0x11, 0x3b, 0x61, 0x8a, 0x3f } }
gEfiExtendedSalPalServicesProtocolGuid = { 0xe1cd9d21, 0x0fc2, 0x438d, {0x97, 0x03, 0x04, 0xe6, 0x6d, 0x96, 0x1e, 0x57 } }
gEfiExtendedSalBaseServicesProtocolGuid = { 0xd9e9fa06, 0x0fe0, 0x41c3, {0x96, 0xfb, 0x83, 0x42, 0x5a, 0x33, 0x94, 0xf8 } }
gEfiExtendedSalMcaServicesProtocolGuid = { 0x2a591128, 0x6cc7, 0x42b1, {0x8a, 0xf0, 0x58, 0x93, 0x3b, 0x68, 0x2d, 0xbb } }
gEfiExtendedSalPciServicesProtocolGuid = { 0xa46b1a31, 0xad66, 0x4905, {0x92, 0xf6, 0x2b, 0x46, 0x59, 0xdc, 0x30, 0x63 } }
gEfiExtendedSalCacheServicesProtocolGuid = { 0xedc9494, 0x2743, 0x4ba5, { 0x88, 0x18, 0x0a, 0xef, 0x52, 0x13, 0xf1, 0x88 } }
gEfiExtendedSalMcaLogServicesProtocolGuid = { 0xcb3fd86e, 0x38a3, 0x4c03, {0x9a, 0x5c, 0x90, 0xcf, 0xa3, 0xa2, 0xab, 0x7a } }
#
# Protocols defined in PI 1.2.1
#
@ -1153,6 +1204,117 @@
## Include/Protocol/I2cBusConfigurationManagement.h
gEfiI2cBusConfigurationManagementProtocolGuid = { 0x55b71fb5, 0x17c6, 0x410e, { 0xb5, 0xbd, 0x5f, 0xa2, 0xe3, 0xd4, 0x46, 0x6b }}
#
# Protocols defined in PI 1.5.
#
## Include/Protocol/MmMp.h
gEfiMmMpProtocolGuid = { 0x5d5450d7, 0x990c, 0x4180, { 0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60, 0x83, 0x7 }}
## Include/Protocol/MmEndOfDxe.h
gEfiMmEndOfDxeProtocolGuid = { 0x24e70042, 0xd5c5, 0x4260, { 0x8c, 0x39, 0xa, 0xd3, 0xaa, 0x32, 0xe9, 0x3d }}
## Include/Protocol/MmIoTrapDispatch.h
gEfiMmIoTrapDispatchProtocolGuid = { 0x58dc368d, 0x7bfa, 0x4e77, {0xab, 0xbc, 0xe, 0x29, 0x41, 0x8d, 0xf9, 0x30 }}
## Include/Protocol/MmPowerButtonDispatch.h
gEfiMmPowerButtonDispatchProtocolGuid = { 0x1b1183fa, 0x1823, 0x46a7, {0x88, 0x72, 0x9c, 0x57, 0x87, 0x55, 0x40, 0x9d }}
## Include/Protocol/MmStandbyButtonDispatch.h
gEfiMmStandbyButtonDispatchProtocolGuid = { 0x7300c4a1, 0x43f2, 0x4017, {0xa5, 0x1b, 0xc8, 0x1a, 0x7f, 0x40, 0x58, 0x5b }}
## Include/Protocol/MmGpiDispatch.h
gEfiMmGpiDispatchProtocolGuid = { 0x25566b03, 0xb577, 0x4cbf, {0x95, 0x8c, 0xed, 0x66, 0x3e, 0xa2, 0x43, 0x80 }}
## Include/Protocol/MmUsbDispatch.h
gEfiMmUsbDispatchProtocolGuid = { 0xee9b8d90, 0xc5a6, 0x40a2, {0xbd, 0xe2, 0x52, 0x55, 0x8d, 0x33, 0xcc, 0xa1 }}
## Include/Protocol/MmPeriodicTimerDispatch.h
gEfiMmPeriodicTimerDispatchProtocolGuid = { 0x4cec368e, 0x8e8e, 0x4d71, {0x8b, 0xe1, 0x95, 0x8c, 0x45, 0xfc, 0x8a, 0x53 }}
## Include/Protocol/MmSxDispatch.h
gEfiMmSxDispatchProtocolGuid = { 0x456d2859, 0xa84b, 0x4e47, {0xa2, 0xee, 0x32, 0x76, 0xd8, 0x86, 0x99, 0x7d }}
## Include/Protocol/MmSwDispatch.h
gEfiMmSwDispatchProtocolGuid = { 0x18a3c6dc, 0x5eea, 0x48c8, {0xa1, 0xc1, 0xb5, 0x33, 0x89, 0xf9, 0x89, 0x99 }}
## Include/Protocol/MmPciRootBridgeIo.h
gEfiMmPciRootBridgeIoProtocolGuid = { 0x8bc1714d, 0xffcb, 0x41c3, { 0x89, 0xdc, 0x6c, 0x74, 0xd0, 0x6d, 0x98, 0xea }}
## Include/Protocol/MmCpu.h
gEfiMmCpuProtocolGuid = { 0xeb346b97, 0x975f, 0x4a9f, { 0x8b, 0x22, 0xf8, 0xe9, 0x2b, 0xb3, 0xd5, 0x69 }}
## Include/Protocol/MmStatusCode.h
gEfiMmStatusCodeProtocolGuid = { 0x6afd2b77, 0x98c1, 0x4acd, { 0xa6, 0xf9, 0x8a, 0x94, 0x39, 0xde, 0xf, 0xb1}}
## Include/Protocol/DxeMmReadyToLock.h
gEfiDxeMmReadyToLockProtocolGuid = { 0x60ff8964, 0xe906, 0x41d0, { 0xaf, 0xed, 0xf2, 0x41, 0xe9, 0x74, 0xe0, 0x8e }}
## Include/Protocol/MmConfiguration.h
gEfiMmConfigurationProtocolGuid= { 0x26eeb3de, 0xb689, 0x492e, { 0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 }}
## Include/Protocol/MmReadyToLock.h
gEfiMmReadyToLockProtocolGuid = { 0x47b7fa8c, 0xf4bd, 0x4af6, { 0x82, 0x00, 0x33, 0x30, 0x86, 0xf0, 0xd2, 0xc8 }}
## Include/Protocol/MmControl.h
gEfiMmControlProtocolGuid = { 0x843dc720, 0xab1e, 0x42cb, { 0x93, 0x57, 0x8a, 0x0, 0x78, 0xf3, 0x56, 0x1b}}
## Include/Protocol/MmAccess.h
gEfiMmAccessProtocolGuid = { 0xc2702b74, 0x800c, 0x4131, { 0x87, 0x46, 0x8f, 0xb5, 0xb8, 0x9c, 0xe4, 0xac }}
## Include/Protocol/MmBase.h
gEfiMmBaseProtocolGuid = { 0xf4ccbfb7, 0xf6e0, 0x47fd, { 0x9d, 0xd4, 0x10, 0xa8, 0xf1, 0x50, 0xc1, 0x91 }}
## Include/Protocol/MmCpuIo.h
gEfiMmCpuIoProtocolGuid = { 0x3242a9d8, 0xce70, 0x4aa0, { 0x95, 0x5d, 0x5e, 0x7b, 0x14, 0x0d, 0xe4, 0xd2 }}
## Include/Protocol/MmReportStatusCodeHandler.h
gEfiMmRscHandlerProtocolGuid = { 0x2ff29fa7, 0x5e80, 0x4ed9, { 0xb3, 0x80, 0x1, 0x7d, 0x3c, 0x55, 0x4f, 0xf4 }}
## Include/Protocol/MmCommunication.h
gEfiMmCommunicationProtocolGuid = { 0xc68ed8e2, 0x9dc6, 0x4cbd, { 0x9d, 0x94, 0xdb, 0x65, 0xac, 0xc5, 0xc3, 0x32 }}
#
# Protocols defined in PI 1.6.
#
## Include/Protocol/LegacySpiController.h
gEfiLegacySpiControllerProtocolGuid = { 0x39136fc7, 0x1a11, 0x49de, { 0xbf, 0x35, 0x0e, 0x78, 0xdd, 0xb5, 0x24, 0xfc }}
## Include/Protocol/LegacySpiFlash.h
gEfiLegacySpiFlashProtocolGuid = { 0xf01bed57, 0x04bc, 0x4f3f, { 0x96, 0x60, 0xd6, 0xf2, 0xea, 0x22, 0x82, 0x59 }}
## Include/Protocol/LegacySpiSmmController.h
gEfiLegacySpiSmmControllerProtocolGuid = { 0x62331b78, 0xd8d0, 0x4c8c, { 0x8c, 0xcb, 0xd2, 0x7d, 0xfe, 0x32, 0xdb, 0x9b }}
## Include/Protocol/LegacySpiSmmFlash.h
gEfiLegacySpiSmmFlashProtocolGuid = { 0x5e3848d4, 0x0db5, 0x4fc0, { 0x97, 0x29, 0x3f, 0x35, 0x3d, 0x4f, 0x87, 0x9f }}
## Include/Protocol/SpiConfiguration.h
gEfiSpiConfigurationProtocolGuid = { 0x85a6d3e6, 0xb65b, 0x4afc, { 0xb3, 0x8f, 0xc6, 0xd5, 0x4a, 0xf6, 0xdd, 0xc8 }}
## Include/Protocol/SpiHc.h
gEfiSpiHcProtocolGuid = { 0xc74e5db2, 0xfa96, 0x4ae2, { 0xb3, 0x99, 0x15, 0x97, 0x7f, 0xe3, 0x0, 0x2d }}
## Include/Protocol/SpiNorFlash.h
gEfiSpiNorFlashProtocolGuid = { 0xb57ec3fe, 0xf833, 0x4ba6, { 0x85, 0x78, 0x2a, 0x7d, 0x6a, 0x87, 0x44, 0x4b }}
## Include/Protocol/SpiSmmConfiguration.h
gEfiSpiSmmConfigurationProtocolGuid = { 0x995c6eca, 0x171b, 0x45fd, { 0xa3, 0xaa, 0xfd, 0x4c, 0x9c, 0x9d, 0xef, 0x59 }}
## Include/Protocol/SpiSmmHc.h
gEfiSpiSmmHcProtocolGuid = { 0xe9f02217, 0x2093, 0x4470, { 0x8a, 0x54, 0x5c, 0x2c, 0xff, 0xe7, 0x3e, 0xcb }}
## Include/Protocol/SpiSmmNorFlash.h
gEfiSpiSmmNorFlashProtocolGuid = { 0xaab18f19, 0xfe14, 0x4666, { 0x86, 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a }}
#
# Protocols defined in PI 1.7.
#
## Include/Protocol/MmCommunication2.h
gEfiMmCommunication2ProtocolGuid = { 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }}
#
# Protocols defined in UEFI2.1/UEFI2.0/EFI1.1
#
@ -1617,7 +1779,7 @@
## Include/Protocol/Tls.h
gEfiTlsProtocolGuid = { 0xca959f, 0x6cfa, 0x4db1, {0x95, 0xbc, 0xe4, 0x6c, 0x47, 0x51, 0x43, 0x90 }}
## Include/Protocol/TlsConfig.h
gEfiTlsConfigurationProtocolGuid = { 0x1682fe44, 0xbd7a, 0x4407, { 0xb7, 0xc7, 0xdc, 0xa3, 0x7c, 0xa3, 0x92, 0x2d }}
@ -1638,14 +1800,6 @@
gEfiRamDiskProtocolGuid = { 0xab38a0df, 0x6873, 0x44a9, { 0x87, 0xe6, 0xd4, 0xeb, 0x56, 0x14, 0x84, 0x49 }}
## Include/Protocol/ImageDecoder.h
##
## In UEFI 2.6 spec,this guid value is duplicate with
## EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID. Now update this guid value to
## avoid the duplicate guid issue. So its value is not consistent with
## UEFI spec definition now. We have proposed to update UEFI spec to
## use this new guid. After new spec released, we will remove this
## comments.
##
gEfiHiiImageDecoderProtocolGuid = { 0x9e66f251, 0x727c, 0x418c, { 0xbf, 0xd6, 0xc2, 0xb4, 0x25, 0x28, 0x18, 0xea }}
## Include/Protocol/HiiImageEx.h
@ -1657,6 +1811,34 @@
## Include/Protocol/EraseBlock.h
gEfiEraseBlockProtocolGuid = { 0x95a9a93e, 0xa86e, 0x4926, {0xaa, 0xef, 0x99, 0x18, 0xe7, 0x72, 0xd9, 0x87 }}
#
# Protocols defined in UEFI2.7
#
## Include/Protocol/BluetoothAttribute.h
gEfiBluetoothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x8c, 0x58, 0xd8, 0x57, 0x78, 0x13, 0xe0, 0xac } }
gEfiBluetoothAttributeServiceBindingProtocolGuid = { 0x5639867a, 0x8c8e, 0x408d, {0xac, 0x2f, 0x4b, 0x61, 0xbd, 0xc0, 0xbb, 0xbb }}
## Include/Protocol/BluetoothLeConfig.h
gEfiBluetoothLeConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 } }
## Include/Protocol/UfsDeviceConfig.h
gEfiUfsDeviceConfigProtocolGuid = { 0xb81bfab0, 0xeb3, 0x4cf9, { 0x84, 0x65, 0x7f, 0xa9, 0x86, 0x36, 0x16, 0x64 }}
## Include/Protocol/HttpBootCallback.h
gEfiHttpBootCallbackProtocolGuid = {0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99}}
## Include/Protocol/ResetNotification.h
gEfiResetNotificationProtocolGuid = { 0x9da34ae0, 0xeaf9, 0x4bbf, { 0x8e, 0xc3, 0xfd, 0x60, 0x22, 0x6c, 0x44, 0xbe } }
## Include/Protocol/PartitionInfo.h
gEfiPartitionInfoProtocolGuid = { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }}
## Include/Protocol/HiiPopup.h
gEfiHiiPopupProtocolGuid = { 0x4311edc0, 0x6054, 0x46d4, { 0x9e, 0x40, 0x89, 0x3e, 0xa9, 0x52, 0xfc, 0xcc }}
## Include/Protocol/NvdimmLabel.h
gEfiNvdimmLabelProtocolGuid = { 0xd40b6b80, 0x97d5, 0x4282, { 0xbb, 0x1d, 0x22, 0x3a, 0x16, 0x91, 0x80, 0x58 }}
#
# Protocols defined in Shell2.0
#
@ -1929,6 +2111,22 @@
# @Prompt Fixed Debug Message Print Level.
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016
## Indicates the control flow enforcement enabling state.
# If enabled, it uses control flow enforcement technology to prevent ROP or JOP.<BR><BR>
# BIT0 - SMM CET Shadow Stack is enabled.<BR>
# Other - reserved
# @Prompt Enable control flow enforcement.
gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask|0x0|UINT32|0x30001017
## Indicates the type of instruction sequence to use for a speculation
# barrier. The default instruction sequence is LFENCE.<BR><BR>
# 0x00 - No operation.<BR>
# 0x01 - LFENCE (IA32/X64).<BR>
# 0x02 - CPUID (IA32/X64).<BR>
# Other - reserved
# @Prompt Speculation Barrier Type.
gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType|0x01|UINT8|0x30001018
[PcdsFixedAtBuild,PcdsPatchableInModule]
## Indicates the maximum length of unicode string used in the following
# BaseLib functions: StrLen(), StrSize(), StrCmp(), StrnCmp(), StrCpy(), StrnCpy()<BR><BR>
@ -2012,8 +2210,15 @@
## The mask is used to control PerformanceLib behavior.<BR><BR>
# BIT0 - Enable Performance Measurement.<BR>
# BIT1 - Disable Start Image Logging.<BR>
# BIT2 - Disable Load Image logging.<BR>
# BIT3 - Disable Binding Support logging.<BR>
# BIT4 - Disable Binding Start logging.<BR>
# BIT5 - Disable Binding Stop logging.<BR>
# BIT6 - Disable all other general Perfs.<BR>
# BIT1-BIT6 are evaluated when BIT0 is set.<BR>
# @Prompt Performance Measurement Property.
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask & 0xFE) == 0
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask & 0x80) == 0
gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0|UINT8|0x00000009
## The mask is used to control PostCodeLib behavior.<BR><BR>
@ -2055,11 +2260,6 @@
# @Prompt Memory Address of GuidedExtractHandler Table.
gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x1000000|UINT64|0x30001015
[PcdsFixedAtBuild.IPF, PcdsPatchableInModule.IPF]
## The base address of IO port space for IA64 arch.
# @Prompt IA64 IO Port Space Base Address.
gEfiMdePkgTokenSpaceGuid.PcdIoBlockBaseAddressForIpf|0x0ffffc000000|UINT64|0x0000000f
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
## This value is used to set the base address of PCI express hierarchy.
# @Prompt PCI Express Base Address.