BaseTools: Clean up source files

1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Liming Gao
2018-07-05 17:40:04 +08:00
parent 39456d00f3
commit f7496d7173
289 changed files with 10647 additions and 10647 deletions

View File

@@ -1,16 +1,16 @@
/** @file
Processor or Compiler specific defines for all supported processors.
This file is stand alone self consistent set of definitions.
This file is stand alone self consistent set of definitions.
Copyright (c) 2006 - 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
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -49,7 +49,7 @@
//
#ifndef TRUE
//
// BugBug: UEFI specification claims 1 and 0. We are concerned about the
// BugBug: UEFI specification claims 1 and 0. We are concerned about the
// complier portability so we did it this way.
//
#define TRUE ((BOOLEAN)(1==1))
@@ -65,7 +65,7 @@
//
// Support for variable length argument lists using the ANSI standard.
//
//
// Since we are using the ANSI standard we used the standard naming and
// did not follow the coding convention
//
@@ -151,7 +151,7 @@ typedef struct {
} IPv6_ADDRESS;
//
// Macro that returns the byte offset of a field in a data structure.
// Macro that returns the byte offset of a field in a data structure.
//
#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
@@ -177,8 +177,8 @@ typedef struct {
(Value) = (UINTN)((UINTN) (Value) + (UINTN) (Adjustment))
//
// Return the maximum of two operands.
// This macro returns the maximum of two operand specified by a and b.
// Return the maximum of two operands.
// This macro returns the maximum of two operand specified by a and b.
// Both a and b must be the same numerical types, signed or unsigned.
//
#define MAX(a, b) \
@@ -186,8 +186,8 @@ typedef struct {
//
// Return the minimum of two operands.
// This macro returns the minimal of two operand specified by a and b.
// Return the minimum of two operands.
// This macro returns the minimal of two operand specified by a and b.
// Both a and b must be the same numerical types, signed or unsigned.
//
#define MIN(a, b) \

View File

@@ -1,7 +1,7 @@
/** @file
This file is for build version number auto generation
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#define __BUILD_VERSION ""
#define __BUILD_VERSION "Developer Build based on Revision: Unknown"

View File

@@ -1,10 +1,10 @@
/** @file
The firmware file related definitions in PI.
@par Revision Reference:
Version 1.4.
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -22,7 +22,7 @@
#pragma pack(1)
//
// Used to verify the integrity of the file.
//
//
typedef union {
struct {
UINT8 Header;
@@ -37,7 +37,7 @@ typedef UINT8 EFI_FFS_FILE_STATE;
//
// File Types Definitions
//
//
#define EFI_FV_FILETYPE_ALL 0x00
#define EFI_FV_FILETYPE_RAW 0x01
#define EFI_FV_FILETYPE_FREEFORM 0x02
@@ -61,9 +61,9 @@ typedef UINT8 EFI_FFS_FILE_STATE;
#define EFI_FV_FILETYPE_FFS_MIN 0xf0
#define EFI_FV_FILETYPE_FFS_MAX 0xff
#define EFI_FV_FILETYPE_FFS_PAD 0xf0
//
//
// FFS File Attributes.
//
//
#define FFS_ATTRIB_LARGE_FILE 0x01
#define FFS_ATTRIB_DATA_ALIGNMENT2 0x02
#define FFS_ATTRIB_FIXED 0x04
@@ -75,9 +75,9 @@ typedef UINT8 EFI_FFS_FILE_STATE;
//
#define FFS_FIXED_CHECKSUM 0xAA
//
//
// FFS File State Bits.
//
//
#define EFI_FILE_HEADER_CONSTRUCTION 0x01
#define EFI_FILE_HEADER_VALID 0x02
#define EFI_FILE_DATA_VALID 0x04
@@ -94,9 +94,9 @@ typedef UINT8 EFI_FFS_FILE_STATE;
)
//
// Each file begins with the header that describe the
// Each file begins with the header that describe the
// contents and state of the files.
//
//
typedef struct {
EFI_GUID Name;
EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
@@ -164,21 +164,21 @@ typedef struct {
#define MAX_SECTION_SIZE 0x1000000
//
// Leaf section type that contains an
// Leaf section type that contains an
// IA-32 16-bit executable image.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_COMPATIBILITY16_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_COMPATIBILITY16_SECTION2;
//
// CompressionType of EFI_COMPRESSION_SECTION.
//
//
#define EFI_NOT_COMPRESSED 0x00
#define EFI_STANDARD_COMPRESSION 0x01
//
// An encapsulation section type in which the
// An encapsulation section type in which the
// section data is compressed.
//
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
UINT32 UncompressedLength;
@@ -193,19 +193,19 @@ typedef struct {
//
// Leaf section which could be used to determine the dispatch order of DXEs.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2;
//
// Leaf section witch contains a PI FV.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2;
//
// Leaf section which contains a single GUID.
//
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_GUID SubTypeGuid;
@@ -218,12 +218,12 @@ typedef struct {
//
// Attributes of EFI_GUID_DEFINED_SECTION
//
//
#define EFI_GUIDED_SECTION_PROCESSING_REQUIRED 0x01
#define EFI_GUIDED_SECTION_AUTH_STATUS_VALID 0x02
//
// Leaf section which is encapsulation defined by specific GUID
//
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_GUID SectionDefinitionGuid;
@@ -240,44 +240,44 @@ typedef struct {
//
// Leaf section which contains PE32+ image.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_PE32_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2;
//
// Leaf section which contains PIC image.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_PIC_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2;
//
// Leaf section which used to determine the dispatch order of PEIMs.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_PEI_DEPEX_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2;
//
// Leaf section which constains the position-independent-code image.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_TE_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2;
//
// Leaf section which contains an array of zero or more bytes.
//
//
typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION;
typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2;
//
// Leaf section which contains a unicode string that
// Leaf section which contains a unicode string that
// is human readable file name.
//
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
//
// Array of unicode string.
//
//
CHAR16 FileNameString[1];
} EFI_USER_INTERFACE_SECTION;
@@ -286,14 +286,14 @@ typedef struct {
//
// Array of unicode string.
//
//
CHAR16 FileNameString[1];
} EFI_USER_INTERFACE_SECTION2;
//
// Leaf section which contains a numeric build number and
// an optional unicode string that represent the file revision.
//
// an optional unicode string that represent the file revision.
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
UINT16 BuildNumber;

View File

@@ -4,7 +4,7 @@
@par Revision Reference:
Version 1.2C
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -26,16 +26,16 @@ typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
//
// Value of EFI_FV_FILE_ATTRIBUTES.
//
//
#define EFI_FV_FILE_ATTRIB_ALIGNMENT 0x0000001F
#define EFI_FV_FILE_ATTRIB_FIXED 0x00000100
#define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200
typedef UINT32 EFI_FVB_ATTRIBUTES_2;
//
//
// Attributes bit definitions
//
//
#define EFI_FVB2_READ_DISABLED_CAP 0x00000001
#define EFI_FVB2_READ_ENABLED_CAP 0x00000002
#define EFI_FVB2_READ_STATUS 0x00000004
@@ -118,7 +118,7 @@ typedef struct {
//
// Extension header pointed by ExtHeaderOffset of volume header.
//
//
typedef struct {
EFI_GUID FvName;
UINT32 ExtHeaderSize;
@@ -135,9 +135,9 @@ typedef struct {
UINT32 TypeMask;
//
// Array of GUIDs.
// Array of GUIDs.
// Each GUID represents an OEM file type.
//
//
// EFI_GUID Types[1];
//
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;

View File

@@ -1,7 +1,7 @@
/** @file
Defines data types and constants introduced in UEFI.
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -20,7 +20,7 @@
//
// Basical data type definitions introduced in UEFI.
//
//
typedef struct {
UINT32 Data1;
UINT16 Data2;
@@ -94,41 +94,41 @@ 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_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
@@ -136,7 +136,7 @@ typedef union {
//
// Define macro to encode the status code.
//
//
#define EFIERR(_a) ENCODE_ERROR(_a)
#define EFI_ERROR(A) RETURN_ERROR(A)

View File

@@ -3,7 +3,7 @@
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 - 2015, 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
@@ -55,27 +55,27 @@ typedef struct {
} EFI_HII_PACKAGE_LIST_HEADER;
/**
Each package starts with a header, as defined above, which
indicates the size and type of the package. When added to a
pointer pointing to the start of the header, Length points at
the next package. The package lists form a package list when
concatenated together and terminated with an
EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
packages, whose contents are determined by the Guid. The range
of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
firmware implementers.
Each package starts with a header, as defined above, which
indicates the size and type of the package. When added to a
pointer pointing to the start of the header, Length points at
the next package. The package lists form a package list when
concatenated together and terminated with an
EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
packages, whose contents are determined by the Guid. The range
of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
firmware implementers.
@param Length The size of the package in bytes.
@param Type The package type. See EFI_HII_PACKAGE_TYPE_x,
below.
@param Data The package data, the format of which is
determined by Type.
**/
typedef struct {
UINT32 Length:24;
@@ -85,7 +85,7 @@ typedef struct {
//
// EFI_HII_PACKAGE_TYPE_x.
//
//
#define EFI_HII_PACKAGE_TYPE_ALL 0x00
#define EFI_HII_PACKAGE_TYPE_GUID 0x01
#define EFI_HII_PACKAGE_FORM 0x02
@@ -222,7 +222,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]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
} EFI_HII_GIBT_GLYPHS_BLOCK;
@@ -1360,12 +1360,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;
@@ -1373,8 +1373,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;
///
@@ -1389,13 +1389,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 {
@@ -1409,20 +1409,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 {
@@ -1436,7 +1436,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;
@@ -1456,9 +1456,9 @@ typedef struct _EFI_IFR_MAP {
// Keyboard Package
//
typedef enum {
typedef enum {
EfiKeyLCtrl,
EfiKeyA0,
EfiKeyA0,
EfiKeyLAlt,
EfiKeySpaceBar,
EfiKeyA2,
@@ -1575,7 +1575,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
@@ -1677,7 +1677,7 @@ typedef struct {
// 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,5 +1,5 @@
/** @file
This includes some definitions introduced in UEFI that will be used in both PEI
This includes some definitions introduced in UEFI that will be used in both PEI
and DXE phases.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
@@ -20,7 +20,7 @@
//
// Enumeration of memory types introduced in UEFI.
//
//
typedef enum {
EfiReservedMemoryType,
EfiLoaderCode,
@@ -43,7 +43,7 @@ typedef enum {
//
// Data structure that precedes all of the standard EFI table types.
//
//
typedef struct {
UINT64 Signature;
UINT32 Revision;
@@ -54,28 +54,28 @@ typedef struct {
//
// Attributes of variable.
//
//
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
//
// This attribute is identified by the mnemonic 'HR'
// This attribute is identified by the mnemonic 'HR'
// elsewhere in this specification.
//
//
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
//
// _WIN_CERTIFICATE.wCertificateType
//
//
#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0
#define WIN_CERT_TYPE_EFI_GUID 0x0EF1
/**
The WIN_CERTIFICATE structure is part of the PE/COFF
specification and has the following definition:
@@ -110,13 +110,13 @@ typedef struct _WIN_CERTIFICATE {
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
//
//
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
//
// WIN_CERTIFICATE_UEFI_GUID.CertData
//
//
typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
EFI_GUID HashType;
UINT8 PublicKey[256];
@@ -125,7 +125,7 @@ typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
/**
@param Hdr This is the standard WIN_CERTIFICATE header, where
wCertificateType is set to
WIN_CERT_TYPE_EFI_GUID.
@@ -158,26 +158,26 @@ typedef struct _WIN_CERTIFICATE_UEFI_GUID {
/**
Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital
signature.
The WIN_CERTIFICATE_UEFI_PKCS1_15 structure is derived from
WIN_CERTIFICATE and encapsulate the information needed to
implement the RSASSA-PKCS1-v1_5 digital signature algorithm as
specified in RFC2437.
WIN_CERTIFICATE and encapsulate the information needed to
implement the RSASSA-PKCS1-v1_5 digital signature algorithm as
specified in RFC2437.
@param Hdr This is the standard WIN_CERTIFICATE header, where
wCertificateType is set to
WIN_CERT_TYPE_UEFI_PKCS1_15.
@param HashAlgorithm This is the hashing algorithm which was
performed on the UEFI executable when
creating the digital signature. It is
one of the enumerated values pre-defined
in Section 26.4.1. See
EFI_HASH_ALGORITHM_x.
@param Signature This is the actual digital signature. The
size of the signature is the same size as
the key (1024-bit key is 128 bytes) and can
@@ -195,7 +195,7 @@ typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
/**
AuthInfo is a WIN_CERTIFICATE using the wCertificateType
WIN_CERTIFICATE_UEFI_GUID and the CertType
EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies
@@ -209,12 +209,12 @@ typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
WIN_CERTIFICATE shall be used to describe the signature of the
Variable data *Data. In addition, the signature will also
include the MonotonicCount value to guard against replay attacks
@param MonotonicCount Included in the signature of
AuthInfo.Used to ensure freshness/no
replay. Incremented during each
"Write" access.
@param AuthInfo Provides the authorization for the variable
access. It is a signature across the
variable data and the Monotonic Count

View File

@@ -1,13 +1,13 @@
/**@file
Header file for EFI Variable Services.
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.