mirror of
				https://gitlab.com/qemu-project/ipxe.git
				synced 2025-11-03 07:59:06 +08:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 96395878b0 | |||
| e222bfc355 | |||
| 352112cfad | |||
| 00a0a20ae7 | |||
| f05ab57745 | |||
| 1b02ddeaf8 | 
@ -755,6 +755,53 @@ char __debug_disable(OBJECT) = ( DBGLVL_MAX & ~DBGLVL_DFLT );
 | 
			
		||||
#define FILE_LICENCE_BSD2 \
 | 
			
		||||
	PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__bsd2__ ) )
 | 
			
		||||
 | 
			
		||||
/** Declare a file as being under the two-clause BSD plus patent licence
 | 
			
		||||
 *
 | 
			
		||||
 * This licence declaration is applicable when a file states itself to
 | 
			
		||||
 * be licensed under terms allowing redistribution in source and
 | 
			
		||||
 * binary forms (with or without modification) provided that:
 | 
			
		||||
 *
 | 
			
		||||
 *     redistributions of source code retain the copyright notice,
 | 
			
		||||
 *     list of conditions and any attached disclaimers
 | 
			
		||||
 *
 | 
			
		||||
 *     redistributions in binary form reproduce the copyright notice,
 | 
			
		||||
 *     list of conditions and any attached disclaimers in the
 | 
			
		||||
 *     documentation and/or other materials provided with the
 | 
			
		||||
 *     distribution
 | 
			
		||||
 *
 | 
			
		||||
 * and in addition states that
 | 
			
		||||
 *
 | 
			
		||||
 *     Subject to the terms and conditions of this license, each
 | 
			
		||||
 *     copyright holder and contributor hereby grants to those
 | 
			
		||||
 *     receiving rights under this license a perpetual, worldwide,
 | 
			
		||||
 *     non-exclusive, no-charge, royalty-free, irrevocable (except for
 | 
			
		||||
 *     failure to satisfy the conditions of this license) patent
 | 
			
		||||
 *     license to make, have made, use, offer to sell, sell, import,
 | 
			
		||||
 *     and otherwise transfer this software, where such license
 | 
			
		||||
 *     applies only to those patent claims, already acquired or
 | 
			
		||||
 *     hereafter acquired, licensable by such copyright holder or
 | 
			
		||||
 *     contributor that are necessarily infringed by:
 | 
			
		||||
 *
 | 
			
		||||
 *       their Contribution(s) (the licensed copyrights of copyright
 | 
			
		||||
 *       holders and non-copyrightable additions of contributors, in
 | 
			
		||||
 *       source or binary form) alone; or
 | 
			
		||||
 *
 | 
			
		||||
 *       combination of their Contribution(s) with the work of
 | 
			
		||||
 *       authorship to which such Contribution(s) was added by such
 | 
			
		||||
 *       copyright holder or contributor, if, at the time the
 | 
			
		||||
 *       Contribution is added, such addition causes such combination
 | 
			
		||||
 *       to be necessarily infringed. The patent license shall not
 | 
			
		||||
 *       apply to any other combinations which include the
 | 
			
		||||
 *       Contribution.
 | 
			
		||||
 *
 | 
			
		||||
 * It is not necessary for the file to explicitly state that it is
 | 
			
		||||
 * under a "BSD" licence; only that the licensing terms be
 | 
			
		||||
 * functionally equivalent to the standard two-clause BSD licence with
 | 
			
		||||
 * patent grant.
 | 
			
		||||
 */
 | 
			
		||||
#define FILE_LICENCE_BSD2_PATENT \
 | 
			
		||||
	PROVIDE_SYMBOL ( PREFIX_OBJECT ( __licence__bsd2__patent__ ) )
 | 
			
		||||
 | 
			
		||||
/** Declare a file as being under the one-clause MIT-style licence
 | 
			
		||||
 *
 | 
			
		||||
 * This licence declaration is applicable when a file states itself to
 | 
			
		||||
 | 
			
		||||
@ -1,24 +1,18 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Processor or Compiler specific defines and types for AArch64.
 | 
			
		||||
 | 
			
		||||
  Copyright (c) 2006 - 2010, 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>
 | 
			
		||||
  Portions copyright (c) 2011 - 2013, ARM Ltd. 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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PROCESSOR_BIND_H__
 | 
			
		||||
#define __PROCESSOR_BIND_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Define the processor type so other code can make processor based choices
 | 
			
		||||
@ -28,53 +22,102 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Make sure we are using the correct packing rules per EFI specification
 | 
			
		||||
//
 | 
			
		||||
#ifndef __GNUC__
 | 
			
		||||
#pragma pack()
 | 
			
		||||
#if !defined (__GNUC__) && !defined (__ASSEMBLER__)
 | 
			
		||||
  #pragma pack()
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if _MSC_EXTENSIONS
 | 
			
		||||
  //
 | 
			
		||||
  // use Microsoft* C compiler dependent integer width types
 | 
			
		||||
  //
 | 
			
		||||
  typedef unsigned __int64    UINT64;
 | 
			
		||||
  typedef __int64             INT64;
 | 
			
		||||
  typedef unsigned __int32    UINT32;
 | 
			
		||||
  typedef __int32             INT32;
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable some level 4 compilation warnings (same as IA32 and X64)
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disabling bitfield type checking warnings.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4214 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disabling the unreferenced formal parameter warnings.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4100 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable slightly different base types warning as CHAR8 * can not be set
 | 
			
		||||
// to a constant string.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4057 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4127 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by functions defined but not used. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4505 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by empty (after preprocessing) source file. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4206 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable 'potentially uninitialized local variable X used' warnings
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4701 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable 'potentially uninitialized local pointer variable X used' warnings
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4703 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// use Microsoft* C compiler dependent integer width types
 | 
			
		||||
//
 | 
			
		||||
typedef unsigned __int64  UINT64;
 | 
			
		||||
typedef __int64           INT64;
 | 
			
		||||
typedef unsigned __int32  UINT32;
 | 
			
		||||
typedef __int32           INT32;
 | 
			
		||||
typedef unsigned short    UINT16;
 | 
			
		||||
typedef unsigned short    CHAR16;
 | 
			
		||||
typedef short             INT16;
 | 
			
		||||
typedef unsigned char     BOOLEAN;
 | 
			
		||||
typedef unsigned char     UINT8;
 | 
			
		||||
typedef char              CHAR8;
 | 
			
		||||
typedef signed char       INT8;
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
  //
 | 
			
		||||
  // Assume standard AARCH64 alignment.
 | 
			
		||||
  //
 | 
			
		||||
  typedef unsigned long long  UINT64;
 | 
			
		||||
  typedef long long           INT64;
 | 
			
		||||
  typedef unsigned int        UINT32;
 | 
			
		||||
  typedef int                 INT32;
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Assume standard AARCH64 alignment.
 | 
			
		||||
//
 | 
			
		||||
typedef unsigned long long  UINT64;
 | 
			
		||||
typedef long long           INT64;
 | 
			
		||||
typedef unsigned int        UINT32;
 | 
			
		||||
typedef int                 INT32;
 | 
			
		||||
typedef unsigned short      UINT16;
 | 
			
		||||
typedef unsigned short      CHAR16;
 | 
			
		||||
typedef short               INT16;
 | 
			
		||||
typedef unsigned char       BOOLEAN;
 | 
			
		||||
typedef unsigned char       UINT8;
 | 
			
		||||
typedef char                CHAR8;
 | 
			
		||||
typedef signed char         INT8;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Unsigned value of native width.  (4 bytes on supported 32-bit processor instructions,
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions)
 | 
			
		||||
///
 | 
			
		||||
typedef UINT64  UINTN;
 | 
			
		||||
typedef UINT64 UINTN;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Signed value of native width.  (4 bytes on supported 32-bit processor instructions,
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions)
 | 
			
		||||
///
 | 
			
		||||
typedef INT64   INTN;
 | 
			
		||||
typedef INT64 INTN;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Processor specific defines
 | 
			
		||||
@ -83,7 +126,7 @@ typedef INT64   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the highest bit set.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_BIT     0x8000000000000000ULL
 | 
			
		||||
#define MAX_BIT  0x8000000000000000ULL
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the two highest bits set.
 | 
			
		||||
@ -93,7 +136,12 @@ typedef INT64   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal AARCH64  address
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL
 | 
			
		||||
#define MAX_ADDRESS  0xFFFFFFFFFFFFFFFFULL
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum usable address at boot time (48 bits using 4 KB pages)
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ALLOC_ADDRESS  0xFFFFFFFFFFFFULL
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal AArch64 INTN and UINTN values.
 | 
			
		||||
@ -101,6 +149,11 @@ typedef INT64   INTN;
 | 
			
		||||
#define MAX_INTN   ((INTN)0x7FFFFFFFFFFFFFFFULL)
 | 
			
		||||
#define MAX_UINTN  ((UINTN)0xFFFFFFFFFFFFFFFFULL)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Minimum legal AArch64 INTN value.
 | 
			
		||||
///
 | 
			
		||||
#define MIN_INTN  (((INTN)-9223372036854775807LL) - 1)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The stack alignment required for AARCH64
 | 
			
		||||
///
 | 
			
		||||
@ -109,8 +162,8 @@ typedef INT64   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// Page allocation granularity for AARCH64
 | 
			
		||||
///
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x10000)
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY  (0x10000)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
 | 
			
		||||
@ -121,18 +174,18 @@ typedef INT64   INTN;
 | 
			
		||||
 | 
			
		||||
// When compiling with Clang, we still use GNU as for the assembler, so we still
 | 
			
		||||
// need to define the GCC_ASM* macros.
 | 
			
		||||
#if defined(__GNUC__) || defined(__clang__)
 | 
			
		||||
  ///
 | 
			
		||||
  /// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
  /// Define this macro to unify the usage.
 | 
			
		||||
  ///
 | 
			
		||||
  #define ASM_GLOBAL .globl
 | 
			
		||||
#if defined (__GNUC__) || defined (__clang__)
 | 
			
		||||
///
 | 
			
		||||
/// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
/// Define this macro to unify the usage.
 | 
			
		||||
///
 | 
			
		||||
#define ASM_GLOBAL  .globl
 | 
			
		||||
 | 
			
		||||
  #define GCC_ASM_EXPORT(func__)  \
 | 
			
		||||
#define GCC_ASM_EXPORT(func__)  \
 | 
			
		||||
         .global  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    ;\
 | 
			
		||||
         .type ASM_PFX(func__), %function
 | 
			
		||||
 | 
			
		||||
  #define GCC_ASM_IMPORT(func__)  \
 | 
			
		||||
#define GCC_ASM_IMPORT(func__)  \
 | 
			
		||||
         .extern  _CONCATENATE (__USER_LABEL_PREFIX__, func__)
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@ -147,7 +200,7 @@ typedef INT64   INTN;
 | 
			
		||||
  @return The pointer to the first instruction of a function given a function pointer.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer)  (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
 | 
			
		||||
#ifndef __USER_LABEL_PREFIX__
 | 
			
		||||
#define __USER_LABEL_PREFIX__
 | 
			
		||||
 | 
			
		||||
@ -1,22 +1,16 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Processor or Compiler specific defines and types for ARM.
 | 
			
		||||
 | 
			
		||||
  Copyright (c) 2006 - 2013, 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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PROCESSOR_BIND_H__
 | 
			
		||||
#define __PROCESSOR_BIND_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Define the processor type so other code can make processor based choices
 | 
			
		||||
@ -26,61 +20,110 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Make sure we are using the correct packing rules per EFI specification
 | 
			
		||||
//
 | 
			
		||||
#ifndef __GNUC__
 | 
			
		||||
#pragma pack()
 | 
			
		||||
#if !defined (__GNUC__) && !defined (__ASSEMBLER__)
 | 
			
		||||
  #pragma pack()
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable some level 4 compilation warnings (same as IA32 and X64)
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disabling bitfield type checking warnings.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4214 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disabling the unreferenced formal parameter warnings.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4100 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable slightly different base types warning as CHAR8 * can not be set
 | 
			
		||||
// to a constant string.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4057 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4127 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by functions defined but not used. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4505 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by empty (after preprocessing) source file. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4206 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable 'potentially uninitialized local variable X used' warnings
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4701 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable 'potentially uninitialized local pointer variable X used' warnings
 | 
			
		||||
//
 | 
			
		||||
  #pragma warning ( disable : 4703 )
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// RVCT does not support the __builtin_unreachable() macro
 | 
			
		||||
// MSFT doesn't support the __builtin_unreachable() macro
 | 
			
		||||
//
 | 
			
		||||
#ifdef __ARMCC_VERSION
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
#define UNREACHABLE()
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if _MSC_EXTENSIONS
 | 
			
		||||
  //
 | 
			
		||||
  // use Microsoft* C compiler dependent integer width types
 | 
			
		||||
  //
 | 
			
		||||
  typedef unsigned __int64    UINT64;
 | 
			
		||||
  typedef __int64             INT64;
 | 
			
		||||
  typedef unsigned __int32    UINT32;
 | 
			
		||||
  typedef __int32             INT32;
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
//
 | 
			
		||||
// use Microsoft* C compiler dependent integer width types
 | 
			
		||||
//
 | 
			
		||||
typedef unsigned __int64  UINT64;
 | 
			
		||||
typedef __int64           INT64;
 | 
			
		||||
typedef unsigned __int32  UINT32;
 | 
			
		||||
typedef __int32           INT32;
 | 
			
		||||
typedef unsigned short    UINT16;
 | 
			
		||||
typedef unsigned short    CHAR16;
 | 
			
		||||
typedef short             INT16;
 | 
			
		||||
typedef unsigned char     BOOLEAN;
 | 
			
		||||
typedef unsigned char     UINT8;
 | 
			
		||||
typedef char              CHAR8;
 | 
			
		||||
typedef signed char       INT8;
 | 
			
		||||
#else
 | 
			
		||||
  //
 | 
			
		||||
  // Assume standard ARM alignment.
 | 
			
		||||
  // Need to check portability of long long
 | 
			
		||||
  //
 | 
			
		||||
  typedef unsigned long long  UINT64;
 | 
			
		||||
  typedef long long           INT64;
 | 
			
		||||
  typedef unsigned int        UINT32;
 | 
			
		||||
  typedef int                 INT32;
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
//
 | 
			
		||||
// Assume standard ARM alignment.
 | 
			
		||||
// Need to check portability of long long
 | 
			
		||||
//
 | 
			
		||||
typedef unsigned long long  UINT64;
 | 
			
		||||
typedef long long           INT64;
 | 
			
		||||
typedef unsigned int        UINT32;
 | 
			
		||||
typedef int                 INT32;
 | 
			
		||||
typedef unsigned short      UINT16;
 | 
			
		||||
typedef unsigned short      CHAR16;
 | 
			
		||||
typedef short               INT16;
 | 
			
		||||
typedef unsigned char       BOOLEAN;
 | 
			
		||||
typedef unsigned char       UINT8;
 | 
			
		||||
typedef char                CHAR8;
 | 
			
		||||
typedef signed char         INT8;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Unsigned value of native width.  (4 bytes on supported 32-bit processor instructions,
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions)
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  UINTN;
 | 
			
		||||
typedef UINT32 UINTN;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Signed value of native width.  (4 bytes on supported 32-bit processor instructions,
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions)
 | 
			
		||||
///
 | 
			
		||||
typedef INT32   INTN;
 | 
			
		||||
typedef INT32 INTN;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Processor specific defines
 | 
			
		||||
@ -89,24 +132,34 @@ typedef INT32   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the highest bit set.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_BIT      0x80000000
 | 
			
		||||
#define MAX_BIT  0x80000000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the two highest bits set.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_2_BITS   0xC0000000
 | 
			
		||||
#define MAX_2_BITS  0xC0000000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal ARM address
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ADDRESS  0xFFFFFFFF
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum usable address at boot time
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ALLOC_ADDRESS  MAX_ADDRESS
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal ARM INTN and UINTN values.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_INTN   ((INTN)0x7FFFFFFF)
 | 
			
		||||
#define MAX_UINTN  ((UINTN)0xFFFFFFFF)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Minimum legal ARM INTN value.
 | 
			
		||||
///
 | 
			
		||||
#define MIN_INTN  (((INTN)-2147483647) - 1)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The stack alignment required for ARM
 | 
			
		||||
///
 | 
			
		||||
@ -115,8 +168,8 @@ typedef INT32   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// Page allocation granularity for ARM
 | 
			
		||||
///
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
 | 
			
		||||
@ -127,40 +180,45 @@ typedef INT32   INTN;
 | 
			
		||||
 | 
			
		||||
// When compiling with Clang, we still use GNU as for the assembler, so we still
 | 
			
		||||
// need to define the GCC_ASM* macros.
 | 
			
		||||
#if defined(__GNUC__) || defined(__clang__)
 | 
			
		||||
  ///
 | 
			
		||||
  /// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
  /// Define this macro to unify the usage.
 | 
			
		||||
  ///
 | 
			
		||||
  #define ASM_GLOBAL .globl
 | 
			
		||||
#if defined (__GNUC__) || defined (__clang__)
 | 
			
		||||
///
 | 
			
		||||
/// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
/// Define this macro to unify the usage.
 | 
			
		||||
///
 | 
			
		||||
#define ASM_GLOBAL  .globl
 | 
			
		||||
 | 
			
		||||
  #if !defined(__APPLE__)
 | 
			
		||||
    ///
 | 
			
		||||
    /// ARM EABI defines that the linker should not manipulate call relocations
 | 
			
		||||
    /// (do bl/blx conversion) unless the target symbol has function type.
 | 
			
		||||
    /// CodeSourcery 2010.09 started requiring the .type to function properly
 | 
			
		||||
    ///
 | 
			
		||||
    #define INTERWORK_FUNC(func__)   .type ASM_PFX(func__), %function
 | 
			
		||||
  #if !defined (__APPLE__)
 | 
			
		||||
///
 | 
			
		||||
/// ARM EABI defines that the linker should not manipulate call relocations
 | 
			
		||||
/// (do bl/blx conversion) unless the target symbol has function type.
 | 
			
		||||
/// CodeSourcery 2010.09 started requiring the .type to function properly
 | 
			
		||||
///
 | 
			
		||||
#define INTERWORK_FUNC(func__)  .type ASM_PFX(func__), %function
 | 
			
		||||
 | 
			
		||||
    #define GCC_ASM_EXPORT(func__)  \
 | 
			
		||||
#define GCC_ASM_EXPORT(func__)  \
 | 
			
		||||
             .global  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    ;\
 | 
			
		||||
             .type ASM_PFX(func__), %function
 | 
			
		||||
 | 
			
		||||
    #define GCC_ASM_IMPORT(func__)  \
 | 
			
		||||
#define GCC_ASM_IMPORT(func__)  \
 | 
			
		||||
             .extern  _CONCATENATE (__USER_LABEL_PREFIX__, func__)
 | 
			
		||||
 | 
			
		||||
  #else
 | 
			
		||||
    //
 | 
			
		||||
    // .type not supported by Apple Xcode tools
 | 
			
		||||
    //
 | 
			
		||||
    #define INTERWORK_FUNC(func__)
 | 
			
		||||
//
 | 
			
		||||
// .type not supported by Apple Xcode tools
 | 
			
		||||
//
 | 
			
		||||
#define INTERWORK_FUNC(func__)
 | 
			
		||||
 | 
			
		||||
    #define GCC_ASM_EXPORT(func__)  \
 | 
			
		||||
#define GCC_ASM_EXPORT(func__)  \
 | 
			
		||||
             .globl  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    \
 | 
			
		||||
 | 
			
		||||
    #define GCC_ASM_IMPORT(name)
 | 
			
		||||
#define GCC_ASM_IMPORT(name)
 | 
			
		||||
 | 
			
		||||
  #endif
 | 
			
		||||
#elif defined (_MSC_EXTENSIONS)
 | 
			
		||||
//
 | 
			
		||||
// PRESERVE8 is not supported by the MSFT assembler.
 | 
			
		||||
//
 | 
			
		||||
#define PRESERVE8
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -173,12 +231,10 @@ typedef INT32   INTN;
 | 
			
		||||
  @return The pointer to the first instruction of a function given a function pointer.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer)  (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
 | 
			
		||||
#ifndef __USER_LABEL_PREFIX__
 | 
			
		||||
#define __USER_LABEL_PREFIX__
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -5,14 +5,8 @@
 | 
			
		||||
  ACPI 2.0 specification defines the ACPI 2.0 GUID. UEFI 2.0 defines the
 | 
			
		||||
  ACPI 2.0 Table GUID and ACPI Table 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.
 | 
			
		||||
@ -22,7 +16,7 @@
 | 
			
		||||
#ifndef __ACPI_GUID_H__
 | 
			
		||||
#define __ACPI_GUID_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define ACPI_TABLE_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -34,15 +28,15 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#define ACPI_10_TABLE_GUID     ACPI_TABLE_GUID
 | 
			
		||||
#define ACPI_10_TABLE_GUID  ACPI_TABLE_GUID
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID
 | 
			
		||||
#define EFI_ACPI_20_TABLE_GUID  EFI_ACPI_TABLE_GUID
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiAcpiTableGuid;
 | 
			
		||||
extern EFI_GUID gEfiAcpi10TableGuid;
 | 
			
		||||
extern EFI_GUID gEfiAcpi20TableGuid;
 | 
			
		||||
extern EFI_GUID  gEfiAcpiTableGuid;
 | 
			
		||||
extern EFI_GUID  gEfiAcpi10TableGuid;
 | 
			
		||||
extern EFI_GUID  gEfiAcpi20TableGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
  and EFI_FILE_PROTOCOL.GetInfo() to set or get generic file information.
 | 
			
		||||
  This GUID is defined in UEFI specification.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __FILE_INFO_H__
 | 
			
		||||
#define __FILE_INFO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_FILE_INFO_ID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -28,35 +22,35 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the EFI_FILE_INFO structure, including the Null-terminated FileName string.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64    Size;
 | 
			
		||||
  UINT64      Size;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the file in bytes.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64    FileSize;
 | 
			
		||||
  UINT64      FileSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// PhysicalSize The amount of physical space the file consumes on the file system volume.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64    PhysicalSize;
 | 
			
		||||
  UINT64      PhysicalSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The time the file was created.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TIME  CreateTime;
 | 
			
		||||
  EFI_TIME    CreateTime;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The time when the file was last accessed.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TIME  LastAccessTime;
 | 
			
		||||
  EFI_TIME    LastAccessTime;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The time when the file's contents were last modified.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TIME  ModificationTime;
 | 
			
		||||
  EFI_TIME    ModificationTime;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The attribute bits for the file.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64    Attribute;
 | 
			
		||||
  UINT64      Attribute;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The Null-terminated name of the file.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR16    FileName[1];
 | 
			
		||||
  CHAR16      FileName[1];
 | 
			
		||||
} EFI_FILE_INFO;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -66,8 +60,8 @@ typedef struct {
 | 
			
		||||
/// computes this size correctly no matter how big the FileName array is declared.
 | 
			
		||||
/// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
 | 
			
		||||
///
 | 
			
		||||
#define SIZE_OF_EFI_FILE_INFO OFFSET_OF (EFI_FILE_INFO, FileName)
 | 
			
		||||
#define SIZE_OF_EFI_FILE_INFO  OFFSET_OF (EFI_FILE_INFO, FileName)
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiFileInfoGuid;
 | 
			
		||||
extern EFI_GUID  gEfiFileInfoGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
  or EFI_FILE_PROTOCOL.SetInfo() to get or set information about the system's volume.
 | 
			
		||||
  This GUID is defined in UEFI specification.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __FILE_SYSTEM_INFO_H__
 | 
			
		||||
#define __FILE_SYSTEM_INFO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_FILE_SYSTEM_INFO_ID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -28,27 +22,27 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the EFI_FILE_SYSTEM_INFO structure, including the Null-terminated VolumeLabel string.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  Size;
 | 
			
		||||
  UINT64     Size;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the volume only supports read access.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN ReadOnly;
 | 
			
		||||
  BOOLEAN    ReadOnly;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of bytes managed by the file system.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  VolumeSize;
 | 
			
		||||
  UINT64     VolumeSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of available bytes for use by the file system.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  FreeSpace;
 | 
			
		||||
  UINT64     FreeSpace;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The nominal block size by which files are typically grown.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  BlockSize;
 | 
			
		||||
  UINT32     BlockSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The Null-terminated string that is the volume's label.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR16  VolumeLabel[1];
 | 
			
		||||
  CHAR16     VolumeLabel[1];
 | 
			
		||||
} EFI_FILE_SYSTEM_INFO;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -60,6 +54,6 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
#define SIZE_OF_EFI_FILE_SYSTEM_INFO  OFFSET_OF (EFI_FILE_SYSTEM_INFO, VolumeLabel)
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiFileSystemInfoGuid;
 | 
			
		||||
extern EFI_GUID  gEfiFileSystemInfoGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -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.
 | 
			
		||||
@ -17,11 +11,11 @@
 | 
			
		||||
#ifndef __EFI_HII_FORMMAP_GUID_H__
 | 
			
		||||
#define __EFI_HII_FORMMAP_GUID_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_STANDARD_FORM_GUID \
 | 
			
		||||
  { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } }
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiHiiStandardFormGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiStandardFormGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,14 +2,8 @@
 | 
			
		||||
  GUID indicates that the form set contains forms designed to be used
 | 
			
		||||
  for platform configuration and this form set will be displayed.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  GUID defined in UEFI 2.1.
 | 
			
		||||
@ -19,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __HII_PLATFORM_SETUP_FORMSET_GUID_H__
 | 
			
		||||
#define __HII_PLATFORM_SETUP_FORMSET_GUID_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \
 | 
			
		||||
  { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } }
 | 
			
		||||
@ -30,8 +24,12 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \
 | 
			
		||||
  { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } }
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid;
 | 
			
		||||
extern EFI_GUID gEfiHiiDriverHealthFormsetGuid;
 | 
			
		||||
extern EFI_GUID gEfiHiiUserCredentialFormsetGuid;
 | 
			
		||||
#define EFI_HII_REST_STYLE_FORMSET_GUID \
 | 
			
		||||
  { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } }
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID  gEfiHiiPlatformSetupFormsetGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiDriverHealthFormsetGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiUserCredentialFormsetGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiRestStyleFormsetGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,25 +1,19 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  EDKII extented HII IFR guid opcodes.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __MDEMODULE_HII_H__
 | 
			
		||||
#define __MDEMODULE_HII_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define NARROW_CHAR         0xFFF0
 | 
			
		||||
#define WIDE_CHAR           0xFFF1
 | 
			
		||||
#define NON_BREAKING_CHAR   0xFFF2
 | 
			
		||||
#define NARROW_CHAR        0xFFF0
 | 
			
		||||
#define WIDE_CHAR          0xFFF1
 | 
			
		||||
#define NON_BREAKING_CHAR  0xFFF2
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// State defined for password statemachine .
 | 
			
		||||
@ -38,91 +32,91 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// EDKII implementation extension opcodes, new extension can be added here later.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_LABEL       0x0
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_BANNER      0x1
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_TIMEOUT     0x2
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_CLASS       0x3
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_SUBCLASS    0x4
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_LABEL     0x0
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_BANNER    0x1
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_TIMEOUT   0x2
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_CLASS     0x3
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_SUBCLASS  0x4
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Label opcode.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_LABEL {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_TIANO_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID             Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_LABEL.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  UINT8                ExtendOpCode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Label Number.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16              Number;
 | 
			
		||||
  UINT16               Number;
 | 
			
		||||
} EFI_IFR_GUID_LABEL;
 | 
			
		||||
 | 
			
		||||
#define EFI_IFR_BANNER_ALIGN_LEFT     0
 | 
			
		||||
#define EFI_IFR_BANNER_ALIGN_CENTER   1
 | 
			
		||||
#define EFI_IFR_BANNER_ALIGN_RIGHT    2
 | 
			
		||||
#define EFI_IFR_BANNER_ALIGN_LEFT    0
 | 
			
		||||
#define EFI_IFR_BANNER_ALIGN_CENTER  1
 | 
			
		||||
#define EFI_IFR_BANNER_ALIGN_RIGHT   2
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Banner opcode.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_BANNER {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_TIANO_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID             Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_BANNER
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  EFI_STRING_ID       Title;        ///< The string token for the banner title.
 | 
			
		||||
  UINT16              LineNumber;   ///< 1-based line number.
 | 
			
		||||
  UINT8               Alignment;    ///< left, center, or right-aligned.
 | 
			
		||||
  UINT8                ExtendOpCode;
 | 
			
		||||
  EFI_STRING_ID        Title;       ///< The string token for the banner title.
 | 
			
		||||
  UINT16               LineNumber;  ///< 1-based line number.
 | 
			
		||||
  UINT8                Alignment;   ///< left, center, or right-aligned.
 | 
			
		||||
} EFI_IFR_GUID_BANNER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Timeout opcode.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_TIMEOUT {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_TIANO_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID             Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_TIMEOUT.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  UINT16              TimeOut;       ///< TimeOut Value.
 | 
			
		||||
  UINT8                ExtendOpCode;
 | 
			
		||||
  UINT16               TimeOut;      ///< TimeOut Value.
 | 
			
		||||
} EFI_IFR_GUID_TIMEOUT;
 | 
			
		||||
 | 
			
		||||
#define EFI_NON_DEVICE_CLASS              0x00
 | 
			
		||||
#define EFI_DISK_DEVICE_CLASS             0x01
 | 
			
		||||
#define EFI_VIDEO_DEVICE_CLASS            0x02
 | 
			
		||||
#define EFI_NETWORK_DEVICE_CLASS          0x04
 | 
			
		||||
#define EFI_INPUT_DEVICE_CLASS            0x08
 | 
			
		||||
#define EFI_ON_BOARD_DEVICE_CLASS         0x10
 | 
			
		||||
#define EFI_OTHER_DEVICE_CLASS            0x20
 | 
			
		||||
#define EFI_NON_DEVICE_CLASS       0x00
 | 
			
		||||
#define EFI_DISK_DEVICE_CLASS      0x01
 | 
			
		||||
#define EFI_VIDEO_DEVICE_CLASS     0x02
 | 
			
		||||
#define EFI_NETWORK_DEVICE_CLASS   0x04
 | 
			
		||||
#define EFI_INPUT_DEVICE_CLASS     0x08
 | 
			
		||||
#define EFI_ON_BOARD_DEVICE_CLASS  0x10
 | 
			
		||||
#define EFI_OTHER_DEVICE_CLASS     0x20
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Device Class opcode.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_CLASS {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_TIANO_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID             Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_CLASS.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  UINT16              Class;           ///< Device Class from the above.
 | 
			
		||||
  UINT8                ExtendOpCode;
 | 
			
		||||
  UINT16               Class;          ///< Device Class from the above.
 | 
			
		||||
} EFI_IFR_GUID_CLASS;
 | 
			
		||||
 | 
			
		||||
#define EFI_SETUP_APPLICATION_SUBCLASS    0x00
 | 
			
		||||
@ -134,16 +128,16 @@ typedef struct _EFI_IFR_GUID_CLASS {
 | 
			
		||||
/// SubClass opcode
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_SUBCLASS {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_TIANO_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID             Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_SUBCLASS.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  UINT16              SubClass;      ///< Sub Class type from the above.
 | 
			
		||||
  UINT8                ExtendOpCode;
 | 
			
		||||
  UINT16               SubClass;     ///< Sub Class type from the above.
 | 
			
		||||
} EFI_IFR_GUID_SUBCLASS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -157,66 +151,83 @@ typedef struct _EFI_IFR_GUID_SUBCLASS {
 | 
			
		||||
/// One is for framework OneOf question Option Key value;
 | 
			
		||||
/// another is for framework vareqval.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_OPTIONKEY   0x0
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_VAREQNAME   0x1
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_OPTIONKEY  0x0
 | 
			
		||||
#define EFI_IFR_EXTEND_OP_VAREQNAME  0x1
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Store the framework vfr option key value.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_OPTIONKEY {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER     Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_FRAMEWORK_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID              Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_OPTIONKEY.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  UINT8                 ExtendOpCode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// OneOf Questiond ID binded by OneOf Option.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_QUESTION_ID     QuestionId;
 | 
			
		||||
  EFI_QUESTION_ID       QuestionId;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The OneOf Option Value.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IFR_TYPE_VALUE  OptionValue;
 | 
			
		||||
  EFI_IFR_TYPE_VALUE    OptionValue;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The Framework OneOf Option Key Value.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16              KeyValue;
 | 
			
		||||
  UINT16                KeyValue;
 | 
			
		||||
} EFI_IFR_GUID_OPTIONKEY;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Store the framework vfr vareqval name number.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_IFR_GUID_VAREQNAME {
 | 
			
		||||
  EFI_IFR_OP_HEADER   Header;
 | 
			
		||||
  EFI_IFR_OP_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_FRAMEWORK_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID            Guid;
 | 
			
		||||
  EFI_GUID             Guid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// EFI_IFR_EXTEND_OP_VAREQNAME.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               ExtendOpCode;
 | 
			
		||||
  UINT8                ExtendOpCode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Question ID of the Numeric Opcode created.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_QUESTION_ID     QuestionId;
 | 
			
		||||
  EFI_QUESTION_ID      QuestionId;
 | 
			
		||||
  ///
 | 
			
		||||
  /// For vareqval (0x100), NameId is 0x100.
 | 
			
		||||
  /// This value will convert to a Unicode String following this rule;
 | 
			
		||||
  ///            sprintf(StringBuffer, "%d", NameId) .
 | 
			
		||||
  /// The the Unicode String will be used as a EFI Variable Name.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16              NameId;
 | 
			
		||||
  UINT16               NameId;
 | 
			
		||||
} EFI_IFR_GUID_VAREQNAME;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EDKII implementation extension GUID, used to indaicate there are bit fields in the varstore.
 | 
			
		||||
///
 | 
			
		||||
#define EDKII_IFR_BIT_VARSTORE_GUID \
 | 
			
		||||
  {0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60,0xA7, 0x1D}}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EDKII implementation extension flags, used to indaicate the disply style and bit width for bit filed storage.
 | 
			
		||||
/// Two high bits for display style and the low six bits for bit width.
 | 
			
		||||
///
 | 
			
		||||
#define EDKII_IFR_DISPLAY_BIT           0xC0
 | 
			
		||||
#define EDKII_IFR_DISPLAY_INT_DEC_BIT   0x00
 | 
			
		||||
#define EDKII_IFR_DISPLAY_UINT_DEC_BIT  0x40
 | 
			
		||||
#define EDKII_IFR_DISPLAY_UINT_HEX_BIT  0x80
 | 
			
		||||
 | 
			
		||||
#define EDKII_IFR_NUMERIC_SIZE_BIT  0x3F
 | 
			
		||||
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiIfrTianoGuid;
 | 
			
		||||
extern EFI_GUID gEfiIfrFrameworkGuid;
 | 
			
		||||
extern EFI_GUID  gEfiIfrTianoGuid;
 | 
			
		||||
extern EFI_GUID  gEfiIfrFrameworkGuid;
 | 
			
		||||
extern EFI_GUID  gEdkiiIfrBitVarstoreGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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.
 | 
			
		||||
@ -18,7 +12,7 @@
 | 
			
		||||
#ifndef __PC_ANSI_H__
 | 
			
		||||
#define __PC_ANSI_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_PC_ANSI_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -50,11 +44,11 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0xd487ddb4, 0x008b, 0x11d9, {0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiPcAnsiGuid;
 | 
			
		||||
extern EFI_GUID gEfiVT100Guid;
 | 
			
		||||
extern EFI_GUID gEfiVT100PlusGuid;
 | 
			
		||||
extern EFI_GUID gEfiVTUTF8Guid;
 | 
			
		||||
extern EFI_GUID gEfiUartDevicePathGuid;
 | 
			
		||||
extern EFI_GUID gEfiSasDevicePathGuid;
 | 
			
		||||
extern EFI_GUID  gEfiPcAnsiGuid;
 | 
			
		||||
extern EFI_GUID  gEfiVT100Guid;
 | 
			
		||||
extern EFI_GUID  gEfiVT100PlusGuid;
 | 
			
		||||
extern EFI_GUID  gEfiVTUTF8Guid;
 | 
			
		||||
extern EFI_GUID  gEfiUartDevicePathGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSasDevicePathGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,14 +5,8 @@
 | 
			
		||||
  locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
 | 
			
		||||
  tables.
 | 
			
		||||
 | 
			
		||||
  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  This program and the accompanying materials
 | 
			
		||||
  are licensed and made available under the terms and conditions of the BSD License
 | 
			
		||||
  which accompanies this distribution.  The full text of the license may be found at
 | 
			
		||||
  http://opensource.org/licenses/bsd-license.php
 | 
			
		||||
 | 
			
		||||
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | 
			
		||||
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  GUIDs defined in UEFI 2.5 spec.
 | 
			
		||||
@ -22,7 +16,7 @@
 | 
			
		||||
#ifndef __SMBIOS_GUID_H__
 | 
			
		||||
#define __SMBIOS_GUID_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define SMBIOS_TABLE_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -34,7 +28,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID       gEfiSmbiosTableGuid;
 | 
			
		||||
extern EFI_GUID       gEfiSmbios3TableGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSmbiosTableGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSmbios3TableGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -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.
 | 
			
		||||
@ -17,14 +11,14 @@
 | 
			
		||||
#ifndef __EFI_WIN_CERTIFICATE_H__
 | 
			
		||||
#define __EFI_WIN_CERTIFICATE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// _WIN_CERTIFICATE.wCertificateType
 | 
			
		||||
//
 | 
			
		||||
#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002
 | 
			
		||||
#define WIN_CERT_TYPE_EFI_PKCS115      0x0EF0
 | 
			
		||||
#define WIN_CERT_TYPE_EFI_GUID         0x0EF1
 | 
			
		||||
#define WIN_CERT_TYPE_PKCS_SIGNED_DATA  0x0002
 | 
			
		||||
#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.
 | 
			
		||||
@ -34,18 +28,18 @@ typedef struct {
 | 
			
		||||
  /// The length of the entire certificate,
 | 
			
		||||
  /// including the length of the header, in bytes.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  dwLength;
 | 
			
		||||
  UINT32    dwLength;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The revision level of the WIN_CERTIFICATE
 | 
			
		||||
  /// structure. The current revision level is 0x0200.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16  wRevision;
 | 
			
		||||
  UINT16    wRevision;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The certificate type. See WIN_CERT_TYPE_xxx for the UEFI
 | 
			
		||||
  /// certificate types. The UEFI specification reserves the range of
 | 
			
		||||
  /// certificate type values from 0x0EF0 to 0x0EFF.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16  wCertificateType;
 | 
			
		||||
  UINT16    wCertificateType;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The following is the actual certificate. The format of
 | 
			
		||||
  /// the certificate depends on wCertificateType.
 | 
			
		||||
@ -64,12 +58,11 @@ typedef struct {
 | 
			
		||||
/// WIN_CERTIFICATE_UEFI_GUID.CertData
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_GUID  HashType;
 | 
			
		||||
  UINT8     PublicKey[256];
 | 
			
		||||
  UINT8     Signature[256];
 | 
			
		||||
  EFI_GUID    HashType;
 | 
			
		||||
  UINT8       PublicKey[256];
 | 
			
		||||
  UINT8       Signature[256];
 | 
			
		||||
} EFI_CERT_BLOCK_RSA_2048_SHA256;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Certificate which encapsulates a GUID-specific digital signature
 | 
			
		||||
///
 | 
			
		||||
@ -78,22 +71,21 @@ typedef struct {
 | 
			
		||||
  /// This is the standard WIN_CERTIFICATE header, where
 | 
			
		||||
  /// wCertificateType is set to WIN_CERT_TYPE_EFI_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  WIN_CERTIFICATE   Hdr;
 | 
			
		||||
  WIN_CERTIFICATE    Hdr;
 | 
			
		||||
  ///
 | 
			
		||||
  /// This is the unique id which determines the
 | 
			
		||||
  /// format of the CertData. .
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID          CertType;
 | 
			
		||||
  EFI_GUID           CertType;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The following is the certificate data. The format of
 | 
			
		||||
  /// the data is determined by the CertType.
 | 
			
		||||
  /// If CertType is EFI_CERT_TYPE_RSA2048_SHA256_GUID,
 | 
			
		||||
  /// the CertData will be EFI_CERT_BLOCK_RSA_2048_SHA256 structure.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8            CertData[1];
 | 
			
		||||
  UINT8              CertData[1];
 | 
			
		||||
} WIN_CERTIFICATE_UEFI_GUID;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital signature.
 | 
			
		||||
///
 | 
			
		||||
@ -107,12 +99,12 @@ typedef struct {
 | 
			
		||||
  /// This is the standard WIN_CERTIFICATE header, where
 | 
			
		||||
  /// wCertificateType is set to WIN_CERT_TYPE_UEFI_PKCS1_15.
 | 
			
		||||
  ///
 | 
			
		||||
  WIN_CERTIFICATE Hdr;
 | 
			
		||||
  WIN_CERTIFICATE    Hdr;
 | 
			
		||||
  ///
 | 
			
		||||
  /// This is the hashing algorithm which was performed on the
 | 
			
		||||
  /// UEFI executable when creating the digital signature.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID        HashAlgorithm;
 | 
			
		||||
  EFI_GUID           HashAlgorithm;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The following is the actual digital signature. The
 | 
			
		||||
  /// size of the signature is the same size as the key
 | 
			
		||||
@ -125,6 +117,6 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
} WIN_CERTIFICATE_EFI_PKCS1_15;
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiCertTypeRsa2048Sha256Guid;
 | 
			
		||||
extern EFI_GUID  gEfiCertTypeRsa2048Sha256Guid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,21 +1,15 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Processor or Compiler specific defines and types for IA-32 architecture.
 | 
			
		||||
 | 
			
		||||
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 __PROCESSOR_BIND_H__
 | 
			
		||||
#define __PROCESSOR_BIND_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Define the processor type so other code can make processor based choices.
 | 
			
		||||
@ -25,39 +19,38 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Make sure we are using the correct packing rules per EFI specification
 | 
			
		||||
//
 | 
			
		||||
#if !defined(__GNUC__)
 | 
			
		||||
#pragma pack()
 | 
			
		||||
#if !defined (__GNUC__)
 | 
			
		||||
  #pragma pack()
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__INTEL_COMPILER)
 | 
			
		||||
#if defined (__INTEL_COMPILER)
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #869: "Parameter" was never referenced warning.
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with -Wall
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 869 )
 | 
			
		||||
  #pragma warning ( disable : 869 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #1418: external function definition with no prior declaration.
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with /W4
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 1418 )
 | 
			
		||||
  #pragma warning ( disable : 1418 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #1419: external declaration in primary source file
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with /W4
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 1419 )
 | 
			
		||||
  #pragma warning ( disable : 1419 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #593: "Variable" was set but never used.
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with /W4
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 593 )
 | 
			
		||||
  #pragma warning ( disable : 593 )
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_MSC_EXTENSIONS)
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable warning that make it impossible to compile at /W4
 | 
			
		||||
@ -67,35 +60,35 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Disabling bitfield type checking warnings.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4214 )
 | 
			
		||||
  #pragma warning ( disable : 4214 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disabling the unreferenced formal parameter warnings.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4100 )
 | 
			
		||||
  #pragma warning ( disable : 4100 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable slightly different base types warning as CHAR8 * can not be set
 | 
			
		||||
// to a constant string.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4057 )
 | 
			
		||||
  #pragma warning ( disable : 4057 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4127 )
 | 
			
		||||
  #pragma warning ( disable : 4127 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by functions defined but not used. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4505 )
 | 
			
		||||
  #pragma warning ( disable : 4505 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by empty (after preprocessing) source file. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4206 )
 | 
			
		||||
  #pragma warning ( disable : 4206 )
 | 
			
		||||
 | 
			
		||||
#if _MSC_VER == 1800 || _MSC_VER == 1900
 | 
			
		||||
  #if defined (_MSC_VER) && _MSC_VER >= 1800
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable these warnings for VS2013.
 | 
			
		||||
@ -105,130 +98,129 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
// This warning is for potentially uninitialized local variable, and it may cause false
 | 
			
		||||
// positive issues in VS2013 and VS2015 build
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4701 )
 | 
			
		||||
    #pragma warning ( disable : 4701 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is for potentially uninitialized local pointer variable, and it may cause
 | 
			
		||||
// false positive issues in VS2013 and VS2015 build
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4703 )
 | 
			
		||||
    #pragma warning ( disable : 4703 )
 | 
			
		||||
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// use Microsoft C compiler dependent integer width types
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
#if defined(_MSC_EXTENSIONS)
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // use Microsoft C compiler dependent integer width types
 | 
			
		||||
  //
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned __int64    UINT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef __int64             INT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned __int32    UINT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef __int32             INT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
  /// values are undefined.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte Character.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned __int64 UINT64;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef __int64 INT64;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned __int32 UINT32;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef __int32 INT32;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short UINT16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short CHAR16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef short INT16;
 | 
			
		||||
///
 | 
			
		||||
/// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
/// values are undefined.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char BOOLEAN;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char UINT8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte Character.
 | 
			
		||||
///
 | 
			
		||||
typedef char CHAR8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef signed char INT8;
 | 
			
		||||
#else
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned long long  UINT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef long long           INT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned int        UINT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef int                 INT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte signed value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
  /// values are undefined.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte unsigned value.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte Character
 | 
			
		||||
  ///
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned long long UINT64;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef long long INT64;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned int UINT32;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef int INT32;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short UINT16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short CHAR16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte signed value.
 | 
			
		||||
///
 | 
			
		||||
typedef short INT16;
 | 
			
		||||
///
 | 
			
		||||
/// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
/// values are undefined.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char BOOLEAN;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte unsigned value.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char UINT8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte Character
 | 
			
		||||
///
 | 
			
		||||
typedef char CHAR8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef signed char INT8;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Unsigned value of native width.  (4 bytes on supported 32-bit processor instructions;
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions.)
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  UINTN;
 | 
			
		||||
typedef UINT32 UINTN;
 | 
			
		||||
///
 | 
			
		||||
/// Signed value of native width.  (4 bytes on supported 32-bit processor instructions;
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions.)
 | 
			
		||||
///
 | 
			
		||||
typedef INT32   INTN;
 | 
			
		||||
typedef INT32 INTN;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Processor specific defines
 | 
			
		||||
@ -237,7 +229,7 @@ typedef INT32   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the highest bit set.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_BIT     0x80000000
 | 
			
		||||
#define MAX_BIT  0x80000000
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the two highest bits set.
 | 
			
		||||
///
 | 
			
		||||
@ -246,7 +238,12 @@ typedef INT32   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal IA-32 address.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ADDRESS   0xFFFFFFFF
 | 
			
		||||
#define MAX_ADDRESS  0xFFFFFFFF
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum usable address at boot time
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ALLOC_ADDRESS  MAX_ADDRESS
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal IA-32 INTN and UINTN values.
 | 
			
		||||
@ -254,16 +251,21 @@ typedef INT32   INTN;
 | 
			
		||||
#define MAX_INTN   ((INTN)0x7FFFFFFF)
 | 
			
		||||
#define MAX_UINTN  ((UINTN)0xFFFFFFFF)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Minimum legal IA-32 INTN value.
 | 
			
		||||
///
 | 
			
		||||
#define MIN_INTN  (((INTN)-2147483647) - 1)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The stack alignment required for IA-32.
 | 
			
		||||
///
 | 
			
		||||
#define CPU_STACK_ALIGNMENT   sizeof(UINTN)
 | 
			
		||||
#define CPU_STACK_ALIGNMENT  sizeof(UINTN)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Page allocation granularity for IA-32.
 | 
			
		||||
///
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
 | 
			
		||||
@ -271,33 +273,33 @@ typedef INT32   INTN;
 | 
			
		||||
// EFI intrinsics are required to modify their member functions with EFIAPI.
 | 
			
		||||
//
 | 
			
		||||
#ifdef EFIAPI
 | 
			
		||||
  ///
 | 
			
		||||
  /// If EFIAPI is already defined, then we use that definition.
 | 
			
		||||
  ///
 | 
			
		||||
#elif defined(_MSC_EXTENSIONS)
 | 
			
		||||
  ///
 | 
			
		||||
  /// Microsoft* compiler specific method for EFIAPI calling convention.
 | 
			
		||||
  ///
 | 
			
		||||
  #define EFIAPI __cdecl
 | 
			
		||||
#elif defined(__GNUC__)
 | 
			
		||||
  ///
 | 
			
		||||
  /// GCC specific method for EFIAPI calling convention.
 | 
			
		||||
  ///
 | 
			
		||||
  #define EFIAPI __attribute__((cdecl))
 | 
			
		||||
///
 | 
			
		||||
/// If EFIAPI is already defined, then we use that definition.
 | 
			
		||||
///
 | 
			
		||||
#elif defined (_MSC_EXTENSIONS)
 | 
			
		||||
///
 | 
			
		||||
/// Microsoft* compiler specific method for EFIAPI calling convention.
 | 
			
		||||
///
 | 
			
		||||
#define EFIAPI  __cdecl
 | 
			
		||||
#elif defined (__GNUC__) || defined (__clang__)
 | 
			
		||||
///
 | 
			
		||||
/// GCC specific method for EFIAPI calling convention.
 | 
			
		||||
///
 | 
			
		||||
#define EFIAPI  __attribute__((cdecl))
 | 
			
		||||
#else
 | 
			
		||||
  ///
 | 
			
		||||
  /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI
 | 
			
		||||
  /// is the standard.
 | 
			
		||||
  ///
 | 
			
		||||
  #define EFIAPI
 | 
			
		||||
///
 | 
			
		||||
/// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI
 | 
			
		||||
/// is the standard.
 | 
			
		||||
///
 | 
			
		||||
#define EFIAPI
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__GNUC__)
 | 
			
		||||
  ///
 | 
			
		||||
  /// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
  /// Define this macro to unify the usage.
 | 
			
		||||
  ///
 | 
			
		||||
  #define ASM_GLOBAL .globl
 | 
			
		||||
#if defined (__GNUC__) || defined (__clang__)
 | 
			
		||||
///
 | 
			
		||||
/// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
/// Define this macro to unify the usage.
 | 
			
		||||
///
 | 
			
		||||
#define ASM_GLOBAL  .globl
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -310,11 +312,10 @@ typedef INT32   INTN;
 | 
			
		||||
  @return The pointer to the first instruction of a function given a function pointer.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer)  (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
 | 
			
		||||
#ifndef __USER_LABEL_PREFIX__
 | 
			
		||||
#define __USER_LABEL_PREFIX__ _
 | 
			
		||||
#define __USER_LABEL_PREFIX__  _
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,20 +1,15 @@
 | 
			
		||||
/** @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>
 | 
			
		||||
Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _ACPI_1_0_H_
 | 
			
		||||
#define _ACPI_1_0_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/AcpiAml.h>
 | 
			
		||||
 | 
			
		||||
@ -23,8 +18,8 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
/// excluding the RSD PTR structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
} EFI_ACPI_COMMON_HEADER;
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
@ -32,84 +27,84 @@ typedef struct {
 | 
			
		||||
/// The common ACPI description table header.  This structure prefaces most ACPI tables.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT8   Revision;
 | 
			
		||||
  UINT8   Checksum;
 | 
			
		||||
  UINT8   OemId[6];
 | 
			
		||||
  UINT64  OemTableId;
 | 
			
		||||
  UINT32  OemRevision;
 | 
			
		||||
  UINT32  CreatorId;
 | 
			
		||||
  UINT32  CreatorRevision;
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
  UINT8     Revision;
 | 
			
		||||
  UINT8     Checksum;
 | 
			
		||||
  UINT8     OemId[6];
 | 
			
		||||
  UINT64    OemTableId;
 | 
			
		||||
  UINT32    OemRevision;
 | 
			
		||||
  UINT32    CreatorId;
 | 
			
		||||
  UINT32    CreatorRevision;
 | 
			
		||||
} EFI_ACPI_DESCRIPTION_HEADER;
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Define for Desriptor
 | 
			
		||||
// Define for Descriptor
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_SMALL_ITEM_FLAG                   0x00
 | 
			
		||||
#define ACPI_LARGE_ITEM_FLAG                   0x01
 | 
			
		||||
#define ACPI_SMALL_ITEM_FLAG  0x00
 | 
			
		||||
#define ACPI_LARGE_ITEM_FLAG  0x01
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Small Item Descriptor Name
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_SMALL_IRQ_DESCRIPTOR_NAME                       0x04
 | 
			
		||||
#define ACPI_SMALL_DMA_DESCRIPTOR_NAME                       0x05
 | 
			
		||||
#define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME           0x06
 | 
			
		||||
#define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME             0x07
 | 
			
		||||
#define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME                   0x08
 | 
			
		||||
#define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME             0x09
 | 
			
		||||
#define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME            0x0E
 | 
			
		||||
#define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME                   0x0F
 | 
			
		||||
#define ACPI_SMALL_IRQ_DESCRIPTOR_NAME              0x04
 | 
			
		||||
#define ACPI_SMALL_DMA_DESCRIPTOR_NAME              0x05
 | 
			
		||||
#define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME  0x06
 | 
			
		||||
#define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME    0x07
 | 
			
		||||
#define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME          0x08
 | 
			
		||||
#define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME    0x09
 | 
			
		||||
#define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME   0x0E
 | 
			
		||||
#define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME          0x0F
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Large Item Descriptor Name
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME       0x01
 | 
			
		||||
#define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME            0x04
 | 
			
		||||
#define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME       0x05
 | 
			
		||||
#define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06
 | 
			
		||||
#define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME       0x07
 | 
			
		||||
#define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME        0x08
 | 
			
		||||
#define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME              0x09
 | 
			
		||||
#define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME       0x0A
 | 
			
		||||
#define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME        0x01
 | 
			
		||||
#define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME             0x04
 | 
			
		||||
#define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME        0x05
 | 
			
		||||
#define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME  0x06
 | 
			
		||||
#define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME        0x07
 | 
			
		||||
#define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME         0x08
 | 
			
		||||
#define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME               0x09
 | 
			
		||||
#define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME        0x0A
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Small Item Descriptor Value
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_IRQ_NOFLAG_DESCRIPTOR                0x22
 | 
			
		||||
#define ACPI_IRQ_DESCRIPTOR                       0x23
 | 
			
		||||
#define ACPI_DMA_DESCRIPTOR                       0x2A
 | 
			
		||||
#define ACPI_START_DEPENDENT_DESCRIPTOR           0x30
 | 
			
		||||
#define ACPI_START_DEPENDENT_EX_DESCRIPTOR        0x31
 | 
			
		||||
#define ACPI_END_DEPENDENT_DESCRIPTOR             0x38
 | 
			
		||||
#define ACPI_IO_PORT_DESCRIPTOR                   0x47
 | 
			
		||||
#define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR    0x4B
 | 
			
		||||
#define ACPI_END_TAG_DESCRIPTOR                   0x79
 | 
			
		||||
#define ACPI_IRQ_NOFLAG_DESCRIPTOR              0x22
 | 
			
		||||
#define ACPI_IRQ_DESCRIPTOR                     0x23
 | 
			
		||||
#define ACPI_DMA_DESCRIPTOR                     0x2A
 | 
			
		||||
#define ACPI_START_DEPENDENT_DESCRIPTOR         0x30
 | 
			
		||||
#define ACPI_START_DEPENDENT_EX_DESCRIPTOR      0x31
 | 
			
		||||
#define ACPI_END_DEPENDENT_DESCRIPTOR           0x38
 | 
			
		||||
#define ACPI_IO_PORT_DESCRIPTOR                 0x47
 | 
			
		||||
#define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR  0x4B
 | 
			
		||||
#define ACPI_END_TAG_DESCRIPTOR                 0x79
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Large Item Descriptor Value
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR       0x81
 | 
			
		||||
#define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR       0x85
 | 
			
		||||
#define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86
 | 
			
		||||
#define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR       0x87
 | 
			
		||||
#define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR        0x88
 | 
			
		||||
#define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR        0x89
 | 
			
		||||
#define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR       0x8A
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_DESCRIPTOR             0x8A
 | 
			
		||||
#define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR        0x81
 | 
			
		||||
#define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR        0x85
 | 
			
		||||
#define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR  0x86
 | 
			
		||||
#define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR        0x87
 | 
			
		||||
#define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR         0x88
 | 
			
		||||
#define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR         0x89
 | 
			
		||||
#define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR        0x8A
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_DESCRIPTOR              0x8A
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Resource Type
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_TYPE_MEM   0x00
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_TYPE_IO    0x01
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_TYPE_BUS   0x02
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_TYPE_MEM  0x00
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_TYPE_IO   0x01
 | 
			
		||||
#define ACPI_ADDRESS_SPACE_TYPE_BUS  0x02
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Power Management Timer frequency is fixed at 3.579545MHz.
 | 
			
		||||
///
 | 
			
		||||
#define ACPI_TIMER_FREQUENCY       3579545
 | 
			
		||||
#define ACPI_TIMER_FREQUENCY  3579545
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Ensure proper structure formats
 | 
			
		||||
@ -117,87 +112,87 @@ 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 {
 | 
			
		||||
  UINT8   Desc;
 | 
			
		||||
  UINT16  Len;
 | 
			
		||||
  UINT8   ResType;
 | 
			
		||||
  UINT8   GenFlag;
 | 
			
		||||
  UINT8   SpecificFlag;
 | 
			
		||||
  UINT64  AddrSpaceGranularity;
 | 
			
		||||
  UINT64  AddrRangeMin;
 | 
			
		||||
  UINT64  AddrRangeMax;
 | 
			
		||||
  UINT64  AddrTranslationOffset;
 | 
			
		||||
  UINT64  AddrLen;
 | 
			
		||||
  UINT8     Desc;
 | 
			
		||||
  UINT16    Len;
 | 
			
		||||
  UINT8     ResType;
 | 
			
		||||
  UINT8     GenFlag;
 | 
			
		||||
  UINT8     SpecificFlag;
 | 
			
		||||
  UINT64    AddrSpaceGranularity;
 | 
			
		||||
  UINT64    AddrRangeMin;
 | 
			
		||||
  UINT64    AddrRangeMax;
 | 
			
		||||
  UINT64    AddrTranslationOffset;
 | 
			
		||||
  UINT64    AddrLen;
 | 
			
		||||
} EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
typedef PACKED union {
 | 
			
		||||
  UINT8     Byte;
 | 
			
		||||
  UINT8    Byte;
 | 
			
		||||
  PACKED struct {
 | 
			
		||||
    UINT8 Length : 3;
 | 
			
		||||
    UINT8 Name : 4;
 | 
			
		||||
    UINT8 Type : 1;
 | 
			
		||||
    UINT8    Length : 3;
 | 
			
		||||
    UINT8    Name   : 4;
 | 
			
		||||
    UINT8    Type   : 1;
 | 
			
		||||
  } Bits;
 | 
			
		||||
} ACPI_SMALL_RESOURCE_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef PACKED struct {
 | 
			
		||||
  PACKED union {
 | 
			
		||||
    UINT8 Byte;
 | 
			
		||||
    UINT8    Byte;
 | 
			
		||||
    PACKED struct {
 | 
			
		||||
      UINT8 Name : 7;
 | 
			
		||||
      UINT8 Type : 1;
 | 
			
		||||
    }Bits;
 | 
			
		||||
      UINT8    Name : 7;
 | 
			
		||||
      UINT8    Type : 1;
 | 
			
		||||
    } Bits;
 | 
			
		||||
  } Header;
 | 
			
		||||
  UINT16 Length;
 | 
			
		||||
  UINT16    Length;
 | 
			
		||||
} ACPI_LARGE_RESOURCE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IRQ Descriptor.
 | 
			
		||||
///
 | 
			
		||||
typedef PACKED struct {
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER   Header;
 | 
			
		||||
  UINT16                       Mask;
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER    Header;
 | 
			
		||||
  UINT16                        Mask;
 | 
			
		||||
} EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IRQ Descriptor.
 | 
			
		||||
///
 | 
			
		||||
typedef PACKED struct {
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER   Header;
 | 
			
		||||
  UINT16                       Mask;
 | 
			
		||||
  UINT8                        Information;
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER    Header;
 | 
			
		||||
  UINT16                        Mask;
 | 
			
		||||
  UINT8                         Information;
 | 
			
		||||
} EFI_ACPI_IRQ_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// DMA Descriptor.
 | 
			
		||||
///
 | 
			
		||||
typedef PACKED struct {
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER   Header;
 | 
			
		||||
  UINT8                        ChannelMask;
 | 
			
		||||
  UINT8                        Information;
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER    Header;
 | 
			
		||||
  UINT8                         ChannelMask;
 | 
			
		||||
  UINT8                         Information;
 | 
			
		||||
} EFI_ACPI_DMA_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// I/O Port Descriptor
 | 
			
		||||
///
 | 
			
		||||
typedef PACKED struct {
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER   Header;
 | 
			
		||||
  UINT8                        Information;
 | 
			
		||||
  UINT16                       BaseAddressMin;
 | 
			
		||||
  UINT16                       BaseAddressMax;
 | 
			
		||||
  UINT8                        Alignment;
 | 
			
		||||
  UINT8                        Length;
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER    Header;
 | 
			
		||||
  UINT8                         Information;
 | 
			
		||||
  UINT16                        BaseAddressMin;
 | 
			
		||||
  UINT16                        BaseAddressMax;
 | 
			
		||||
  UINT8                         Alignment;
 | 
			
		||||
  UINT8                         Length;
 | 
			
		||||
} EFI_ACPI_IO_PORT_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Fixed Location I/O Port Descriptor.
 | 
			
		||||
///
 | 
			
		||||
typedef PACKED struct {
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER   Header;
 | 
			
		||||
  UINT16                       BaseAddress;
 | 
			
		||||
  UINT8                        Length;
 | 
			
		||||
  ACPI_SMALL_RESOURCE_HEADER    Header;
 | 
			
		||||
  UINT16                        BaseAddress;
 | 
			
		||||
  UINT8                         Length;
 | 
			
		||||
} EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -295,17 +290,17 @@ typedef PACKED struct {
 | 
			
		||||
/// The End tag identifies an end of resource data.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 Desc;
 | 
			
		||||
  UINT8 Checksum;
 | 
			
		||||
  UINT8    Desc;
 | 
			
		||||
  UINT8    Checksum;
 | 
			
		||||
} EFI_ACPI_END_TAG_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// General use definitions
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_RESERVED_BYTE  0x00
 | 
			
		||||
#define EFI_ACPI_RESERVED_WORD  0x0000
 | 
			
		||||
#define EFI_ACPI_RESERVED_DWORD 0x00000000
 | 
			
		||||
#define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
 | 
			
		||||
#define EFI_ACPI_RESERVED_BYTE   0x00
 | 
			
		||||
#define EFI_ACPI_RESERVED_WORD   0x0000
 | 
			
		||||
#define EFI_ACPI_RESERVED_DWORD  0x00000000
 | 
			
		||||
#define EFI_ACPI_RESERVED_QWORD  0x0000000000000000
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Resource Type Specific Flags
 | 
			
		||||
@ -313,76 +308,86 @@ typedef struct {
 | 
			
		||||
//
 | 
			
		||||
// Bit [0]    : Write Status, _RW
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE                (1 << 0)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY                 (0 << 0)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE  (1 << 0)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY   (0 << 0)
 | 
			
		||||
//
 | 
			
		||||
// Bit [2:1]  : Memory Attributes, _MEM
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE             (0 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE                 (1 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE    (3 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE              (0 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE                  (1 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING  (2 << 1)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE     (3 << 1)
 | 
			
		||||
//
 | 
			
		||||
// Bit [4:3]  : Memory Attributes, _MTP
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY      (0 << 3)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED    (1 << 3)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI        (2 << 3)
 | 
			
		||||
#define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS         (3 << 3)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY    (0 << 3)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED  (1 << 3)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI      (2 << 3)
 | 
			
		||||
#define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS       (3 << 3)
 | 
			
		||||
//
 | 
			
		||||
// Bit [5]    : Memory to I/O Translation, _TTP
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION          (1 << 5)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC               (0 << 5)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION  (1 << 5)
 | 
			
		||||
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC       (0 << 5)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// IRQ Information
 | 
			
		||||
// Ref ACPI specification 6.4.2.1
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_IRQ_SHARABLE_MASK                      0x10
 | 
			
		||||
#define   EFI_ACPI_IRQ_SHARABLE                         0x10
 | 
			
		||||
#define EFI_ACPI_IRQ_SHARABLE_MASK  0x10
 | 
			
		||||
#define   EFI_ACPI_IRQ_SHARABLE     0x10
 | 
			
		||||
 | 
			
		||||
#define EFI_ACPI_IRQ_POLARITY_MASK                      0x08
 | 
			
		||||
#define   EFI_ACPI_IRQ_HIGH_TRUE                        0x00
 | 
			
		||||
#define   EFI_ACPI_IRQ_LOW_FALSE                        0x08
 | 
			
		||||
#define EFI_ACPI_IRQ_POLARITY_MASK  0x08
 | 
			
		||||
#define   EFI_ACPI_IRQ_HIGH_TRUE    0x00
 | 
			
		||||
#define   EFI_ACPI_IRQ_LOW_FALSE    0x08
 | 
			
		||||
 | 
			
		||||
#define EFI_ACPI_IRQ_MODE                               0x01
 | 
			
		||||
#define   EFI_ACPI_IRQ_LEVEL_TRIGGERED                  0x00
 | 
			
		||||
#define   EFI_ACPI_IRQ_EDGE_TRIGGERED                   0x01
 | 
			
		||||
#define EFI_ACPI_IRQ_MODE               0x01
 | 
			
		||||
#define   EFI_ACPI_IRQ_LEVEL_TRIGGERED  0x00
 | 
			
		||||
#define   EFI_ACPI_IRQ_EDGE_TRIGGERED   0x01
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// DMA Information
 | 
			
		||||
// Ref ACPI specification 6.4.2.2
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_DMA_SPEED_TYPE_MASK                    0x60
 | 
			
		||||
#define   EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY         0x00
 | 
			
		||||
#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_SPEED_TYPE_MASK             0x60
 | 
			
		||||
#define   EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY  0x00
 | 
			
		||||
#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
 | 
			
		||||
#define EFI_ACPI_DMA_BUS_MASTER_MASK  0x04
 | 
			
		||||
#define   EFI_ACPI_DMA_BUS_MASTER     0x04
 | 
			
		||||
 | 
			
		||||
#define EFI_ACPI_DMA_TRANSFER_TYPE_MASK                 0x03
 | 
			
		||||
#define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT              0x00
 | 
			
		||||
#define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT   0x01
 | 
			
		||||
#define   EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT             0x10
 | 
			
		||||
#define EFI_ACPI_DMA_TRANSFER_TYPE_MASK                0x03
 | 
			
		||||
#define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT             0x00
 | 
			
		||||
#define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT  0x01
 | 
			
		||||
#define   EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT            0x02
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// IO Information
 | 
			
		||||
// Ref ACPI specification 6.4.2.5
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_IO_DECODE_MASK                         0x01
 | 
			
		||||
#define   EFI_ACPI_IO_DECODE_16_BIT                     0x01
 | 
			
		||||
#define   EFI_ACPI_IO_DECODE_10_BIT                     0x00
 | 
			
		||||
#define EFI_ACPI_IO_DECODE_MASK      0x01
 | 
			
		||||
#define   EFI_ACPI_IO_DECODE_16_BIT  0x01
 | 
			
		||||
#define   EFI_ACPI_IO_DECODE_10_BIT  0x00
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Memory Information
 | 
			
		||||
// Ref ACPI specification 6.4.3.4
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_MEMORY_WRITE_STATUS_MASK               0x01
 | 
			
		||||
#define   EFI_ACPI_MEMORY_WRITABLE                      0x01
 | 
			
		||||
#define   EFI_ACPI_MEMORY_NON_WRITABLE                  0x00
 | 
			
		||||
#define EFI_ACPI_MEMORY_WRITE_STATUS_MASK  0x01
 | 
			
		||||
#define   EFI_ACPI_MEMORY_WRITABLE         0x01
 | 
			
		||||
#define   EFI_ACPI_MEMORY_NON_WRITABLE     0x00
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Interrupt Vector Flags definitions for Extended Interrupt Descriptor
 | 
			
		||||
// Ref ACPI specification 6.4.3.6
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK  BIT0
 | 
			
		||||
#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_MODE_MASK               BIT1
 | 
			
		||||
#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_POLARITY_MASK           BIT2
 | 
			
		||||
#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK           BIT3
 | 
			
		||||
#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLITY_MASK     BIT4
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Ensure proper structure formats
 | 
			
		||||
@ -396,11 +401,11 @@ typedef struct {
 | 
			
		||||
/// Root System Description Pointer Structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT64  Signature;
 | 
			
		||||
  UINT8   Checksum;
 | 
			
		||||
  UINT8   OemId[6];
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT32  RsdtAddress;
 | 
			
		||||
  UINT64    Signature;
 | 
			
		||||
  UINT8     Checksum;
 | 
			
		||||
  UINT8     OemId[6];
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT32    RsdtAddress;
 | 
			
		||||
} EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -412,52 +417,52 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// RSDT Revision (as defined in ACPI 1.0b specification).
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Fixed ACPI Description Table Structure (FADT).
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      FirmwareCtrl;
 | 
			
		||||
  UINT32                      Dsdt;
 | 
			
		||||
  UINT8                       IntModel;
 | 
			
		||||
  UINT8                       Reserved1;
 | 
			
		||||
  UINT16                      SciInt;
 | 
			
		||||
  UINT32                      SmiCmd;
 | 
			
		||||
  UINT8                       AcpiEnable;
 | 
			
		||||
  UINT8                       AcpiDisable;
 | 
			
		||||
  UINT8                       S4BiosReq;
 | 
			
		||||
  UINT8                       Reserved2;
 | 
			
		||||
  UINT32                      Pm1aEvtBlk;
 | 
			
		||||
  UINT32                      Pm1bEvtBlk;
 | 
			
		||||
  UINT32                      Pm1aCntBlk;
 | 
			
		||||
  UINT32                      Pm1bCntBlk;
 | 
			
		||||
  UINT32                      Pm2CntBlk;
 | 
			
		||||
  UINT32                      PmTmrBlk;
 | 
			
		||||
  UINT32                      Gpe0Blk;
 | 
			
		||||
  UINT32                      Gpe1Blk;
 | 
			
		||||
  UINT8                       Pm1EvtLen;
 | 
			
		||||
  UINT8                       Pm1CntLen;
 | 
			
		||||
  UINT8                       Pm2CntLen;
 | 
			
		||||
  UINT8                       PmTmLen;
 | 
			
		||||
  UINT8                       Gpe0BlkLen;
 | 
			
		||||
  UINT8                       Gpe1BlkLen;
 | 
			
		||||
  UINT8                       Gpe1Base;
 | 
			
		||||
  UINT8                       Reserved3;
 | 
			
		||||
  UINT16                      PLvl2Lat;
 | 
			
		||||
  UINT16                      PLvl3Lat;
 | 
			
		||||
  UINT16                      FlushSize;
 | 
			
		||||
  UINT16                      FlushStride;
 | 
			
		||||
  UINT8                       DutyOffset;
 | 
			
		||||
  UINT8                       DutyWidth;
 | 
			
		||||
  UINT8                       DayAlrm;
 | 
			
		||||
  UINT8                       MonAlrm;
 | 
			
		||||
  UINT8                       Century;
 | 
			
		||||
  UINT8                       Reserved4;
 | 
			
		||||
  UINT8                       Reserved5;
 | 
			
		||||
  UINT8                       Reserved6;
 | 
			
		||||
  UINT32                      Flags;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         FirmwareCtrl;
 | 
			
		||||
  UINT32                         Dsdt;
 | 
			
		||||
  UINT8                          IntModel;
 | 
			
		||||
  UINT8                          Reserved1;
 | 
			
		||||
  UINT16                         SciInt;
 | 
			
		||||
  UINT32                         SmiCmd;
 | 
			
		||||
  UINT8                          AcpiEnable;
 | 
			
		||||
  UINT8                          AcpiDisable;
 | 
			
		||||
  UINT8                          S4BiosReq;
 | 
			
		||||
  UINT8                          Reserved2;
 | 
			
		||||
  UINT32                         Pm1aEvtBlk;
 | 
			
		||||
  UINT32                         Pm1bEvtBlk;
 | 
			
		||||
  UINT32                         Pm1aCntBlk;
 | 
			
		||||
  UINT32                         Pm1bCntBlk;
 | 
			
		||||
  UINT32                         Pm2CntBlk;
 | 
			
		||||
  UINT32                         PmTmrBlk;
 | 
			
		||||
  UINT32                         Gpe0Blk;
 | 
			
		||||
  UINT32                         Gpe1Blk;
 | 
			
		||||
  UINT8                          Pm1EvtLen;
 | 
			
		||||
  UINT8                          Pm1CntLen;
 | 
			
		||||
  UINT8                          Pm2CntLen;
 | 
			
		||||
  UINT8                          PmTmLen;
 | 
			
		||||
  UINT8                          Gpe0BlkLen;
 | 
			
		||||
  UINT8                          Gpe1BlkLen;
 | 
			
		||||
  UINT8                          Gpe1Base;
 | 
			
		||||
  UINT8                          Reserved3;
 | 
			
		||||
  UINT16                         PLvl2Lat;
 | 
			
		||||
  UINT16                         PLvl3Lat;
 | 
			
		||||
  UINT16                         FlushSize;
 | 
			
		||||
  UINT16                         FlushStride;
 | 
			
		||||
  UINT8                          DutyOffset;
 | 
			
		||||
  UINT8                          DutyWidth;
 | 
			
		||||
  UINT8                          DayAlrm;
 | 
			
		||||
  UINT8                          MonAlrm;
 | 
			
		||||
  UINT8                          Century;
 | 
			
		||||
  UINT8                          Reserved4;
 | 
			
		||||
  UINT8                          Reserved5;
 | 
			
		||||
  UINT8                          Reserved6;
 | 
			
		||||
  UINT32                         Flags;
 | 
			
		||||
} EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -465,63 +470,63 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
#define EFI_ACPI_1_0_INT_MODE_DUAL_PIC         0
 | 
			
		||||
#define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC    1
 | 
			
		||||
#define EFI_ACPI_1_0_INT_MODE_DUAL_PIC       0
 | 
			
		||||
#define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC  1
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Fixed ACPI Description Table Fixed Feature Flags
 | 
			
		||||
// All other bits are reserved and must be set to 0.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_1_0_WBINVD               BIT0
 | 
			
		||||
#define EFI_ACPI_1_0_WBINVD_FLUSH         BIT1
 | 
			
		||||
#define EFI_ACPI_1_0_PROC_C1              BIT2
 | 
			
		||||
#define EFI_ACPI_1_0_P_LVL2_UP            BIT3
 | 
			
		||||
#define EFI_ACPI_1_0_PWR_BUTTON           BIT4
 | 
			
		||||
#define EFI_ACPI_1_0_SLP_BUTTON           BIT5
 | 
			
		||||
#define EFI_ACPI_1_0_FIX_RTC              BIT6
 | 
			
		||||
#define EFI_ACPI_1_0_RTC_S4               BIT7
 | 
			
		||||
#define EFI_ACPI_1_0_TMR_VAL_EXT          BIT8
 | 
			
		||||
#define EFI_ACPI_1_0_DCK_CAP              BIT9
 | 
			
		||||
#define EFI_ACPI_1_0_WBINVD        BIT0
 | 
			
		||||
#define EFI_ACPI_1_0_WBINVD_FLUSH  BIT1
 | 
			
		||||
#define EFI_ACPI_1_0_PROC_C1       BIT2
 | 
			
		||||
#define EFI_ACPI_1_0_P_LVL2_UP     BIT3
 | 
			
		||||
#define EFI_ACPI_1_0_PWR_BUTTON    BIT4
 | 
			
		||||
#define EFI_ACPI_1_0_SLP_BUTTON    BIT5
 | 
			
		||||
#define EFI_ACPI_1_0_FIX_RTC       BIT6
 | 
			
		||||
#define EFI_ACPI_1_0_RTC_S4        BIT7
 | 
			
		||||
#define EFI_ACPI_1_0_TMR_VAL_EXT   BIT8
 | 
			
		||||
#define EFI_ACPI_1_0_DCK_CAP       BIT9
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Firmware ACPI Control Structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT32  HardwareSignature;
 | 
			
		||||
  UINT32  FirmwareWakingVector;
 | 
			
		||||
  UINT32  GlobalLock;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT8   Reserved[40];
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
  UINT32    HardwareSignature;
 | 
			
		||||
  UINT32    FirmwareWakingVector;
 | 
			
		||||
  UINT32    GlobalLock;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
  UINT8     Reserved[40];
 | 
			
		||||
} EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Firmware Control Structure Feature Flags.
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_1_0_S4BIOS_F             BIT0
 | 
			
		||||
#define EFI_ACPI_1_0_S4BIOS_F  BIT0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Multiple APIC Description Table header definition.  The rest of the table
 | 
			
		||||
/// must be defined in a platform-specific manner.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      LocalApicAddress;
 | 
			
		||||
  UINT32                      Flags;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         LocalApicAddress;
 | 
			
		||||
  UINT32                         Flags;
 | 
			
		||||
} EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// MADT Revision (as defined in ACPI 1.0b specification).
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Multiple APIC Flags
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_1_0_PCAT_COMPAT           BIT0
 | 
			
		||||
#define EFI_ACPI_1_0_PCAT_COMPAT  BIT0
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Multiple APIC Description Table APIC structure types
 | 
			
		||||
@ -542,71 +547,71 @@ typedef struct {
 | 
			
		||||
/// Processor Local APIC Structure Definition.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT8   ApicId;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT8     ApicId;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
} EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC Flags.  All other bits are reserved and must be 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_1_0_LOCAL_APIC_ENABLED      BIT0
 | 
			
		||||
#define EFI_ACPI_1_0_LOCAL_APIC_ENABLED  BIT0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IO APIC Structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   IoApicId;
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT32  IoApicAddress;
 | 
			
		||||
  UINT32  SystemVectorBase;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     IoApicId;
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT32    IoApicAddress;
 | 
			
		||||
  UINT32    SystemVectorBase;
 | 
			
		||||
} EFI_ACPI_1_0_IO_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Interrupt Source Override Structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   Bus;
 | 
			
		||||
  UINT8   Source;
 | 
			
		||||
  UINT32  GlobalSystemInterruptVector;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     Bus;
 | 
			
		||||
  UINT8     Source;
 | 
			
		||||
  UINT32    GlobalSystemInterruptVector;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
} EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Non-Maskable Interrupt Source Structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT32  GlobalSystemInterruptVector;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT32    GlobalSystemInterruptVector;
 | 
			
		||||
} EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC NMI Structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8   LocalApicInti;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT8     LocalApicInti;
 | 
			
		||||
} EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Smart Battery Description Table (SBST)
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      WarningEnergyLevel;
 | 
			
		||||
  UINT32                      LowEnergyLevel;
 | 
			
		||||
  UINT32                      CriticalEnergyLevel;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         WarningEnergyLevel;
 | 
			
		||||
  UINT32                         LowEnergyLevel;
 | 
			
		||||
  UINT32                         CriticalEnergyLevel;
 | 
			
		||||
} EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
@ -1,29 +1,23 @@
 | 
			
		||||
/** @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_
 | 
			
		||||
#define _ACPI_2_0_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/Acpi10.h>
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Define for Desriptor
 | 
			
		||||
// Define for Descriptor
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME          0x02
 | 
			
		||||
#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME  0x02
 | 
			
		||||
 | 
			
		||||
#define ACPI_GENERIC_REGISTER_DESCRIPTOR          0x82
 | 
			
		||||
#define ACPI_GENERIC_REGISTER_DESCRIPTOR  0x82
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Ensure proper structure formats
 | 
			
		||||
@ -53,11 +47,11 @@ typedef PACKED struct {
 | 
			
		||||
/// ACPI 2.0 Generic Address Space definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   AddressSpaceId;
 | 
			
		||||
  UINT8   RegisterBitWidth;
 | 
			
		||||
  UINT8   RegisterBitOffset;
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT64  Address;
 | 
			
		||||
  UINT8     AddressSpaceId;
 | 
			
		||||
  UINT8     RegisterBitWidth;
 | 
			
		||||
  UINT8     RegisterBitOffset;
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT64    Address;
 | 
			
		||||
} EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -78,29 +72,29 @@ typedef struct {
 | 
			
		||||
/// Root System Description Pointer Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT64  Signature;
 | 
			
		||||
  UINT8   Checksum;
 | 
			
		||||
  UINT8   OemId[6];
 | 
			
		||||
  UINT8   Revision;
 | 
			
		||||
  UINT32  RsdtAddress;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT64  XsdtAddress;
 | 
			
		||||
  UINT8   ExtendedChecksum;
 | 
			
		||||
  UINT8   Reserved[3];
 | 
			
		||||
  UINT64    Signature;
 | 
			
		||||
  UINT8     Checksum;
 | 
			
		||||
  UINT8     OemId[6];
 | 
			
		||||
  UINT8     Revision;
 | 
			
		||||
  UINT32    RsdtAddress;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
  UINT64    XsdtAddress;
 | 
			
		||||
  UINT8     ExtendedChecksum;
 | 
			
		||||
  UINT8     Reserved[3];
 | 
			
		||||
} EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
 | 
			
		||||
#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION  0x02
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Common table header, this prefaces all ACPI tables, including FACS, but
 | 
			
		||||
/// excluding the RSD PTR structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
} EFI_ACPI_2_0_COMMON_HEADER;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -112,7 +106,7 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// RSDT Revision (as defined in ACPI 2.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Extended System Description Table
 | 
			
		||||
@ -123,64 +117,64 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// XSDT Revision (as defined in ACPI 2.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Fixed ACPI Description Table Structure (FADT)
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER             Header;
 | 
			
		||||
  UINT32                                  FirmwareCtrl;
 | 
			
		||||
  UINT32                                  Dsdt;
 | 
			
		||||
  UINT8                                   Reserved0;
 | 
			
		||||
  UINT8                                   PreferredPmProfile;
 | 
			
		||||
  UINT16                                  SciInt;
 | 
			
		||||
  UINT32                                  SmiCmd;
 | 
			
		||||
  UINT8                                   AcpiEnable;
 | 
			
		||||
  UINT8                                   AcpiDisable;
 | 
			
		||||
  UINT8                                   S4BiosReq;
 | 
			
		||||
  UINT8                                   PstateCnt;
 | 
			
		||||
  UINT32                                  Pm1aEvtBlk;
 | 
			
		||||
  UINT32                                  Pm1bEvtBlk;
 | 
			
		||||
  UINT32                                  Pm1aCntBlk;
 | 
			
		||||
  UINT32                                  Pm1bCntBlk;
 | 
			
		||||
  UINT32                                  Pm2CntBlk;
 | 
			
		||||
  UINT32                                  PmTmrBlk;
 | 
			
		||||
  UINT32                                  Gpe0Blk;
 | 
			
		||||
  UINT32                                  Gpe1Blk;
 | 
			
		||||
  UINT8                                   Pm1EvtLen;
 | 
			
		||||
  UINT8                                   Pm1CntLen;
 | 
			
		||||
  UINT8                                   Pm2CntLen;
 | 
			
		||||
  UINT8                                   PmTmrLen;
 | 
			
		||||
  UINT8                                   Gpe0BlkLen;
 | 
			
		||||
  UINT8                                   Gpe1BlkLen;
 | 
			
		||||
  UINT8                                   Gpe1Base;
 | 
			
		||||
  UINT8                                   CstCnt;
 | 
			
		||||
  UINT16                                  PLvl2Lat;
 | 
			
		||||
  UINT16                                  PLvl3Lat;
 | 
			
		||||
  UINT16                                  FlushSize;
 | 
			
		||||
  UINT16                                  FlushStride;
 | 
			
		||||
  UINT8                                   DutyOffset;
 | 
			
		||||
  UINT8                                   DutyWidth;
 | 
			
		||||
  UINT8                                   DayAlrm;
 | 
			
		||||
  UINT8                                   MonAlrm;
 | 
			
		||||
  UINT8                                   Century;
 | 
			
		||||
  UINT16                                  IaPcBootArch;
 | 
			
		||||
  UINT8                                   Reserved1;
 | 
			
		||||
  UINT32                                  Flags;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  ResetReg;
 | 
			
		||||
  UINT8                                   ResetValue;
 | 
			
		||||
  UINT8                                   Reserved2[3];
 | 
			
		||||
  UINT64                                  XFirmwareCtrl;
 | 
			
		||||
  UINT64                                  XDsdt;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER               Header;
 | 
			
		||||
  UINT32                                    FirmwareCtrl;
 | 
			
		||||
  UINT32                                    Dsdt;
 | 
			
		||||
  UINT8                                     Reserved0;
 | 
			
		||||
  UINT8                                     PreferredPmProfile;
 | 
			
		||||
  UINT16                                    SciInt;
 | 
			
		||||
  UINT32                                    SmiCmd;
 | 
			
		||||
  UINT8                                     AcpiEnable;
 | 
			
		||||
  UINT8                                     AcpiDisable;
 | 
			
		||||
  UINT8                                     S4BiosReq;
 | 
			
		||||
  UINT8                                     PstateCnt;
 | 
			
		||||
  UINT32                                    Pm1aEvtBlk;
 | 
			
		||||
  UINT32                                    Pm1bEvtBlk;
 | 
			
		||||
  UINT32                                    Pm1aCntBlk;
 | 
			
		||||
  UINT32                                    Pm1bCntBlk;
 | 
			
		||||
  UINT32                                    Pm2CntBlk;
 | 
			
		||||
  UINT32                                    PmTmrBlk;
 | 
			
		||||
  UINT32                                    Gpe0Blk;
 | 
			
		||||
  UINT32                                    Gpe1Blk;
 | 
			
		||||
  UINT8                                     Pm1EvtLen;
 | 
			
		||||
  UINT8                                     Pm1CntLen;
 | 
			
		||||
  UINT8                                     Pm2CntLen;
 | 
			
		||||
  UINT8                                     PmTmrLen;
 | 
			
		||||
  UINT8                                     Gpe0BlkLen;
 | 
			
		||||
  UINT8                                     Gpe1BlkLen;
 | 
			
		||||
  UINT8                                     Gpe1Base;
 | 
			
		||||
  UINT8                                     CstCnt;
 | 
			
		||||
  UINT16                                    PLvl2Lat;
 | 
			
		||||
  UINT16                                    PLvl3Lat;
 | 
			
		||||
  UINT16                                    FlushSize;
 | 
			
		||||
  UINT16                                    FlushStride;
 | 
			
		||||
  UINT8                                     DutyOffset;
 | 
			
		||||
  UINT8                                     DutyWidth;
 | 
			
		||||
  UINT8                                     DayAlrm;
 | 
			
		||||
  UINT8                                     MonAlrm;
 | 
			
		||||
  UINT8                                     Century;
 | 
			
		||||
  UINT16                                    IaPcBootArch;
 | 
			
		||||
  UINT8                                     Reserved1;
 | 
			
		||||
  UINT32                                    Flags;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    ResetReg;
 | 
			
		||||
  UINT8                                     ResetValue;
 | 
			
		||||
  UINT8                                     Reserved2[3];
 | 
			
		||||
  UINT64                                    XFirmwareCtrl;
 | 
			
		||||
  UINT64                                    XDsdt;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XPm1aEvtBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XPm1bEvtBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XPm1aCntBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XPm1bCntBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XPm2CntBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XPmTmrBlk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XGpe0Blk;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    XGpe1Blk;
 | 
			
		||||
} EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -191,53 +185,53 @@ typedef struct {
 | 
			
		||||
//
 | 
			
		||||
// Fixed ACPI Description Table Preferred Power Management Profile
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED         0
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP             1
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_MOBILE              2
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION         3
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER   4
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER         5
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC        6
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED        0
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP            1
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_MOBILE             2
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION        3
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER  4
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER        5
 | 
			
		||||
#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC       6
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Fixed ACPI Description Table Boot Architecture Flags
 | 
			
		||||
// All other bits are reserved and must be set to 0.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_2_0_LEGACY_DEVICES          BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_8042                    BIT1
 | 
			
		||||
#define EFI_ACPI_2_0_LEGACY_DEVICES  BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_8042            BIT1
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Fixed ACPI Description Table Fixed Feature Flags
 | 
			
		||||
// All other bits are reserved and must be set to 0.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_2_0_WBINVD                  BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_WBINVD_FLUSH            BIT1
 | 
			
		||||
#define EFI_ACPI_2_0_PROC_C1                 BIT2
 | 
			
		||||
#define EFI_ACPI_2_0_P_LVL2_UP               BIT3
 | 
			
		||||
#define EFI_ACPI_2_0_PWR_BUTTON              BIT4
 | 
			
		||||
#define EFI_ACPI_2_0_SLP_BUTTON              BIT5
 | 
			
		||||
#define EFI_ACPI_2_0_FIX_RTC                 BIT6
 | 
			
		||||
#define EFI_ACPI_2_0_RTC_S4                  BIT7
 | 
			
		||||
#define EFI_ACPI_2_0_TMR_VAL_EXT             BIT8
 | 
			
		||||
#define EFI_ACPI_2_0_DCK_CAP                 BIT9
 | 
			
		||||
#define EFI_ACPI_2_0_RESET_REG_SUP           BIT10
 | 
			
		||||
#define EFI_ACPI_2_0_SEALED_CASE             BIT11
 | 
			
		||||
#define EFI_ACPI_2_0_HEADLESS                BIT12
 | 
			
		||||
#define EFI_ACPI_2_0_CPU_SW_SLP              BIT13
 | 
			
		||||
#define EFI_ACPI_2_0_WBINVD         BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_WBINVD_FLUSH   BIT1
 | 
			
		||||
#define EFI_ACPI_2_0_PROC_C1        BIT2
 | 
			
		||||
#define EFI_ACPI_2_0_P_LVL2_UP      BIT3
 | 
			
		||||
#define EFI_ACPI_2_0_PWR_BUTTON     BIT4
 | 
			
		||||
#define EFI_ACPI_2_0_SLP_BUTTON     BIT5
 | 
			
		||||
#define EFI_ACPI_2_0_FIX_RTC        BIT6
 | 
			
		||||
#define EFI_ACPI_2_0_RTC_S4         BIT7
 | 
			
		||||
#define EFI_ACPI_2_0_TMR_VAL_EXT    BIT8
 | 
			
		||||
#define EFI_ACPI_2_0_DCK_CAP        BIT9
 | 
			
		||||
#define EFI_ACPI_2_0_RESET_REG_SUP  BIT10
 | 
			
		||||
#define EFI_ACPI_2_0_SEALED_CASE    BIT11
 | 
			
		||||
#define EFI_ACPI_2_0_HEADLESS       BIT12
 | 
			
		||||
#define EFI_ACPI_2_0_CPU_SW_SLP     BIT13
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Firmware ACPI Control Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT32  HardwareSignature;
 | 
			
		||||
  UINT32  FirmwareWakingVector;
 | 
			
		||||
  UINT32  GlobalLock;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT64  XFirmwareWakingVector;
 | 
			
		||||
  UINT8   Version;
 | 
			
		||||
  UINT8   Reserved[31];
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
  UINT32    HardwareSignature;
 | 
			
		||||
  UINT32    FirmwareWakingVector;
 | 
			
		||||
  UINT32    GlobalLock;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
  UINT64    XFirmwareWakingVector;
 | 
			
		||||
  UINT8     Version;
 | 
			
		||||
  UINT8     Reserved[31];
 | 
			
		||||
} EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -249,28 +243,28 @@ typedef struct {
 | 
			
		||||
/// Firmware Control Structure Feature Flags
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_S4BIOS_F        BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_S4BIOS_F  BIT0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Multiple APIC Description Table header definition.  The rest of the table
 | 
			
		||||
/// must be defined in a platform specific manner.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      LocalApicAddress;
 | 
			
		||||
  UINT32                      Flags;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         LocalApicAddress;
 | 
			
		||||
  UINT32                         Flags;
 | 
			
		||||
} EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// MADT Revision (as defined in ACPI 2.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Multiple APIC Flags
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_PCAT_COMPAT          BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_PCAT_COMPAT  BIT0
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Multiple APIC Description Table APIC structure types
 | 
			
		||||
@ -295,127 +289,127 @@ typedef struct {
 | 
			
		||||
/// Processor Local APIC Structure Definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT8   ApicId;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT8     ApicId;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
} EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC Flags.  All other bits are reserved and must be 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED         BIT0
 | 
			
		||||
#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED  BIT0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IO APIC Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   IoApicId;
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT32  IoApicAddress;
 | 
			
		||||
  UINT32  GlobalSystemInterruptBase;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     IoApicId;
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT32    IoApicAddress;
 | 
			
		||||
  UINT32    GlobalSystemInterruptBase;
 | 
			
		||||
} EFI_ACPI_2_0_IO_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Interrupt Source Override Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   Bus;
 | 
			
		||||
  UINT8   Source;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     Bus;
 | 
			
		||||
  UINT8     Source;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
} EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Non-Maskable Interrupt Source Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
} EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC NMI Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8   LocalApicLint;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT8     LocalApicLint;
 | 
			
		||||
} EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC Address Override Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Reserved;
 | 
			
		||||
  UINT64  LocalApicAddress;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Reserved;
 | 
			
		||||
  UINT64    LocalApicAddress;
 | 
			
		||||
} EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IO SAPIC Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   IoApicId;
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT32  GlobalSystemInterruptBase;
 | 
			
		||||
  UINT64  IoSapicAddress;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     IoApicId;
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT32    GlobalSystemInterruptBase;
 | 
			
		||||
  UINT64    IoSapicAddress;
 | 
			
		||||
} EFI_ACPI_2_0_IO_SAPIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local SAPIC Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT8   LocalSapicId;
 | 
			
		||||
  UINT8   LocalSapicEid;
 | 
			
		||||
  UINT8   Reserved[3];
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT8     LocalSapicId;
 | 
			
		||||
  UINT8     LocalSapicEid;
 | 
			
		||||
  UINT8     Reserved[3];
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
} EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Platform Interrupt Sources Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8   InterruptType;
 | 
			
		||||
  UINT8   ProcessorId;
 | 
			
		||||
  UINT8   ProcessorEid;
 | 
			
		||||
  UINT8   IoSapicVector;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT32  Reserved;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT8     InterruptType;
 | 
			
		||||
  UINT8     ProcessorId;
 | 
			
		||||
  UINT8     ProcessorEid;
 | 
			
		||||
  UINT8     IoSapicVector;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
  UINT32    Reserved;
 | 
			
		||||
} EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Smart Battery Description Table (SBST)
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      WarningEnergyLevel;
 | 
			
		||||
  UINT32                      LowEnergyLevel;
 | 
			
		||||
  UINT32                      CriticalEnergyLevel;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         WarningEnergyLevel;
 | 
			
		||||
  UINT32                         LowEnergyLevel;
 | 
			
		||||
  UINT32                         CriticalEnergyLevel;
 | 
			
		||||
} EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// SBST Version (as defined in ACPI 2.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Embedded Controller Boot Resources Table (ECDT)
 | 
			
		||||
@ -423,11 +417,11 @@ typedef struct {
 | 
			
		||||
/// a fully qualified reference to the name space object.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER             Header;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  EcControl;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE  EcData;
 | 
			
		||||
  UINT32                                  Uid;
 | 
			
		||||
  UINT8                                   GpeBit;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER               Header;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    EcControl;
 | 
			
		||||
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    EcData;
 | 
			
		||||
  UINT32                                    Uid;
 | 
			
		||||
  UINT8                                     GpeBit;
 | 
			
		||||
} EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -513,7 +507,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')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,29 +1,23 @@
 | 
			
		||||
/** @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_
 | 
			
		||||
#define _ACPI_3_0_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/Acpi20.h>
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Define for Desriptor
 | 
			
		||||
// Define for Descriptor
 | 
			
		||||
//
 | 
			
		||||
#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME    0x0B
 | 
			
		||||
#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME  0x0B
 | 
			
		||||
 | 
			
		||||
#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR    0x8B
 | 
			
		||||
#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR  0x8B
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Ensure proper structure formats
 | 
			
		||||
@ -53,12 +47,12 @@ typedef PACKED struct {
 | 
			
		||||
//
 | 
			
		||||
// Memory Type Specific Flags
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC  0x0000000000000001
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC  0x0000000000000002
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT  0x0000000000000004
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB  0x0000000000000008
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV  0x0000000000008000
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC   0x0000000000000001
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC   0x0000000000000002
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT   0x0000000000000004
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB   0x0000000000000008
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE  0x0000000000000010
 | 
			
		||||
#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV   0x0000000000008000
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Ensure proper structure formats
 | 
			
		||||
@ -69,11 +63,11 @@ typedef PACKED struct {
 | 
			
		||||
/// ACPI 3.0 Generic Address Space definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   AddressSpaceId;
 | 
			
		||||
  UINT8   RegisterBitWidth;
 | 
			
		||||
  UINT8   RegisterBitOffset;
 | 
			
		||||
  UINT8   AccessSize;
 | 
			
		||||
  UINT64  Address;
 | 
			
		||||
  UINT8     AddressSpaceId;
 | 
			
		||||
  UINT8     RegisterBitWidth;
 | 
			
		||||
  UINT8     RegisterBitOffset;
 | 
			
		||||
  UINT8     AccessSize;
 | 
			
		||||
  UINT64    Address;
 | 
			
		||||
} EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -103,29 +97,29 @@ typedef struct {
 | 
			
		||||
/// Root System Description Pointer Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT64  Signature;
 | 
			
		||||
  UINT8   Checksum;
 | 
			
		||||
  UINT8   OemId[6];
 | 
			
		||||
  UINT8   Revision;
 | 
			
		||||
  UINT32  RsdtAddress;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT64  XsdtAddress;
 | 
			
		||||
  UINT8   ExtendedChecksum;
 | 
			
		||||
  UINT8   Reserved[3];
 | 
			
		||||
  UINT64    Signature;
 | 
			
		||||
  UINT8     Checksum;
 | 
			
		||||
  UINT8     OemId[6];
 | 
			
		||||
  UINT8     Revision;
 | 
			
		||||
  UINT32    RsdtAddress;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
  UINT64    XsdtAddress;
 | 
			
		||||
  UINT8     ExtendedChecksum;
 | 
			
		||||
  UINT8     Reserved[3];
 | 
			
		||||
} EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02  ///< ACPISpec (Revision 3.0b) says current value is 2
 | 
			
		||||
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION  0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Common table header, this prefaces all ACPI tables, including FACS, but
 | 
			
		||||
/// excluding the RSD PTR structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
} EFI_ACPI_3_0_COMMON_HEADER;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -137,7 +131,7 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// RSDT Revision (as defined in ACPI 3.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Extended System Description Table
 | 
			
		||||
@ -148,64 +142,64 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// XSDT Revision (as defined in ACPI 3.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Fixed ACPI Description Table Structure (FADT)
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER             Header;
 | 
			
		||||
  UINT32                                  FirmwareCtrl;
 | 
			
		||||
  UINT32                                  Dsdt;
 | 
			
		||||
  UINT8                                   Reserved0;
 | 
			
		||||
  UINT8                                   PreferredPmProfile;
 | 
			
		||||
  UINT16                                  SciInt;
 | 
			
		||||
  UINT32                                  SmiCmd;
 | 
			
		||||
  UINT8                                   AcpiEnable;
 | 
			
		||||
  UINT8                                   AcpiDisable;
 | 
			
		||||
  UINT8                                   S4BiosReq;
 | 
			
		||||
  UINT8                                   PstateCnt;
 | 
			
		||||
  UINT32                                  Pm1aEvtBlk;
 | 
			
		||||
  UINT32                                  Pm1bEvtBlk;
 | 
			
		||||
  UINT32                                  Pm1aCntBlk;
 | 
			
		||||
  UINT32                                  Pm1bCntBlk;
 | 
			
		||||
  UINT32                                  Pm2CntBlk;
 | 
			
		||||
  UINT32                                  PmTmrBlk;
 | 
			
		||||
  UINT32                                  Gpe0Blk;
 | 
			
		||||
  UINT32                                  Gpe1Blk;
 | 
			
		||||
  UINT8                                   Pm1EvtLen;
 | 
			
		||||
  UINT8                                   Pm1CntLen;
 | 
			
		||||
  UINT8                                   Pm2CntLen;
 | 
			
		||||
  UINT8                                   PmTmrLen;
 | 
			
		||||
  UINT8                                   Gpe0BlkLen;
 | 
			
		||||
  UINT8                                   Gpe1BlkLen;
 | 
			
		||||
  UINT8                                   Gpe1Base;
 | 
			
		||||
  UINT8                                   CstCnt;
 | 
			
		||||
  UINT16                                  PLvl2Lat;
 | 
			
		||||
  UINT16                                  PLvl3Lat;
 | 
			
		||||
  UINT16                                  FlushSize;
 | 
			
		||||
  UINT16                                  FlushStride;
 | 
			
		||||
  UINT8                                   DutyOffset;
 | 
			
		||||
  UINT8                                   DutyWidth;
 | 
			
		||||
  UINT8                                   DayAlrm;
 | 
			
		||||
  UINT8                                   MonAlrm;
 | 
			
		||||
  UINT8                                   Century;
 | 
			
		||||
  UINT16                                  IaPcBootArch;
 | 
			
		||||
  UINT8                                   Reserved1;
 | 
			
		||||
  UINT32                                  Flags;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  ResetReg;
 | 
			
		||||
  UINT8                                   ResetValue;
 | 
			
		||||
  UINT8                                   Reserved2[3];
 | 
			
		||||
  UINT64                                  XFirmwareCtrl;
 | 
			
		||||
  UINT64                                  XDsdt;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER               Header;
 | 
			
		||||
  UINT32                                    FirmwareCtrl;
 | 
			
		||||
  UINT32                                    Dsdt;
 | 
			
		||||
  UINT8                                     Reserved0;
 | 
			
		||||
  UINT8                                     PreferredPmProfile;
 | 
			
		||||
  UINT16                                    SciInt;
 | 
			
		||||
  UINT32                                    SmiCmd;
 | 
			
		||||
  UINT8                                     AcpiEnable;
 | 
			
		||||
  UINT8                                     AcpiDisable;
 | 
			
		||||
  UINT8                                     S4BiosReq;
 | 
			
		||||
  UINT8                                     PstateCnt;
 | 
			
		||||
  UINT32                                    Pm1aEvtBlk;
 | 
			
		||||
  UINT32                                    Pm1bEvtBlk;
 | 
			
		||||
  UINT32                                    Pm1aCntBlk;
 | 
			
		||||
  UINT32                                    Pm1bCntBlk;
 | 
			
		||||
  UINT32                                    Pm2CntBlk;
 | 
			
		||||
  UINT32                                    PmTmrBlk;
 | 
			
		||||
  UINT32                                    Gpe0Blk;
 | 
			
		||||
  UINT32                                    Gpe1Blk;
 | 
			
		||||
  UINT8                                     Pm1EvtLen;
 | 
			
		||||
  UINT8                                     Pm1CntLen;
 | 
			
		||||
  UINT8                                     Pm2CntLen;
 | 
			
		||||
  UINT8                                     PmTmrLen;
 | 
			
		||||
  UINT8                                     Gpe0BlkLen;
 | 
			
		||||
  UINT8                                     Gpe1BlkLen;
 | 
			
		||||
  UINT8                                     Gpe1Base;
 | 
			
		||||
  UINT8                                     CstCnt;
 | 
			
		||||
  UINT16                                    PLvl2Lat;
 | 
			
		||||
  UINT16                                    PLvl3Lat;
 | 
			
		||||
  UINT16                                    FlushSize;
 | 
			
		||||
  UINT16                                    FlushStride;
 | 
			
		||||
  UINT8                                     DutyOffset;
 | 
			
		||||
  UINT8                                     DutyWidth;
 | 
			
		||||
  UINT8                                     DayAlrm;
 | 
			
		||||
  UINT8                                     MonAlrm;
 | 
			
		||||
  UINT8                                     Century;
 | 
			
		||||
  UINT16                                    IaPcBootArch;
 | 
			
		||||
  UINT8                                     Reserved1;
 | 
			
		||||
  UINT32                                    Flags;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    ResetReg;
 | 
			
		||||
  UINT8                                     ResetValue;
 | 
			
		||||
  UINT8                                     Reserved2[3];
 | 
			
		||||
  UINT64                                    XFirmwareCtrl;
 | 
			
		||||
  UINT64                                    XDsdt;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XPm1aEvtBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XPm1bEvtBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XPm1aCntBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XPm1bCntBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XPm2CntBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XPmTmrBlk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XGpe0Blk;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    XGpe1Blk;
 | 
			
		||||
} EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -229,50 +223,50 @@ typedef struct {
 | 
			
		||||
// Fixed ACPI Description Table Boot Architecture Flags
 | 
			
		||||
// All other bits are reserved and must be set to 0.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_3_0_LEGACY_DEVICES              BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_8042                        BIT1
 | 
			
		||||
#define EFI_ACPI_3_0_VGA_NOT_PRESENT             BIT2
 | 
			
		||||
#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED           BIT3
 | 
			
		||||
#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS          BIT4
 | 
			
		||||
#define EFI_ACPI_3_0_LEGACY_DEVICES      BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_8042                BIT1
 | 
			
		||||
#define EFI_ACPI_3_0_VGA_NOT_PRESENT     BIT2
 | 
			
		||||
#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED   BIT3
 | 
			
		||||
#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS  BIT4
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Fixed ACPI Description Table Fixed Feature Flags
 | 
			
		||||
// All other bits are reserved and must be set to 0.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_3_0_WBINVD                                 BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_WBINVD_FLUSH                           BIT1
 | 
			
		||||
#define EFI_ACPI_3_0_PROC_C1                                BIT2
 | 
			
		||||
#define EFI_ACPI_3_0_P_LVL2_UP                              BIT3
 | 
			
		||||
#define EFI_ACPI_3_0_PWR_BUTTON                             BIT4
 | 
			
		||||
#define EFI_ACPI_3_0_SLP_BUTTON                             BIT5
 | 
			
		||||
#define EFI_ACPI_3_0_FIX_RTC                                BIT6
 | 
			
		||||
#define EFI_ACPI_3_0_RTC_S4                                 BIT7
 | 
			
		||||
#define EFI_ACPI_3_0_TMR_VAL_EXT                            BIT8
 | 
			
		||||
#define EFI_ACPI_3_0_DCK_CAP                                BIT9
 | 
			
		||||
#define EFI_ACPI_3_0_RESET_REG_SUP                          BIT10
 | 
			
		||||
#define EFI_ACPI_3_0_SEALED_CASE                            BIT11
 | 
			
		||||
#define EFI_ACPI_3_0_HEADLESS                               BIT12
 | 
			
		||||
#define EFI_ACPI_3_0_CPU_SW_SLP                             BIT13
 | 
			
		||||
#define EFI_ACPI_3_0_PCI_EXP_WAK                            BIT14
 | 
			
		||||
#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK                     BIT15
 | 
			
		||||
#define EFI_ACPI_3_0_S4_RTC_STS_VALID                       BIT16
 | 
			
		||||
#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE                BIT17
 | 
			
		||||
#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL               BIT18
 | 
			
		||||
#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE   BIT19
 | 
			
		||||
#define EFI_ACPI_3_0_WBINVD                                BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_WBINVD_FLUSH                          BIT1
 | 
			
		||||
#define EFI_ACPI_3_0_PROC_C1                               BIT2
 | 
			
		||||
#define EFI_ACPI_3_0_P_LVL2_UP                             BIT3
 | 
			
		||||
#define EFI_ACPI_3_0_PWR_BUTTON                            BIT4
 | 
			
		||||
#define EFI_ACPI_3_0_SLP_BUTTON                            BIT5
 | 
			
		||||
#define EFI_ACPI_3_0_FIX_RTC                               BIT6
 | 
			
		||||
#define EFI_ACPI_3_0_RTC_S4                                BIT7
 | 
			
		||||
#define EFI_ACPI_3_0_TMR_VAL_EXT                           BIT8
 | 
			
		||||
#define EFI_ACPI_3_0_DCK_CAP                               BIT9
 | 
			
		||||
#define EFI_ACPI_3_0_RESET_REG_SUP                         BIT10
 | 
			
		||||
#define EFI_ACPI_3_0_SEALED_CASE                           BIT11
 | 
			
		||||
#define EFI_ACPI_3_0_HEADLESS                              BIT12
 | 
			
		||||
#define EFI_ACPI_3_0_CPU_SW_SLP                            BIT13
 | 
			
		||||
#define EFI_ACPI_3_0_PCI_EXP_WAK                           BIT14
 | 
			
		||||
#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK                    BIT15
 | 
			
		||||
#define EFI_ACPI_3_0_S4_RTC_STS_VALID                      BIT16
 | 
			
		||||
#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE               BIT17
 | 
			
		||||
#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL              BIT18
 | 
			
		||||
#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE  BIT19
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Firmware ACPI Control Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;
 | 
			
		||||
  UINT32  Length;
 | 
			
		||||
  UINT32  HardwareSignature;
 | 
			
		||||
  UINT32  FirmwareWakingVector;
 | 
			
		||||
  UINT32  GlobalLock;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT64  XFirmwareWakingVector;
 | 
			
		||||
  UINT8   Version;
 | 
			
		||||
  UINT8   Reserved[31];
 | 
			
		||||
  UINT32    Signature;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
  UINT32    HardwareSignature;
 | 
			
		||||
  UINT32    FirmwareWakingVector;
 | 
			
		||||
  UINT32    GlobalLock;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
  UINT64    XFirmwareWakingVector;
 | 
			
		||||
  UINT8     Version;
 | 
			
		||||
  UINT8     Reserved[31];
 | 
			
		||||
} EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -284,7 +278,7 @@ typedef struct {
 | 
			
		||||
/// Firmware Control Structure Feature Flags
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_S4BIOS_F       BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_S4BIOS_F  BIT0
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Differentiated System Description Table,
 | 
			
		||||
@ -293,29 +287,29 @@ typedef struct {
 | 
			
		||||
// no definition needed as they are common description table header, the same with
 | 
			
		||||
// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION   0x02
 | 
			
		||||
#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION        0x02
 | 
			
		||||
#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION  0x02
 | 
			
		||||
#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION       0x02
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Multiple APIC Description Table header definition.  The rest of the table
 | 
			
		||||
/// must be defined in a platform specific manner.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      LocalApicAddress;
 | 
			
		||||
  UINT32                      Flags;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         LocalApicAddress;
 | 
			
		||||
  UINT32                         Flags;
 | 
			
		||||
} EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// MADT Revision (as defined in ACPI 3.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
 | 
			
		||||
#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION  0x02
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Multiple APIC Flags
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_PCAT_COMPAT         BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_PCAT_COMPAT  BIT0
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Multiple APIC Description Table APIC structure types
 | 
			
		||||
@ -340,57 +334,57 @@ typedef struct {
 | 
			
		||||
/// Processor Local APIC Structure Definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT8   ApicId;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT8     ApicId;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC Flags.  All other bits are reserved and must be 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED        BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED  BIT0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IO APIC Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   IoApicId;
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT32  IoApicAddress;
 | 
			
		||||
  UINT32  GlobalSystemInterruptBase;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     IoApicId;
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT32    IoApicAddress;
 | 
			
		||||
  UINT32    GlobalSystemInterruptBase;
 | 
			
		||||
} EFI_ACPI_3_0_IO_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Interrupt Source Override Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   Bus;
 | 
			
		||||
  UINT8   Source;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     Bus;
 | 
			
		||||
  UINT8     Source;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
} EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Platform Interrupt Sources Structure Definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8   InterruptType;
 | 
			
		||||
  UINT8   ProcessorId;
 | 
			
		||||
  UINT8   ProcessorEid;
 | 
			
		||||
  UINT8   IoSapicVector;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT32  PlatformInterruptSourceFlags;
 | 
			
		||||
  UINT8   CpeiProcessorOverride;
 | 
			
		||||
  UINT8   Reserved[31];
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT8     InterruptType;
 | 
			
		||||
  UINT8     ProcessorId;
 | 
			
		||||
  UINT8     ProcessorEid;
 | 
			
		||||
  UINT8     IoSapicVector;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
  UINT32    PlatformInterruptSourceFlags;
 | 
			
		||||
  UINT8     CpeiProcessorOverride;
 | 
			
		||||
  UINT8     Reserved[31];
 | 
			
		||||
} EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -404,43 +398,43 @@ typedef struct {
 | 
			
		||||
/// Non-Maskable Interrupt Source Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
} EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC NMI Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8   LocalApicLint;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT8     LocalApicLint;
 | 
			
		||||
} EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC Address Override Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Reserved;
 | 
			
		||||
  UINT64  LocalApicAddress;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Reserved;
 | 
			
		||||
  UINT64    LocalApicAddress;
 | 
			
		||||
} EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IO SAPIC Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   IoApicId;
 | 
			
		||||
  UINT8   Reserved;
 | 
			
		||||
  UINT32  GlobalSystemInterruptBase;
 | 
			
		||||
  UINT64  IoSapicAddress;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     IoApicId;
 | 
			
		||||
  UINT8     Reserved;
 | 
			
		||||
  UINT32    GlobalSystemInterruptBase;
 | 
			
		||||
  UINT64    IoSapicAddress;
 | 
			
		||||
} EFI_ACPI_3_0_IO_SAPIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -448,51 +442,51 @@ typedef struct {
 | 
			
		||||
/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   AcpiProcessorId;
 | 
			
		||||
  UINT8   LocalSapicId;
 | 
			
		||||
  UINT8   LocalSapicEid;
 | 
			
		||||
  UINT8   Reserved[3];
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT32  ACPIProcessorUIDValue;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     AcpiProcessorId;
 | 
			
		||||
  UINT8     LocalSapicId;
 | 
			
		||||
  UINT8     LocalSapicEid;
 | 
			
		||||
  UINT8     Reserved[3];
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
  UINT32    ACPIProcessorUIDValue;
 | 
			
		||||
} EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Platform Interrupt Sources Structure
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT16  Flags;
 | 
			
		||||
  UINT8   InterruptType;
 | 
			
		||||
  UINT8   ProcessorId;
 | 
			
		||||
  UINT8   ProcessorEid;
 | 
			
		||||
  UINT8   IoSapicVector;
 | 
			
		||||
  UINT32  GlobalSystemInterrupt;
 | 
			
		||||
  UINT32  PlatformInterruptSourceFlags;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT16    Flags;
 | 
			
		||||
  UINT8     InterruptType;
 | 
			
		||||
  UINT8     ProcessorId;
 | 
			
		||||
  UINT8     ProcessorEid;
 | 
			
		||||
  UINT8     IoSapicVector;
 | 
			
		||||
  UINT32    GlobalSystemInterrupt;
 | 
			
		||||
  UINT32    PlatformInterruptSourceFlags;
 | 
			
		||||
} EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Platform Interrupt Source Flags.
 | 
			
		||||
/// All other bits are reserved and must be set to 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE          BIT0
 | 
			
		||||
#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE  BIT0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Smart Battery Description Table (SBST)
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      WarningEnergyLevel;
 | 
			
		||||
  UINT32                      LowEnergyLevel;
 | 
			
		||||
  UINT32                      CriticalEnergyLevel;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         WarningEnergyLevel;
 | 
			
		||||
  UINT32                         LowEnergyLevel;
 | 
			
		||||
  UINT32                         CriticalEnergyLevel;
 | 
			
		||||
} EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// SBST Version (as defined in ACPI 3.0 spec.)
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
 | 
			
		||||
#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION  0x01
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Embedded Controller Boot Resources Table (ECDT)
 | 
			
		||||
@ -500,11 +494,11 @@ typedef struct {
 | 
			
		||||
/// a fully qualified reference to the name space object.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER             Header;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  EcControl;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE  EcData;
 | 
			
		||||
  UINT32                                  Uid;
 | 
			
		||||
  UINT8                                   GpeBit;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER               Header;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    EcControl;
 | 
			
		||||
  EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE    EcData;
 | 
			
		||||
  UINT32                                    Uid;
 | 
			
		||||
  UINT8                                     GpeBit;
 | 
			
		||||
} EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -517,9 +511,9 @@ typedef struct {
 | 
			
		||||
/// must be defined in a platform specific manner.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT32                      Reserved1;  ///< Must be set to 1
 | 
			
		||||
  UINT64                      Reserved2;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT32                         Reserved1; ///< Must be set to 1
 | 
			
		||||
  UINT64                         Reserved2;
 | 
			
		||||
} EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -539,52 +533,52 @@ typedef struct {
 | 
			
		||||
/// Processor Local APIC/SAPIC Affinity Structure Definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT8   ProximityDomain7To0;
 | 
			
		||||
  UINT8   ApicId;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT8   LocalSapicEid;
 | 
			
		||||
  UINT8   ProximityDomain31To8[3];
 | 
			
		||||
  UINT8   Reserved[4];
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     ProximityDomain7To0;
 | 
			
		||||
  UINT8     ApicId;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
  UINT8     LocalSapicEid;
 | 
			
		||||
  UINT8     ProximityDomain31To8[3];
 | 
			
		||||
  UINT8     Reserved[4];
 | 
			
		||||
} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Local APIC/SAPIC Flags.  All other bits are reserved and must be 0.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
 | 
			
		||||
#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED  (1 << 0)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Memory Affinity Structure Definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Length;
 | 
			
		||||
  UINT32  ProximityDomain;
 | 
			
		||||
  UINT16  Reserved1;
 | 
			
		||||
  UINT32  AddressBaseLow;
 | 
			
		||||
  UINT32  AddressBaseHigh;
 | 
			
		||||
  UINT32  LengthLow;
 | 
			
		||||
  UINT32  LengthHigh;
 | 
			
		||||
  UINT32  Reserved2;
 | 
			
		||||
  UINT32  Flags;
 | 
			
		||||
  UINT64  Reserved3;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT32    ProximityDomain;
 | 
			
		||||
  UINT16    Reserved1;
 | 
			
		||||
  UINT32    AddressBaseLow;
 | 
			
		||||
  UINT32    AddressBaseHigh;
 | 
			
		||||
  UINT32    LengthLow;
 | 
			
		||||
  UINT32    LengthHigh;
 | 
			
		||||
  UINT32    Reserved2;
 | 
			
		||||
  UINT32    Flags;
 | 
			
		||||
  UINT64    Reserved3;
 | 
			
		||||
} EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Memory Flags.  All other bits are reserved and must be 0.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_ACPI_3_0_MEMORY_ENABLED       (1 << 0)
 | 
			
		||||
#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
 | 
			
		||||
#define EFI_ACPI_3_0_MEMORY_NONVOLATILE   (1 << 2)
 | 
			
		||||
#define EFI_ACPI_3_0_MEMORY_ENABLED        (1 << 0)
 | 
			
		||||
#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE  (1 << 1)
 | 
			
		||||
#define EFI_ACPI_3_0_MEMORY_NONVOLATILE    (1 << 2)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// System Locality Distance Information Table (SLIT).
 | 
			
		||||
/// The rest of the table is a matrix.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER Header;
 | 
			
		||||
  UINT64                      NumberOfSystemLocalities;
 | 
			
		||||
  EFI_ACPI_DESCRIPTION_HEADER    Header;
 | 
			
		||||
  UINT64                         NumberOfSystemLocalities;
 | 
			
		||||
} EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -692,7 +686,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')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -2,20 +2,15 @@
 | 
			
		||||
  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 - 2021, Arm Limited. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _ACPI_AML_H_
 | 
			
		||||
#define _ACPI_AML_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ACPI AML definition
 | 
			
		||||
@ -24,154 +19,168 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Primary OpCode
 | 
			
		||||
//
 | 
			
		||||
#define AML_ZERO_OP                  0x00
 | 
			
		||||
#define AML_ONE_OP                   0x01
 | 
			
		||||
#define AML_ALIAS_OP                 0x06
 | 
			
		||||
#define AML_NAME_OP                  0x08
 | 
			
		||||
#define AML_BYTE_PREFIX              0x0a
 | 
			
		||||
#define AML_WORD_PREFIX              0x0b
 | 
			
		||||
#define AML_DWORD_PREFIX             0x0c
 | 
			
		||||
#define AML_STRING_PREFIX            0x0d
 | 
			
		||||
#define AML_QWORD_PREFIX             0x0e
 | 
			
		||||
#define AML_SCOPE_OP                 0x10
 | 
			
		||||
#define AML_BUFFER_OP                0x11
 | 
			
		||||
#define AML_PACKAGE_OP               0x12
 | 
			
		||||
#define AML_VAR_PACKAGE_OP           0x13
 | 
			
		||||
#define AML_METHOD_OP                0x14
 | 
			
		||||
#define AML_DUAL_NAME_PREFIX         0x2e
 | 
			
		||||
#define AML_MULTI_NAME_PREFIX        0x2f
 | 
			
		||||
#define AML_NAME_CHAR_A              0x41
 | 
			
		||||
#define AML_NAME_CHAR_B              0x42
 | 
			
		||||
#define AML_NAME_CHAR_C              0x43
 | 
			
		||||
#define AML_NAME_CHAR_D              0x44
 | 
			
		||||
#define AML_NAME_CHAR_E              0x45
 | 
			
		||||
#define AML_NAME_CHAR_F              0x46
 | 
			
		||||
#define AML_NAME_CHAR_G              0x47
 | 
			
		||||
#define AML_NAME_CHAR_H              0x48
 | 
			
		||||
#define AML_NAME_CHAR_I              0x49
 | 
			
		||||
#define AML_NAME_CHAR_J              0x4a
 | 
			
		||||
#define AML_NAME_CHAR_K              0x4b
 | 
			
		||||
#define AML_NAME_CHAR_L              0x4c
 | 
			
		||||
#define AML_NAME_CHAR_M              0x4d
 | 
			
		||||
#define AML_NAME_CHAR_N              0x4e
 | 
			
		||||
#define AML_NAME_CHAR_O              0x4f
 | 
			
		||||
#define AML_NAME_CHAR_P              0x50
 | 
			
		||||
#define AML_NAME_CHAR_Q              0x51
 | 
			
		||||
#define AML_NAME_CHAR_R              0x52
 | 
			
		||||
#define AML_NAME_CHAR_S              0x53
 | 
			
		||||
#define AML_NAME_CHAR_T              0x54
 | 
			
		||||
#define AML_NAME_CHAR_U              0x55
 | 
			
		||||
#define AML_NAME_CHAR_V              0x56
 | 
			
		||||
#define AML_NAME_CHAR_W              0x57
 | 
			
		||||
#define AML_NAME_CHAR_X              0x58
 | 
			
		||||
#define AML_NAME_CHAR_Y              0x59
 | 
			
		||||
#define AML_NAME_CHAR_Z              0x5a
 | 
			
		||||
#define AML_ROOT_CHAR                0x5c
 | 
			
		||||
#define AML_PARENT_PREFIX_CHAR       0x5e
 | 
			
		||||
#define AML_NAME_CHAR__              0x5f
 | 
			
		||||
#define AML_LOCAL0                   0x60
 | 
			
		||||
#define AML_LOCAL1                   0x61
 | 
			
		||||
#define AML_LOCAL2                   0x62
 | 
			
		||||
#define AML_LOCAL3                   0x63
 | 
			
		||||
#define AML_LOCAL4                   0x64
 | 
			
		||||
#define AML_LOCAL5                   0x65
 | 
			
		||||
#define AML_LOCAL6                   0x66
 | 
			
		||||
#define AML_LOCAL7                   0x67
 | 
			
		||||
#define AML_ARG0                     0x68
 | 
			
		||||
#define AML_ARG1                     0x69
 | 
			
		||||
#define AML_ARG2                     0x6a
 | 
			
		||||
#define AML_ARG3                     0x6b
 | 
			
		||||
#define AML_ARG4                     0x6c
 | 
			
		||||
#define AML_ARG5                     0x6d
 | 
			
		||||
#define AML_ARG6                     0x6e
 | 
			
		||||
#define AML_STORE_OP                 0x70
 | 
			
		||||
#define AML_REF_OF_OP                0x71
 | 
			
		||||
#define AML_ADD_OP                   0x72
 | 
			
		||||
#define AML_CONCAT_OP                0x73
 | 
			
		||||
#define AML_SUBTRACT_OP              0x74
 | 
			
		||||
#define AML_INCREMENT_OP             0x75
 | 
			
		||||
#define AML_DECREMENT_OP             0x76
 | 
			
		||||
#define AML_MULTIPLY_OP              0x77
 | 
			
		||||
#define AML_DIVIDE_OP                0x78
 | 
			
		||||
#define AML_SHIFT_LEFT_OP            0x79
 | 
			
		||||
#define AML_SHIFT_RIGHT_OP           0x7a
 | 
			
		||||
#define AML_AND_OP                   0x7b
 | 
			
		||||
#define AML_NAND_OP                  0x7c
 | 
			
		||||
#define AML_OR_OP                    0x7d
 | 
			
		||||
#define AML_NOR_OP                   0x7e
 | 
			
		||||
#define AML_XOR_OP                   0x7f
 | 
			
		||||
#define AML_NOT_OP                   0x80
 | 
			
		||||
#define AML_FIND_SET_LEFT_BIT_OP     0x81
 | 
			
		||||
#define AML_FIND_SET_RIGHT_BIT_OP    0x82
 | 
			
		||||
#define AML_DEREF_OF_OP              0x83
 | 
			
		||||
#define AML_CONCAT_RES_OP            0x84
 | 
			
		||||
#define AML_MOD_OP                   0x85
 | 
			
		||||
#define AML_NOTIFY_OP                0x86
 | 
			
		||||
#define AML_SIZE_OF_OP               0x87
 | 
			
		||||
#define AML_INDEX_OP                 0x88
 | 
			
		||||
#define AML_MATCH_OP                 0x89
 | 
			
		||||
#define AML_CREATE_DWORD_FIELD_OP    0x8a
 | 
			
		||||
#define AML_CREATE_WORD_FIELD_OP     0x8b
 | 
			
		||||
#define AML_CREATE_BYTE_FIELD_OP     0x8c
 | 
			
		||||
#define AML_CREATE_BIT_FIELD_OP      0x8d
 | 
			
		||||
#define AML_OBJECT_TYPE_OP           0x8e
 | 
			
		||||
#define AML_CREATE_QWORD_FIELD_OP    0x8f
 | 
			
		||||
#define AML_LAND_OP                  0x90
 | 
			
		||||
#define AML_LOR_OP                   0x91
 | 
			
		||||
#define AML_LNOT_OP                  0x92
 | 
			
		||||
#define AML_LEQUAL_OP                0x93
 | 
			
		||||
#define AML_LGREATER_OP              0x94
 | 
			
		||||
#define AML_LLESS_OP                 0x95
 | 
			
		||||
#define AML_TO_BUFFER_OP             0x96
 | 
			
		||||
#define AML_TO_DEC_STRING_OP         0x97
 | 
			
		||||
#define AML_TO_HEX_STRING_OP         0x98
 | 
			
		||||
#define AML_TO_INTEGER_OP            0x99
 | 
			
		||||
#define AML_TO_STRING_OP             0x9c
 | 
			
		||||
#define AML_COPY_OBJECT_OP           0x9d
 | 
			
		||||
#define AML_MID_OP                   0x9e
 | 
			
		||||
#define AML_CONTINUE_OP              0x9f
 | 
			
		||||
#define AML_IF_OP                    0xa0
 | 
			
		||||
#define AML_ELSE_OP                  0xa1
 | 
			
		||||
#define AML_WHILE_OP                 0xa2
 | 
			
		||||
#define AML_NOOP_OP                  0xa3
 | 
			
		||||
#define AML_RETURN_OP                0xa4
 | 
			
		||||
#define AML_BREAK_OP                 0xa5
 | 
			
		||||
#define AML_BREAK_POINT_OP           0xcc
 | 
			
		||||
#define AML_ONES_OP                  0xff
 | 
			
		||||
#define AML_ZERO_OP                0x00
 | 
			
		||||
#define AML_ONE_OP                 0x01
 | 
			
		||||
#define AML_ALIAS_OP               0x06
 | 
			
		||||
#define AML_NAME_OP                0x08
 | 
			
		||||
#define AML_BYTE_PREFIX            0x0a
 | 
			
		||||
#define AML_WORD_PREFIX            0x0b
 | 
			
		||||
#define AML_DWORD_PREFIX           0x0c
 | 
			
		||||
#define AML_STRING_PREFIX          0x0d
 | 
			
		||||
#define AML_QWORD_PREFIX           0x0e
 | 
			
		||||
#define AML_SCOPE_OP               0x10
 | 
			
		||||
#define AML_BUFFER_OP              0x11
 | 
			
		||||
#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
 | 
			
		||||
#define AML_NAME_CHAR_B            0x42
 | 
			
		||||
#define AML_NAME_CHAR_C            0x43
 | 
			
		||||
#define AML_NAME_CHAR_D            0x44
 | 
			
		||||
#define AML_NAME_CHAR_E            0x45
 | 
			
		||||
#define AML_NAME_CHAR_F            0x46
 | 
			
		||||
#define AML_NAME_CHAR_G            0x47
 | 
			
		||||
#define AML_NAME_CHAR_H            0x48
 | 
			
		||||
#define AML_NAME_CHAR_I            0x49
 | 
			
		||||
#define AML_NAME_CHAR_J            0x4a
 | 
			
		||||
#define AML_NAME_CHAR_K            0x4b
 | 
			
		||||
#define AML_NAME_CHAR_L            0x4c
 | 
			
		||||
#define AML_NAME_CHAR_M            0x4d
 | 
			
		||||
#define AML_NAME_CHAR_N            0x4e
 | 
			
		||||
#define AML_NAME_CHAR_O            0x4f
 | 
			
		||||
#define AML_NAME_CHAR_P            0x50
 | 
			
		||||
#define AML_NAME_CHAR_Q            0x51
 | 
			
		||||
#define AML_NAME_CHAR_R            0x52
 | 
			
		||||
#define AML_NAME_CHAR_S            0x53
 | 
			
		||||
#define AML_NAME_CHAR_T            0x54
 | 
			
		||||
#define AML_NAME_CHAR_U            0x55
 | 
			
		||||
#define AML_NAME_CHAR_V            0x56
 | 
			
		||||
#define AML_NAME_CHAR_W            0x57
 | 
			
		||||
#define AML_NAME_CHAR_X            0x58
 | 
			
		||||
#define AML_NAME_CHAR_Y            0x59
 | 
			
		||||
#define AML_NAME_CHAR_Z            0x5a
 | 
			
		||||
#define AML_ROOT_CHAR              0x5c
 | 
			
		||||
#define AML_PARENT_PREFIX_CHAR     0x5e
 | 
			
		||||
#define AML_NAME_CHAR__            0x5f
 | 
			
		||||
#define AML_LOCAL0                 0x60
 | 
			
		||||
#define AML_LOCAL1                 0x61
 | 
			
		||||
#define AML_LOCAL2                 0x62
 | 
			
		||||
#define AML_LOCAL3                 0x63
 | 
			
		||||
#define AML_LOCAL4                 0x64
 | 
			
		||||
#define AML_LOCAL5                 0x65
 | 
			
		||||
#define AML_LOCAL6                 0x66
 | 
			
		||||
#define AML_LOCAL7                 0x67
 | 
			
		||||
#define AML_ARG0                   0x68
 | 
			
		||||
#define AML_ARG1                   0x69
 | 
			
		||||
#define AML_ARG2                   0x6a
 | 
			
		||||
#define AML_ARG3                   0x6b
 | 
			
		||||
#define AML_ARG4                   0x6c
 | 
			
		||||
#define AML_ARG5                   0x6d
 | 
			
		||||
#define AML_ARG6                   0x6e
 | 
			
		||||
#define AML_STORE_OP               0x70
 | 
			
		||||
#define AML_REF_OF_OP              0x71
 | 
			
		||||
#define AML_ADD_OP                 0x72
 | 
			
		||||
#define AML_CONCAT_OP              0x73
 | 
			
		||||
#define AML_SUBTRACT_OP            0x74
 | 
			
		||||
#define AML_INCREMENT_OP           0x75
 | 
			
		||||
#define AML_DECREMENT_OP           0x76
 | 
			
		||||
#define AML_MULTIPLY_OP            0x77
 | 
			
		||||
#define AML_DIVIDE_OP              0x78
 | 
			
		||||
#define AML_SHIFT_LEFT_OP          0x79
 | 
			
		||||
#define AML_SHIFT_RIGHT_OP         0x7a
 | 
			
		||||
#define AML_AND_OP                 0x7b
 | 
			
		||||
#define AML_NAND_OP                0x7c
 | 
			
		||||
#define AML_OR_OP                  0x7d
 | 
			
		||||
#define AML_NOR_OP                 0x7e
 | 
			
		||||
#define AML_XOR_OP                 0x7f
 | 
			
		||||
#define AML_NOT_OP                 0x80
 | 
			
		||||
#define AML_FIND_SET_LEFT_BIT_OP   0x81
 | 
			
		||||
#define AML_FIND_SET_RIGHT_BIT_OP  0x82
 | 
			
		||||
#define AML_DEREF_OF_OP            0x83
 | 
			
		||||
#define AML_CONCAT_RES_OP          0x84
 | 
			
		||||
#define AML_MOD_OP                 0x85
 | 
			
		||||
#define AML_NOTIFY_OP              0x86
 | 
			
		||||
#define AML_SIZE_OF_OP             0x87
 | 
			
		||||
#define AML_INDEX_OP               0x88
 | 
			
		||||
#define AML_MATCH_OP               0x89
 | 
			
		||||
#define AML_CREATE_DWORD_FIELD_OP  0x8a
 | 
			
		||||
#define AML_CREATE_WORD_FIELD_OP   0x8b
 | 
			
		||||
#define AML_CREATE_BYTE_FIELD_OP   0x8c
 | 
			
		||||
#define AML_CREATE_BIT_FIELD_OP    0x8d
 | 
			
		||||
#define AML_OBJECT_TYPE_OP         0x8e
 | 
			
		||||
#define AML_CREATE_QWORD_FIELD_OP  0x8f
 | 
			
		||||
#define AML_LAND_OP                0x90
 | 
			
		||||
#define AML_LOR_OP                 0x91
 | 
			
		||||
#define AML_LNOT_OP                0x92
 | 
			
		||||
#define AML_LEQUAL_OP              0x93
 | 
			
		||||
#define AML_LGREATER_OP            0x94
 | 
			
		||||
#define AML_LLESS_OP               0x95
 | 
			
		||||
#define AML_TO_BUFFER_OP           0x96
 | 
			
		||||
#define AML_TO_DEC_STRING_OP       0x97
 | 
			
		||||
#define AML_TO_HEX_STRING_OP       0x98
 | 
			
		||||
#define AML_TO_INTEGER_OP          0x99
 | 
			
		||||
#define AML_TO_STRING_OP           0x9c
 | 
			
		||||
#define AML_COPY_OBJECT_OP         0x9d
 | 
			
		||||
#define AML_MID_OP                 0x9e
 | 
			
		||||
#define AML_CONTINUE_OP            0x9f
 | 
			
		||||
#define AML_IF_OP                  0xa0
 | 
			
		||||
#define AML_ELSE_OP                0xa1
 | 
			
		||||
#define AML_WHILE_OP               0xa2
 | 
			
		||||
#define AML_NOOP_OP                0xa3
 | 
			
		||||
#define AML_RETURN_OP              0xa4
 | 
			
		||||
#define AML_BREAK_OP               0xa5
 | 
			
		||||
#define AML_BREAK_POINT_OP         0xcc
 | 
			
		||||
#define AML_ONES_OP                0xff
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Extended OpCode
 | 
			
		||||
//
 | 
			
		||||
#define AML_EXT_OP                   0x5b
 | 
			
		||||
#define AML_EXT_OP  0x5b
 | 
			
		||||
 | 
			
		||||
#define AML_EXT_MUTEX_OP             0x01
 | 
			
		||||
#define AML_EXT_EVENT_OP             0x02
 | 
			
		||||
#define AML_EXT_COND_REF_OF_OP       0x12
 | 
			
		||||
#define AML_EXT_CREATE_FIELD_OP      0x13
 | 
			
		||||
#define AML_EXT_LOAD_TABLE_OP        0x1f
 | 
			
		||||
#define AML_EXT_LOAD_OP              0x20
 | 
			
		||||
#define AML_EXT_STALL_OP             0x21
 | 
			
		||||
#define AML_EXT_SLEEP_OP             0x22
 | 
			
		||||
#define AML_EXT_ACQUIRE_OP           0x23
 | 
			
		||||
#define AML_EXT_SIGNAL_OP            0x24
 | 
			
		||||
#define AML_EXT_WAIT_OP              0x25
 | 
			
		||||
#define AML_EXT_RESET_OP             0x26
 | 
			
		||||
#define AML_EXT_RELEASE_OP           0x27
 | 
			
		||||
#define AML_EXT_FROM_BCD_OP          0x28
 | 
			
		||||
#define AML_EXT_TO_BCD_OP            0x29
 | 
			
		||||
#define AML_EXT_UNLOAD_OP            0x2a
 | 
			
		||||
#define AML_EXT_REVISION_OP          0x30
 | 
			
		||||
#define AML_EXT_DEBUG_OP             0x31
 | 
			
		||||
#define AML_EXT_FATAL_OP             0x32
 | 
			
		||||
#define AML_EXT_TIMER_OP             0x33
 | 
			
		||||
#define AML_EXT_REGION_OP            0x80
 | 
			
		||||
#define AML_EXT_FIELD_OP             0x81
 | 
			
		||||
#define AML_EXT_DEVICE_OP            0x82
 | 
			
		||||
#define AML_EXT_PROCESSOR_OP         0x83
 | 
			
		||||
#define AML_EXT_POWER_RES_OP         0x84
 | 
			
		||||
#define AML_EXT_THERMAL_ZONE_OP      0x85
 | 
			
		||||
#define AML_EXT_INDEX_FIELD_OP       0x86
 | 
			
		||||
#define AML_EXT_BANK_FIELD_OP        0x87
 | 
			
		||||
#define AML_EXT_DATA_REGION_OP       0x88
 | 
			
		||||
#define AML_EXT_MUTEX_OP         0x01
 | 
			
		||||
#define AML_EXT_EVENT_OP         0x02
 | 
			
		||||
#define AML_EXT_COND_REF_OF_OP   0x12
 | 
			
		||||
#define AML_EXT_CREATE_FIELD_OP  0x13
 | 
			
		||||
#define AML_EXT_LOAD_TABLE_OP    0x1f
 | 
			
		||||
#define AML_EXT_LOAD_OP          0x20
 | 
			
		||||
#define AML_EXT_STALL_OP         0x21
 | 
			
		||||
#define AML_EXT_SLEEP_OP         0x22
 | 
			
		||||
#define AML_EXT_ACQUIRE_OP       0x23
 | 
			
		||||
#define AML_EXT_SIGNAL_OP        0x24
 | 
			
		||||
#define AML_EXT_WAIT_OP          0x25
 | 
			
		||||
#define AML_EXT_RESET_OP         0x26
 | 
			
		||||
#define AML_EXT_RELEASE_OP       0x27
 | 
			
		||||
#define AML_EXT_FROM_BCD_OP      0x28
 | 
			
		||||
#define AML_EXT_TO_BCD_OP        0x29
 | 
			
		||||
#define AML_EXT_UNLOAD_OP        0x2a
 | 
			
		||||
#define AML_EXT_REVISION_OP      0x30
 | 
			
		||||
#define AML_EXT_DEBUG_OP         0x31
 | 
			
		||||
#define AML_EXT_FATAL_OP         0x32
 | 
			
		||||
#define AML_EXT_TIMER_OP         0x33
 | 
			
		||||
#define AML_EXT_REGION_OP        0x80
 | 
			
		||||
#define AML_EXT_FIELD_OP         0x81
 | 
			
		||||
#define AML_EXT_DEVICE_OP        0x82
 | 
			
		||||
#define AML_EXT_PROCESSOR_OP     0x83
 | 
			
		||||
#define AML_EXT_POWER_RES_OP     0x84
 | 
			
		||||
#define AML_EXT_THERMAL_ZONE_OP  0x85
 | 
			
		||||
#define AML_EXT_INDEX_FIELD_OP   0x86
 | 
			
		||||
#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
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// AML Name segment definitions
 | 
			
		||||
//
 | 
			
		||||
#define AML_NAME_SEG_SIZE  4
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,21 +2,15 @@
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _BLUETOOTH_H_
 | 
			
		||||
#define _BLUETOOTH_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
 | 
			
		||||
@ -27,23 +21,38 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// 48bit Bluetooth device address.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8      Address[6];
 | 
			
		||||
  UINT8    Address[6];
 | 
			
		||||
} BLUETOOTH_ADDRESS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8      FormatType:2;
 | 
			
		||||
  UINT8      MinorDeviceClass: 6;
 | 
			
		||||
  UINT16     MajorDeviceClass: 5;
 | 
			
		||||
  UINT16     MajorServiceClass:11;
 | 
			
		||||
  UINT8     FormatType        : 2;
 | 
			
		||||
  UINT8     MinorDeviceClass  : 6;
 | 
			
		||||
  UINT16    MajorDeviceClass  : 5;
 | 
			
		||||
  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
 | 
			
		||||
#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE  248
 | 
			
		||||
 | 
			
		||||
#define BLUETOOTH_HCI_LINK_KEY_SIZE                           16
 | 
			
		||||
#define BLUETOOTH_HCI_LINK_KEY_SIZE  16
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -7,31 +7,27 @@
 | 
			
		||||
  Common Object File Format Specification, Revision 8.3 - February 6, 2013.
 | 
			
		||||
  This file also includes some definitions in PI Specification, Revision 1.0.
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2006 - 2010, 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.
 | 
			
		||||
Portions Copyright (c) 2016 - 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
 | 
			
		||||
Portions Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PE_IMAGE_H__
 | 
			
		||||
#define __PE_IMAGE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// PE32+ Subsystem type for EFI images
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION         10
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER      12
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER      13 ///< defined PI Specification, 1.0
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION          10
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER  11
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER       12
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER       13///< defined PI Specification, 1.0
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// PE32+ Machine type for EFI images
 | 
			
		||||
@ -42,6 +38,11 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#define IMAGE_FILE_MACHINE_X64             0x8664
 | 
			
		||||
#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED  0x01c2
 | 
			
		||||
#define IMAGE_FILE_MACHINE_ARM64           0xAA64
 | 
			
		||||
#define IMAGE_FILE_MACHINE_RISCV32         0x5032
 | 
			
		||||
#define IMAGE_FILE_MACHINE_RISCV64         0x5064
 | 
			
		||||
#define IMAGE_FILE_MACHINE_RISCV128        0x5128
 | 
			
		||||
#define IMAGE_FILE_MACHINE_LOONGARCH32     0x6232
 | 
			
		||||
#define IMAGE_FILE_MACHINE_LOONGARCH64     0x6264
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// EXE file formats
 | 
			
		||||
@ -56,51 +57,51 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
/// under DOS it can print an error message.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16  e_magic;    ///< Magic number.
 | 
			
		||||
  UINT16  e_cblp;     ///< Bytes on last page of file.
 | 
			
		||||
  UINT16  e_cp;       ///< Pages in file.
 | 
			
		||||
  UINT16  e_crlc;     ///< Relocations.
 | 
			
		||||
  UINT16  e_cparhdr;  ///< Size of header in paragraphs.
 | 
			
		||||
  UINT16  e_minalloc; ///< Minimum extra paragraphs needed.
 | 
			
		||||
  UINT16  e_maxalloc; ///< Maximum extra paragraphs needed.
 | 
			
		||||
  UINT16  e_ss;       ///< Initial (relative) SS value.
 | 
			
		||||
  UINT16  e_sp;       ///< Initial SP value.
 | 
			
		||||
  UINT16  e_csum;     ///< Checksum.
 | 
			
		||||
  UINT16  e_ip;       ///< Initial IP value.
 | 
			
		||||
  UINT16  e_cs;       ///< Initial (relative) CS value.
 | 
			
		||||
  UINT16  e_lfarlc;   ///< File address of relocation table.
 | 
			
		||||
  UINT16  e_ovno;     ///< Overlay number.
 | 
			
		||||
  UINT16  e_res[4];   ///< Reserved words.
 | 
			
		||||
  UINT16  e_oemid;    ///< OEM identifier (for e_oeminfo).
 | 
			
		||||
  UINT16  e_oeminfo;  ///< OEM information; e_oemid specific.
 | 
			
		||||
  UINT16  e_res2[10]; ///< Reserved words.
 | 
			
		||||
  UINT32  e_lfanew;   ///< File address of new exe header.
 | 
			
		||||
  UINT16    e_magic;    ///< Magic number.
 | 
			
		||||
  UINT16    e_cblp;     ///< Bytes on last page of file.
 | 
			
		||||
  UINT16    e_cp;       ///< Pages in file.
 | 
			
		||||
  UINT16    e_crlc;     ///< Relocations.
 | 
			
		||||
  UINT16    e_cparhdr;  ///< Size of header in paragraphs.
 | 
			
		||||
  UINT16    e_minalloc; ///< Minimum extra paragraphs needed.
 | 
			
		||||
  UINT16    e_maxalloc; ///< Maximum extra paragraphs needed.
 | 
			
		||||
  UINT16    e_ss;       ///< Initial (relative) SS value.
 | 
			
		||||
  UINT16    e_sp;       ///< Initial SP value.
 | 
			
		||||
  UINT16    e_csum;     ///< Checksum.
 | 
			
		||||
  UINT16    e_ip;       ///< Initial IP value.
 | 
			
		||||
  UINT16    e_cs;       ///< Initial (relative) CS value.
 | 
			
		||||
  UINT16    e_lfarlc;   ///< File address of relocation table.
 | 
			
		||||
  UINT16    e_ovno;     ///< Overlay number.
 | 
			
		||||
  UINT16    e_res[4];   ///< Reserved words.
 | 
			
		||||
  UINT16    e_oemid;    ///< OEM identifier (for e_oeminfo).
 | 
			
		||||
  UINT16    e_oeminfo;  ///< OEM information; e_oemid specific.
 | 
			
		||||
  UINT16    e_res2[10]; ///< Reserved words.
 | 
			
		||||
  UINT32    e_lfanew;   ///< File address of new exe header.
 | 
			
		||||
} EFI_IMAGE_DOS_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// COFF File Header (Object and Image).
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16  Machine;
 | 
			
		||||
  UINT16  NumberOfSections;
 | 
			
		||||
  UINT32  TimeDateStamp;
 | 
			
		||||
  UINT32  PointerToSymbolTable;
 | 
			
		||||
  UINT32  NumberOfSymbols;
 | 
			
		||||
  UINT16  SizeOfOptionalHeader;
 | 
			
		||||
  UINT16  Characteristics;
 | 
			
		||||
  UINT16    Machine;
 | 
			
		||||
  UINT16    NumberOfSections;
 | 
			
		||||
  UINT32    TimeDateStamp;
 | 
			
		||||
  UINT32    PointerToSymbolTable;
 | 
			
		||||
  UINT32    NumberOfSymbols;
 | 
			
		||||
  UINT16    SizeOfOptionalHeader;
 | 
			
		||||
  UINT16    Characteristics;
 | 
			
		||||
} EFI_IMAGE_FILE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Size of EFI_IMAGE_FILE_HEADER.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_FILE_HEADER        20
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_FILE_HEADER  20
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Characteristics
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_FILE_RELOCS_STRIPPED      BIT0     ///< 0x0001  Relocation info stripped from file.
 | 
			
		||||
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE     BIT1     ///< 0x0002  File is executable  (i.e. no unresolved externel references).
 | 
			
		||||
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED   BIT2     ///< 0x0004  Line nunbers stripped from file.
 | 
			
		||||
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED   BIT2     ///< 0x0004  Line numbers stripped from file.
 | 
			
		||||
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED  BIT3     ///< 0x0008  Local symbols stripped from file.
 | 
			
		||||
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO    BIT7     ///< 0x0080  Bytes of machine word are reversed.
 | 
			
		||||
#define EFI_IMAGE_FILE_32BIT_MACHINE        BIT8     ///< 0x0100  32 bit word machine.
 | 
			
		||||
@ -113,26 +114,26 @@ typedef struct {
 | 
			
		||||
/// Header Data Directories.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  VirtualAddress;
 | 
			
		||||
  UINT32  Size;
 | 
			
		||||
  UINT32    VirtualAddress;
 | 
			
		||||
  UINT32    Size;
 | 
			
		||||
} EFI_IMAGE_DATA_DIRECTORY;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Directory Entries
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT      0
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT      1
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE    2
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION   3
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY    4
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC   5
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG       6
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT   7
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR   8
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_TLS         9
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT       0
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT       1
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE     2
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION    3
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY     4
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC    5
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG        6
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT    7
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR    8
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_TLS          9
 | 
			
		||||
#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG  10
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16
 | 
			
		||||
#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES  16
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// @attention
 | 
			
		||||
@ -140,7 +141,7 @@ typedef struct {
 | 
			
		||||
/// EFI_IMAGE_OPTIONAL_HEADER32 must be used. The data structures only vary
 | 
			
		||||
/// after NT additional fields.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
 | 
			
		||||
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC  0x10b
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Optional Header Standard Fields for PE32.
 | 
			
		||||
@ -149,40 +150,40 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Standard fields.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                    Magic;
 | 
			
		||||
  UINT8                     MajorLinkerVersion;
 | 
			
		||||
  UINT8                     MinorLinkerVersion;
 | 
			
		||||
  UINT32                    SizeOfCode;
 | 
			
		||||
  UINT32                    SizeOfInitializedData;
 | 
			
		||||
  UINT32                    SizeOfUninitializedData;
 | 
			
		||||
  UINT32                    AddressOfEntryPoint;
 | 
			
		||||
  UINT32                    BaseOfCode;
 | 
			
		||||
  UINT32                    BaseOfData;  ///< PE32 contains this additional field, which is absent in PE32+.
 | 
			
		||||
  UINT16                      Magic;
 | 
			
		||||
  UINT8                       MajorLinkerVersion;
 | 
			
		||||
  UINT8                       MinorLinkerVersion;
 | 
			
		||||
  UINT32                      SizeOfCode;
 | 
			
		||||
  UINT32                      SizeOfInitializedData;
 | 
			
		||||
  UINT32                      SizeOfUninitializedData;
 | 
			
		||||
  UINT32                      AddressOfEntryPoint;
 | 
			
		||||
  UINT32                      BaseOfCode;
 | 
			
		||||
  UINT32                      BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+.
 | 
			
		||||
  ///
 | 
			
		||||
  /// Optional Header Windows-Specific Fields.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                    ImageBase;
 | 
			
		||||
  UINT32                    SectionAlignment;
 | 
			
		||||
  UINT32                    FileAlignment;
 | 
			
		||||
  UINT16                    MajorOperatingSystemVersion;
 | 
			
		||||
  UINT16                    MinorOperatingSystemVersion;
 | 
			
		||||
  UINT16                    MajorImageVersion;
 | 
			
		||||
  UINT16                    MinorImageVersion;
 | 
			
		||||
  UINT16                    MajorSubsystemVersion;
 | 
			
		||||
  UINT16                    MinorSubsystemVersion;
 | 
			
		||||
  UINT32                    Win32VersionValue;
 | 
			
		||||
  UINT32                    SizeOfImage;
 | 
			
		||||
  UINT32                    SizeOfHeaders;
 | 
			
		||||
  UINT32                    CheckSum;
 | 
			
		||||
  UINT16                    Subsystem;
 | 
			
		||||
  UINT16                    DllCharacteristics;
 | 
			
		||||
  UINT32                    SizeOfStackReserve;
 | 
			
		||||
  UINT32                    SizeOfStackCommit;
 | 
			
		||||
  UINT32                    SizeOfHeapReserve;
 | 
			
		||||
  UINT32                    SizeOfHeapCommit;
 | 
			
		||||
  UINT32                    LoaderFlags;
 | 
			
		||||
  UINT32                    NumberOfRvaAndSizes;
 | 
			
		||||
  EFI_IMAGE_DATA_DIRECTORY  DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
 | 
			
		||||
  UINT32                      ImageBase;
 | 
			
		||||
  UINT32                      SectionAlignment;
 | 
			
		||||
  UINT32                      FileAlignment;
 | 
			
		||||
  UINT16                      MajorOperatingSystemVersion;
 | 
			
		||||
  UINT16                      MinorOperatingSystemVersion;
 | 
			
		||||
  UINT16                      MajorImageVersion;
 | 
			
		||||
  UINT16                      MinorImageVersion;
 | 
			
		||||
  UINT16                      MajorSubsystemVersion;
 | 
			
		||||
  UINT16                      MinorSubsystemVersion;
 | 
			
		||||
  UINT32                      Win32VersionValue;
 | 
			
		||||
  UINT32                      SizeOfImage;
 | 
			
		||||
  UINT32                      SizeOfHeaders;
 | 
			
		||||
  UINT32                      CheckSum;
 | 
			
		||||
  UINT16                      Subsystem;
 | 
			
		||||
  UINT16                      DllCharacteristics;
 | 
			
		||||
  UINT32                      SizeOfStackReserve;
 | 
			
		||||
  UINT32                      SizeOfStackCommit;
 | 
			
		||||
  UINT32                      SizeOfHeapReserve;
 | 
			
		||||
  UINT32                      SizeOfHeapCommit;
 | 
			
		||||
  UINT32                      LoaderFlags;
 | 
			
		||||
  UINT32                      NumberOfRvaAndSizes;
 | 
			
		||||
  EFI_IMAGE_DATA_DIRECTORY    DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
 | 
			
		||||
} EFI_IMAGE_OPTIONAL_HEADER32;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -191,7 +192,7 @@ typedef struct {
 | 
			
		||||
/// EFI_IMAGE_OPTIONAL_HEADER64 must be used. The data structures only vary
 | 
			
		||||
/// after NT additional fields.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
 | 
			
		||||
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC  0x20b
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Optional Header Standard Fields for PE32+.
 | 
			
		||||
@ -200,166 +201,165 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Standard fields.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                    Magic;
 | 
			
		||||
  UINT8                     MajorLinkerVersion;
 | 
			
		||||
  UINT8                     MinorLinkerVersion;
 | 
			
		||||
  UINT32                    SizeOfCode;
 | 
			
		||||
  UINT32                    SizeOfInitializedData;
 | 
			
		||||
  UINT32                    SizeOfUninitializedData;
 | 
			
		||||
  UINT32                    AddressOfEntryPoint;
 | 
			
		||||
  UINT32                    BaseOfCode;
 | 
			
		||||
  UINT16                      Magic;
 | 
			
		||||
  UINT8                       MajorLinkerVersion;
 | 
			
		||||
  UINT8                       MinorLinkerVersion;
 | 
			
		||||
  UINT32                      SizeOfCode;
 | 
			
		||||
  UINT32                      SizeOfInitializedData;
 | 
			
		||||
  UINT32                      SizeOfUninitializedData;
 | 
			
		||||
  UINT32                      AddressOfEntryPoint;
 | 
			
		||||
  UINT32                      BaseOfCode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Optional Header Windows-Specific Fields.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                    ImageBase;
 | 
			
		||||
  UINT32                    SectionAlignment;
 | 
			
		||||
  UINT32                    FileAlignment;
 | 
			
		||||
  UINT16                    MajorOperatingSystemVersion;
 | 
			
		||||
  UINT16                    MinorOperatingSystemVersion;
 | 
			
		||||
  UINT16                    MajorImageVersion;
 | 
			
		||||
  UINT16                    MinorImageVersion;
 | 
			
		||||
  UINT16                    MajorSubsystemVersion;
 | 
			
		||||
  UINT16                    MinorSubsystemVersion;
 | 
			
		||||
  UINT32                    Win32VersionValue;
 | 
			
		||||
  UINT32                    SizeOfImage;
 | 
			
		||||
  UINT32                    SizeOfHeaders;
 | 
			
		||||
  UINT32                    CheckSum;
 | 
			
		||||
  UINT16                    Subsystem;
 | 
			
		||||
  UINT16                    DllCharacteristics;
 | 
			
		||||
  UINT64                    SizeOfStackReserve;
 | 
			
		||||
  UINT64                    SizeOfStackCommit;
 | 
			
		||||
  UINT64                    SizeOfHeapReserve;
 | 
			
		||||
  UINT64                    SizeOfHeapCommit;
 | 
			
		||||
  UINT32                    LoaderFlags;
 | 
			
		||||
  UINT32                    NumberOfRvaAndSizes;
 | 
			
		||||
  EFI_IMAGE_DATA_DIRECTORY  DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
 | 
			
		||||
  UINT64                      ImageBase;
 | 
			
		||||
  UINT32                      SectionAlignment;
 | 
			
		||||
  UINT32                      FileAlignment;
 | 
			
		||||
  UINT16                      MajorOperatingSystemVersion;
 | 
			
		||||
  UINT16                      MinorOperatingSystemVersion;
 | 
			
		||||
  UINT16                      MajorImageVersion;
 | 
			
		||||
  UINT16                      MinorImageVersion;
 | 
			
		||||
  UINT16                      MajorSubsystemVersion;
 | 
			
		||||
  UINT16                      MinorSubsystemVersion;
 | 
			
		||||
  UINT32                      Win32VersionValue;
 | 
			
		||||
  UINT32                      SizeOfImage;
 | 
			
		||||
  UINT32                      SizeOfHeaders;
 | 
			
		||||
  UINT32                      CheckSum;
 | 
			
		||||
  UINT16                      Subsystem;
 | 
			
		||||
  UINT16                      DllCharacteristics;
 | 
			
		||||
  UINT64                      SizeOfStackReserve;
 | 
			
		||||
  UINT64                      SizeOfStackCommit;
 | 
			
		||||
  UINT64                      SizeOfHeapReserve;
 | 
			
		||||
  UINT64                      SizeOfHeapCommit;
 | 
			
		||||
  UINT32                      LoaderFlags;
 | 
			
		||||
  UINT32                      NumberOfRvaAndSizes;
 | 
			
		||||
  EFI_IMAGE_DATA_DIRECTORY    DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
 | 
			
		||||
} EFI_IMAGE_OPTIONAL_HEADER64;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// @attention
 | 
			
		||||
/// EFI_IMAGE_NT_HEADERS32 is for use ONLY by tools.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32                      Signature;
 | 
			
		||||
  EFI_IMAGE_FILE_HEADER       FileHeader;
 | 
			
		||||
  EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader;
 | 
			
		||||
  UINT32                         Signature;
 | 
			
		||||
  EFI_IMAGE_FILE_HEADER          FileHeader;
 | 
			
		||||
  EFI_IMAGE_OPTIONAL_HEADER32    OptionalHeader;
 | 
			
		||||
} EFI_IMAGE_NT_HEADERS32;
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32)
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER  sizeof (EFI_IMAGE_NT_HEADERS32)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// @attention
 | 
			
		||||
/// EFI_IMAGE_HEADERS64 is for use ONLY by tools.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32                      Signature;
 | 
			
		||||
  EFI_IMAGE_FILE_HEADER       FileHeader;
 | 
			
		||||
  EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader;
 | 
			
		||||
  UINT32                         Signature;
 | 
			
		||||
  EFI_IMAGE_FILE_HEADER          FileHeader;
 | 
			
		||||
  EFI_IMAGE_OPTIONAL_HEADER64    OptionalHeader;
 | 
			
		||||
} EFI_IMAGE_NT_HEADERS64;
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER  sizeof (EFI_IMAGE_NT_HEADERS64)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Other Windows Subsystem Values
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_UNKNOWN     0
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_NATIVE      1
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_OS2_CUI     5
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI   7
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_UNKNOWN      0
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_NATIVE       1
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI  2
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI  3
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_OS2_CUI      5
 | 
			
		||||
#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI    7
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Length of ShortName.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_SHORT_NAME  8
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Section Table. This table immediately follows the optional header.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
 | 
			
		||||
  UINT8     Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
 | 
			
		||||
  union {
 | 
			
		||||
    UINT32  PhysicalAddress;
 | 
			
		||||
    UINT32  VirtualSize;
 | 
			
		||||
    UINT32    PhysicalAddress;
 | 
			
		||||
    UINT32    VirtualSize;
 | 
			
		||||
  } Misc;
 | 
			
		||||
  UINT32  VirtualAddress;
 | 
			
		||||
  UINT32  SizeOfRawData;
 | 
			
		||||
  UINT32  PointerToRawData;
 | 
			
		||||
  UINT32  PointerToRelocations;
 | 
			
		||||
  UINT32  PointerToLinenumbers;
 | 
			
		||||
  UINT16  NumberOfRelocations;
 | 
			
		||||
  UINT16  NumberOfLinenumbers;
 | 
			
		||||
  UINT32  Characteristics;
 | 
			
		||||
  UINT32    VirtualAddress;
 | 
			
		||||
  UINT32    SizeOfRawData;
 | 
			
		||||
  UINT32    PointerToRawData;
 | 
			
		||||
  UINT32    PointerToRelocations;
 | 
			
		||||
  UINT32    PointerToLinenumbers;
 | 
			
		||||
  UINT16    NumberOfRelocations;
 | 
			
		||||
  UINT16    NumberOfLinenumbers;
 | 
			
		||||
  UINT32    Characteristics;
 | 
			
		||||
} EFI_IMAGE_SECTION_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Size of EFI_IMAGE_SECTION_HEADER.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_SECTION_HEADER       40
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_SECTION_HEADER  40
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Section Flags Values
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_SCN_TYPE_NO_PAD                  BIT3   ///< 0x00000008  ///< Reserved.
 | 
			
		||||
#define EFI_IMAGE_SCN_CNT_CODE                     BIT5   ///< 0x00000020
 | 
			
		||||
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA         BIT6   ///< 0x00000040
 | 
			
		||||
#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA       BIT7   ///< 0x00000080
 | 
			
		||||
#define EFI_IMAGE_SCN_TYPE_NO_PAD             BIT3        ///< 0x00000008  ///< Reserved.
 | 
			
		||||
#define EFI_IMAGE_SCN_CNT_CODE                BIT5        ///< 0x00000020
 | 
			
		||||
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA    BIT6        ///< 0x00000040
 | 
			
		||||
#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA  BIT7        ///< 0x00000080
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_OTHER                    BIT8   ///< 0x00000100  ///< Reserved.
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_INFO                     BIT9   ///< 0x00000200  ///< Section contains comments or some other type of information.
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_REMOVE                   BIT11  ///< 0x00000800  ///< Section contents will not become part of image.
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_COMDAT                   BIT12  ///< 0x00001000
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_OTHER   BIT8                    ///< 0x00000100  ///< Reserved.
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_INFO    BIT9                    ///< 0x00000200  ///< Section contains comments or some other type of information.
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_REMOVE  BIT11                   ///< 0x00000800  ///< Section contents will not become part of image.
 | 
			
		||||
#define EFI_IMAGE_SCN_LNK_COMDAT  BIT12                   ///< 0x00001000
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_1BYTES                 BIT20  ///< 0x00100000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_2BYTES                 BIT21  ///< 0x00200000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_4BYTES          (BIT20|BIT21) ///< 0x00300000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_8BYTES                 BIT22  ///< 0x00400000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_16BYTES         (BIT20|BIT22) ///< 0x00500000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_32BYTES         (BIT21|BIT22) ///< 0x00600000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_64BYTES   (BIT20|BIT21|BIT22) ///< 0x00700000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_1BYTES   BIT20                ///< 0x00100000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_2BYTES   BIT21                ///< 0x00200000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_4BYTES   (BIT20|BIT21)        ///< 0x00300000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_8BYTES   BIT22                ///< 0x00400000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_16BYTES  (BIT20|BIT22)        ///< 0x00500000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_32BYTES  (BIT21|BIT22)        ///< 0x00600000
 | 
			
		||||
#define EFI_IMAGE_SCN_ALIGN_64BYTES  (BIT20|BIT21|BIT22)  ///< 0x00700000
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_DISCARDABLE              BIT25  ///< 0x02000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_NOT_CACHED               BIT26  ///< 0x04000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_NOT_PAGED                BIT27  ///< 0x08000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_SHARED                   BIT28  ///< 0x10000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_EXECUTE                  BIT29  ///< 0x20000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_READ                     BIT30  ///< 0x40000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_WRITE                    BIT31  ///< 0x80000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_DISCARDABLE  BIT25              ///< 0x02000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_NOT_CACHED   BIT26              ///< 0x04000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_NOT_PAGED    BIT27              ///< 0x08000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_SHARED       BIT28              ///< 0x10000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_EXECUTE      BIT29              ///< 0x20000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_READ         BIT30              ///< 0x40000000
 | 
			
		||||
#define EFI_IMAGE_SCN_MEM_WRITE        BIT31              ///< 0x80000000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Size of a Symbol Table Record.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_SYMBOL 18
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_SYMBOL  18
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Symbols have a section number of the section in which they are
 | 
			
		||||
// defined. Otherwise, section numbers have the following meanings:
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0  ///< Symbol is undefined or is common.
 | 
			
		||||
#define EFI_IMAGE_SYM_ABSOLUTE  (UINT16) -1 ///< Symbol is an absolute value.
 | 
			
		||||
#define EFI_IMAGE_SYM_DEBUG     (UINT16) -2 ///< Symbol is a special debug item.
 | 
			
		||||
#define EFI_IMAGE_SYM_UNDEFINED  (UINT16) 0  ///< Symbol is undefined or is common.
 | 
			
		||||
#define EFI_IMAGE_SYM_ABSOLUTE   (UINT16) -1 ///< Symbol is an absolute value.
 | 
			
		||||
#define EFI_IMAGE_SYM_DEBUG      (UINT16) -2 ///< Symbol is a special debug item.
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Symbol Type (fundamental) values.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_NULL   0   ///< no type.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_VOID   1   ///< no valid type.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_CHAR   2   ///< type character.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_SHORT  3   ///< type short integer.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_INT    4
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_LONG   5
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_FLOAT  6
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_DOUBLE 7
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_STRUCT 8
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_UNION  9
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_ENUM   10  ///< enumeration.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_MOE    11  ///< member of enumeration.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_BYTE   12
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_WORD   13
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_UINT   14
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_DWORD  15
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_NULL    0  ///< no type.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_VOID    1  ///< no valid type.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_CHAR    2  ///< type character.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_SHORT   3  ///< type short integer.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_INT     4
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_LONG    5
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_FLOAT   6
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_DOUBLE  7
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_STRUCT  8
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_UNION   9
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_ENUM    10 ///< enumeration.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_MOE     11 ///< member of enumeration.
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_BYTE    12
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_WORD    13
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_UINT    14
 | 
			
		||||
#define EFI_IMAGE_SYM_TYPE_DWORD   15
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Symbol Type (derived) values.
 | 
			
		||||
@ -412,11 +412,11 @@ typedef struct {
 | 
			
		||||
//
 | 
			
		||||
// Communal selection types.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES    1
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_ANY             2
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE       3
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH     4
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE     5
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES  1
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_ANY           2
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE     3
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH   4
 | 
			
		||||
#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE   5
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// the following values only be referred in PeCoff, not defined in PECOFF.
 | 
			
		||||
@ -429,28 +429,28 @@ typedef struct {
 | 
			
		||||
/// Relocation format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  VirtualAddress;
 | 
			
		||||
  UINT32  SymbolTableIndex;
 | 
			
		||||
  UINT16  Type;
 | 
			
		||||
  UINT32    VirtualAddress;
 | 
			
		||||
  UINT32    SymbolTableIndex;
 | 
			
		||||
  UINT16    Type;
 | 
			
		||||
} EFI_IMAGE_RELOCATION;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Size of EFI_IMAGE_RELOCATION
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_RELOCATION 10
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_RELOCATION  10
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// I386 relocation types.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000  ///< Reference is absolute, no relocation is necessary.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_DIR16    0x0001  ///< Direct 16-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_REL16    0x0002  ///< PC-relative 16-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_DIR32    0x0006  ///< Direct 32-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_DIR32NB  0x0007  ///< Direct 32-bit reference to the symbols virtual address, base not included.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_SEG12    0x0009  ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_SECTION  0x000A
 | 
			
		||||
#define EFI_IMAGE_REL_I386_SECREL   0x000B
 | 
			
		||||
#define EFI_IMAGE_REL_I386_REL32    0x0014  ///< PC-relative 32-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_ABSOLUTE  0x0000 ///< Reference is absolute, no relocation is necessary.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_DIR16     0x0001 ///< Direct 16-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_REL16     0x0002 ///< PC-relative 16-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_DIR32     0x0006 ///< Direct 32-bit reference to the symbols virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_DIR32NB   0x0007 ///< Direct 32-bit reference to the symbols virtual address, base not included.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_SEG12     0x0009 ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address.
 | 
			
		||||
#define EFI_IMAGE_REL_I386_SECTION   0x000A
 | 
			
		||||
#define EFI_IMAGE_REL_I386_SECREL    0x000B
 | 
			
		||||
#define EFI_IMAGE_REL_I386_REL32     0x0014 ///< PC-relative 32-bit reference to the symbols virtual address.
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// x64 processor relocation types.
 | 
			
		||||
@ -477,8 +477,8 @@ typedef struct {
 | 
			
		||||
/// Based relocation format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  VirtualAddress;
 | 
			
		||||
  UINT32  SizeOfBlock;
 | 
			
		||||
  UINT32    VirtualAddress;
 | 
			
		||||
  UINT32    SizeOfBlock;
 | 
			
		||||
} EFI_IMAGE_BASE_RELOCATION;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -501,21 +501,34 @@ typedef struct {
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR16  9
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_DIR64           10
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Relocation types of RISC-V processor.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_RISCV_HI20    5
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_RISCV_LOW12I  7
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_RISCV_LOW12S  8
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Relocation types of LoongArch processor.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_LOONGARCH32_MARK_LA  8
 | 
			
		||||
#define EFI_IMAGE_REL_BASED_LOONGARCH64_MARK_LA  8
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Line number format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  union {
 | 
			
		||||
    UINT32  SymbolTableIndex; ///< Symbol table index of function name if Linenumber is 0.
 | 
			
		||||
    UINT32  VirtualAddress;   ///< Virtual address of line number.
 | 
			
		||||
    UINT32    SymbolTableIndex; ///< Symbol table index of function name if Linenumber is 0.
 | 
			
		||||
    UINT32    VirtualAddress;   ///< Virtual address of line number.
 | 
			
		||||
  } Type;
 | 
			
		||||
  UINT16  Linenumber;         ///< Line number.
 | 
			
		||||
  UINT16    Linenumber;       ///< Line number.
 | 
			
		||||
} EFI_IMAGE_LINENUMBER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Size of EFI_IMAGE_LINENUMBER.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_LINENUMBER 6
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_LINENUMBER  6
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Archive format.
 | 
			
		||||
@ -531,20 +544,19 @@ typedef struct {
 | 
			
		||||
/// Archive Member Headers
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 Name[16];     ///< File member name - `/' terminated.
 | 
			
		||||
  UINT8 Date[12];     ///< File member date - decimal.
 | 
			
		||||
  UINT8 UserID[6];    ///< File member user id - decimal.
 | 
			
		||||
  UINT8 GroupID[6];   ///< File member group id - decimal.
 | 
			
		||||
  UINT8 Mode[8];      ///< File member mode - octal.
 | 
			
		||||
  UINT8 Size[10];     ///< File member size - decimal.
 | 
			
		||||
  UINT8 EndHeader[2]; ///< String to end header. (0x60 0x0A).
 | 
			
		||||
  UINT8    Name[16];     ///< File member name - `/' terminated.
 | 
			
		||||
  UINT8    Date[12];     ///< File member date - decimal.
 | 
			
		||||
  UINT8    UserID[6];    ///< File member user id - decimal.
 | 
			
		||||
  UINT8    GroupID[6];   ///< File member group id - decimal.
 | 
			
		||||
  UINT8    Mode[8];      ///< File member mode - octal.
 | 
			
		||||
  UINT8    Size[10];     ///< File member size - decimal.
 | 
			
		||||
  UINT8    EndHeader[2]; ///< String to end header. (0x60 0x0A).
 | 
			
		||||
} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Size of EFI_IMAGE_ARCHIVE_MEMBER_HEADER.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR  60
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// DLL Support
 | 
			
		||||
@ -554,25 +566,25 @@ typedef struct {
 | 
			
		||||
/// Export Directory Table.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Characteristics;
 | 
			
		||||
  UINT32  TimeDateStamp;
 | 
			
		||||
  UINT16  MajorVersion;
 | 
			
		||||
  UINT16  MinorVersion;
 | 
			
		||||
  UINT32  Name;
 | 
			
		||||
  UINT32  Base;
 | 
			
		||||
  UINT32  NumberOfFunctions;
 | 
			
		||||
  UINT32  NumberOfNames;
 | 
			
		||||
  UINT32  AddressOfFunctions;
 | 
			
		||||
  UINT32  AddressOfNames;
 | 
			
		||||
  UINT32  AddressOfNameOrdinals;
 | 
			
		||||
  UINT32    Characteristics;
 | 
			
		||||
  UINT32    TimeDateStamp;
 | 
			
		||||
  UINT16    MajorVersion;
 | 
			
		||||
  UINT16    MinorVersion;
 | 
			
		||||
  UINT32    Name;
 | 
			
		||||
  UINT32    Base;
 | 
			
		||||
  UINT32    NumberOfFunctions;
 | 
			
		||||
  UINT32    NumberOfNames;
 | 
			
		||||
  UINT32    AddressOfFunctions;
 | 
			
		||||
  UINT32    AddressOfNames;
 | 
			
		||||
  UINT32    AddressOfNameOrdinals;
 | 
			
		||||
} EFI_IMAGE_EXPORT_DIRECTORY;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Hint/Name Table.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16  Hint;
 | 
			
		||||
  UINT8   Name[1];
 | 
			
		||||
  UINT16    Hint;
 | 
			
		||||
  UINT8     Name[1];
 | 
			
		||||
} EFI_IMAGE_IMPORT_BY_NAME;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -580,13 +592,13 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  union {
 | 
			
		||||
    UINT32                    Function;
 | 
			
		||||
    UINT32                    Ordinal;
 | 
			
		||||
    EFI_IMAGE_IMPORT_BY_NAME  *AddressOfData;
 | 
			
		||||
    UINT32                      Function;
 | 
			
		||||
    UINT32                      Ordinal;
 | 
			
		||||
    EFI_IMAGE_IMPORT_BY_NAME    *AddressOfData;
 | 
			
		||||
  } u1;
 | 
			
		||||
} EFI_IMAGE_THUNK_DATA;
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_ORDINAL_FLAG              BIT31    ///< Flag for PE32.
 | 
			
		||||
#define EFI_IMAGE_ORDINAL_FLAG  BIT31                ///< Flag for PE32.
 | 
			
		||||
#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal)  ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)
 | 
			
		||||
#define EFI_IMAGE_ORDINAL(Ordinal)          (Ordinal & 0xffff)
 | 
			
		||||
 | 
			
		||||
@ -594,39 +606,38 @@ typedef struct {
 | 
			
		||||
/// Import Directory Table
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32                Characteristics;
 | 
			
		||||
  UINT32                TimeDateStamp;
 | 
			
		||||
  UINT32                ForwarderChain;
 | 
			
		||||
  UINT32                Name;
 | 
			
		||||
  EFI_IMAGE_THUNK_DATA  *FirstThunk;
 | 
			
		||||
  UINT32                  Characteristics;
 | 
			
		||||
  UINT32                  TimeDateStamp;
 | 
			
		||||
  UINT32                  ForwarderChain;
 | 
			
		||||
  UINT32                  Name;
 | 
			
		||||
  EFI_IMAGE_THUNK_DATA    *FirstThunk;
 | 
			
		||||
} EFI_IMAGE_IMPORT_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Debug Directory Format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Characteristics;
 | 
			
		||||
  UINT32  TimeDateStamp;
 | 
			
		||||
  UINT16  MajorVersion;
 | 
			
		||||
  UINT16  MinorVersion;
 | 
			
		||||
  UINT32  Type;
 | 
			
		||||
  UINT32  SizeOfData;
 | 
			
		||||
  UINT32  RVA;           ///< The address of the debug data when loaded, relative to the image base.
 | 
			
		||||
  UINT32  FileOffset;    ///< The file pointer to the debug data.
 | 
			
		||||
  UINT32    Characteristics;
 | 
			
		||||
  UINT32    TimeDateStamp;
 | 
			
		||||
  UINT16    MajorVersion;
 | 
			
		||||
  UINT16    MinorVersion;
 | 
			
		||||
  UINT32    Type;
 | 
			
		||||
  UINT32    SizeOfData;
 | 
			
		||||
  UINT32    RVA;         ///< The address of the debug data when loaded, relative to the image base.
 | 
			
		||||
  UINT32    FileOffset;  ///< The file pointer to the debug data.
 | 
			
		||||
} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2     ///< The Visual C++ debug information.
 | 
			
		||||
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW  2    ///< The Visual C++ debug information.
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Debug Data Structure defined in Microsoft C++.
 | 
			
		||||
///
 | 
			
		||||
#define CODEVIEW_SIGNATURE_NB10  SIGNATURE_32('N', 'B', '1', '0')
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;                        ///< "NB10"
 | 
			
		||||
  UINT32  Unknown;
 | 
			
		||||
  UINT32  Unknown2;
 | 
			
		||||
  UINT32  Unknown3;
 | 
			
		||||
  UINT32    Signature;                      ///< "NB10"
 | 
			
		||||
  UINT32    Unknown;
 | 
			
		||||
  UINT32    Unknown2;
 | 
			
		||||
  UINT32    Unknown3;
 | 
			
		||||
  //
 | 
			
		||||
  // Filename of .PDB goes here
 | 
			
		||||
  //
 | 
			
		||||
@ -637,18 +648,17 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
#define CODEVIEW_SIGNATURE_RSDS  SIGNATURE_32('R', 'S', 'D', 'S')
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Signature;                        ///< "RSDS".
 | 
			
		||||
  UINT32  Unknown;
 | 
			
		||||
  UINT32  Unknown2;
 | 
			
		||||
  UINT32  Unknown3;
 | 
			
		||||
  UINT32  Unknown4;
 | 
			
		||||
  UINT32  Unknown5;
 | 
			
		||||
  UINT32    Signature;                      ///< "RSDS".
 | 
			
		||||
  UINT32    Unknown;
 | 
			
		||||
  UINT32    Unknown2;
 | 
			
		||||
  UINT32    Unknown3;
 | 
			
		||||
  UINT32    Unknown4;
 | 
			
		||||
  UINT32    Unknown5;
 | 
			
		||||
  //
 | 
			
		||||
  // Filename of .PDB goes here
 | 
			
		||||
  //
 | 
			
		||||
} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Debug Data Structure defined by Apple Mach-O to Coff utility.
 | 
			
		||||
///
 | 
			
		||||
@ -665,12 +675,12 @@ typedef struct {
 | 
			
		||||
/// Resource format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  Characteristics;
 | 
			
		||||
  UINT32  TimeDateStamp;
 | 
			
		||||
  UINT16  MajorVersion;
 | 
			
		||||
  UINT16  MinorVersion;
 | 
			
		||||
  UINT16  NumberOfNamedEntries;
 | 
			
		||||
  UINT16  NumberOfIdEntries;
 | 
			
		||||
  UINT32    Characteristics;
 | 
			
		||||
  UINT32    TimeDateStamp;
 | 
			
		||||
  UINT16    MajorVersion;
 | 
			
		||||
  UINT16    MinorVersion;
 | 
			
		||||
  UINT16    NumberOfNamedEntries;
 | 
			
		||||
  UINT16    NumberOfIdEntries;
 | 
			
		||||
  //
 | 
			
		||||
  // Array of EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY entries goes here.
 | 
			
		||||
  //
 | 
			
		||||
@ -682,16 +692,16 @@ typedef struct {
 | 
			
		||||
typedef struct {
 | 
			
		||||
  union {
 | 
			
		||||
    struct {
 | 
			
		||||
      UINT32  NameOffset:31;
 | 
			
		||||
      UINT32  NameIsString:1;
 | 
			
		||||
      UINT32    NameOffset   : 31;
 | 
			
		||||
      UINT32    NameIsString : 1;
 | 
			
		||||
    } s;
 | 
			
		||||
    UINT32  Id;
 | 
			
		||||
    UINT32    Id;
 | 
			
		||||
  } u1;
 | 
			
		||||
  union {
 | 
			
		||||
    UINT32  OffsetToData;
 | 
			
		||||
    UINT32    OffsetToData;
 | 
			
		||||
    struct {
 | 
			
		||||
      UINT32  OffsetToDirectory:31;
 | 
			
		||||
      UINT32  DataIsDirectory:1;
 | 
			
		||||
      UINT32    OffsetToDirectory : 31;
 | 
			
		||||
      UINT32    DataIsDirectory   : 1;
 | 
			
		||||
    } s;
 | 
			
		||||
  } u2;
 | 
			
		||||
} EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY;
 | 
			
		||||
@ -700,36 +710,35 @@ typedef struct {
 | 
			
		||||
/// Resource directory entry for string.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16  Length;
 | 
			
		||||
  CHAR16  String[1];
 | 
			
		||||
  UINT16    Length;
 | 
			
		||||
  CHAR16    String[1];
 | 
			
		||||
} EFI_IMAGE_RESOURCE_DIRECTORY_STRING;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Resource directory entry for data array.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  OffsetToData;
 | 
			
		||||
  UINT32  Size;
 | 
			
		||||
  UINT32  CodePage;
 | 
			
		||||
  UINT32  Reserved;
 | 
			
		||||
  UINT32    OffsetToData;
 | 
			
		||||
  UINT32    Size;
 | 
			
		||||
  UINT32    CodePage;
 | 
			
		||||
  UINT32    Reserved;
 | 
			
		||||
} EFI_IMAGE_RESOURCE_DATA_ENTRY;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Header format for TE images, defined in the PI Specification, 1.0.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                    Signature;            ///< The signature for TE format = "VZ".
 | 
			
		||||
  UINT16                    Machine;              ///< From the original file header.
 | 
			
		||||
  UINT8                     NumberOfSections;     ///< From the original file header.
 | 
			
		||||
  UINT8                     Subsystem;            ///< From original optional header.
 | 
			
		||||
  UINT16                    StrippedSize;         ///< Number of bytes we removed from the header.
 | 
			
		||||
  UINT32                    AddressOfEntryPoint;  ///< Offset to entry point -- from original optional header.
 | 
			
		||||
  UINT32                    BaseOfCode;           ///< From original image -- required for ITP debug.
 | 
			
		||||
  UINT64                    ImageBase;            ///< From original file header.
 | 
			
		||||
  EFI_IMAGE_DATA_DIRECTORY  DataDirectory[2];     ///< Only base relocation and debug directory.
 | 
			
		||||
  UINT16                      Signature;           ///< The signature for TE format = "VZ".
 | 
			
		||||
  UINT16                      Machine;             ///< From the original file header.
 | 
			
		||||
  UINT8                       NumberOfSections;    ///< From the original file header.
 | 
			
		||||
  UINT8                       Subsystem;           ///< From original optional header.
 | 
			
		||||
  UINT16                      StrippedSize;        ///< Number of bytes we removed from the header.
 | 
			
		||||
  UINT32                      AddressOfEntryPoint; ///< Offset to entry point -- from original optional header.
 | 
			
		||||
  UINT32                      BaseOfCode;          ///< From original image -- required for ITP debug.
 | 
			
		||||
  UINT64                      ImageBase;           ///< From original file header.
 | 
			
		||||
  EFI_IMAGE_DATA_DIRECTORY    DataDirectory[2];    ///< Only base relocation and debug directory.
 | 
			
		||||
} EFI_TE_IMAGE_HEADER;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define EFI_TE_IMAGE_HEADER_SIGNATURE  SIGNATURE_16('V', 'Z')
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -738,21 +747,20 @@ typedef struct {
 | 
			
		||||
#define EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC  0
 | 
			
		||||
#define EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG      1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Union of PE32, PE32+, and TE headers.
 | 
			
		||||
///
 | 
			
		||||
typedef union {
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS32   Pe32;
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS64   Pe32Plus;
 | 
			
		||||
  EFI_TE_IMAGE_HEADER      Te;
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS32    Pe32;
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS64    Pe32Plus;
 | 
			
		||||
  EFI_TE_IMAGE_HEADER       Te;
 | 
			
		||||
} EFI_IMAGE_OPTIONAL_HEADER_UNION;
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS32            *Pe32;
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS64            *Pe32Plus;
 | 
			
		||||
  EFI_TE_IMAGE_HEADER               *Te;
 | 
			
		||||
  EFI_IMAGE_OPTIONAL_HEADER_UNION   *Union;
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS32             *Pe32;
 | 
			
		||||
  EFI_IMAGE_NT_HEADERS64             *Pe32Plus;
 | 
			
		||||
  EFI_TE_IMAGE_HEADER                *Te;
 | 
			
		||||
  EFI_IMAGE_OPTIONAL_HEADER_UNION    *Union;
 | 
			
		||||
} EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,21 +1,16 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final
 | 
			
		||||
  TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final and
 | 
			
		||||
  TCG PC Client Platform Firmware Profile Specification, Revision 1.05
 | 
			
		||||
 | 
			
		||||
  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 - 2019, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __UEFI_TCG_PLATFORM_H__
 | 
			
		||||
#define __UEFI_TCG_PLATFORM_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/Tpm12.h>
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/Tpm20.h>
 | 
			
		||||
@ -24,32 +19,46 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Standard event types
 | 
			
		||||
//
 | 
			
		||||
#define EV_PREBOOT_CERT             ((TCG_EVENTTYPE) 0x00000000)
 | 
			
		||||
#define EV_POST_CODE                ((TCG_EVENTTYPE) 0x00000001)
 | 
			
		||||
#define EV_NO_ACTION                ((TCG_EVENTTYPE) 0x00000003)
 | 
			
		||||
#define EV_SEPARATOR                ((TCG_EVENTTYPE) 0x00000004)
 | 
			
		||||
#define EV_ACTION                   ((TCG_EVENTTYPE) 0x00000005)
 | 
			
		||||
#define EV_EVENT_TAG                ((TCG_EVENTTYPE) 0x00000006)
 | 
			
		||||
#define EV_S_CRTM_CONTENTS          ((TCG_EVENTTYPE) 0x00000007)
 | 
			
		||||
#define EV_S_CRTM_VERSION           ((TCG_EVENTTYPE) 0x00000008)
 | 
			
		||||
#define EV_CPU_MICROCODE            ((TCG_EVENTTYPE) 0x00000009)
 | 
			
		||||
#define EV_PLATFORM_CONFIG_FLAGS    ((TCG_EVENTTYPE) 0x0000000A)
 | 
			
		||||
#define EV_TABLE_OF_DEVICES         ((TCG_EVENTTYPE) 0x0000000B)
 | 
			
		||||
#define EV_COMPACT_HASH             ((TCG_EVENTTYPE) 0x0000000C)
 | 
			
		||||
#define EV_NONHOST_CODE             ((TCG_EVENTTYPE) 0x0000000F)
 | 
			
		||||
#define EV_NONHOST_CONFIG           ((TCG_EVENTTYPE) 0x00000010)
 | 
			
		||||
#define EV_NONHOST_INFO             ((TCG_EVENTTYPE) 0x00000011)
 | 
			
		||||
#define EV_OMIT_BOOT_DEVICE_EVENTS  ((TCG_EVENTTYPE) 0x00000012)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// EFI specific event types
 | 
			
		||||
//
 | 
			
		||||
#define EV_EFI_EVENT_BASE                   ((TCG_EVENTTYPE) 0x80000000)
 | 
			
		||||
#define EV_EFI_VARIABLE_DRIVER_CONFIG       (EV_EFI_EVENT_BASE + 1)
 | 
			
		||||
#define EV_EFI_VARIABLE_BOOT                (EV_EFI_EVENT_BASE + 2)
 | 
			
		||||
#define EV_EFI_BOOT_SERVICES_APPLICATION    (EV_EFI_EVENT_BASE + 3)
 | 
			
		||||
#define EV_EFI_BOOT_SERVICES_DRIVER         (EV_EFI_EVENT_BASE + 4)
 | 
			
		||||
#define EV_EFI_RUNTIME_SERVICES_DRIVER      (EV_EFI_EVENT_BASE + 5)
 | 
			
		||||
#define EV_EFI_GPT_EVENT                    (EV_EFI_EVENT_BASE + 6)
 | 
			
		||||
#define EV_EFI_ACTION                       (EV_EFI_EVENT_BASE + 7)
 | 
			
		||||
#define EV_EFI_PLATFORM_FIRMWARE_BLOB       (EV_EFI_EVENT_BASE + 8)
 | 
			
		||||
#define EV_EFI_HANDOFF_TABLES               (EV_EFI_EVENT_BASE + 9)
 | 
			
		||||
#define EV_EFI_VARIABLE_AUTHORITY           (EV_EFI_EVENT_BASE + 0xE0)
 | 
			
		||||
#define EV_EFI_EVENT_BASE                 ((TCG_EVENTTYPE) 0x80000000)
 | 
			
		||||
#define EV_EFI_VARIABLE_DRIVER_CONFIG     (EV_EFI_EVENT_BASE + 1)
 | 
			
		||||
#define EV_EFI_VARIABLE_BOOT              (EV_EFI_EVENT_BASE + 2)
 | 
			
		||||
#define EV_EFI_BOOT_SERVICES_APPLICATION  (EV_EFI_EVENT_BASE + 3)
 | 
			
		||||
#define EV_EFI_BOOT_SERVICES_DRIVER       (EV_EFI_EVENT_BASE + 4)
 | 
			
		||||
#define EV_EFI_RUNTIME_SERVICES_DRIVER    (EV_EFI_EVENT_BASE + 5)
 | 
			
		||||
#define EV_EFI_GPT_EVENT                  (EV_EFI_EVENT_BASE + 6)
 | 
			
		||||
#define EV_EFI_ACTION                     (EV_EFI_EVENT_BASE + 7)
 | 
			
		||||
#define EV_EFI_PLATFORM_FIRMWARE_BLOB     (EV_EFI_EVENT_BASE + 8)
 | 
			
		||||
#define EV_EFI_HANDOFF_TABLES             (EV_EFI_EVENT_BASE + 9)
 | 
			
		||||
#define EV_EFI_PLATFORM_FIRMWARE_BLOB2    (EV_EFI_EVENT_BASE + 0xA)
 | 
			
		||||
#define EV_EFI_HANDOFF_TABLES2            (EV_EFI_EVENT_BASE + 0xB)
 | 
			
		||||
#define EV_EFI_HCRTM_EVENT                (EV_EFI_EVENT_BASE + 0x10)
 | 
			
		||||
#define EV_EFI_VARIABLE_AUTHORITY         (EV_EFI_EVENT_BASE + 0xE0)
 | 
			
		||||
#define EV_EFI_SPDM_FIRMWARE_BLOB         (EV_EFI_EVENT_BASE + 0xE1)
 | 
			
		||||
#define EV_EFI_SPDM_FIRMWARE_CONFIG       (EV_EFI_EVENT_BASE + 0xE2)
 | 
			
		||||
 | 
			
		||||
#define EFI_CALLING_EFI_APPLICATION         \
 | 
			
		||||
  "Calling EFI Application from Boot Option"
 | 
			
		||||
#define EFI_RETURNING_FROM_EFI_APPLICATOIN  \
 | 
			
		||||
#define EFI_RETURNING_FROM_EFI_APPLICATION  \
 | 
			
		||||
  "Returning from EFI Application from Boot Option"
 | 
			
		||||
#define EFI_EXIT_BOOT_SERVICES_INVOCATION   \
 | 
			
		||||
  "Exit Boot Services Invocation"
 | 
			
		||||
@ -58,24 +67,26 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED    \
 | 
			
		||||
  "Exit Boot Services Returned with Success"
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_POST_CODE  "POST CODE"
 | 
			
		||||
#define POST_CODE_STR_LEN           (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1)
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_POST_CODE    "POST CODE"
 | 
			
		||||
#define POST_CODE_STR_LEN             (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1)
 | 
			
		||||
#define EV_POSTCODE_INFO_SMM_CODE  "SMM CODE"
 | 
			
		||||
#define SMM_CODE_STR_LEN           (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1)
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_SMM_CODE     "SMM CODE"
 | 
			
		||||
#define SMM_CODE_STR_LEN              (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1)
 | 
			
		||||
#define EV_POSTCODE_INFO_ACPI_DATA  "ACPI DATA"
 | 
			
		||||
#define ACPI_DATA_LEN               (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1)
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_ACPI_DATA    "ACPI DATA"
 | 
			
		||||
#define ACPI_DATA_LEN                 (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1)
 | 
			
		||||
#define EV_POSTCODE_INFO_BIS_CODE  "BIS CODE"
 | 
			
		||||
#define BIS_CODE_LEN               (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1)
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_BIS_CODE     "BIS CODE"
 | 
			
		||||
#define BIS_CODE_LEN                  (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1)
 | 
			
		||||
#define EV_POSTCODE_INFO_UEFI_PI  "UEFI PI"
 | 
			
		||||
#define UEFI_PI_LEN               (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1)
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_UEFI_PI      "UEFI PI"
 | 
			
		||||
#define UEFI_PI_LEN                   (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1)
 | 
			
		||||
#define EV_POSTCODE_INFO_OPROM  "Embedded Option ROM"
 | 
			
		||||
#define OPROM_LEN               (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
 | 
			
		||||
 | 
			
		||||
#define EV_POSTCODE_INFO_OPROM        "Embedded Option ROM"
 | 
			
		||||
#define OPROM_LEN                     (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
 | 
			
		||||
#define EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER  "Embedded UEFI Driver"
 | 
			
		||||
#define EMBEDDED_UEFI_DRIVER_LEN               (sizeof(EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER) - 1)
 | 
			
		||||
 | 
			
		||||
#define FIRMWARE_DEBUGGER_EVENT_STRING      "UEFI Debug Mode"
 | 
			
		||||
#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN  (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)
 | 
			
		||||
@ -85,30 +96,30 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
#pragma pack (1)
 | 
			
		||||
 | 
			
		||||
typedef UINT32                     TCG_EVENTTYPE;
 | 
			
		||||
typedef TPM_PCRINDEX               TCG_PCRINDEX;
 | 
			
		||||
typedef TPM_DIGEST                 TCG_DIGEST;
 | 
			
		||||
typedef UINT32        TCG_EVENTTYPE;
 | 
			
		||||
typedef TPM_PCRINDEX  TCG_PCRINDEX;
 | 
			
		||||
typedef TPM_DIGEST    TCG_DIGEST;
 | 
			
		||||
///
 | 
			
		||||
/// Event Log Entry Structure Definition
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdTCG_PCR_EVENT {
 | 
			
		||||
  TCG_PCRINDEX                      PCRIndex;  ///< PCRIndex event extended to
 | 
			
		||||
  TCG_EVENTTYPE                     EventType; ///< TCG EFI event type
 | 
			
		||||
  TCG_DIGEST                        Digest;    ///< Value extended into PCRIndex
 | 
			
		||||
  UINT32                            EventSize; ///< Size of the event data
 | 
			
		||||
  UINT8                             Event[1];  ///< The event data
 | 
			
		||||
  TCG_PCRINDEX     PCRIndex;                   ///< PCRIndex event extended to
 | 
			
		||||
  TCG_EVENTTYPE    EventType;                  ///< TCG EFI event type
 | 
			
		||||
  TCG_DIGEST       Digest;                     ///< Value extended into PCRIndex
 | 
			
		||||
  UINT32           EventSize;                  ///< Size of the event data
 | 
			
		||||
  UINT8            Event[1];                   ///< The event data
 | 
			
		||||
} TCG_PCR_EVENT;
 | 
			
		||||
 | 
			
		||||
#define TSS_EVENT_DATA_MAX_SIZE   256
 | 
			
		||||
#define TSS_EVENT_DATA_MAX_SIZE  256
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// TCG_PCR_EVENT_HDR
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdTCG_PCR_EVENT_HDR {
 | 
			
		||||
  TCG_PCRINDEX                      PCRIndex;
 | 
			
		||||
  TCG_EVENTTYPE                     EventType;
 | 
			
		||||
  TCG_DIGEST                        Digest;
 | 
			
		||||
  UINT32                            EventSize;
 | 
			
		||||
  TCG_PCRINDEX     PCRIndex;
 | 
			
		||||
  TCG_EVENTTYPE    EventType;
 | 
			
		||||
  TCG_DIGEST       Digest;
 | 
			
		||||
  UINT32           EventSize;
 | 
			
		||||
} TCG_PCR_EVENT_HDR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -118,10 +129,34 @@ typedef struct tdTCG_PCR_EVENT_HDR {
 | 
			
		||||
/// because PEI is 32-bit while DXE is 64-bit on x64 platforms
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS              BlobBase;
 | 
			
		||||
  UINT64                            BlobLength;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    BlobBase;
 | 
			
		||||
  UINT64                  BlobLength;
 | 
			
		||||
} EFI_PLATFORM_FIRMWARE_BLOB;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// UEFI_PLATFORM_FIRMWARE_BLOB
 | 
			
		||||
///
 | 
			
		||||
/// This structure is used in EV_EFI_PLATFORM_FIRMWARE_BLOB
 | 
			
		||||
/// event to facilitate the measurement of firmware volume.
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB {
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    BlobBase;
 | 
			
		||||
  UINT64                  BlobLength;
 | 
			
		||||
} UEFI_PLATFORM_FIRMWARE_BLOB;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// UEFI_PLATFORM_FIRMWARE_BLOB2
 | 
			
		||||
///
 | 
			
		||||
/// This structure is used in EV_EFI_PLATFORM_FIRMWARE_BLOB2
 | 
			
		||||
/// event to facilitate the measurement of firmware volume.
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB2 {
 | 
			
		||||
  UINT8    BlobDescriptionSize;
 | 
			
		||||
  // UINT8                             BlobDescription[BlobDescriptionSize];
 | 
			
		||||
  // EFI_PHYSICAL_ADDRESS              BlobBase;
 | 
			
		||||
  // UINT64                            BlobLength;
 | 
			
		||||
} UEFI_PLATFORM_FIRMWARE_BLOB2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_IMAGE_LOAD_EVENT
 | 
			
		||||
///
 | 
			
		||||
@ -129,13 +164,27 @@ typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {
 | 
			
		||||
/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdEFI_IMAGE_LOAD_EVENT {
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS              ImageLocationInMemory;
 | 
			
		||||
  UINTN                             ImageLengthInMemory;
 | 
			
		||||
  UINTN                             ImageLinkTimeAddress;
 | 
			
		||||
  UINTN                             LengthOfDevicePath;
 | 
			
		||||
  EFI_DEVICE_PATH_PROTOCOL          DevicePath[1];
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS        ImageLocationInMemory;
 | 
			
		||||
  UINTN                       ImageLengthInMemory;
 | 
			
		||||
  UINTN                       ImageLinkTimeAddress;
 | 
			
		||||
  UINTN                       LengthOfDevicePath;
 | 
			
		||||
  EFI_DEVICE_PATH_PROTOCOL    DevicePath[1];
 | 
			
		||||
} EFI_IMAGE_LOAD_EVENT;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// UEFI_IMAGE_LOAD_EVENT
 | 
			
		||||
///
 | 
			
		||||
/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,
 | 
			
		||||
/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdUEFI_IMAGE_LOAD_EVENT {
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS        ImageLocationInMemory;
 | 
			
		||||
  UINT64                      ImageLengthInMemory;
 | 
			
		||||
  UINT64                      ImageLinkTimeAddress;
 | 
			
		||||
  UINT64                      LengthOfDevicePath;
 | 
			
		||||
  EFI_DEVICE_PATH_PROTOCOL    DevicePath[1];
 | 
			
		||||
} UEFI_IMAGE_LOAD_EVENT;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_HANDOFF_TABLE_POINTERS
 | 
			
		||||
///
 | 
			
		||||
@ -143,10 +192,34 @@ typedef struct tdEFI_IMAGE_LOAD_EVENT {
 | 
			
		||||
/// the measurement of given configuration tables.
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdEFI_HANDOFF_TABLE_POINTERS {
 | 
			
		||||
  UINTN                             NumberOfTables;
 | 
			
		||||
  EFI_CONFIGURATION_TABLE           TableEntry[1];
 | 
			
		||||
  UINTN                      NumberOfTables;
 | 
			
		||||
  EFI_CONFIGURATION_TABLE    TableEntry[1];
 | 
			
		||||
} EFI_HANDOFF_TABLE_POINTERS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// UEFI_HANDOFF_TABLE_POINTERS
 | 
			
		||||
///
 | 
			
		||||
/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate
 | 
			
		||||
/// the measurement of given configuration tables.
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdUEFI_HANDOFF_TABLE_POINTERS {
 | 
			
		||||
  UINT64                     NumberOfTables;
 | 
			
		||||
  EFI_CONFIGURATION_TABLE    TableEntry[1];
 | 
			
		||||
} UEFI_HANDOFF_TABLE_POINTERS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// UEFI_HANDOFF_TABLE_POINTERS2
 | 
			
		||||
///
 | 
			
		||||
/// This structure is used in EV_EFI_HANDOFF_TABLES2 event to facilitate
 | 
			
		||||
/// the measurement of given configuration tables.
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdUEFI_HANDOFF_TABLE_POINTERS2 {
 | 
			
		||||
  UINT8    TableDescriptionSize;
 | 
			
		||||
  // UINT8                             TableDescription[TableDescriptionSize];
 | 
			
		||||
  // UINT64                            NumberOfTables;
 | 
			
		||||
  // EFI_CONFIGURATION_TABLE           TableEntry[1];
 | 
			
		||||
} UEFI_HANDOFF_TABLE_POINTERS2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_VARIABLE_DATA
 | 
			
		||||
///
 | 
			
		||||
@ -156,11 +229,11 @@ typedef struct tdEFI_HANDOFF_TABLE_POINTERS {
 | 
			
		||||
/// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdEFI_VARIABLE_DATA {
 | 
			
		||||
  EFI_GUID                          VariableName;
 | 
			
		||||
  UINTN                             UnicodeNameLength;
 | 
			
		||||
  UINTN                             VariableDataLength;
 | 
			
		||||
  CHAR16                            UnicodeName[1];
 | 
			
		||||
  INT8                              VariableData[1];  ///< Driver or platform-specific data
 | 
			
		||||
  EFI_GUID    VariableName;
 | 
			
		||||
  UINTN       UnicodeNameLength;
 | 
			
		||||
  UINTN       VariableDataLength;
 | 
			
		||||
  CHAR16      UnicodeName[1];
 | 
			
		||||
  INT8        VariableData[1];                        ///< Driver or platform-specific data
 | 
			
		||||
} EFI_VARIABLE_DATA;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -172,50 +245,110 @@ typedef struct tdEFI_VARIABLE_DATA {
 | 
			
		||||
/// This is defined in TCG PC Client Firmware Profile Spec 00.21
 | 
			
		||||
///
 | 
			
		||||
typedef struct tdUEFI_VARIABLE_DATA {
 | 
			
		||||
  EFI_GUID                          VariableName;
 | 
			
		||||
  UINT64                            UnicodeNameLength;
 | 
			
		||||
  UINT64                            VariableDataLength;
 | 
			
		||||
  CHAR16                            UnicodeName[1];
 | 
			
		||||
  INT8                              VariableData[1];  ///< Driver or platform-specific data
 | 
			
		||||
  EFI_GUID    VariableName;
 | 
			
		||||
  UINT64      UnicodeNameLength;
 | 
			
		||||
  UINT64      VariableDataLength;
 | 
			
		||||
  CHAR16      UnicodeName[1];
 | 
			
		||||
  INT8        VariableData[1];                        ///< Driver or platform-specific data
 | 
			
		||||
} UEFI_VARIABLE_DATA;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// For TrEE1.0 compatibility
 | 
			
		||||
//
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_GUID                          VariableName;
 | 
			
		||||
  UINT64                            UnicodeNameLength;   // The TCG Definition used UINTN
 | 
			
		||||
  UINT64                            VariableDataLength;  // The TCG Definition used UINTN
 | 
			
		||||
  CHAR16                            UnicodeName[1];
 | 
			
		||||
  INT8                              VariableData[1];
 | 
			
		||||
  EFI_GUID    VariableName;
 | 
			
		||||
  UINT64      UnicodeNameLength;                         // The TCG Definition used UINTN
 | 
			
		||||
  UINT64      VariableDataLength;                        // The TCG Definition used UINTN
 | 
			
		||||
  CHAR16      UnicodeName[1];
 | 
			
		||||
  INT8        VariableData[1];
 | 
			
		||||
} EFI_VARIABLE_DATA_TREE;
 | 
			
		||||
 | 
			
		||||
typedef struct tdEFI_GPT_DATA {
 | 
			
		||||
  EFI_PARTITION_TABLE_HEADER  EfiPartitionHeader;
 | 
			
		||||
  UINTN                       NumberOfPartitions;
 | 
			
		||||
  EFI_PARTITION_ENTRY         Partitions[1];
 | 
			
		||||
  EFI_PARTITION_TABLE_HEADER    EfiPartitionHeader;
 | 
			
		||||
  UINTN                         NumberOfPartitions;
 | 
			
		||||
  EFI_PARTITION_ENTRY           Partitions[1];
 | 
			
		||||
} EFI_GPT_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct tdUEFI_GPT_DATA {
 | 
			
		||||
  EFI_PARTITION_TABLE_HEADER    EfiPartitionHeader;
 | 
			
		||||
  UINT64                        NumberOfPartitions;
 | 
			
		||||
  EFI_PARTITION_ENTRY           Partitions[1];
 | 
			
		||||
} UEFI_GPT_DATA;
 | 
			
		||||
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE  "SPDM Device Sec"
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION    1
 | 
			
		||||
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_NULL  0
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_PCI   1
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_USB   2
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// TCG_DEVICE_SECURITY_EVENT_DATA_HEADER
 | 
			
		||||
/// This is the header of TCG_DEVICE_SECURITY_EVENT_DATA, which is
 | 
			
		||||
/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8     Signature[16];
 | 
			
		||||
  UINT16    Version;
 | 
			
		||||
  UINT16    Length;
 | 
			
		||||
  UINT32    SpdmHashAlgo;
 | 
			
		||||
  UINT32    DeviceType;
 | 
			
		||||
  // SPDM_MEASUREMENT_BLOCK         SpdmMeasurementBlock;
 | 
			
		||||
} TCG_DEVICE_SECURITY_EVENT_DATA_HEADER;
 | 
			
		||||
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT_VERSION  0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT
 | 
			
		||||
/// This is the PCI context data of TCG_DEVICE_SECURITY_EVENT_DATA, which is
 | 
			
		||||
/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16    Version;
 | 
			
		||||
  UINT16    Length;
 | 
			
		||||
  UINT16    VendorId;
 | 
			
		||||
  UINT16    DeviceId;
 | 
			
		||||
  UINT8     RevisionID;
 | 
			
		||||
  UINT8     ClassCode[3];
 | 
			
		||||
  UINT16    SubsystemVendorID;
 | 
			
		||||
  UINT16    SubsystemID;
 | 
			
		||||
} TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT;
 | 
			
		||||
 | 
			
		||||
#define TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT_VERSION  0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT
 | 
			
		||||
/// This is the USB context data of TCG_DEVICE_SECURITY_EVENT_DATA, which is
 | 
			
		||||
/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16    Version;
 | 
			
		||||
  UINT16    Length;
 | 
			
		||||
  // UINT8   DeviceDescriptor[DescLen];
 | 
			
		||||
  // UINT8   BodDescriptor[DescLen];
 | 
			
		||||
  // UINT8   ConfigurationDescriptor[DescLen][NumOfConfiguration];
 | 
			
		||||
} TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Crypto Agile Log Entry Format
 | 
			
		||||
//
 | 
			
		||||
typedef struct tdTCG_PCR_EVENT2 {
 | 
			
		||||
  TCG_PCRINDEX        PCRIndex;
 | 
			
		||||
  TCG_EVENTTYPE       EventType;
 | 
			
		||||
  TPML_DIGEST_VALUES  Digest;
 | 
			
		||||
  UINT32              EventSize;
 | 
			
		||||
  UINT8               Event[1];
 | 
			
		||||
  TCG_PCRINDEX          PCRIndex;
 | 
			
		||||
  TCG_EVENTTYPE         EventType;
 | 
			
		||||
  TPML_DIGEST_VALUES    Digest;
 | 
			
		||||
  UINT32                EventSize;
 | 
			
		||||
  UINT8                 Event[1];
 | 
			
		||||
} TCG_PCR_EVENT2;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// TCG PCR Event2 Header
 | 
			
		||||
// Follow TCG EFI Protocol Spec 5.2 Crypto Agile Log Entry Format
 | 
			
		||||
//
 | 
			
		||||
typedef struct tdTCG_PCR_EVENT2_HDR{
 | 
			
		||||
  TCG_PCRINDEX        PCRIndex;
 | 
			
		||||
  TCG_EVENTTYPE       EventType;
 | 
			
		||||
  TPML_DIGEST_VALUES  Digests;
 | 
			
		||||
  UINT32              EventSize;
 | 
			
		||||
typedef struct tdTCG_PCR_EVENT2_HDR {
 | 
			
		||||
  TCG_PCRINDEX          PCRIndex;
 | 
			
		||||
  TCG_EVENTTYPE         EventType;
 | 
			
		||||
  TPML_DIGEST_VALUES    Digests;
 | 
			
		||||
  UINT32                EventSize;
 | 
			
		||||
} TCG_PCR_EVENT2_HDR;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -225,111 +358,140 @@ typedef struct {
 | 
			
		||||
  //
 | 
			
		||||
  // TCG defined hashing algorithm ID.
 | 
			
		||||
  //
 | 
			
		||||
  UINT16              algorithmId;
 | 
			
		||||
  UINT16    algorithmId;
 | 
			
		||||
  //
 | 
			
		||||
  // The size of the digest for the respective hashing algorithm.
 | 
			
		||||
  //
 | 
			
		||||
  UINT16              digestSize;
 | 
			
		||||
  UINT16    digestSize;
 | 
			
		||||
} TCG_EfiSpecIdEventAlgorithmSize;
 | 
			
		||||
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02"
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03"
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SIGNATURE_02  "Spec ID Event02"
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SIGNATURE_03  "Spec ID Event03"
 | 
			
		||||
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12   1
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12   2
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12          2
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12  1
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12  2
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12         2
 | 
			
		||||
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2   2
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2   0
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2          0
 | 
			
		||||
#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105  105
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8               signature[16];
 | 
			
		||||
  UINT8     signature[16];
 | 
			
		||||
  //
 | 
			
		||||
  // The value for the Platform Class.
 | 
			
		||||
  // The enumeration is defined in the TCG ACPI Specification Client Common Header.
 | 
			
		||||
  //
 | 
			
		||||
  UINT32              platformClass;
 | 
			
		||||
  UINT32    platformClass;
 | 
			
		||||
  //
 | 
			
		||||
  // The TCG EFI Platform Specification minor version number this BIOS supports.
 | 
			
		||||
  // Any BIOS supporting version (1.22) MUST set this value to 02h.
 | 
			
		||||
  // Any BIOS supporting version (2.0) SHALL set this value to 0x00.
 | 
			
		||||
  //
 | 
			
		||||
  UINT8               specVersionMinor;
 | 
			
		||||
  UINT8     specVersionMinor;
 | 
			
		||||
  //
 | 
			
		||||
  // The TCG EFI Platform Specification major version number this BIOS supports.
 | 
			
		||||
  // Any BIOS supporting version (1.22) MUST set this value to 01h.
 | 
			
		||||
  // Any BIOS supporting version (2.0) SHALL set this value to 0x02.
 | 
			
		||||
  //
 | 
			
		||||
  UINT8               specVersionMajor;
 | 
			
		||||
  UINT8     specVersionMajor;
 | 
			
		||||
  //
 | 
			
		||||
  // The TCG EFI Platform Specification errata for this specification this BIOS supports.
 | 
			
		||||
  // Any BIOS supporting version and errata (1.22) MUST set this value to 02h.
 | 
			
		||||
  // Any BIOS supporting version and errata (2.0) SHALL set this value to 0x00.
 | 
			
		||||
  //
 | 
			
		||||
  UINT8               specErrata;
 | 
			
		||||
  UINT8     specErrata;
 | 
			
		||||
  //
 | 
			
		||||
  // Specifies the size of the UINTN fields used in various data structures used in this specification.
 | 
			
		||||
  // 0x01 indicates UINT32 and 0x02 indicates UINT64.
 | 
			
		||||
  //
 | 
			
		||||
  UINT8               uintnSize;
 | 
			
		||||
  UINT8     uintnSize;
 | 
			
		||||
  //
 | 
			
		||||
  // This field is added in "Spec ID Event03".
 | 
			
		||||
  // The number of hashing algorithms used in this event log (except the first event).
 | 
			
		||||
  // All events in this event log use all hashing algorithms defined here.
 | 
			
		||||
  //
 | 
			
		||||
//UINT32              numberOfAlgorithms;
 | 
			
		||||
  // UINT32              numberOfAlgorithms;
 | 
			
		||||
  //
 | 
			
		||||
  // This field is added in "Spec ID Event03".
 | 
			
		||||
  // An array of size numberOfAlgorithms of value pairs.
 | 
			
		||||
  //
 | 
			
		||||
//TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms];
 | 
			
		||||
  // TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms];
 | 
			
		||||
  //
 | 
			
		||||
  // Size in bytes of the VendorInfo field.
 | 
			
		||||
  // Maximum value SHALL be FFh bytes.
 | 
			
		||||
  //
 | 
			
		||||
//UINT8               vendorInfoSize;
 | 
			
		||||
  // UINT8               vendorInfoSize;
 | 
			
		||||
  //
 | 
			
		||||
  // Provided for use by the BIOS implementer.
 | 
			
		||||
  // The value might be used, for example, to provide more detailed information about the specific BIOS such as BIOS revision numbers, etc.
 | 
			
		||||
  // The values within this field are not standardized and are implementer-specific.
 | 
			
		||||
  // Platform-specific or -unique information SHALL NOT be provided in this field.
 | 
			
		||||
  //
 | 
			
		||||
//UINT8               vendorInfo[vendorInfoSize];
 | 
			
		||||
  // UINT8               vendorInfo[vendorInfoSize];
 | 
			
		||||
} TCG_EfiSpecIDEventStruct;
 | 
			
		||||
 | 
			
		||||
typedef struct tdTCG_PCClientTaggedEvent {
 | 
			
		||||
  UINT32    taggedEventID;
 | 
			
		||||
  UINT32    taggedEventDataSize;
 | 
			
		||||
  // UINT8               taggedEventData[taggedEventDataSize];
 | 
			
		||||
} TCG_PCClientTaggedEvent;
 | 
			
		||||
 | 
			
		||||
#define TCG_Sp800_155_PlatformId_Event_SIGNATURE   "SP800-155 Event"
 | 
			
		||||
#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE  "SP800-155 Event2"
 | 
			
		||||
 | 
			
		||||
#define TCG_EfiStartupLocalityEvent_SIGNATURE      "StartupLocality"
 | 
			
		||||
typedef struct tdTCG_Sp800_155_PlatformId_Event2 {
 | 
			
		||||
  UINT8       Signature[16];
 | 
			
		||||
  //
 | 
			
		||||
  // Where Vendor ID is an integer defined
 | 
			
		||||
  // at http://www.iana.org/assignments/enterprisenumbers
 | 
			
		||||
  //
 | 
			
		||||
  UINT32      VendorId;
 | 
			
		||||
  //
 | 
			
		||||
  // 16-byte identifier of a given platform's static configuration of code
 | 
			
		||||
  //
 | 
			
		||||
  EFI_GUID    ReferenceManifestGuid;
 | 
			
		||||
  //
 | 
			
		||||
  // Below structure is newly added in TCG_Sp800_155_PlatformId_Event2.
 | 
			
		||||
  //
 | 
			
		||||
  // UINT8               PlatformManufacturerStrSize;
 | 
			
		||||
  // UINT8               PlatformManufacturerStr[PlatformManufacturerStrSize];
 | 
			
		||||
  // UINT8               PlatformModelSize;
 | 
			
		||||
  // UINT8               PlatformModel[PlatformModelSize];
 | 
			
		||||
  // UINT8               PlatformVersionSize;
 | 
			
		||||
  // UINT8               PlatformVersion[PlatformVersionSize];
 | 
			
		||||
  // UINT8               PlatformModelSize;
 | 
			
		||||
  // UINT8               PlatformModel[PlatformModelSize];
 | 
			
		||||
  // UINT8               FirmwareManufacturerStrSize;
 | 
			
		||||
  // UINT8               FirmwareManufacturerStr[FirmwareManufacturerStrSize];
 | 
			
		||||
  // UINT32              FirmwareManufacturerId;
 | 
			
		||||
  // UINT8               FirmwareVersion;
 | 
			
		||||
  // UINT8               FirmwareVersion[FirmwareVersionSize]];
 | 
			
		||||
} TCG_Sp800_155_PlatformId_Event2;
 | 
			
		||||
 | 
			
		||||
#define TCG_EfiStartupLocalityEvent_SIGNATURE  "StartupLocality"
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// PC Client PTP spec Table 8 Relationship between Locality and Locality Attribute
 | 
			
		||||
// The Locality Indicator which sent the TPM2_Startup command
 | 
			
		||||
//
 | 
			
		||||
#define LOCALITY_0_INDICATOR        0x01
 | 
			
		||||
#define LOCALITY_1_INDICATOR        0x02
 | 
			
		||||
#define LOCALITY_2_INDICATOR        0x03
 | 
			
		||||
#define LOCALITY_3_INDICATOR        0x04
 | 
			
		||||
#define LOCALITY_4_INDICATOR        0x05
 | 
			
		||||
 | 
			
		||||
#define LOCALITY_0_INDICATOR  0x00
 | 
			
		||||
#define LOCALITY_3_INDICATOR  0x03
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Startup Locality Event
 | 
			
		||||
//
 | 
			
		||||
typedef struct tdTCG_EfiStartupLocalityEvent{
 | 
			
		||||
  UINT8       Signature[16];
 | 
			
		||||
typedef struct tdTCG_EfiStartupLocalityEvent {
 | 
			
		||||
  UINT8    Signature[16];
 | 
			
		||||
  //
 | 
			
		||||
  // The Locality Indicator which sent the TPM2_Startup command
 | 
			
		||||
  //
 | 
			
		||||
  UINT8       StartupLocality;
 | 
			
		||||
  UINT8    StartupLocality;
 | 
			
		||||
} TCG_EfiStartupLocalityEvent;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Restore original structure alignment
 | 
			
		||||
//
 | 
			
		||||
#pragma pack ()
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,20 +2,14 @@
 | 
			
		||||
  Support for USB 2.0 standard.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __USB_H__
 | 
			
		||||
#define __USB_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Subset of Class and Subclass definitions from USB Specs
 | 
			
		||||
@ -24,52 +18,52 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Usb mass storage class code
 | 
			
		||||
//
 | 
			
		||||
#define USB_MASS_STORE_CLASS    0x08
 | 
			
		||||
#define USB_MASS_STORE_CLASS  0x08
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Usb mass storage subclass code, specify the command set used.
 | 
			
		||||
//
 | 
			
		||||
#define USB_MASS_STORE_RBC      0x01 ///< Reduced Block Commands
 | 
			
		||||
#define USB_MASS_STORE_8020I    0x02 ///< SFF-8020i, typically a CD/DVD device
 | 
			
		||||
#define USB_MASS_STORE_QIC      0x03 ///< Typically a tape device
 | 
			
		||||
#define USB_MASS_STORE_UFI      0x04 ///< Typically a floppy disk driver device
 | 
			
		||||
#define USB_MASS_STORE_8070I    0x05 ///< SFF-8070i, typically a floppy disk driver device.
 | 
			
		||||
#define USB_MASS_STORE_SCSI     0x06 ///< SCSI transparent command set
 | 
			
		||||
#define USB_MASS_STORE_RBC    0x01   ///< Reduced Block Commands
 | 
			
		||||
#define USB_MASS_STORE_8020I  0x02   ///< SFF-8020i, typically a CD/DVD device
 | 
			
		||||
#define USB_MASS_STORE_QIC    0x03   ///< Typically a tape device
 | 
			
		||||
#define USB_MASS_STORE_UFI    0x04   ///< Typically a floppy disk driver device
 | 
			
		||||
#define USB_MASS_STORE_8070I  0x05   ///< SFF-8070i, typically a floppy disk driver device.
 | 
			
		||||
#define USB_MASS_STORE_SCSI   0x06   ///< SCSI transparent command set
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Usb mass storage protocol code, specify the transport protocol
 | 
			
		||||
//
 | 
			
		||||
#define USB_MASS_STORE_CBI0     0x00 ///< CBI protocol with command completion interrupt
 | 
			
		||||
#define USB_MASS_STORE_CBI1     0x01 ///< CBI protocol without command completion interrupt
 | 
			
		||||
#define USB_MASS_STORE_BOT      0x50 ///< Bulk-Only Transport
 | 
			
		||||
#define USB_MASS_STORE_CBI0  0x00    ///< CBI protocol with command completion interrupt
 | 
			
		||||
#define USB_MASS_STORE_CBI1  0x01    ///< CBI protocol without command completion interrupt
 | 
			
		||||
#define USB_MASS_STORE_BOT   0x50    ///< Bulk-Only Transport
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Standard device request and request type
 | 
			
		||||
// USB 2.0 spec, Section 9.4
 | 
			
		||||
//
 | 
			
		||||
#define USB_DEV_GET_STATUS                  0x00
 | 
			
		||||
#define USB_DEV_GET_STATUS_REQ_TYPE_D       0x80 // Receiver : Device
 | 
			
		||||
#define USB_DEV_GET_STATUS_REQ_TYPE_I       0x81 // Receiver : Interface
 | 
			
		||||
#define USB_DEV_GET_STATUS_REQ_TYPE_E       0x82 // Receiver : Endpoint
 | 
			
		||||
#define USB_DEV_GET_STATUS             0x00
 | 
			
		||||
#define USB_DEV_GET_STATUS_REQ_TYPE_D  0x80      // Receiver : Device
 | 
			
		||||
#define USB_DEV_GET_STATUS_REQ_TYPE_I  0x81      // Receiver : Interface
 | 
			
		||||
#define USB_DEV_GET_STATUS_REQ_TYPE_E  0x82      // Receiver : Endpoint
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE               0x01
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D    0x00 // Receiver : Device
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I    0x01 // Receiver : Interface
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E    0x02 // Receiver : Endpoint
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE             0x01
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D  0x00   // Receiver : Device
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I  0x01   // Receiver : Interface
 | 
			
		||||
#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E  0x02   // Receiver : Endpoint
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_SET_FEATURE                 0x03
 | 
			
		||||
#define USB_DEV_SET_FEATURE_REQ_TYPE_D      0x00 // Receiver : Device
 | 
			
		||||
#define USB_DEV_SET_FEATURE_REQ_TYPE_I      0x01 // Receiver : Interface
 | 
			
		||||
#define USB_DEV_SET_FEATURE_REQ_TYPE_E      0x02 // Receiver : Endpoint
 | 
			
		||||
#define USB_DEV_SET_FEATURE             0x03
 | 
			
		||||
#define USB_DEV_SET_FEATURE_REQ_TYPE_D  0x00     // Receiver : Device
 | 
			
		||||
#define USB_DEV_SET_FEATURE_REQ_TYPE_I  0x01     // Receiver : Interface
 | 
			
		||||
#define USB_DEV_SET_FEATURE_REQ_TYPE_E  0x02     // Receiver : Endpoint
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_SET_ADDRESS                 0x05
 | 
			
		||||
#define USB_DEV_SET_ADDRESS_REQ_TYPE        0x00
 | 
			
		||||
#define USB_DEV_SET_ADDRESS           0x05
 | 
			
		||||
#define USB_DEV_SET_ADDRESS_REQ_TYPE  0x00
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_GET_DESCRIPTOR              0x06
 | 
			
		||||
#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE     0x80
 | 
			
		||||
#define USB_DEV_GET_DESCRIPTOR           0x06
 | 
			
		||||
#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE  0x80
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_SET_DESCRIPTOR              0x07
 | 
			
		||||
#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE     0x00
 | 
			
		||||
#define USB_DEV_SET_DESCRIPTOR           0x07
 | 
			
		||||
#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE  0x00
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_GET_CONFIGURATION           0x08
 | 
			
		||||
#define USB_DEV_GET_CONFIGURATION_REQ_TYPE  0x80
 | 
			
		||||
@ -77,15 +71,14 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#define USB_DEV_SET_CONFIGURATION           0x09
 | 
			
		||||
#define USB_DEV_SET_CONFIGURATION_REQ_TYPE  0x00
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_GET_INTERFACE               0x0A
 | 
			
		||||
#define USB_DEV_GET_INTERFACE_REQ_TYPE      0x81
 | 
			
		||||
#define USB_DEV_GET_INTERFACE           0x0A
 | 
			
		||||
#define USB_DEV_GET_INTERFACE_REQ_TYPE  0x81
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_SET_INTERFACE               0x0B
 | 
			
		||||
#define USB_DEV_SET_INTERFACE_REQ_TYPE      0x01
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_SYNCH_FRAME                 0x0C
 | 
			
		||||
#define USB_DEV_SYNCH_FRAME_REQ_TYPE        0x82
 | 
			
		||||
#define USB_DEV_SET_INTERFACE           0x0B
 | 
			
		||||
#define USB_DEV_SET_INTERFACE_REQ_TYPE  0x01
 | 
			
		||||
 | 
			
		||||
#define USB_DEV_SYNCH_FRAME           0x0C
 | 
			
		||||
#define USB_DEV_SYNCH_FRAME_REQ_TYPE  0x82
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// USB standard descriptors and reqeust
 | 
			
		||||
@ -97,11 +90,11 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
/// USB 2.0 spec, Section 9.3
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           RequestType;
 | 
			
		||||
  UINT8           Request;
 | 
			
		||||
  UINT16          Value;
 | 
			
		||||
  UINT16          Index;
 | 
			
		||||
  UINT16          Length;
 | 
			
		||||
  UINT8     RequestType;
 | 
			
		||||
  UINT8     Request;
 | 
			
		||||
  UINT16    Value;
 | 
			
		||||
  UINT16    Index;
 | 
			
		||||
  UINT16    Length;
 | 
			
		||||
} USB_DEVICE_REQUEST;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -109,20 +102,20 @@ typedef struct {
 | 
			
		||||
/// USB 2.0 spec, Section 9.6.1
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           Length;
 | 
			
		||||
  UINT8           DescriptorType;
 | 
			
		||||
  UINT16          BcdUSB;
 | 
			
		||||
  UINT8           DeviceClass;
 | 
			
		||||
  UINT8           DeviceSubClass;
 | 
			
		||||
  UINT8           DeviceProtocol;
 | 
			
		||||
  UINT8           MaxPacketSize0;
 | 
			
		||||
  UINT16          IdVendor;
 | 
			
		||||
  UINT16          IdProduct;
 | 
			
		||||
  UINT16          BcdDevice;
 | 
			
		||||
  UINT8           StrManufacturer;
 | 
			
		||||
  UINT8           StrProduct;
 | 
			
		||||
  UINT8           StrSerialNumber;
 | 
			
		||||
  UINT8           NumConfigurations;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     DescriptorType;
 | 
			
		||||
  UINT16    BcdUSB;
 | 
			
		||||
  UINT8     DeviceClass;
 | 
			
		||||
  UINT8     DeviceSubClass;
 | 
			
		||||
  UINT8     DeviceProtocol;
 | 
			
		||||
  UINT8     MaxPacketSize0;
 | 
			
		||||
  UINT16    IdVendor;
 | 
			
		||||
  UINT16    IdProduct;
 | 
			
		||||
  UINT16    BcdDevice;
 | 
			
		||||
  UINT8     StrManufacturer;
 | 
			
		||||
  UINT8     StrProduct;
 | 
			
		||||
  UINT8     StrSerialNumber;
 | 
			
		||||
  UINT8     NumConfigurations;
 | 
			
		||||
} USB_DEVICE_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -130,14 +123,14 @@ typedef struct {
 | 
			
		||||
/// USB 2.0 spec, Section 9.6.3
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           Length;
 | 
			
		||||
  UINT8           DescriptorType;
 | 
			
		||||
  UINT16          TotalLength;
 | 
			
		||||
  UINT8           NumInterfaces;
 | 
			
		||||
  UINT8           ConfigurationValue;
 | 
			
		||||
  UINT8           Configuration;
 | 
			
		||||
  UINT8           Attributes;
 | 
			
		||||
  UINT8           MaxPower;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     DescriptorType;
 | 
			
		||||
  UINT16    TotalLength;
 | 
			
		||||
  UINT8     NumInterfaces;
 | 
			
		||||
  UINT8     ConfigurationValue;
 | 
			
		||||
  UINT8     Configuration;
 | 
			
		||||
  UINT8     Attributes;
 | 
			
		||||
  UINT8     MaxPower;
 | 
			
		||||
} USB_CONFIG_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -145,15 +138,15 @@ typedef struct {
 | 
			
		||||
/// USB 2.0 spec, Section 9.6.5
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           Length;
 | 
			
		||||
  UINT8           DescriptorType;
 | 
			
		||||
  UINT8           InterfaceNumber;
 | 
			
		||||
  UINT8           AlternateSetting;
 | 
			
		||||
  UINT8           NumEndpoints;
 | 
			
		||||
  UINT8           InterfaceClass;
 | 
			
		||||
  UINT8           InterfaceSubClass;
 | 
			
		||||
  UINT8           InterfaceProtocol;
 | 
			
		||||
  UINT8           Interface;
 | 
			
		||||
  UINT8    Length;
 | 
			
		||||
  UINT8    DescriptorType;
 | 
			
		||||
  UINT8    InterfaceNumber;
 | 
			
		||||
  UINT8    AlternateSetting;
 | 
			
		||||
  UINT8    NumEndpoints;
 | 
			
		||||
  UINT8    InterfaceClass;
 | 
			
		||||
  UINT8    InterfaceSubClass;
 | 
			
		||||
  UINT8    InterfaceProtocol;
 | 
			
		||||
  UINT8    Interface;
 | 
			
		||||
} USB_INTERFACE_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -161,12 +154,12 @@ typedef struct {
 | 
			
		||||
/// USB 2.0 spec, Section 9.6.6
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           Length;
 | 
			
		||||
  UINT8           DescriptorType;
 | 
			
		||||
  UINT8           EndpointAddress;
 | 
			
		||||
  UINT8           Attributes;
 | 
			
		||||
  UINT16          MaxPacketSize;
 | 
			
		||||
  UINT8           Interval;
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     DescriptorType;
 | 
			
		||||
  UINT8     EndpointAddress;
 | 
			
		||||
  UINT8     Attributes;
 | 
			
		||||
  UINT16    MaxPacketSize;
 | 
			
		||||
  UINT8     Interval;
 | 
			
		||||
} USB_ENDPOINT_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -174,45 +167,44 @@ typedef struct {
 | 
			
		||||
/// USB 2.0 spec, Section 9.6.7
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           Length;
 | 
			
		||||
  UINT8           DescriptorType;
 | 
			
		||||
  CHAR16          String[1];
 | 
			
		||||
  UINT8     Length;
 | 
			
		||||
  UINT8     DescriptorType;
 | 
			
		||||
  CHAR16    String[1];
 | 
			
		||||
} EFI_USB_STRING_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
  //
 | 
			
		||||
  // USB request type
 | 
			
		||||
  //
 | 
			
		||||
  USB_REQ_TYPE_STANDARD   = (0x00 << 5),
 | 
			
		||||
  USB_REQ_TYPE_CLASS      = (0x01 << 5),
 | 
			
		||||
  USB_REQ_TYPE_VENDOR     = (0x02 << 5),
 | 
			
		||||
  USB_REQ_TYPE_STANDARD = (0x00 << 5),
 | 
			
		||||
  USB_REQ_TYPE_CLASS    = (0x01 << 5),
 | 
			
		||||
  USB_REQ_TYPE_VENDOR   = (0x02 << 5),
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Standard control transfer request type, or the value
 | 
			
		||||
  // to fill in EFI_USB_DEVICE_REQUEST.Request
 | 
			
		||||
  //
 | 
			
		||||
  USB_REQ_GET_STATUS      = 0x00,
 | 
			
		||||
  USB_REQ_CLEAR_FEATURE   = 0x01,
 | 
			
		||||
  USB_REQ_SET_FEATURE     = 0x03,
 | 
			
		||||
  USB_REQ_SET_ADDRESS     = 0x05,
 | 
			
		||||
  USB_REQ_GET_DESCRIPTOR  = 0x06,
 | 
			
		||||
  USB_REQ_SET_DESCRIPTOR  = 0x07,
 | 
			
		||||
  USB_REQ_GET_CONFIG      = 0x08,
 | 
			
		||||
  USB_REQ_SET_CONFIG      = 0x09,
 | 
			
		||||
  USB_REQ_GET_INTERFACE   = 0x0A,
 | 
			
		||||
  USB_REQ_SET_INTERFACE   = 0x0B,
 | 
			
		||||
  USB_REQ_SYNCH_FRAME     = 0x0C,
 | 
			
		||||
  USB_REQ_GET_STATUS     = 0x00,
 | 
			
		||||
  USB_REQ_CLEAR_FEATURE  = 0x01,
 | 
			
		||||
  USB_REQ_SET_FEATURE    = 0x03,
 | 
			
		||||
  USB_REQ_SET_ADDRESS    = 0x05,
 | 
			
		||||
  USB_REQ_GET_DESCRIPTOR = 0x06,
 | 
			
		||||
  USB_REQ_SET_DESCRIPTOR = 0x07,
 | 
			
		||||
  USB_REQ_GET_CONFIG     = 0x08,
 | 
			
		||||
  USB_REQ_SET_CONFIG     = 0x09,
 | 
			
		||||
  USB_REQ_GET_INTERFACE  = 0x0A,
 | 
			
		||||
  USB_REQ_SET_INTERFACE  = 0x0B,
 | 
			
		||||
  USB_REQ_SYNCH_FRAME    = 0x0C,
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Usb control transfer target
 | 
			
		||||
  //
 | 
			
		||||
  USB_TARGET_DEVICE       = 0,
 | 
			
		||||
  USB_TARGET_INTERFACE    = 0x01,
 | 
			
		||||
  USB_TARGET_ENDPOINT     = 0x02,
 | 
			
		||||
  USB_TARGET_OTHER        = 0x03,
 | 
			
		||||
  USB_TARGET_DEVICE    = 0,
 | 
			
		||||
  USB_TARGET_INTERFACE = 0x01,
 | 
			
		||||
  USB_TARGET_ENDPOINT  = 0x02,
 | 
			
		||||
  USB_TARGET_OTHER     = 0x03,
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // USB Descriptor types
 | 
			
		||||
@ -233,21 +225,20 @@ typedef enum {
 | 
			
		||||
  //
 | 
			
		||||
  // USB endpoint types: 00: control, 01: isochronous, 10: bulk, 11: interrupt
 | 
			
		||||
  //
 | 
			
		||||
  USB_ENDPOINT_CONTROL    = 0x00,
 | 
			
		||||
  USB_ENDPOINT_ISO        = 0x01,
 | 
			
		||||
  USB_ENDPOINT_BULK       = 0x02,
 | 
			
		||||
  USB_ENDPOINT_INTERRUPT  = 0x03,
 | 
			
		||||
  USB_ENDPOINT_CONTROL   = 0x00,
 | 
			
		||||
  USB_ENDPOINT_ISO       = 0x01,
 | 
			
		||||
  USB_ENDPOINT_BULK      = 0x02,
 | 
			
		||||
  USB_ENDPOINT_INTERRUPT = 0x03,
 | 
			
		||||
 | 
			
		||||
  USB_ENDPOINT_TYPE_MASK  = 0x03,
 | 
			
		||||
  USB_ENDPOINT_DIR_IN     = 0x80,
 | 
			
		||||
  USB_ENDPOINT_TYPE_MASK = 0x03,
 | 
			
		||||
  USB_ENDPOINT_DIR_IN    = 0x80,
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  //Use 200 ms to increase the error handling response time
 | 
			
		||||
  // Use 200 ms to increase the error handling response time
 | 
			
		||||
  //
 | 
			
		||||
  EFI_USB_INTERRUPT_DELAY = 2000000
 | 
			
		||||
} USB_TYPES_DEFINITION;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// HID constants definition, see Device Class Definition
 | 
			
		||||
// for Human Interface Devices (HID) rev1.11
 | 
			
		||||
@ -261,19 +252,19 @@ typedef enum {
 | 
			
		||||
//
 | 
			
		||||
// HID specific requests.
 | 
			
		||||
//
 | 
			
		||||
#define USB_HID_CLASS_GET_REQ_TYPE       0xa1
 | 
			
		||||
#define USB_HID_CLASS_SET_REQ_TYPE       0x21
 | 
			
		||||
#define USB_HID_CLASS_GET_REQ_TYPE  0xa1
 | 
			
		||||
#define USB_HID_CLASS_SET_REQ_TYPE  0x21
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// HID report item format
 | 
			
		||||
//
 | 
			
		||||
#define HID_ITEM_FORMAT_SHORT 0
 | 
			
		||||
#define HID_ITEM_FORMAT_LONG  1
 | 
			
		||||
#define HID_ITEM_FORMAT_SHORT  0
 | 
			
		||||
#define HID_ITEM_FORMAT_LONG   1
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Special tag indicating long items
 | 
			
		||||
//
 | 
			
		||||
#define HID_ITEM_TAG_LONG 15
 | 
			
		||||
#define HID_ITEM_TAG_LONG  15
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// HID report descriptor item type (prefix bit 2,3)
 | 
			
		||||
@ -295,15 +286,15 @@ typedef enum {
 | 
			
		||||
//
 | 
			
		||||
// HID report descriptor main item contents
 | 
			
		||||
//
 | 
			
		||||
#define HID_MAIN_ITEM_CONSTANT      0x001
 | 
			
		||||
#define HID_MAIN_ITEM_VARIABLE      0x002
 | 
			
		||||
#define HID_MAIN_ITEM_RELATIVE      0x004
 | 
			
		||||
#define HID_MAIN_ITEM_WRAP          0x008
 | 
			
		||||
#define HID_MAIN_ITEM_NONLINEAR     0x010
 | 
			
		||||
#define HID_MAIN_ITEM_NO_PREFERRED  0x020
 | 
			
		||||
#define HID_MAIN_ITEM_NULL_STATE    0x040
 | 
			
		||||
#define HID_MAIN_ITEM_VOLATILE      0x080
 | 
			
		||||
#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
 | 
			
		||||
#define HID_MAIN_ITEM_CONSTANT       0x001
 | 
			
		||||
#define HID_MAIN_ITEM_VARIABLE       0x002
 | 
			
		||||
#define HID_MAIN_ITEM_RELATIVE       0x004
 | 
			
		||||
#define HID_MAIN_ITEM_WRAP           0x008
 | 
			
		||||
#define HID_MAIN_ITEM_NONLINEAR      0x010
 | 
			
		||||
#define HID_MAIN_ITEM_NO_PREFERRED   0x020
 | 
			
		||||
#define HID_MAIN_ITEM_NULL_STATE     0x040
 | 
			
		||||
#define HID_MAIN_ITEM_VOLATILE       0x080
 | 
			
		||||
#define HID_MAIN_ITEM_BUFFERED_BYTE  0x100
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// HID report descriptor collection item types
 | 
			
		||||
@ -331,16 +322,16 @@ typedef enum {
 | 
			
		||||
//
 | 
			
		||||
// HID report descriptor local item tags
 | 
			
		||||
//
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_USAGE              0
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM      1
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM      2
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX   3
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_STRING_INDEX       7
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM     8
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM     9
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DELIMITER          10
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_USAGE               0
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM       1
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM       2
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX    3
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM  4
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM  5
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_STRING_INDEX        7
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM      8
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM      9
 | 
			
		||||
#define HID_LOCAL_ITEM_TAG_DELIMITER           10
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// HID report types
 | 
			
		||||
@ -365,8 +356,8 @@ typedef enum {
 | 
			
		||||
/// HID 1.1, section 6.2.1
 | 
			
		||||
///
 | 
			
		||||
typedef struct hid_class_descriptor {
 | 
			
		||||
  UINT8   DescriptorType;
 | 
			
		||||
  UINT16  DescriptorLength;
 | 
			
		||||
  UINT8     DescriptorType;
 | 
			
		||||
  UINT16    DescriptorLength;
 | 
			
		||||
} EFI_USB_HID_CLASS_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -375,12 +366,12 @@ typedef struct hid_class_descriptor {
 | 
			
		||||
/// HID 1.1, section 6.2.1
 | 
			
		||||
///
 | 
			
		||||
typedef struct hid_descriptor {
 | 
			
		||||
  UINT8                         Length;
 | 
			
		||||
  UINT8                         DescriptorType;
 | 
			
		||||
  UINT16                        BcdHID;
 | 
			
		||||
  UINT8                         CountryCode;
 | 
			
		||||
  UINT8                         NumDescriptors;
 | 
			
		||||
  EFI_USB_HID_CLASS_DESCRIPTOR  HidClassDesc[1];
 | 
			
		||||
  UINT8                           Length;
 | 
			
		||||
  UINT8                           DescriptorType;
 | 
			
		||||
  UINT16                          BcdHID;
 | 
			
		||||
  UINT8                           CountryCode;
 | 
			
		||||
  UINT8                           NumDescriptors;
 | 
			
		||||
  EFI_USB_HID_CLASS_DESCRIPTOR    HidClassDesc[1];
 | 
			
		||||
} EFI_USB_HID_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -2,13 +2,7 @@
 | 
			
		||||
  Present the boot mode values in PI.
 | 
			
		||||
 | 
			
		||||
  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:
 | 
			
		||||
  PI Version 1.2.1A
 | 
			
		||||
@ -18,27 +12,27 @@
 | 
			
		||||
#ifndef __PI_BOOT_MODE_H__
 | 
			
		||||
#define __PI_BOOT_MODE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI boot mode
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_BOOT_MODE;
 | 
			
		||||
typedef UINT32 EFI_BOOT_MODE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// 0x21 - 0xf..f are reserved.
 | 
			
		||||
//
 | 
			
		||||
#define BOOT_WITH_FULL_CONFIGURATION                  0x00
 | 
			
		||||
#define BOOT_WITH_MINIMAL_CONFIGURATION               0x01
 | 
			
		||||
#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES        0x02
 | 
			
		||||
#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03
 | 
			
		||||
#define BOOT_WITH_DEFAULT_SETTINGS                    0x04
 | 
			
		||||
#define BOOT_ON_S4_RESUME                             0x05
 | 
			
		||||
#define BOOT_ON_S5_RESUME                             0x06
 | 
			
		||||
#define BOOT_WITH_MFG_MODE_SETTINGS                   0x07
 | 
			
		||||
#define BOOT_ON_S2_RESUME                             0x10
 | 
			
		||||
#define BOOT_ON_S3_RESUME                             0x11
 | 
			
		||||
#define BOOT_ON_FLASH_UPDATE                          0x12
 | 
			
		||||
#define BOOT_IN_RECOVERY_MODE                         0x20
 | 
			
		||||
#define BOOT_WITH_FULL_CONFIGURATION                   0x00
 | 
			
		||||
#define BOOT_WITH_MINIMAL_CONFIGURATION                0x01
 | 
			
		||||
#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES         0x02
 | 
			
		||||
#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS  0x03
 | 
			
		||||
#define BOOT_WITH_DEFAULT_SETTINGS                     0x04
 | 
			
		||||
#define BOOT_ON_S4_RESUME                              0x05
 | 
			
		||||
#define BOOT_ON_S5_RESUME                              0x06
 | 
			
		||||
#define BOOT_WITH_MFG_MODE_SETTINGS                    0x07
 | 
			
		||||
#define BOOT_ON_S2_RESUME                              0x10
 | 
			
		||||
#define BOOT_ON_S3_RESUME                              0x11
 | 
			
		||||
#define BOOT_ON_FLASH_UPDATE                           0x12
 | 
			
		||||
#define BOOT_IN_RECOVERY_MODE                          0x20
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,49 +1,43 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Present the dependency expression values in PI.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  PI Version 1.0
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_DEPENDENCY_H__
 | 
			
		||||
#define __PI_DEPENDENCY_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// If present, this must be the first and only opcode,
 | 
			
		||||
/// EFI_DEP_BEFORE may be used by DXE and SMM drivers.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_DEP_BEFORE        0x00
 | 
			
		||||
#define EFI_DEP_BEFORE  0x00
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// If present, this must be the first and only opcode,
 | 
			
		||||
/// EFI_DEP_AFTER may be used by DXE and SMM drivers.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_DEP_AFTER         0x01
 | 
			
		||||
 | 
			
		||||
#define EFI_DEP_PUSH          0x02
 | 
			
		||||
#define EFI_DEP_AND           0x03
 | 
			
		||||
#define EFI_DEP_OR            0x04
 | 
			
		||||
#define EFI_DEP_NOT           0x05
 | 
			
		||||
#define EFI_DEP_TRUE          0x06
 | 
			
		||||
#define EFI_DEP_FALSE         0x07
 | 
			
		||||
#define EFI_DEP_END           0x08
 | 
			
		||||
#define EFI_DEP_AFTER  0x01
 | 
			
		||||
 | 
			
		||||
#define EFI_DEP_PUSH   0x02
 | 
			
		||||
#define EFI_DEP_AND    0x03
 | 
			
		||||
#define EFI_DEP_OR     0x04
 | 
			
		||||
#define EFI_DEP_NOT    0x05
 | 
			
		||||
#define EFI_DEP_TRUE   0x06
 | 
			
		||||
#define EFI_DEP_FALSE  0x07
 | 
			
		||||
#define EFI_DEP_END    0x08
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// If present, this must be the first opcode,
 | 
			
		||||
/// EFI_DEP_SOR is only used by DXE driver.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_DEP_SOR           0x09
 | 
			
		||||
#define EFI_DEP_SOR  0x09
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,24 +1,18 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Include file matches things in PI.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  PI Version 1.4
 | 
			
		||||
  PI Version 1.7
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_DXECIS_H__
 | 
			
		||||
#define __PI_DXECIS_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Uefi/UefiMultiPhase.h>
 | 
			
		||||
#include <ipxe/efi/Pi/PiMultiPhase.h>
 | 
			
		||||
@ -54,13 +48,25 @@ typedef enum {
 | 
			
		||||
  /// A memory region that is visible to the boot processor.
 | 
			
		||||
  /// This memory supports byte-addressable non-volatility.
 | 
			
		||||
  ///
 | 
			
		||||
  EfiGcdMemoryTypePersistentMemory,
 | 
			
		||||
  EfiGcdMemoryTypePersistent,
 | 
			
		||||
  //
 | 
			
		||||
  // Keep original one for the compatibility.
 | 
			
		||||
  //
 | 
			
		||||
  EfiGcdMemoryTypePersistentMemory = EfiGcdMemoryTypePersistent,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A memory region that provides higher reliability relative to other memory in the
 | 
			
		||||
  /// system. If all memory has the same reliability, then this bit is not used.
 | 
			
		||||
  ///
 | 
			
		||||
  EfiGcdMemoryTypeMoreReliable,
 | 
			
		||||
  EfiGcdMemoryTypeMaximum
 | 
			
		||||
  // ///
 | 
			
		||||
  // /// A memory region that describes system memory that has not been accepted
 | 
			
		||||
  // /// by a corresponding call to the underlying isolation architecture.
 | 
			
		||||
  // ///
 | 
			
		||||
  // /// Please be noted:
 | 
			
		||||
  // /// EfiGcdMemoryTypeUnaccepted is defined in PrePiDxeCis.h because it has not been
 | 
			
		||||
  // /// defined in PI spec.
 | 
			
		||||
  // EfiGcdMemoryTypeUnaccepted,
 | 
			
		||||
  EfiGcdMemoryTypeMaximum = 8
 | 
			
		||||
} EFI_GCD_MEMORY_TYPE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -126,29 +132,29 @@ typedef struct {
 | 
			
		||||
  /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
 | 
			
		||||
  /// description in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS  BaseAddress;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    BaseAddress;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of bytes in the memory region.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                Length;
 | 
			
		||||
  UINT64                  Length;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The bit mask of attributes that the memory region is capable of supporting. The bit
 | 
			
		||||
  /// mask of available attributes is defined in the GetMemoryMap() function description
 | 
			
		||||
  /// in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                Capabilities;
 | 
			
		||||
  UINT64                  Capabilities;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The bit mask of attributes that the memory region is currently using. The bit mask of
 | 
			
		||||
  /// available attributes is defined in GetMemoryMap().
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                Attributes;
 | 
			
		||||
  UINT64                  Attributes;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the
 | 
			
		||||
  /// AddMemorySpace() function description.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GCD_MEMORY_TYPE   GcdMemoryType;
 | 
			
		||||
  EFI_GCD_MEMORY_TYPE     GcdMemoryType;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The image handle of the agent that allocated the memory resource described by
 | 
			
		||||
@ -156,7 +162,7 @@ typedef struct {
 | 
			
		||||
  /// resource is not currently allocated. Type EFI_HANDLE is defined in
 | 
			
		||||
  /// InstallProtocolInterface() in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE            ImageHandle;
 | 
			
		||||
  EFI_HANDLE              ImageHandle;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The device handle for which the memory resource has been allocated. If
 | 
			
		||||
@ -165,7 +171,7 @@ typedef struct {
 | 
			
		||||
  /// described by a device handle. Type EFI_HANDLE is defined in
 | 
			
		||||
  /// InstallProtocolInterface() in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE            DeviceHandle;
 | 
			
		||||
  EFI_HANDLE    DeviceHandle;
 | 
			
		||||
} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -177,18 +183,18 @@ typedef struct {
 | 
			
		||||
  /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
 | 
			
		||||
  /// description in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS  BaseAddress;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    BaseAddress;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of bytes in the I/O region.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                Length;
 | 
			
		||||
  UINT64                  Length;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the
 | 
			
		||||
  /// AddIoSpace() function description.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GCD_IO_TYPE       GcdIoType;
 | 
			
		||||
  EFI_GCD_IO_TYPE         GcdIoType;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The image handle of the agent that allocated the I/O resource described by
 | 
			
		||||
@ -196,7 +202,7 @@ typedef struct {
 | 
			
		||||
  /// resource is not currently allocated. Type EFI_HANDLE is defined in
 | 
			
		||||
  /// InstallProtocolInterface() in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE            ImageHandle;
 | 
			
		||||
  EFI_HANDLE              ImageHandle;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The device handle for which the I/O resource has been allocated. If ImageHandle
 | 
			
		||||
@ -205,10 +211,9 @@ typedef struct {
 | 
			
		||||
  /// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI
 | 
			
		||||
  /// 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE            DeviceHandle;
 | 
			
		||||
  EFI_HANDLE    DeviceHandle;
 | 
			
		||||
} EFI_GCD_IO_SPACE_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Adds reserved memory, system memory, or memory-mapped I/O resources to the
 | 
			
		||||
  global coherency domain of the processor.
 | 
			
		||||
@ -411,7 +416,7 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES) (
 | 
			
		||||
(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES)(
 | 
			
		||||
  IN EFI_PHYSICAL_ADDRESS  BaseAddress,
 | 
			
		||||
  IN UINT64                Length,
 | 
			
		||||
  IN UINT64                Capabilities
 | 
			
		||||
@ -603,8 +608,6 @@ EFI_STATUS
 | 
			
		||||
  OUT EFI_GCD_IO_SPACE_DESCRIPTOR  **IoSpaceMap
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Loads and executed DXE drivers from firmware volumes.
 | 
			
		||||
 | 
			
		||||
@ -694,7 +697,7 @@ EFI_STATUS
 | 
			
		||||
//
 | 
			
		||||
#define DXE_SERVICES_SIGNATURE            0x565245535f455844ULL
 | 
			
		||||
#define DXE_SPECIFICATION_MAJOR_REVISION  1
 | 
			
		||||
#define DXE_SPECIFICATION_MINOR_REVISION  40
 | 
			
		||||
#define DXE_SPECIFICATION_MINOR_REVISION  70
 | 
			
		||||
#define DXE_SERVICES_REVISION             ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -702,39 +705,39 @@ typedef struct {
 | 
			
		||||
  /// The table header for the DXE Services Table.
 | 
			
		||||
  /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TABLE_HEADER                Hdr;
 | 
			
		||||
  EFI_TABLE_HEADER                     Hdr;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Global Coherency Domain Services
 | 
			
		||||
  //
 | 
			
		||||
  EFI_ADD_MEMORY_SPACE            AddMemorySpace;
 | 
			
		||||
  EFI_ALLOCATE_MEMORY_SPACE       AllocateMemorySpace;
 | 
			
		||||
  EFI_FREE_MEMORY_SPACE           FreeMemorySpace;
 | 
			
		||||
  EFI_REMOVE_MEMORY_SPACE         RemoveMemorySpace;
 | 
			
		||||
  EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;
 | 
			
		||||
  EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;
 | 
			
		||||
  EFI_GET_MEMORY_SPACE_MAP        GetMemorySpaceMap;
 | 
			
		||||
  EFI_ADD_IO_SPACE                AddIoSpace;
 | 
			
		||||
  EFI_ALLOCATE_IO_SPACE           AllocateIoSpace;
 | 
			
		||||
  EFI_FREE_IO_SPACE               FreeIoSpace;
 | 
			
		||||
  EFI_REMOVE_IO_SPACE             RemoveIoSpace;
 | 
			
		||||
  EFI_GET_IO_SPACE_DESCRIPTOR     GetIoSpaceDescriptor;
 | 
			
		||||
  EFI_GET_IO_SPACE_MAP            GetIoSpaceMap;
 | 
			
		||||
  EFI_ADD_MEMORY_SPACE                 AddMemorySpace;
 | 
			
		||||
  EFI_ALLOCATE_MEMORY_SPACE            AllocateMemorySpace;
 | 
			
		||||
  EFI_FREE_MEMORY_SPACE                FreeMemorySpace;
 | 
			
		||||
  EFI_REMOVE_MEMORY_SPACE              RemoveMemorySpace;
 | 
			
		||||
  EFI_GET_MEMORY_SPACE_DESCRIPTOR      GetMemorySpaceDescriptor;
 | 
			
		||||
  EFI_SET_MEMORY_SPACE_ATTRIBUTES      SetMemorySpaceAttributes;
 | 
			
		||||
  EFI_GET_MEMORY_SPACE_MAP             GetMemorySpaceMap;
 | 
			
		||||
  EFI_ADD_IO_SPACE                     AddIoSpace;
 | 
			
		||||
  EFI_ALLOCATE_IO_SPACE                AllocateIoSpace;
 | 
			
		||||
  EFI_FREE_IO_SPACE                    FreeIoSpace;
 | 
			
		||||
  EFI_REMOVE_IO_SPACE                  RemoveIoSpace;
 | 
			
		||||
  EFI_GET_IO_SPACE_DESCRIPTOR          GetIoSpaceDescriptor;
 | 
			
		||||
  EFI_GET_IO_SPACE_MAP                 GetIoSpaceMap;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Dispatcher Services
 | 
			
		||||
  //
 | 
			
		||||
  EFI_DISPATCH                    Dispatch;
 | 
			
		||||
  EFI_SCHEDULE                    Schedule;
 | 
			
		||||
  EFI_TRUST                       Trust;
 | 
			
		||||
  EFI_DISPATCH                         Dispatch;
 | 
			
		||||
  EFI_SCHEDULE                         Schedule;
 | 
			
		||||
  EFI_TRUST                            Trust;
 | 
			
		||||
  //
 | 
			
		||||
  // Service to process a single firmware volume found in a capsule
 | 
			
		||||
  //
 | 
			
		||||
  EFI_PROCESS_FIRMWARE_VOLUME     ProcessFirmwareVolume;
 | 
			
		||||
  EFI_PROCESS_FIRMWARE_VOLUME          ProcessFirmwareVolume;
 | 
			
		||||
  //
 | 
			
		||||
  // Extensions to Global Coherency Domain Services
 | 
			
		||||
  //
 | 
			
		||||
  EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities;
 | 
			
		||||
  EFI_SET_MEMORY_SPACE_CAPABILITIES    SetMemorySpaceCapabilities;
 | 
			
		||||
} DXE_SERVICES;
 | 
			
		||||
 | 
			
		||||
typedef DXE_SERVICES EFI_DXE_SERVICES;
 | 
			
		||||
 | 
			
		||||
@ -1,25 +1,18 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  The firmware file related definitions in PI.
 | 
			
		||||
 | 
			
		||||
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 - 2017, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  PI Version 1.4.
 | 
			
		||||
  PI Version 1.6.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_FIRMWARE_FILE_H__
 | 
			
		||||
#define __PI_FIRMWARE_FILE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
///
 | 
			
		||||
@ -32,7 +25,7 @@ typedef union {
 | 
			
		||||
    /// header. The State and IntegrityCheck.Checksum.File fields are assumed
 | 
			
		||||
    /// to be zero and the checksum is calculated such that the entire header sums to zero.
 | 
			
		||||
    ///
 | 
			
		||||
    UINT8   Header;
 | 
			
		||||
    UINT8    Header;
 | 
			
		||||
    ///
 | 
			
		||||
    /// If the FFS_ATTRIB_CHECKSUM (see definition below) bit of the Attributes
 | 
			
		||||
    /// field is set to one, the IntegrityCheck.Checksum.File field is an 8-bit
 | 
			
		||||
@ -42,7 +35,7 @@ typedef union {
 | 
			
		||||
    /// 0xAA. The IntegrityCheck.Checksum.File field is valid any time the
 | 
			
		||||
    /// EFI_FILE_DATA_VALID bit is set in the State field.
 | 
			
		||||
    ///
 | 
			
		||||
    UINT8   File;
 | 
			
		||||
    UINT8    File;
 | 
			
		||||
  } Checksum;
 | 
			
		||||
  ///
 | 
			
		||||
  /// This is the full 16 bits of the IntegrityCheck field.
 | 
			
		||||
@ -56,41 +49,47 @@ typedef union {
 | 
			
		||||
///
 | 
			
		||||
#define FFS_FIXED_CHECKSUM  0xAA
 | 
			
		||||
 | 
			
		||||
typedef UINT8 EFI_FV_FILETYPE;
 | 
			
		||||
typedef UINT8 EFI_FFS_FILE_ATTRIBUTES;
 | 
			
		||||
typedef UINT8 EFI_FFS_FILE_STATE;
 | 
			
		||||
typedef UINT8  EFI_FV_FILETYPE;
 | 
			
		||||
typedef UINT8  EFI_FFS_FILE_ATTRIBUTES;
 | 
			
		||||
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
 | 
			
		||||
#define EFI_FV_FILETYPE_SECURITY_CORE         0x03
 | 
			
		||||
#define EFI_FV_FILETYPE_PEI_CORE              0x04
 | 
			
		||||
#define EFI_FV_FILETYPE_DXE_CORE              0x05
 | 
			
		||||
#define EFI_FV_FILETYPE_PEIM                  0x06
 | 
			
		||||
#define EFI_FV_FILETYPE_DRIVER                0x07
 | 
			
		||||
#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER  0x08
 | 
			
		||||
#define EFI_FV_FILETYPE_APPLICATION           0x09
 | 
			
		||||
#define EFI_FV_FILETYPE_SMM                   0x0A
 | 
			
		||||
#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B
 | 
			
		||||
#define EFI_FV_FILETYPE_COMBINED_SMM_DXE      0x0C
 | 
			
		||||
#define EFI_FV_FILETYPE_SMM_CORE              0x0D
 | 
			
		||||
#define EFI_FV_FILETYPE_OEM_MIN               0xc0
 | 
			
		||||
#define EFI_FV_FILETYPE_OEM_MAX               0xdf
 | 
			
		||||
#define EFI_FV_FILETYPE_DEBUG_MIN             0xe0
 | 
			
		||||
#define EFI_FV_FILETYPE_DEBUG_MAX             0xef
 | 
			
		||||
#define EFI_FV_FILETYPE_FFS_MIN               0xf0
 | 
			
		||||
#define EFI_FV_FILETYPE_FFS_MAX               0xff
 | 
			
		||||
#define EFI_FV_FILETYPE_FFS_PAD               0xf0
 | 
			
		||||
#define EFI_FV_FILETYPE_ALL                    0x00
 | 
			
		||||
#define EFI_FV_FILETYPE_RAW                    0x01
 | 
			
		||||
#define EFI_FV_FILETYPE_FREEFORM               0x02
 | 
			
		||||
#define EFI_FV_FILETYPE_SECURITY_CORE          0x03
 | 
			
		||||
#define EFI_FV_FILETYPE_PEI_CORE               0x04
 | 
			
		||||
#define EFI_FV_FILETYPE_DXE_CORE               0x05
 | 
			
		||||
#define EFI_FV_FILETYPE_PEIM                   0x06
 | 
			
		||||
#define EFI_FV_FILETYPE_DRIVER                 0x07
 | 
			
		||||
#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER   0x08
 | 
			
		||||
#define EFI_FV_FILETYPE_APPLICATION            0x09
 | 
			
		||||
#define EFI_FV_FILETYPE_MM                     0x0A
 | 
			
		||||
#define EFI_FV_FILETYPE_SMM                    EFI_FV_FILETYPE_MM
 | 
			
		||||
#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE  0x0B
 | 
			
		||||
#define EFI_FV_FILETYPE_COMBINED_MM_DXE        0x0C
 | 
			
		||||
#define EFI_FV_FILETYPE_COMBINED_SMM_DXE       EFI_FV_FILETYPE_COMBINED_MM_DXE
 | 
			
		||||
#define EFI_FV_FILETYPE_MM_CORE                0x0D
 | 
			
		||||
#define EFI_FV_FILETYPE_SMM_CORE               EFI_FV_FILETYPE_MM_CORE
 | 
			
		||||
#define EFI_FV_FILETYPE_MM_STANDALONE          0x0E
 | 
			
		||||
#define EFI_FV_FILETYPE_MM_CORE_STANDALONE     0x0F
 | 
			
		||||
#define EFI_FV_FILETYPE_OEM_MIN                0xc0
 | 
			
		||||
#define EFI_FV_FILETYPE_OEM_MAX                0xdf
 | 
			
		||||
#define EFI_FV_FILETYPE_DEBUG_MIN              0xe0
 | 
			
		||||
#define EFI_FV_FILETYPE_DEBUG_MAX              0xef
 | 
			
		||||
#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_FIXED              0x04
 | 
			
		||||
#define FFS_ATTRIB_DATA_ALIGNMENT     0x38
 | 
			
		||||
#define FFS_ATTRIB_CHECKSUM           0x40
 | 
			
		||||
#define FFS_ATTRIB_LARGE_FILE        0x01
 | 
			
		||||
#define FFS_ATTRIB_DATA_ALIGNMENT_2  0x02
 | 
			
		||||
#define FFS_ATTRIB_FIXED             0x04
 | 
			
		||||
#define FFS_ATTRIB_DATA_ALIGNMENT    0x38
 | 
			
		||||
#define FFS_ATTRIB_CHECKSUM          0x40
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// FFS File State Bits.
 | 
			
		||||
@ -102,7 +101,6 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 | 
			
		||||
#define EFI_FILE_DELETED              0x10
 | 
			
		||||
#define EFI_FILE_HEADER_INVALID       0x20
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Each file begins with the header that describe the
 | 
			
		||||
/// contents and state of the files.
 | 
			
		||||
@ -111,27 +109,27 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// This GUID is the file name. It is used to uniquely identify the file.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                Name;
 | 
			
		||||
  EFI_GUID                   Name;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Used to verify the integrity of the file.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
 | 
			
		||||
  EFI_FFS_INTEGRITY_CHECK    IntegrityCheck;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Identifies the type of file.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FV_FILETYPE         Type;
 | 
			
		||||
  EFI_FV_FILETYPE            Type;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Declares various file attribute bits.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FFS_FILE_ATTRIBUTES Attributes;
 | 
			
		||||
  EFI_FFS_FILE_ATTRIBUTES    Attributes;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length of the file in bytes, including the FFS header.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   Size[3];
 | 
			
		||||
  UINT8                      Size[3];
 | 
			
		||||
  ///
 | 
			
		||||
  /// Used to track the state of the file throughout the life of the file from creation to deletion.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FFS_FILE_STATE      State;
 | 
			
		||||
  EFI_FFS_FILE_STATE         State;
 | 
			
		||||
} EFI_FFS_FILE_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -140,22 +138,22 @@ typedef struct {
 | 
			
		||||
  /// one instance of a file with the file name GUID of Name in any given firmware
 | 
			
		||||
  /// volume, except if the file type is EFI_FV_FILETYPE_FFS_PAD.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                  Name;
 | 
			
		||||
  EFI_GUID                   Name;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Used to verify the integrity of the file.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FFS_INTEGRITY_CHECK   IntegrityCheck;
 | 
			
		||||
  EFI_FFS_INTEGRITY_CHECK    IntegrityCheck;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Identifies the type of file.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FV_FILETYPE           Type;
 | 
			
		||||
  EFI_FV_FILETYPE            Type;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Declares various file attribute bits.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FFS_FILE_ATTRIBUTES   Attributes;
 | 
			
		||||
  EFI_FFS_FILE_ATTRIBUTES    Attributes;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length of the file in bytes, including the FFS header.
 | 
			
		||||
@ -164,25 +162,32 @@ typedef struct {
 | 
			
		||||
  /// Size is not required to be a multiple of 8 bytes. Given a file F, the next file header is
 | 
			
		||||
  /// located at the next 8-byte aligned firmware volume offset following the last byte of the file F.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                     Size[3];
 | 
			
		||||
  UINT8                 Size[3];
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Used to track the state of the file throughout the life of the file from creation to deletion.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FFS_FILE_STATE        State;
 | 
			
		||||
  EFI_FFS_FILE_STATE    State;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.
 | 
			
		||||
  /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                    ExtendedSize;
 | 
			
		||||
  UINT64                ExtendedSize;
 | 
			
		||||
} EFI_FFS_FILE_HEADER2;
 | 
			
		||||
 | 
			
		||||
#define IS_FFS_FILE2(FfsFileHeaderPtr) \
 | 
			
		||||
    (((((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Attributes) & FFS_ATTRIB_LARGE_FILE) == FFS_ATTRIB_LARGE_FILE)
 | 
			
		||||
 | 
			
		||||
#define FFS_FILE_SIZE(FfsFileHeaderPtr) \
 | 
			
		||||
    ((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))
 | 
			
		||||
///
 | 
			
		||||
/// The argument passed as the FfsFileHeaderPtr parameter to the
 | 
			
		||||
/// FFS_FILE_SIZE() function-like macro below must not have side effects:
 | 
			
		||||
/// FfsFileHeaderPtr is evaluated multiple times.
 | 
			
		||||
///
 | 
			
		||||
#define FFS_FILE_SIZE(FfsFileHeaderPtr)  ((UINT32) (\
 | 
			
		||||
    (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[0]      ) | \
 | 
			
		||||
    (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[1] <<  8) | \
 | 
			
		||||
    (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[2] << 16)))
 | 
			
		||||
 | 
			
		||||
#define FFS_FILE2_SIZE(FfsFileHeaderPtr) \
 | 
			
		||||
    ((UINT32) (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize))
 | 
			
		||||
@ -193,32 +198,33 @@ typedef UINT8 EFI_SECTION_TYPE;
 | 
			
		||||
/// Pseudo type. It is used as a wild card when retrieving sections.
 | 
			
		||||
///  The section type EFI_SECTION_ALL matches all section types.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_SECTION_ALL                   0x00
 | 
			
		||||
#define EFI_SECTION_ALL  0x00
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Encapsulation section Type values.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_SECTION_COMPRESSION           0x01
 | 
			
		||||
#define EFI_SECTION_COMPRESSION  0x01
 | 
			
		||||
 | 
			
		||||
#define EFI_SECTION_GUID_DEFINED          0x02
 | 
			
		||||
#define EFI_SECTION_GUID_DEFINED  0x02
 | 
			
		||||
 | 
			
		||||
#define EFI_SECTION_DISPOSABLE            0x03
 | 
			
		||||
#define EFI_SECTION_DISPOSABLE  0x03
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Leaf section Type values.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_SECTION_PE32                  0x10
 | 
			
		||||
#define EFI_SECTION_PIC                   0x11
 | 
			
		||||
#define EFI_SECTION_TE                    0x12
 | 
			
		||||
#define EFI_SECTION_DXE_DEPEX             0x13
 | 
			
		||||
#define EFI_SECTION_VERSION               0x14
 | 
			
		||||
#define EFI_SECTION_USER_INTERFACE        0x15
 | 
			
		||||
#define EFI_SECTION_COMPATIBILITY16       0x16
 | 
			
		||||
#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE 0x17
 | 
			
		||||
#define EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18
 | 
			
		||||
#define EFI_SECTION_RAW                   0x19
 | 
			
		||||
#define EFI_SECTION_PEI_DEPEX             0x1B
 | 
			
		||||
#define EFI_SECTION_SMM_DEPEX             0x1C
 | 
			
		||||
#define EFI_SECTION_PE32                   0x10
 | 
			
		||||
#define EFI_SECTION_PIC                    0x11
 | 
			
		||||
#define EFI_SECTION_TE                     0x12
 | 
			
		||||
#define EFI_SECTION_DXE_DEPEX              0x13
 | 
			
		||||
#define EFI_SECTION_VERSION                0x14
 | 
			
		||||
#define EFI_SECTION_USER_INTERFACE         0x15
 | 
			
		||||
#define EFI_SECTION_COMPATIBILITY16        0x16
 | 
			
		||||
#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE  0x17
 | 
			
		||||
#define EFI_SECTION_FREEFORM_SUBTYPE_GUID  0x18
 | 
			
		||||
#define EFI_SECTION_RAW                    0x19
 | 
			
		||||
#define EFI_SECTION_PEI_DEPEX              0x1B
 | 
			
		||||
#define EFI_SECTION_MM_DEPEX               0x1C
 | 
			
		||||
#define EFI_SECTION_SMM_DEPEX              EFI_SECTION_MM_DEPEX
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Common section header.
 | 
			
		||||
@ -228,8 +234,8 @@ typedef struct {
 | 
			
		||||
  /// A 24-bit unsigned integer that contains the total size of the section in bytes,
 | 
			
		||||
  /// including the EFI_COMMON_SECTION_HEADER.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8             Size[3];
 | 
			
		||||
  EFI_SECTION_TYPE  Type;
 | 
			
		||||
  UINT8               Size[3];
 | 
			
		||||
  EFI_SECTION_TYPE    Type;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Declares the section type.
 | 
			
		||||
  ///
 | 
			
		||||
@ -240,15 +246,15 @@ typedef struct {
 | 
			
		||||
  /// A 24-bit unsigned integer that contains the total size of the section in bytes,
 | 
			
		||||
  /// including the EFI_COMMON_SECTION_HEADER.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8             Size[3];
 | 
			
		||||
  UINT8               Size[3];
 | 
			
		||||
 | 
			
		||||
  EFI_SECTION_TYPE  Type;
 | 
			
		||||
  EFI_SECTION_TYPE    Type;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// If Size is 0xFFFFFF, then ExtendedSize contains the size of the section. If
 | 
			
		||||
  /// Size is not equal to 0xFFFFFF, then this field does not exist.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32            ExtendedSize;
 | 
			
		||||
  UINT32              ExtendedSize;
 | 
			
		||||
} EFI_COMMON_SECTION_HEADER2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -271,15 +277,15 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Usual common section header. CommonHeader.Type = EFI_SECTION_COMPRESSION.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER   CommonHeader;
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER    CommonHeader;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The UINT32 that indicates the size of the section data after decompression.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      UncompressedLength;
 | 
			
		||||
  UINT32                       UncompressedLength;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Indicates which compression algorithm is used.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                       CompressionType;
 | 
			
		||||
  UINT8                        CompressionType;
 | 
			
		||||
} EFI_COMPRESSION_SECTION;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -306,20 +312,20 @@ typedef struct {
 | 
			
		||||
/// order to conserve space. The contents of this section are implementation specific, but might contain
 | 
			
		||||
/// debug data or detailed integration instructions.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER   EFI_DISPOSABLE_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2  EFI_DISPOSABLE_SECTION2;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_DISPOSABLE_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_DISPOSABLE_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The 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;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_DXE_DEPEX_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The leaf section which contains a PI FV.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER   EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2  EFI_FIRMWARE_VOLUME_IMAGE_SECTION2;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The leaf section which contains a single GUID.
 | 
			
		||||
@ -328,11 +334,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Common section header. CommonHeader.Type = EFI_SECTION_FREEFORM_SUBTYPE_GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER   CommonHeader;
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER    CommonHeader;
 | 
			
		||||
  ///
 | 
			
		||||
  /// This GUID is defined by the creator of the file. It is a vendor-defined file type.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                    SubTypeGuid;
 | 
			
		||||
  EFI_GUID                     SubTypeGuid;
 | 
			
		||||
} EFI_FREEFORM_SUBTYPE_GUID_SECTION;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -358,19 +364,19 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The common section header. CommonHeader.Type = EFI_SECTION_GUID_DEFINED.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER   CommonHeader;
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER    CommonHeader;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The GUID that defines the format of the data that follows. It is a vendor-defined section type.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                    SectionDefinitionGuid;
 | 
			
		||||
  EFI_GUID                     SectionDefinitionGuid;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Contains the offset in bytes from the beginning of the common header to the first byte of the data.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                      DataOffset;
 | 
			
		||||
  UINT16                       DataOffset;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The bit field that declares some specific characteristics of the section contents.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                      Attributes;
 | 
			
		||||
  UINT16                       Attributes;
 | 
			
		||||
} EFI_GUID_DEFINED_SECTION;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -395,14 +401,14 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// The leaf section which contains PE32+ image.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER   EFI_PE32_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2  EFI_PE32_SECTION2;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_PE32_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The leaf section 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;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_PEI_DEPEX_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// A leaf section type that contains a position-independent-code (PIC) image.
 | 
			
		||||
@ -413,20 +419,20 @@ typedef EFI_COMMON_SECTION_HEADER2  EFI_PEI_DEPEX_SECTION2;
 | 
			
		||||
/// execute correctly without performing any relocation or other fix-ups. EFI_PIC_SECTION2 must
 | 
			
		||||
/// be used if the section is 16MB or larger.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER   EFI_PIC_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2  EFI_PIC_SECTION2;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_PIC_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The 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;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_TE_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The 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;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_RAW_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The SMM dependency expression section is a leaf section that contains a dependency expression that
 | 
			
		||||
@ -436,7 +442,7 @@ typedef EFI_COMMON_SECTION_HEADER2  EFI_RAW_SECTION2;
 | 
			
		||||
/// The dependency expression may refer to protocols installed in either the UEFI or the SMM protocol
 | 
			
		||||
/// database. EFI_SMM_DEPEX_SECTION2 must be used if the section is 16MB or larger.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER EFI_SMM_DEPEX_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER  EFI_SMM_DEPEX_SECTION;
 | 
			
		||||
typedef EFI_COMMON_SECTION_HEADER2 EFI_SMM_DEPEX_SECTION2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -444,12 +450,12 @@ typedef EFI_COMMON_SECTION_HEADER2 EFI_SMM_DEPEX_SECTION2;
 | 
			
		||||
/// is human readable file name.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER   CommonHeader;
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER    CommonHeader;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Array of unicode string.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR16                      FileNameString[1];
 | 
			
		||||
  CHAR16                       FileNameString[1];
 | 
			
		||||
} EFI_USER_INTERFACE_SECTION;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -462,13 +468,13 @@ typedef struct {
 | 
			
		||||
/// an optional unicode string that represents the file revision.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER   CommonHeader;
 | 
			
		||||
  UINT16                      BuildNumber;
 | 
			
		||||
  EFI_COMMON_SECTION_HEADER    CommonHeader;
 | 
			
		||||
  UINT16                       BuildNumber;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Array of unicode string.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR16                      VersionString[1];
 | 
			
		||||
  CHAR16                       VersionString[1];
 | 
			
		||||
} EFI_VERSION_SECTION;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -481,11 +487,18 @@ typedef struct {
 | 
			
		||||
  CHAR16                        VersionString[1];
 | 
			
		||||
} EFI_VERSION_SECTION2;
 | 
			
		||||
 | 
			
		||||
#define IS_SECTION2(SectionHeaderPtr) \
 | 
			
		||||
    ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) (UINTN) SectionHeaderPtr)->Size) & 0x00ffffff) == 0x00ffffff)
 | 
			
		||||
///
 | 
			
		||||
/// The argument passed as the SectionHeaderPtr parameter to the SECTION_SIZE()
 | 
			
		||||
/// and IS_SECTION2() function-like macros below must not have side effects:
 | 
			
		||||
/// SectionHeaderPtr is evaluated multiple times.
 | 
			
		||||
///
 | 
			
		||||
#define SECTION_SIZE(SectionHeaderPtr)  ((UINT32) (\
 | 
			
		||||
    (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[0]      ) | \
 | 
			
		||||
    (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[1] <<  8) | \
 | 
			
		||||
    (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[2] << 16)))
 | 
			
		||||
 | 
			
		||||
#define SECTION_SIZE(SectionHeaderPtr) \
 | 
			
		||||
    ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) (UINTN) SectionHeaderPtr)->Size) & 0x00ffffff))
 | 
			
		||||
#define IS_SECTION2(SectionHeaderPtr) \
 | 
			
		||||
    (SECTION_SIZE (SectionHeaderPtr) == 0x00ffffff)
 | 
			
		||||
 | 
			
		||||
#define SECTION2_SIZE(SectionHeaderPtr) \
 | 
			
		||||
    (((EFI_COMMON_SECTION_HEADER2 *) (UINTN) SectionHeaderPtr)->ExtendedSize)
 | 
			
		||||
@ -493,4 +506,3 @@ typedef struct {
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,29 +1,23 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  The firmware volume related definitions in PI.
 | 
			
		||||
 | 
			
		||||
  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 - 2017, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  PI Version 1.3
 | 
			
		||||
  PI Version 1.6
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_FIRMWAREVOLUME_H__
 | 
			
		||||
#define __PI_FIRMWAREVOLUME_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_FV_FILE_ATTRIBUTES
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_FV_FILE_ATTRIBUTES;
 | 
			
		||||
typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Value of EFI_FV_FILE_ATTRIBUTES.
 | 
			
		||||
@ -35,70 +29,70 @@ typedef UINT32  EFI_FV_FILE_ATTRIBUTES;
 | 
			
		||||
///
 | 
			
		||||
/// type of EFI FVB attribute
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_FVB_ATTRIBUTES_2;
 | 
			
		||||
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
 | 
			
		||||
#define EFI_FVB2_WRITE_DISABLED_CAP 0x00000008
 | 
			
		||||
#define EFI_FVB2_WRITE_ENABLED_CAP  0x00000010
 | 
			
		||||
#define EFI_FVB2_WRITE_STATUS       0x00000020
 | 
			
		||||
#define EFI_FVB2_LOCK_CAP           0x00000040
 | 
			
		||||
#define EFI_FVB2_LOCK_STATUS        0x00000080
 | 
			
		||||
#define EFI_FVB2_STICKY_WRITE       0x00000200
 | 
			
		||||
#define EFI_FVB2_MEMORY_MAPPED      0x00000400
 | 
			
		||||
#define EFI_FVB2_ERASE_POLARITY     0x00000800
 | 
			
		||||
#define EFI_FVB2_READ_LOCK_CAP      0x00001000
 | 
			
		||||
#define EFI_FVB2_READ_LOCK_STATUS   0x00002000
 | 
			
		||||
#define EFI_FVB2_WRITE_LOCK_CAP     0x00004000
 | 
			
		||||
#define EFI_FVB2_WRITE_LOCK_STATUS  0x00008000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT          0x001F0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1        0x00000000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2        0x00010000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_4        0x00020000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_8        0x00030000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_16       0x00040000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_32       0x00050000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_64       0x00060000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_128      0x00070000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_256      0x00080000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_512      0x00090000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1K       0x000A0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2K       0x000B0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_4K       0x000C0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_8K       0x000D0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_16K      0x000E0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_32K      0x000F0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_64K      0x00100000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_128K     0x00110000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_256K     0x00120000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_512K     0x00130000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1M       0x00140000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2M       0x00150000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_4M       0x00160000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_8M       0x00170000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_16M      0x00180000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_32M      0x00190000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_64M      0x001A0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_128M     0x001B0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_256M     0x001C0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_512M     0x001D0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1G       0x001E0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2G       0x001F0000
 | 
			
		||||
#define EFI_FVB2_WEAK_ALIGNMENT     0x80000000
 | 
			
		||||
#define EFI_FVB2_READ_DISABLED_CAP   0x00000001
 | 
			
		||||
#define EFI_FVB2_READ_ENABLED_CAP    0x00000002
 | 
			
		||||
#define EFI_FVB2_READ_STATUS         0x00000004
 | 
			
		||||
#define EFI_FVB2_WRITE_DISABLED_CAP  0x00000008
 | 
			
		||||
#define EFI_FVB2_WRITE_ENABLED_CAP   0x00000010
 | 
			
		||||
#define EFI_FVB2_WRITE_STATUS        0x00000020
 | 
			
		||||
#define EFI_FVB2_LOCK_CAP            0x00000040
 | 
			
		||||
#define EFI_FVB2_LOCK_STATUS         0x00000080
 | 
			
		||||
#define EFI_FVB2_STICKY_WRITE        0x00000200
 | 
			
		||||
#define EFI_FVB2_MEMORY_MAPPED       0x00000400
 | 
			
		||||
#define EFI_FVB2_ERASE_POLARITY      0x00000800
 | 
			
		||||
#define EFI_FVB2_READ_LOCK_CAP       0x00001000
 | 
			
		||||
#define EFI_FVB2_READ_LOCK_STATUS    0x00002000
 | 
			
		||||
#define EFI_FVB2_WRITE_LOCK_CAP      0x00004000
 | 
			
		||||
#define EFI_FVB2_WRITE_LOCK_STATUS   0x00008000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT           0x001F0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1         0x00000000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2         0x00010000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_4         0x00020000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_8         0x00030000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_16        0x00040000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_32        0x00050000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_64        0x00060000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_128       0x00070000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_256       0x00080000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_512       0x00090000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1K        0x000A0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2K        0x000B0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_4K        0x000C0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_8K        0x000D0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_16K       0x000E0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_32K       0x000F0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_64K       0x00100000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_128K      0x00110000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_256K      0x00120000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_512K      0x00130000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1M        0x00140000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2M        0x00150000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_4M        0x00160000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_8M        0x00170000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_16M       0x00180000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_32M       0x00190000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_64M       0x001A0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_128M      0x001B0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_256M      0x001C0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_512M      0x001D0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_1G        0x001E0000
 | 
			
		||||
#define EFI_FVB2_ALIGNMENT_2G        0x001F0000
 | 
			
		||||
#define EFI_FVB2_WEAK_ALIGNMENT      0x80000000
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of sequential blocks which are of the same size.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32 NumBlocks;
 | 
			
		||||
  UINT32    NumBlocks;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the blocks.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32 Length;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
} EFI_FV_BLOCK_MAP_ENTRY;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -155,7 +149,7 @@ typedef struct {
 | 
			
		||||
  EFI_FV_BLOCK_MAP_ENTRY    BlockMap[1];
 | 
			
		||||
} EFI_FIRMWARE_VOLUME_HEADER;
 | 
			
		||||
 | 
			
		||||
#define EFI_FVH_SIGNATURE SIGNATURE_32 ('_', 'F', 'V', 'H')
 | 
			
		||||
#define EFI_FVH_SIGNATURE  SIGNATURE_32 ('_', 'F', 'V', 'H')
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Firmware Volume Header Revision definition
 | 
			
		||||
@ -169,11 +163,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Firmware volume name.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID  FvName;
 | 
			
		||||
  EFI_GUID    FvName;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Size of the rest of the extension header, including this structure.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32    ExtHeaderSize;
 | 
			
		||||
  UINT32      ExtHeaderSize;
 | 
			
		||||
} EFI_FIRMWARE_VOLUME_EXT_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -198,12 +192,12 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;
 | 
			
		||||
  EFI_FIRMWARE_VOLUME_EXT_ENTRY    Hdr;
 | 
			
		||||
  ///
 | 
			
		||||
  /// A bit mask, one bit for each file type between 0xC0 (bit 0) and 0xDF (bit 31). If a bit
 | 
			
		||||
  /// is '1', then the GUID entry exists in Types. If a bit is '0' then no GUID entry exists in Types.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32    TypeMask;
 | 
			
		||||
  UINT32                           TypeMask;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An array of GUIDs, each GUID representing an OEM file type.
 | 
			
		||||
  ///
 | 
			
		||||
@ -211,7 +205,7 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;
 | 
			
		||||
 | 
			
		||||
#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002
 | 
			
		||||
#define EFI_FV_EXT_TYPE_GUID_TYPE  0x0002
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// This extension header EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE provides a vendor specific
 | 
			
		||||
@ -221,11 +215,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FIRMWARE_VOLUME_EXT_ENTRY     Hdr;
 | 
			
		||||
  EFI_FIRMWARE_VOLUME_EXT_ENTRY    Hdr;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Vendor-specific GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                          FormatType;
 | 
			
		||||
  EFI_GUID                         FormatType;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An arry of bytes of length Length.
 | 
			
		||||
  ///
 | 
			
		||||
@ -233,4 +227,23 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
 | 
			
		||||
 | 
			
		||||
#define EFI_FV_EXT_TYPE_USED_SIZE_TYPE  0x03
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find
 | 
			
		||||
/// out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Standard extension entry, with the type EFI_FV_EXT_TYPE_USED_SIZE_TYPE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_FIRMWARE_VOLUME_EXT_ENTRY    Hdr;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of bytes of the FV that are in uses. The remaining
 | 
			
		||||
  /// EFI_FIRMWARE_VOLUME_HEADER FvLength minus UsedSize bytes in
 | 
			
		||||
  /// the FV must contain the value implied by EFI_FVB2_ERASE_POLARITY.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                           UsedSize;
 | 
			
		||||
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,24 +1,18 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  HOB related definitions in PI.
 | 
			
		||||
 | 
			
		||||
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 - 2017, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  PI Version 1.4a
 | 
			
		||||
  PI Version 1.6
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_HOB_H__
 | 
			
		||||
#define __PI_HOB_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// HobType of EFI_HOB_GENERIC_HEADER.
 | 
			
		||||
@ -33,6 +27,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#define EFI_HOB_TYPE_FV2                  0x0009
 | 
			
		||||
#define EFI_HOB_TYPE_LOAD_PEIM_UNUSED     0x000A
 | 
			
		||||
#define EFI_HOB_TYPE_UEFI_CAPSULE         0x000B
 | 
			
		||||
#define EFI_HOB_TYPE_FV3                  0x000C
 | 
			
		||||
#define EFI_HOB_TYPE_UNUSED               0xFFFE
 | 
			
		||||
#define EFI_HOB_TYPE_END_OF_HOB_LIST      0xFFFF
 | 
			
		||||
 | 
			
		||||
@ -55,11 +50,10 @@ typedef struct {
 | 
			
		||||
  UINT32    Reserved;
 | 
			
		||||
} EFI_HOB_GENERIC_HEADER;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Value of version  in EFI_HOB_HANDOFF_INFO_TABLE.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009
 | 
			
		||||
#define EFI_HOB_HANDOFF_TABLE_VERSION  0x0009
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Contains general state information used by the HOB producer phase.
 | 
			
		||||
@ -69,39 +63,39 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_HANDOFF.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER  Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The version number pertaining to the PHIT HOB definition.
 | 
			
		||||
  /// This value is four bytes in length to provide an 8-byte aligned entry
 | 
			
		||||
  /// when it is combined with the 4-byte BootMode.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  Version;
 | 
			
		||||
  UINT32                    Version;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The system boot mode as determined during the HOB producer phase.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_BOOT_MODE           BootMode;
 | 
			
		||||
  EFI_BOOT_MODE             BootMode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The highest address location of memory that is allocated for use by the HOB producer
 | 
			
		||||
  /// phase. This address must be 4-KB aligned to meet page restrictions of UEFI.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    EfiMemoryTop;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      EfiMemoryTop;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The lowest address location of memory that is allocated for use by the HOB producer phase.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    EfiMemoryBottom;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      EfiMemoryBottom;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The highest address location of free memory that is currently available
 | 
			
		||||
  /// for use by the HOB producer phase.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    EfiFreeMemoryTop;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      EfiFreeMemoryTop;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The lowest address location of free memory that is available for use by the HOB producer phase.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    EfiFreeMemoryBottom;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      EfiFreeMemoryBottom;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The end of the HOB list.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    EfiEndOfHobList;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      EfiEndOfHobList;
 | 
			
		||||
} EFI_HOB_HANDOFF_INFO_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -117,31 +111,31 @@ typedef struct {
 | 
			
		||||
  /// Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0
 | 
			
		||||
  /// specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID              Name;
 | 
			
		||||
  EFI_GUID                Name;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The base address of memory allocated by this HOB. Type
 | 
			
		||||
  /// EFI_PHYSICAL_ADDRESS is defined in AllocatePages() in the UEFI 2.0
 | 
			
		||||
  /// specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS  MemoryBaseAddress;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    MemoryBaseAddress;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length in bytes of memory allocated by this HOB.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                MemoryLength;
 | 
			
		||||
  UINT64                  MemoryLength;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Defines the type of memory allocated by this HOB. The memory type definition
 | 
			
		||||
  /// follows the EFI_MEMORY_TYPE definition. Type EFI_MEMORY_TYPE is defined
 | 
			
		||||
  /// in AllocatePages() in the UEFI 2.0 specification.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MEMORY_TYPE       MemoryType;
 | 
			
		||||
  EFI_MEMORY_TYPE         MemoryType;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Padding for Itanium processor family
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                 Reserved[4];
 | 
			
		||||
  UINT8                   Reserved[4];
 | 
			
		||||
} EFI_HOB_MEMORY_ALLOCATION_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -153,19 +147,18 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER            Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER              Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
 | 
			
		||||
  /// various attributes of the logical memory allocation.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER    AllocDescriptor;
 | 
			
		||||
  //
 | 
			
		||||
  // Additional data pertaining to the "Name" Guid memory
 | 
			
		||||
  // may go here.
 | 
			
		||||
  //
 | 
			
		||||
} EFI_HOB_MEMORY_ALLOCATION;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Describes the memory stack that is produced by the HOB producer
 | 
			
		||||
/// phase and upon which all post-memory-installed executable
 | 
			
		||||
@ -175,12 +168,12 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER            Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER              Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
 | 
			
		||||
  /// various attributes of the logical memory allocation.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER    AllocDescriptor;
 | 
			
		||||
} EFI_HOB_MEMORY_ALLOCATION_STACK;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -193,12 +186,12 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER            Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER              Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
 | 
			
		||||
  /// various attributes of the logical memory allocation.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER    AllocDescriptor;
 | 
			
		||||
} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -208,22 +201,22 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER            Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER              Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
 | 
			
		||||
  /// various attributes of the logical memory allocation.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER  MemoryAllocationHeader;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_HEADER    MemoryAllocationHeader;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The GUID specifying the values of the firmware file system name
 | 
			
		||||
  /// that contains the HOB consumer phase component.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                          ModuleName;
 | 
			
		||||
  EFI_GUID                            ModuleName;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The address of the memory-mapped firmware volume
 | 
			
		||||
  /// that contains the HOB consumer phase firmware file.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS              EntryPoint;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS                EntryPoint;
 | 
			
		||||
} EFI_HOB_MEMORY_ALLOCATION_MODULE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -241,7 +234,16 @@ typedef UINT32 EFI_RESOURCE_TYPE;
 | 
			
		||||
#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT  0x00000004
 | 
			
		||||
#define EFI_RESOURCE_MEMORY_RESERVED        0x00000005
 | 
			
		||||
#define EFI_RESOURCE_IO_RESERVED            0x00000006
 | 
			
		||||
#define EFI_RESOURCE_MAX_MEMORY_TYPE        0x00000007
 | 
			
		||||
//
 | 
			
		||||
// BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is defined for unaccepted memory.
 | 
			
		||||
// But this defitinion has not been officially in the PI spec. Base
 | 
			
		||||
// on the code-first we define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED at
 | 
			
		||||
// MdeModulePkg/Include/Pi/PrePiHob.h and update EFI_RESOURCE_MAX_MEMORY_TYPE
 | 
			
		||||
// to 8. After BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is officially published
 | 
			
		||||
// in PI spec, we will re-visit here.
 | 
			
		||||
//
 | 
			
		||||
// #define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED      0x00000007
 | 
			
		||||
#define EFI_RESOURCE_MAX_MEMORY_TYPE  0x00000008
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// A type of recount attribute type.
 | 
			
		||||
@ -253,10 +255,10 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 | 
			
		||||
//
 | 
			
		||||
// The following attributes are used to describe settings
 | 
			
		||||
//
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_PRESENT                  0x00000001
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_PRESENT         0x00000001
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED     0x00000002
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_TESTED          0x00000004
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED  0x00000080
 | 
			
		||||
//
 | 
			
		||||
// This is typically used as memory cacheability attribute today.
 | 
			
		||||
// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED
 | 
			
		||||
@ -264,9 +266,9 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 | 
			
		||||
// means Memory cacheability attribute: The memory supports being programmed with
 | 
			
		||||
// a writeprotected cacheable attribute.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT               0x00800000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED      0x00000100
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED  0x00000200
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT           0x00800000
 | 
			
		||||
//
 | 
			
		||||
// The rest of the attributes are used to describe capabilities
 | 
			
		||||
//
 | 
			
		||||
@ -290,12 +292,12 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 | 
			
		||||
// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:
 | 
			
		||||
// The memory supports being programmed with a writeprotected cacheable attribute.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE        0x00200000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE    0x00400000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE      0x00200000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE  0x00400000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE            0x01000000
 | 
			
		||||
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00080000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED    0x00040000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE  0x00080000
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Physical memory relative reliability attribute. This
 | 
			
		||||
@ -303,7 +305,7 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 | 
			
		||||
// memory in the system. If all memory has the same
 | 
			
		||||
// reliability, then this bit is not used.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE            0x02000000
 | 
			
		||||
#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE  0x02000000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Describes the resource properties of all fixed,
 | 
			
		||||
@ -314,28 +316,28 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER      Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER         Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// A GUID representing the owner of the resource. This GUID is used by HOB
 | 
			
		||||
  /// consumer phase components to correlate device ownership of a resource.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                    Owner;
 | 
			
		||||
  EFI_GUID                       Owner;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The resource type enumeration as defined by EFI_RESOURCE_TYPE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_RESOURCE_TYPE           ResourceType;
 | 
			
		||||
  EFI_RESOURCE_TYPE              ResourceType;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Resource attributes as defined by EFI_RESOURCE_ATTRIBUTE_TYPE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
 | 
			
		||||
  EFI_RESOURCE_ATTRIBUTE_TYPE    ResourceAttribute;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The physical start address of the resource region.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS        PhysicalStart;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS           PhysicalStart;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of bytes of the resource region.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                      ResourceLength;
 | 
			
		||||
  UINT64                         ResourceLength;
 | 
			
		||||
} EFI_HOB_RESOURCE_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -346,11 +348,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_GUID_EXTENSION.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER      Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// A GUID that defines the contents of this HOB.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                    Name;
 | 
			
		||||
  EFI_GUID                  Name;
 | 
			
		||||
  //
 | 
			
		||||
  // Guid specific data goes here
 | 
			
		||||
  //
 | 
			
		||||
@ -363,15 +365,15 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The physical memory-mapped base address of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS   BaseAddress;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      BaseAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length in bytes of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                 Length;
 | 
			
		||||
  UINT64                    Length;
 | 
			
		||||
} EFI_HOB_FIRMWARE_VOLUME;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -382,25 +384,62 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV2.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER  Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The physical memory-mapped base address of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    BaseAddress;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      BaseAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length in bytes of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                  Length;
 | 
			
		||||
  UINT64                    Length;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The name of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                FvName;
 | 
			
		||||
  EFI_GUID                  FvName;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The name of the firmware file that contained this firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                FileName;
 | 
			
		||||
  EFI_GUID                  FileName;
 | 
			
		||||
} EFI_HOB_FIRMWARE_VOLUME2;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Details the location of a firmware volume that was extracted
 | 
			
		||||
/// from a file within another firmware volume.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV3.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The physical memory-mapped base address of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      BaseAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length in bytes of the firmware volume.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                    Length;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The authentication status.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                    AuthenticationStatus;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the FV was extracted as a file within another firmware volume.
 | 
			
		||||
  /// FALSE otherwise.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                   ExtractedFv;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The name of the firmware volume.
 | 
			
		||||
  /// Valid only if IsExtractedFv is TRUE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                  FvName;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The name of the firmware file that contained this firmware volume.
 | 
			
		||||
  /// Valid only if IsExtractedFv is TRUE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID                  FileName;
 | 
			
		||||
} EFI_HOB_FIRMWARE_VOLUME3;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Describes processor information, such as address space and I/O space capabilities.
 | 
			
		||||
@ -409,22 +448,21 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_CPU.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER  Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Identifies the maximum physical memory addressability of the processor.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   SizeOfMemorySpace;
 | 
			
		||||
  UINT8                     SizeOfMemorySpace;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Identifies the maximum physical I/O addressability of the processor.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   SizeOfIoSpace;
 | 
			
		||||
  UINT8                     SizeOfIoSpace;
 | 
			
		||||
  ///
 | 
			
		||||
  /// This field will always be set to zero.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   Reserved[6];
 | 
			
		||||
  UINT8                     Reserved[6];
 | 
			
		||||
} EFI_HOB_CPU;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Describes pool memory allocations.
 | 
			
		||||
///
 | 
			
		||||
@ -432,7 +470,7 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_POOL.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER  Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
} EFI_HOB_MEMORY_POOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -446,36 +484,36 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The HOB generic header where Header.HobType = EFI_HOB_TYPE_UEFI_CAPSULE.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER Header;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER    Header;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The physical memory-mapped base address of an UEFI capsule. This value is set to
 | 
			
		||||
  /// point to the base of the contiguous memory of the UEFI capsule.
 | 
			
		||||
  /// The length of the contiguous memory in bytes.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS   BaseAddress;
 | 
			
		||||
  UINT64                 Length;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS      BaseAddress;
 | 
			
		||||
  UINT64                    Length;
 | 
			
		||||
} EFI_HOB_UEFI_CAPSULE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Union of all the possible HOB Types.
 | 
			
		||||
///
 | 
			
		||||
typedef union {
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER              *Header;
 | 
			
		||||
  EFI_HOB_HANDOFF_INFO_TABLE          *HandoffInformationTable;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION           *MemoryAllocation;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_STACK     *MemoryAllocationStack;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_MODULE    *MemoryAllocationModule;
 | 
			
		||||
  EFI_HOB_RESOURCE_DESCRIPTOR         *ResourceDescriptor;
 | 
			
		||||
  EFI_HOB_GUID_TYPE                   *Guid;
 | 
			
		||||
  EFI_HOB_FIRMWARE_VOLUME             *FirmwareVolume;
 | 
			
		||||
  EFI_HOB_FIRMWARE_VOLUME2            *FirmwareVolume2;
 | 
			
		||||
  EFI_HOB_CPU                         *Cpu;
 | 
			
		||||
  EFI_HOB_MEMORY_POOL                 *Pool;
 | 
			
		||||
  EFI_HOB_UEFI_CAPSULE                *Capsule;
 | 
			
		||||
  UINT8                               *Raw;
 | 
			
		||||
  EFI_HOB_GENERIC_HEADER                 *Header;
 | 
			
		||||
  EFI_HOB_HANDOFF_INFO_TABLE             *HandoffInformationTable;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION              *MemoryAllocation;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_BSP_STORE    *MemoryAllocationBspStore;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_STACK        *MemoryAllocationStack;
 | 
			
		||||
  EFI_HOB_MEMORY_ALLOCATION_MODULE       *MemoryAllocationModule;
 | 
			
		||||
  EFI_HOB_RESOURCE_DESCRIPTOR            *ResourceDescriptor;
 | 
			
		||||
  EFI_HOB_GUID_TYPE                      *Guid;
 | 
			
		||||
  EFI_HOB_FIRMWARE_VOLUME                *FirmwareVolume;
 | 
			
		||||
  EFI_HOB_FIRMWARE_VOLUME2               *FirmwareVolume2;
 | 
			
		||||
  EFI_HOB_FIRMWARE_VOLUME3               *FirmwareVolume3;
 | 
			
		||||
  EFI_HOB_CPU                            *Cpu;
 | 
			
		||||
  EFI_HOB_MEMORY_POOL                    *Pool;
 | 
			
		||||
  EFI_HOB_UEFI_CAPSULE                   *Capsule;
 | 
			
		||||
  UINT8                                  *Raw;
 | 
			
		||||
} EFI_PEI_HOB_POINTERS;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,8 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Include file matches things in PI for multiple module types.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  These elements are defined in UEFI Platform Initialization Specification 1.2.
 | 
			
		||||
@ -18,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __PI_MULTIPHASE_H__
 | 
			
		||||
#define __PI_MULTIPHASE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Pi/PiFirmwareVolume.h>
 | 
			
		||||
#include <ipxe/efi/Pi/PiFirmwareFile.h>
 | 
			
		||||
@ -52,26 +46,26 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
/// If this value is returned by an API, it means the capability is not yet
 | 
			
		||||
/// installed/available/ready to use.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_NOT_AVAILABLE_YET     DXE_ERROR (2)
 | 
			
		||||
#define EFI_NOT_AVAILABLE_YET  DXE_ERROR (2)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Success and warning codes reserved for use by PI.
 | 
			
		||||
/// Supported 32-bit range is 0x20000000-0x3fffffff.
 | 
			
		||||
/// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.
 | 
			
		||||
///
 | 
			
		||||
#define PI_ENCODE_WARNING(a)                ((MAX_BIT >> 2) | (a))
 | 
			
		||||
#define PI_ENCODE_WARNING(a)  ((MAX_BIT >> 2) | (a))
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Error codes reserved for use by PI.
 | 
			
		||||
/// Supported 32-bit range is 0xa0000000-0xbfffffff.
 | 
			
		||||
/// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.
 | 
			
		||||
///
 | 
			
		||||
#define PI_ENCODE_ERROR(a)                  (MAX_BIT | (MAX_BIT >> 2) | (a))
 | 
			
		||||
#define PI_ENCODE_ERROR(a)  (MAX_BIT | (MAX_BIT >> 2) | (a))
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Return status codes defined in SMM CIS.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_INTERRUPT_PENDING               PI_ENCODE_ERROR (0)
 | 
			
		||||
#define EFI_INTERRUPT_PENDING  PI_ENCODE_ERROR (0)
 | 
			
		||||
 | 
			
		||||
#define EFI_WARN_INTERRUPT_SOURCE_PENDING   PI_ENCODE_WARNING (0)
 | 
			
		||||
#define EFI_WARN_INTERRUPT_SOURCE_QUIESCED  PI_ENCODE_WARNING (1)
 | 
			
		||||
@ -89,51 +83,73 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
/// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE   0x01
 | 
			
		||||
#define EFI_AUTH_STATUS_IMAGE_SIGNED        0x02
 | 
			
		||||
#define EFI_AUTH_STATUS_NOT_TESTED          0x04
 | 
			
		||||
#define EFI_AUTH_STATUS_TEST_FAILED         0x08
 | 
			
		||||
#define EFI_AUTH_STATUS_ALL                 0x0f
 | 
			
		||||
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE  0x01
 | 
			
		||||
#define EFI_AUTH_STATUS_IMAGE_SIGNED       0x02
 | 
			
		||||
#define EFI_AUTH_STATUS_NOT_TESTED         0x04
 | 
			
		||||
#define EFI_AUTH_STATUS_TEST_FAILED        0x08
 | 
			
		||||
#define EFI_AUTH_STATUS_ALL                0x0f
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// SMRAM states and capabilities
 | 
			
		||||
/// MMRAM states and capabilities
 | 
			
		||||
///
 | 
			
		||||
#define EFI_SMRAM_OPEN                  0x00000001
 | 
			
		||||
#define EFI_SMRAM_CLOSED                0x00000002
 | 
			
		||||
#define EFI_SMRAM_LOCKED                0x00000004
 | 
			
		||||
#define EFI_CACHEABLE                   0x00000008
 | 
			
		||||
#define EFI_ALLOCATED                   0x00000010
 | 
			
		||||
#define EFI_NEEDS_TESTING               0x00000020
 | 
			
		||||
#define EFI_NEEDS_ECC_INITIALIZATION    0x00000040
 | 
			
		||||
#define EFI_MMRAM_OPEN                0x00000001
 | 
			
		||||
#define EFI_MMRAM_CLOSED              0x00000002
 | 
			
		||||
#define EFI_MMRAM_LOCKED              0x00000004
 | 
			
		||||
#define EFI_CACHEABLE                 0x00000008
 | 
			
		||||
#define EFI_ALLOCATED                 0x00000010
 | 
			
		||||
#define EFI_NEEDS_TESTING             0x00000020
 | 
			
		||||
#define EFI_NEEDS_ECC_INITIALIZATION  0x00000040
 | 
			
		||||
 | 
			
		||||
#define EFI_SMRAM_OPEN    EFI_MMRAM_OPEN
 | 
			
		||||
#define EFI_SMRAM_CLOSED  EFI_MMRAM_CLOSED
 | 
			
		||||
#define EFI_SMRAM_LOCKED  EFI_MMRAM_LOCKED
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Structure describing a SMRAM region and its accessibility attributes.
 | 
			
		||||
/// Structure describing a MMRAM region and its accessibility attributes.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Designates the physical address of the SMRAM in memory. This view of memory is
 | 
			
		||||
  /// Designates the physical address of the MMRAM in memory. This view of memory is
 | 
			
		||||
  /// the same as seen by I/O-based agents, for example, but it may not be the address seen
 | 
			
		||||
  /// by the processors.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS  PhysicalStart;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    PhysicalStart;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Designates the address of the SMRAM, as seen by software executing on the
 | 
			
		||||
  /// Designates the address of the MMRAM, as seen by software executing on the
 | 
			
		||||
  /// processors. This address may or may not match PhysicalStart.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS  CpuStart;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    CpuStart;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Describes the number of bytes in the SMRAM region.
 | 
			
		||||
  /// Describes the number of bytes in the MMRAM region.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                PhysicalSize;
 | 
			
		||||
  UINT64                  PhysicalSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Describes the accessibility attributes of the SMRAM.  These attributes include the
 | 
			
		||||
  /// Describes the accessibility attributes of the MMRAM.  These attributes include the
 | 
			
		||||
  /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
 | 
			
		||||
  /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
 | 
			
		||||
  /// initialization).
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                RegionState;
 | 
			
		||||
} EFI_SMRAM_DESCRIPTOR;
 | 
			
		||||
  UINT64                  RegionState;
 | 
			
		||||
} EFI_MMRAM_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Structure describing a MMRAM region which cannot be used for the MMRAM heap.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Starting address of the reserved MMRAM area, as it appears while MMRAM is open.
 | 
			
		||||
  /// Ignored if MmramReservedSize is 0.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS    MmramReservedStart;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of bytes occupied by the reserved MMRAM area. A size of zero indicates the
 | 
			
		||||
  /// last MMRAM area.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                  MmramReservedSize;
 | 
			
		||||
} EFI_MM_RESERVED_MMRAM_REGION;
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
  EFI_PCD_TYPE_8,
 | 
			
		||||
@ -149,19 +165,19 @@ typedef struct {
 | 
			
		||||
  /// The returned information associated with the requested TokenNumber. If
 | 
			
		||||
  /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCD_TYPE      PcdType;
 | 
			
		||||
  EFI_PCD_TYPE    PcdType;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the data in bytes associated with the TokenNumber specified. If
 | 
			
		||||
  /// TokenNumber is 0, then PcdSize is set 0.
 | 
			
		||||
  ///
 | 
			
		||||
  UINTN             PcdSize;
 | 
			
		||||
  UINTN           PcdSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The null-terminated ASCII string associated with a given token. If the
 | 
			
		||||
  /// TokenNumber specified was 0, then this field corresponds to the null-terminated
 | 
			
		||||
  /// ASCII string associated with the token's namespace Guid. If NULL, there is no
 | 
			
		||||
  /// name associated with this request.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR8             *PcdName;
 | 
			
		||||
  CHAR8           *PcdName;
 | 
			
		||||
} EFI_PCD_INFO;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -178,4 +194,20 @@ VOID
 | 
			
		||||
  IN OUT VOID  *Buffer
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The function prototype for invoking a function on an Application Processor.
 | 
			
		||||
 | 
			
		||||
  This definition is used by the UEFI MM MP Serices Protocol.
 | 
			
		||||
 | 
			
		||||
  @param[in] ProcedureArgument    The pointer to private data buffer.
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS             Excutive the procedure successfully
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_AP_PROCEDURE2)(
 | 
			
		||||
  IN VOID  *ProcedureArgument
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,46 +2,40 @@
 | 
			
		||||
  This file contains the boot script defintions that are shared between the
 | 
			
		||||
  Boot Script Executor PPI and the Boot Script Save Protocol.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _PI_S3_BOOT_SCRIPT_H_
 | 
			
		||||
#define _PI_S3_BOOT_SCRIPT_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//*******************************************
 | 
			
		||||
// *******************************************
 | 
			
		||||
// EFI Boot Script Opcode definitions
 | 
			
		||||
//*******************************************
 | 
			
		||||
#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE                 0x00
 | 
			
		||||
#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE            0x01
 | 
			
		||||
#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE                0x02
 | 
			
		||||
#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE           0x03
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE         0x04
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE    0x05
 | 
			
		||||
#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE            0x06
 | 
			
		||||
#define EFI_BOOT_SCRIPT_STALL_OPCODE                    0x07
 | 
			
		||||
#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE                 0x08
 | 
			
		||||
#define EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE               0x09
 | 
			
		||||
#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE              0x0A
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE        0x0B
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE   0x0C
 | 
			
		||||
#define EFI_BOOT_SCRIPT_IO_POLL_OPCODE                  0x0D
 | 
			
		||||
#define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE                 0x0E
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE          0x0F
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE         0x10
 | 
			
		||||
// *******************************************
 | 
			
		||||
#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE                0x00
 | 
			
		||||
#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE           0x01
 | 
			
		||||
#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE               0x02
 | 
			
		||||
#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE          0x03
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE        0x04
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE   0x05
 | 
			
		||||
#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE           0x06
 | 
			
		||||
#define EFI_BOOT_SCRIPT_STALL_OPCODE                   0x07
 | 
			
		||||
#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE                0x08
 | 
			
		||||
#define EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE              0x09
 | 
			
		||||
#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE             0x0A
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE       0x0B
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE  0x0C
 | 
			
		||||
#define EFI_BOOT_SCRIPT_IO_POLL_OPCODE                 0x0D
 | 
			
		||||
#define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE                0x0E
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE         0x0F
 | 
			
		||||
#define EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE        0x10
 | 
			
		||||
 | 
			
		||||
//*******************************************
 | 
			
		||||
// *******************************************
 | 
			
		||||
// EFI_BOOT_SCRIPT_WIDTH
 | 
			
		||||
//*******************************************
 | 
			
		||||
// *******************************************
 | 
			
		||||
typedef enum {
 | 
			
		||||
  EfiBootScriptWidthUint8,
 | 
			
		||||
  EfiBootScriptWidthUint16,
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,8 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  StatusCode related definitions in PI.
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2009 - 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) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  These status codes are defined in UEFI Platform Initialization Specification 1.2,
 | 
			
		||||
@ -19,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __PI_STATUS_CODE_H__
 | 
			
		||||
#define __PI_STATUS_CODE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Required for IA32, X64, IPF, ARM and EBC defines for CPU exception types
 | 
			
		||||
@ -29,7 +23,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// Status Code Type Definition.
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_STATUS_CODE_TYPE;
 | 
			
		||||
typedef UINT32 EFI_STATUS_CODE_TYPE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// A Status Code Type is made up of the code type and severity.
 | 
			
		||||
@ -37,9 +31,9 @@ typedef UINT32  EFI_STATUS_CODE_TYPE;
 | 
			
		||||
/// reserved for use by this specification.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_STATUS_CODE_TYPE_MASK     0x000000FF
 | 
			
		||||
#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000
 | 
			
		||||
#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00
 | 
			
		||||
#define EFI_STATUS_CODE_TYPE_MASK      0x000000FF
 | 
			
		||||
#define EFI_STATUS_CODE_SEVERITY_MASK  0xFF000000
 | 
			
		||||
#define EFI_STATUS_CODE_RESERVED_MASK  0x00FFFF00
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -48,9 +42,9 @@ typedef UINT32  EFI_STATUS_CODE_TYPE;
 | 
			
		||||
/// this specification.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_PROGRESS_CODE             0x00000001
 | 
			
		||||
#define EFI_ERROR_CODE                0x00000002
 | 
			
		||||
#define EFI_DEBUG_CODE                0x00000003
 | 
			
		||||
#define EFI_PROGRESS_CODE  0x00000001
 | 
			
		||||
#define EFI_ERROR_CODE     0x00000002
 | 
			
		||||
#define EFI_DEBUG_CODE     0x00000003
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -63,10 +57,10 @@ typedef UINT32  EFI_STATUS_CODE_TYPE;
 | 
			
		||||
/// the bad data could be consumed by other drivers.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_ERROR_MINOR               0x40000000
 | 
			
		||||
#define EFI_ERROR_MAJOR               0x80000000
 | 
			
		||||
#define EFI_ERROR_UNRECOVERED         0x90000000
 | 
			
		||||
#define EFI_ERROR_UNCONTAINED         0xa0000000
 | 
			
		||||
#define EFI_ERROR_MINOR        0x40000000
 | 
			
		||||
#define EFI_ERROR_MAJOR        0x80000000
 | 
			
		||||
#define EFI_ERROR_UNRECOVERED  0x90000000
 | 
			
		||||
#define EFI_ERROR_UNCONTAINED  0xa0000000
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -93,15 +87,15 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the structure. This is specified to enable future expansion.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16    HeaderSize;
 | 
			
		||||
  UINT16      HeaderSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the data in bytes. This does not include the size of the header structure.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16    Size;
 | 
			
		||||
  UINT16      Size;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The GUID defining the type of the data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID  Type;
 | 
			
		||||
  EFI_GUID    Type;
 | 
			
		||||
} EFI_STATUS_CODE_DATA;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -110,8 +104,8 @@ typedef struct {
 | 
			
		||||
///   - 0x1000-0x7FFF    Subclass Specific.
 | 
			
		||||
///   - 0x8000-0xFFFF    OEM specific.
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SUBCLASS_SPECIFIC 0x1000
 | 
			
		||||
#define EFI_OEM_SPECIFIC      0x8000
 | 
			
		||||
#define EFI_SUBCLASS_SPECIFIC  0x1000
 | 
			
		||||
#define EFI_OEM_SPECIFIC       0x8000
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -141,13 +135,13 @@ typedef struct {
 | 
			
		||||
/// Values of 128-255 are reserved for OEM use.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_COMPUTING_UNIT_UNSPECIFIED        (EFI_COMPUTING_UNIT | 0x00000000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_HOST_PROCESSOR     (EFI_COMPUTING_UNIT | 0x00010000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR (EFI_COMPUTING_UNIT | 0x00020000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_IO_PROCESSOR       (EFI_COMPUTING_UNIT | 0x00030000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_CACHE              (EFI_COMPUTING_UNIT | 0x00040000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_MEMORY             (EFI_COMPUTING_UNIT | 0x00050000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_CHIPSET            (EFI_COMPUTING_UNIT | 0x00060000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_UNSPECIFIED         (EFI_COMPUTING_UNIT | 0x00000000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_HOST_PROCESSOR      (EFI_COMPUTING_UNIT | 0x00010000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR  (EFI_COMPUTING_UNIT | 0x00020000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_IO_PROCESSOR        (EFI_COMPUTING_UNIT | 0x00030000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_CACHE               (EFI_COMPUTING_UNIT | 0x00040000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_MEMORY              (EFI_COMPUTING_UNIT | 0x00050000)
 | 
			
		||||
#define EFI_COMPUTING_UNIT_CHIPSET             (EFI_COMPUTING_UNIT | 0x00060000)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -166,15 +160,15 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// Computing Unit Host Processor Subclass Progress Code definitions.
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_CU_HP_PC_POWER_ON_INIT          (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_HP_PC_CACHE_INIT             (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_HP_PC_RAM_INIT               (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_HP_PC_MEMORY_CONTROLLER_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_CU_HP_PC_IO_INIT                (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_CU_HP_PC_BSP_SELECT             (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_CU_HP_PC_BSP_RESELECT           (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_CU_HP_PC_AP_INIT                (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_CU_HP_PC_SMM_INIT               (EFI_SUBCLASS_SPECIFIC | 0x00000008)
 | 
			
		||||
#define EFI_CU_HP_PC_POWER_ON_INIT           (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_HP_PC_CACHE_INIT              (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_HP_PC_RAM_INIT                (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_HP_PC_MEMORY_CONTROLLER_INIT  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_CU_HP_PC_IO_INIT                 (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_CU_HP_PC_BSP_SELECT              (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_CU_HP_PC_BSP_RESELECT            (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_CU_HP_PC_AP_INIT                 (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_CU_HP_PC_SMM_INIT                (EFI_SUBCLASS_SPECIFIC | 0x00000008)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -189,8 +183,8 @@ typedef struct {
 | 
			
		||||
/// Computing Unit Cache Subclass Progress Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_CU_CACHE_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_CACHE_PC_CONFIGURATION   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_CACHE_PC_PRESENCE_DETECT  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_CACHE_PC_CONFIGURATION    (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -213,52 +207,52 @@ typedef struct {
 | 
			
		||||
///
 | 
			
		||||
/// South Bridge initialization prior to memory detection.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_CAR_SB_INIT      (EFI_SUBCLASS_SPECIFIC|0x00000000)
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_CAR_SB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000000)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// North Bridge initialization prior to memory detection.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_CAR_NB_INIT      (EFI_SUBCLASS_SPECIFIC|0x00000001)
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_CAR_NB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000001)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// South Bridge initialization after memory detection.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_MEM_SB_INIT      (EFI_SUBCLASS_SPECIFIC|0x00000002)
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_MEM_SB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000002)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// North Bridge initialization after memory detection.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_MEM_NB_INIT      (EFI_SUBCLASS_SPECIFIC|0x00000003)
 | 
			
		||||
#define EFI_CHIPSET_PC_PEI_MEM_NB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000003)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// PCI Host Bridge DXE initialization.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_HB_INIT          (EFI_SUBCLASS_SPECIFIC|0x00000004)
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_HB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000004)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// North Bridge DXE initialization.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_NB_INIT          (EFI_SUBCLASS_SPECIFIC|0x00000005)
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_NB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000005)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// North Bridge specific SMM initialization in DXE.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_NB_SMM_INIT      (EFI_SUBCLASS_SPECIFIC|0x00000006)
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_NB_SMM_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000006)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Initialization of the South Bridge specific UEFI Runtime Services.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_SB_RT_INIT       (EFI_SUBCLASS_SPECIFIC|0x00000007)
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_SB_RT_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000007)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// South Bridge DXE initialization
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_SB_INIT          (EFI_SUBCLASS_SPECIFIC|0x00000008)
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_SB_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000008)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// South Bridge specific SMM initialization in DXE.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_SB_SMM_INIT      (EFI_SUBCLASS_SPECIFIC|0x00000009)
 | 
			
		||||
#define EFI_CHIPSET_PC_DXE_SB_SMM_INIT  (EFI_SUBCLASS_SPECIFIC|0x00000009)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Initialization of the South Bridge devices.
 | 
			
		||||
@ -305,9 +299,9 @@ typedef struct {
 | 
			
		||||
/// Computing Unit Firmware Processor Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_CU_FP_EC_HARD_FAIL  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_FP_EC_SOFT_FAIL  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_FP_EC_COMM_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_FP_EC_HARD_FAIL   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_FP_EC_SOFT_FAIL   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_FP_EC_COMM_ERROR  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -318,27 +312,27 @@ typedef struct {
 | 
			
		||||
/// Computing Unit Cache Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_CU_CACHE_EC_INVALID_TYPE  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_CACHE_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_CACHE_EC_INVALID_SIZE  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_CACHE_EC_MISMATCH      (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_CU_CACHE_EC_INVALID_TYPE   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_CACHE_EC_INVALID_SPEED  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_CACHE_EC_INVALID_SIZE   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_CACHE_EC_MISMATCH       (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Computing Unit Memory Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_CU_MEMORY_EC_INVALID_TYPE   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_INVALID_SPEED  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_CORRECTABLE    (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_UNCORRECTABLE  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_SPD_FAIL       (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_INVALID_SIZE   (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_MISMATCH       (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_S3_RESUME_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_UPDATE_FAIL    (EFI_SUBCLASS_SPECIFIC | 0x00000008)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_NONE_DETECTED  (EFI_SUBCLASS_SPECIFIC | 0x00000009)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_NONE_USEFUL    (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_INVALID_TYPE    (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_INVALID_SPEED   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_CORRECTABLE     (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_UNCORRECTABLE   (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_SPD_FAIL        (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_INVALID_SIZE    (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_MISMATCH        (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_S3_RESUME_FAIL  (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_UPDATE_FAIL     (EFI_SUBCLASS_SPECIFIC | 0x00000008)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_NONE_DETECTED   (EFI_SUBCLASS_SPECIFIC | 0x00000009)
 | 
			
		||||
#define EFI_CU_MEMORY_EC_NONE_USEFUL     (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -348,6 +342,7 @@ typedef struct {
 | 
			
		||||
#define EFI_CHIPSET_EC_BAD_BATTERY      (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_CHIPSET_EC_DXE_NB_ERROR     (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_CHIPSET_EC_DXE_SB_ERROR     (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_CHIPSET_EC_INTRUDER_DETECT  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -369,6 +364,7 @@ typedef struct {
 | 
			
		||||
#define EFI_PERIPHERAL_AUDIO_OUTPUT     (EFI_PERIPHERAL | 0x000A0000)
 | 
			
		||||
#define EFI_PERIPHERAL_LCD_DEVICE       (EFI_PERIPHERAL | 0x000B0000)
 | 
			
		||||
#define EFI_PERIPHERAL_NETWORK          (EFI_PERIPHERAL | 0x000C0000)
 | 
			
		||||
#define EFI_PERIPHERAL_DOCKING          (EFI_PERIPHERAL | 0x000D0000)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -383,6 +379,7 @@ typedef struct {
 | 
			
		||||
#define EFI_P_PC_ENABLE           0x00000004
 | 
			
		||||
#define EFI_P_PC_RECONFIG         0x00000005
 | 
			
		||||
#define EFI_P_PC_DETECTED         0x00000006
 | 
			
		||||
#define EFI_P_PC_REMOVED          0x00000007
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -416,7 +413,7 @@ typedef struct {
 | 
			
		||||
/// Peripheral Class Serial Port Subclass Progress Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -472,15 +469,16 @@ typedef struct {
 | 
			
		||||
/// Peripheral Class Keyboard Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_P_KEYBOARD_EC_LOCKED    (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_P_KEYBOARD_EC_LOCKED       (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_P_KEYBOARD_EC_STUCK_KEY    (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_P_KEYBOARD_EC_BUFFER_FULL  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Peripheral Class Mouse Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_P_MOUSE_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_P_MOUSE_EC_LOCKED  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -549,13 +547,13 @@ typedef struct {
 | 
			
		||||
/// These are shared by all subclasses.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_IOB_PC_INIT     0x00000000
 | 
			
		||||
#define EFI_IOB_PC_RESET    0x00000001
 | 
			
		||||
#define EFI_IOB_PC_DISABLE  0x00000002
 | 
			
		||||
#define EFI_IOB_PC_DETECT   0x00000003
 | 
			
		||||
#define EFI_IOB_PC_ENABLE   0x00000004
 | 
			
		||||
#define EFI_IOB_PC_RECONFIG 0x00000005
 | 
			
		||||
#define EFI_IOB_PC_HOTPLUG  0x00000006
 | 
			
		||||
#define EFI_IOB_PC_INIT      0x00000000
 | 
			
		||||
#define EFI_IOB_PC_RESET     0x00000001
 | 
			
		||||
#define EFI_IOB_PC_DISABLE   0x00000002
 | 
			
		||||
#define EFI_IOB_PC_DETECT    0x00000003
 | 
			
		||||
#define EFI_IOB_PC_ENABLE    0x00000004
 | 
			
		||||
#define EFI_IOB_PC_RECONFIG  0x00000005
 | 
			
		||||
#define EFI_IOB_PC_HOTPLUG   0x00000006
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -643,8 +641,8 @@ typedef struct {
 | 
			
		||||
/// IO Bus Class PCI Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_IOB_PCI_EC_PERR (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_IOB_PCI_EC_SERR (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_IOB_PCI_EC_PERR  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_IOB_PCI_EC_SERR  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -746,8 +744,8 @@ typedef struct {
 | 
			
		||||
/// Software Class SEC Subclass Progress Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_SEC_PC_ENTRY_POINT     (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_SEC_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_SEC_PC_ENTRY_POINT      (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_SEC_PC_HANDOFF_TO_NEXT  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -770,6 +768,7 @@ typedef struct {
 | 
			
		||||
#define EFI_SW_PEI_PC_RECOVERY_AUTO   (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_PEI_PC_S3_BOOT_SCRIPT  (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_PEI_PC_OS_WAKE         (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_SW_PEI_PC_S3_STARTED      (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -787,11 +786,16 @@ typedef struct {
 | 
			
		||||
/// Software Class DXE BS Driver Subclass Progress Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_LEGACY_OPROM_INIT            (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT          (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT            (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT     (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_LEGACY_OPROM_INIT             (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT           (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT             (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT      (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT  (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_VARIABLE_SERVICES_INIT        (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_VARIABLE_RECLAIM              (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT      (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_CONFIG_RESET                  (EFI_SUBCLASS_SPECIFIC | 0x00000008)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_CSM_INIT                      (EFI_SUBCLASS_SPECIFIC | 0x00000009)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -981,6 +985,8 @@ typedef struct {
 | 
			
		||||
#define EFI_SW_EC_PWD_CLR_REQUEST         0x0000000F
 | 
			
		||||
#define EFI_SW_EC_PWD_CLEARED             0x00000010
 | 
			
		||||
#define EFI_SW_EC_EVENT_LOG_FULL          0x00000011
 | 
			
		||||
#define EFI_SW_EC_WRITE_PROTECTED         0x00000012
 | 
			
		||||
#define EFI_SW_EC_FV_CORRUPTED            0x00000013
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -1004,24 +1010,25 @@ typedef struct {
 | 
			
		||||
/// Software Class PEI Module Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE          (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND      (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR         (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_OS_WAKE_ERROR             (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_RESUME_FAILED             (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND       (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_SW_PEI_EC_RECOVERY_FAILED              (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE         (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND     (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR        (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_OS_WAKE_ERROR            (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_RESUME_FAILED            (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND      (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_SW_PEI_EC_RECOVERY_FAILED             (EFI_SUBCLASS_SPECIFIC | 0x00000007)
 | 
			
		||||
#define EFI_SW_PEI_EC_S3_RESUME_ERROR             (EFI_SUBCLASS_SPECIFIC | 0x00000008)
 | 
			
		||||
#define EFI_SW_PEI_EC_INVALID_CAPSULE             (EFI_SUBCLASS_SPECIFIC | 0x00000009)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Software Class DXE Foundation Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_DXE_CORE_EC_NO_ARCH                (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_DXE_CORE_EC_NO_ARCH  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Software Class DXE Boot Service Driver Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
@ -1141,20 +1148,20 @@ typedef struct {
 | 
			
		||||
/// Software Class EFI DXE Service Subclass Error Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS   (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD         (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS  (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD        (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Software Class DXE RT Driver Subclass Progress Code definitions.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S0                         (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S1                         (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S2                         (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S3                         (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S4                         (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S5                         (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S0  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S1  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S2  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S3  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S4  (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 | 
			
		||||
#define EFI_SW_DXE_RT_PC_S5  (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -1163,23 +1170,23 @@ typedef struct {
 | 
			
		||||
/// definitions in the EFI specification.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_EC_X64_DIVIDE_ERROR                   EXCEPT_X64_DIVIDE_ERROR
 | 
			
		||||
#define EFI_SW_EC_X64_DEBUG                          EXCEPT_X64_DEBUG
 | 
			
		||||
#define EFI_SW_EC_X64_NMI                            EXCEPT_X64_NMI
 | 
			
		||||
#define EFI_SW_EC_X64_BREAKPOINT                     EXCEPT_X64_BREAKPOINT
 | 
			
		||||
#define EFI_SW_EC_X64_OVERFLOW                       EXCEPT_X64_OVERFLOW
 | 
			
		||||
#define EFI_SW_EC_X64_BOUND                          EXCEPT_X64_BOUND
 | 
			
		||||
#define EFI_SW_EC_X64_INVALID_OPCODE                 EXCEPT_X64_INVALID_OPCODE
 | 
			
		||||
#define EFI_SW_EC_X64_DOUBLE_FAULT                   EXCEPT_X64_DOUBLE_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_INVALID_TSS                    EXCEPT_X64_INVALID_TSS
 | 
			
		||||
#define EFI_SW_EC_X64_SEG_NOT_PRESENT                EXCEPT_X64_SEG_NOT_PRESENT
 | 
			
		||||
#define EFI_SW_EC_X64_STACK_FAULT                    EXCEPT_X64_STACK_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_GP_FAULT                       EXCEPT_X64_GP_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_PAGE_FAULT                     EXCEPT_X64_PAGE_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_FP_ERROR                       EXCEPT_X64_FP_ERROR
 | 
			
		||||
#define EFI_SW_EC_X64_ALIGNMENT_CHECK                EXCEPT_X64_ALIGNMENT_CHECK
 | 
			
		||||
#define EFI_SW_EC_X64_MACHINE_CHECK                  EXCEPT_X64_MACHINE_CHECK
 | 
			
		||||
#define EFI_SW_EC_X64_SIMD                           EXCEPT_X64_SIMD
 | 
			
		||||
#define EFI_SW_EC_X64_DIVIDE_ERROR     EXCEPT_X64_DIVIDE_ERROR
 | 
			
		||||
#define EFI_SW_EC_X64_DEBUG            EXCEPT_X64_DEBUG
 | 
			
		||||
#define EFI_SW_EC_X64_NMI              EXCEPT_X64_NMI
 | 
			
		||||
#define EFI_SW_EC_X64_BREAKPOINT       EXCEPT_X64_BREAKPOINT
 | 
			
		||||
#define EFI_SW_EC_X64_OVERFLOW         EXCEPT_X64_OVERFLOW
 | 
			
		||||
#define EFI_SW_EC_X64_BOUND            EXCEPT_X64_BOUND
 | 
			
		||||
#define EFI_SW_EC_X64_INVALID_OPCODE   EXCEPT_X64_INVALID_OPCODE
 | 
			
		||||
#define EFI_SW_EC_X64_DOUBLE_FAULT     EXCEPT_X64_DOUBLE_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_INVALID_TSS      EXCEPT_X64_INVALID_TSS
 | 
			
		||||
#define EFI_SW_EC_X64_SEG_NOT_PRESENT  EXCEPT_X64_SEG_NOT_PRESENT
 | 
			
		||||
#define EFI_SW_EC_X64_STACK_FAULT      EXCEPT_X64_STACK_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_GP_FAULT         EXCEPT_X64_GP_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_PAGE_FAULT       EXCEPT_X64_PAGE_FAULT
 | 
			
		||||
#define EFI_SW_EC_X64_FP_ERROR         EXCEPT_X64_FP_ERROR
 | 
			
		||||
#define EFI_SW_EC_X64_ALIGNMENT_CHECK  EXCEPT_X64_ALIGNMENT_CHECK
 | 
			
		||||
#define EFI_SW_EC_X64_MACHINE_CHECK    EXCEPT_X64_MACHINE_CHECK
 | 
			
		||||
#define EFI_SW_EC_X64_SIMD             EXCEPT_X64_SIMD
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -1188,14 +1195,14 @@ typedef struct {
 | 
			
		||||
/// definitions in the EFI specification.
 | 
			
		||||
///
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_SW_EC_ARM_RESET                          EXCEPT_ARM_RESET
 | 
			
		||||
#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION          EXCEPT_ARM_UNDEFINED_INSTRUCTION
 | 
			
		||||
#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT             EXCEPT_ARM_SOFTWARE_INTERRUPT
 | 
			
		||||
#define EFI_SW_EC_ARM_PREFETCH_ABORT                 EXCEPT_ARM_PREFETCH_ABORT
 | 
			
		||||
#define EFI_SW_EC_ARM_DATA_ABORT                     EXCEPT_ARM_DATA_ABORT
 | 
			
		||||
#define EFI_SW_EC_ARM_RESERVED                       EXCEPT_ARM_RESERVED
 | 
			
		||||
#define EFI_SW_EC_ARM_IRQ                            EXCEPT_ARM_IRQ
 | 
			
		||||
#define EFI_SW_EC_ARM_FIQ                            EXCEPT_ARM_FIQ
 | 
			
		||||
#define EFI_SW_EC_ARM_RESET                  EXCEPT_ARM_RESET
 | 
			
		||||
#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION  EXCEPT_ARM_UNDEFINED_INSTRUCTION
 | 
			
		||||
#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT     EXCEPT_ARM_SOFTWARE_INTERRUPT
 | 
			
		||||
#define EFI_SW_EC_ARM_PREFETCH_ABORT         EXCEPT_ARM_PREFETCH_ABORT
 | 
			
		||||
#define EFI_SW_EC_ARM_DATA_ABORT             EXCEPT_ARM_DATA_ABORT
 | 
			
		||||
#define EFI_SW_EC_ARM_RESERVED               EXCEPT_ARM_RESERVED
 | 
			
		||||
#define EFI_SW_EC_ARM_IRQ                    EXCEPT_ARM_IRQ
 | 
			
		||||
#define EFI_SW_EC_ARM_FIQ                    EXCEPT_ARM_FIQ
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,21 +2,15 @@
 | 
			
		||||
 | 
			
		||||
  Root include file for Mde Package DXE_CORE, DXE, RUNTIME, SMM, SAL type modules.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_DXE_H__
 | 
			
		||||
#define __PI_DXE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Uefi/UefiBaseType.h>
 | 
			
		||||
#include <ipxe/efi/Uefi/UefiSpec.h>
 | 
			
		||||
@ -24,4 +18,3 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#include <ipxe/efi/Pi/PiDxeCis.h>
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,34 +2,27 @@
 | 
			
		||||
  The file provides services that allow information about an
 | 
			
		||||
  absolute pointer device to be retrieved.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
  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.
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.3.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __ABSOLUTE_POINTER_H__
 | 
			
		||||
#define __ABSOLUTE_POINTER_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
 | 
			
		||||
  { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//*******************************************************
 | 
			
		||||
// *******************************************************
 | 
			
		||||
// EFI_ABSOLUTE_POINTER_MODE
 | 
			
		||||
//*******************************************************
 | 
			
		||||
 | 
			
		||||
// *******************************************************
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The following data values in the EFI_ABSOLUTE_POINTER_MODE
 | 
			
		||||
@ -37,31 +30,30 @@ typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;
 | 
			
		||||
  interface functions.
 | 
			
		||||
**/
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis
 | 
			
		||||
  UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.
 | 
			
		||||
  UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis
 | 
			
		||||
  UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the
 | 
			
		||||
                       ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis
 | 
			
		||||
  UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the
 | 
			
		||||
                       ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.
 | 
			
		||||
  UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the
 | 
			
		||||
                       ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis
 | 
			
		||||
  UINT32 Attributes;   ///< The following bits are set as needed (or'd together) to indicate the
 | 
			
		||||
                       ///< capabilities of the device supported. The remaining bits are undefined
 | 
			
		||||
                       ///< and should be 0
 | 
			
		||||
  UINT64    AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis
 | 
			
		||||
  UINT64    AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.
 | 
			
		||||
  UINT64    AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis
 | 
			
		||||
  UINT64    AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the
 | 
			
		||||
                          ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis
 | 
			
		||||
  UINT64    AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the
 | 
			
		||||
                          ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.
 | 
			
		||||
  UINT64    AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the
 | 
			
		||||
                          ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis
 | 
			
		||||
  UINT32    Attributes;   ///< The following bits are set as needed (or'd together) to indicate the
 | 
			
		||||
                          ///< capabilities of the device supported. The remaining bits are undefined
 | 
			
		||||
                          ///< and should be 0
 | 
			
		||||
} EFI_ABSOLUTE_POINTER_MODE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// If set, indicates this device supports an alternate button input.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ABSP_SupportsAltActive    0x00000001
 | 
			
		||||
#define EFI_ABSP_SupportsAltActive  0x00000001
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// If set, indicates this device returns pressure data in parameter CurrentZ.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ABSP_SupportsPressureAsZ  0x00000002
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  This function resets the pointer device hardware. As part of
 | 
			
		||||
  initialization process, the firmware/device will make a quick
 | 
			
		||||
@ -92,7 +84,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(
 | 
			
		||||
  IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
 | 
			
		||||
  IN BOOLEAN                       ExtendedVerification
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// This bit is set if the touch sensor is active.
 | 
			
		||||
@ -102,8 +94,7 @@ EFI_STATUS
 | 
			
		||||
///
 | 
			
		||||
/// This bit is set if the alt sensor, such as pen-side button, is active
 | 
			
		||||
///
 | 
			
		||||
#define EFI_ABS_AltActive     0x00000002
 | 
			
		||||
 | 
			
		||||
#define EFI_ABS_AltActive  0x00000002
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Definition of EFI_ABSOLUTE_POINTER_STATE.
 | 
			
		||||
@ -115,7 +106,7 @@ typedef struct {
 | 
			
		||||
  /// both 0, then this pointer device does not support an x-axis, and this field
 | 
			
		||||
  /// must be ignored.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64 CurrentX;
 | 
			
		||||
  UINT64    CurrentX;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The unsigned position of the activation on the y axis. If the AboluteMinY
 | 
			
		||||
@ -123,7 +114,7 @@ typedef struct {
 | 
			
		||||
  /// both 0, then this pointer device does not support an y-axis, and this field
 | 
			
		||||
  /// must be ignored.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64 CurrentY;
 | 
			
		||||
  UINT64    CurrentY;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The unsigned position of the activation on the z axis, or the pressure
 | 
			
		||||
@ -131,13 +122,13 @@ typedef struct {
 | 
			
		||||
  /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device
 | 
			
		||||
  /// does not support an z-axis, and this field must be ignored.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64 CurrentZ;
 | 
			
		||||
  UINT64    CurrentZ;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Bits are set to 1 in this structure item to indicate that device buttons are
 | 
			
		||||
  /// active.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32 ActiveButtons;
 | 
			
		||||
  UINT32    ActiveButtons;
 | 
			
		||||
} EFI_ABSOLUTE_POINTER_STATE;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -174,9 +165,8 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(
 | 
			
		||||
  IN      EFI_ABSOLUTE_POINTER_PROTOCOL  *This,
 | 
			
		||||
  IN OUT  EFI_ABSOLUTE_POINTER_STATE     *State
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  OUT  EFI_ABSOLUTE_POINTER_STATE        *State
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services
 | 
			
		||||
@ -187,21 +177,18 @@ EFI_STATUS
 | 
			
		||||
/// device. The service also provides certain data items describing the device.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
 | 
			
		||||
  EFI_ABSOLUTE_POINTER_RESET      Reset;
 | 
			
		||||
  EFI_ABSOLUTE_POINTER_GET_STATE  GetState;
 | 
			
		||||
  EFI_ABSOLUTE_POINTER_RESET        Reset;
 | 
			
		||||
  EFI_ABSOLUTE_POINTER_GET_STATE    GetState;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Event to use with WaitForEvent() to wait for input from the pointer device.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                       WaitForInput;
 | 
			
		||||
  EFI_EVENT                         WaitForInput;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_ABSOLUTE_POINTER_MODE       *Mode;
 | 
			
		||||
  EFI_ABSOLUTE_POINTER_MODE         *Mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiAbsolutePointerProtocolGuid;
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID  gEfiAbsolutePointerProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,26 +2,22 @@
 | 
			
		||||
  The file provides the protocol to install or remove an ACPI
 | 
			
		||||
  table from a platform.
 | 
			
		||||
 | 
			
		||||
  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>
 | 
			
		||||
  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.
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.3.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __ACPI_TABLE_H___
 | 
			
		||||
#define __ACPI_TABLE_H___
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_ACPI_TABLE_PROTOCOL_GUID \
 | 
			
		||||
  { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -80,8 +76,7 @@ EFI_STATUS
 | 
			
		||||
  IN   VOID                          *AcpiTableBuffer,
 | 
			
		||||
  IN   UINTN                         AcpiTableBufferSize,
 | 
			
		||||
  OUT  UINTN                         *TableKey
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -112,18 +107,17 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(
 | 
			
		||||
  IN  EFI_ACPI_TABLE_PROTOCOL       *This,
 | 
			
		||||
  IN  UINTN                         TableKey
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component
 | 
			
		||||
/// to install and uninstall ACPI tables from a platform.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_ACPI_TABLE_PROTOCOL {
 | 
			
		||||
  EFI_ACPI_TABLE_INSTALL_ACPI_TABLE   InstallAcpiTable;
 | 
			
		||||
  EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
 | 
			
		||||
  EFI_ACPI_TABLE_INSTALL_ACPI_TABLE      InstallAcpiTable;
 | 
			
		||||
  EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE    UninstallAcpiTable;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiAcpiTableProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiAcpiTableProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -7,14 +7,8 @@
 | 
			
		||||
  The EFI ARP Protocol provides services to map IP network
 | 
			
		||||
  address to hardware address used by a data link protocol.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.0.
 | 
			
		||||
@ -24,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_ARP_PROTOCOL_H__
 | 
			
		||||
#define __EFI_ARP_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -42,51 +36,51 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Length in bytes of this entry.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      Size;
 | 
			
		||||
  UINT32     Size;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE if this entry is a "deny" entry.
 | 
			
		||||
  /// Set to FALSE if this entry is a "normal" entry.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                     DenyFlag;
 | 
			
		||||
  BOOLEAN    DenyFlag;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE if this entry will not time out.
 | 
			
		||||
  /// Set to FALSE if this entry will time out.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                     StaticFlag;
 | 
			
		||||
  BOOLEAN    StaticFlag;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// 16-bit ARP hardware identifier number.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                      HwAddressType;
 | 
			
		||||
  UINT16     HwAddressType;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// 16-bit protocol type number.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                      SwAddressType;
 | 
			
		||||
  UINT16     SwAddressType;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length of the hardware address.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                       HwAddressLength;
 | 
			
		||||
  UINT8      HwAddressLength;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length of the protocol address.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                       SwAddressLength;
 | 
			
		||||
  UINT8      SwAddressLength;
 | 
			
		||||
} EFI_ARP_FIND_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// 16-bit protocol type number in host byte order.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                    SwAddressType;
 | 
			
		||||
  UINT16    SwAddressType;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length in bytes of the station's protocol address to register.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                     SwAddressLength;
 | 
			
		||||
  UINT8     SwAddressLength;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the first byte of the protocol address to register. For
 | 
			
		||||
@ -94,30 +88,29 @@ typedef struct {
 | 
			
		||||
  /// StationAddress points to the first byte of this station's IP
 | 
			
		||||
  /// address stored in network byte order.
 | 
			
		||||
  ///
 | 
			
		||||
  VOID                      *StationAddress;
 | 
			
		||||
  VOID      *StationAddress;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The timeout value in 100-ns units that is associated with each
 | 
			
		||||
  /// new dynamic ARP cache entry. If it is set to zero, the value is
 | 
			
		||||
  /// implementation-specific.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                    EntryTimeOut;
 | 
			
		||||
  UINT32    EntryTimeOut;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of retries before a MAC address is resolved. If it is
 | 
			
		||||
  /// set to zero, the value is implementation-specific.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                    RetryCount;
 | 
			
		||||
  UINT32    RetryCount;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The timeout value in 100-ns units that is used to wait for the ARP
 | 
			
		||||
  /// reply packet or the timeout value between two retries. Set to zero
 | 
			
		||||
  /// to use implementation-specific value.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                    RetryTimeOut;
 | 
			
		||||
  UINT32    RetryTimeOut;
 | 
			
		||||
} EFI_ARP_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  This function is used to assign a station address to the ARP cache for this instance
 | 
			
		||||
  of the ARP driver.
 | 
			
		||||
@ -255,7 +248,6 @@ EFI_STATUS
 | 
			
		||||
  IN BOOLEAN                Refresh
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  This function removes specified ARP cache entries.
 | 
			
		||||
 | 
			
		||||
@ -371,17 +363,16 @@ EFI_STATUS
 | 
			
		||||
/// network hardware addresses.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_ARP_PROTOCOL {
 | 
			
		||||
  EFI_ARP_CONFIGURE         Configure;
 | 
			
		||||
  EFI_ARP_ADD               Add;
 | 
			
		||||
  EFI_ARP_FIND              Find;
 | 
			
		||||
  EFI_ARP_DELETE            Delete;
 | 
			
		||||
  EFI_ARP_FLUSH             Flush;
 | 
			
		||||
  EFI_ARP_REQUEST           Request;
 | 
			
		||||
  EFI_ARP_CANCEL            Cancel;
 | 
			
		||||
  EFI_ARP_CONFIGURE    Configure;
 | 
			
		||||
  EFI_ARP_ADD          Add;
 | 
			
		||||
  EFI_ARP_FIND         Find;
 | 
			
		||||
  EFI_ARP_DELETE       Delete;
 | 
			
		||||
  EFI_ARP_FLUSH        Flush;
 | 
			
		||||
  EFI_ARP_REQUEST      Request;
 | 
			
		||||
  EFI_ARP_CANCEL       Cancel;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiArpServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiArpProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiArpServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiArpProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,38 +4,32 @@
 | 
			
		||||
  The Block IO protocol is used to abstract block devices like hard drives,
 | 
			
		||||
  DVD-ROMs and floppy drives.
 | 
			
		||||
 | 
			
		||||
  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 __BLOCK_IO_H__
 | 
			
		||||
#define __BLOCK_IO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_BLOCK_IO_PROTOCOL  EFI_BLOCK_IO_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID name defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define BLOCK_IO_PROTOCOL       EFI_BLOCK_IO_PROTOCOL_GUID
 | 
			
		||||
#define BLOCK_IO_PROTOCOL  EFI_BLOCK_IO_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_BLOCK_IO_PROTOCOL   EFI_BLOCK_IO;
 | 
			
		||||
typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Reset the Block Device.
 | 
			
		||||
@ -137,84 +131,84 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The curent media Id. If the media changes, this value is changed.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  MediaId;
 | 
			
		||||
  UINT32     MediaId;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the media is removable; otherwise, FALSE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN RemovableMedia;
 | 
			
		||||
  BOOLEAN    RemovableMedia;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if there is a media currently present in the device;
 | 
			
		||||
  /// othersise, FALSE. THis field shows the media present status
 | 
			
		||||
  /// as of the most recent ReadBlocks() or WriteBlocks() call.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN MediaPresent;
 | 
			
		||||
  BOOLEAN    MediaPresent;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if LBA 0 is the first block of a partition; otherwise
 | 
			
		||||
  /// FALSE. For media with only one partition this would be TRUE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN LogicalPartition;
 | 
			
		||||
  BOOLEAN    LogicalPartition;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the media is marked read-only otherwise, FALSE.
 | 
			
		||||
  /// This field shows the read-only status as of the most recent WriteBlocks () call.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN ReadOnly;
 | 
			
		||||
  BOOLEAN    ReadOnly;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the WriteBlock () function caches write data.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN WriteCaching;
 | 
			
		||||
  BOOLEAN    WriteCaching;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The intrinsic block size of the device. If the media changes, then
 | 
			
		||||
  /// this field is updated.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  BlockSize;
 | 
			
		||||
  UINT32     BlockSize;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Supplies the alignment requirement for any buffer to read or write block(s).
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  IoAlign;
 | 
			
		||||
  UINT32     IoAlign;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The last logical block address on the device.
 | 
			
		||||
  /// If the media changes, then this field is updated.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA LastBlock;
 | 
			
		||||
  EFI_LBA    LastBlock;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to
 | 
			
		||||
  /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the first LBA is aligned to
 | 
			
		||||
  /// a physical block boundary.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA LowestAlignedLba;
 | 
			
		||||
  EFI_LBA    LowestAlignedLba;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to
 | 
			
		||||
  /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the number of logical blocks
 | 
			
		||||
  /// per physical block.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32 LogicalBlocksPerPhysicalBlock;
 | 
			
		||||
  UINT32     LogicalBlocksPerPhysicalBlock;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to
 | 
			
		||||
  /// EFI_BLOCK_IO_PROTOCOL_REVISION3. Returns the optimal transfer length
 | 
			
		||||
  /// granularity as a number of logical blocks.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32 OptimalTransferLengthGranularity;
 | 
			
		||||
  UINT32     OptimalTransferLengthGranularity;
 | 
			
		||||
} EFI_BLOCK_IO_MEDIA;
 | 
			
		||||
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION  0x00010000
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION3 0x00020031
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION   0x00010000
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION2  0x00020001
 | 
			
		||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION3  0x0002001F
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Revision defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_BLOCK_IO_INTERFACE_REVISION   EFI_BLOCK_IO_PROTOCOL_REVISION
 | 
			
		||||
#define EFI_BLOCK_IO_INTERFACE_REVISION  EFI_BLOCK_IO_PROTOCOL_REVISION
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
///  This protocol provides control over block devices.
 | 
			
		||||
@ -225,19 +219,18 @@ struct _EFI_BLOCK_IO_PROTOCOL {
 | 
			
		||||
  /// revisions must be backwards compatible. If a future version is not
 | 
			
		||||
  /// back wards compatible, it is not the same GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64              Revision;
 | 
			
		||||
  UINT64                Revision;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to the EFI_BLOCK_IO_MEDIA data for this device.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_BLOCK_IO_MEDIA  *Media;
 | 
			
		||||
 | 
			
		||||
  EFI_BLOCK_RESET     Reset;
 | 
			
		||||
  EFI_BLOCK_READ      ReadBlocks;
 | 
			
		||||
  EFI_BLOCK_WRITE     WriteBlocks;
 | 
			
		||||
  EFI_BLOCK_FLUSH     FlushBlocks;
 | 
			
		||||
  EFI_BLOCK_IO_MEDIA    *Media;
 | 
			
		||||
 | 
			
		||||
  EFI_BLOCK_RESET       Reset;
 | 
			
		||||
  EFI_BLOCK_READ        ReadBlocks;
 | 
			
		||||
  EFI_BLOCK_WRITE       WriteBlocks;
 | 
			
		||||
  EFI_BLOCK_FLUSH       FlushBlocks;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiBlockIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiBlockIoProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,21 +5,15 @@
 | 
			
		||||
  enables the ability to read and write data at a block level in a non-blocking
 | 
			
		||||
  manner.
 | 
			
		||||
 | 
			
		||||
  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) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __BLOCK_IO2_H__
 | 
			
		||||
#define __BLOCK_IO2_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/BlockIo.h>
 | 
			
		||||
 | 
			
		||||
@ -28,27 +22,25 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0xa77b2472, 0xe282, 0x4e9f, {0xa2, 0x45, 0xc2, 0xc0, 0xe2, 0x7b, 0xbc, 0xc1} \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_BLOCK_IO2_PROTOCOL  EFI_BLOCK_IO2_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_BLOCK_IO2_PROTOCOL EFI_BLOCK_IO2_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The struct of Block IO2 Token.
 | 
			
		||||
**/
 | 
			
		||||
typedef struct {
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// If Event is NULL, then blocking I/O is performed.If Event is not NULL and
 | 
			
		||||
  /// non-blocking I/O is supported, then non-blocking I/O is performed, and
 | 
			
		||||
  /// Event will be signaled when the read request is completed.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT               Event;
 | 
			
		||||
  EFI_EVENT     Event;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Defines whether or not the signaled event encountered an error.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_STATUS              TransactionStatus;
 | 
			
		||||
  EFI_STATUS    TransactionStatus;
 | 
			
		||||
} EFI_BLOCK_IO2_TOKEN;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Reset the block device hardware.
 | 
			
		||||
 | 
			
		||||
@ -64,7 +56,7 @@ typedef struct {
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_BLOCK_RESET_EX) (
 | 
			
		||||
(EFIAPI *EFI_BLOCK_RESET_EX)(
 | 
			
		||||
  IN EFI_BLOCK_IO2_PROTOCOL  *This,
 | 
			
		||||
  IN BOOLEAN                 ExtendedVerification
 | 
			
		||||
  );
 | 
			
		||||
@ -82,7 +74,7 @@ EFI_STATUS
 | 
			
		||||
  @param[in]       MediaId    Id of the media, changes every time the media is
 | 
			
		||||
                              replaced.
 | 
			
		||||
  @param[in]       Lba        The starting Logical Block Address to read from.
 | 
			
		||||
  @param[in, out]  Token	    A pointer to the token associated with the transaction.
 | 
			
		||||
  @param[in, out]  Token      A pointer to the token associated with the transaction.
 | 
			
		||||
  @param[in]       BufferSize Size of Buffer, must be a multiple of device block size.
 | 
			
		||||
  @param[out]      Buffer     A pointer to the destination buffer for the data. The
 | 
			
		||||
                              caller is responsible for either having implicit or
 | 
			
		||||
@ -104,13 +96,13 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_BLOCK_READ_EX) (
 | 
			
		||||
(EFIAPI *EFI_BLOCK_READ_EX)(
 | 
			
		||||
  IN     EFI_BLOCK_IO2_PROTOCOL *This,
 | 
			
		||||
  IN     UINT32                 MediaId,
 | 
			
		||||
  IN     EFI_LBA                LBA,
 | 
			
		||||
  IN OUT EFI_BLOCK_IO2_TOKEN    *Token,
 | 
			
		||||
  IN     UINTN                  BufferSize,
 | 
			
		||||
     OUT VOID                  *Buffer
 | 
			
		||||
  OUT VOID                  *Buffer
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -146,7 +138,7 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_BLOCK_WRITE_EX) (
 | 
			
		||||
(EFIAPI *EFI_BLOCK_WRITE_EX)(
 | 
			
		||||
  IN     EFI_BLOCK_IO2_PROTOCOL  *This,
 | 
			
		||||
  IN     UINT32                 MediaId,
 | 
			
		||||
  IN     EFI_LBA                LBA,
 | 
			
		||||
@ -179,7 +171,7 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_BLOCK_FLUSH_EX) (
 | 
			
		||||
(EFIAPI *EFI_BLOCK_FLUSH_EX)(
 | 
			
		||||
  IN     EFI_BLOCK_IO2_PROTOCOL   *This,
 | 
			
		||||
  IN OUT EFI_BLOCK_IO2_TOKEN      *Token
 | 
			
		||||
  );
 | 
			
		||||
@ -194,15 +186,14 @@ struct _EFI_BLOCK_IO2_PROTOCOL {
 | 
			
		||||
  /// A pointer to the EFI_BLOCK_IO_MEDIA data for this device.
 | 
			
		||||
  /// Type EFI_BLOCK_IO_MEDIA is defined in BlockIo.h.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_BLOCK_IO_MEDIA      *Media;
 | 
			
		||||
  EFI_BLOCK_IO_MEDIA    *Media;
 | 
			
		||||
 | 
			
		||||
  EFI_BLOCK_RESET_EX      Reset;
 | 
			
		||||
  EFI_BLOCK_READ_EX       ReadBlocksEx;
 | 
			
		||||
  EFI_BLOCK_WRITE_EX      WriteBlocksEx;
 | 
			
		||||
  EFI_BLOCK_FLUSH_EX      FlushBlocksEx;
 | 
			
		||||
  EFI_BLOCK_RESET_EX    Reset;
 | 
			
		||||
  EFI_BLOCK_READ_EX     ReadBlocksEx;
 | 
			
		||||
  EFI_BLOCK_WRITE_EX    WriteBlocksEx;
 | 
			
		||||
  EFI_BLOCK_FLUSH_EX    FlushBlocksEx;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiBlockIo2ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiBlockIo2ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,21 +6,15 @@
 | 
			
		||||
  instance of this protocol for every PCI controller that has a PCI option ROM that contains one or
 | 
			
		||||
  more UEFI drivers. The protocol instance is attached to the handle of the PCI controller.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
 | 
			
		||||
#define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Global ID for the Bus Specific Driver Override Protocol
 | 
			
		||||
@ -30,7 +24,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65 } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL  EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Prototypes for the Bus Specific Driver Override Protocol
 | 
			
		||||
@ -66,9 +60,9 @@ EFI_STATUS
 | 
			
		||||
/// drivers to controllers.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
 | 
			
		||||
  EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
 | 
			
		||||
  EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER    GetDriver;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiBusSpecificDriverOverrideProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
  This protocol is used to retrieve user readable names of EFI Drivers
 | 
			
		||||
  and controllers managed by EFI Drivers.
 | 
			
		||||
 | 
			
		||||
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 __EFI_COMPONENT_NAME_H__
 | 
			
		||||
#define __EFI_COMPONENT_NAME_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The global ID for the Component Name Protocol.
 | 
			
		||||
@ -27,8 +21,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_COMPONENT_NAME_PROTOCOL  EFI_COMPONENT_NAME_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Retrieves a Unicode string that is the user-readable name of the EFI Driver.
 | 
			
		||||
@ -60,7 +53,6 @@ EFI_STATUS
 | 
			
		||||
  OUT CHAR16                               **DriverName
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Retrieves a Unicode string that is the user readable name of the controller
 | 
			
		||||
  that is being managed by an EFI Driver.
 | 
			
		||||
@ -116,16 +108,16 @@ EFI_STATUS
 | 
			
		||||
/// and controllers managed by UEFI Drivers.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_COMPONENT_NAME_PROTOCOL {
 | 
			
		||||
  EFI_COMPONENT_NAME_GET_DRIVER_NAME      GetDriverName;
 | 
			
		||||
  EFI_COMPONENT_NAME_GET_CONTROLLER_NAME  GetControllerName;
 | 
			
		||||
  EFI_COMPONENT_NAME_GET_DRIVER_NAME        GetDriverName;
 | 
			
		||||
  EFI_COMPONENT_NAME_GET_CONTROLLER_NAME    GetControllerName;
 | 
			
		||||
  ///
 | 
			
		||||
  /// A Null-terminated ASCII string that contains one or more
 | 
			
		||||
  /// ISO 639-2 language codes. This is the list of language codes
 | 
			
		||||
  /// that this protocol supports.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR8                                   *SupportedLanguages;
 | 
			
		||||
  CHAR8                                     *SupportedLanguages;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiComponentNameProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiComponentNameProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
  This protocol is used to retrieve user readable names of drivers
 | 
			
		||||
  and controllers managed by UEFI Drivers.
 | 
			
		||||
 | 
			
		||||
  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 __EFI_COMPONENT_NAME2_H__
 | 
			
		||||
#define __EFI_COMPONENT_NAME2_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Global ID for the Component Name Protocol
 | 
			
		||||
@ -25,8 +19,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
 | 
			
		||||
  {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_COMPONENT_NAME2_PROTOCOL  EFI_COMPONENT_NAME2_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Retrieves a string that is the user readable name of
 | 
			
		||||
@ -72,7 +65,6 @@ EFI_STATUS
 | 
			
		||||
  OUT CHAR16                               **DriverName
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Retrieves a string that is the user readable name of
 | 
			
		||||
  the controller that is being managed by an EFI Driver.
 | 
			
		||||
@ -156,8 +148,8 @@ EFI_STATUS
 | 
			
		||||
/// and controllers managed by UEFI Drivers.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_COMPONENT_NAME2_PROTOCOL {
 | 
			
		||||
  EFI_COMPONENT_NAME2_GET_DRIVER_NAME      GetDriverName;
 | 
			
		||||
  EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME  GetControllerName;
 | 
			
		||||
  EFI_COMPONENT_NAME2_GET_DRIVER_NAME        GetDriverName;
 | 
			
		||||
  EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME    GetControllerName;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// A Null-terminated ASCII string array that contains one or more
 | 
			
		||||
@ -166,9 +158,9 @@ struct _EFI_COMPONENT_NAME2_PROTOCOL {
 | 
			
		||||
  /// driver is up to the driver writer. SupportedLanguages is
 | 
			
		||||
  /// specified in RFC 4646 format.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR8                                    *SupportedLanguages;
 | 
			
		||||
  CHAR8    *SupportedLanguages;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiComponentName2ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiComponentName2ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,6 @@
 | 
			
		||||
#ifndef _IPXE_EFI_CONSOLECONTROL_H
 | 
			
		||||
#define _IPXE_EFI_CONSOLECONTROL_H
 | 
			
		||||
 | 
			
		||||
/*++
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
@ -122,3 +125,5 @@ struct _EFI_CONSOLE_CONTROL_PROTOCOL {
 | 
			
		||||
extern EFI_GUID gEfiConsoleControlProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* _IPXE_EFI_CONSOLECONTROL_H */
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -2,21 +2,15 @@
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
 | 
			
		||||
#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Device Path To Text protocol
 | 
			
		||||
@ -42,7 +36,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
CHAR16*
 | 
			
		||||
CHAR16 *
 | 
			
		||||
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(
 | 
			
		||||
  IN CONST EFI_DEVICE_PATH_PROTOCOL   *DeviceNode,
 | 
			
		||||
  IN BOOLEAN                          DisplayOnly,
 | 
			
		||||
@ -65,7 +59,7 @@ CHAR16*
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
CHAR16*
 | 
			
		||||
CHAR16 *
 | 
			
		||||
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(
 | 
			
		||||
  IN CONST EFI_DEVICE_PATH_PROTOCOL   *DevicePath,
 | 
			
		||||
  IN BOOLEAN                          DisplayOnly,
 | 
			
		||||
@ -76,12 +70,10 @@ CHAR16*
 | 
			
		||||
/// This protocol converts device paths and device nodes to text.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_DEVICE_PATH_TO_TEXT_NODE        ConvertDeviceNodeToText;
 | 
			
		||||
  EFI_DEVICE_PATH_TO_TEXT_PATH        ConvertDevicePathToText;
 | 
			
		||||
  EFI_DEVICE_PATH_TO_TEXT_NODE    ConvertDeviceNodeToText;
 | 
			
		||||
  EFI_DEVICE_PATH_TO_TEXT_PATH    ConvertDevicePathToText;
 | 
			
		||||
} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiDevicePathToTextProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,8 @@
 | 
			
		||||
  These protocols are used to collect configuration information for the EFI IPv4 Protocol
 | 
			
		||||
  drivers and to provide DHCPv4 server and PXE boot server discovery services.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.0.
 | 
			
		||||
@ -21,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_DHCP4_PROTOCOL_H__
 | 
			
		||||
#define __EFI_DHCP4_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_DHCP4_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -35,151 +29,146 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// DHCP option code.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               OpCode;
 | 
			
		||||
  UINT8    OpCode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Length of the DHCP option data. Not present if OpCode is 0 or 255.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               Length;
 | 
			
		||||
  UINT8    Length;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Start of the DHCP option data. Not present if OpCode is 0 or 255 or if Length is zero.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8               Data[1];
 | 
			
		||||
  UINT8    Data[1];
 | 
			
		||||
} EFI_DHCP4_PACKET_OPTION;
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
///
 | 
			
		||||
/// EFI_DHCP4_PACKET defines the format of DHCPv4 packets. See RFC 2131 for more information.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8             OpCode;
 | 
			
		||||
  UINT8             HwType;
 | 
			
		||||
  UINT8             HwAddrLen;
 | 
			
		||||
  UINT8             Hops;
 | 
			
		||||
  UINT32            Xid;
 | 
			
		||||
  UINT16            Seconds;
 | 
			
		||||
  UINT16            Reserved;
 | 
			
		||||
  EFI_IPv4_ADDRESS  ClientAddr;       ///< Client IP address from client.
 | 
			
		||||
  EFI_IPv4_ADDRESS  YourAddr;         ///< Client IP address from server.
 | 
			
		||||
  EFI_IPv4_ADDRESS  ServerAddr;       ///< IP address of next server in bootstrap.
 | 
			
		||||
  EFI_IPv4_ADDRESS  GatewayAddr;      ///< Relay agent IP address.
 | 
			
		||||
  UINT8             ClientHwAddr[16]; ///< Client hardware address.
 | 
			
		||||
  CHAR8             ServerName[64];
 | 
			
		||||
  CHAR8             BootFileName[128];
 | 
			
		||||
}EFI_DHCP4_HEADER;
 | 
			
		||||
  UINT8               OpCode;
 | 
			
		||||
  UINT8               HwType;
 | 
			
		||||
  UINT8               HwAddrLen;
 | 
			
		||||
  UINT8               Hops;
 | 
			
		||||
  UINT32              Xid;
 | 
			
		||||
  UINT16              Seconds;
 | 
			
		||||
  UINT16              Reserved;
 | 
			
		||||
  EFI_IPv4_ADDRESS    ClientAddr;       ///< Client IP address from client.
 | 
			
		||||
  EFI_IPv4_ADDRESS    YourAddr;         ///< Client IP address from server.
 | 
			
		||||
  EFI_IPv4_ADDRESS    ServerAddr;       ///< IP address of next server in bootstrap.
 | 
			
		||||
  EFI_IPv4_ADDRESS    GatewayAddr;      ///< Relay agent IP address.
 | 
			
		||||
  UINT8               ClientHwAddr[16]; ///< Client hardware address.
 | 
			
		||||
  CHAR8               ServerName[64];
 | 
			
		||||
  CHAR8               BootFileName[128];
 | 
			
		||||
} EFI_DHCP4_HEADER;
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Size of the EFI_DHCP4_PACKET buffer.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32              Size;
 | 
			
		||||
  UINT32    Size;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Length of the EFI_DHCP4_PACKET from the first byte of the Header field
 | 
			
		||||
  /// to the last byte of the Option[] field.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32              Length;
 | 
			
		||||
  UINT32    Length;
 | 
			
		||||
 | 
			
		||||
  struct {
 | 
			
		||||
    ///
 | 
			
		||||
    /// DHCP packet header.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_DHCP4_HEADER  Header;
 | 
			
		||||
    EFI_DHCP4_HEADER    Header;
 | 
			
		||||
    ///
 | 
			
		||||
    /// DHCP magik cookie in network byte order.
 | 
			
		||||
    ///
 | 
			
		||||
    UINT32            Magik;
 | 
			
		||||
    UINT32              Magik;
 | 
			
		||||
    ///
 | 
			
		||||
    /// Start of the DHCP packed option data.
 | 
			
		||||
    ///
 | 
			
		||||
    UINT8             Option[1];
 | 
			
		||||
    UINT8               Option[1];
 | 
			
		||||
  } Dhcp4;
 | 
			
		||||
} EFI_DHCP4_PACKET;
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver is stopped.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Stopped        = 0x0,
 | 
			
		||||
  Dhcp4Stopped = 0x0,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver is inactive.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Init           = 0x1,
 | 
			
		||||
  Dhcp4Init = 0x1,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver is collecting DHCP offer packets from DHCP servers.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Selecting      = 0x2,
 | 
			
		||||
  Dhcp4Selecting = 0x2,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver has sent the request to the DHCP server and is waiting for a response.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Requesting     = 0x3,
 | 
			
		||||
  Dhcp4Requesting = 0x3,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The DHCP configuration has completed.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Bound          = 0x4,
 | 
			
		||||
  Dhcp4Bound = 0x4,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The DHCP configuration is being renewed and another request has
 | 
			
		||||
  /// been sent out, but it has not received a response from the server yet.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Renewing       = 0x5,
 | 
			
		||||
  Dhcp4Renewing = 0x5,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The DHCP configuration has timed out and the EFI DHCPv4
 | 
			
		||||
  /// Protocol driver is trying to extend the lease time.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Rebinding      = 0x6,
 | 
			
		||||
  Dhcp4Rebinding = 0x6,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver was initialized with a previously
 | 
			
		||||
  /// allocated or known IP address.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4InitReboot     = 0x7,
 | 
			
		||||
  Dhcp4InitReboot = 0x7,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver is seeking to reuse the previously
 | 
			
		||||
  /// allocated IP address by sending a request to the DHCP server.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Rebooting      = 0x8
 | 
			
		||||
  Dhcp4Rebooting = 0x8
 | 
			
		||||
} EFI_DHCP4_STATE;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef enum{
 | 
			
		||||
typedef enum {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The packet to start the configuration sequence is about to be sent.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4SendDiscover   = 0x01,
 | 
			
		||||
  Dhcp4SendDiscover = 0x01,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A reply packet was just received.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4RcvdOffer      = 0x02,
 | 
			
		||||
  Dhcp4RcvdOffer = 0x02,
 | 
			
		||||
  ///
 | 
			
		||||
  /// It is time for Dhcp4Callback to select an offer.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4SelectOffer    = 0x03,
 | 
			
		||||
  Dhcp4SelectOffer = 0x03,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A request packet is about to be sent.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4SendRequest    = 0x04,
 | 
			
		||||
  Dhcp4SendRequest = 0x04,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A DHCPACK packet was received and will be passed to Dhcp4Callback.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4RcvdAck        = 0x05,
 | 
			
		||||
  Dhcp4RcvdAck = 0x05,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A DHCPNAK packet was received and will be passed to Dhcp4Callback.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4RcvdNak        = 0x06,
 | 
			
		||||
  Dhcp4RcvdNak = 0x06,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A decline packet is about to be sent.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4SendDecline    = 0x07,
 | 
			
		||||
  Dhcp4SendDecline = 0x07,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The DHCP configuration process has completed. No packet is associated with this event.
 | 
			
		||||
  ///
 | 
			
		||||
@ -188,7 +177,7 @@ typedef enum{
 | 
			
		||||
  /// It is time to enter the Dhcp4Renewing state and to contact the server
 | 
			
		||||
  /// that originally issued the network address. No packet is associated with this event.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4EnterRenewing  = 0x09,
 | 
			
		||||
  Dhcp4EnterRenewing = 0x09,
 | 
			
		||||
  ///
 | 
			
		||||
  /// It is time to enter the Dhcp4Rebinding state and to contact any server.
 | 
			
		||||
  /// No packet is associated with this event.
 | 
			
		||||
@ -199,13 +188,13 @@ typedef enum{
 | 
			
		||||
  /// the user released the configuration, or a DHCPNAK packet was received in
 | 
			
		||||
  /// the Dhcp4Renewing or Dhcp4Rebinding state. No packet is associated with this event.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4AddressLost    = 0x0b,
 | 
			
		||||
  Dhcp4AddressLost = 0x0b,
 | 
			
		||||
  ///
 | 
			
		||||
  /// The DHCP process failed because a DHCPNAK packet was received or the user
 | 
			
		||||
  /// aborted the DHCP process at a time when the configuration was not available yet.
 | 
			
		||||
  /// No packet is associated with this event.
 | 
			
		||||
  ///
 | 
			
		||||
  Dhcp4Fail           = 0x0c
 | 
			
		||||
  Dhcp4Fail = 0x0c
 | 
			
		||||
} EFI_DHCP4_EVENT;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -257,25 +246,25 @@ typedef struct {
 | 
			
		||||
  /// event and waiting for a response during the Dhcp4RcvdOffer event.
 | 
			
		||||
  /// Set to zero to use the default try counts and timeout values.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      DiscoverTryCount;
 | 
			
		||||
  UINT32                     DiscoverTryCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The maximum amount of time (in seconds) to wait for returned packets in each
 | 
			
		||||
  /// of the retries. Timeout values of zero will default to a timeout value
 | 
			
		||||
  /// of one second. Set to NULL to use default timeout values.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      *DiscoverTimeout;
 | 
			
		||||
  UINT32                     *DiscoverTimeout;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of times to try sending a packet during the Dhcp4SendRequest event
 | 
			
		||||
  /// and waiting for a response during the Dhcp4RcvdAck event before accepting
 | 
			
		||||
  /// failure. Set to zero to use the default try counts and timeout values.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      RequestTryCount;
 | 
			
		||||
  UINT32                     RequestTryCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The maximum amount of time (in seconds) to wait for return packets in each of the retries.
 | 
			
		||||
  /// Timeout values of zero will default to a timeout value of one second.
 | 
			
		||||
  /// Set to NULL to use default timeout values.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      *RequestTimeout;
 | 
			
		||||
  UINT32                     *RequestTimeout;
 | 
			
		||||
  ///
 | 
			
		||||
  /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP
 | 
			
		||||
  /// address will cause the EFI DHCPv4 Protocol driver to enter the Dhcp4InitReboot state.
 | 
			
		||||
@ -283,20 +272,20 @@ typedef struct {
 | 
			
		||||
  /// For a DHCPINFORM this parameter should be set to the client network address
 | 
			
		||||
  /// which was assigned to the client during a DHCPDISCOVER.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            ClientAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS           ClientAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The callback function to intercept various events that occurred in
 | 
			
		||||
  /// the DHCP configuration process. Set to NULL to ignore all those events.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_CALLBACK          Dhcp4Callback;
 | 
			
		||||
  EFI_DHCP4_CALLBACK         Dhcp4Callback;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the context that will be passed to Dhcp4Callback when it is called.
 | 
			
		||||
  ///
 | 
			
		||||
  VOID                        *CallbackContext;
 | 
			
		||||
  VOID                       *CallbackContext;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of DHCP options in the OptionList.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      OptionCount;
 | 
			
		||||
  UINT32                     OptionCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// List of DHCP options to be included in every packet that is sent during the
 | 
			
		||||
  /// Dhcp4SendDiscover event. Pad options are appended automatically by DHCP driver
 | 
			
		||||
@ -304,122 +293,118 @@ typedef struct {
 | 
			
		||||
  /// ignored by the driver. OptionList can be freed after EFI_DHCP4_PROTOCOL.Configure()
 | 
			
		||||
  /// returns. Ignored if OptionCount is zero.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_PACKET_OPTION     **OptionList;
 | 
			
		||||
  EFI_DHCP4_PACKET_OPTION    **OptionList;
 | 
			
		||||
} EFI_DHCP4_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI DHCPv4 Protocol driver operating state.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_STATE             State;
 | 
			
		||||
  EFI_DHCP4_STATE          State;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The configuration data of the current EFI DHCPv4 Protocol driver instance.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_CONFIG_DATA       ConfigData;
 | 
			
		||||
  EFI_DHCP4_CONFIG_DATA    ConfigData;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The client IP address that was acquired from the DHCP server. If it is zero,
 | 
			
		||||
  /// the DHCP acquisition has not completed yet and the following fields in this structure are undefined.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            ClientAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS         ClientAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The local hardware address.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MAC_ADDRESS             ClientMacAddress;
 | 
			
		||||
  EFI_MAC_ADDRESS          ClientMacAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The server IP address that is providing the DHCP service to this client.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            ServerAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS         ServerAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The router IP address that was acquired from the DHCP server.
 | 
			
		||||
  /// May be zero if the server does not offer this address.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            RouterAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS         RouterAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The subnet mask of the connected network that was acquired from the DHCP server.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            SubnetMask;
 | 
			
		||||
  EFI_IPv4_ADDRESS         SubnetMask;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The lease time (in 1-second units) of the configured IP address.
 | 
			
		||||
  /// The value 0xFFFFFFFF means that the lease time is infinite.
 | 
			
		||||
  /// A default lease of 7 days is used if the DHCP server does not provide a value.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      LeaseTime;
 | 
			
		||||
  UINT32                   LeaseTime;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The cached latest DHCPACK or DHCPNAK or BOOTP REPLY packet. May be NULL if no packet is cached.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_PACKET            *ReplyPacket;
 | 
			
		||||
  EFI_DHCP4_PACKET         *ReplyPacket;
 | 
			
		||||
} EFI_DHCP4_MODE_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Alternate listening address. It can be a unicast, multicast, or broadcast address.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            ListenAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    ListenAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The subnet mask of above listening unicast/broadcast IP address.
 | 
			
		||||
  /// Ignored if ListenAddress is a multicast address.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS            SubnetMask;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Alternate station source (or listening) port number.
 | 
			
		||||
  /// If zero, then the default station port number (68) will be used.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                      ListenPort;
 | 
			
		||||
  UINT16              ListenPort;
 | 
			
		||||
} EFI_DHCP4_LISTEN_POINT;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The completion status of transmitting and receiving.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_STATUS              Status;
 | 
			
		||||
  EFI_STATUS                Status;
 | 
			
		||||
  ///
 | 
			
		||||
  /// If not NULL, the event that will be signaled when the collection process
 | 
			
		||||
  /// completes. If NULL, this function will busy-wait until the collection process competes.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT               CompletionEvent;
 | 
			
		||||
  EFI_EVENT                 CompletionEvent;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the server IP address. This address may be a unicast, multicast, or broadcast address.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS        RemoteAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS          RemoteAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The server listening port number. If zero, the default server listening port number (67) will be used.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                  RemotePort;
 | 
			
		||||
  UINT16                    RemotePort;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the gateway address to override the existing setting.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS        GatewayAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS          GatewayAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of entries in ListenPoints. If zero, the default station address and port number 68 are used.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  ListenPointCount;
 | 
			
		||||
  UINT32                    ListenPointCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// An array of station address and port number pairs that are used as receiving filters.
 | 
			
		||||
  /// The first entry is also used as the source address and source port of the outgoing packet.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_LISTEN_POINT  *ListenPoints;
 | 
			
		||||
  EFI_DHCP4_LISTEN_POINT    *ListenPoints;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of seconds to collect responses. Zero is invalid.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  TimeoutValue;
 | 
			
		||||
  UINT32                    TimeoutValue;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the packet to be transmitted.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_PACKET        *Packet;
 | 
			
		||||
  EFI_DHCP4_PACKET          *Packet;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of received packets.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  ResponseCount;
 | 
			
		||||
  UINT32                    ResponseCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the allocated list of received packets.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_DHCP4_PACKET        *ResponseList;
 | 
			
		||||
  EFI_DHCP4_PACKET          *ResponseList;
 | 
			
		||||
} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver.
 | 
			
		||||
 | 
			
		||||
@ -495,7 +480,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_DHCP4_CONFIG_DATA    *Dhcp4CfgData  OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Starts the DHCP configuration process.
 | 
			
		||||
 | 
			
		||||
@ -685,7 +669,6 @@ EFI_STATUS
 | 
			
		||||
  OUT EFI_DHCP4_PACKET        **NewPacket
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Transmits a DHCP formatted packet and optionally waits for responses.
 | 
			
		||||
 | 
			
		||||
@ -718,7 +701,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN  *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Parses the packed DHCP option data.
 | 
			
		||||
 | 
			
		||||
@ -765,18 +747,18 @@ EFI_STATUS
 | 
			
		||||
/// and to provide DHCPv4 server and PXE boot server discovery services.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_DHCP4_PROTOCOL {
 | 
			
		||||
  EFI_DHCP4_GET_MODE_DATA      GetModeData;
 | 
			
		||||
  EFI_DHCP4_CONFIGURE          Configure;
 | 
			
		||||
  EFI_DHCP4_START              Start;
 | 
			
		||||
  EFI_DHCP4_RENEW_REBIND       RenewRebind;
 | 
			
		||||
  EFI_DHCP4_RELEASE            Release;
 | 
			
		||||
  EFI_DHCP4_STOP               Stop;
 | 
			
		||||
  EFI_DHCP4_BUILD              Build;
 | 
			
		||||
  EFI_DHCP4_TRANSMIT_RECEIVE   TransmitReceive;
 | 
			
		||||
  EFI_DHCP4_PARSE              Parse;
 | 
			
		||||
  EFI_DHCP4_GET_MODE_DATA       GetModeData;
 | 
			
		||||
  EFI_DHCP4_CONFIGURE           Configure;
 | 
			
		||||
  EFI_DHCP4_START               Start;
 | 
			
		||||
  EFI_DHCP4_RENEW_REBIND        RenewRebind;
 | 
			
		||||
  EFI_DHCP4_RELEASE             Release;
 | 
			
		||||
  EFI_DHCP4_STOP                Stop;
 | 
			
		||||
  EFI_DHCP4_BUILD               Build;
 | 
			
		||||
  EFI_DHCP4_TRANSMIT_RECEIVE    TransmitReceive;
 | 
			
		||||
  EFI_DHCP4_PARSE               Parse;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiDhcp4ProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiDhcp4ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiDhcp4ServiceBindingProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,21 +5,15 @@
 | 
			
		||||
  oriented devices. The Disk IO protocol is intended to layer on top of the
 | 
			
		||||
  Block IO protocol.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __DISK_IO_H__
 | 
			
		||||
#define __DISK_IO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_DISK_IO_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -36,7 +30,7 @@ typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL;
 | 
			
		||||
///
 | 
			
		||||
/// Protocol defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_DISK_IO_PROTOCOL  EFI_DISK_IO;
 | 
			
		||||
typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Read BufferSize bytes from Offset into Buffer.
 | 
			
		||||
@ -93,7 +87,7 @@ EFI_STATUS
 | 
			
		||||
  IN VOID                         *Buffer
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000
 | 
			
		||||
#define EFI_DISK_IO_PROTOCOL_REVISION  0x00010000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Revision defined in EFI1.1
 | 
			
		||||
@ -109,11 +103,11 @@ struct _EFI_DISK_IO_PROTOCOL {
 | 
			
		||||
  /// revisions must be backwards compatible. If a future version is not
 | 
			
		||||
  /// backwards compatible, it is not the same GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64          Revision;
 | 
			
		||||
  EFI_DISK_READ   ReadDisk;
 | 
			
		||||
  EFI_DISK_WRITE  WriteDisk;
 | 
			
		||||
  UINT64            Revision;
 | 
			
		||||
  EFI_DISK_READ     ReadDisk;
 | 
			
		||||
  EFI_DISK_WRITE    WriteDisk;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiDiskIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiDiskIoProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,21 +4,15 @@
 | 
			
		||||
  This protocol is produced by every driver that follows the UEFI Driver Model,
 | 
			
		||||
  and it is the central component that allows drivers and controllers to be managed.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __EFI_DRIVER_BINDING_H__
 | 
			
		||||
#define __EFI_DRIVER_BINDING_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The global ID for the ControllerHandle Driver Protocol.
 | 
			
		||||
@ -28,7 +22,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_DRIVER_BINDING_PROTOCOL  EFI_DRIVER_BINDING_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Tests to see if this driver supports a given controller. If a child device is provided,
 | 
			
		||||
@ -163,9 +157,9 @@ EFI_STATUS
 | 
			
		||||
/// If a controller is supported, then it also provides routines to start and stop the controller.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_DRIVER_BINDING_PROTOCOL {
 | 
			
		||||
  EFI_DRIVER_BINDING_SUPPORTED  Supported;
 | 
			
		||||
  EFI_DRIVER_BINDING_START      Start;
 | 
			
		||||
  EFI_DRIVER_BINDING_STOP       Stop;
 | 
			
		||||
  EFI_DRIVER_BINDING_SUPPORTED    Supported;
 | 
			
		||||
  EFI_DRIVER_BINDING_START        Start;
 | 
			
		||||
  EFI_DRIVER_BINDING_STOP         Stop;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The version number of the UEFI driver that produced the
 | 
			
		||||
@ -179,13 +173,13 @@ struct _EFI_DRIVER_BINDING_PROTOCOL {
 | 
			
		||||
  /// platform/OEM specific drivers. The Version values of 0x10-
 | 
			
		||||
  /// 0xffffffef are reserved for IHV-developed drivers.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                        Version;
 | 
			
		||||
  UINT32        Version;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The image handle of the UEFI driver that produced this instance
 | 
			
		||||
  /// of the EFI_DRIVER_BINDING_PROTOCOL.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE                    ImageHandle;
 | 
			
		||||
  EFI_HANDLE    ImageHandle;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The handle on which this instance of the
 | 
			
		||||
@ -195,9 +189,9 @@ struct _EFI_DRIVER_BINDING_PROTOCOL {
 | 
			
		||||
  /// EFI_DRIVER_BINDING_PROTOCOL, this value may not be
 | 
			
		||||
  /// the same as ImageHandle.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE                    DriverBindingHandle;
 | 
			
		||||
  EFI_HANDLE    DriverBindingHandle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiDriverBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiDriverBindingProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,31 +4,22 @@
 | 
			
		||||
  The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
 | 
			
		||||
  leverage the EFI configuration driver interface.
 | 
			
		||||
 | 
			
		||||
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 __EFI_FORM_BROWSER2_H__
 | 
			
		||||
#define __EFI_FORM_BROWSER2_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Guid/HiiPlatformSetupFormset.h>
 | 
			
		||||
 | 
			
		||||
#define EFI_FORM_BROWSER2_PROTOCOL_GUID \
 | 
			
		||||
  {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_FORM_BROWSER2_PROTOCOL   EFI_FORM_BROWSER2_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -49,24 +40,23 @@ typedef struct _EFI_FORM_BROWSER2_PROTOCOL   EFI_FORM_BROWSER2_PROTOCOL;
 | 
			
		||||
                      window will end.
 | 
			
		||||
**/
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINTN   LeftColumn;
 | 
			
		||||
  UINTN   RightColumn;
 | 
			
		||||
  UINTN   TopRow;
 | 
			
		||||
  UINTN   BottomRow;
 | 
			
		||||
  UINTN    LeftColumn;
 | 
			
		||||
  UINTN    RightColumn;
 | 
			
		||||
  UINTN    TopRow;
 | 
			
		||||
  UINTN    BottomRow;
 | 
			
		||||
} EFI_SCREEN_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
typedef UINTN EFI_BROWSER_ACTION_REQUEST;
 | 
			
		||||
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_NONE   0
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_RESET  1
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_EXIT   3
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT  4
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY        6
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD      7
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_RECONNECT         8
 | 
			
		||||
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_NONE               0
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_RESET              1
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_SUBMIT             2
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_EXIT               3
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT   4
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT  5
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY         6
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD       7
 | 
			
		||||
#define EFI_BROWSER_ACTION_REQUEST_RECONNECT          8
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Initialize the browser to display the specified configuration forms.
 | 
			
		||||
@ -110,12 +100,11 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_FORM_BROWSER2_PROTOCOL  *This,
 | 
			
		||||
  IN        EFI_HII_HANDLE              *Handle,
 | 
			
		||||
  IN        UINTN                      HandleCount,
 | 
			
		||||
  IN        EFI_GUID                   *FormSetGuid, OPTIONAL
 | 
			
		||||
  IN        EFI_FORM_ID                FormId, OPTIONAL
 | 
			
		||||
  IN CONST  EFI_SCREEN_DESCRIPTOR      *ScreenDimensions, OPTIONAL
 | 
			
		||||
  IN        EFI_GUID                   *FormSetGuid  OPTIONAL,
 | 
			
		||||
  IN        EFI_FORM_ID                FormId  OPTIONAL,
 | 
			
		||||
  IN CONST  EFI_SCREEN_DESCRIPTOR      *ScreenDimensions  OPTIONAL,
 | 
			
		||||
  OUT       EFI_BROWSER_ACTION_REQUEST *ActionRequest  OPTIONAL
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  This function is called by a callback handler to retrieve uncommitted state data from the browser.
 | 
			
		||||
@ -163,20 +152,19 @@ EFI_STATUS
 | 
			
		||||
  IN OUT    UINTN                     *ResultsDataSize,
 | 
			
		||||
  IN OUT    EFI_STRING                ResultsData,
 | 
			
		||||
  IN CONST  BOOLEAN                   RetrieveData,
 | 
			
		||||
  IN CONST  EFI_GUID                  *VariableGuid, OPTIONAL
 | 
			
		||||
  IN CONST  EFI_GUID                  *VariableGuid  OPTIONAL,
 | 
			
		||||
  IN CONST  CHAR16                    *VariableName OPTIONAL
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// This interface will allow the caller to direct the configuration
 | 
			
		||||
/// driver to use either the HII database or use the passed-in packet of data.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_FORM_BROWSER2_PROTOCOL {
 | 
			
		||||
  EFI_SEND_FORM2         SendForm;
 | 
			
		||||
  EFI_BROWSER_CALLBACK2  BrowserCallback;
 | 
			
		||||
} ;
 | 
			
		||||
  EFI_SEND_FORM2           SendForm;
 | 
			
		||||
  EFI_BROWSER_CALLBACK2    BrowserCallback;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiFormBrowser2ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
 | 
			
		||||
  Abstraction of a very simple graphics device.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __GRAPHICS_OUTPUT_H__
 | 
			
		||||
#define __GRAPHICS_OUTPUT_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -27,10 +21,10 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32            RedMask;
 | 
			
		||||
  UINT32            GreenMask;
 | 
			
		||||
  UINT32            BlueMask;
 | 
			
		||||
  UINT32            ReservedMask;
 | 
			
		||||
  UINT32    RedMask;
 | 
			
		||||
  UINT32    GreenMask;
 | 
			
		||||
  UINT32    BlueMask;
 | 
			
		||||
  UINT32    ReservedMask;
 | 
			
		||||
} EFI_PIXEL_BITMASK;
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
@ -69,29 +63,29 @@ typedef struct {
 | 
			
		||||
  /// The version of this data structure. A value of zero represents the
 | 
			
		||||
  /// EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure as defined in this specification.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                     Version;
 | 
			
		||||
  UINT32                       Version;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of video screen in pixels in the X dimension.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                     HorizontalResolution;
 | 
			
		||||
  UINT32                       HorizontalResolution;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of video screen in pixels in the Y dimension.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                     VerticalResolution;
 | 
			
		||||
  UINT32                       VerticalResolution;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Enumeration that defines the physical format of the pixel. A value of PixelBltOnly
 | 
			
		||||
  /// implies that a linear frame buffer is not available for this mode.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GRAPHICS_PIXEL_FORMAT  PixelFormat;
 | 
			
		||||
  EFI_GRAPHICS_PIXEL_FORMAT    PixelFormat;
 | 
			
		||||
  ///
 | 
			
		||||
  /// This bit-mask is only valid if PixelFormat is set to PixelPixelBitMask.
 | 
			
		||||
  /// A bit being set defines what bits are used for what purpose such as Red, Green, Blue, or Reserved.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PIXEL_BITMASK          PixelInformation;
 | 
			
		||||
  EFI_PIXEL_BITMASK            PixelInformation;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Defines the number of pixel elements per video memory line.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                     PixelsPerScanLine;
 | 
			
		||||
  UINT32                       PixelsPerScanLine;
 | 
			
		||||
} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -137,15 +131,15 @@ EFI_STATUS
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 Blue;
 | 
			
		||||
  UINT8 Green;
 | 
			
		||||
  UINT8 Red;
 | 
			
		||||
  UINT8 Reserved;
 | 
			
		||||
  UINT8    Blue;
 | 
			
		||||
  UINT8    Green;
 | 
			
		||||
  UINT8    Red;
 | 
			
		||||
  UINT8    Reserved;
 | 
			
		||||
} EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
 | 
			
		||||
  UINT32                        Raw;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL    Pixel;
 | 
			
		||||
  UINT32                           Raw;
 | 
			
		||||
} EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -218,7 +212,7 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT)(
 | 
			
		||||
  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL            *This,
 | 
			
		||||
  IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL           *BltBuffer,   OPTIONAL
 | 
			
		||||
  IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL           *BltBuffer    OPTIONAL,
 | 
			
		||||
  IN  EFI_GRAPHICS_OUTPUT_BLT_OPERATION       BltOperation,
 | 
			
		||||
  IN  UINTN                                   SourceX,
 | 
			
		||||
  IN  UINTN                                   SourceY,
 | 
			
		||||
@ -233,29 +227,29 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of modes supported by QueryMode() and SetMode().
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                                 MaxMode;
 | 
			
		||||
  UINT32                                  MaxMode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Current Mode of the graphics device. Valid mode numbers are 0 to MaxMode -1.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                                 Mode;
 | 
			
		||||
  UINT32                                  Mode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to read-only EFI_GRAPHICS_OUTPUT_MODE_INFORMATION data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Info;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION    *Info;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Size of Info structure in bytes.
 | 
			
		||||
  ///
 | 
			
		||||
  UINTN                                  SizeOfInfo;
 | 
			
		||||
  UINTN                                   SizeOfInfo;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Base address of graphics linear frame buffer.
 | 
			
		||||
  /// Offset zero in FrameBufferBase represents the upper left pixel of the display.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS                   FrameBufferBase;
 | 
			
		||||
  EFI_PHYSICAL_ADDRESS                    FrameBufferBase;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Amount of frame buffer needed to support the active mode as defined by
 | 
			
		||||
  /// PixelsPerScanLine xVerticalResolution x PixelElementSize.
 | 
			
		||||
  ///
 | 
			
		||||
  UINTN                                  FrameBufferSize;
 | 
			
		||||
  UINTN                                   FrameBufferSize;
 | 
			
		||||
} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -264,15 +258,15 @@ typedef struct {
 | 
			
		||||
/// frame buffer is also exposed so software can write directly to the video hardware.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE  QueryMode;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE    SetMode;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT         Blt;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE    QueryMode;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE      SetMode;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT           Blt;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE        *Mode;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE          *Mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiGraphicsOutputProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiGraphicsOutputProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,44 +5,40 @@
 | 
			
		||||
  This protocol is published by drivers providing and requesting
 | 
			
		||||
  configuration data from HII. It may only be invoked by HII.
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
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.
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.1.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef __EFI_HII_CONFIG_ACCESS_H__
 | 
			
		||||
#define __EFI_HII_CONFIG_ACCESS_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/FormBrowser2.h>
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID  \
 | 
			
		||||
  { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL  EFI_HII_CONFIG_ACCESS_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef UINTN EFI_BROWSER_ACTION;
 | 
			
		||||
 | 
			
		||||
#define EFI_BROWSER_ACTION_CHANGING   0
 | 
			
		||||
#define EFI_BROWSER_ACTION_CHANGED    1
 | 
			
		||||
#define EFI_BROWSER_ACTION_RETRIEVE   2
 | 
			
		||||
#define EFI_BROWSER_ACTION_FORM_OPEN  3
 | 
			
		||||
#define EFI_BROWSER_ACTION_FORM_CLOSE 4
 | 
			
		||||
#define EFI_BROWSER_ACTION_SUBMITTED  5
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_STANDARD      0x1000
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_SAFE          0x1002
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM      0x2000
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE      0x3000
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE      0x4000
 | 
			
		||||
#define EFI_BROWSER_ACTION_CHANGING               0
 | 
			
		||||
#define EFI_BROWSER_ACTION_CHANGED                1
 | 
			
		||||
#define EFI_BROWSER_ACTION_RETRIEVE               2
 | 
			
		||||
#define EFI_BROWSER_ACTION_FORM_OPEN              3
 | 
			
		||||
#define EFI_BROWSER_ACTION_FORM_CLOSE             4
 | 
			
		||||
#define EFI_BROWSER_ACTION_SUBMITTED              5
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_STANDARD       0x1000
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING  0x1001
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_SAFE           0x1002
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM       0x2000
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE       0x3000
 | 
			
		||||
#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE       0x4000
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -114,13 +110,12 @@ typedef UINTN EFI_BROWSER_ACTION;
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)(
 | 
			
		||||
(EFIAPI *EFI_HII_ACCESS_EXTRACT_CONFIG)(
 | 
			
		||||
  IN CONST  EFI_HII_CONFIG_ACCESS_PROTOCOL  *This,
 | 
			
		||||
  IN CONST  EFI_STRING                      Request,
 | 
			
		||||
  OUT       EFI_STRING                      *Progress,
 | 
			
		||||
  OUT       EFI_STRING                      *Results
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -164,11 +159,11 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)(
 | 
			
		||||
(EFIAPI *EFI_HII_ACCESS_ROUTE_CONFIG)(
 | 
			
		||||
  IN CONST  EFI_HII_CONFIG_ACCESS_PROTOCOL  *This,
 | 
			
		||||
  IN CONST  EFI_STRING                      Configuration,
 | 
			
		||||
  OUT       EFI_STRING                      *Progress
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -205,7 +200,7 @@ EFI_STATUS
 | 
			
		||||
  IN OUT EFI_IFR_TYPE_VALUE                     *Value,
 | 
			
		||||
  OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
 | 
			
		||||
  )
 | 
			
		||||
  ;
 | 
			
		||||
;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// This protocol provides a callable interface between the HII and
 | 
			
		||||
@ -213,13 +208,11 @@ EFI_STATUS
 | 
			
		||||
/// to publish this protocol.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {
 | 
			
		||||
  EFI_HII_ACCESS_EXTRACT_CONFIG     ExtractConfig;
 | 
			
		||||
  EFI_HII_ACCESS_ROUTE_CONFIG       RouteConfig;
 | 
			
		||||
  EFI_HII_ACCESS_FORM_CALLBACK      Callback;
 | 
			
		||||
} ;
 | 
			
		||||
  EFI_HII_ACCESS_EXTRACT_CONFIG    ExtractConfig;
 | 
			
		||||
  EFI_HII_ACCESS_ROUTE_CONFIG      RouteConfig;
 | 
			
		||||
  EFI_HII_ACCESS_FORM_CALLBACK     Callback;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiHiiConfigAccessProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiConfigAccessProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,38 +2,34 @@
 | 
			
		||||
  The file provides Database manager for HII-related data
 | 
			
		||||
  structures.
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
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.
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.1.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __HII_DATABASE_H__
 | 
			
		||||
#define __HII_DATABASE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_DATABASE_PROTOCOL_GUID \
 | 
			
		||||
  { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_HII_DATABASE_NOTIFY_TYPE.
 | 
			
		||||
///
 | 
			
		||||
typedef UINTN   EFI_HII_DATABASE_NOTIFY_TYPE;
 | 
			
		||||
typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE;
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_NEW_PACK     0x00000001
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK  0x00000002
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK  0x00000004
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_ADD_PACK     0x00000008
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_NEW_PACK    0x00000001
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004
 | 
			
		||||
#define EFI_HII_DATABASE_NOTIFY_ADD_PACK    0x00000008
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
  Functions which are registered to receive notification of
 | 
			
		||||
@ -68,7 +64,7 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_HII_PACKAGE_HEADER        *Package,
 | 
			
		||||
  IN        EFI_HII_HANDLE                 Handle,
 | 
			
		||||
  IN        EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -108,10 +104,9 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_HII_DATABASE_NEW_PACK)(
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL   *This,
 | 
			
		||||
  IN CONST  EFI_HII_PACKAGE_LIST_HEADER *PackageList,
 | 
			
		||||
  IN        EFI_HANDLE                  DriverHandle, OPTIONAL
 | 
			
		||||
  IN        EFI_HANDLE                  DriverHandle  OPTIONAL,
 | 
			
		||||
  OUT       EFI_HII_HANDLE               *Handle
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -137,8 +132,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_HII_DATABASE_REMOVE_PACK)(
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL *This,
 | 
			
		||||
  IN        EFI_HII_HANDLE             Handle
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -186,8 +180,7 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL   *This,
 | 
			
		||||
  IN        EFI_HII_HANDLE               Handle,
 | 
			
		||||
  IN CONST  EFI_HII_PACKAGE_LIST_HEADER *PackageList
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -240,7 +233,7 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_GUID                  *PackageGuid,
 | 
			
		||||
  IN OUT    UINTN                     *HandleBufferLength,
 | 
			
		||||
  OUT       EFI_HII_HANDLE            *Handle
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -290,8 +283,7 @@ EFI_STATUS
 | 
			
		||||
  IN        EFI_HII_HANDLE                 Handle,
 | 
			
		||||
  IN OUT    UINTN                          *BufferSize,
 | 
			
		||||
  OUT       EFI_HII_PACKAGE_LIST_HEADER    *Buffer
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -353,8 +345,7 @@ EFI_STATUS
 | 
			
		||||
  IN        EFI_HII_DATABASE_NOTIFY       PackageNotifyFn,
 | 
			
		||||
  IN        EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
 | 
			
		||||
  OUT       EFI_HANDLE                    *NotifyHandle
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -376,8 +367,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY)(
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL *This,
 | 
			
		||||
  IN        EFI_HANDLE                NotificationHandle
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -417,8 +407,7 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL *This,
 | 
			
		||||
  IN OUT    UINT16                    *KeyGuidBufferLength,
 | 
			
		||||
  OUT       EFI_GUID                  *KeyGuidBuffer
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -453,7 +442,7 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_GUID                  *KeyGuid,
 | 
			
		||||
  IN OUT UINT16                       *KeyboardLayoutLength,
 | 
			
		||||
  OUT       EFI_HII_KEYBOARD_LAYOUT   *KeyboardLayout
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -480,7 +469,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT)(
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL *This,
 | 
			
		||||
  IN CONST  EFI_GUID                  *KeyGuid
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -507,27 +496,25 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_HII_DATABASE_PROTOCOL *This,
 | 
			
		||||
  IN        EFI_HII_HANDLE             PackageListHandle,
 | 
			
		||||
  OUT       EFI_HANDLE                *DriverHandle
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Database manager for HII-related data structures.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_HII_DATABASE_PROTOCOL {
 | 
			
		||||
  EFI_HII_DATABASE_NEW_PACK           NewPackageList;
 | 
			
		||||
  EFI_HII_DATABASE_REMOVE_PACK        RemovePackageList;
 | 
			
		||||
  EFI_HII_DATABASE_UPDATE_PACK        UpdatePackageList;
 | 
			
		||||
  EFI_HII_DATABASE_LIST_PACKS         ListPackageLists;
 | 
			
		||||
  EFI_HII_DATABASE_EXPORT_PACKS       ExportPackageLists;
 | 
			
		||||
  EFI_HII_DATABASE_REGISTER_NOTIFY    RegisterPackageNotify;
 | 
			
		||||
  EFI_HII_DATABASE_UNREGISTER_NOTIFY  UnregisterPackageNotify;
 | 
			
		||||
  EFI_HII_FIND_KEYBOARD_LAYOUTS       FindKeyboardLayouts;
 | 
			
		||||
  EFI_HII_GET_KEYBOARD_LAYOUT         GetKeyboardLayout;
 | 
			
		||||
  EFI_HII_SET_KEYBOARD_LAYOUT         SetKeyboardLayout;
 | 
			
		||||
  EFI_HII_DATABASE_GET_PACK_HANDLE    GetPackageListHandle;
 | 
			
		||||
  EFI_HII_DATABASE_NEW_PACK             NewPackageList;
 | 
			
		||||
  EFI_HII_DATABASE_REMOVE_PACK          RemovePackageList;
 | 
			
		||||
  EFI_HII_DATABASE_UPDATE_PACK          UpdatePackageList;
 | 
			
		||||
  EFI_HII_DATABASE_LIST_PACKS           ListPackageLists;
 | 
			
		||||
  EFI_HII_DATABASE_EXPORT_PACKS         ExportPackageLists;
 | 
			
		||||
  EFI_HII_DATABASE_REGISTER_NOTIFY      RegisterPackageNotify;
 | 
			
		||||
  EFI_HII_DATABASE_UNREGISTER_NOTIFY    UnregisterPackageNotify;
 | 
			
		||||
  EFI_HII_FIND_KEYBOARD_LAYOUTS         FindKeyboardLayouts;
 | 
			
		||||
  EFI_HII_GET_KEYBOARD_LAYOUT           GetKeyboardLayout;
 | 
			
		||||
  EFI_HII_SET_KEYBOARD_LAYOUT           SetKeyboardLayout;
 | 
			
		||||
  EFI_HII_DATABASE_GET_PACK_HANDLE      GetPackageListHandle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiHiiDatabaseProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiDatabaseProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,21 +1,18 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  The file provides services to retrieve font information.
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
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.
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.1.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __HII_FONT_H__
 | 
			
		||||
#define __HII_FONT_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/GraphicsOutput.h>
 | 
			
		||||
#include <ipxe/efi/Protocol/HiiImage.h>
 | 
			
		||||
@ -25,21 +22,21 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef VOID    *EFI_FONT_HANDLE;
 | 
			
		||||
typedef VOID *EFI_FONT_HANDLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_HII_OUT_FLAGS.
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_HII_OUT_FLAGS;
 | 
			
		||||
typedef UINT32 EFI_HII_OUT_FLAGS;
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_OUT_FLAG_CLIP         0x00000001
 | 
			
		||||
#define EFI_HII_OUT_FLAG_WRAP         0x00000002
 | 
			
		||||
#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004
 | 
			
		||||
#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008
 | 
			
		||||
#define EFI_HII_OUT_FLAG_TRANSPARENT  0x00000010
 | 
			
		||||
#define EFI_HII_IGNORE_IF_NO_GLYPH    0x00000020
 | 
			
		||||
#define EFI_HII_IGNORE_LINE_BREAK     0x00000040
 | 
			
		||||
#define EFI_HII_DIRECT_TO_SCREEN      0x00000080
 | 
			
		||||
#define EFI_HII_OUT_FLAG_CLIP          0x00000001
 | 
			
		||||
#define EFI_HII_OUT_FLAG_WRAP          0x00000002
 | 
			
		||||
#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y  0x00000004
 | 
			
		||||
#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X  0x00000008
 | 
			
		||||
#define EFI_HII_OUT_FLAG_TRANSPARENT   0x00000010
 | 
			
		||||
#define EFI_HII_IGNORE_IF_NO_GLYPH     0x00000020
 | 
			
		||||
#define EFI_HII_IGNORE_LINE_BREAK      0x00000040
 | 
			
		||||
#define EFI_HII_DIRECT_TO_SCREEN       0x00000080
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Definition of EFI_HII_ROW_INFO.
 | 
			
		||||
@ -48,26 +45,26 @@ typedef struct _EFI_HII_ROW_INFO {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The index of the first character in the string which is displayed on the line.
 | 
			
		||||
  ///
 | 
			
		||||
  UINTN   StartIndex;
 | 
			
		||||
  UINTN    StartIndex;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The index of the last character in the string which is displayed on the line.
 | 
			
		||||
  /// If this is the same as StartIndex, then no characters are displayed.
 | 
			
		||||
  ///
 | 
			
		||||
  UINTN   EndIndex;
 | 
			
		||||
  UINTN   LineHeight; ///< The height of the line, in pixels.
 | 
			
		||||
  UINTN   LineWidth;  ///< The width of the text on the line, in pixels.
 | 
			
		||||
  UINTN    EndIndex;
 | 
			
		||||
  UINTN    LineHeight; ///< The height of the line, in pixels.
 | 
			
		||||
  UINTN    LineWidth;  ///< The width of the text on the line, in pixels.
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The font baseline offset in pixels from the bottom of the row, or 0 if none.
 | 
			
		||||
  ///
 | 
			
		||||
  UINTN   BaselineOffset;
 | 
			
		||||
  UINTN    BaselineOffset;
 | 
			
		||||
} EFI_HII_ROW_INFO;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Font info flag. All flags (FONT, SIZE, STYLE, and COLOR) are defined.
 | 
			
		||||
/// They are defined as EFI_FONT_INFO_***
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_FONT_INFO_MASK;
 | 
			
		||||
typedef UINT32 EFI_FONT_INFO_MASK;
 | 
			
		||||
 | 
			
		||||
#define EFI_FONT_INFO_SYS_FONT        0x00000001
 | 
			
		||||
#define EFI_FONT_INFO_SYS_SIZE        0x00000002
 | 
			
		||||
@ -84,9 +81,9 @@ typedef UINT32  EFI_FONT_INFO_MASK;
 | 
			
		||||
// EFI_FONT_INFO
 | 
			
		||||
//
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_HII_FONT_STYLE FontStyle;
 | 
			
		||||
  UINT16             FontSize;      ///< character cell height in pixels
 | 
			
		||||
  CHAR16             FontName[1];
 | 
			
		||||
  EFI_HII_FONT_STYLE    FontStyle;
 | 
			
		||||
  UINT16                FontSize;   ///< character cell height in pixels
 | 
			
		||||
  CHAR16                FontName[1];
 | 
			
		||||
} EFI_FONT_INFO;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -102,10 +99,10 @@ typedef struct {
 | 
			
		||||
  font requested and the font available.
 | 
			
		||||
**/
 | 
			
		||||
typedef struct _EFI_FONT_DISPLAY_INFO {
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;
 | 
			
		||||
  EFI_FONT_INFO_MASK            FontInfoMask;
 | 
			
		||||
  EFI_FONT_INFO                 FontInfo;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL    ForegroundColor;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL    BackgroundColor;
 | 
			
		||||
  EFI_FONT_INFO_MASK               FontInfoMask;
 | 
			
		||||
  EFI_FONT_INFO                    FontInfo;
 | 
			
		||||
} EFI_FONT_DISPLAY_INFO;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -225,9 +222,7 @@ EFI_STATUS
 | 
			
		||||
  OUT       EFI_HII_ROW_INFO      **RowInfoArray OPTIONAL,
 | 
			
		||||
  OUT       UINTN                 *RowInfoArraySize OPTIONAL,
 | 
			
		||||
  OUT       UINTN                 *ColumnInfoArray OPTIONAL
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -363,8 +358,7 @@ EFI_STATUS
 | 
			
		||||
  OUT       EFI_HII_ROW_INFO      **RowInfoArray    OPTIONAL,
 | 
			
		||||
  OUT       UINTN                 *RowInfoArraySize OPTIONAL,
 | 
			
		||||
  OUT       UINTN                 *ColumnInfoArray  OPTIONAL
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -408,7 +402,7 @@ EFI_STATUS
 | 
			
		||||
  IN CONST  EFI_FONT_DISPLAY_INFO *StringInfo,
 | 
			
		||||
  OUT       EFI_IMAGE_OUTPUT      **Blt,
 | 
			
		||||
  OUT       UINTN                 *Baseline OPTIONAL
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -452,23 +446,21 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_HII_GET_FONT_INFO)(
 | 
			
		||||
  IN CONST  EFI_HII_FONT_PROTOCOL *This,
 | 
			
		||||
  IN OUT    EFI_FONT_HANDLE       *FontHandle,
 | 
			
		||||
  IN CONST  EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
 | 
			
		||||
  IN CONST  EFI_FONT_DISPLAY_INFO *StringInfoIn  OPTIONAL,
 | 
			
		||||
  OUT       EFI_FONT_DISPLAY_INFO **StringInfoOut,
 | 
			
		||||
  IN CONST  EFI_STRING            String OPTIONAL
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The protocol provides the service to retrieve the font informations.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_HII_FONT_PROTOCOL {
 | 
			
		||||
  EFI_HII_STRING_TO_IMAGE     StringToImage;
 | 
			
		||||
  EFI_HII_STRING_ID_TO_IMAGE  StringIdToImage;
 | 
			
		||||
  EFI_HII_GET_GLYPH           GetGlyph;
 | 
			
		||||
  EFI_HII_GET_FONT_INFO       GetFontInfo;
 | 
			
		||||
  EFI_HII_STRING_TO_IMAGE       StringToImage;
 | 
			
		||||
  EFI_HII_STRING_ID_TO_IMAGE    StringIdToImage;
 | 
			
		||||
  EFI_HII_GET_GLYPH             GetGlyph;
 | 
			
		||||
  EFI_HII_GET_FONT_INFO         GetFontInfo;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiHiiFontProtocolGuid;
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID  gEfiHiiFontProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,21 +1,18 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  The file provides services to access to images in the images database.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
  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>
 | 
			
		||||
  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.
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol was introduced in UEFI Specification 2.1.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __HII_IMAGE_H__
 | 
			
		||||
#define __HII_IMAGE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/GraphicsOutput.h>
 | 
			
		||||
 | 
			
		||||
@ -24,11 +21,10 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Flags in EFI_IMAGE_INPUT
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_TRANSPARENT 0x00000001
 | 
			
		||||
#define EFI_IMAGE_TRANSPARENT  0x00000001
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -49,13 +45,12 @@ typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef struct _EFI_IMAGE_INPUT {
 | 
			
		||||
  UINT32                          Flags;
 | 
			
		||||
  UINT16                          Width;
 | 
			
		||||
  UINT16                          Height;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL   *Bitmap;
 | 
			
		||||
  UINT32                           Flags;
 | 
			
		||||
  UINT16                           Width;
 | 
			
		||||
  UINT16                           Height;
 | 
			
		||||
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Bitmap;
 | 
			
		||||
} EFI_IMAGE_INPUT;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
  This function adds the image Image to the group of images
 | 
			
		||||
@ -88,7 +83,7 @@ EFI_STATUS
 | 
			
		||||
  IN        EFI_HII_HANDLE          PackageList,
 | 
			
		||||
  OUT       EFI_IMAGE_ID            *ImageId,
 | 
			
		||||
  IN CONST  EFI_IMAGE_INPUT         *Image
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -130,7 +125,7 @@ EFI_STATUS
 | 
			
		||||
  IN        EFI_HII_HANDLE          PackageList,
 | 
			
		||||
  IN        EFI_IMAGE_ID            ImageId,
 | 
			
		||||
  OUT       EFI_IMAGE_INPUT         *Image
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -161,14 +156,13 @@ EFI_STATUS
 | 
			
		||||
  IN        EFI_HII_HANDLE          PackageList,
 | 
			
		||||
  IN        EFI_IMAGE_ID            ImageId,
 | 
			
		||||
  IN CONST  EFI_IMAGE_INPUT         *Image
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_HII_DRAW_FLAGS describes how the image is to be drawn.
 | 
			
		||||
/// These flags are defined as EFI_HII_DRAW_FLAG_***
 | 
			
		||||
///
 | 
			
		||||
typedef UINT32  EFI_HII_DRAW_FLAGS;
 | 
			
		||||
typedef UINT32 EFI_HII_DRAW_FLAGS;
 | 
			
		||||
 | 
			
		||||
#define EFI_HII_DRAW_FLAG_CLIP          0x00000001
 | 
			
		||||
#define EFI_HII_DRAW_FLAG_TRANSPARENT   0x00000030
 | 
			
		||||
@ -193,15 +187,14 @@ typedef UINT32  EFI_HII_DRAW_FLAGS;
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef struct _EFI_IMAGE_OUTPUT {
 | 
			
		||||
  UINT16  Width;
 | 
			
		||||
  UINT16  Height;
 | 
			
		||||
  UINT16    Width;
 | 
			
		||||
  UINT16    Height;
 | 
			
		||||
  union {
 | 
			
		||||
    EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap;
 | 
			
		||||
    EFI_GRAPHICS_OUTPUT_PROTOCOL  *Screen;
 | 
			
		||||
    EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Bitmap;
 | 
			
		||||
    EFI_GRAPHICS_OUTPUT_PROTOCOL     *Screen;
 | 
			
		||||
  } Image;
 | 
			
		||||
} EFI_IMAGE_OUTPUT;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
  This function renders an image to a bitmap or the screen using
 | 
			
		||||
@ -258,7 +251,7 @@ EFI_STATUS
 | 
			
		||||
  IN OUT    EFI_IMAGE_OUTPUT        **Blt,
 | 
			
		||||
  IN        UINTN                   BltX,
 | 
			
		||||
  IN        UINTN                   BltY
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 | 
			
		||||
@ -330,29 +323,26 @@ EFI_STATUS
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_HII_DRAW_IMAGE_ID)(
 | 
			
		||||
IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,
 | 
			
		||||
IN        EFI_HII_DRAW_FLAGS      Flags,
 | 
			
		||||
IN        EFI_HII_HANDLE          PackageList,
 | 
			
		||||
IN        EFI_IMAGE_ID            ImageId,
 | 
			
		||||
IN OUT    EFI_IMAGE_OUTPUT        **Blt,
 | 
			
		||||
IN        UINTN                   BltX,
 | 
			
		||||
IN        UINTN                   BltY
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,
 | 
			
		||||
  IN        EFI_HII_DRAW_FLAGS      Flags,
 | 
			
		||||
  IN        EFI_HII_HANDLE          PackageList,
 | 
			
		||||
  IN        EFI_IMAGE_ID            ImageId,
 | 
			
		||||
  IN OUT    EFI_IMAGE_OUTPUT        **Blt,
 | 
			
		||||
  IN        UINTN                   BltX,
 | 
			
		||||
  IN        UINTN                   BltY
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Services to access to images in the images database.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_HII_IMAGE_PROTOCOL {
 | 
			
		||||
  EFI_HII_NEW_IMAGE     NewImage;
 | 
			
		||||
  EFI_HII_GET_IMAGE     GetImage;
 | 
			
		||||
  EFI_HII_SET_IMAGE     SetImage;
 | 
			
		||||
  EFI_HII_DRAW_IMAGE    DrawImage;
 | 
			
		||||
  EFI_HII_DRAW_IMAGE_ID DrawImageId;
 | 
			
		||||
  EFI_HII_NEW_IMAGE        NewImage;
 | 
			
		||||
  EFI_HII_GET_IMAGE        GetImage;
 | 
			
		||||
  EFI_HII_SET_IMAGE        SetImage;
 | 
			
		||||
  EFI_HII_DRAW_IMAGE       DrawImage;
 | 
			
		||||
  EFI_HII_DRAW_IMAGE_ID    DrawImageId;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiHiiImageProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiHiiImageProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -10,14 +10,8 @@
 | 
			
		||||
  Protocol (ICMP) and may include support for the Internet Group Management
 | 
			
		||||
  Protocol (IGMP).
 | 
			
		||||
 | 
			
		||||
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 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:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.0.
 | 
			
		||||
@ -27,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_IP4_PROTOCOL_H__
 | 
			
		||||
#define __EFI_IP4_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/ManagedNetwork.h>
 | 
			
		||||
 | 
			
		||||
@ -48,9 +42,9 @@ typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL;
 | 
			
		||||
/// The definition in here is only present to provide backwards compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_HANDLE              InstanceHandle;
 | 
			
		||||
  EFI_IPv4_ADDRESS        Ip4Address;
 | 
			
		||||
  EFI_IPv4_ADDRESS        SubnetMask;
 | 
			
		||||
  EFI_HANDLE          InstanceHandle;
 | 
			
		||||
  EFI_IPv4_ADDRESS    Ip4Address;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
} EFI_IP4_ADDRESS_PAIR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -68,182 +62,178 @@ typedef struct {
 | 
			
		||||
  /// The default IPv4 protocol packets to send and receive. Ignored
 | 
			
		||||
  /// when AcceptPromiscuous is TRUE.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   DefaultProtocol;
 | 
			
		||||
  UINT8               DefaultProtocol;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE to receive all IPv4 packets that get through the receive filters.
 | 
			
		||||
  /// Set to FALSE to receive only the DefaultProtocol IPv4
 | 
			
		||||
  /// packets that get through the receive filters.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 AcceptAnyProtocol;
 | 
			
		||||
  BOOLEAN             AcceptAnyProtocol;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE to receive ICMP error report packets. Ignored when
 | 
			
		||||
  /// AcceptPromiscuous or AcceptAnyProtocol is TRUE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 AcceptIcmpErrors;
 | 
			
		||||
  BOOLEAN             AcceptIcmpErrors;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE to receive broadcast IPv4 packets. Ignored when
 | 
			
		||||
  /// AcceptPromiscuous is TRUE.
 | 
			
		||||
  /// Set to FALSE to stop receiving broadcast IPv4 packets.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 AcceptBroadcast;
 | 
			
		||||
  BOOLEAN             AcceptBroadcast;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE to receive all IPv4 packets that are sent to any
 | 
			
		||||
  /// hardware address or any protocol address.
 | 
			
		||||
  /// Set to FALSE to stop receiving all promiscuous IPv4 packets
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 AcceptPromiscuous;
 | 
			
		||||
  BOOLEAN             AcceptPromiscuous;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE to use the default IPv4 address and default routing table.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 UseDefaultAddress;
 | 
			
		||||
  BOOLEAN             UseDefaultAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The station IPv4 address that will be assigned to this EFI IPv4Protocol instance.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS        StationAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    StationAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The subnet address mask that is associated with the station address.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS        SubnetMask;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TypeOfService field in transmitted IPv4 packets.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   TypeOfService;
 | 
			
		||||
  UINT8               TypeOfService;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TimeToLive field in transmitted IPv4 packets.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                   TimeToLive;
 | 
			
		||||
  UINT8               TimeToLive;
 | 
			
		||||
  ///
 | 
			
		||||
  /// State of the DoNotFragment bit in transmitted IPv4 packets.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 DoNotFragment;
 | 
			
		||||
  BOOLEAN             DoNotFragment;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE to send and receive unformatted packets. The other
 | 
			
		||||
  /// IPv4 receive filters are still applied. Fragmentation is disabled for RawData mode.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 RawData;
 | 
			
		||||
  BOOLEAN             RawData;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The timer timeout value (number of microseconds) for the
 | 
			
		||||
  /// receive timeout event to be associated with each assembled
 | 
			
		||||
  /// packet. Zero means do not drop assembled packets.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  ReceiveTimeout;
 | 
			
		||||
  UINT32              ReceiveTimeout;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The timer timeout value (number of microseconds) for the
 | 
			
		||||
  /// transmit timeout event to be associated with each outgoing
 | 
			
		||||
  /// packet. Zero means do not drop outgoing packets.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  TransmitTimeout;
 | 
			
		||||
  UINT32              TransmitTimeout;
 | 
			
		||||
} EFI_IP4_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IPv4_ADDRESS        SubnetAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS        SubnetMask;
 | 
			
		||||
  EFI_IPv4_ADDRESS        GatewayAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
  EFI_IPv4_ADDRESS    GatewayAddress;
 | 
			
		||||
} EFI_IP4_ROUTE_TABLE;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8                   Type;
 | 
			
		||||
  UINT8                   Code;
 | 
			
		||||
  UINT8    Type;
 | 
			
		||||
  UINT8    Code;
 | 
			
		||||
} EFI_IP4_ICMP_TYPE;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE after this EFI IPv4 Protocol instance has been successfully configured.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 IsStarted;
 | 
			
		||||
  BOOLEAN                IsStarted;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  MaxPacketSize;
 | 
			
		||||
  UINT32                 MaxPacketSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Current configuration settings.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IP4_CONFIG_DATA     ConfigData;
 | 
			
		||||
  EFI_IP4_CONFIG_DATA    ConfigData;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Set to TRUE when the EFI IPv4 Protocol instance has a station address and subnet mask.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN                 IsConfigured;
 | 
			
		||||
  BOOLEAN                IsConfigured;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of joined multicast groups.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  GroupCount;
 | 
			
		||||
  UINT32                 GroupCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// List of joined multicast group addresses.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS        *GroupTable;
 | 
			
		||||
  EFI_IPv4_ADDRESS       *GroupTable;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of entries in the routing table.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  RouteCount;
 | 
			
		||||
  UINT32                 RouteCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Routing table entries.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IP4_ROUTE_TABLE     *RouteTable;
 | 
			
		||||
  EFI_IP4_ROUTE_TABLE    *RouteTable;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of entries in the supported ICMP types list.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                  IcmpTypeCount;
 | 
			
		||||
  UINT32                 IcmpTypeCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Array of ICMP types and codes that are supported by this EFI IPv4 Protocol driver
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IP4_ICMP_TYPE       *IcmpTypeList;
 | 
			
		||||
  EFI_IP4_ICMP_TYPE      *IcmpTypeList;
 | 
			
		||||
} EFI_IP4_MODE_DATA;
 | 
			
		||||
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8                   HeaderLength:4;
 | 
			
		||||
  UINT8                   Version:4;
 | 
			
		||||
  UINT8                   TypeOfService;
 | 
			
		||||
  UINT16                  TotalLength;
 | 
			
		||||
  UINT16                  Identification;
 | 
			
		||||
  UINT16                  Fragmentation;
 | 
			
		||||
  UINT8                   TimeToLive;
 | 
			
		||||
  UINT8                   Protocol;
 | 
			
		||||
  UINT16                  Checksum;
 | 
			
		||||
  EFI_IPv4_ADDRESS        SourceAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS        DestinationAddress;
 | 
			
		||||
  UINT8               HeaderLength : 4;
 | 
			
		||||
  UINT8               Version      : 4;
 | 
			
		||||
  UINT8               TypeOfService;
 | 
			
		||||
  UINT16              TotalLength;
 | 
			
		||||
  UINT16              Identification;
 | 
			
		||||
  UINT16              Fragmentation;
 | 
			
		||||
  UINT8               TimeToLive;
 | 
			
		||||
  UINT8               Protocol;
 | 
			
		||||
  UINT16              Checksum;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SourceAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    DestinationAddress;
 | 
			
		||||
} EFI_IP4_HEADER;
 | 
			
		||||
#pragma pack()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32                  FragmentLength;
 | 
			
		||||
  VOID                    *FragmentBuffer;
 | 
			
		||||
  UINT32    FragmentLength;
 | 
			
		||||
  VOID      *FragmentBuffer;
 | 
			
		||||
} EFI_IP4_FRAGMENT_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_TIME               TimeStamp;
 | 
			
		||||
  EFI_EVENT              RecycleSignal;
 | 
			
		||||
  UINT32                 HeaderLength;
 | 
			
		||||
  EFI_IP4_HEADER         *Header;
 | 
			
		||||
  UINT32                 OptionsLength;
 | 
			
		||||
  VOID                   *Options;
 | 
			
		||||
  UINT32                 DataLength;
 | 
			
		||||
  UINT32                 FragmentCount;
 | 
			
		||||
  EFI_IP4_FRAGMENT_DATA  FragmentTable[1];
 | 
			
		||||
  EFI_TIME                 TimeStamp;
 | 
			
		||||
  EFI_EVENT                RecycleSignal;
 | 
			
		||||
  UINT32                   HeaderLength;
 | 
			
		||||
  EFI_IP4_HEADER           *Header;
 | 
			
		||||
  UINT32                   OptionsLength;
 | 
			
		||||
  VOID                     *Options;
 | 
			
		||||
  UINT32                   DataLength;
 | 
			
		||||
  UINT32                   FragmentCount;
 | 
			
		||||
  EFI_IP4_FRAGMENT_DATA    FragmentTable[1];
 | 
			
		||||
} EFI_IP4_RECEIVE_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IPv4_ADDRESS       SourceAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS       GatewayAddress;
 | 
			
		||||
  UINT8                  Protocol;
 | 
			
		||||
  UINT8                  TypeOfService;
 | 
			
		||||
  UINT8                  TimeToLive;
 | 
			
		||||
  BOOLEAN                DoNotFragment;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SourceAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    GatewayAddress;
 | 
			
		||||
  UINT8               Protocol;
 | 
			
		||||
  UINT8               TypeOfService;
 | 
			
		||||
  UINT8               TimeToLive;
 | 
			
		||||
  BOOLEAN             DoNotFragment;
 | 
			
		||||
} EFI_IP4_OVERRIDE_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IPv4_ADDRESS       DestinationAddress;
 | 
			
		||||
  EFI_IP4_OVERRIDE_DATA  *OverrideData;      //OPTIONAL
 | 
			
		||||
  UINT32                 OptionsLength;      //OPTIONAL
 | 
			
		||||
  VOID                   *OptionsBuffer;     //OPTIONAL
 | 
			
		||||
  UINT32                 TotalDataLength;
 | 
			
		||||
  UINT32                 FragmentCount;
 | 
			
		||||
  EFI_IP4_FRAGMENT_DATA  FragmentTable[1];
 | 
			
		||||
  EFI_IPv4_ADDRESS         DestinationAddress;
 | 
			
		||||
  EFI_IP4_OVERRIDE_DATA    *OverrideData;    // OPTIONAL
 | 
			
		||||
  UINT32                   OptionsLength;    // OPTIONAL
 | 
			
		||||
  VOID                     *OptionsBuffer;   // OPTIONAL
 | 
			
		||||
  UINT32                   TotalDataLength;
 | 
			
		||||
  UINT32                   FragmentCount;
 | 
			
		||||
  EFI_IP4_FRAGMENT_DATA    FragmentTable[1];
 | 
			
		||||
} EFI_IP4_TRANSMIT_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -253,21 +243,21 @@ typedef struct {
 | 
			
		||||
  /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
 | 
			
		||||
  /// Event must be lower than or equal to TPL_CALLBACK.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                Event;
 | 
			
		||||
  EFI_EVENT     Event;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The status that is returned to the caller at the end of the operation
 | 
			
		||||
  /// to indicate whether this operation completed successfully.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_STATUS               Status;
 | 
			
		||||
  EFI_STATUS    Status;
 | 
			
		||||
  union {
 | 
			
		||||
    ///
 | 
			
		||||
    /// When this token is used for receiving, RxData is a pointer to the EFI_IP4_RECEIVE_DATA.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_IP4_RECEIVE_DATA   *RxData;
 | 
			
		||||
    EFI_IP4_RECEIVE_DATA     *RxData;
 | 
			
		||||
    ///
 | 
			
		||||
    /// When this token is used for transmitting, TxData is a pointer to the EFI_IP4_TRANSMIT_DATA.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_IP4_TRANSMIT_DATA  *TxData;
 | 
			
		||||
    EFI_IP4_TRANSMIT_DATA    *TxData;
 | 
			
		||||
  } Packet;
 | 
			
		||||
} EFI_IP4_COMPLETION_TOKEN;
 | 
			
		||||
 | 
			
		||||
@ -598,17 +588,17 @@ EFI_STATUS
 | 
			
		||||
/// used by drivers, daemons, and applications to transmit and receive network packets.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_IP4_PROTOCOL {
 | 
			
		||||
  EFI_IP4_GET_MODE_DATA        GetModeData;
 | 
			
		||||
  EFI_IP4_CONFIGURE            Configure;
 | 
			
		||||
  EFI_IP4_GROUPS               Groups;
 | 
			
		||||
  EFI_IP4_ROUTES               Routes;
 | 
			
		||||
  EFI_IP4_TRANSMIT             Transmit;
 | 
			
		||||
  EFI_IP4_RECEIVE              Receive;
 | 
			
		||||
  EFI_IP4_CANCEL               Cancel;
 | 
			
		||||
  EFI_IP4_POLL                 Poll;
 | 
			
		||||
  EFI_IP4_GET_MODE_DATA    GetModeData;
 | 
			
		||||
  EFI_IP4_CONFIGURE        Configure;
 | 
			
		||||
  EFI_IP4_GROUPS           Groups;
 | 
			
		||||
  EFI_IP4_ROUTES           Routes;
 | 
			
		||||
  EFI_IP4_TRANSMIT         Transmit;
 | 
			
		||||
  EFI_IP4_RECEIVE          Receive;
 | 
			
		||||
  EFI_IP4_CANCEL           Cancel;
 | 
			
		||||
  EFI_IP4_POLL             Poll;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiIp4ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiIp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiIp4ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,23 +2,18 @@
 | 
			
		||||
  This file provides a definition of the EFI IPv4 Configuration
 | 
			
		||||
  Protocol.
 | 
			
		||||
 | 
			
		||||
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 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:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.0.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __EFI_IP4CONFIG_PROTOCOL_H__
 | 
			
		||||
#define __EFI_IP4CONFIG_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/Ip4.h>
 | 
			
		||||
 | 
			
		||||
@ -44,23 +39,22 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Default station IP address, stored in network byte order.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS             StationAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS       StationAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Default subnet mask, stored in network byte order.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IPv4_ADDRESS             SubnetMask;
 | 
			
		||||
  EFI_IPv4_ADDRESS       SubnetMask;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of entries in the following RouteTable. May be zero.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                       RouteTableSize;
 | 
			
		||||
  UINT32                 RouteTableSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Default routing table data (stored in network byte order).
 | 
			
		||||
  /// Ignored if RouteTableSize is zero.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_IP4_ROUTE_TABLE          *RouteTable;
 | 
			
		||||
  EFI_IP4_ROUTE_TABLE    *RouteTable;
 | 
			
		||||
} EFI_IP4_IPCONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Starts running the configuration policy for the EFI IPv4 Protocol driver.
 | 
			
		||||
 | 
			
		||||
@ -174,11 +168,11 @@ EFI_STATUS
 | 
			
		||||
/// configurations for the EFI IPv4 Protocol driver.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_IP4_CONFIG_PROTOCOL {
 | 
			
		||||
  EFI_IP4_CONFIG_START         Start;
 | 
			
		||||
  EFI_IP4_CONFIG_STOP          Stop;
 | 
			
		||||
  EFI_IP4_CONFIG_GET_DATA      GetData;
 | 
			
		||||
  EFI_IP4_CONFIG_START       Start;
 | 
			
		||||
  EFI_IP4_CONFIG_STOP        Stop;
 | 
			
		||||
  EFI_IP4_CONFIG_GET_DATA    GetData;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiIp4ConfigProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiIp4ConfigProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -7,21 +7,15 @@
 | 
			
		||||
 | 
			
		||||
  UEFI 2.0 can boot from any device that produces a LoadFile protocol.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __EFI_LOAD_FILE_PROTOCOL_H__
 | 
			
		||||
#define __EFI_LOAD_FILE_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_LOAD_FILE_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -31,14 +25,14 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// Protocol Guid defined by EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID
 | 
			
		||||
#define LOAD_FILE_PROTOCOL  EFI_LOAD_FILE_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Backward-compatible with EFI1.1
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_LOAD_FILE_PROTOCOL  EFI_LOAD_FILE_INTERFACE;
 | 
			
		||||
typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Causes the driver to load a specified file.
 | 
			
		||||
@ -82,9 +76,9 @@ EFI_STATUS
 | 
			
		||||
/// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_LOAD_FILE_PROTOCOL {
 | 
			
		||||
  EFI_LOAD_FILE LoadFile;
 | 
			
		||||
  EFI_LOAD_FILE    LoadFile;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiLoadFileProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiLoadFileProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -7,21 +7,15 @@
 | 
			
		||||
 | 
			
		||||
  UEFI 2.0 can boot from any device that produces a LoadFile protocol.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __EFI_LOAD_FILE2_PROTOCOL_H__
 | 
			
		||||
#define __EFI_LOAD_FILE2_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_LOAD_FILE2_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -31,11 +25,10 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// Protocol Guid defined by UEFI2.1.
 | 
			
		||||
///
 | 
			
		||||
#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID
 | 
			
		||||
#define LOAD_FILE2_PROTOCOL  EFI_LOAD_FILE2_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Causes the driver to load a specified file.
 | 
			
		||||
 | 
			
		||||
@ -79,9 +72,9 @@ EFI_STATUS
 | 
			
		||||
/// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_LOAD_FILE2_PROTOCOL {
 | 
			
		||||
  EFI_LOAD_FILE2 LoadFile;
 | 
			
		||||
  EFI_LOAD_FILE2    LoadFile;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiLoadFile2ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiLoadFile2ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,21 +4,15 @@
 | 
			
		||||
  Every EFI driver and application is passed an image handle when it is loaded.
 | 
			
		||||
  This image handle will contain a Loaded Image Protocol.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __LOADED_IMAGE_PROTOCOL_H__
 | 
			
		||||
#define __LOADED_IMAGE_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -33,7 +27,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define LOADED_IMAGE_PROTOCOL   EFI_LOADED_IMAGE_PROTOCOL_GUID
 | 
			
		||||
#define LOADED_IMAGE_PROTOCOL  EFI_LOADED_IMAGE_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
 | 
			
		||||
@ -43,40 +37,40 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// Revision defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_LOADED_IMAGE_INFORMATION_REVISION    EFI_LOADED_IMAGE_PROTOCOL_REVISION
 | 
			
		||||
#define EFI_LOADED_IMAGE_INFORMATION_REVISION  EFI_LOADED_IMAGE_PROTOCOL_REVISION
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Can be used on any image handle to obtain information about the loaded image.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32            Revision;       ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
 | 
			
		||||
                                    ///< All future revisions will be backward compatible to the current revision.
 | 
			
		||||
  EFI_HANDLE        ParentHandle;   ///< Parent image's image handle. NULL if the image is loaded directly from
 | 
			
		||||
                                    ///< the firmware's boot manager.
 | 
			
		||||
  EFI_SYSTEM_TABLE  *SystemTable;   ///< the image's EFI system table pointer.
 | 
			
		||||
  UINT32                      Revision;     ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
 | 
			
		||||
                                            ///< All future revisions will be backward compatible to the current revision.
 | 
			
		||||
  EFI_HANDLE                  ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from
 | 
			
		||||
                                            ///< the firmware's boot manager.
 | 
			
		||||
  EFI_SYSTEM_TABLE            *SystemTable; ///< the image's EFI system table pointer.
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Source location of image
 | 
			
		||||
  //
 | 
			
		||||
  EFI_HANDLE        DeviceHandle;   ///< The device handle that the EFI Image was loaded from.
 | 
			
		||||
  EFI_DEVICE_PATH_PROTOCOL  *FilePath;  ///< A pointer to the file path portion specific to DeviceHandle
 | 
			
		||||
                                        ///< that the EFI Image was loaded from.
 | 
			
		||||
  VOID              *Reserved;      ///< Reserved. DO NOT USE.
 | 
			
		||||
  EFI_HANDLE                  DeviceHandle; ///< The device handle that the EFI Image was loaded from.
 | 
			
		||||
  EFI_DEVICE_PATH_PROTOCOL    *FilePath;    ///< A pointer to the file path portion specific to DeviceHandle
 | 
			
		||||
                                            ///< that the EFI Image was loaded from.
 | 
			
		||||
  VOID                        *Reserved;    ///< Reserved. DO NOT USE.
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Images load options
 | 
			
		||||
  //
 | 
			
		||||
  UINT32            LoadOptionsSize;///< The size in bytes of LoadOptions.
 | 
			
		||||
  VOID              *LoadOptions;   ///< A pointer to the image's binary load options.
 | 
			
		||||
  UINT32                      LoadOptionsSize; ///< The size in bytes of LoadOptions.
 | 
			
		||||
  VOID                        *LoadOptions;    ///< A pointer to the image's binary load options.
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Location of where image was loaded
 | 
			
		||||
  //
 | 
			
		||||
  VOID              *ImageBase;     ///< The base address at which the image was loaded.
 | 
			
		||||
  UINT64            ImageSize;      ///< The size in bytes of the loaded image.
 | 
			
		||||
  EFI_MEMORY_TYPE   ImageCodeType;  ///< The memory type that the code sections were loaded as.
 | 
			
		||||
  EFI_MEMORY_TYPE   ImageDataType;  ///< The memory type that the data sections were loaded as.
 | 
			
		||||
  EFI_IMAGE_UNLOAD  Unload;
 | 
			
		||||
  VOID                        *ImageBase;    ///< The base address at which the image was loaded.
 | 
			
		||||
  UINT64                      ImageSize;     ///< The size in bytes of the loaded image.
 | 
			
		||||
  EFI_MEMORY_TYPE             ImageCodeType; ///< The memory type that the code sections were loaded as.
 | 
			
		||||
  EFI_MEMORY_TYPE             ImageDataType; ///< The memory type that the data sections were loaded as.
 | 
			
		||||
  EFI_IMAGE_UNLOAD            Unload;
 | 
			
		||||
} EFI_LOADED_IMAGE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -84,7 +78,7 @@ typedef struct {
 | 
			
		||||
//
 | 
			
		||||
typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiLoadedImageProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiLoadedImageProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiLoadedImageDevicePathProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,14 +2,8 @@
 | 
			
		||||
  EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
 | 
			
		||||
  EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.0
 | 
			
		||||
@ -19,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_MANAGED_NETWORK_PROTOCOL_H__
 | 
			
		||||
#define __EFI_MANAGED_NETWORK_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/SimpleNetwork.h>
 | 
			
		||||
 | 
			
		||||
@ -92,38 +86,37 @@ typedef struct {
 | 
			
		||||
} EFI_MANAGED_NETWORK_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_TIME      Timestamp;
 | 
			
		||||
  EFI_EVENT     RecycleEvent;
 | 
			
		||||
  UINT32        PacketLength;
 | 
			
		||||
  UINT32        HeaderLength;
 | 
			
		||||
  UINT32        AddressLength;
 | 
			
		||||
  UINT32        DataLength;
 | 
			
		||||
  BOOLEAN       BroadcastFlag;
 | 
			
		||||
  BOOLEAN       MulticastFlag;
 | 
			
		||||
  BOOLEAN       PromiscuousFlag;
 | 
			
		||||
  UINT16        ProtocolType;
 | 
			
		||||
  VOID          *DestinationAddress;
 | 
			
		||||
  VOID          *SourceAddress;
 | 
			
		||||
  VOID          *MediaHeader;
 | 
			
		||||
  VOID          *PacketData;
 | 
			
		||||
  EFI_TIME     Timestamp;
 | 
			
		||||
  EFI_EVENT    RecycleEvent;
 | 
			
		||||
  UINT32       PacketLength;
 | 
			
		||||
  UINT32       HeaderLength;
 | 
			
		||||
  UINT32       AddressLength;
 | 
			
		||||
  UINT32       DataLength;
 | 
			
		||||
  BOOLEAN      BroadcastFlag;
 | 
			
		||||
  BOOLEAN      MulticastFlag;
 | 
			
		||||
  BOOLEAN      PromiscuousFlag;
 | 
			
		||||
  UINT16       ProtocolType;
 | 
			
		||||
  VOID         *DestinationAddress;
 | 
			
		||||
  VOID         *SourceAddress;
 | 
			
		||||
  VOID         *MediaHeader;
 | 
			
		||||
  VOID         *PacketData;
 | 
			
		||||
} EFI_MANAGED_NETWORK_RECEIVE_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32        FragmentLength;
 | 
			
		||||
  VOID          *FragmentBuffer;
 | 
			
		||||
  UINT32    FragmentLength;
 | 
			
		||||
  VOID      *FragmentBuffer;
 | 
			
		||||
} EFI_MANAGED_NETWORK_FRAGMENT_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_MAC_ADDRESS                   *DestinationAddress; //OPTIONAL
 | 
			
		||||
  EFI_MAC_ADDRESS                   *SourceAddress;      //OPTIONAL
 | 
			
		||||
  UINT16                            ProtocolType;        //OPTIONAL
 | 
			
		||||
  UINT32                            DataLength;
 | 
			
		||||
  UINT16                            HeaderLength;        //OPTIONAL
 | 
			
		||||
  UINT16                            FragmentCount;
 | 
			
		||||
  EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1];
 | 
			
		||||
  EFI_MAC_ADDRESS                      *DestinationAddress; // OPTIONAL
 | 
			
		||||
  EFI_MAC_ADDRESS                      *SourceAddress;      // OPTIONAL
 | 
			
		||||
  UINT16                               ProtocolType;        // OPTIONAL
 | 
			
		||||
  UINT32                               DataLength;
 | 
			
		||||
  UINT16                               HeaderLength;     // OPTIONAL
 | 
			
		||||
  UINT16                               FragmentCount;
 | 
			
		||||
  EFI_MANAGED_NETWORK_FRAGMENT_DATA    FragmentTable[1];
 | 
			
		||||
} EFI_MANAGED_NETWORK_TRANSMIT_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// This Event will be signaled after the Status field is updated
 | 
			
		||||
@ -131,21 +124,21 @@ typedef struct {
 | 
			
		||||
  /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
 | 
			
		||||
  /// Event must be lower than or equal to TPL_CALLBACK.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                             Event;
 | 
			
		||||
  EFI_EVENT     Event;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The status that is returned to the caller at the end of the operation
 | 
			
		||||
  /// to indicate whether this operation completed successfully.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_STATUS                            Status;
 | 
			
		||||
  EFI_STATUS    Status;
 | 
			
		||||
  union {
 | 
			
		||||
    ///
 | 
			
		||||
    /// When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_MANAGED_NETWORK_RECEIVE_DATA    *RxData;
 | 
			
		||||
    EFI_MANAGED_NETWORK_RECEIVE_DATA     *RxData;
 | 
			
		||||
    ///
 | 
			
		||||
    /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_MANAGED_NETWORK_TRANSMIT_DATA   *TxData;
 | 
			
		||||
    EFI_MANAGED_NETWORK_TRANSMIT_DATA    *TxData;
 | 
			
		||||
  } Packet;
 | 
			
		||||
} EFI_MANAGED_NETWORK_COMPLETION_TOKEN;
 | 
			
		||||
 | 
			
		||||
@ -306,7 +299,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Aborts an asynchronous transmit or receive request.
 | 
			
		||||
 | 
			
		||||
@ -358,17 +350,17 @@ EFI_STATUS
 | 
			
		||||
/// perform raw (unformatted) asynchronous network packet I/O.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_MANAGED_NETWORK_PROTOCOL {
 | 
			
		||||
  EFI_MANAGED_NETWORK_GET_MODE_DATA       GetModeData;
 | 
			
		||||
  EFI_MANAGED_NETWORK_CONFIGURE           Configure;
 | 
			
		||||
  EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC     McastIpToMac;
 | 
			
		||||
  EFI_MANAGED_NETWORK_GROUPS              Groups;
 | 
			
		||||
  EFI_MANAGED_NETWORK_TRANSMIT            Transmit;
 | 
			
		||||
  EFI_MANAGED_NETWORK_RECEIVE             Receive;
 | 
			
		||||
  EFI_MANAGED_NETWORK_CANCEL              Cancel;
 | 
			
		||||
  EFI_MANAGED_NETWORK_POLL                Poll;
 | 
			
		||||
  EFI_MANAGED_NETWORK_GET_MODE_DATA      GetModeData;
 | 
			
		||||
  EFI_MANAGED_NETWORK_CONFIGURE          Configure;
 | 
			
		||||
  EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC    McastIpToMac;
 | 
			
		||||
  EFI_MANAGED_NETWORK_GROUPS             Groups;
 | 
			
		||||
  EFI_MANAGED_NETWORK_TRANSMIT           Transmit;
 | 
			
		||||
  EFI_MANAGED_NETWORK_RECEIVE            Receive;
 | 
			
		||||
  EFI_MANAGED_NETWORK_CANCEL             Cancel;
 | 
			
		||||
  EFI_MANAGED_NETWORK_POLL               Poll;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiManagedNetworkProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiManagedNetworkServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiManagedNetworkProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,8 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  EFI Multicast Trivial File Transfer Protocol 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 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.0
 | 
			
		||||
@ -18,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_MTFTP4_PROTOCOL_H__
 | 
			
		||||
#define __EFI_MTFTP4_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -30,21 +24,21 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x78247c57, 0x63db, 0x4708, {0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN;
 | 
			
		||||
typedef struct _EFI_MTFTP4_PROTOCOL  EFI_MTFTP4_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_MTFTP4_TOKEN     EFI_MTFTP4_TOKEN;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
//MTFTP4 packet opcode definition
 | 
			
		||||
// MTFTP4 packet opcode definition
 | 
			
		||||
//
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_RRQ                     1
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_WRQ                     2
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_DATA                    3
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_ACK                     4
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_ERROR                   5
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_OACK                    6
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_DIR                     7
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_DATA8                   8
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_ACK8                    9
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_RRQ    1
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_WRQ    2
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_DATA   3
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_ACK    4
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_ERROR  5
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_OACK   6
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_DIR    7
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_DATA8  8
 | 
			
		||||
#define EFI_MTFTP4_OPCODE_ACK8   9
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// MTFTP4 error code definition
 | 
			
		||||
@ -65,80 +59,80 @@ typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN;
 | 
			
		||||
#pragma pack(1)
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT8                   Filename[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT8     Filename[1];
 | 
			
		||||
} EFI_MTFTP4_REQ_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT8                   Data[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT8     Data[1];
 | 
			
		||||
} EFI_MTFTP4_OACK_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT16                  Block;
 | 
			
		||||
  UINT8                   Data[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT16    Block;
 | 
			
		||||
  UINT8     Data[1];
 | 
			
		||||
} EFI_MTFTP4_DATA_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT16                  Block[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT16    Block[1];
 | 
			
		||||
} EFI_MTFTP4_ACK_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT64                  Block;
 | 
			
		||||
  UINT8                   Data[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT64    Block;
 | 
			
		||||
  UINT8     Data[1];
 | 
			
		||||
} EFI_MTFTP4_DATA8_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT64                  Block[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT64    Block[1];
 | 
			
		||||
} EFI_MTFTP4_ACK8_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT16                  ErrorCode;
 | 
			
		||||
  UINT8                   ErrorMessage[1];
 | 
			
		||||
  UINT16    OpCode;
 | 
			
		||||
  UINT16    ErrorCode;
 | 
			
		||||
  UINT8     ErrorMessage[1];
 | 
			
		||||
} EFI_MTFTP4_ERROR_HEADER;
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Type of packets as defined by the MTFTPv4 packet opcodes.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                  OpCode;
 | 
			
		||||
  UINT16                     OpCode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Read request packet header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_REQ_HEADER   Rrq;
 | 
			
		||||
  EFI_MTFTP4_REQ_HEADER      Rrq;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Write request packet header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_REQ_HEADER   Wrq;
 | 
			
		||||
  EFI_MTFTP4_REQ_HEADER      Wrq;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Option acknowledge packet header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_OACK_HEADER  Oack;
 | 
			
		||||
  EFI_MTFTP4_OACK_HEADER     Oack;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Data packet header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_DATA_HEADER  Data;
 | 
			
		||||
  EFI_MTFTP4_DATA_HEADER     Data;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Acknowledgement packet header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_ACK_HEADER   Ack;
 | 
			
		||||
  EFI_MTFTP4_ACK_HEADER      Ack;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Data packet header with big block number.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_DATA8_HEADER Data8;
 | 
			
		||||
  EFI_MTFTP4_DATA8_HEADER    Data8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Acknowledgement header with big block num.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_ACK8_HEADER  Ack8;
 | 
			
		||||
  EFI_MTFTP4_ACK8_HEADER     Ack8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Error packet header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_ERROR_HEADER Error;
 | 
			
		||||
  EFI_MTFTP4_ERROR_HEADER    Error;
 | 
			
		||||
} EFI_MTFTP4_PACKET;
 | 
			
		||||
 | 
			
		||||
#pragma pack()
 | 
			
		||||
@ -147,39 +141,36 @@ typedef union {
 | 
			
		||||
/// MTFTP4 option definition.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8                   *OptionStr;
 | 
			
		||||
  UINT8                   *ValueStr;
 | 
			
		||||
  UINT8    *OptionStr;
 | 
			
		||||
  UINT8    *ValueStr;
 | 
			
		||||
} EFI_MTFTP4_OPTION;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  BOOLEAN                 UseDefaultSetting;
 | 
			
		||||
  EFI_IPv4_ADDRESS        StationIp;
 | 
			
		||||
  EFI_IPv4_ADDRESS        SubnetMask;
 | 
			
		||||
  UINT16                  LocalPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS        GatewayIp;
 | 
			
		||||
  EFI_IPv4_ADDRESS        ServerIp;
 | 
			
		||||
  UINT16                  InitialServerPort;
 | 
			
		||||
  UINT16                  TryCount;
 | 
			
		||||
  UINT16                  TimeoutValue;
 | 
			
		||||
  BOOLEAN             UseDefaultSetting;
 | 
			
		||||
  EFI_IPv4_ADDRESS    StationIp;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
  UINT16              LocalPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    GatewayIp;
 | 
			
		||||
  EFI_IPv4_ADDRESS    ServerIp;
 | 
			
		||||
  UINT16              InitialServerPort;
 | 
			
		||||
  UINT16              TryCount;
 | 
			
		||||
  UINT16              TimeoutValue;
 | 
			
		||||
} EFI_MTFTP4_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_MTFTP4_CONFIG_DATA  ConfigData;
 | 
			
		||||
  UINT8                   SupportedOptionCount;
 | 
			
		||||
  UINT8                   **SupportedOptoins;
 | 
			
		||||
  UINT8                   UnsupportedOptionCount;
 | 
			
		||||
  UINT8                   **UnsupportedOptoins;
 | 
			
		||||
  EFI_MTFTP4_CONFIG_DATA    ConfigData;
 | 
			
		||||
  UINT8                     SupportedOptionCount;
 | 
			
		||||
  UINT8                     **SupportedOptoins;
 | 
			
		||||
  UINT8                     UnsupportedOptionCount;
 | 
			
		||||
  UINT8                     **UnsupportedOptoins;
 | 
			
		||||
} EFI_MTFTP4_MODE_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IPv4_ADDRESS        GatewayIp;
 | 
			
		||||
  EFI_IPv4_ADDRESS        ServerIp;
 | 
			
		||||
  UINT16                  ServerPort;
 | 
			
		||||
  UINT16                  TryCount;
 | 
			
		||||
  UINT16                  TimeoutValue;
 | 
			
		||||
  EFI_IPv4_ADDRESS    GatewayIp;
 | 
			
		||||
  EFI_IPv4_ADDRESS    ServerIp;
 | 
			
		||||
  UINT16              ServerPort;
 | 
			
		||||
  UINT16              TryCount;
 | 
			
		||||
  UINT16              TimeoutValue;
 | 
			
		||||
} EFI_MTFTP4_OVERRIDE_DATA;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -258,7 +249,6 @@ EFI_STATUS
 | 
			
		||||
  OUT VOID                **Buffer
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
 | 
			
		||||
 | 
			
		||||
@ -277,7 +267,6 @@ EFI_STATUS
 | 
			
		||||
  OUT EFI_MTFTP4_MODE_DATA    *ModeData
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Initializes, changes, or resets the default operational setting for this
 | 
			
		||||
  EFI MTFTPv4 Protocol driver instance.
 | 
			
		||||
@ -307,7 +296,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_MTFTP4_CONFIG_DATA    *MtftpConfigData OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Gets information about a file from an MTFTPv4 server.
 | 
			
		||||
 | 
			
		||||
@ -397,7 +385,6 @@ EFI_STATUS
 | 
			
		||||
  OUT EFI_MTFTP4_OPTION        **OptionList OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Downloads a file from an MTFTPv4 server.
 | 
			
		||||
 | 
			
		||||
@ -428,8 +415,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_MTFTP4_TOKEN          *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Sends a file to an MTFTPv4 server.
 | 
			
		||||
 | 
			
		||||
@ -458,7 +443,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_MTFTP4_TOKEN          *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI
 | 
			
		||||
  implementations.
 | 
			
		||||
@ -530,7 +514,7 @@ struct _EFI_MTFTP4_TOKEN {
 | 
			
		||||
  /// The status that is returned to the caller at the end of the operation
 | 
			
		||||
  /// to indicate whether this operation completed successfully.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_STATUS                  Status;
 | 
			
		||||
  EFI_STATUS                     Status;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The event that will be signaled when the operation completes. If
 | 
			
		||||
  /// set to NULL, the corresponding function will wait until the read or
 | 
			
		||||
@ -538,58 +522,57 @@ struct _EFI_MTFTP4_TOKEN {
 | 
			
		||||
  /// EVT_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
 | 
			
		||||
  /// Event must be lower than or equal to TPL_CALLBACK.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                   Event;
 | 
			
		||||
  EFI_EVENT                      Event;
 | 
			
		||||
  ///
 | 
			
		||||
  /// If not NULL, the data that will be used to override the existing configure data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_OVERRIDE_DATA    *OverrideData;
 | 
			
		||||
  EFI_MTFTP4_OVERRIDE_DATA       *OverrideData;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the null-terminated ASCII file name string.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                       *Filename;
 | 
			
		||||
  UINT8                          *Filename;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the null-terminated ASCII mode string. If NULL, "octet" is used.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8                       *ModeStr;
 | 
			
		||||
  UINT8                          *ModeStr;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of option/value string pairs.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      OptionCount;
 | 
			
		||||
  UINT32                         OptionCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to an array of option/value string pairs. Ignored if OptionCount is zero.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_OPTION           *OptionList;
 | 
			
		||||
  EFI_MTFTP4_OPTION              *OptionList;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size of the data buffer.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                      BufferSize;
 | 
			
		||||
  UINT64                         BufferSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the data buffer. Data that is downloaded from the
 | 
			
		||||
  /// MTFTPv4 server is stored here. Data that is uploaded to the
 | 
			
		||||
  /// MTFTPv4 server is read from here. Ignored if BufferSize is zero.
 | 
			
		||||
  ///
 | 
			
		||||
  VOID                        *Buffer;
 | 
			
		||||
  VOID                           *Buffer;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the context that will be used by CheckPacket,
 | 
			
		||||
  /// TimeoutCallback and PacketNeeded.
 | 
			
		||||
  ///
 | 
			
		||||
  VOID                        *Context;
 | 
			
		||||
  VOID                           *Context;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the callback function to check the contents of the received packet.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_CHECK_PACKET     CheckPacket;
 | 
			
		||||
  EFI_MTFTP4_CHECK_PACKET        CheckPacket;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the function to be called when a timeout occurs.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback;
 | 
			
		||||
  EFI_MTFTP4_TIMEOUT_CALLBACK    TimeoutCallback;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the function to provide the needed packet contents.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MTFTP4_PACKET_NEEDED    PacketNeeded;
 | 
			
		||||
  EFI_MTFTP4_PACKET_NEEDED       PacketNeeded;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiMtftp4ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiMtftp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiMtftp4ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,8 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  EFI Network Interface Identifier Protocol.
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
  @par Revision Reference:
 | 
			
		||||
  This Protocol is introduced in EFI Specification 1.10.
 | 
			
		||||
@ -18,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__
 | 
			
		||||
#define __EFI_NETWORK_INTERFACE_IDENTIFER_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// GUID retired from UEFI Specification 2.1b
 | 
			
		||||
@ -39,53 +33,51 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Revision defined in UEFI Specification 2.4
 | 
			
		||||
//
 | 
			
		||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION    0x00020000
 | 
			
		||||
 | 
			
		||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION  0x00020000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Revision defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION   EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION
 | 
			
		||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION  EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Forward reference for pure ANSI compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL  EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL   EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
 | 
			
		||||
typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// An optional protocol that is used to describe details about the software
 | 
			
		||||
/// layer that is used to produce the Simple Network Protocol.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
 | 
			
		||||
  UINT64    Revision;   ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol.
 | 
			
		||||
  UINT64    Id;         ///< The address of the first byte of the identifying structure for this network
 | 
			
		||||
                        ///< interface. This is only valid when the network interface is started
 | 
			
		||||
                        ///< (see Start()). When the network interface is not started, this field is set to zero.
 | 
			
		||||
  UINT64    ImageAddr;  ///< The address of the first byte of the identifying structure for this
 | 
			
		||||
                        ///< network interface.  This is set to zero if there is no structure.
 | 
			
		||||
  UINT32    ImageSize;  ///< The size of unrelocated network interface image.
 | 
			
		||||
  CHAR8     StringId[4];///< A four-character ASCII string that is sent in the class identifier field of
 | 
			
		||||
                        ///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI.
 | 
			
		||||
  UINT8     Type;       ///< Network interface type. This will be set to one of the values
 | 
			
		||||
                        ///< in EFI_NETWORK_INTERFACE_TYPE.
 | 
			
		||||
  UINT8     MajorVer;   ///< Major version number.
 | 
			
		||||
  UINT8     MinorVer;   ///< Minor version number.
 | 
			
		||||
  BOOLEAN   Ipv6Supported; ///< TRUE if the network interface supports IPv6; otherwise FALSE.
 | 
			
		||||
  UINT16    IfNum;      ///< The network interface number that is being identified by this Network
 | 
			
		||||
                        ///< Interface Identifier Protocol. This field must be less than or
 | 
			
		||||
                        ///< equal to the (IFcnt | IFcntExt <<8 ) fields in the !PXE structure.
 | 
			
		||||
 | 
			
		||||
  UINT64     Revision;      ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol.
 | 
			
		||||
  UINT64     Id;            ///< The address of the first byte of the identifying structure for this network
 | 
			
		||||
                            ///< interface. This is only valid when the network interface is started
 | 
			
		||||
                            ///< (see Start()). When the network interface is not started, this field is set to zero.
 | 
			
		||||
  UINT64     ImageAddr;     ///< The address of the first byte of the identifying structure for this
 | 
			
		||||
                            ///< network interface.  This is set to zero if there is no structure.
 | 
			
		||||
  UINT32     ImageSize;     ///< The size of unrelocated network interface image.
 | 
			
		||||
  CHAR8      StringId[4];   ///< A four-character ASCII string that is sent in the class identifier field of
 | 
			
		||||
                            ///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI.
 | 
			
		||||
  UINT8      Type;          ///< Network interface type. This will be set to one of the values
 | 
			
		||||
                            ///< in EFI_NETWORK_INTERFACE_TYPE.
 | 
			
		||||
  UINT8      MajorVer;      ///< Major version number.
 | 
			
		||||
  UINT8      MinorVer;      ///< Minor version number.
 | 
			
		||||
  BOOLEAN    Ipv6Supported; ///< TRUE if the network interface supports IPv6; otherwise FALSE.
 | 
			
		||||
  UINT16     IfNum;         ///< The network interface number that is being identified by this Network
 | 
			
		||||
                            ///< Interface Identifier Protocol. This field must be less than or
 | 
			
		||||
                            ///< equal to the (IFcnt | IFcntExt <<8 ) fields in the !PXE structure.
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
///*******************************************************
 | 
			
		||||
/// *******************************************************
 | 
			
		||||
/// EFI_NETWORK_INTERFACE_TYPE
 | 
			
		||||
///*******************************************************
 | 
			
		||||
/// *******************************************************
 | 
			
		||||
///
 | 
			
		||||
typedef enum {
 | 
			
		||||
  EfiNetworkInterfaceUndi = 1
 | 
			
		||||
@ -94,27 +86,27 @@ typedef enum {
 | 
			
		||||
///
 | 
			
		||||
/// Forward reference for pure ANSI compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct undiconfig_table  UNDI_CONFIG_TABLE;
 | 
			
		||||
typedef struct undiconfig_table UNDI_CONFIG_TABLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The format of the configuration table for UNDI
 | 
			
		||||
///
 | 
			
		||||
struct undiconfig_table {
 | 
			
		||||
  UINT32             NumberOfInterfaces;    ///< The number of NIC devices
 | 
			
		||||
  UINT32               NumberOfInterfaces;  ///< The number of NIC devices
 | 
			
		||||
                                            ///< that this UNDI controls.
 | 
			
		||||
  UINT32             reserved;
 | 
			
		||||
  UNDI_CONFIG_TABLE  *nextlink;             ///< A pointer to the next UNDI
 | 
			
		||||
  UINT32               reserved;
 | 
			
		||||
  UNDI_CONFIG_TABLE    *nextlink;           ///< A pointer to the next UNDI
 | 
			
		||||
                                            ///< configuration table.
 | 
			
		||||
  ///
 | 
			
		||||
  /// The length of this array is given in the NumberOfInterfaces field.
 | 
			
		||||
  ///
 | 
			
		||||
  struct {
 | 
			
		||||
    VOID             *NII_InterfacePointer; ///< Pointer to the NII interface structure.
 | 
			
		||||
    VOID             *DevicePathPointer;    ///< Pointer to the device path for this NIC.
 | 
			
		||||
    VOID    *NII_InterfacePointer;          ///< Pointer to the NII interface structure.
 | 
			
		||||
    VOID    *DevicePathPointer;             ///< Pointer to the device path for this NIC.
 | 
			
		||||
  } NII_entry[1];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31;
 | 
			
		||||
extern EFI_GUID  gEfiNetworkInterfaceIdentifierProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiNetworkInterfaceIdentifierProtocolGuid_31;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,21 +2,15 @@
 | 
			
		||||
  EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
 | 
			
		||||
  and DMA interfaces that a driver uses to access its PCI controller.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PCI_IO_H__
 | 
			
		||||
#define __PCI_IO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Global ID for the PCI I/O Protocol
 | 
			
		||||
@ -26,7 +20,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_PCI_IO_PROTOCOL  EFI_PCI_IO_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// *******************************************************
 | 
			
		||||
@ -34,7 +28,7 @@ typedef struct _EFI_PCI_IO_PROTOCOL  EFI_PCI_IO_PROTOCOL;
 | 
			
		||||
/// *******************************************************
 | 
			
		||||
///
 | 
			
		||||
typedef enum {
 | 
			
		||||
  EfiPciIoWidthUint8      = 0,
 | 
			
		||||
  EfiPciIoWidthUint8 = 0,
 | 
			
		||||
  EfiPciIoWidthUint16,
 | 
			
		||||
  EfiPciIoWidthUint32,
 | 
			
		||||
  EfiPciIoWidthUint64,
 | 
			
		||||
@ -52,30 +46,30 @@ typedef enum {
 | 
			
		||||
//
 | 
			
		||||
// Complete PCI address generater
 | 
			
		||||
//
 | 
			
		||||
#define EFI_PCI_IO_PASS_THROUGH_BAR               0xff    ///< Special BAR that passes a memory or I/O cycle through unchanged
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MASK                 0x077f  ///< All the following I/O and Memory cycles
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO   0x0001  ///< I/O cycles 0x0000-0x00FF (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO               0x0002  ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO       0x0004  ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY           0x0008  ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO               0x0010  ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO       0x0020  ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO     0x0040  ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080  ///< Map a memory range so writes are combined
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_IO                   0x0100  ///< Enable the I/O decode bit in the PCI Config Header
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY               0x0200  ///< Enable the Memory decode bit in the PCI Config Header
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER           0x0400  ///< Enable the DMA bit in the PCI Config Header
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED        0x0800  ///< Map a memory range so all r/w accesses are cached
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE       0x1000  ///< Disable a memory range
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE      0x2000  ///< Clear for an add-in PCI Device
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM         0x4000  ///< Clear for a physical PCI Option ROM accessed through ROM BAR
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE   0x8000  ///< Clear for PCI controllers that can not genrate a DAC
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16            0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16    0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16            0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_PASS_THROUGH_BAR                0xff    ///< Special BAR that passes a memory or I/O cycle through unchanged
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MASK                  0x077f  ///< All the following I/O and Memory cycles
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO    0x0001  ///< I/O cycles 0x0000-0x00FF (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO                0x0002  ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO        0x0004  ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY            0x0008  ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO                0x0010  ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO        0x0020  ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO      0x0040  ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE  0x0080  ///< Map a memory range so writes are combined
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_IO                    0x0100  ///< Enable the I/O decode bit in the PCI Config Header
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY                0x0200  ///< Enable the Memory decode bit in the PCI Config Header
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER            0x0400  ///< Enable the DMA bit in the PCI Config Header
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED         0x0800  ///< Map a memory range so all r/w accesses are cached
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE        0x1000  ///< Disable a memory range
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE       0x2000  ///< Clear for an add-in PCI Device
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM          0x4000  ///< Clear for a physical PCI Option ROM accessed through ROM BAR
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE    0x8000  ///< Clear for PCI controllers that can not genrate a DAC
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16             0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16     0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
 | 
			
		||||
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16             0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
 | 
			
		||||
 | 
			
		||||
#define EFI_PCI_DEVICE_ENABLE                     (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
 | 
			
		||||
#define EFI_VGA_DEVICE_ENABLE                     (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO)
 | 
			
		||||
#define EFI_PCI_DEVICE_ENABLE  (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
 | 
			
		||||
#define EFI_VGA_DEVICE_ENABLE  (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// *******************************************************
 | 
			
		||||
@ -198,11 +192,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Read PCI controller registers in the PCI memory or I/O space.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_IO_MEM  Read;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_IO_MEM    Read;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Write PCI controller registers in the PCI memory or I/O space.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_IO_MEM  Write;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_IO_MEM    Write;
 | 
			
		||||
} EFI_PCI_IO_PROTOCOL_ACCESS;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -237,11 +231,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Read PCI controller registers in PCI configuration space.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_CONFIG  Read;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_CONFIG    Read;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Write PCI controller registers in PCI configuration space.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_CONFIG  Write;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_CONFIG    Write;
 | 
			
		||||
} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -333,7 +327,7 @@ EFI_STATUS
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer
 | 
			
		||||
  mapping.
 | 
			
		||||
  or EfiPciOperationBusMasterCommonBuffer64 mapping.
 | 
			
		||||
 | 
			
		||||
  @param  This                  A pointer to the EFI_PCI_IO_PROTOCOL instance.
 | 
			
		||||
  @param  Type                  This parameter is not used and must be ignored.
 | 
			
		||||
@ -346,7 +340,7 @@ EFI_STATUS
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS           The requested memory pages were allocated.
 | 
			
		||||
  @retval EFI_UNSUPPORTED       Attributes is unsupported. The only legal attribute bits are
 | 
			
		||||
                                MEMORY_WRITE_COMBINE and MEMORY_CACHED.
 | 
			
		||||
                                MEMORY_WRITE_COMBINE, MEMORY_CACHED and DUAL_ADDRESS_CYCLE.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
 | 
			
		||||
  @retval EFI_OUT_OF_RESOURCES  The memory pages could not be allocated.
 | 
			
		||||
 | 
			
		||||
@ -459,25 +453,24 @@ EFI_STATUS
 | 
			
		||||
                                base address for resource range. The legal range for this field is 0..5.
 | 
			
		||||
  @param  Supports              A pointer to the mask of attributes that this PCI controller supports
 | 
			
		||||
                                setting for this BAR with SetBarAttributes().
 | 
			
		||||
  @param  Resources             A pointer to the ACPI 2.0 resource descriptors that describe the current
 | 
			
		||||
  @param  Resources             A pointer to the resource descriptors that describe the current
 | 
			
		||||
                                configuration of this BAR of the PCI controller.
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS           If Supports is not NULL, then the attributes that the PCI
 | 
			
		||||
                                controller supports are returned in Supports. If Resources
 | 
			
		||||
                                is not NULL, then the ACPI 2.0 resource descriptors that the PCI
 | 
			
		||||
                                is not NULL, then the resource descriptors that the PCI
 | 
			
		||||
                                controller is currently using are returned in Resources.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.
 | 
			
		||||
  @retval EFI_UNSUPPORTED       BarIndex not valid for this PCI controller.
 | 
			
		||||
  @retval EFI_OUT_OF_RESOURCES  There are not enough resources available to allocate
 | 
			
		||||
                                Resources.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES)(
 | 
			
		||||
  IN EFI_PCI_IO_PROTOCOL             *This,
 | 
			
		||||
  IN  UINT8                          BarIndex,
 | 
			
		||||
  OUT UINT64                         *Supports, OPTIONAL
 | 
			
		||||
  OUT UINT64                         *Supports  OPTIONAL,
 | 
			
		||||
  OUT VOID                           **Resources OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
@ -523,26 +516,26 @@ EFI_STATUS
 | 
			
		||||
/// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_PCI_IO_PROTOCOL {
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_POLL_IO_MEM         PollMem;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_POLL_IO_MEM         PollIo;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ACCESS              Mem;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ACCESS              Io;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS       Pci;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_COPY_MEM            CopyMem;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_MAP                 Map;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_UNMAP               Unmap;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER     AllocateBuffer;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_FREE_BUFFER         FreeBuffer;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_FLUSH               Flush;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_GET_LOCATION        GetLocation;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ATTRIBUTES          Attributes;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES  GetBarAttributes;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES  SetBarAttributes;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_POLL_IO_MEM           PollMem;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_POLL_IO_MEM           PollIo;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ACCESS                Mem;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ACCESS                Io;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS         Pci;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_COPY_MEM              CopyMem;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_MAP                   Map;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_UNMAP                 Unmap;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER       AllocateBuffer;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_FREE_BUFFER           FreeBuffer;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_FLUSH                 Flush;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_GET_LOCATION          GetLocation;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_ATTRIBUTES            Attributes;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES    GetBarAttributes;
 | 
			
		||||
  EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES    SetBarAttributes;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size, in bytes, of the ROM image.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                                  RomSize;
 | 
			
		||||
  UINT64                                    RomSize;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible
 | 
			
		||||
@ -552,9 +545,9 @@ struct _EFI_PCI_IO_PROTOCOL {
 | 
			
		||||
  /// The Attributes() function can be used to determine from which of these two sources
 | 
			
		||||
  /// the RomImage buffer was initialized.
 | 
			
		||||
  ///
 | 
			
		||||
  VOID                                    *RomImage;
 | 
			
		||||
  VOID    *RomImage;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiPciIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiPciIoProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,21 +5,15 @@
 | 
			
		||||
  and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
 | 
			
		||||
  defferent types of bus mastering DMA.
 | 
			
		||||
 | 
			
		||||
  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 __PCI_ROOT_BRIDGE_IO_H__
 | 
			
		||||
#define __PCI_ROOT_BRIDGE_IO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Library/BaseLib.h>
 | 
			
		||||
 | 
			
		||||
@ -28,7 +22,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// *******************************************************
 | 
			
		||||
@ -90,24 +84,24 @@ typedef enum {
 | 
			
		||||
  EfiPciOperationMaximum
 | 
			
		||||
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION;
 | 
			
		||||
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO          0x0001
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_ISA_IO                      0x0002
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO              0x0004
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_MEMORY                  0x0008
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_IO                      0x0010
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO              0x0020
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO            0x0040
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE        0x0080
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED               0x0800
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE              0x1000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE          0x8000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_ISA_IO_16                   0x10000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16           0x20000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_IO_16                   0x40000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO    0x0001
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_ISA_IO                0x0002
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO        0x0004
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_MEMORY            0x0008
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_IO                0x0010
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO        0x0020
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO      0x0040
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE  0x0080
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED         0x0800
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE        0x1000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE    0x8000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_ISA_IO_16             0x10000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16     0x20000
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VGA_IO_16             0x40000
 | 
			
		||||
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER   (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE)
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER  (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE)
 | 
			
		||||
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER)
 | 
			
		||||
#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER  (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER)
 | 
			
		||||
 | 
			
		||||
#define EFI_PCI_ADDRESS(bus, dev, func, reg) \
 | 
			
		||||
  (UINT64) ( \
 | 
			
		||||
@ -117,11 +111,11 @@ typedef enum {
 | 
			
		||||
  (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32))))
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Register;
 | 
			
		||||
  UINT8   Function;
 | 
			
		||||
  UINT8   Device;
 | 
			
		||||
  UINT8   Bus;
 | 
			
		||||
  UINT32  ExtendedRegister;
 | 
			
		||||
  UINT8     Register;
 | 
			
		||||
  UINT8     Function;
 | 
			
		||||
  UINT8     Device;
 | 
			
		||||
  UINT8     Bus;
 | 
			
		||||
  UINT32    ExtendedRegister;
 | 
			
		||||
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -183,11 +177,11 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Read PCI controller registers in the PCI root bridge memory space.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM  Read;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM    Read;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Write PCI controller registers in the PCI root bridge memory space.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM  Write;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM    Write;
 | 
			
		||||
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -389,11 +383,11 @@ EFI_STATUS
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0
 | 
			
		||||
  Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI
 | 
			
		||||
  resource descriptors.
 | 
			
		||||
 | 
			
		||||
  @param  This                  A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
 | 
			
		||||
  @param  Resources             A pointer to the ACPI 2.0 resource descriptors that describe the current
 | 
			
		||||
  @param  Resources             A pointer to the resource descriptors that describe the current
 | 
			
		||||
                                configuration of this PCI root bridge.
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS           The current configuration of this PCI root bridge was returned in
 | 
			
		||||
@ -417,28 +411,28 @@ struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI_HANDLE of the PCI Host Bridge of which this PCI Root Bridge is a member.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_HANDLE                                      ParentHandle;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM     PollMem;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM     PollIo;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS          Mem;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS          Io;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS          Pci;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM        CopyMem;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP             Map;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP           Unmap;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER     FreeBuffer;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH           Flush;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES  GetAttributes;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES  SetAttributes;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION   Configuration;
 | 
			
		||||
  EFI_HANDLE                                         ParentHandle;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM        PollMem;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM        PollIo;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS             Mem;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS             Io;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS             Pci;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM           CopyMem;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP                Map;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP              Unmap;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER    AllocateBuffer;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER        FreeBuffer;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH              Flush;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES     GetAttributes;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES     SetAttributes;
 | 
			
		||||
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION      Configuration;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The segment number that this PCI root bridge resides.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                                          SegmentNumber;
 | 
			
		||||
  UINT32                                             SegmentNumber;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiPciRootBridgeIoProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,23 +2,21 @@
 | 
			
		||||
  EFI PXE Base Code Protocol definitions, which is used to access PXE-compatible
 | 
			
		||||
  devices for network access and network booting.
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
 | 
			
		||||
Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
  This Protocol is introduced in EFI Specification 1.10.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PXE_BASE_CODE_PROTOCOL_H__
 | 
			
		||||
#define __PXE_BASE_CODE_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// PXE Base Code protocol.
 | 
			
		||||
@ -28,94 +26,94 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL  EFI_PXE_BASE_CODE_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_PXE_BASE_CODE_PROTOCOL  EFI_PXE_BASE_CODE;
 | 
			
		||||
typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Default IP TTL and ToS.
 | 
			
		||||
///
 | 
			
		||||
#define DEFAULT_TTL 16
 | 
			
		||||
#define DEFAULT_ToS 0
 | 
			
		||||
#define DEFAULT_TTL  16
 | 
			
		||||
#define DEFAULT_ToS  0
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// ICMP error format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   Type;
 | 
			
		||||
  UINT8   Code;
 | 
			
		||||
  UINT16  Checksum;
 | 
			
		||||
  UINT8     Type;
 | 
			
		||||
  UINT8     Code;
 | 
			
		||||
  UINT16    Checksum;
 | 
			
		||||
  union {
 | 
			
		||||
    UINT32  reserved;
 | 
			
		||||
    UINT32  Mtu;
 | 
			
		||||
    UINT32  Pointer;
 | 
			
		||||
    UINT32    reserved;
 | 
			
		||||
    UINT32    Mtu;
 | 
			
		||||
    UINT32    Pointer;
 | 
			
		||||
    struct {
 | 
			
		||||
      UINT16  Identifier;
 | 
			
		||||
      UINT16  Sequence;
 | 
			
		||||
      UINT16    Identifier;
 | 
			
		||||
      UINT16    Sequence;
 | 
			
		||||
    } Echo;
 | 
			
		||||
  } u;
 | 
			
		||||
  UINT8 Data[494];
 | 
			
		||||
  UINT8    Data[494];
 | 
			
		||||
} EFI_PXE_BASE_CODE_ICMP_ERROR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// TFTP error format.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 ErrorCode;
 | 
			
		||||
  CHAR8 ErrorString[127];
 | 
			
		||||
  UINT8    ErrorCode;
 | 
			
		||||
  CHAR8    ErrorString[127];
 | 
			
		||||
} EFI_PXE_BASE_CODE_TFTP_ERROR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IP Receive Filter definitions.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_PXE_BASE_CODE_MAX_IPCNT 8
 | 
			
		||||
#define EFI_PXE_BASE_CODE_MAX_IPCNT  8
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// IP Receive Filter structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8           Filters;
 | 
			
		||||
  UINT8           IpCnt;
 | 
			
		||||
  UINT16          reserved;
 | 
			
		||||
  EFI_IP_ADDRESS  IpList[EFI_PXE_BASE_CODE_MAX_IPCNT];
 | 
			
		||||
  UINT8             Filters;
 | 
			
		||||
  UINT8             IpCnt;
 | 
			
		||||
  UINT16            reserved;
 | 
			
		||||
  EFI_IP_ADDRESS    IpList[EFI_PXE_BASE_CODE_MAX_IPCNT];
 | 
			
		||||
} EFI_PXE_BASE_CODE_IP_FILTER;
 | 
			
		||||
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP            0x0001
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST             0x0002
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS           0x0004
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP             0x0001
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST              0x0002
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS            0x0004
 | 
			
		||||
#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST  0x0008
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// ARP cache entries.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IP_ADDRESS  IpAddr;
 | 
			
		||||
  EFI_MAC_ADDRESS MacAddr;
 | 
			
		||||
  EFI_IP_ADDRESS     IpAddr;
 | 
			
		||||
  EFI_MAC_ADDRESS    MacAddr;
 | 
			
		||||
} EFI_PXE_BASE_CODE_ARP_ENTRY;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// ARP route table entries.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IP_ADDRESS  IpAddr;
 | 
			
		||||
  EFI_IP_ADDRESS  SubnetMask;
 | 
			
		||||
  EFI_IP_ADDRESS  GwAddr;
 | 
			
		||||
  EFI_IP_ADDRESS    IpAddr;
 | 
			
		||||
  EFI_IP_ADDRESS    SubnetMask;
 | 
			
		||||
  EFI_IP_ADDRESS    GwAddr;
 | 
			
		||||
} EFI_PXE_BASE_CODE_ROUTE_ENTRY;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// UDP definitions
 | 
			
		||||
//
 | 
			
		||||
typedef UINT16  EFI_PXE_BASE_CODE_UDP_PORT;
 | 
			
		||||
typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
 | 
			
		||||
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP    0x0001
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT  0x0002
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP   0x0004
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER    0x0010
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT  0x0020
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP     0x0001
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT   0x0002
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP    0x0004
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT  0x0008
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER     0x0010
 | 
			
		||||
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT   0x0020
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Discover() definitions
 | 
			
		||||
@ -142,7 +140,7 @@ typedef UINT16  EFI_PXE_BASE_CODE_UDP_PORT;
 | 
			
		||||
// 32768 through 65279 are for vendor use
 | 
			
		||||
// 65280 through 65534 are reserved
 | 
			
		||||
//
 | 
			
		||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST   65535
 | 
			
		||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST  65535
 | 
			
		||||
 | 
			
		||||
#define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK     0x7FFF
 | 
			
		||||
#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL  0x0000
 | 
			
		||||
@ -154,39 +152,40 @@ typedef UINT16  EFI_PXE_BASE_CODE_UDP_PORT;
 | 
			
		||||
// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
 | 
			
		||||
//
 | 
			
		||||
#if defined (MDE_CPU_IA32)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x0006
 | 
			
		||||
#elif defined (MDE_CPU_IPF)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x0002
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE  0x0006
 | 
			
		||||
#elif defined (MDE_CPU_X64)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x0007
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE  0x0007
 | 
			
		||||
#elif defined (MDE_CPU_ARM)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x000A
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE  0x000A
 | 
			
		||||
#elif defined (MDE_CPU_AARCH64)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE    0x000B
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE  0x000B
 | 
			
		||||
#elif defined (MDE_CPU_RISCV64)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE  0x001B
 | 
			
		||||
#elif defined (MDE_CPU_LOONGARCH64)
 | 
			
		||||
#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE  0x0027
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Discover() server list structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16          Type;
 | 
			
		||||
  BOOLEAN         AcceptAnyResponse;
 | 
			
		||||
  UINT8           Reserved;
 | 
			
		||||
  EFI_IP_ADDRESS  IpAddr;
 | 
			
		||||
  UINT16            Type;
 | 
			
		||||
  BOOLEAN           AcceptAnyResponse;
 | 
			
		||||
  UINT8             Reserved;
 | 
			
		||||
  EFI_IP_ADDRESS    IpAddr;
 | 
			
		||||
} EFI_PXE_BASE_CODE_SRVLIST;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Discover() information override structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  BOOLEAN                   UseMCast;
 | 
			
		||||
  BOOLEAN                   UseBCast;
 | 
			
		||||
  BOOLEAN                   UseUCast;
 | 
			
		||||
  BOOLEAN                   MustUseList;
 | 
			
		||||
  EFI_IP_ADDRESS            ServerMCastIp;
 | 
			
		||||
  UINT16                    IpCnt;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SRVLIST SrvList[1];
 | 
			
		||||
  BOOLEAN                      UseMCast;
 | 
			
		||||
  BOOLEAN                      UseBCast;
 | 
			
		||||
  BOOLEAN                      UseUCast;
 | 
			
		||||
  BOOLEAN                      MustUseList;
 | 
			
		||||
  EFI_IP_ADDRESS               ServerMCastIp;
 | 
			
		||||
  UINT16                       IpCnt;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SRVLIST    SrvList[1];
 | 
			
		||||
} EFI_PXE_BASE_CODE_DISCOVER_INFO;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -210,58 +209,58 @@ typedef enum {
 | 
			
		||||
/// perform the "get file size" and "read directory" operations of MTFTP.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IP_ADDRESS              MCastIp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_PORT  CPort;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_PORT  SPort;
 | 
			
		||||
  UINT16                      ListenTimeout;
 | 
			
		||||
  UINT16                      TransmitTimeout;
 | 
			
		||||
  EFI_IP_ADDRESS                MCastIp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_PORT    CPort;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_PORT    SPort;
 | 
			
		||||
  UINT16                        ListenTimeout;
 | 
			
		||||
  UINT16                        TransmitTimeout;
 | 
			
		||||
} EFI_PXE_BASE_CODE_MTFTP_INFO;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// DHCPV4 Packet structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8   BootpOpcode;
 | 
			
		||||
  UINT8   BootpHwType;
 | 
			
		||||
  UINT8   BootpHwAddrLen;
 | 
			
		||||
  UINT8   BootpGateHops;
 | 
			
		||||
  UINT32  BootpIdent;
 | 
			
		||||
  UINT16  BootpSeconds;
 | 
			
		||||
  UINT16  BootpFlags;
 | 
			
		||||
  UINT8   BootpCiAddr[4];
 | 
			
		||||
  UINT8   BootpYiAddr[4];
 | 
			
		||||
  UINT8   BootpSiAddr[4];
 | 
			
		||||
  UINT8   BootpGiAddr[4];
 | 
			
		||||
  UINT8   BootpHwAddr[16];
 | 
			
		||||
  UINT8   BootpSrvName[64];
 | 
			
		||||
  UINT8   BootpBootFile[128];
 | 
			
		||||
  UINT32  DhcpMagik;
 | 
			
		||||
  UINT8   DhcpOptions[56];
 | 
			
		||||
  UINT8     BootpOpcode;
 | 
			
		||||
  UINT8     BootpHwType;
 | 
			
		||||
  UINT8     BootpHwAddrLen;
 | 
			
		||||
  UINT8     BootpGateHops;
 | 
			
		||||
  UINT32    BootpIdent;
 | 
			
		||||
  UINT16    BootpSeconds;
 | 
			
		||||
  UINT16    BootpFlags;
 | 
			
		||||
  UINT8     BootpCiAddr[4];
 | 
			
		||||
  UINT8     BootpYiAddr[4];
 | 
			
		||||
  UINT8     BootpSiAddr[4];
 | 
			
		||||
  UINT8     BootpGiAddr[4];
 | 
			
		||||
  UINT8     BootpHwAddr[16];
 | 
			
		||||
  UINT8     BootpSrvName[64];
 | 
			
		||||
  UINT8     BootpBootFile[128];
 | 
			
		||||
  UINT32    DhcpMagik;
 | 
			
		||||
  UINT8     DhcpOptions[56];
 | 
			
		||||
} EFI_PXE_BASE_CODE_DHCPV4_PACKET;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// DHCPV6 Packet structure.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  MessageType:8;
 | 
			
		||||
  UINT32  TransactionId:24;
 | 
			
		||||
  UINT8   DhcpOptions[1024];
 | 
			
		||||
  UINT32    MessageType   : 8;
 | 
			
		||||
  UINT32    TransactionId : 24;
 | 
			
		||||
  UINT8     DhcpOptions[1024];
 | 
			
		||||
} EFI_PXE_BASE_CODE_DHCPV6_PACKET;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Packet structure.
 | 
			
		||||
///
 | 
			
		||||
typedef union {
 | 
			
		||||
  UINT8                           Raw[1472];
 | 
			
		||||
  EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;
 | 
			
		||||
  EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
 | 
			
		||||
  UINT8                              Raw[1472];
 | 
			
		||||
  EFI_PXE_BASE_CODE_DHCPV4_PACKET    Dhcpv4;
 | 
			
		||||
  EFI_PXE_BASE_CODE_DHCPV6_PACKET    Dhcpv6;
 | 
			
		||||
} EFI_PXE_BASE_CODE_PACKET;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// PXE Base Code Mode structure
 | 
			
		||||
//
 | 
			
		||||
#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES   8
 | 
			
		||||
#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
 | 
			
		||||
#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES    8
 | 
			
		||||
#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES  8
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_PXE_BASE_CODE_MODE.
 | 
			
		||||
@ -270,40 +269,40 @@ typedef union {
 | 
			
		||||
/// EFI_PXE_BASE_CODE_PROTOCOL functions.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  BOOLEAN                       Started;
 | 
			
		||||
  BOOLEAN                       Ipv6Available;
 | 
			
		||||
  BOOLEAN                       Ipv6Supported;
 | 
			
		||||
  BOOLEAN                       UsingIpv6;
 | 
			
		||||
  BOOLEAN                       BisSupported;
 | 
			
		||||
  BOOLEAN                       BisDetected;
 | 
			
		||||
  BOOLEAN                       AutoArp;
 | 
			
		||||
  BOOLEAN                       SendGUID;
 | 
			
		||||
  BOOLEAN                       DhcpDiscoverValid;
 | 
			
		||||
  BOOLEAN                       DhcpAckReceived;
 | 
			
		||||
  BOOLEAN                       ProxyOfferReceived;
 | 
			
		||||
  BOOLEAN                       PxeDiscoverValid;
 | 
			
		||||
  BOOLEAN                       PxeReplyReceived;
 | 
			
		||||
  BOOLEAN                       PxeBisReplyReceived;
 | 
			
		||||
  BOOLEAN                       IcmpErrorReceived;
 | 
			
		||||
  BOOLEAN                       TftpErrorReceived;
 | 
			
		||||
  BOOLEAN                       MakeCallbacks;
 | 
			
		||||
  UINT8                         TTL;
 | 
			
		||||
  UINT8                         ToS;
 | 
			
		||||
  EFI_IP_ADDRESS                StationIp;
 | 
			
		||||
  EFI_IP_ADDRESS                SubnetMask;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET      DhcpDiscover;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET      DhcpAck;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET      ProxyOffer;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET      PxeDiscover;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET      PxeReply;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET      PxeBisReply;
 | 
			
		||||
  EFI_PXE_BASE_CODE_IP_FILTER   IpFilter;
 | 
			
		||||
  UINT32                        ArpCacheEntries;
 | 
			
		||||
  EFI_PXE_BASE_CODE_ARP_ENTRY   ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES];
 | 
			
		||||
  UINT32                        RouteTableEntries;
 | 
			
		||||
  EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES];
 | 
			
		||||
  EFI_PXE_BASE_CODE_ICMP_ERROR  IcmpError;
 | 
			
		||||
  EFI_PXE_BASE_CODE_TFTP_ERROR  TftpError;
 | 
			
		||||
  BOOLEAN                          Started;
 | 
			
		||||
  BOOLEAN                          Ipv6Available;
 | 
			
		||||
  BOOLEAN                          Ipv6Supported;
 | 
			
		||||
  BOOLEAN                          UsingIpv6;
 | 
			
		||||
  BOOLEAN                          BisSupported;
 | 
			
		||||
  BOOLEAN                          BisDetected;
 | 
			
		||||
  BOOLEAN                          AutoArp;
 | 
			
		||||
  BOOLEAN                          SendGUID;
 | 
			
		||||
  BOOLEAN                          DhcpDiscoverValid;
 | 
			
		||||
  BOOLEAN                          DhcpAckReceived;
 | 
			
		||||
  BOOLEAN                          ProxyOfferReceived;
 | 
			
		||||
  BOOLEAN                          PxeDiscoverValid;
 | 
			
		||||
  BOOLEAN                          PxeReplyReceived;
 | 
			
		||||
  BOOLEAN                          PxeBisReplyReceived;
 | 
			
		||||
  BOOLEAN                          IcmpErrorReceived;
 | 
			
		||||
  BOOLEAN                          TftpErrorReceived;
 | 
			
		||||
  BOOLEAN                          MakeCallbacks;
 | 
			
		||||
  UINT8                            TTL;
 | 
			
		||||
  UINT8                            ToS;
 | 
			
		||||
  EFI_IP_ADDRESS                   StationIp;
 | 
			
		||||
  EFI_IP_ADDRESS                   SubnetMask;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET         DhcpDiscover;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET         DhcpAck;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET         ProxyOffer;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET         PxeDiscover;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET         PxeReply;
 | 
			
		||||
  EFI_PXE_BASE_CODE_PACKET         PxeBisReply;
 | 
			
		||||
  EFI_PXE_BASE_CODE_IP_FILTER      IpFilter;
 | 
			
		||||
  UINT32                           ArpCacheEntries;
 | 
			
		||||
  EFI_PXE_BASE_CODE_ARP_ENTRY      ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES];
 | 
			
		||||
  UINT32                           RouteTableEntries;
 | 
			
		||||
  EFI_PXE_BASE_CODE_ROUTE_ENTRY    RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES];
 | 
			
		||||
  EFI_PXE_BASE_CODE_ICMP_ERROR     IcmpError;
 | 
			
		||||
  EFI_PXE_BASE_CODE_TFTP_ERROR     TftpError;
 | 
			
		||||
} EFI_PXE_BASE_CODE_MODE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -627,11 +626,11 @@ EFI_STATUS
 | 
			
		||||
  IN UINT16                                    OpFlags,
 | 
			
		||||
  IN EFI_IP_ADDRESS                            *DestIp,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_UDP_PORT                *DestPort,
 | 
			
		||||
  IN EFI_IP_ADDRESS                            *GatewayIp,  OPTIONAL
 | 
			
		||||
  IN EFI_IP_ADDRESS                            *SrcIp,      OPTIONAL
 | 
			
		||||
  IN OUT EFI_PXE_BASE_CODE_UDP_PORT            *SrcPort,    OPTIONAL
 | 
			
		||||
  IN UINTN                                     *HeaderSize, OPTIONAL
 | 
			
		||||
  IN VOID                                      *HeaderPtr,  OPTIONAL
 | 
			
		||||
  IN EFI_IP_ADDRESS                            *GatewayIp   OPTIONAL,
 | 
			
		||||
  IN EFI_IP_ADDRESS                            *SrcIp       OPTIONAL,
 | 
			
		||||
  IN OUT EFI_PXE_BASE_CODE_UDP_PORT            *SrcPort     OPTIONAL,
 | 
			
		||||
  IN UINTN                                     *HeaderSize  OPTIONAL,
 | 
			
		||||
  IN VOID                                      *HeaderPtr   OPTIONAL,
 | 
			
		||||
  IN UINTN                                     *BufferSize,
 | 
			
		||||
  IN VOID                                      *BufferPtr
 | 
			
		||||
  );
 | 
			
		||||
@ -679,12 +678,12 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ)(
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PROTOCOL                *This,
 | 
			
		||||
  IN UINT16                                    OpFlags,
 | 
			
		||||
  IN OUT EFI_IP_ADDRESS                        *DestIp,     OPTIONAL
 | 
			
		||||
  IN OUT EFI_PXE_BASE_CODE_UDP_PORT            *DestPort,   OPTIONAL
 | 
			
		||||
  IN OUT EFI_IP_ADDRESS                        *SrcIp,      OPTIONAL
 | 
			
		||||
  IN OUT EFI_PXE_BASE_CODE_UDP_PORT            *SrcPort,    OPTIONAL
 | 
			
		||||
  IN UINTN                                     *HeaderSize, OPTIONAL
 | 
			
		||||
  IN VOID                                      *HeaderPtr,  OPTIONAL
 | 
			
		||||
  IN OUT EFI_IP_ADDRESS                        *DestIp      OPTIONAL,
 | 
			
		||||
  IN OUT EFI_PXE_BASE_CODE_UDP_PORT            *DestPort    OPTIONAL,
 | 
			
		||||
  IN OUT EFI_IP_ADDRESS                        *SrcIp       OPTIONAL,
 | 
			
		||||
  IN OUT EFI_PXE_BASE_CODE_UDP_PORT            *SrcPort     OPTIONAL,
 | 
			
		||||
  IN UINTN                                     *HeaderSize  OPTIONAL,
 | 
			
		||||
  IN VOID                                      *HeaderPtr   OPTIONAL,
 | 
			
		||||
  IN OUT UINTN                                 *BufferSize,
 | 
			
		||||
  IN VOID                                      *BufferPtr
 | 
			
		||||
  );
 | 
			
		||||
@ -801,10 +800,10 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS)(
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PROTOCOL            *This,
 | 
			
		||||
  IN BOOLEAN                               *NewAutoArp,     OPTIONAL
 | 
			
		||||
  IN BOOLEAN                               *NewSendGUID,    OPTIONAL
 | 
			
		||||
  IN UINT8                                 *NewTTL,         OPTIONAL
 | 
			
		||||
  IN UINT8                                 *NewToS,         OPTIONAL
 | 
			
		||||
  IN BOOLEAN                               *NewAutoArp      OPTIONAL,
 | 
			
		||||
  IN BOOLEAN                               *NewSendGUID     OPTIONAL,
 | 
			
		||||
  IN UINT8                                 *NewTTL          OPTIONAL,
 | 
			
		||||
  IN UINT8                                 *NewToS          OPTIONAL,
 | 
			
		||||
  IN BOOLEAN                               *NewMakeCallback OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
@ -835,7 +834,7 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP)(
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PROTOCOL            *This,
 | 
			
		||||
  IN EFI_IP_ADDRESS                        *NewStationIp,   OPTIONAL
 | 
			
		||||
  IN EFI_IP_ADDRESS                        *NewStationIp    OPTIONAL,
 | 
			
		||||
  IN EFI_IP_ADDRESS                        *NewSubnetMask   OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
@ -874,24 +873,24 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS)(
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PROTOCOL            *This,
 | 
			
		||||
  BOOLEAN                                  *NewDhcpDiscoverValid,   OPTIONAL
 | 
			
		||||
  BOOLEAN                                  *NewDhcpAckReceived,     OPTIONAL
 | 
			
		||||
  BOOLEAN                                  *NewProxyOfferReceived,  OPTIONAL
 | 
			
		||||
  BOOLEAN                                  *NewPxeDiscoverValid,    OPTIONAL
 | 
			
		||||
  BOOLEAN                                  *NewPxeReplyReceived,    OPTIONAL
 | 
			
		||||
  BOOLEAN                                  *NewPxeBisReplyReceived, OPTIONAL
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewDhcpDiscover,        OPTIONAL
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewDhcpAck,             OPTIONAL
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewProxyOffer,          OPTIONAL
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewPxeDiscover,         OPTIONAL
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewPxeReply,            OPTIONAL
 | 
			
		||||
  BOOLEAN                                  *NewDhcpDiscoverValid    OPTIONAL,
 | 
			
		||||
  BOOLEAN                                  *NewDhcpAckReceived      OPTIONAL,
 | 
			
		||||
  BOOLEAN                                  *NewProxyOfferReceived   OPTIONAL,
 | 
			
		||||
  BOOLEAN                                  *NewPxeDiscoverValid     OPTIONAL,
 | 
			
		||||
  BOOLEAN                                  *NewPxeReplyReceived     OPTIONAL,
 | 
			
		||||
  BOOLEAN                                  *NewPxeBisReplyReceived  OPTIONAL,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewDhcpDiscover         OPTIONAL,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewDhcpAck              OPTIONAL,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewProxyOffer           OPTIONAL,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewPxeDiscover          OPTIONAL,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewPxeReply             OPTIONAL,
 | 
			
		||||
  IN EFI_PXE_BASE_CODE_PACKET              *NewPxeBisReply          OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// PXE Base Code Protocol structure
 | 
			
		||||
//
 | 
			
		||||
#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION   0x00010000
 | 
			
		||||
#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION  0x00010000
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Revision defined in EFI1.1
 | 
			
		||||
@ -912,25 +911,25 @@ struct _EFI_PXE_BASE_CODE_PROTOCOL {
 | 
			
		||||
  ///  be backwards compatible. If a future version is not backwards compatible
 | 
			
		||||
  ///  it is not the same GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                            Revision;
 | 
			
		||||
  EFI_PXE_BASE_CODE_START           Start;
 | 
			
		||||
  EFI_PXE_BASE_CODE_STOP            Stop;
 | 
			
		||||
  EFI_PXE_BASE_CODE_DHCP            Dhcp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_DISCOVER        Discover;
 | 
			
		||||
  EFI_PXE_BASE_CODE_MTFTP           Mtftp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_WRITE       UdpWrite;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_READ        UdpRead;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_IP_FILTER   SetIpFilter;
 | 
			
		||||
  EFI_PXE_BASE_CODE_ARP             Arp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_PARAMETERS  SetParameters;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_STATION_IP  SetStationIp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_PACKETS     SetPackets;
 | 
			
		||||
  UINT64                              Revision;
 | 
			
		||||
  EFI_PXE_BASE_CODE_START             Start;
 | 
			
		||||
  EFI_PXE_BASE_CODE_STOP              Stop;
 | 
			
		||||
  EFI_PXE_BASE_CODE_DHCP              Dhcp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_DISCOVER          Discover;
 | 
			
		||||
  EFI_PXE_BASE_CODE_MTFTP             Mtftp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_WRITE         UdpWrite;
 | 
			
		||||
  EFI_PXE_BASE_CODE_UDP_READ          UdpRead;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_IP_FILTER     SetIpFilter;
 | 
			
		||||
  EFI_PXE_BASE_CODE_ARP               Arp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_PARAMETERS    SetParameters;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_STATION_IP    SetStationIp;
 | 
			
		||||
  EFI_PXE_BASE_CODE_SET_PACKETS       SetPackets;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The pointer to the EFI_PXE_BASE_CODE_MODE data for this device.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_PXE_BASE_CODE_MODE            *Mode;
 | 
			
		||||
  EFI_PXE_BASE_CODE_MODE              *Mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiPxeBaseCodeProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
  The UEFI Random Number Generator Protocol is used to provide random bits for use
 | 
			
		||||
  in applications, or entropy for seeding other random number generators.
 | 
			
		||||
 | 
			
		||||
Copyright (c) 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) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __EFI_RNG_PROTOCOL_H__
 | 
			
		||||
#define __EFI_RNG_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Global ID for the Random Number Generator Protocol
 | 
			
		||||
@ -101,7 +95,7 @@ typedef EFI_GUID EFI_RNG_ALGORITHM;
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_RNG_GET_INFO) (
 | 
			
		||||
(EFIAPI *EFI_RNG_GET_INFO)(
 | 
			
		||||
  IN EFI_RNG_PROTOCOL             *This,
 | 
			
		||||
  IN OUT UINTN                    *RNGAlgorithmListSize,
 | 
			
		||||
  OUT EFI_RNG_ALGORITHM           *RNGAlgorithmList
 | 
			
		||||
@ -131,9 +125,9 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_RNG_GET_RNG) (
 | 
			
		||||
(EFIAPI *EFI_RNG_GET_RNG)(
 | 
			
		||||
  IN EFI_RNG_PROTOCOL            *This,
 | 
			
		||||
  IN EFI_RNG_ALGORITHM           *RNGAlgorithm, OPTIONAL
 | 
			
		||||
  IN EFI_RNG_ALGORITHM           *RNGAlgorithm  OPTIONAL,
 | 
			
		||||
  IN UINTN                       RNGValueLength,
 | 
			
		||||
  OUT UINT8                      *RNGValue
 | 
			
		||||
  );
 | 
			
		||||
@ -143,16 +137,16 @@ EFI_STATUS
 | 
			
		||||
/// applications, or entropy for seeding other random number generators.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_RNG_PROTOCOL {
 | 
			
		||||
  EFI_RNG_GET_INFO                GetInfo;
 | 
			
		||||
  EFI_RNG_GET_RNG                 GetRNG;
 | 
			
		||||
  EFI_RNG_GET_INFO    GetInfo;
 | 
			
		||||
  EFI_RNG_GET_RNG     GetRNG;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiRngProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid;
 | 
			
		||||
extern EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid;
 | 
			
		||||
extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid;
 | 
			
		||||
extern EFI_GUID gEfiRngAlgorithmX9313DesGuid;
 | 
			
		||||
extern EFI_GUID gEfiRngAlgorithmX931AesGuid;
 | 
			
		||||
extern EFI_GUID gEfiRngAlgorithmRaw;
 | 
			
		||||
extern EFI_GUID  gEfiRngProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiRngAlgorithmSp80090Hash256Guid;
 | 
			
		||||
extern EFI_GUID  gEfiRngAlgorithmSp80090Hmac256Guid;
 | 
			
		||||
extern EFI_GUID  gEfiRngAlgorithmSp80090Ctr256Guid;
 | 
			
		||||
extern EFI_GUID  gEfiRngAlgorithmX9313DesGuid;
 | 
			
		||||
extern EFI_GUID  gEfiRngAlgorithmX931AesGuid;
 | 
			
		||||
extern EFI_GUID  gEfiRngAlgorithmRaw;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,27 +4,26 @@
 | 
			
		||||
  Abstraction of a basic serial device. Targeted at 16550 UART, but
 | 
			
		||||
  could be much more generic.
 | 
			
		||||
 | 
			
		||||
  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  This program and the accompanying materials
 | 
			
		||||
  are licensed and made available under the terms and conditions of the BSD License
 | 
			
		||||
  which accompanies this distribution.  The full text of the license may be found at
 | 
			
		||||
  http://opensource.org/licenses/bsd-license.php
 | 
			
		||||
 | 
			
		||||
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | 
			
		||||
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __SERIAL_IO_PROTOCOL_H__
 | 
			
		||||
#define __SERIAL_IO_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_SERIAL_IO_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#define EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0X6AD9A60F, 0X5815, 0X4C7C, { 0X8A, 0X10, 0X50, 0X53, 0XD2, 0XBF, 0X7A, 0X1B } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
@ -32,11 +31,10 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Backward-compatible with EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_SERIAL_IO_PROTOCOL  SERIAL_IO_INTERFACE;
 | 
			
		||||
typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Parity type that is computed or checked as each character is transmitted or received. If the
 | 
			
		||||
@ -83,13 +81,14 @@ typedef enum {
 | 
			
		||||
//
 | 
			
		||||
// Read Write
 | 
			
		||||
//
 | 
			
		||||
#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE     0x00001000
 | 
			
		||||
#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE     0x00002000
 | 
			
		||||
#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000
 | 
			
		||||
#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE      0x00001000
 | 
			
		||||
#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE      0x00002000
 | 
			
		||||
#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE  0x00004000
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Serial IO Member Functions
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Reset the serial device.
 | 
			
		||||
 | 
			
		||||
@ -127,8 +126,9 @@ EFI_STATUS
 | 
			
		||||
                           value of DefaultStopBits will use the device's default number of
 | 
			
		||||
                           stop bits.
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS      The device was reset.
 | 
			
		||||
  @retval EFI_DEVICE_ERROR The serial device could not be reset.
 | 
			
		||||
  @retval EFI_SUCCESS           The device was reset.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETER One or more attributes has an unsupported value.
 | 
			
		||||
  @retval EFI_DEVICE_ERROR      The serial device is not functioning correctly.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
@ -256,21 +256,22 @@ EFI_STATUS
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32  ControlMask;
 | 
			
		||||
  UINT32    ControlMask;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // current Attributes
 | 
			
		||||
  //
 | 
			
		||||
  UINT32  Timeout;
 | 
			
		||||
  UINT64  BaudRate;
 | 
			
		||||
  UINT32  ReceiveFifoDepth;
 | 
			
		||||
  UINT32  DataBits;
 | 
			
		||||
  UINT32  Parity;
 | 
			
		||||
  UINT32  StopBits;
 | 
			
		||||
  UINT32    Timeout;
 | 
			
		||||
  UINT64    BaudRate;
 | 
			
		||||
  UINT32    ReceiveFifoDepth;
 | 
			
		||||
  UINT32    DataBits;
 | 
			
		||||
  UINT32    Parity;
 | 
			
		||||
  UINT32    StopBits;
 | 
			
		||||
} EFI_SERIAL_IO_MODE;
 | 
			
		||||
 | 
			
		||||
#define EFI_SERIAL_IO_PROTOCOL_REVISION    0x00010000
 | 
			
		||||
#define SERIAL_IO_INTERFACE_REVISION  EFI_SERIAL_IO_PROTOCOL_REVISION
 | 
			
		||||
#define EFI_SERIAL_IO_PROTOCOL_REVISION     0x00010000
 | 
			
		||||
#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1  0x00010001
 | 
			
		||||
#define SERIAL_IO_INTERFACE_REVISION        EFI_SERIAL_IO_PROTOCOL_REVISION
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The Serial I/O protocol is used to communicate with UART-style serial devices.
 | 
			
		||||
@ -283,19 +284,28 @@ struct _EFI_SERIAL_IO_PROTOCOL {
 | 
			
		||||
  /// must be backwards compatible. If a future version is not backwards compatible,
 | 
			
		||||
  /// it is not the same GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                      Revision;
 | 
			
		||||
  EFI_SERIAL_RESET            Reset;
 | 
			
		||||
  EFI_SERIAL_SET_ATTRIBUTES   SetAttributes;
 | 
			
		||||
  EFI_SERIAL_SET_CONTROL_BITS SetControl;
 | 
			
		||||
  EFI_SERIAL_GET_CONTROL_BITS GetControl;
 | 
			
		||||
  EFI_SERIAL_WRITE            Write;
 | 
			
		||||
  EFI_SERIAL_READ             Read;
 | 
			
		||||
  UINT32                         Revision;
 | 
			
		||||
  EFI_SERIAL_RESET               Reset;
 | 
			
		||||
  EFI_SERIAL_SET_ATTRIBUTES      SetAttributes;
 | 
			
		||||
  EFI_SERIAL_SET_CONTROL_BITS    SetControl;
 | 
			
		||||
  EFI_SERIAL_GET_CONTROL_BITS    GetControl;
 | 
			
		||||
  EFI_SERIAL_WRITE               Write;
 | 
			
		||||
  EFI_SERIAL_READ                Read;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to SERIAL_IO_MODE data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_SERIAL_IO_MODE          *Mode;
 | 
			
		||||
  EFI_SERIAL_IO_MODE             *Mode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to a GUID identifying the device connected to the serial port.
 | 
			
		||||
  /// This field is NULL when the protocol is installed by the serial port
 | 
			
		||||
  /// driver and may be populated by a platform driver for a serial port
 | 
			
		||||
  /// with a known device attached. The field will remain NULL if there is
 | 
			
		||||
  /// no platform serial device identification information available.
 | 
			
		||||
  ///
 | 
			
		||||
  CONST EFI_GUID                 *DeviceTypeGuid; // Revision 1.1
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSerialIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSerialIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSerialTerminalDeviceTypeGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -7,42 +7,36 @@
 | 
			
		||||
 | 
			
		||||
  UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
 | 
			
		||||
 | 
			
		||||
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 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 __SIMPLE_FILE_SYSTEM_H__
 | 
			
		||||
#define __SIMPLE_FILE_SYSTEM_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_FILE_PROTOCOL         EFI_FILE_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_FILE_PROTOCOL         *EFI_FILE_HANDLE;
 | 
			
		||||
typedef struct _EFI_FILE_PROTOCOL EFI_FILE_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_FILE_PROTOCOL *EFI_FILE_HANDLE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID name defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define SIMPLE_FILE_SYSTEM_PROTOCOL       EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID
 | 
			
		||||
#define SIMPLE_FILE_SYSTEM_PROTOCOL  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol name defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL   EFI_FILE_IO_INTERFACE;
 | 
			
		||||
typedef EFI_FILE_PROTOCOL                 EFI_FILE;
 | 
			
		||||
typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE;
 | 
			
		||||
typedef EFI_FILE_PROTOCOL               EFI_FILE;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Open the root directory on a volume.
 | 
			
		||||
@ -84,8 +78,8 @@ struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL {
 | 
			
		||||
  /// specified by this specification is 0x00010000. All future revisions
 | 
			
		||||
  /// must be backwards compatible.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                                      Revision;
 | 
			
		||||
  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume;
 | 
			
		||||
  UINT64                                         Revision;
 | 
			
		||||
  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME    OpenVolume;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -138,13 +132,13 @@ EFI_STATUS
 | 
			
		||||
//
 | 
			
		||||
// File attributes
 | 
			
		||||
//
 | 
			
		||||
#define EFI_FILE_READ_ONLY  0x0000000000000001ULL
 | 
			
		||||
#define EFI_FILE_HIDDEN     0x0000000000000002ULL
 | 
			
		||||
#define EFI_FILE_SYSTEM     0x0000000000000004ULL
 | 
			
		||||
#define EFI_FILE_RESERVED   0x0000000000000008ULL
 | 
			
		||||
#define EFI_FILE_DIRECTORY  0x0000000000000010ULL
 | 
			
		||||
#define EFI_FILE_ARCHIVE    0x0000000000000020ULL
 | 
			
		||||
#define EFI_FILE_VALID_ATTR 0x0000000000000037ULL
 | 
			
		||||
#define EFI_FILE_READ_ONLY   0x0000000000000001ULL
 | 
			
		||||
#define EFI_FILE_HIDDEN      0x0000000000000002ULL
 | 
			
		||||
#define EFI_FILE_SYSTEM      0x0000000000000004ULL
 | 
			
		||||
#define EFI_FILE_RESERVED    0x0000000000000008ULL
 | 
			
		||||
#define EFI_FILE_DIRECTORY   0x0000000000000010ULL
 | 
			
		||||
#define EFI_FILE_ARCHIVE     0x0000000000000020ULL
 | 
			
		||||
#define EFI_FILE_VALID_ATTR  0x0000000000000037ULL
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Closes a specified file handle.
 | 
			
		||||
@ -373,12 +367,12 @@ typedef struct {
 | 
			
		||||
  // The caller must be prepared to handle the case where the callback associated with Event
 | 
			
		||||
  // occurs before the original asynchronous I/O request call returns.
 | 
			
		||||
  //
 | 
			
		||||
  EFI_EVENT                   Event;
 | 
			
		||||
  EFI_EVENT     Event;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Defines whether or not the signaled event encountered an error.
 | 
			
		||||
  //
 | 
			
		||||
  EFI_STATUS                  Status;
 | 
			
		||||
  EFI_STATUS    Status;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // For OpenEx():  Not Used, ignored.
 | 
			
		||||
@ -388,7 +382,7 @@ typedef struct {
 | 
			
		||||
  //                In both cases, the size is measured in bytes.
 | 
			
		||||
  // For FlushEx(): Not used, ignored.
 | 
			
		||||
  //
 | 
			
		||||
  UINTN                       BufferSize;
 | 
			
		||||
  UINTN    BufferSize;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // For OpenEx():  Not Used, ignored.
 | 
			
		||||
@ -396,7 +390,7 @@ typedef struct {
 | 
			
		||||
  // For WriteEx(): The buffer of data to write.
 | 
			
		||||
  // For FlushEx(): Not Used, ignored.
 | 
			
		||||
  //
 | 
			
		||||
  VOID                        *Buffer;
 | 
			
		||||
  VOID     *Buffer;
 | 
			
		||||
} EFI_FILE_IO_TOKEN;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -442,7 +436,6 @@ EFI_STATUS
 | 
			
		||||
  IN OUT EFI_FILE_IO_TOKEN    *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Reads data from a file.
 | 
			
		||||
 | 
			
		||||
@ -461,11 +454,10 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_FILE_READ_EX) (
 | 
			
		||||
(EFIAPI *EFI_FILE_READ_EX)(
 | 
			
		||||
  IN EFI_FILE_PROTOCOL        *This,
 | 
			
		||||
  IN OUT EFI_FILE_IO_TOKEN    *Token
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Writes data to a file.
 | 
			
		||||
@ -488,10 +480,10 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_FILE_WRITE_EX) (
 | 
			
		||||
(EFIAPI *EFI_FILE_WRITE_EX)(
 | 
			
		||||
  IN EFI_FILE_PROTOCOL        *This,
 | 
			
		||||
  IN OUT EFI_FILE_IO_TOKEN    *Token
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Flushes all modified data associated with a file to a device.
 | 
			
		||||
@ -514,19 +506,19 @@ EFI_STATUS
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_FILE_FLUSH_EX) (
 | 
			
		||||
(EFIAPI *EFI_FILE_FLUSH_EX)(
 | 
			
		||||
  IN EFI_FILE_PROTOCOL        *This,
 | 
			
		||||
  IN OUT EFI_FILE_IO_TOKEN    *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
#define EFI_FILE_PROTOCOL_REVISION        0x00010000
 | 
			
		||||
#define EFI_FILE_PROTOCOL_REVISION2       0x00020000
 | 
			
		||||
#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
 | 
			
		||||
#define EFI_FILE_PROTOCOL_REVISION         0x00010000
 | 
			
		||||
#define EFI_FILE_PROTOCOL_REVISION2        0x00020000
 | 
			
		||||
#define EFI_FILE_PROTOCOL_LATEST_REVISION  EFI_FILE_PROTOCOL_REVISION2
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Revision defined in EFI1.1.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_FILE_REVISION   EFI_FILE_PROTOCOL_REVISION
 | 
			
		||||
#define EFI_FILE_REVISION  EFI_FILE_PROTOCOL_REVISION
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_FILE_PROTOCOL provides file IO access to supported file systems.
 | 
			
		||||
@ -541,24 +533,23 @@ struct _EFI_FILE_PROTOCOL {
 | 
			
		||||
  /// by this specification is EFI_FILE_PROTOCOL_LATEST_REVISION.
 | 
			
		||||
  /// Future versions are required to be backward compatible to version 1.0.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                Revision;
 | 
			
		||||
  EFI_FILE_OPEN         Open;
 | 
			
		||||
  EFI_FILE_CLOSE        Close;
 | 
			
		||||
  EFI_FILE_DELETE       Delete;
 | 
			
		||||
  EFI_FILE_READ         Read;
 | 
			
		||||
  EFI_FILE_WRITE        Write;
 | 
			
		||||
  EFI_FILE_GET_POSITION GetPosition;
 | 
			
		||||
  EFI_FILE_SET_POSITION SetPosition;
 | 
			
		||||
  EFI_FILE_GET_INFO     GetInfo;
 | 
			
		||||
  EFI_FILE_SET_INFO     SetInfo;
 | 
			
		||||
  EFI_FILE_FLUSH        Flush;
 | 
			
		||||
  EFI_FILE_OPEN_EX      OpenEx;
 | 
			
		||||
  EFI_FILE_READ_EX      ReadEx;
 | 
			
		||||
  EFI_FILE_WRITE_EX     WriteEx;
 | 
			
		||||
  EFI_FILE_FLUSH_EX     FlushEx;
 | 
			
		||||
  UINT64                   Revision;
 | 
			
		||||
  EFI_FILE_OPEN            Open;
 | 
			
		||||
  EFI_FILE_CLOSE           Close;
 | 
			
		||||
  EFI_FILE_DELETE          Delete;
 | 
			
		||||
  EFI_FILE_READ            Read;
 | 
			
		||||
  EFI_FILE_WRITE           Write;
 | 
			
		||||
  EFI_FILE_GET_POSITION    GetPosition;
 | 
			
		||||
  EFI_FILE_SET_POSITION    SetPosition;
 | 
			
		||||
  EFI_FILE_GET_INFO        GetInfo;
 | 
			
		||||
  EFI_FILE_SET_INFO        SetInfo;
 | 
			
		||||
  EFI_FILE_FLUSH           Flush;
 | 
			
		||||
  EFI_FILE_OPEN_EX         OpenEx;
 | 
			
		||||
  EFI_FILE_READ_EX         ReadEx;
 | 
			
		||||
  EFI_FILE_WRITE_EX        WriteEx;
 | 
			
		||||
  EFI_FILE_FLUSH_EX        FlushEx;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSimpleFileSystemProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSimpleFileSystemProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -9,14 +9,8 @@
 | 
			
		||||
  MCast - MultiCast
 | 
			
		||||
  ...
 | 
			
		||||
 | 
			
		||||
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:
 | 
			
		||||
  This Protocol is introduced in EFI Specification 1.10.
 | 
			
		||||
@ -26,20 +20,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __SIMPLE_NETWORK_H__
 | 
			
		||||
#define __SIMPLE_NETWORK_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL  EFI_SIMPLE_NETWORK_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_SIMPLE_NETWORK_PROTOCOL   EFI_SIMPLE_NETWORK;
 | 
			
		||||
typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Simple Network Protocol data structures.
 | 
			
		||||
@ -49,99 +42,99 @@ typedef struct {
 | 
			
		||||
  /// Total number of frames received.  Includes frames with errors and
 | 
			
		||||
  /// dropped frames.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxTotalFrames;
 | 
			
		||||
  UINT64    RxTotalFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of valid frames received and copied into receive buffers.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxGoodFrames;
 | 
			
		||||
  UINT64    RxGoodFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of frames below the minimum length for the media.
 | 
			
		||||
  /// This would be <64 for ethernet.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxUndersizeFrames;
 | 
			
		||||
  UINT64    RxUndersizeFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of frames longer than the maxminum length for the
 | 
			
		||||
  /// media.  This would be >1500 for ethernet.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxOversizeFrames;
 | 
			
		||||
  UINT64    RxOversizeFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Valid frames that were dropped because receive buffers were full.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxDroppedFrames;
 | 
			
		||||
  UINT64    RxDroppedFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of valid unicast frames received and not dropped.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxUnicastFrames;
 | 
			
		||||
  UINT64    RxUnicastFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of valid broadcast frames received and not dropped.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxBroadcastFrames;
 | 
			
		||||
  UINT64    RxBroadcastFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of valid mutlicast frames received and not dropped.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxMulticastFrames;
 | 
			
		||||
  UINT64    RxMulticastFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of frames w/ CRC or alignment errors.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxCrcErrorFrames;
 | 
			
		||||
  UINT64    RxCrcErrorFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Total number of bytes received.  Includes frames with errors
 | 
			
		||||
  /// and dropped frames.
 | 
			
		||||
  //
 | 
			
		||||
  UINT64  RxTotalBytes;
 | 
			
		||||
  UINT64    RxTotalBytes;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Transmit statistics.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  TxTotalFrames;
 | 
			
		||||
  UINT64  TxGoodFrames;
 | 
			
		||||
  UINT64  TxUndersizeFrames;
 | 
			
		||||
  UINT64  TxOversizeFrames;
 | 
			
		||||
  UINT64  TxDroppedFrames;
 | 
			
		||||
  UINT64  TxUnicastFrames;
 | 
			
		||||
  UINT64  TxBroadcastFrames;
 | 
			
		||||
  UINT64  TxMulticastFrames;
 | 
			
		||||
  UINT64  TxCrcErrorFrames;
 | 
			
		||||
  UINT64  TxTotalBytes;
 | 
			
		||||
  UINT64    TxTotalFrames;
 | 
			
		||||
  UINT64    TxGoodFrames;
 | 
			
		||||
  UINT64    TxUndersizeFrames;
 | 
			
		||||
  UINT64    TxOversizeFrames;
 | 
			
		||||
  UINT64    TxDroppedFrames;
 | 
			
		||||
  UINT64    TxUnicastFrames;
 | 
			
		||||
  UINT64    TxBroadcastFrames;
 | 
			
		||||
  UINT64    TxMulticastFrames;
 | 
			
		||||
  UINT64    TxCrcErrorFrames;
 | 
			
		||||
  UINT64    TxTotalBytes;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of collisions detection on this subnet.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  Collisions;
 | 
			
		||||
  UINT64    Collisions;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of frames destined for unsupported protocol.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  UnsupportedProtocol;
 | 
			
		||||
  UINT64    UnsupportedProtocol;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of valid frames received that were duplicated.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxDuplicatedFrames;
 | 
			
		||||
  UINT64    RxDuplicatedFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of encrypted frames received that failed to decrypt.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  RxDecryptErrorFrames;
 | 
			
		||||
  UINT64    RxDecryptErrorFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of frames that failed to transmit after exceeding the retry limit.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  TxErrorFrames;
 | 
			
		||||
  UINT64    TxErrorFrames;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Number of frames transmitted successfully after more than one attempt.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  TxRetryFrames;
 | 
			
		||||
  UINT64    TxRetryFrames;
 | 
			
		||||
} EFI_NETWORK_STATISTICS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -162,97 +155,98 @@ typedef enum {
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS            0x08
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST  0x10
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT              0x01
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT             0x02
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT              0x04
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT             0x08
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT   0x01
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT  0x02
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT   0x04
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT  0x08
 | 
			
		||||
 | 
			
		||||
#define MAX_MCAST_FILTER_CNT                              16
 | 
			
		||||
#define MAX_MCAST_FILTER_CNT  16
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// Reports the current state of the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          State;
 | 
			
		||||
  UINT32             State;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size, in bytes, of the network interface's HW address.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          HwAddressSize;
 | 
			
		||||
  UINT32             HwAddressSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size, in bytes, of the network interface's media header.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          MediaHeaderSize;
 | 
			
		||||
  UINT32             MediaHeaderSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The maximum size, in bytes, of the packets supported by the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          MaxPacketSize;
 | 
			
		||||
  UINT32             MaxPacketSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size, in bytes, of the NVRAM device attached to the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          NvRamSize;
 | 
			
		||||
  UINT32             NvRamSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size that must be used for all NVRAM reads and writes. The
 | 
			
		||||
  /// start address for NVRAM read and write operations and the total
 | 
			
		||||
  /// length of those operations, must be a multiple of this value. The
 | 
			
		||||
  /// legal values for this field are 0, 1, 2, 4, and 8.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          NvRamAccessSize;
 | 
			
		||||
  UINT32             NvRamAccessSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The multicast receive filter settings supported by the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          ReceiveFilterMask;
 | 
			
		||||
  UINT32             ReceiveFilterMask;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The current multicast receive filter settings.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          ReceiveFilterSetting;
 | 
			
		||||
  UINT32             ReceiveFilterSetting;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The maximum number of multicast address receive filters supported by the driver.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          MaxMCastFilterCount;
 | 
			
		||||
  UINT32             MaxMCastFilterCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The current number of multicast address receive filters.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32          MCastFilterCount;
 | 
			
		||||
  UINT32             MCastFilterCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Array containing the addresses of the current multicast address receive filters.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
 | 
			
		||||
  EFI_MAC_ADDRESS    MCastFilter[MAX_MCAST_FILTER_CNT];
 | 
			
		||||
  ///
 | 
			
		||||
  /// The current HW MAC address for the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MAC_ADDRESS CurrentAddress;
 | 
			
		||||
  EFI_MAC_ADDRESS    CurrentAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The current HW MAC address for broadcast packets.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MAC_ADDRESS BroadcastAddress;
 | 
			
		||||
  EFI_MAC_ADDRESS    BroadcastAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The permanent HW MAC address for the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_MAC_ADDRESS PermanentAddress;
 | 
			
		||||
  EFI_MAC_ADDRESS    PermanentAddress;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The interface type of the network interface.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT8           IfType;
 | 
			
		||||
  UINT8              IfType;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the HW MAC address can be changed.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN         MacAddressChangeable;
 | 
			
		||||
  BOOLEAN            MacAddressChangeable;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the network interface can transmit more than one packet at a time.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN         MultipleTxSupported;
 | 
			
		||||
  BOOLEAN            MultipleTxSupported;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if the presence of media can be determined; otherwise FALSE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN         MediaPresentSupported;
 | 
			
		||||
  BOOLEAN            MediaPresentSupported;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if media are connected to the network interface; otherwise FALSE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN         MediaPresent;
 | 
			
		||||
  BOOLEAN            MediaPresent;
 | 
			
		||||
} EFI_SIMPLE_NETWORK_MODE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Protocol Member Functions
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Changes the state of a network interface from "stopped" to "started".
 | 
			
		||||
 | 
			
		||||
@ -640,7 +634,7 @@ EFI_STATUS
 | 
			
		||||
//
 | 
			
		||||
// Revision defined in EFI1.1
 | 
			
		||||
//
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION   EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
 | 
			
		||||
#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION  EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access
 | 
			
		||||
@ -654,30 +648,30 @@ struct _EFI_SIMPLE_NETWORK_PROTOCOL {
 | 
			
		||||
  /// be backwards compatible. If a future version is not backwards compatible
 | 
			
		||||
  /// it is not the same GUID.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                              Revision;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_START            Start;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_STOP             Stop;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_INITIALIZE       Initialize;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_RESET            Reset;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_SHUTDOWN         Shutdown;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_RECEIVE_FILTERS  ReceiveFilters;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_STATION_ADDRESS  StationAddress;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_STATISTICS       Statistics;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC  MCastIpToMac;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_NVDATA           NvData;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_GET_STATUS       GetStatus;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_TRANSMIT         Transmit;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_RECEIVE          Receive;
 | 
			
		||||
  UINT64                                Revision;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_START              Start;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_STOP               Stop;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_INITIALIZE         Initialize;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_RESET              Reset;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_SHUTDOWN           Shutdown;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_RECEIVE_FILTERS    ReceiveFilters;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_STATION_ADDRESS    StationAddress;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_STATISTICS         Statistics;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC    MCastIpToMac;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_NVDATA             NvData;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_GET_STATUS         GetStatus;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_TRANSMIT           Transmit;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_RECEIVE            Receive;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Event used with WaitForEvent() to wait for a packet to be received.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                           WaitForPacket;
 | 
			
		||||
  EFI_EVENT                             WaitForPacket;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_SIMPLE_NETWORK_MODE             *Mode;
 | 
			
		||||
  EFI_SIMPLE_NETWORK_MODE               *Mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSimpleNetworkProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSimpleNetworkProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,28 +3,22 @@
 | 
			
		||||
 | 
			
		||||
  Abstraction of a very simple pointer device like a mouse or trackball.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __SIMPLE_POINTER_H__
 | 
			
		||||
#define __SIMPLE_POINTER_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SIMPLE_POINTER_PROTOCOL  EFI_SIMPLE_POINTER_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Data structures
 | 
			
		||||
@ -33,25 +27,25 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The signed distance in counts that the pointer device has been moved along the x-axis.
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   RelativeMovementX;
 | 
			
		||||
  INT32      RelativeMovementX;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The signed distance in counts that the pointer device has been moved along the y-axis.
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   RelativeMovementY;
 | 
			
		||||
  INT32      RelativeMovementY;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The signed distance in counts that the pointer device has been moved along the z-axis.
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   RelativeMovementZ;
 | 
			
		||||
  INT32      RelativeMovementZ;
 | 
			
		||||
  ///
 | 
			
		||||
  /// If TRUE, then the left button of the pointer device is being
 | 
			
		||||
  /// pressed. If FALSE, then the left button of the pointer device is not being pressed.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN LeftButton;
 | 
			
		||||
  BOOLEAN    LeftButton;
 | 
			
		||||
  ///
 | 
			
		||||
  /// If TRUE, then the right button of the pointer device is being
 | 
			
		||||
  /// pressed. If FALSE, then the right button of the pointer device is not being pressed.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN RightButton;
 | 
			
		||||
  BOOLEAN    RightButton;
 | 
			
		||||
} EFI_SIMPLE_POINTER_STATE;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -59,25 +53,25 @@ typedef struct {
 | 
			
		||||
  /// The resolution of the pointer device on the x-axis in counts/mm.
 | 
			
		||||
  /// If 0, then the pointer device does not support an x-axis.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  ResolutionX;
 | 
			
		||||
  UINT64     ResolutionX;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The resolution of the pointer device on the y-axis in counts/mm.
 | 
			
		||||
  /// If 0, then the pointer device does not support an x-axis.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  ResolutionY;
 | 
			
		||||
  UINT64     ResolutionY;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The resolution of the pointer device on the z-axis in counts/mm.
 | 
			
		||||
  /// If 0, then the pointer device does not support an x-axis.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  ResolutionZ;
 | 
			
		||||
  UINT64     ResolutionZ;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if a left button is present on the pointer device. Otherwise FALSE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN LeftButton;
 | 
			
		||||
  BOOLEAN    LeftButton;
 | 
			
		||||
  ///
 | 
			
		||||
  /// TRUE if a right button is present on the pointer device. Otherwise FALSE.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN RightButton;
 | 
			
		||||
  BOOLEAN    RightButton;
 | 
			
		||||
} EFI_SIMPLE_POINTER_MODE;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -117,7 +111,7 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(
 | 
			
		||||
  IN EFI_SIMPLE_POINTER_PROTOCOL          *This,
 | 
			
		||||
  IN OUT EFI_SIMPLE_POINTER_STATE         *State
 | 
			
		||||
  OUT EFI_SIMPLE_POINTER_STATE            *State
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -128,18 +122,18 @@ EFI_STATUS
 | 
			
		||||
/// retrieve the capabilities of the pointer device.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_SIMPLE_POINTER_PROTOCOL {
 | 
			
		||||
  EFI_SIMPLE_POINTER_RESET      Reset;
 | 
			
		||||
  EFI_SIMPLE_POINTER_GET_STATE  GetState;
 | 
			
		||||
  EFI_SIMPLE_POINTER_RESET        Reset;
 | 
			
		||||
  EFI_SIMPLE_POINTER_GET_STATE    GetState;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Event to use with WaitForEvent() to wait for input from the pointer device.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                     WaitForInput;
 | 
			
		||||
  EFI_EVENT                       WaitForInput;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to EFI_SIMPLE_POINTER_MODE data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_SIMPLE_POINTER_MODE       *Mode;
 | 
			
		||||
  EFI_SIMPLE_POINTER_MODE         *Mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSimplePointerProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSimplePointerProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,44 +5,38 @@
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__
 | 
			
		||||
#define __SIMPLE_TEXT_IN_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
    0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL  EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID name defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define SIMPLE_INPUT_PROTOCOL   EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
 | 
			
		||||
#define SIMPLE_INPUT_PROTOCOL  EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol name in EFI1.1 for backward-compatible.
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL  SIMPLE_INPUT_INTERFACE;
 | 
			
		||||
typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The keystroke information for the key that was pressed.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16  ScanCode;
 | 
			
		||||
  CHAR16  UnicodeChar;
 | 
			
		||||
  UINT16    ScanCode;
 | 
			
		||||
  CHAR16    UnicodeChar;
 | 
			
		||||
} EFI_INPUT_KEY;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -122,14 +116,14 @@ EFI_STATUS
 | 
			
		||||
/// It is the minimum required protocol for ConsoleIn.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL {
 | 
			
		||||
  EFI_INPUT_RESET     Reset;
 | 
			
		||||
  EFI_INPUT_READ_KEY  ReadKeyStroke;
 | 
			
		||||
  EFI_INPUT_RESET       Reset;
 | 
			
		||||
  EFI_INPUT_READ_KEY    ReadKeyStroke;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Event to use with WaitForEvent() to wait for a key to be available
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT           WaitForKey;
 | 
			
		||||
  EFI_EVENT             WaitForKey;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSimpleTextInProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSimpleTextInProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,28 +5,21 @@
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __SIMPLE_TEXT_IN_EX_H__
 | 
			
		||||
#define __SIMPLE_TEXT_IN_EX_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/SimpleTextIn.h>
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
 | 
			
		||||
  {0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -59,8 +52,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_INPUT_RESET_EX)(
 | 
			
		||||
  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
 | 
			
		||||
  IN BOOLEAN                           ExtendedVerification
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_KEY_TOGGLE_STATE. The toggle states are defined.
 | 
			
		||||
@ -76,25 +68,25 @@ typedef struct _EFI_KEY_STATE {
 | 
			
		||||
  /// returned value is valid only if the high
 | 
			
		||||
  /// order bit has been set.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32                KeyShiftState;
 | 
			
		||||
  UINT32                  KeyShiftState;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Reflects the current internal state of
 | 
			
		||||
  /// various toggled attributes. The returned
 | 
			
		||||
  /// value is valid only if the high order
 | 
			
		||||
  /// bit has been set.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_KEY_TOGGLE_STATE  KeyToggleState;
 | 
			
		||||
  EFI_KEY_TOGGLE_STATE    KeyToggleState;
 | 
			
		||||
} EFI_KEY_STATE;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The EFI scan code and Unicode value returned from the input device.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_INPUT_KEY   Key;
 | 
			
		||||
  EFI_INPUT_KEY    Key;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The current state of various toggled attributes as well as input modifier values.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_KEY_STATE   KeyState;
 | 
			
		||||
  EFI_KEY_STATE    KeyState;
 | 
			
		||||
} EFI_KEY_DATA;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -103,55 +95,55 @@ typedef struct {
 | 
			
		||||
//
 | 
			
		||||
// Shift state
 | 
			
		||||
//
 | 
			
		||||
#define EFI_SHIFT_STATE_VALID     0x80000000
 | 
			
		||||
#define EFI_RIGHT_SHIFT_PRESSED   0x00000001
 | 
			
		||||
#define EFI_LEFT_SHIFT_PRESSED    0x00000002
 | 
			
		||||
#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
 | 
			
		||||
#define EFI_LEFT_CONTROL_PRESSED  0x00000008
 | 
			
		||||
#define EFI_RIGHT_ALT_PRESSED     0x00000010
 | 
			
		||||
#define EFI_LEFT_ALT_PRESSED      0x00000020
 | 
			
		||||
#define EFI_RIGHT_LOGO_PRESSED    0x00000040
 | 
			
		||||
#define EFI_LEFT_LOGO_PRESSED     0x00000080
 | 
			
		||||
#define EFI_MENU_KEY_PRESSED      0x00000100
 | 
			
		||||
#define EFI_SYS_REQ_PRESSED       0x00000200
 | 
			
		||||
#define EFI_SHIFT_STATE_VALID      0x80000000
 | 
			
		||||
#define EFI_RIGHT_SHIFT_PRESSED    0x00000001
 | 
			
		||||
#define EFI_LEFT_SHIFT_PRESSED     0x00000002
 | 
			
		||||
#define EFI_RIGHT_CONTROL_PRESSED  0x00000004
 | 
			
		||||
#define EFI_LEFT_CONTROL_PRESSED   0x00000008
 | 
			
		||||
#define EFI_RIGHT_ALT_PRESSED      0x00000010
 | 
			
		||||
#define EFI_LEFT_ALT_PRESSED       0x00000020
 | 
			
		||||
#define EFI_RIGHT_LOGO_PRESSED     0x00000040
 | 
			
		||||
#define EFI_LEFT_LOGO_PRESSED      0x00000080
 | 
			
		||||
#define EFI_MENU_KEY_PRESSED       0x00000100
 | 
			
		||||
#define EFI_SYS_REQ_PRESSED        0x00000200
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Toggle state
 | 
			
		||||
//
 | 
			
		||||
#define EFI_TOGGLE_STATE_VALID    0x80
 | 
			
		||||
#define EFI_KEY_STATE_EXPOSED     0x40
 | 
			
		||||
#define EFI_SCROLL_LOCK_ACTIVE    0x01
 | 
			
		||||
#define EFI_NUM_LOCK_ACTIVE       0x02
 | 
			
		||||
#define EFI_CAPS_LOCK_ACTIVE      0x04
 | 
			
		||||
#define EFI_TOGGLE_STATE_VALID  0x80
 | 
			
		||||
#define EFI_KEY_STATE_EXPOSED   0x40
 | 
			
		||||
#define EFI_SCROLL_LOCK_ACTIVE  0x01
 | 
			
		||||
#define EFI_NUM_LOCK_ACTIVE     0x02
 | 
			
		||||
#define EFI_CAPS_LOCK_ACTIVE    0x04
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// EFI Scan codes
 | 
			
		||||
//
 | 
			
		||||
#define SCAN_F11                  0x0015
 | 
			
		||||
#define SCAN_F12                  0x0016
 | 
			
		||||
#define SCAN_PAUSE                0x0048
 | 
			
		||||
#define SCAN_F13                  0x0068
 | 
			
		||||
#define SCAN_F14                  0x0069
 | 
			
		||||
#define SCAN_F15                  0x006A
 | 
			
		||||
#define SCAN_F16                  0x006B
 | 
			
		||||
#define SCAN_F17                  0x006C
 | 
			
		||||
#define SCAN_F18                  0x006D
 | 
			
		||||
#define SCAN_F19                  0x006E
 | 
			
		||||
#define SCAN_F20                  0x006F
 | 
			
		||||
#define SCAN_F21                  0x0070
 | 
			
		||||
#define SCAN_F22                  0x0071
 | 
			
		||||
#define SCAN_F23                  0x0072
 | 
			
		||||
#define SCAN_F24                  0x0073
 | 
			
		||||
#define SCAN_MUTE                 0x007F
 | 
			
		||||
#define SCAN_VOLUME_UP            0x0080
 | 
			
		||||
#define SCAN_VOLUME_DOWN          0x0081
 | 
			
		||||
#define SCAN_BRIGHTNESS_UP        0x0100
 | 
			
		||||
#define SCAN_BRIGHTNESS_DOWN      0x0101
 | 
			
		||||
#define SCAN_SUSPEND              0x0102
 | 
			
		||||
#define SCAN_HIBERNATE            0x0103
 | 
			
		||||
#define SCAN_TOGGLE_DISPLAY       0x0104
 | 
			
		||||
#define SCAN_RECOVERY             0x0105
 | 
			
		||||
#define SCAN_EJECT                0x0106
 | 
			
		||||
#define SCAN_F11              0x0015
 | 
			
		||||
#define SCAN_F12              0x0016
 | 
			
		||||
#define SCAN_PAUSE            0x0048
 | 
			
		||||
#define SCAN_F13              0x0068
 | 
			
		||||
#define SCAN_F14              0x0069
 | 
			
		||||
#define SCAN_F15              0x006A
 | 
			
		||||
#define SCAN_F16              0x006B
 | 
			
		||||
#define SCAN_F17              0x006C
 | 
			
		||||
#define SCAN_F18              0x006D
 | 
			
		||||
#define SCAN_F19              0x006E
 | 
			
		||||
#define SCAN_F20              0x006F
 | 
			
		||||
#define SCAN_F21              0x0070
 | 
			
		||||
#define SCAN_F22              0x0071
 | 
			
		||||
#define SCAN_F23              0x0072
 | 
			
		||||
#define SCAN_F24              0x0073
 | 
			
		||||
#define SCAN_MUTE             0x007F
 | 
			
		||||
#define SCAN_VOLUME_UP        0x0080
 | 
			
		||||
#define SCAN_VOLUME_DOWN      0x0081
 | 
			
		||||
#define SCAN_BRIGHTNESS_UP    0x0100
 | 
			
		||||
#define SCAN_BRIGHTNESS_DOWN  0x0101
 | 
			
		||||
#define SCAN_SUSPEND          0x0102
 | 
			
		||||
#define SCAN_HIBERNATE        0x0103
 | 
			
		||||
#define SCAN_TOGGLE_DISPLAY   0x0104
 | 
			
		||||
#define SCAN_RECOVERY         0x0105
 | 
			
		||||
#define SCAN_EJECT            0x0106
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The function reads the next keystroke from the input device. If
 | 
			
		||||
@ -192,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.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
@ -207,7 +196,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_INPUT_READ_KEY_EX)(
 | 
			
		||||
  IN  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
 | 
			
		||||
  OUT EFI_KEY_DATA                      *KeyData
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The SetState() function allows the input device hardware to
 | 
			
		||||
@ -234,7 +223,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_SET_STATE)(
 | 
			
		||||
  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
 | 
			
		||||
  IN EFI_KEY_TOGGLE_STATE              *KeyToggleState
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The function will be called when the key sequence is typed specified by KeyData.
 | 
			
		||||
@ -243,7 +232,7 @@ typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
 | 
			
		||||
  IN EFI_KEY_DATA *KeyData
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The RegisterKeystrokeNotify() function registers a function
 | 
			
		||||
@ -253,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.
 | 
			
		||||
@ -277,7 +267,7 @@ EFI_STATUS
 | 
			
		||||
  IN  EFI_KEY_DATA                      *KeyData,
 | 
			
		||||
  IN  EFI_KEY_NOTIFY_FUNCTION           KeyNotificationFunction,
 | 
			
		||||
  OUT VOID                              **NotifyHandle
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  The UnregisterKeystrokeNotify() function removes the
 | 
			
		||||
@ -288,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.
 | 
			
		||||
@ -299,8 +289,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
 | 
			
		||||
  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,
 | 
			
		||||
  IN VOID                               *NotificationHandle
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL is used on the ConsoleIn
 | 
			
		||||
@ -308,20 +297,18 @@ EFI_STATUS
 | 
			
		||||
/// which allows a variety of extended shift state information to be
 | 
			
		||||
/// returned.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{
 | 
			
		||||
  EFI_INPUT_RESET_EX              Reset;
 | 
			
		||||
  EFI_INPUT_READ_KEY_EX           ReadKeyStrokeEx;
 | 
			
		||||
struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
 | 
			
		||||
  EFI_INPUT_RESET_EX                 Reset;
 | 
			
		||||
  EFI_INPUT_READ_KEY_EX              ReadKeyStrokeEx;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Event to use with WaitForEvent() to wait for a key to be available.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_EVENT                       WaitForKeyEx;
 | 
			
		||||
  EFI_SET_STATE                   SetState;
 | 
			
		||||
  EFI_REGISTER_KEYSTROKE_NOTIFY   RegisterKeyNotify;
 | 
			
		||||
  EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
 | 
			
		||||
  EFI_EVENT                          WaitForKeyEx;
 | 
			
		||||
  EFI_SET_STATE                      SetState;
 | 
			
		||||
  EFI_REGISTER_KEYSTROKE_NOTIFY      RegisterKeyNotify;
 | 
			
		||||
  EFI_UNREGISTER_KEYSTROKE_NOTIFY    UnregisterKeyNotify;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSimpleTextInputExProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSimpleTextInputExProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,21 +6,15 @@
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __SIMPLE_TEXT_OUT_H__
 | 
			
		||||
#define __SIMPLE_TEXT_OUT_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -30,17 +24,17 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define SIMPLE_TEXT_OUTPUT_PROTOCOL   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID
 | 
			
		||||
#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;
 | 
			
		||||
typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Define's for required EFI Unicode Box Draw characters
 | 
			
		||||
// Defines for required EFI Unicode Box Draw characters
 | 
			
		||||
//
 | 
			
		||||
#define BOXDRAW_HORIZONTAL                  0x2500
 | 
			
		||||
#define BOXDRAW_VERTICAL                    0x2502
 | 
			
		||||
@ -92,39 +86,39 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
 | 
			
		||||
//
 | 
			
		||||
// EFI Required Geometric Shapes Code Chart
 | 
			
		||||
//
 | 
			
		||||
#define GEOMETRICSHAPE_UP_TRIANGLE    0x25b2
 | 
			
		||||
#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
 | 
			
		||||
#define GEOMETRICSHAPE_DOWN_TRIANGLE  0x25bc
 | 
			
		||||
#define GEOMETRICSHAPE_LEFT_TRIANGLE  0x25c4
 | 
			
		||||
#define GEOMETRICSHAPE_UP_TRIANGLE     0x25b2
 | 
			
		||||
#define GEOMETRICSHAPE_RIGHT_TRIANGLE  0x25ba
 | 
			
		||||
#define GEOMETRICSHAPE_DOWN_TRIANGLE   0x25bc
 | 
			
		||||
#define GEOMETRICSHAPE_LEFT_TRIANGLE   0x25c4
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// EFI Required Arrow shapes
 | 
			
		||||
//
 | 
			
		||||
#define ARROW_LEFT  0x2190
 | 
			
		||||
#define ARROW_UP    0x2191
 | 
			
		||||
#define ARROW_RIGHT 0x2192
 | 
			
		||||
#define ARROW_DOWN  0x2193
 | 
			
		||||
#define ARROW_LEFT   0x2190
 | 
			
		||||
#define ARROW_UP     0x2191
 | 
			
		||||
#define ARROW_RIGHT  0x2192
 | 
			
		||||
#define ARROW_DOWN   0x2193
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// EFI Console Colours
 | 
			
		||||
//
 | 
			
		||||
#define EFI_BLACK                 0x00
 | 
			
		||||
#define EFI_BLUE                  0x01
 | 
			
		||||
#define EFI_GREEN                 0x02
 | 
			
		||||
#define EFI_CYAN                  (EFI_BLUE | EFI_GREEN)
 | 
			
		||||
#define EFI_RED                   0x04
 | 
			
		||||
#define EFI_MAGENTA               (EFI_BLUE | EFI_RED)
 | 
			
		||||
#define EFI_BROWN                 (EFI_GREEN | EFI_RED)
 | 
			
		||||
#define EFI_LIGHTGRAY             (EFI_BLUE | EFI_GREEN | EFI_RED)
 | 
			
		||||
#define EFI_BRIGHT                0x08
 | 
			
		||||
#define EFI_DARKGRAY              (EFI_BLACK | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTBLUE             (EFI_BLUE | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTGREEN            (EFI_GREEN | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTCYAN             (EFI_CYAN | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTRED              (EFI_RED | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTMAGENTA          (EFI_MAGENTA | EFI_BRIGHT)
 | 
			
		||||
#define EFI_YELLOW                (EFI_BROWN | EFI_BRIGHT)
 | 
			
		||||
#define EFI_WHITE                 (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
 | 
			
		||||
#define EFI_BLACK         0x00
 | 
			
		||||
#define EFI_BLUE          0x01
 | 
			
		||||
#define EFI_GREEN         0x02
 | 
			
		||||
#define EFI_CYAN          (EFI_BLUE | EFI_GREEN)
 | 
			
		||||
#define EFI_RED           0x04
 | 
			
		||||
#define EFI_MAGENTA       (EFI_BLUE | EFI_RED)
 | 
			
		||||
#define EFI_BROWN         (EFI_GREEN | EFI_RED)
 | 
			
		||||
#define EFI_LIGHTGRAY     (EFI_BLUE | EFI_GREEN | EFI_RED)
 | 
			
		||||
#define EFI_BRIGHT        0x08
 | 
			
		||||
#define EFI_DARKGRAY      (EFI_BLACK | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTBLUE     (EFI_BLUE | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTGREEN    (EFI_GREEN | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTCYAN     (EFI_CYAN | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTRED      (EFI_RED | EFI_BRIGHT)
 | 
			
		||||
#define EFI_LIGHTMAGENTA  (EFI_MAGENTA | EFI_BRIGHT)
 | 
			
		||||
#define EFI_YELLOW        (EFI_BROWN | EFI_BRIGHT)
 | 
			
		||||
#define EFI_WHITE         (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Macro to accept color values in their raw form to create
 | 
			
		||||
@ -137,7 +131,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
 | 
			
		||||
//
 | 
			
		||||
// Do not use EFI_BACKGROUND_xxx values with this macro.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4))
 | 
			
		||||
#define EFI_TEXT_ATTR(Foreground, Background)  ((Foreground) | ((Background) << 4))
 | 
			
		||||
 | 
			
		||||
#define EFI_BACKGROUND_BLACK      0x00
 | 
			
		||||
#define EFI_BACKGROUND_BLUE       0x10
 | 
			
		||||
@ -159,7 +153,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
 | 
			
		||||
#define EFI_WIDE_ATTRIBUTE  0x80
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Reset the text output device hardware and optionaly run diagnostics
 | 
			
		||||
  Reset the text output device hardware and optionally run diagnostics
 | 
			
		||||
 | 
			
		||||
  @param  This                 The protocol instance pointer.
 | 
			
		||||
  @param  ExtendedVerification Driver may perform more exhaustive verification
 | 
			
		||||
@ -358,7 +352,7 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of modes supported by QueryMode () and SetMode ().
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   MaxMode;
 | 
			
		||||
  INT32    MaxMode;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // current settings
 | 
			
		||||
@ -367,23 +361,23 @@ typedef struct {
 | 
			
		||||
  ///
 | 
			
		||||
  /// The text mode of the output device(s).
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   Mode;
 | 
			
		||||
  INT32      Mode;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The current character output attribute.
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   Attribute;
 | 
			
		||||
  INT32      Attribute;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The cursor's column.
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   CursorColumn;
 | 
			
		||||
  INT32      CursorColumn;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The cursor's row.
 | 
			
		||||
  ///
 | 
			
		||||
  INT32   CursorRow;
 | 
			
		||||
  INT32      CursorRow;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The cursor is currently visbile or not.
 | 
			
		||||
  /// The cursor is currently visible or not.
 | 
			
		||||
  ///
 | 
			
		||||
  BOOLEAN CursorVisible;
 | 
			
		||||
  BOOLEAN    CursorVisible;
 | 
			
		||||
} EFI_SIMPLE_TEXT_OUTPUT_MODE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -393,25 +387,25 @@ typedef struct {
 | 
			
		||||
/// devices is at least 80 x 25 characters.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
 | 
			
		||||
  EFI_TEXT_RESET                Reset;
 | 
			
		||||
  EFI_TEXT_RESET                  Reset;
 | 
			
		||||
 | 
			
		||||
  EFI_TEXT_STRING               OutputString;
 | 
			
		||||
  EFI_TEXT_TEST_STRING          TestString;
 | 
			
		||||
  EFI_TEXT_STRING                 OutputString;
 | 
			
		||||
  EFI_TEXT_TEST_STRING            TestString;
 | 
			
		||||
 | 
			
		||||
  EFI_TEXT_QUERY_MODE           QueryMode;
 | 
			
		||||
  EFI_TEXT_SET_MODE             SetMode;
 | 
			
		||||
  EFI_TEXT_SET_ATTRIBUTE        SetAttribute;
 | 
			
		||||
  EFI_TEXT_QUERY_MODE             QueryMode;
 | 
			
		||||
  EFI_TEXT_SET_MODE               SetMode;
 | 
			
		||||
  EFI_TEXT_SET_ATTRIBUTE          SetAttribute;
 | 
			
		||||
 | 
			
		||||
  EFI_TEXT_CLEAR_SCREEN         ClearScreen;
 | 
			
		||||
  EFI_TEXT_SET_CURSOR_POSITION  SetCursorPosition;
 | 
			
		||||
  EFI_TEXT_ENABLE_CURSOR        EnableCursor;
 | 
			
		||||
  EFI_TEXT_CLEAR_SCREEN           ClearScreen;
 | 
			
		||||
  EFI_TEXT_SET_CURSOR_POSITION    SetCursorPosition;
 | 
			
		||||
  EFI_TEXT_ENABLE_CURSOR          EnableCursor;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// Pointer to SIMPLE_TEXT_OUTPUT_MODE data.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_SIMPLE_TEXT_OUTPUT_MODE   *Mode;
 | 
			
		||||
  EFI_SIMPLE_TEXT_OUTPUT_MODE     *Mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiSimpleTextOutProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiSimpleTextOutProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,21 +2,15 @@
 | 
			
		||||
  TCG Service Protocol as defined in TCG_EFI_Protocol_1_22_Final
 | 
			
		||||
  See http://trustedcomputinggroup.org for the latest specification
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2007 - 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 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) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _TCG_SERVICE_PROTOCOL_H_
 | 
			
		||||
#define _TCG_SERVICE_PROTOCOL_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/UefiTcgPlatform.h>
 | 
			
		||||
 | 
			
		||||
@ -26,10 +20,10 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8  Major;
 | 
			
		||||
  UINT8  Minor;
 | 
			
		||||
  UINT8  RevMajor;
 | 
			
		||||
  UINT8  RevMinor;
 | 
			
		||||
  UINT8    Major;
 | 
			
		||||
  UINT8    Minor;
 | 
			
		||||
  UINT8    RevMajor;
 | 
			
		||||
  UINT8    RevMinor;
 | 
			
		||||
} TCG_VERSION;
 | 
			
		||||
 | 
			
		||||
typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY {
 | 
			
		||||
@ -42,7 +36,7 @@ typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY {
 | 
			
		||||
  BOOLEAN        TPMDeactivatedFlag;  /// 01h = TPM currently deactivated.
 | 
			
		||||
} TCG_EFI_BOOT_SERVICE_CAPABILITY;
 | 
			
		||||
 | 
			
		||||
typedef UINT32   TCG_ALGORITHM_ID;
 | 
			
		||||
typedef UINT32 TCG_ALGORITHM_ID;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  This service provides EFI protocol capability information, state information
 | 
			
		||||
@ -70,7 +64,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_TCG_STATUS_CHECK)(
 | 
			
		||||
  IN      EFI_TCG_PROTOCOL          *This,
 | 
			
		||||
  OUT     TCG_EFI_BOOT_SERVICE_CAPABILITY
 | 
			
		||||
                                    *ProtocolCapability,
 | 
			
		||||
  *ProtocolCapability,
 | 
			
		||||
  OUT     UINT32                    *TCGFeatureFlags,
 | 
			
		||||
  OUT     EFI_PHYSICAL_ADDRESS      *EventLogLocation,
 | 
			
		||||
  OUT     EFI_PHYSICAL_ADDRESS      *EventLogLastEntry
 | 
			
		||||
@ -184,20 +178,20 @@ EFI_STATUS
 | 
			
		||||
  IN      TCG_ALGORITHM_ID          AlgorithmId,
 | 
			
		||||
  IN OUT  TCG_PCR_EVENT             *TCGLogData,
 | 
			
		||||
  IN OUT  UINT32                    *EventNumber,
 | 
			
		||||
     OUT  EFI_PHYSICAL_ADDRESS      *EventLogLastEntry
 | 
			
		||||
  OUT  EFI_PHYSICAL_ADDRESS      *EventLogLastEntry
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_TCG Protocol abstracts TCG activity.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_TCG_PROTOCOL {
 | 
			
		||||
  EFI_TCG_STATUS_CHECK              StatusCheck;
 | 
			
		||||
  EFI_TCG_HASH_ALL                  HashAll;
 | 
			
		||||
  EFI_TCG_LOG_EVENT                 LogEvent;
 | 
			
		||||
  EFI_TCG_PASS_THROUGH_TO_TPM       PassThroughToTpm;
 | 
			
		||||
  EFI_TCG_HASH_LOG_EXTEND_EVENT     HashLogExtendEvent;
 | 
			
		||||
  EFI_TCG_STATUS_CHECK             StatusCheck;
 | 
			
		||||
  EFI_TCG_HASH_ALL                 HashAll;
 | 
			
		||||
  EFI_TCG_LOG_EVENT                LogEvent;
 | 
			
		||||
  EFI_TCG_PASS_THROUGH_TO_TPM      PassThroughToTpm;
 | 
			
		||||
  EFI_TCG_HASH_LOG_EXTEND_EVENT    HashLogExtendEvent;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiTcgProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiTcgProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,8 @@
 | 
			
		||||
  and destroy child of the driver to communicate with other host using TCP protocol.
 | 
			
		||||
  The EFI TCPv4 Protocol provides services to send and receive data stream.
 | 
			
		||||
 | 
			
		||||
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 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:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.0.
 | 
			
		||||
@ -21,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_TCP4_PROTOCOL_H__
 | 
			
		||||
#define __EFI_TCP4_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/Ip4.h>
 | 
			
		||||
 | 
			
		||||
@ -42,11 +36,11 @@ typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL;
 | 
			
		||||
/// The definition in here is only present to provide backwards compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_HANDLE              InstanceHandle;
 | 
			
		||||
  EFI_IPv4_ADDRESS        LocalAddress;
 | 
			
		||||
  UINT16                  LocalPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS        RemoteAddress;
 | 
			
		||||
  UINT16                  RemotePort;
 | 
			
		||||
  EFI_HANDLE          InstanceHandle;
 | 
			
		||||
  EFI_IPv4_ADDRESS    LocalAddress;
 | 
			
		||||
  UINT16              LocalPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    RemoteAddress;
 | 
			
		||||
  UINT16              RemotePort;
 | 
			
		||||
} EFI_TCP4_SERVICE_POINT;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -54,77 +48,77 @@ typedef struct {
 | 
			
		||||
/// The definition in here is only present to provide backwards compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_HANDLE              DriverHandle;
 | 
			
		||||
  UINT32                  ServiceCount;
 | 
			
		||||
  EFI_TCP4_SERVICE_POINT  Services[1];
 | 
			
		||||
  EFI_HANDLE                DriverHandle;
 | 
			
		||||
  UINT32                    ServiceCount;
 | 
			
		||||
  EFI_TCP4_SERVICE_POINT    Services[1];
 | 
			
		||||
} EFI_TCP4_VARIABLE_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  BOOLEAN                 UseDefaultAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS        StationAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS        SubnetMask;
 | 
			
		||||
  UINT16                  StationPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS        RemoteAddress;
 | 
			
		||||
  UINT16                  RemotePort;
 | 
			
		||||
  BOOLEAN                 ActiveFlag;
 | 
			
		||||
  BOOLEAN             UseDefaultAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    StationAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
  UINT16              StationPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    RemoteAddress;
 | 
			
		||||
  UINT16              RemotePort;
 | 
			
		||||
  BOOLEAN             ActiveFlag;
 | 
			
		||||
} EFI_TCP4_ACCESS_POINT;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32                  ReceiveBufferSize;
 | 
			
		||||
  UINT32                  SendBufferSize;
 | 
			
		||||
  UINT32                  MaxSynBackLog;
 | 
			
		||||
  UINT32                  ConnectionTimeout;
 | 
			
		||||
  UINT32                  DataRetries;
 | 
			
		||||
  UINT32                  FinTimeout;
 | 
			
		||||
  UINT32                  TimeWaitTimeout;
 | 
			
		||||
  UINT32                  KeepAliveProbes;
 | 
			
		||||
  UINT32                  KeepAliveTime;
 | 
			
		||||
  UINT32                  KeepAliveInterval;
 | 
			
		||||
  BOOLEAN                 EnableNagle;
 | 
			
		||||
  BOOLEAN                 EnableTimeStamp;
 | 
			
		||||
  BOOLEAN                 EnableWindowScaling;
 | 
			
		||||
  BOOLEAN                 EnableSelectiveAck;
 | 
			
		||||
  BOOLEAN                 EnablePathMtuDiscovery;
 | 
			
		||||
  UINT32     ReceiveBufferSize;
 | 
			
		||||
  UINT32     SendBufferSize;
 | 
			
		||||
  UINT32     MaxSynBackLog;
 | 
			
		||||
  UINT32     ConnectionTimeout;
 | 
			
		||||
  UINT32     DataRetries;
 | 
			
		||||
  UINT32     FinTimeout;
 | 
			
		||||
  UINT32     TimeWaitTimeout;
 | 
			
		||||
  UINT32     KeepAliveProbes;
 | 
			
		||||
  UINT32     KeepAliveTime;
 | 
			
		||||
  UINT32     KeepAliveInterval;
 | 
			
		||||
  BOOLEAN    EnableNagle;
 | 
			
		||||
  BOOLEAN    EnableTimeStamp;
 | 
			
		||||
  BOOLEAN    EnableWindowScaling;
 | 
			
		||||
  BOOLEAN    EnableSelectiveAck;
 | 
			
		||||
  BOOLEAN    EnablePathMtuDiscovery;
 | 
			
		||||
} EFI_TCP4_OPTION;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  //
 | 
			
		||||
  // I/O parameters
 | 
			
		||||
  //
 | 
			
		||||
  UINT8                   TypeOfService;
 | 
			
		||||
  UINT8                   TimeToLive;
 | 
			
		||||
  UINT8                    TypeOfService;
 | 
			
		||||
  UINT8                    TimeToLive;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Access Point
 | 
			
		||||
  //
 | 
			
		||||
  EFI_TCP4_ACCESS_POINT   AccessPoint;
 | 
			
		||||
  EFI_TCP4_ACCESS_POINT    AccessPoint;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // TCP Control Options
 | 
			
		||||
  //
 | 
			
		||||
  EFI_TCP4_OPTION         *ControlOption;
 | 
			
		||||
  EFI_TCP4_OPTION          *ControlOption;
 | 
			
		||||
} EFI_TCP4_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// TCP4 connnection state
 | 
			
		||||
///
 | 
			
		||||
typedef enum {
 | 
			
		||||
  Tcp4StateClosed         = 0,
 | 
			
		||||
  Tcp4StateListen         = 1,
 | 
			
		||||
  Tcp4StateSynSent        = 2,
 | 
			
		||||
  Tcp4StateSynReceived    = 3,
 | 
			
		||||
  Tcp4StateEstablished    = 4,
 | 
			
		||||
  Tcp4StateFinWait1       = 5,
 | 
			
		||||
  Tcp4StateFinWait2       = 6,
 | 
			
		||||
  Tcp4StateClosing        = 7,
 | 
			
		||||
  Tcp4StateTimeWait       = 8,
 | 
			
		||||
  Tcp4StateCloseWait      = 9,
 | 
			
		||||
  Tcp4StateLastAck        = 10
 | 
			
		||||
  Tcp4StateClosed      = 0,
 | 
			
		||||
  Tcp4StateListen      = 1,
 | 
			
		||||
  Tcp4StateSynSent     = 2,
 | 
			
		||||
  Tcp4StateSynReceived = 3,
 | 
			
		||||
  Tcp4StateEstablished = 4,
 | 
			
		||||
  Tcp4StateFinWait1    = 5,
 | 
			
		||||
  Tcp4StateFinWait2    = 6,
 | 
			
		||||
  Tcp4StateClosing     = 7,
 | 
			
		||||
  Tcp4StateTimeWait    = 8,
 | 
			
		||||
  Tcp4StateCloseWait   = 9,
 | 
			
		||||
  Tcp4StateLastAck     = 10
 | 
			
		||||
} EFI_TCP4_CONNECTION_STATE;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_EVENT   Event;
 | 
			
		||||
  EFI_STATUS  Status;
 | 
			
		||||
  EFI_EVENT     Event;
 | 
			
		||||
  EFI_STATUS    Status;
 | 
			
		||||
} EFI_TCP4_COMPLETION_TOKEN;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -154,17 +148,17 @@ typedef struct {
 | 
			
		||||
  /// EFI_DEVICE_ERROR:         An unexpected system or network error occurred.
 | 
			
		||||
  /// EFI_NO_MEDIA:             There was a media error.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN CompletionToken;
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN    CompletionToken;
 | 
			
		||||
} EFI_TCP4_CONNECTION_TOKEN;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN CompletionToken;
 | 
			
		||||
  EFI_HANDLE                NewChildHandle;
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN    CompletionToken;
 | 
			
		||||
  EFI_HANDLE                   NewChildHandle;
 | 
			
		||||
} EFI_TCP4_LISTEN_TOKEN;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32 FragmentLength;
 | 
			
		||||
  VOID   *FragmentBuffer;
 | 
			
		||||
  UINT32    FragmentLength;
 | 
			
		||||
  VOID      *FragmentBuffer;
 | 
			
		||||
} EFI_TCP4_FRAGMENT_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
@ -210,22 +204,22 @@ typedef struct {
 | 
			
		||||
  /// EFI_DEVICE_ERROR:         An unexpected system or network error occurs.
 | 
			
		||||
  /// EFI_NO_MEDIA:             There was a media error.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN CompletionToken;
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN    CompletionToken;
 | 
			
		||||
  union {
 | 
			
		||||
    ///
 | 
			
		||||
    /// When this token is used for receiving, RxData is a pointer to EFI_TCP4_RECEIVE_DATA.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_TCP4_RECEIVE_DATA   *RxData;
 | 
			
		||||
    EFI_TCP4_RECEIVE_DATA     *RxData;
 | 
			
		||||
    ///
 | 
			
		||||
    /// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA.
 | 
			
		||||
    ///
 | 
			
		||||
    EFI_TCP4_TRANSMIT_DATA  *TxData;
 | 
			
		||||
    EFI_TCP4_TRANSMIT_DATA    *TxData;
 | 
			
		||||
  } Packet;
 | 
			
		||||
} EFI_TCP4_IO_TOKEN;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN CompletionToken;
 | 
			
		||||
  BOOLEAN                   AbortOnClose;
 | 
			
		||||
  EFI_TCP4_COMPLETION_TOKEN    CompletionToken;
 | 
			
		||||
  BOOLEAN                      AbortOnClose;
 | 
			
		||||
} EFI_TCP4_CLOSE_TOKEN;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -289,7 +283,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_TCP4_CONFIG_DATA                *TcpConfigData OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Add or delete a route entry to the route table
 | 
			
		||||
 | 
			
		||||
@ -361,7 +354,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_TCP4_CONNECTION_TOKEN           *ConnectionToken
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation.
 | 
			
		||||
 | 
			
		||||
@ -428,7 +420,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_TCP4_IO_TOKEN                   *Token
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Places an asynchronous receive request into the receiving queue.
 | 
			
		||||
 | 
			
		||||
@ -533,7 +524,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_TCP4_COMPLETION_TOKEN           *Token OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Poll to receive incoming data and transmit outgoing segments.
 | 
			
		||||
 | 
			
		||||
@ -561,19 +551,19 @@ EFI_STATUS
 | 
			
		||||
/// such as the routing table.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_TCP4_PROTOCOL {
 | 
			
		||||
  EFI_TCP4_GET_MODE_DATA                 GetModeData;
 | 
			
		||||
  EFI_TCP4_CONFIGURE                     Configure;
 | 
			
		||||
  EFI_TCP4_ROUTES                        Routes;
 | 
			
		||||
  EFI_TCP4_CONNECT                       Connect;
 | 
			
		||||
  EFI_TCP4_ACCEPT                        Accept;
 | 
			
		||||
  EFI_TCP4_TRANSMIT                      Transmit;
 | 
			
		||||
  EFI_TCP4_RECEIVE                       Receive;
 | 
			
		||||
  EFI_TCP4_CLOSE                         Close;
 | 
			
		||||
  EFI_TCP4_CANCEL                        Cancel;
 | 
			
		||||
  EFI_TCP4_POLL                          Poll;
 | 
			
		||||
  EFI_TCP4_GET_MODE_DATA    GetModeData;
 | 
			
		||||
  EFI_TCP4_CONFIGURE        Configure;
 | 
			
		||||
  EFI_TCP4_ROUTES           Routes;
 | 
			
		||||
  EFI_TCP4_CONNECT          Connect;
 | 
			
		||||
  EFI_TCP4_ACCEPT           Accept;
 | 
			
		||||
  EFI_TCP4_TRANSMIT         Transmit;
 | 
			
		||||
  EFI_TCP4_RECEIVE          Receive;
 | 
			
		||||
  EFI_TCP4_CLOSE            Close;
 | 
			
		||||
  EFI_TCP4_CANCEL           Cancel;
 | 
			
		||||
  EFI_TCP4_POLL             Poll;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiTcp4ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiTcp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiTcp4ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,14 +4,8 @@
 | 
			
		||||
  The EFI UDPv4 Protocol provides simple packet-oriented services
 | 
			
		||||
  to transmit and receive UDP packets.
 | 
			
		||||
 | 
			
		||||
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 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:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.0.
 | 
			
		||||
@ -21,11 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
#ifndef __EFI_UDP4_PROTOCOL_H__
 | 
			
		||||
#define __EFI_UDP4_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/Ip4.h>
 | 
			
		||||
//
 | 
			
		||||
//GUID definitions
 | 
			
		||||
// GUID definitions
 | 
			
		||||
//
 | 
			
		||||
#define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -44,11 +38,11 @@ typedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL;
 | 
			
		||||
/// The definition in here is only present to provide backwards compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_HANDLE              InstanceHandle;
 | 
			
		||||
  EFI_IPv4_ADDRESS        LocalAddress;
 | 
			
		||||
  UINT16                  LocalPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS        RemoteAddress;
 | 
			
		||||
  UINT16                  RemotePort;
 | 
			
		||||
  EFI_HANDLE          InstanceHandle;
 | 
			
		||||
  EFI_IPv4_ADDRESS    LocalAddress;
 | 
			
		||||
  UINT16              LocalPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    RemoteAddress;
 | 
			
		||||
  UINT16              RemotePort;
 | 
			
		||||
} EFI_UDP4_SERVICE_POINT;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -56,52 +50,52 @@ typedef struct {
 | 
			
		||||
/// The definition in here is only present to provide backwards compatability.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_HANDLE              DriverHandle;
 | 
			
		||||
  UINT32                  ServiceCount;
 | 
			
		||||
  EFI_UDP4_SERVICE_POINT  Services[1];
 | 
			
		||||
  EFI_HANDLE                DriverHandle;
 | 
			
		||||
  UINT32                    ServiceCount;
 | 
			
		||||
  EFI_UDP4_SERVICE_POINT    Services[1];
 | 
			
		||||
} EFI_UDP4_VARIABLE_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT32             FragmentLength;
 | 
			
		||||
  VOID               *FragmentBuffer;
 | 
			
		||||
  UINT32    FragmentLength;
 | 
			
		||||
  VOID      *FragmentBuffer;
 | 
			
		||||
} EFI_UDP4_FRAGMENT_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_IPv4_ADDRESS   SourceAddress;
 | 
			
		||||
  UINT16             SourcePort;
 | 
			
		||||
  EFI_IPv4_ADDRESS   DestinationAddress;
 | 
			
		||||
  UINT16             DestinationPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SourceAddress;
 | 
			
		||||
  UINT16              SourcePort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    DestinationAddress;
 | 
			
		||||
  UINT16              DestinationPort;
 | 
			
		||||
} EFI_UDP4_SESSION_DATA;
 | 
			
		||||
typedef struct {
 | 
			
		||||
  //
 | 
			
		||||
  // Receiving Filters
 | 
			
		||||
  //
 | 
			
		||||
  BOOLEAN            AcceptBroadcast;
 | 
			
		||||
  BOOLEAN            AcceptPromiscuous;
 | 
			
		||||
  BOOLEAN            AcceptAnyPort;
 | 
			
		||||
  BOOLEAN            AllowDuplicatePort;
 | 
			
		||||
  BOOLEAN             AcceptBroadcast;
 | 
			
		||||
  BOOLEAN             AcceptPromiscuous;
 | 
			
		||||
  BOOLEAN             AcceptAnyPort;
 | 
			
		||||
  BOOLEAN             AllowDuplicatePort;
 | 
			
		||||
  //
 | 
			
		||||
  // I/O parameters
 | 
			
		||||
  //
 | 
			
		||||
  UINT8              TypeOfService;
 | 
			
		||||
  UINT8              TimeToLive;
 | 
			
		||||
  BOOLEAN            DoNotFragment;
 | 
			
		||||
  UINT32             ReceiveTimeout;
 | 
			
		||||
  UINT32             TransmitTimeout;
 | 
			
		||||
  UINT8               TypeOfService;
 | 
			
		||||
  UINT8               TimeToLive;
 | 
			
		||||
  BOOLEAN             DoNotFragment;
 | 
			
		||||
  UINT32              ReceiveTimeout;
 | 
			
		||||
  UINT32              TransmitTimeout;
 | 
			
		||||
  //
 | 
			
		||||
  // Access Point
 | 
			
		||||
  //
 | 
			
		||||
  BOOLEAN            UseDefaultAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS   StationAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS   SubnetMask;
 | 
			
		||||
  UINT16             StationPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS   RemoteAddress;
 | 
			
		||||
  UINT16             RemotePort;
 | 
			
		||||
  BOOLEAN             UseDefaultAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    StationAddress;
 | 
			
		||||
  EFI_IPv4_ADDRESS    SubnetMask;
 | 
			
		||||
  UINT16              StationPort;
 | 
			
		||||
  EFI_IPv4_ADDRESS    RemoteAddress;
 | 
			
		||||
  UINT16              RemotePort;
 | 
			
		||||
} EFI_UDP4_CONFIG_DATA;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_UDP4_SESSION_DATA     *UdpSessionData;       //OPTIONAL
 | 
			
		||||
  EFI_IPv4_ADDRESS          *GatewayAddress;       //OPTIONAL
 | 
			
		||||
  EFI_UDP4_SESSION_DATA     *UdpSessionData;       // OPTIONAL
 | 
			
		||||
  EFI_IPv4_ADDRESS          *GatewayAddress;       // OPTIONAL
 | 
			
		||||
  UINT32                    DataLength;
 | 
			
		||||
  UINT32                    FragmentCount;
 | 
			
		||||
  EFI_UDP4_FRAGMENT_DATA    FragmentTable[1];
 | 
			
		||||
@ -116,13 +110,12 @@ typedef struct {
 | 
			
		||||
  EFI_UDP4_FRAGMENT_DATA    FragmentTable[1];
 | 
			
		||||
} EFI_UDP4_RECEIVE_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  EFI_EVENT                 Event;
 | 
			
		||||
  EFI_STATUS                Status;
 | 
			
		||||
  EFI_EVENT     Event;
 | 
			
		||||
  EFI_STATUS    Status;
 | 
			
		||||
  union {
 | 
			
		||||
    EFI_UDP4_RECEIVE_DATA   *RxData;
 | 
			
		||||
    EFI_UDP4_TRANSMIT_DATA  *TxData;
 | 
			
		||||
    EFI_UDP4_RECEIVE_DATA     *RxData;
 | 
			
		||||
    EFI_UDP4_TRANSMIT_DATA    *TxData;
 | 
			
		||||
  } Packet;
 | 
			
		||||
} EFI_UDP4_COMPLETION_TOKEN;
 | 
			
		||||
 | 
			
		||||
@ -156,7 +149,6 @@ EFI_STATUS
 | 
			
		||||
  OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4
 | 
			
		||||
  Protocol.
 | 
			
		||||
@ -431,17 +423,17 @@ EFI_STATUS
 | 
			
		||||
/// such as the routing table and group table, which are independent from each other.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_UDP4_PROTOCOL {
 | 
			
		||||
  EFI_UDP4_GET_MODE_DATA        GetModeData;
 | 
			
		||||
  EFI_UDP4_CONFIGURE            Configure;
 | 
			
		||||
  EFI_UDP4_GROUPS               Groups;
 | 
			
		||||
  EFI_UDP4_ROUTES               Routes;
 | 
			
		||||
  EFI_UDP4_TRANSMIT             Transmit;
 | 
			
		||||
  EFI_UDP4_RECEIVE              Receive;
 | 
			
		||||
  EFI_UDP4_CANCEL               Cancel;
 | 
			
		||||
  EFI_UDP4_POLL                 Poll;
 | 
			
		||||
  EFI_UDP4_GET_MODE_DATA    GetModeData;
 | 
			
		||||
  EFI_UDP4_CONFIGURE        Configure;
 | 
			
		||||
  EFI_UDP4_GROUPS           Groups;
 | 
			
		||||
  EFI_UDP4_ROUTES           Routes;
 | 
			
		||||
  EFI_UDP4_TRANSMIT         Transmit;
 | 
			
		||||
  EFI_UDP4_RECEIVE          Receive;
 | 
			
		||||
  EFI_UDP4_CANCEL           Cancel;
 | 
			
		||||
  EFI_UDP4_POLL             Poll;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiUdp4ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUdp4ServiceBindingProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUdp4ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,22 +3,15 @@
 | 
			
		||||
 | 
			
		||||
  Abstraction of a very simple graphics device.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __UGA_DRAW_H__
 | 
			
		||||
#define __UGA_DRAW_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_UGA_DRAW_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -75,15 +68,15 @@ EFI_STATUS
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 Blue;
 | 
			
		||||
  UINT8 Green;
 | 
			
		||||
  UINT8 Red;
 | 
			
		||||
  UINT8 Reserved;
 | 
			
		||||
  UINT8    Blue;
 | 
			
		||||
  UINT8    Green;
 | 
			
		||||
  UINT8    Red;
 | 
			
		||||
  UINT8    Reserved;
 | 
			
		||||
} EFI_UGA_PIXEL;
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
  EFI_UGA_PIXEL Pixel;
 | 
			
		||||
  UINT32        Raw;
 | 
			
		||||
  EFI_UGA_PIXEL    Pixel;
 | 
			
		||||
  UINT32           Raw;
 | 
			
		||||
} EFI_UGA_PIXEL_UNION;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -135,14 +128,14 @@ typedef enum {
 | 
			
		||||
 | 
			
		||||
    @retval EFI_SUCCESS           - The Blt operation completed.
 | 
			
		||||
    @retval EFI_INVALID_PARAMETER - BltOperation is not valid.
 | 
			
		||||
    @retval EFI_DEVICE_ERROR      - A hardware error occured writting to the video buffer.
 | 
			
		||||
    @retval EFI_DEVICE_ERROR      - A hardware error occurred writting to the video buffer.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
typedef
 | 
			
		||||
EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)(
 | 
			
		||||
  IN  EFI_UGA_DRAW_PROTOCOL                   * This,
 | 
			
		||||
  IN  EFI_UGA_PIXEL                           * BltBuffer, OPTIONAL
 | 
			
		||||
  IN  EFI_UGA_DRAW_PROTOCOL                   *This,
 | 
			
		||||
  IN  EFI_UGA_PIXEL                           *BltBuffer  OPTIONAL,
 | 
			
		||||
  IN  EFI_UGA_BLT_OPERATION                   BltOperation,
 | 
			
		||||
  IN  UINTN                                   SourceX,
 | 
			
		||||
  IN  UINTN                                   SourceY,
 | 
			
		||||
@ -158,11 +151,11 @@ EFI_STATUS
 | 
			
		||||
/// copy pixels to and from the graphics controller's frame buffer.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_UGA_DRAW_PROTOCOL {
 | 
			
		||||
  EFI_UGA_DRAW_PROTOCOL_GET_MODE  GetMode;
 | 
			
		||||
  EFI_UGA_DRAW_PROTOCOL_SET_MODE  SetMode;
 | 
			
		||||
  EFI_UGA_DRAW_PROTOCOL_BLT       Blt;
 | 
			
		||||
  EFI_UGA_DRAW_PROTOCOL_GET_MODE    GetMode;
 | 
			
		||||
  EFI_UGA_DRAW_PROTOCOL_SET_MODE    SetMode;
 | 
			
		||||
  EFI_UGA_DRAW_PROTOCOL_BLT         Blt;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiUgaDrawProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUgaDrawProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -3,21 +3,15 @@
 | 
			
		||||
  This protocol is used to allow code running in the boot services environment
 | 
			
		||||
  to perform lexical comparison functions on Unicode strings for given languages.
 | 
			
		||||
 | 
			
		||||
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 __UNICODE_COLLATION_H__
 | 
			
		||||
#define __UNICODE_COLLATION_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_UNICODE_COLLATION_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -29,27 +23,27 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_UNICODE_COLLATION_PROTOCOL  EFI_UNICODE_COLLATION_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol GUID name defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
#define UNICODE_COLLATION_PROTOCOL              EFI_UNICODE_COLLATION_PROTOCOL_GUID
 | 
			
		||||
#define UNICODE_COLLATION_PROTOCOL  EFI_UNICODE_COLLATION_PROTOCOL_GUID
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol defined in EFI1.1.
 | 
			
		||||
///
 | 
			
		||||
typedef EFI_UNICODE_COLLATION_PROTOCOL          UNICODE_COLLATION_INTERFACE;
 | 
			
		||||
typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Protocol data structures and defines
 | 
			
		||||
///
 | 
			
		||||
#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff)
 | 
			
		||||
#define EFI_UNICODE_BYTE_ORDER_MARK  (CHAR16) (0xfeff)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Protocol member functions
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Performs a case-insensitive comparison of two Null-terminated strings.
 | 
			
		||||
 | 
			
		||||
@ -169,26 +163,26 @@ BOOLEAN
 | 
			
		||||
/// comparisons of strings.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_UNICODE_COLLATION_PROTOCOL {
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRICOLL    StriColl;
 | 
			
		||||
  EFI_UNICODE_COLLATION_METAIMATCH  MetaiMatch;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRLWR      StrLwr;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRUPR      StrUpr;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRICOLL      StriColl;
 | 
			
		||||
  EFI_UNICODE_COLLATION_METAIMATCH    MetaiMatch;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRLWR        StrLwr;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRUPR        StrUpr;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // for supporting fat volumes
 | 
			
		||||
  //
 | 
			
		||||
  EFI_UNICODE_COLLATION_FATTOSTR    FatToStr;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRTOFAT    StrToFat;
 | 
			
		||||
  EFI_UNICODE_COLLATION_FATTOSTR      FatToStr;
 | 
			
		||||
  EFI_UNICODE_COLLATION_STRTOFAT      StrToFat;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// A Null-terminated ASCII string array that contains one or more language codes.
 | 
			
		||||
  /// When this field is used for UnicodeCollation2, it is specified in RFC 4646 format.
 | 
			
		||||
  /// When it is used for UnicodeCollation, it is specified in ISO 639-2 format.
 | 
			
		||||
  ///
 | 
			
		||||
  CHAR8                             *SupportedLanguages;
 | 
			
		||||
  CHAR8                               *SupportedLanguages;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
 | 
			
		||||
extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUnicodeCollationProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUnicodeCollation2ProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -4,21 +4,15 @@
 | 
			
		||||
  running in the EFI boot services environment, to perform data transactions over
 | 
			
		||||
  a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.
 | 
			
		||||
 | 
			
		||||
  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  This program and the accompanying materials
 | 
			
		||||
  are licensed and made available under the terms and conditions of the BSD License
 | 
			
		||||
  which accompanies this distribution.  The full text of the license may be found at
 | 
			
		||||
  http://opensource.org/licenses/bsd-license.php
 | 
			
		||||
 | 
			
		||||
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | 
			
		||||
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _USB2_HOSTCONTROLLER_H_
 | 
			
		||||
#define _USB2_HOSTCONTROLLER_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/UsbIo.h>
 | 
			
		||||
 | 
			
		||||
@ -32,35 +26,33 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16          PortStatus;        ///< Contains current port status bitmap.
 | 
			
		||||
  UINT16          PortChangeStatus;  ///< Contains current port status change bitmap.
 | 
			
		||||
  UINT16    PortStatus;              ///< Contains current port status bitmap.
 | 
			
		||||
  UINT16    PortChangeStatus;        ///< Contains current port status change bitmap.
 | 
			
		||||
} EFI_USB_PORT_STATUS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_USB_PORT_STATUS.PortStatus bit definition
 | 
			
		||||
///
 | 
			
		||||
#define USB_PORT_STAT_CONNECTION    0x0001
 | 
			
		||||
#define USB_PORT_STAT_ENABLE        0x0002
 | 
			
		||||
#define USB_PORT_STAT_SUSPEND       0x0004
 | 
			
		||||
#define USB_PORT_STAT_OVERCURRENT   0x0008
 | 
			
		||||
#define USB_PORT_STAT_RESET         0x0010
 | 
			
		||||
#define USB_PORT_STAT_POWER         0x0100
 | 
			
		||||
#define USB_PORT_STAT_LOW_SPEED     0x0200
 | 
			
		||||
#define USB_PORT_STAT_HIGH_SPEED    0x0400
 | 
			
		||||
#define USB_PORT_STAT_SUPER_SPEED   0x0800
 | 
			
		||||
#define USB_PORT_STAT_OWNER         0x2000
 | 
			
		||||
#define USB_PORT_STAT_CONNECTION   0x0001
 | 
			
		||||
#define USB_PORT_STAT_ENABLE       0x0002
 | 
			
		||||
#define USB_PORT_STAT_SUSPEND      0x0004
 | 
			
		||||
#define USB_PORT_STAT_OVERCURRENT  0x0008
 | 
			
		||||
#define USB_PORT_STAT_RESET        0x0010
 | 
			
		||||
#define USB_PORT_STAT_POWER        0x0100
 | 
			
		||||
#define USB_PORT_STAT_LOW_SPEED    0x0200
 | 
			
		||||
#define USB_PORT_STAT_HIGH_SPEED   0x0400
 | 
			
		||||
#define USB_PORT_STAT_SUPER_SPEED  0x0800
 | 
			
		||||
#define USB_PORT_STAT_OWNER        0x2000
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_USB_PORT_STATUS.PortChangeStatus bit definition
 | 
			
		||||
///
 | 
			
		||||
#define USB_PORT_STAT_C_CONNECTION  0x0001
 | 
			
		||||
#define USB_PORT_STAT_C_ENABLE      0x0002
 | 
			
		||||
#define USB_PORT_STAT_C_SUSPEND     0x0004
 | 
			
		||||
#define USB_PORT_STAT_C_OVERCURRENT 0x0008
 | 
			
		||||
#define USB_PORT_STAT_C_RESET       0x0010
 | 
			
		||||
 | 
			
		||||
#define USB_PORT_STAT_C_CONNECTION   0x0001
 | 
			
		||||
#define USB_PORT_STAT_C_ENABLE       0x0002
 | 
			
		||||
#define USB_PORT_STAT_C_SUSPEND      0x0004
 | 
			
		||||
#define USB_PORT_STAT_C_OVERCURRENT  0x0008
 | 
			
		||||
#define USB_PORT_STAT_C_RESET        0x0010
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Usb port features value
 | 
			
		||||
@ -80,14 +72,14 @@ typedef enum {
 | 
			
		||||
  EfiUsbPortResetChange       = 20
 | 
			
		||||
} EFI_USB_PORT_FEATURE;
 | 
			
		||||
 | 
			
		||||
#define EFI_USB_SPEED_FULL      0x0000  ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_LOW       0x0001  ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_HIGH      0x0002  ///< 480 Mb/s, USB 2.0 EHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_SUPER     0x0003  ///< 4.8 Gb/s, USB 3.0 XHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_FULL   0x0000     ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_LOW    0x0001     ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_HIGH   0x0002     ///< 480 Mb/s, USB 2.0 EHCI HC.
 | 
			
		||||
#define EFI_USB_SPEED_SUPER  0x0003     ///< 4.8 Gb/s, USB 3.0 XHCI HC.
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8      TranslatorHubAddress; ///< device address
 | 
			
		||||
  UINT8      TranslatorPortNumber; ///< the port number of the hub that device is connected to.
 | 
			
		||||
  UINT8    TranslatorHubAddress;   ///< device address
 | 
			
		||||
  UINT8    TranslatorPortNumber;   ///< the port number of the hub that device is connected to.
 | 
			
		||||
} EFI_USB2_HC_TRANSACTION_TRANSLATOR;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -122,6 +114,7 @@ EFI_STATUS
 | 
			
		||||
#define EFI_USB_HC_RESET_HOST_CONTROLLER    0x0002
 | 
			
		||||
#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG  0x0004
 | 
			
		||||
#define EFI_USB_HC_RESET_HOST_WITH_DEBUG    0x0008
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Provides software reset for the USB host controller.
 | 
			
		||||
 | 
			
		||||
@ -200,7 +193,7 @@ EFI_STATUS
 | 
			
		||||
(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE)(
 | 
			
		||||
  IN        EFI_USB2_HC_PROTOCOL    *This,
 | 
			
		||||
  OUT       EFI_USB_HC_STATE        *State
 | 
			
		||||
);
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Sets the USB host controller to a specific state.
 | 
			
		||||
@ -266,7 +259,7 @@ EFI_STATUS
 | 
			
		||||
  OUT    UINT32                             *TransferResult
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
#define EFI_USB_MAX_BULK_BUFFER_NUM 10
 | 
			
		||||
#define EFI_USB_MAX_BULK_BUFFER_NUM  10
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Submits bulk transfer to a bulk endpoint of a USB device.
 | 
			
		||||
@ -409,8 +402,8 @@ EFI_STATUS
 | 
			
		||||
  OUT    UINT32                                      *TransferResult
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
#define EFI_USB_MAX_ISO_BUFFER_NUM  7
 | 
			
		||||
#define EFI_USB_MAX_ISO_BUFFER_NUM1 2
 | 
			
		||||
#define EFI_USB_MAX_ISO_BUFFER_NUM   7
 | 
			
		||||
#define EFI_USB_MAX_ISO_BUFFER_NUM1  2
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Submits isochronous transfer to an isochronous endpoint of a USB device.
 | 
			
		||||
@ -632,35 +625,35 @@ EFI_STATUS
 | 
			
		||||
/// instance, and an EFI_USB2_HC_PROTOCOL instance.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_USB2_HC_PROTOCOL {
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_GET_CAPABILITY              GetCapability;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_RESET                       Reset;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_GET_STATE                   GetState;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_SET_STATE                   SetState;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER            ControlTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_BULK_TRANSFER               BulkTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER    AsyncInterruptTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER     SyncInterruptTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER        IsochronousTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER  AsyncIsochronousTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS     GetRootHubPortStatus;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE    SetRootHubPortFeature;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE  ClearRootHubPortFeature;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_GET_CAPABILITY                GetCapability;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_RESET                         Reset;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_GET_STATE                     GetState;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_SET_STATE                     SetState;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER              ControlTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_BULK_TRANSFER                 BulkTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER      AsyncInterruptTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER       SyncInterruptTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER          IsochronousTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER    AsyncIsochronousTransfer;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS       GetRootHubPortStatus;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE      SetRootHubPortFeature;
 | 
			
		||||
  EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE    ClearRootHubPortFeature;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The major revision number of the USB host controller. The revision information
 | 
			
		||||
  /// indicates the release of the Universal Serial Bus Specification with which the
 | 
			
		||||
  /// host controller is compliant.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                                           MajorRevision;
 | 
			
		||||
  UINT16                                             MajorRevision;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// The minor revision number of the USB host controller. The revision information
 | 
			
		||||
  /// indicates the release of the Universal Serial Bus Specification with which the
 | 
			
		||||
  /// host controller is compliant.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                                           MinorRevision;
 | 
			
		||||
  UINT16                                             MinorRevision;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiUsb2HcProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUsb2HcProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,21 +5,15 @@
 | 
			
		||||
  running in the EFI boot services environment, to perform data transactions
 | 
			
		||||
  over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef _USB_HOSTCONTROLLER_H_
 | 
			
		||||
#define _USB_HOSTCONTROLLER_H_
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Protocol/Usb2HostController.h>
 | 
			
		||||
 | 
			
		||||
@ -469,7 +463,6 @@ EFI_STATUS
 | 
			
		||||
  IN EFI_USB_PORT_FEATURE    PortFeature
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The EFI_USB_HC_PROTOCOL provides USB host controller management, basic data transactions
 | 
			
		||||
/// over a USB bus, and USB root hub access. A device driver that wishes to manage a USB bus in a
 | 
			
		||||
@ -478,33 +471,33 @@ EFI_STATUS
 | 
			
		||||
/// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_USB_HC_PROTOCOL {
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_RESET                       Reset;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_GET_STATE                   GetState;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_SET_STATE                   SetState;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER            ControlTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_BULK_TRANSFER               BulkTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER    AsyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER     SyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER        IsochronousTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER  AsyncIsochronousTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER     GetRootHubPortNumber;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS     GetRootHubPortStatus;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE    SetRootHubPortFeature;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE  ClearRootHubPortFeature;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_RESET                         Reset;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_GET_STATE                     GetState;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_SET_STATE                     SetState;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER              ControlTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_BULK_TRANSFER                 BulkTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER      AsyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER       SyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER          IsochronousTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER    AsyncIsochronousTransfer;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER       GetRootHubPortNumber;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS       GetRootHubPortStatus;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE      SetRootHubPortFeature;
 | 
			
		||||
  EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE    ClearRootHubPortFeature;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The major revision number of the USB host controller. The revision information
 | 
			
		||||
  /// indicates the release of the Universal Serial Bus Specification with which the
 | 
			
		||||
  /// host controller is compliant.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                                          MajorRevision;
 | 
			
		||||
  UINT16                                            MajorRevision;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The minor revision number of the USB host controller. The revision information
 | 
			
		||||
  /// indicates the release of the Universal Serial Bus Specification with which the
 | 
			
		||||
  /// host controller is compliant.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT16                                          MinorRevision;
 | 
			
		||||
  UINT16                                            MinorRevision;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiUsbHcProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUsbHcProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -5,21 +5,15 @@
 | 
			
		||||
  mice and mass storage devices. In particular, functions for managing devices
 | 
			
		||||
  on USB buses are defined here.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __USB_IO_H__
 | 
			
		||||
#define __USB_IO_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/IndustryStandard/Usb.h>
 | 
			
		||||
 | 
			
		||||
@ -31,7 +25,7 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
    0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_USB_IO_PROTOCOL   EFI_USB_IO_PROTOCOL;
 | 
			
		||||
typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Related Definition for EFI USB I/O protocol
 | 
			
		||||
@ -40,11 +34,11 @@ typedef struct _EFI_USB_IO_PROTOCOL   EFI_USB_IO_PROTOCOL;
 | 
			
		||||
//
 | 
			
		||||
// USB standard descriptors and reqeust
 | 
			
		||||
//
 | 
			
		||||
typedef USB_DEVICE_REQUEST        EFI_USB_DEVICE_REQUEST;
 | 
			
		||||
typedef USB_DEVICE_DESCRIPTOR     EFI_USB_DEVICE_DESCRIPTOR;
 | 
			
		||||
typedef USB_CONFIG_DESCRIPTOR     EFI_USB_CONFIG_DESCRIPTOR;
 | 
			
		||||
typedef USB_INTERFACE_DESCRIPTOR  EFI_USB_INTERFACE_DESCRIPTOR;
 | 
			
		||||
typedef USB_ENDPOINT_DESCRIPTOR   EFI_USB_ENDPOINT_DESCRIPTOR;
 | 
			
		||||
typedef USB_DEVICE_REQUEST       EFI_USB_DEVICE_REQUEST;
 | 
			
		||||
typedef USB_DEVICE_DESCRIPTOR    EFI_USB_DEVICE_DESCRIPTOR;
 | 
			
		||||
typedef USB_CONFIG_DESCRIPTOR    EFI_USB_CONFIG_DESCRIPTOR;
 | 
			
		||||
typedef USB_INTERFACE_DESCRIPTOR EFI_USB_INTERFACE_DESCRIPTOR;
 | 
			
		||||
typedef USB_ENDPOINT_DESCRIPTOR  EFI_USB_ENDPOINT_DESCRIPTOR;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// USB data transfer direction
 | 
			
		||||
@ -58,16 +52,16 @@ typedef enum {
 | 
			
		||||
//
 | 
			
		||||
// USB Transfer Results
 | 
			
		||||
//
 | 
			
		||||
#define EFI_USB_NOERROR             0x00
 | 
			
		||||
#define EFI_USB_ERR_NOTEXECUTE      0x01
 | 
			
		||||
#define EFI_USB_ERR_STALL           0x02
 | 
			
		||||
#define EFI_USB_ERR_BUFFER          0x04
 | 
			
		||||
#define EFI_USB_ERR_BABBLE          0x08
 | 
			
		||||
#define EFI_USB_ERR_NAK             0x10
 | 
			
		||||
#define EFI_USB_ERR_CRC             0x20
 | 
			
		||||
#define EFI_USB_ERR_TIMEOUT         0x40
 | 
			
		||||
#define EFI_USB_ERR_BITSTUFF        0x80
 | 
			
		||||
#define EFI_USB_ERR_SYSTEM          0x100
 | 
			
		||||
#define EFI_USB_NOERROR         0x00
 | 
			
		||||
#define EFI_USB_ERR_NOTEXECUTE  0x01
 | 
			
		||||
#define EFI_USB_ERR_STALL       0x02
 | 
			
		||||
#define EFI_USB_ERR_BUFFER      0x04
 | 
			
		||||
#define EFI_USB_ERR_BABBLE      0x08
 | 
			
		||||
#define EFI_USB_ERR_NAK         0x10
 | 
			
		||||
#define EFI_USB_ERR_CRC         0x20
 | 
			
		||||
#define EFI_USB_ERR_TIMEOUT     0x40
 | 
			
		||||
#define EFI_USB_ERR_BITSTUFF    0x80
 | 
			
		||||
#define EFI_USB_ERR_SYSTEM      0x100
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Async USB transfer callback routine.
 | 
			
		||||
@ -96,7 +90,6 @@ EFI_STATUS
 | 
			
		||||
// Prototype for EFI USB I/O protocol
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  This function is used to manage a USB device with a control transfer pipe. A control transfer is
 | 
			
		||||
  typically used to perform device initialization and configuration.
 | 
			
		||||
@ -114,7 +107,7 @@ EFI_STATUS
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS           The control transfer has been successfully executed.
 | 
			
		||||
  @retval EFI_DEVICE_ERROR      The transfer failed. The transfer status is returned in Status.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETE  One or more parameters are invalid.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
 | 
			
		||||
  @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.
 | 
			
		||||
  @retval EFI_TIMEOUT           The control transfer fails due to timeout.
 | 
			
		||||
 | 
			
		||||
@ -157,7 +150,7 @@ EFI_STATUS
 | 
			
		||||
 | 
			
		||||
  @retval EFI_SUCCESS           The bulk transfer has been successfully executed.
 | 
			
		||||
  @retval EFI_DEVICE_ERROR      The transfer failed. The transfer status is returned in Status.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETE  One or more parameters are invalid.
 | 
			
		||||
  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
 | 
			
		||||
  @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.
 | 
			
		||||
  @retval EFI_TIMEOUT           The control transfer fails due to timeout.
 | 
			
		||||
 | 
			
		||||
@ -486,29 +479,29 @@ struct _EFI_USB_IO_PROTOCOL {
 | 
			
		||||
  //
 | 
			
		||||
  // IO transfer
 | 
			
		||||
  //
 | 
			
		||||
  EFI_USB_IO_CONTROL_TRANSFER           UsbControlTransfer;
 | 
			
		||||
  EFI_USB_IO_BULK_TRANSFER              UsbBulkTransfer;
 | 
			
		||||
  EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER   UsbAsyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_IO_SYNC_INTERRUPT_TRANSFER    UsbSyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_IO_ISOCHRONOUS_TRANSFER       UsbIsochronousTransfer;
 | 
			
		||||
  EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;
 | 
			
		||||
  EFI_USB_IO_CONTROL_TRANSFER              UsbControlTransfer;
 | 
			
		||||
  EFI_USB_IO_BULK_TRANSFER                 UsbBulkTransfer;
 | 
			
		||||
  EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER      UsbAsyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_IO_SYNC_INTERRUPT_TRANSFER       UsbSyncInterruptTransfer;
 | 
			
		||||
  EFI_USB_IO_ISOCHRONOUS_TRANSFER          UsbIsochronousTransfer;
 | 
			
		||||
  EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER    UsbAsyncIsochronousTransfer;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Common device request
 | 
			
		||||
  //
 | 
			
		||||
  EFI_USB_IO_GET_DEVICE_DESCRIPTOR      UsbGetDeviceDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_CONFIG_DESCRIPTOR      UsbGetConfigDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_INTERFACE_DESCRIPTOR   UsbGetInterfaceDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR    UsbGetEndpointDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_STRING_DESCRIPTOR      UsbGetStringDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_SUPPORTED_LANGUAGE     UsbGetSupportedLanguages;
 | 
			
		||||
  EFI_USB_IO_GET_DEVICE_DESCRIPTOR         UsbGetDeviceDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_CONFIG_DESCRIPTOR         UsbGetConfigDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_INTERFACE_DESCRIPTOR      UsbGetInterfaceDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR       UsbGetEndpointDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_STRING_DESCRIPTOR         UsbGetStringDescriptor;
 | 
			
		||||
  EFI_USB_IO_GET_SUPPORTED_LANGUAGE        UsbGetSupportedLanguages;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  // Reset controller's parent port
 | 
			
		||||
  //
 | 
			
		||||
  EFI_USB_IO_PORT_RESET                 UsbPortReset;
 | 
			
		||||
  EFI_USB_IO_PORT_RESET                    UsbPortReset;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiUsbIoProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiUsbIoProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,8 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  EFI VLAN Config protocol is to provide manageability interface for VLAN configuration.
 | 
			
		||||
 | 
			
		||||
  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:
 | 
			
		||||
  This Protocol is introduced in UEFI Specification 2.2
 | 
			
		||||
@ -18,8 +12,7 @@
 | 
			
		||||
#ifndef __EFI_VLANCONFIG_PROTOCOL_H__
 | 
			
		||||
#define __EFI_VLANCONFIG_PROTOCOL_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#define EFI_VLAN_CONFIG_PROTOCOL_GUID \
 | 
			
		||||
  { \
 | 
			
		||||
@ -28,16 +21,14 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
 | 
			
		||||
typedef struct _EFI_VLAN_CONFIG_PROTOCOL EFI_VLAN_CONFIG_PROTOCOL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI_VLAN_FIND_DATA
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16          VlanId;     ///< Vlan Identifier.
 | 
			
		||||
  UINT8           Priority;   ///< Priority of this VLAN.
 | 
			
		||||
  UINT16    VlanId;           ///< Vlan Identifier.
 | 
			
		||||
  UINT8     Priority;         ///< Priority of this VLAN.
 | 
			
		||||
} EFI_VLAN_FIND_DATA;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Create a VLAN device or modify the configuration parameter of an
 | 
			
		||||
  already-configured VLAN.
 | 
			
		||||
@ -135,11 +126,11 @@ EFI_STATUS
 | 
			
		||||
/// VLAN tagging implementation is IEEE802.1Q.
 | 
			
		||||
///
 | 
			
		||||
struct _EFI_VLAN_CONFIG_PROTOCOL {
 | 
			
		||||
  EFI_VLAN_CONFIG_SET              Set;
 | 
			
		||||
  EFI_VLAN_CONFIG_FIND             Find;
 | 
			
		||||
  EFI_VLAN_CONFIG_REMOVE           Remove;
 | 
			
		||||
  EFI_VLAN_CONFIG_SET       Set;
 | 
			
		||||
  EFI_VLAN_CONFIG_FIND      Find;
 | 
			
		||||
  EFI_VLAN_CONFIG_REMOVE    Remove;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern EFI_GUID gEfiVlanConfigProtocolGuid;
 | 
			
		||||
extern EFI_GUID  gEfiVlanConfigProtocolGuid;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -6,24 +6,17 @@
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PI_UEFI_H__
 | 
			
		||||
#define __PI_UEFI_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Uefi/UefiBaseType.h>
 | 
			
		||||
#include <ipxe/efi/Uefi/UefiSpec.h>
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,23 +1,19 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Defines data types and constants introduced in UEFI.
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
Copyright (c) 2006 - 2021, 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>
 | 
			
		||||
Copyright (c) 2022, Loongson Technology Corporation Limited. 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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __UEFI_BASETYPE_H__
 | 
			
		||||
#define __UEFI_BASETYPE_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Base.h>
 | 
			
		||||
 | 
			
		||||
@ -28,37 +24,37 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
///
 | 
			
		||||
/// 128-bit buffer containing a unique identifier value.
 | 
			
		||||
///
 | 
			
		||||
typedef GUID                      EFI_GUID;
 | 
			
		||||
typedef GUID EFI_GUID;
 | 
			
		||||
///
 | 
			
		||||
/// Function return status for EFI API.
 | 
			
		||||
///
 | 
			
		||||
typedef RETURN_STATUS             EFI_STATUS;
 | 
			
		||||
typedef RETURN_STATUS EFI_STATUS;
 | 
			
		||||
///
 | 
			
		||||
/// A collection of related interfaces.
 | 
			
		||||
///
 | 
			
		||||
typedef VOID                      *EFI_HANDLE;
 | 
			
		||||
typedef VOID *EFI_HANDLE;
 | 
			
		||||
///
 | 
			
		||||
/// Handle to an event structure.
 | 
			
		||||
///
 | 
			
		||||
typedef VOID                      *EFI_EVENT;
 | 
			
		||||
typedef VOID *EFI_EVENT;
 | 
			
		||||
///
 | 
			
		||||
/// Task priority level.
 | 
			
		||||
///
 | 
			
		||||
typedef UINTN                     EFI_TPL;
 | 
			
		||||
typedef UINTN EFI_TPL;
 | 
			
		||||
///
 | 
			
		||||
/// Logical block address.
 | 
			
		||||
///
 | 
			
		||||
typedef UINT64                    EFI_LBA;
 | 
			
		||||
typedef UINT64 EFI_LBA;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// 64-bit physical memory address.
 | 
			
		||||
///
 | 
			
		||||
typedef UINT64                    EFI_PHYSICAL_ADDRESS;
 | 
			
		||||
typedef UINT64 EFI_PHYSICAL_ADDRESS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// 64-bit virtual memory address.
 | 
			
		||||
///
 | 
			
		||||
typedef UINT64                    EFI_VIRTUAL_ADDRESS;
 | 
			
		||||
typedef UINT64 EFI_VIRTUAL_ADDRESS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// EFI Time Abstraction:
 | 
			
		||||
@ -72,20 +68,19 @@ typedef UINT64                    EFI_VIRTUAL_ADDRESS;
 | 
			
		||||
///  TimeZone:   -1440 to 1440 or 2047
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT16  Year;
 | 
			
		||||
  UINT8   Month;
 | 
			
		||||
  UINT8   Day;
 | 
			
		||||
  UINT8   Hour;
 | 
			
		||||
  UINT8   Minute;
 | 
			
		||||
  UINT8   Second;
 | 
			
		||||
  UINT8   Pad1;
 | 
			
		||||
  UINT32  Nanosecond;
 | 
			
		||||
  INT16   TimeZone;
 | 
			
		||||
  UINT8   Daylight;
 | 
			
		||||
  UINT8   Pad2;
 | 
			
		||||
  UINT16    Year;
 | 
			
		||||
  UINT8     Month;
 | 
			
		||||
  UINT8     Day;
 | 
			
		||||
  UINT8     Hour;
 | 
			
		||||
  UINT8     Minute;
 | 
			
		||||
  UINT8     Second;
 | 
			
		||||
  UINT8     Pad1;
 | 
			
		||||
  UINT32    Nanosecond;
 | 
			
		||||
  INT16     TimeZone;
 | 
			
		||||
  UINT8     Daylight;
 | 
			
		||||
  UINT8     Pad2;
 | 
			
		||||
} EFI_TIME;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte buffer. An IPv4 internet protocol address.
 | 
			
		||||
///
 | 
			
		||||
@ -100,7 +95,7 @@ typedef IPv6_ADDRESS EFI_IPv6_ADDRESS;
 | 
			
		||||
/// 32-byte buffer containing a network Media Access Control address.
 | 
			
		||||
///
 | 
			
		||||
typedef struct {
 | 
			
		||||
  UINT8 Addr[32];
 | 
			
		||||
  UINT8    Addr[32];
 | 
			
		||||
} EFI_MAC_ADDRESS;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -108,12 +103,11 @@ typedef struct {
 | 
			
		||||
/// An IPv4 or IPv6 internet protocol address.
 | 
			
		||||
///
 | 
			
		||||
typedef union {
 | 
			
		||||
  UINT32            Addr[4];
 | 
			
		||||
  EFI_IPv4_ADDRESS  v4;
 | 
			
		||||
  EFI_IPv6_ADDRESS  v6;
 | 
			
		||||
  UINT32              Addr[4];
 | 
			
		||||
  EFI_IPv4_ADDRESS    v4;
 | 
			
		||||
  EFI_IPv6_ADDRESS    v6;
 | 
			
		||||
} EFI_IP_ADDRESS;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Enumeration of EFI_STATUS.
 | 
			
		||||
///@{
 | 
			
		||||
@ -151,20 +145,20 @@ typedef union {
 | 
			
		||||
#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_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
 | 
			
		||||
#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
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Define macro to encode the status code.
 | 
			
		||||
///
 | 
			
		||||
#define EFIERR(_a)                ENCODE_ERROR(_a)
 | 
			
		||||
#define EFIERR(_a)  ENCODE_ERROR(_a)
 | 
			
		||||
 | 
			
		||||
#define EFI_ERROR(A)              RETURN_ERROR(A)
 | 
			
		||||
#define EFI_ERROR(A)  RETURN_ERROR(A)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// ICMP error definitions
 | 
			
		||||
@ -178,9 +172,9 @@ typedef union {
 | 
			
		||||
///
 | 
			
		||||
/// Tcp connection status definitions
 | 
			
		||||
///@{
 | 
			
		||||
#define EFI_CONNECTION_FIN        EFIERR(104)
 | 
			
		||||
#define EFI_CONNECTION_RESET      EFIERR(105)
 | 
			
		||||
#define EFI_CONNECTION_REFUSED    EFIERR(106)
 | 
			
		||||
#define EFI_CONNECTION_FIN      EFIERR(104)
 | 
			
		||||
#define EFI_CONNECTION_RESET    EFIERR(105)
 | 
			
		||||
#define EFI_CONNECTION_REFUSED  EFIERR(106)
 | 
			
		||||
///@}
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
@ -188,9 +182,9 @@ typedef union {
 | 
			
		||||
// 4KB. This should in no way be confused with the page size of the processor.
 | 
			
		||||
// An EFI_PAGE is just the quanta of memory in EFI.
 | 
			
		||||
//
 | 
			
		||||
#define EFI_PAGE_SIZE             SIZE_4KB
 | 
			
		||||
#define EFI_PAGE_MASK             0xFFF
 | 
			
		||||
#define EFI_PAGE_SHIFT            12
 | 
			
		||||
#define EFI_PAGE_SIZE   SIZE_4KB
 | 
			
		||||
#define EFI_PAGE_MASK   0xFFF
 | 
			
		||||
#define EFI_PAGE_SHIFT  12
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  Macro that converts a size, in bytes, to a number of EFI_PAGESs.
 | 
			
		||||
@ -221,22 +215,22 @@ typedef union {
 | 
			
		||||
///
 | 
			
		||||
/// PE32+ Machine type for IA32 UEFI images.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_MACHINE_IA32            0x014C
 | 
			
		||||
#define EFI_IMAGE_MACHINE_IA32  0x014C
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// PE32+ Machine type for IA64 UEFI images.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_MACHINE_IA64            0x0200
 | 
			
		||||
#define EFI_IMAGE_MACHINE_IA64  0x0200
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// PE32+ Machine type for EBC UEFI images.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_MACHINE_EBC             0x0EBC
 | 
			
		||||
#define EFI_IMAGE_MACHINE_EBC  0x0EBC
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// PE32+ Machine type for X64 UEFI images.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_MACHINE_X64             0x8664
 | 
			
		||||
#define EFI_IMAGE_MACHINE_X64  0x8664
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images.
 | 
			
		||||
@ -248,54 +242,84 @@ 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)
 | 
			
		||||
///
 | 
			
		||||
/// PE32+ Machine type for LoongArch 32/64 images.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_MACHINE_LOONGARCH32  0x6232
 | 
			
		||||
#define EFI_IMAGE_MACHINE_LOONGARCH64  0x6264
 | 
			
		||||
 | 
			
		||||
#if !defined (EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
 | 
			
		||||
  #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)
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine)  ((Machine) == EFI_IMAGE_MACHINE_X64)
 | 
			
		||||
 | 
			
		||||
#elif defined (MDE_CPU_IPF)
 | 
			
		||||
  #elif defined (MDE_CPU_X64)
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
 | 
			
		||||
  (((Machine) == EFI_IMAGE_MACHINE_IA64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
 | 
			
		||||
  ((Machine) == EFI_IMAGE_MACHINE_X64)
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine)  ((Machine) == EFI_IMAGE_MACHINE_IA32)
 | 
			
		||||
 | 
			
		||||
#elif defined (MDE_CPU_X64)
 | 
			
		||||
  #elif defined (MDE_CPU_ARM)
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_MACHINE_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_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
 | 
			
		||||
  ((Machine) == EFI_IMAGE_MACHINE_AARCH64)
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine)  (FALSE)
 | 
			
		||||
 | 
			
		||||
#elif defined (MDE_CPU_ARM)
 | 
			
		||||
  #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)
 | 
			
		||||
 | 
			
		||||
  #elif defined (MDE_CPU_LOONGARCH64)
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
 | 
			
		||||
  (((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
 | 
			
		||||
    ((Machine) == EFI_IMAGE_MACHINE_LOONGARCH64)
 | 
			
		||||
 | 
			
		||||
#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))
 | 
			
		||||
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
 | 
			
		||||
 | 
			
		||||
#elif defined (MDE_CPU_EBC)
 | 
			
		||||
  #elif defined (MDE_CPU_EBC)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// 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.
 | 
			
		||||
///
 | 
			
		||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_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
 | 
			
		||||
  #endif
 | 
			
		||||
#else
 | 
			
		||||
#error Unknown Processor Type
 | 
			
		||||
  #if defined (EFI_IMAGE_MACHINE_TYPE_VALUE)
 | 
			
		||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine)  ((Machine) == EFI_IMAGE_MACHINE_TYPE_VALUE)
 | 
			
		||||
  #else
 | 
			
		||||
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine)  (FALSE)
 | 
			
		||||
  #endif
 | 
			
		||||
  #if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine)  ((Machine) == EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE)
 | 
			
		||||
  #else
 | 
			
		||||
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine)  (FALSE)
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -1,31 +1,29 @@
 | 
			
		||||
/** @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
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __UEFI_GPT_H__
 | 
			
		||||
#define __UEFI_GPT_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The primary GUID Partition Table Header must be
 | 
			
		||||
/// located in LBA 1 (i.e., the second logical block).
 | 
			
		||||
///
 | 
			
		||||
#define PRIMARY_PART_HEADER_LBA 1
 | 
			
		||||
#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')
 | 
			
		||||
#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)
 | 
			
		||||
 | 
			
		||||
@ -37,51 +35,51 @@ typedef struct {
 | 
			
		||||
  /// The table header for the GPT partition Table.
 | 
			
		||||
  /// This header contains EFI_PTAB_HEADER_ID.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TABLE_HEADER  Header;
 | 
			
		||||
  EFI_TABLE_HEADER    Header;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The LBA that contains this data structure.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA           MyLBA;
 | 
			
		||||
  EFI_LBA             MyLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// LBA address of the alternate GUID Partition Table Header.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA           AlternateLBA;
 | 
			
		||||
  EFI_LBA             AlternateLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The first usable logical block that may be used
 | 
			
		||||
  /// by a partition described by a GUID Partition Entry.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA           FirstUsableLBA;
 | 
			
		||||
  EFI_LBA             FirstUsableLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The last usable logical block that may be used
 | 
			
		||||
  /// by a partition described by a GUID Partition Entry.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA           LastUsableLBA;
 | 
			
		||||
  EFI_LBA             LastUsableLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// GUID that can be used to uniquely identify the disk.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID          DiskGUID;
 | 
			
		||||
  EFI_GUID            DiskGUID;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The starting LBA of the GUID Partition Entry array.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA           PartitionEntryLBA;
 | 
			
		||||
  EFI_LBA             PartitionEntryLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The number of Partition Entries in the GUID Partition Entry array.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32            NumberOfPartitionEntries;
 | 
			
		||||
  UINT32              NumberOfPartitionEntries;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size, in bytes, of each the GUID Partition
 | 
			
		||||
  /// Entry structures in the GUID Partition Entry
 | 
			
		||||
  /// array. This field shall be set to a value of 128 x 2^n where n is
 | 
			
		||||
  /// an integer greater than or equal to zero (e.g., 128, 256, 512, etc.).
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32            SizeOfPartitionEntry;
 | 
			
		||||
  UINT32              SizeOfPartitionEntry;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The CRC32 of the GUID Partition Entry array.
 | 
			
		||||
  /// Starts at PartitionEntryLBA and is
 | 
			
		||||
  /// computed over a byte length of
 | 
			
		||||
  /// NumberOfPartitionEntries * SizeOfPartitionEntry.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32            PartitionEntryArrayCRC32;
 | 
			
		||||
  UINT32              PartitionEntryArrayCRC32;
 | 
			
		||||
} EFI_PARTITION_TABLE_HEADER;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -92,21 +90,21 @@ typedef struct {
 | 
			
		||||
  /// Unique ID that defines the purpose and type of this Partition. A value of
 | 
			
		||||
  /// zero defines that this partition entry is not being used.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID  PartitionTypeGUID;
 | 
			
		||||
  EFI_GUID    PartitionTypeGUID;
 | 
			
		||||
  ///
 | 
			
		||||
  /// GUID that is unique for every partition entry. Every partition ever
 | 
			
		||||
  /// created will have a unique GUID.
 | 
			
		||||
  /// This GUID must be assigned when the GUID Partition Entry is created.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_GUID  UniquePartitionGUID;
 | 
			
		||||
  EFI_GUID    UniquePartitionGUID;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Starting LBA of the partition defined by this entry
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA   StartingLBA;
 | 
			
		||||
  EFI_LBA     StartingLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Ending LBA of the partition defined by this entry.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_LBA   EndingLBA;
 | 
			
		||||
  EFI_LBA     EndingLBA;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Attribute bits, all bits reserved by UEFI
 | 
			
		||||
  /// Bit 0:      If this bit is set, the partition is required for the platform to function. The owner/creator of the
 | 
			
		||||
@ -139,5 +137,3 @@ typedef struct {
 | 
			
		||||
 | 
			
		||||
#pragma pack()
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,23 +1,39 @@
 | 
			
		||||
/** @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__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
#include <ipxe/efi/Guid/WinCertificate.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 <ipxe/efi/Guid/WinCertificate.h>
 | 
			
		||||
///
 | 
			
		||||
/// Enumeration of memory types introduced in UEFI.
 | 
			
		||||
///
 | 
			
		||||
@ -89,6 +105,11 @@ typedef enum {
 | 
			
		||||
  /// however it happens to also support byte-addressable non-volatility.
 | 
			
		||||
  ///
 | 
			
		||||
  EfiPersistentMemory,
 | 
			
		||||
  ///
 | 
			
		||||
  /// A memory region that describes system memory that has not been accepted
 | 
			
		||||
  /// by a corresponding call to the underlying isolation architecture.
 | 
			
		||||
  ///
 | 
			
		||||
  EfiUnacceptedMemoryType,
 | 
			
		||||
  EfiMaxMemoryType
 | 
			
		||||
} EFI_MEMORY_TYPE;
 | 
			
		||||
 | 
			
		||||
@ -134,48 +155,29 @@ typedef struct {
 | 
			
		||||
  /// Unique signatures have been generated for the EFI System Table,
 | 
			
		||||
  /// the EFI Boot Services Table, and the EFI Runtime Services Table.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64  Signature;
 | 
			
		||||
  UINT64    Signature;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The revision of the EFI Specification to which this table
 | 
			
		||||
  /// conforms. The upper 16 bits of this field contain the major
 | 
			
		||||
  /// revision value, and the lower 16 bits contain the minor revision
 | 
			
		||||
  /// value. The minor revision values are limited to the range of 00..99.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  Revision;
 | 
			
		||||
  UINT32    Revision;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The size, in bytes, of the entire table including the EFI_TABLE_HEADER.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  HeaderSize;
 | 
			
		||||
  UINT32    HeaderSize;
 | 
			
		||||
  ///
 | 
			
		||||
  /// The 32-bit CRC for the entire table. This value is computed by
 | 
			
		||||
  /// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  CRC32;
 | 
			
		||||
  UINT32    CRC32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Reserved field that must be set to 0.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT32  Reserved;
 | 
			
		||||
  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
 | 
			
		||||
@ -198,7 +200,7 @@ typedef struct {
 | 
			
		||||
  /// replay. Incremented during each
 | 
			
		||||
  /// "Write" access.
 | 
			
		||||
  ///
 | 
			
		||||
  UINT64                      MonotonicCount;
 | 
			
		||||
  UINT64    MonotonicCount;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Provides the authorization for the variable
 | 
			
		||||
  /// access. It is a signature across the
 | 
			
		||||
@ -207,7 +209,7 @@ typedef struct {
 | 
			
		||||
  /// associated with a public key that has been
 | 
			
		||||
  /// provisioned via the key exchange.
 | 
			
		||||
  ///
 | 
			
		||||
  WIN_CERTIFICATE_UEFI_GUID   AuthInfo;
 | 
			
		||||
  WIN_CERTIFICATE_UEFI_GUID    AuthInfo;
 | 
			
		||||
} EFI_VARIABLE_AUTHENTICATION;
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
@ -223,11 +225,12 @@ typedef struct {
 | 
			
		||||
  /// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and
 | 
			
		||||
  /// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT.
 | 
			
		||||
  ///
 | 
			
		||||
  EFI_TIME                    TimeStamp;
 | 
			
		||||
  EFI_TIME                     TimeStamp;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Only a CertType of  EFI_CERT_TYPE_PKCS7_GUID is accepted.
 | 
			
		||||
  ///
 | 
			
		||||
  WIN_CERTIFICATE_UEFI_GUID   AuthInfo;
 | 
			
		||||
 } EFI_VARIABLE_AUTHENTICATION_2;
 | 
			
		||||
  WIN_CERTIFICATE_UEFI_GUID    AuthInfo;
 | 
			
		||||
} EFI_VARIABLE_AUTHENTICATION_2;
 | 
			
		||||
#endif // VFRCOMPILE
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,21 +1,15 @@
 | 
			
		||||
/** @file
 | 
			
		||||
  Processor or Compiler specific defines and types x64 (Intel 64, AMD64).
 | 
			
		||||
 | 
			
		||||
  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  This program and the accompanying materials
 | 
			
		||||
  are licensed and made available under the terms and conditions of the BSD License
 | 
			
		||||
  which accompanies this distribution.  The full text of the license may be found at
 | 
			
		||||
  http://opensource.org/licenses/bsd-license.php
 | 
			
		||||
 | 
			
		||||
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | 
			
		||||
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
			
		||||
  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
 | 
			
		||||
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
#ifndef __PROCESSOR_BIND_H__
 | 
			
		||||
#define __PROCESSOR_BIND_H__
 | 
			
		||||
 | 
			
		||||
FILE_LICENCE ( BSD3 );
 | 
			
		||||
FILE_LICENCE ( BSD2_PATENT );
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Define the processor type so other code can make processor based choices
 | 
			
		||||
@ -25,11 +19,11 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Make sure we are using the correct packing rules per EFI specification
 | 
			
		||||
//
 | 
			
		||||
#if !defined(__GNUC__)
 | 
			
		||||
#pragma pack()
 | 
			
		||||
#if !defined (__GNUC__)
 | 
			
		||||
  #pragma pack()
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__GNUC__) && defined(__pic__) && !defined(USING_LTO)
 | 
			
		||||
#if defined (__GNUC__) && defined (__pic__) && !defined (USING_LTO)  && !defined (__APPLE__)
 | 
			
		||||
//
 | 
			
		||||
// Mark all symbol declarations and references as hidden, meaning they will
 | 
			
		||||
// not be subject to symbol preemption. This allows the compiler to refer to
 | 
			
		||||
@ -40,38 +34,37 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
// references can be resolved locally, and so there is no need to set the
 | 
			
		||||
// pragma in that case (and doing so will cause other issues).
 | 
			
		||||
//
 | 
			
		||||
#pragma GCC visibility push (hidden)
 | 
			
		||||
  #pragma GCC visibility push (hidden)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__INTEL_COMPILER)
 | 
			
		||||
#if defined (__INTEL_COMPILER)
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #869: "Parameter" was never referenced warning.
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with -Wall
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 869 )
 | 
			
		||||
  #pragma warning ( disable : 869 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #1418: external function definition with no prior declaration.
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with /W4
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 1418 )
 | 
			
		||||
  #pragma warning ( disable : 1418 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #1419: external declaration in primary source file
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with /W4
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 1419 )
 | 
			
		||||
  #pragma warning ( disable : 1419 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable ICC's remark #593: "Variable" was set but never used.
 | 
			
		||||
// This is legal ANSI C code so we disable the remark that is turned on with /W4
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 593 )
 | 
			
		||||
  #pragma warning ( disable : 593 )
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_MSC_EXTENSIONS)
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable warning that make it impossible to compile at /W4
 | 
			
		||||
@ -81,35 +74,35 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
//
 | 
			
		||||
// Disabling bitfield type checking warnings.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4214 )
 | 
			
		||||
  #pragma warning ( disable : 4214 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disabling the unreferenced formal parameter warnings.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4100 )
 | 
			
		||||
  #pragma warning ( disable : 4100 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable slightly different base types warning as CHAR8 * can not be set
 | 
			
		||||
// to a constant string.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4057 )
 | 
			
		||||
  #pragma warning ( disable : 4057 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4127 )
 | 
			
		||||
  #pragma warning ( disable : 4127 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by functions defined but not used. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4505 )
 | 
			
		||||
  #pragma warning ( disable : 4505 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is caused by empty (after preprocessing) source file. For precompiled header only.
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4206 )
 | 
			
		||||
  #pragma warning ( disable : 4206 )
 | 
			
		||||
 | 
			
		||||
#if _MSC_VER == 1800 || _MSC_VER == 1900
 | 
			
		||||
  #if defined (_MSC_VER) && _MSC_VER >= 1800
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Disable these warnings for VS2013.
 | 
			
		||||
@ -119,130 +112,128 @@ FILE_LICENCE ( BSD3 );
 | 
			
		||||
// This warning is for potentially uninitialized local variable, and it may cause false
 | 
			
		||||
// positive issues in VS2013 and VS2015 build
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4701 )
 | 
			
		||||
    #pragma warning ( disable : 4701 )
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// This warning is for potentially uninitialized local pointer variable, and it may cause
 | 
			
		||||
// false positive issues in VS2013 and VS2015 build
 | 
			
		||||
//
 | 
			
		||||
#pragma warning ( disable : 4703 )
 | 
			
		||||
    #pragma warning ( disable : 4703 )
 | 
			
		||||
 | 
			
		||||
  #endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
#if defined (_MSC_EXTENSIONS)
 | 
			
		||||
//
 | 
			
		||||
// use Microsoft C compiler dependent integer width types
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_MSC_EXTENSIONS)
 | 
			
		||||
  //
 | 
			
		||||
  // use Microsoft C compiler dependent integer width types
 | 
			
		||||
  //
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned __int64    UINT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef __int64             INT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned __int32    UINT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef __int32             INT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
  /// values are undefined.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte Character
 | 
			
		||||
  ///
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned __int64 UINT64;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef __int64 INT64;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned __int32 UINT32;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef __int32 INT32;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short UINT16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short CHAR16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef short INT16;
 | 
			
		||||
///
 | 
			
		||||
/// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
/// values are undefined.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char BOOLEAN;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char UINT8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte Character
 | 
			
		||||
///
 | 
			
		||||
typedef char CHAR8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef signed char INT8;
 | 
			
		||||
#else
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned long long  UINT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 8-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef long long           INT64;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned int        UINT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 4-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef int                 INT32;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      UINT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned short      CHAR16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 2-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef short               INT16;
 | 
			
		||||
  ///
 | 
			
		||||
  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
  /// values are undefined.
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       BOOLEAN;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte unsigned value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef unsigned char       UINT8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte Character
 | 
			
		||||
  ///
 | 
			
		||||
  typedef char                CHAR8;
 | 
			
		||||
  ///
 | 
			
		||||
  /// 1-byte signed value
 | 
			
		||||
  ///
 | 
			
		||||
  typedef signed char         INT8;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned long long UINT64;
 | 
			
		||||
///
 | 
			
		||||
/// 8-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef long long INT64;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned int UINT32;
 | 
			
		||||
///
 | 
			
		||||
/// 4-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef int INT32;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short UINT16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte Character.  Unless otherwise specified all strings are stored in the
 | 
			
		||||
/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned short CHAR16;
 | 
			
		||||
///
 | 
			
		||||
/// 2-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef short INT16;
 | 
			
		||||
///
 | 
			
		||||
/// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other
 | 
			
		||||
/// values are undefined.
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char BOOLEAN;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte unsigned value
 | 
			
		||||
///
 | 
			
		||||
typedef unsigned char UINT8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte Character
 | 
			
		||||
///
 | 
			
		||||
typedef char CHAR8;
 | 
			
		||||
///
 | 
			
		||||
/// 1-byte signed value
 | 
			
		||||
///
 | 
			
		||||
typedef signed char INT8;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Unsigned value of native width.  (4 bytes on supported 32-bit processor instructions,
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions)
 | 
			
		||||
///
 | 
			
		||||
typedef UINT64  UINTN;
 | 
			
		||||
typedef UINT64 UINTN;
 | 
			
		||||
///
 | 
			
		||||
/// Signed value of native width.  (4 bytes on supported 32-bit processor instructions,
 | 
			
		||||
/// 8 bytes on supported 64-bit processor instructions)
 | 
			
		||||
///
 | 
			
		||||
typedef INT64   INTN;
 | 
			
		||||
 | 
			
		||||
typedef INT64 INTN;
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Processor specific defines
 | 
			
		||||
@ -251,7 +242,7 @@ typedef INT64   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the highest bit set.
 | 
			
		||||
///
 | 
			
		||||
#define MAX_BIT     0x8000000000000000ULL
 | 
			
		||||
#define MAX_BIT  0x8000000000000000ULL
 | 
			
		||||
///
 | 
			
		||||
/// A value of native width with the two highest bits set.
 | 
			
		||||
///
 | 
			
		||||
@ -260,7 +251,12 @@ typedef INT64   INTN;
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal x64 address
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL
 | 
			
		||||
#define MAX_ADDRESS  0xFFFFFFFFFFFFFFFFULL
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum usable address at boot time
 | 
			
		||||
///
 | 
			
		||||
#define MAX_ALLOC_ADDRESS  MAX_ADDRESS
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Maximum legal x64 INTN and UINTN values.
 | 
			
		||||
@ -268,16 +264,21 @@ typedef INT64   INTN;
 | 
			
		||||
#define MAX_INTN   ((INTN)0x7FFFFFFFFFFFFFFFULL)
 | 
			
		||||
#define MAX_UINTN  ((UINTN)0xFFFFFFFFFFFFFFFFULL)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Minimum legal x64 INTN value.
 | 
			
		||||
///
 | 
			
		||||
#define MIN_INTN  (((INTN)-9223372036854775807LL) - 1)
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// The stack alignment required for x64
 | 
			
		||||
///
 | 
			
		||||
#define CPU_STACK_ALIGNMENT   16
 | 
			
		||||
#define CPU_STACK_ALIGNMENT  16
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
/// Page allocation granularity for x64
 | 
			
		||||
///
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
 | 
			
		||||
#define DEFAULT_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
#define RUNTIME_PAGE_ALLOCATION_GRANULARITY  (0x1000)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
 | 
			
		||||
@ -285,38 +286,38 @@ typedef INT64   INTN;
 | 
			
		||||
// EFI intrinsics are required to modify their member functions with EFIAPI.
 | 
			
		||||
//
 | 
			
		||||
#ifdef EFIAPI
 | 
			
		||||
  ///
 | 
			
		||||
  /// If EFIAPI is already defined, then we use that definition.
 | 
			
		||||
  ///
 | 
			
		||||
#elif defined(_MSC_EXTENSIONS)
 | 
			
		||||
  ///
 | 
			
		||||
  /// Microsoft* compiler specific method for EFIAPI calling convention.
 | 
			
		||||
  ///
 | 
			
		||||
  #define EFIAPI __cdecl
 | 
			
		||||
#elif defined(__GNUC__)
 | 
			
		||||
  ///
 | 
			
		||||
  /// Define the standard calling convention regardless of optimization level.
 | 
			
		||||
  /// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI
 | 
			
		||||
  /// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64)
 | 
			
		||||
  /// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for
 | 
			
		||||
  /// x64. Warning the assembly code in the MDE x64 does not follow the correct
 | 
			
		||||
  /// ABI for the standard x64 (x86-64) GCC.
 | 
			
		||||
  ///
 | 
			
		||||
  #define EFIAPI
 | 
			
		||||
///
 | 
			
		||||
/// If EFIAPI is already defined, then we use that definition.
 | 
			
		||||
///
 | 
			
		||||
#elif defined (_MSC_EXTENSIONS)
 | 
			
		||||
///
 | 
			
		||||
/// Microsoft* compiler specific method for EFIAPI calling convention.
 | 
			
		||||
///
 | 
			
		||||
#define EFIAPI  __cdecl
 | 
			
		||||
#elif defined (__GNUC__)
 | 
			
		||||
///
 | 
			
		||||
/// Define the standard calling convention regardless of optimization level.
 | 
			
		||||
/// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI
 | 
			
		||||
/// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64)
 | 
			
		||||
/// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for
 | 
			
		||||
/// x64. Warning the assembly code in the MDE x64 does not follow the correct
 | 
			
		||||
/// ABI for the standard x64 (x86-64) GCC.
 | 
			
		||||
///
 | 
			
		||||
#define EFIAPI
 | 
			
		||||
#else
 | 
			
		||||
  ///
 | 
			
		||||
  /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI
 | 
			
		||||
  /// is the standard.
 | 
			
		||||
  ///
 | 
			
		||||
  #define EFIAPI
 | 
			
		||||
///
 | 
			
		||||
/// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI
 | 
			
		||||
/// is the standard.
 | 
			
		||||
///
 | 
			
		||||
#define EFIAPI
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__GNUC__)
 | 
			
		||||
  ///
 | 
			
		||||
  /// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
  /// Define this macro to unify the usage.
 | 
			
		||||
  ///
 | 
			
		||||
  #define ASM_GLOBAL .globl
 | 
			
		||||
#if defined (__GNUC__) || defined (__clang__)
 | 
			
		||||
///
 | 
			
		||||
/// For GNU assembly code, .global or .globl can declare global symbols.
 | 
			
		||||
/// Define this macro to unify the usage.
 | 
			
		||||
///
 | 
			
		||||
#define ASM_GLOBAL  .globl
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@ -329,11 +330,10 @@ typedef INT64   INTN;
 | 
			
		||||
  @return The pointer to the first instruction of a function given a function pointer.
 | 
			
		||||
 | 
			
		||||
**/
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
#define FUNCTION_ENTRY_POINT(FunctionPointer)  (VOID *)(UINTN)(FunctionPointer)
 | 
			
		||||
 | 
			
		||||
#ifndef __USER_LABEL_PREFIX__
 | 
			
		||||
#define __USER_LABEL_PREFIX__
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -67,13 +67,13 @@ sub try_import_file {
 | 
			
		||||
	s/\s*$//g;
 | 
			
		||||
	chomp;
 | 
			
		||||
	# Update include lines, and record included files
 | 
			
		||||
	if ( s/^\#include\s+[<\"](\S+)[>\"]/\#include <ipxe\/efi\/$1>/ ) {
 | 
			
		||||
	if ( s/^(\s*\#include\s+)[<\"](\S+)[>\"]/$1<ipxe\/efi\/$2>/ ) {
 | 
			
		||||
	  push @dependencies, $1;
 | 
			
		||||
	}
 | 
			
		||||
	# Check for BSD licence statement
 | 
			
		||||
	if ( /^\s*THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE/ ) {
 | 
			
		||||
	if ( /^\s*SPDX-License-Identifier: BSD-2-Clause-Patent$/ ) {
 | 
			
		||||
	  die "Licence detected after header guard\n" if $guard;
 | 
			
		||||
	  $licence = "BSD3";
 | 
			
		||||
	  $licence = "BSD2_PATENT";
 | 
			
		||||
	}
 | 
			
		||||
	# Write out line
 | 
			
		||||
	print $outfh "$_\n";
 | 
			
		||||
@ -118,8 +118,7 @@ pod2usage ( 1 ) unless @ARGV == 1;
 | 
			
		||||
my $edktop = shift;
 | 
			
		||||
 | 
			
		||||
# Identify edk import directories
 | 
			
		||||
my $edkdirs = [ "MdePkg/Include", "IntelFrameworkPkg/Include",
 | 
			
		||||
		"MdeModulePkg/Include", "EdkCompatibilityPkg/Foundation" ];
 | 
			
		||||
my $edkdirs = [ "MdePkg/Include", "MdeModulePkg/Include" ];
 | 
			
		||||
foreach my $edkdir ( @$edkdirs ) {
 | 
			
		||||
  die "Directory \"$edktop\" does not appear to contain the EFI EDK2 "
 | 
			
		||||
      ."(missing \"$edkdir\")\n" unless -d catdir ( $edktop, $edkdir );
 | 
			
		||||
 | 
			
		||||
@ -29,6 +29,7 @@ my $known_licences = {
 | 
			
		||||
      public_domain => 1,
 | 
			
		||||
      bsd3 => 1,
 | 
			
		||||
      bsd2 => 1,
 | 
			
		||||
      bsd2_patent => 1,
 | 
			
		||||
      mit  => 1,
 | 
			
		||||
      isc  => 1,
 | 
			
		||||
    },
 | 
			
		||||
@ -41,6 +42,7 @@ my $known_licences = {
 | 
			
		||||
      public_domain => 1,
 | 
			
		||||
      bsd3 => 1,
 | 
			
		||||
      bsd2 => 1,
 | 
			
		||||
      bsd2_patent => 1,
 | 
			
		||||
      mit  => 1,
 | 
			
		||||
      isc  => 1,
 | 
			
		||||
    },
 | 
			
		||||
@ -54,6 +56,7 @@ my $known_licences = {
 | 
			
		||||
      public_domain => 1,
 | 
			
		||||
      bsd3 => 1,
 | 
			
		||||
      bsd2 => 1,
 | 
			
		||||
      bsd2_patent => 1,
 | 
			
		||||
      mit  => 1,
 | 
			
		||||
      isc  => 1,
 | 
			
		||||
    },
 | 
			
		||||
@ -65,6 +68,7 @@ my $known_licences = {
 | 
			
		||||
      public_domain => 1,
 | 
			
		||||
      bsd3 => 1,
 | 
			
		||||
      bsd2 => 1,
 | 
			
		||||
      bsd2_patent => 1,
 | 
			
		||||
      mit => 1,
 | 
			
		||||
      isc => 1,
 | 
			
		||||
    },
 | 
			
		||||
@ -100,6 +104,16 @@ my $known_licences = {
 | 
			
		||||
      isc  => 1,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  bsd2_patent => {
 | 
			
		||||
    desc => ( "BSD Licence (without advertising or endorsement clauses, ".
 | 
			
		||||
	      "with patent clause)" ),
 | 
			
		||||
    can_subsume => {
 | 
			
		||||
      public_domain => 1,
 | 
			
		||||
      bsd2 => 1,
 | 
			
		||||
      mit  => 1,
 | 
			
		||||
      isc  => 1,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mit => {
 | 
			
		||||
    desc => "MIT/X11/Xorg Licence",
 | 
			
		||||
    can_subsume => {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user