1. Removed the unnecessary #include statements and include files

2. Removed the unnecessary library and include path from MSA files


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@540 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
yshi8
2006-06-16 11:40:33 +00:00
parent 1cc00e4525
commit 5a96e3e3fe
125 changed files with 0 additions and 36185 deletions

View File

@ -1,28 +0,0 @@
/** @file
Root include file for Mde Package Base type modules
This is the include file for any module of type base. Base modules only use
types defined via this include file and can be ported easily to any
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
**/
#ifndef __BASE_H__
#define __BASE_H__
#include <Common/BaseTypes.h>
#include <Common/EfiImage.h>
#endif

View File

@ -1,37 +0,0 @@
/** @file
This includes for the Boot mode information.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: BootMode.h
@par Revision Reference:
These definitions are from PeiCis 0.91 spec.
**/
#ifndef __EFI_BOOT_MODE_H__
#define __EFI_BOOT_MODE_H__
#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_ON_S2_RESUME 0x10
#define BOOT_ON_S3_RESUME 0x11
#define BOOT_ON_FLASH_UPDATE 0x12
#define BOOT_IN_RECOVERY_MODE 0x20
#define BOOT_IN_RECOVERY_MODE_MASK 0x40
#define BOOT_SPECIAL_MASK 0x80
#endif

View File

@ -1,198 +0,0 @@
/** @file
This file declares the related BootScript definitions and some SMBus definitions.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: BootScript.h
@par Revision Reference:
These definitions are defined in BootScript Spec 0.91 and SmBus PPI spec 0.9.
**/
#ifndef _EFI_SCRIPT_H_
#define _EFI_SCRIPT_H_
#define EFI_ACPI_S3_RESUME_SCRIPT_TABLE 0x00
//
// 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_TABLE_OPCODE 0xAA
#define EFI_BOOT_SCRIPT_TERMINATE_OPCODE 0xFF
//
// EFI Boot Script Width
//
typedef enum {
EfiBootScriptWidthUint8,
EfiBootScriptWidthUint16,
EfiBootScriptWidthUint32,
EfiBootScriptWidthUint64,
EfiBootScriptWidthFifoUint8,
EfiBootScriptWidthFifoUint16,
EfiBootScriptWidthFifoUint32,
EfiBootScriptWidthFifoUint64,
EfiBootScriptWidthFillUint8,
EfiBootScriptWidthFillUint16,
EfiBootScriptWidthFillUint32,
EfiBootScriptWidthFillUint64,
EfiBootScriptWidthMaximum
} EFI_BOOT_SCRIPT_WIDTH;
//
// EFI Smbus Device Address, Smbus Device Command, Smbus Operation
//
typedef struct {
UINTN SmbusDeviceAddress : 7;
} EFI_SMBUS_DEVICE_ADDRESS;
typedef UINTN EFI_SMBUS_DEVICE_COMMAND;
typedef enum _EFI_SMBUS_OPERATION
{
EfiSmbusQuickRead,
EfiSmbusQuickWrite,
EfiSmbusReceiveByte,
EfiSmbusSendByte,
EfiSmbusReadByte,
EfiSmbusWriteByte,
EfiSmbusReadWord,
EfiSmbusWriteWord,
EfiSmbusReadBlock,
EfiSmbusWriteBlock,
EfiSmbusProcessCall,
EfiSmbusBWBRProcessCall
} EFI_SMBUS_OPERATION;
//
// Boot Script Opcode Header Structure Definitions
//
typedef struct {
UINT16 OpCode;
UINT8 Length;
} EFI_BOOT_SCRIPT_GENERIC_HEADER;
typedef struct {
UINT16 OpCode;
UINT8 Length;
UINT16 Version;
UINT32 TableLength;
UINT16 Reserved[2];
} EFI_BOOT_SCRIPT_TABLE_HEADER;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
} EFI_BOOT_SCRIPT_COMMON_HEADER;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
UINTN Count;
UINT64 Address;
} EFI_BOOT_SCRIPT_IO_WRITE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
UINT64 Address;
} EFI_BOOT_SCRIPT_IO_READ_WRITE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
UINTN Count;
UINT64 Address;
} EFI_BOOT_SCRIPT_MEM_WRITE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
UINT64 Address;
} EFI_BOOT_SCRIPT_MEM_READ_WRITE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
UINTN Count;
UINT64 Address;
} EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_BOOT_SCRIPT_WIDTH Width;
UINT64 Address;
} EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_SMBUS_DEVICE_ADDRESS SlaveAddress;
EFI_SMBUS_DEVICE_COMMAND Command;
EFI_SMBUS_OPERATION Operation;
BOOLEAN PecCheck;
UINTN DataSize;
} EFI_BOOT_SCRIPT_SMBUS_EXECUTE;
typedef struct {
UINT16 OpCode;
UINT8 Length;
UINTN Duration;
} EFI_BOOT_SCRIPT_STALL;
typedef struct {
UINT16 OpCode;
UINT8 Length;
EFI_PHYSICAL_ADDRESS EntryPoint;
} EFI_BOOT_SCRIPT_DISPATCH;
typedef struct {
UINT16 OpCode;
UINT8 Length;
} EFI_BOOT_SCRIPT_TERMINATE;
typedef union {
EFI_BOOT_SCRIPT_GENERIC_HEADER *Header;
EFI_BOOT_SCRIPT_TABLE_HEADER *TableInfo;
EFI_BOOT_SCRIPT_IO_WRITE *IoWrite;
EFI_BOOT_SCRIPT_IO_READ_WRITE *IoReadWrite;
EFI_BOOT_SCRIPT_MEM_WRITE *MemWrite;
EFI_BOOT_SCRIPT_MEM_READ_WRITE *MemReadWrite;
EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE *PciWrite;
EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE *PciReadWrite;
EFI_BOOT_SCRIPT_SMBUS_EXECUTE *SmbusExecute;
EFI_BOOT_SCRIPT_STALL *Stall;
EFI_BOOT_SCRIPT_DISPATCH *Dispatch;
EFI_BOOT_SCRIPT_TERMINATE *Terminate;
EFI_BOOT_SCRIPT_COMMON_HEADER *CommonHeader;
UINT8 *Raw;
} BOOT_SCRIPT_POINTERS;
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,235 +0,0 @@
/** @file
Hand Off Block (HOB) definition.
The HOB is a memory data structure used to hand-off system information from
PEI to DXE (the next phase).
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Hob.h
@par Revision Reference:
These definitions are from Hand Off Block (HOB) Spec Version 0.9.
**/
#ifndef __HOB_H__
#define __HOB_H__
//
// Every Hob must start with this data structure.
//
typedef struct {
UINT16 HobType;
UINT16 HobLength;
UINT32 Reserved;
} EFI_HOB_GENERIC_HEADER;
//
// End of HOB List HOB
//
#define EFI_HOB_TYPE_END_OF_HOB_LIST 0xffff
//
// Handoff Information Table HOB
//
#define EFI_HOB_TYPE_HANDOFF 0x0001
#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009
typedef UINT32 EFI_BOOT_MODE;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
UINT32 Version;
EFI_BOOT_MODE BootMode;
EFI_PHYSICAL_ADDRESS EfiMemoryTop;
EFI_PHYSICAL_ADDRESS EfiMemoryBottom;
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop;
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom;
EFI_PHYSICAL_ADDRESS EfiEndOfHobList;
} EFI_HOB_HANDOFF_INFO_TABLE;
//
// Memory Descriptor HOB
//
#define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002
typedef struct {
EFI_GUID Name;
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
UINT64 MemoryLength;
EFI_MEMORY_TYPE MemoryType;
UINT8 Reserved[4];
} EFI_HOB_MEMORY_ALLOCATION_HEADER;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
//
// Additional data pertaining to the "Name" Guid memory
// may go here.
//
} EFI_HOB_MEMORY_ALLOCATION;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
} EFI_HOB_MEMORY_ALLOCATION_STACK;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader;
EFI_GUID ModuleName;
EFI_PHYSICAL_ADDRESS EntryPoint;
} EFI_HOB_MEMORY_ALLOCATION_MODULE;
#define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR 0x0003
typedef UINT32 EFI_RESOURCE_TYPE;
#define EFI_RESOURCE_SYSTEM_MEMORY 0
#define EFI_RESOURCE_MEMORY_MAPPED_IO 1
#define EFI_RESOURCE_IO 2
#define EFI_RESOURCE_FIRMWARE_DEVICE 3
#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT 4
#define EFI_RESOURCE_MEMORY_RESERVED 5
#define EFI_RESOURCE_IO_RESERVED 6
#define EFI_RESOURCE_MAX_MEMORY_TYPE 7
typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Owner;
EFI_RESOURCE_TYPE ResourceType;
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
EFI_PHYSICAL_ADDRESS PhysicalStart;
UINT64 ResourceLength;
} EFI_HOB_RESOURCE_DESCRIPTOR;
//
// GUID Extension HOB
// The HobLength is variable as it includes the GUID specific data.
//
#define EFI_HOB_TYPE_GUID_EXTENSION 0x0004
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Name;
//
// Guid specific data goes here
//
} EFI_HOB_GUID_TYPE;
//
// Firmware Volume HOB
//
#define EFI_HOB_TYPE_FV 0x0005
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
} EFI_HOB_FIRMWARE_VOLUME;
//
// CPU HOB
//
#define EFI_HOB_TYPE_CPU 0x0006
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
UINT8 SizeOfMemorySpace;
UINT8 SizeOfIoSpace;
UINT8 Reserved[6];
} EFI_HOB_CPU;
//
// PEI Core Memory Pool HOB
// The HobLength is variable as the HOB contains pool allocations by
// the PeiServices AllocatePool function
//
#define EFI_HOB_TYPE_PEI_MEMORY_POOL 0x0007
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
} EFI_HOB_MEMORY_POOL;
//
// Capsule volume HOB -- identical to a firmware volume
//
#define EFI_HOB_TYPE_CV 0x0008
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
} EFI_HOB_CAPSULE_VOLUME;
#define EFI_HOB_TYPE_UNUSED 0xFFFE
//
// 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_CPU *Cpu;
EFI_HOB_MEMORY_POOL *Pool;
EFI_HOB_CAPSULE_VOLUME *CapsuleVolume;
UINT8 *Raw;
} EFI_PEI_HOB_POINTERS;
#define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)
#define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)
#define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))
#define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_END_OF_HOB_LIST)
//
// Get the data and data size field of GUID
//
#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
#endif

View File

@ -1,912 +0,0 @@
/** @file
Status Code Definitions, according to Intel Platform Innovation Framework
for EFI Status Codes Specification
The file is divided into sections for ease of use.
<pre>
Section: Contents:
1 General Status Code Definitions
2 Class definitions
3 Computing Unit Subclasses, Progress and Error Codes
4 Peripheral Subclasses, Progress and Error Codes.
5 IO Bus Subclasses, Progress and Error Codes.
6 Software Subclasses, Progress and Error Codes.
7 Debug Codes
</pre>
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: StatusCode.h
@par Revision Reference:
Version 0.92.
**/
#ifndef _EFI_STATUS_CODE_H_
#define _EFI_STATUS_CODE_H_
//
// /////////////////////////////////////////////////////////////////////////////
// Section 1
///////////////////////////////////////////////////////////////////////////////
//
// A Status Code Type is made up of the code type and severity
// All values masked by EFI_STATUS_CODE_RESERVED_MASK are
// 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
//
// Definition of code types, all other values masked by
// EFI_STATUS_CODE_TYPE_MASK are reserved for use by
// this specification.
//
#define EFI_PROGRESS_CODE 0x00000001
#define EFI_ERROR_CODE 0x00000002
#define EFI_DEBUG_CODE 0x00000003
//
// Definitions of severities, all other values masked by
// EFI_STATUS_CODE_SEVERITY_MASK are reserved for use by
// this specification.
//
#define EFI_ERROR_MINOR 0x40000000
#define EFI_ERROR_MAJOR 0x80000000
#define EFI_ERROR_UNRECOVERED 0x90000000
#define EFI_ERROR_UNCONTAINED 0xA0000000
//
// A Status Code Value is made up of the class, subclass, and
// an operation. Classes, subclasses, and operations are defined
// in the following sections.
//
#define EFI_STATUS_CODE_CLASS_MASK 0xFF000000
#define EFI_STATUS_CODE_SUBCLASS_MASK 0x00FF0000
#define EFI_STATUS_CODE_OPERATION_MASK 0x0000FFFF
//
// Data Hub Status Code class record definition
//
typedef struct {
EFI_STATUS_CODE_TYPE CodeType;
EFI_STATUS_CODE_VALUE Value;
UINT32 Instance;
EFI_GUID CallerId;
EFI_STATUS_CODE_DATA Data;
} DATA_HUB_STATUS_CODE_DATA_RECORD;
//
// /////////////////////////////////////////////////////////////////////////////
// Section 2
///////////////////////////////////////////////////////////////////////////////
//
// Class definitions
// Values of 4-127 are reserved for future use by this
// specification.
// Values in the range 127-255 are reserved for OEM use.
//
#define EFI_COMPUTING_UNIT 0x00000000
#define EFI_PERIPHERAL 0x01000000
#define EFI_IO_BUS 0x02000000
#define EFI_SOFTWARE 0x03000000
//
// General partitioning scheme for Progress and Error Codes are
// 0x0000-0x0FFF - Shared by all sub-classes in a given class
// 0x1000-0x7FFF - Subclass Specific
// 0x8000-0xFFFF - OEM specific
//
#define EFI_SUBCLASS_SPECIFIC 0x1000
#define EFI_OEM_SPECIFIC 0x8000
//
// /////////////////////////////////////////////////////////////////////////////
// Section 3
///////////////////////////////////////////////////////////////////////////////
//
// Computing Unit Subclass definitions.
// Values of 8-127 are reserved for future use by this
// specification.
// 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)
//
// Computing Unit Class Progress Code definitions.
// These are shared by all subclasses.
//
#define EFI_CU_PC_INIT_BEGIN 0x00000000
#define EFI_CU_PC_INIT_END 0x00000001
//
// Computing Unit Unspecified Subclass Progress Code definitions.
//
//
// 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)
//
// Computing Unit Firmware Processor Subclass Progress Code definitions.
//
//
// Computing Unit IO Processor Subclass Progress Code definitions.
//
//
// 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)
//
// Computing Unit Memory Subclass Progress Code definitions.
//
#define EFI_CU_MEMORY_PC_SPD_READ (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_CU_MEMORY_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_CU_MEMORY_PC_TIMING (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_CU_MEMORY_PC_CONFIGURING (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_CU_MEMORY_PC_OPTIMIZING (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_CU_MEMORY_PC_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_CU_MEMORY_PC_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000006)
//
// Computing Unit Chipset Subclass Progress Code definitions.
//
//
// Computing Unit Class Error Code definitions.
// These are shared by all subclasses.
//
#define EFI_CU_EC_NON_SPECIFIC 0x00000000
#define EFI_CU_EC_DISABLED 0x00000001
#define EFI_CU_EC_NOT_SUPPORTED 0x00000002
#define EFI_CU_EC_NOT_DETECTED 0x00000003
#define EFI_CU_EC_NOT_CONFIGURED 0x00000004
//
// Computing Unit Unspecified Subclass Error Code definitions.
//
//
// Computing Unit Host Processor Subclass Error Code definitions.
//
#define EFI_CU_HP_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_CU_HP_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_CU_HP_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_CU_HP_EC_TIMER_EXPIRED (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_CU_HP_EC_SELF_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_CU_HP_EC_INTERNAL (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_CU_HP_EC_THERMAL (EFI_SUBCLASS_SPECIFIC | 0x00000006)
#define EFI_CU_HP_EC_LOW_VOLTAGE (EFI_SUBCLASS_SPECIFIC | 0x00000007)
#define EFI_CU_HP_EC_HIGH_VOLTAGE (EFI_SUBCLASS_SPECIFIC | 0x00000008)
#define EFI_CU_HP_EC_CACHE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
#define EFI_CU_HP_EC_MICROCODE_UPDATE (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
#define EFI_CU_HP_EC_CORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
#define EFI_CU_HP_EC_UNCORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
#define EFI_CU_HP_EC_NO_MICROCODE_UPDATE (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
//
// 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)
//
// Computing Unit IO Processor Subclass Error Code definitions.
//
//
// 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)
//
// 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)
//
// Computing Unit Chipset Subclass Error Code definitions.
//
///////////////////////////////////////////////////////////////////////////////
// Section 4
///////////////////////////////////////////////////////////////////////////////
//
// Peripheral Subclass definitions.
// Values of 12-127 are reserved for future use by this
// specification.
// Values of 128-255 are reserved for OEM use.
//
#define EFI_PERIPHERAL_UNSPECIFIED (EFI_PERIPHERAL | 0x00000000)
#define EFI_PERIPHERAL_KEYBOARD (EFI_PERIPHERAL | 0x00010000)
#define EFI_PERIPHERAL_MOUSE (EFI_PERIPHERAL | 0x00020000)
#define EFI_PERIPHERAL_LOCAL_CONSOLE (EFI_PERIPHERAL | 0x00030000)
#define EFI_PERIPHERAL_REMOTE_CONSOLE (EFI_PERIPHERAL | 0x00040000)
#define EFI_PERIPHERAL_SERIAL_PORT (EFI_PERIPHERAL | 0x00050000)
#define EFI_PERIPHERAL_PARALLEL_PORT (EFI_PERIPHERAL | 0x00060000)
#define EFI_PERIPHERAL_FIXED_MEDIA (EFI_PERIPHERAL | 0x00070000)
#define EFI_PERIPHERAL_REMOVABLE_MEDIA (EFI_PERIPHERAL | 0x00080000)
#define EFI_PERIPHERAL_AUDIO_INPUT (EFI_PERIPHERAL | 0x00090000)
#define EFI_PERIPHERAL_AUDIO_OUTPUT (EFI_PERIPHERAL | 0x000A0000)
#define EFI_PERIPHERAL_LCD_DEVICE (EFI_PERIPHERAL | 0x000B0000)
#define EFI_PERIPHERAL_NETWORK (EFI_PERIPHERAL | 0x000C0000)
//
// Peripheral Class Progress Code definitions.
// These are shared by all subclasses.
//
#define EFI_P_PC_INIT 0x00000000
#define EFI_P_PC_RESET 0x00000001
#define EFI_P_PC_DISABLE 0x00000002
#define EFI_P_PC_PRESENCE_DETECT 0x00000003
#define EFI_P_PC_ENABLE 0x00000004
#define EFI_P_PC_RECONFIG 0x00000005
#define EFI_P_PC_DETECTED 0x00000006
//
// Peripheral Class Unspecified Subclass Progress Code definitions.
//
//
// Peripheral Class Keyboard Subclass Progress Code definitions.
//
#define EFI_P_KEYBOARD_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_P_KEYBOARD_PC_SELF_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000001)
//
// Peripheral Class Mouse Subclass Progress Code definitions.
//
#define EFI_P_MOUSE_PC_SELF_TEST (EFI_SUBCLASS_SPECIFIC | 0x00000000)
//
// Peripheral Class Local Console Subclass Progress Code definitions.
//
//
// Peripheral Class Remote Console Subclass Progress Code definitions.
//
//
// Peripheral Class Serial Port Subclass Progress Code definitions.
//
#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000)
//
// Peripheral Class Parallel Port Subclass Progress Code definitions.
//
//
// Peripheral Class Fixed Media Subclass Progress Code definitions.
//
//
// Peripheral Class Removable Media Subclass Progress Code definitions.
//
//
// Peripheral Class Audio Input Subclass Progress Code definitions.
//
//
// Peripheral Class Audio Output Subclass Progress Code definitions.
//
//
// Peripheral Class LCD Device Subclass Progress Code definitions.
//
//
// Peripheral Class Network Subclass Progress Code definitions.
//
//
// Peripheral Class Error Code definitions.
// These are shared by all subclasses.
//
#define EFI_P_EC_NON_SPECIFIC 0x00000000
#define EFI_P_EC_DISABLED 0x00000001
#define EFI_P_EC_NOT_SUPPORTED 0x00000002
#define EFI_P_EC_NOT_DETECTED 0x00000003
#define EFI_P_EC_NOT_CONFIGURED 0x00000004
#define EFI_P_EC_INTERFACE_ERROR 0x00000005
#define EFI_P_EC_CONTROLLER_ERROR 0x00000006
#define EFI_P_EC_INPUT_ERROR 0x00000007
#define EFI_P_EC_OUTPUT_ERROR 0x00000008
#define EFI_P_EC_RESOURCE_CONFLICT 0x00000009
//
// Peripheral Class Unspecified Subclass Error Code definitions.
//
//
// 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)
//
// Peripheral Class Mouse Subclass Error Code definitions.
//
#define EFI_P_MOUSE_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
//
// Peripheral Class Local Console Subclass Error Code definitions.
//
//
// Peripheral Class Remote Console Subclass Error Code definitions.
//
//
// Peripheral Class Serial Port Subclass Error Code definitions.
//
//
// Peripheral Class Parallel Port Subclass Error Code definitions.
//
//
// Peripheral Class Fixed Media Subclass Error Code definitions.
//
//
// Peripheral Class Removable Media Subclass Error Code definitions.
//
//
// Peripheral Class Audio Input Subclass Error Code definitions.
//
//
// Peripheral Class Audio Output Subclass Error Code definitions.
//
//
// Peripheral Class LCD Device Subclass Error Code definitions.
//
//
// Peripheral Class Network Subclass Error Code definitions.
//
///////////////////////////////////////////////////////////////////////////////
// Section 5
///////////////////////////////////////////////////////////////////////////////
//
// IO Bus Subclass definitions.
// Values of 14-127 are reserved for future use by this
// specification.
// Values of 128-255 are reserved for OEM use.
//
#define EFI_IO_BUS_UNSPECIFIED (EFI_IO_BUS | 0x00000000)
#define EFI_IO_BUS_PCI (EFI_IO_BUS | 0x00010000)
#define EFI_IO_BUS_USB (EFI_IO_BUS | 0x00020000)
#define EFI_IO_BUS_IBA (EFI_IO_BUS | 0x00030000)
#define EFI_IO_BUS_AGP (EFI_IO_BUS | 0x00040000)
#define EFI_IO_BUS_PC_CARD (EFI_IO_BUS | 0x00050000)
#define EFI_IO_BUS_LPC (EFI_IO_BUS | 0x00060000)
#define EFI_IO_BUS_SCSI (EFI_IO_BUS | 0x00070000)
#define EFI_IO_BUS_ATA_ATAPI (EFI_IO_BUS | 0x00080000)
#define EFI_IO_BUS_FC (EFI_IO_BUS | 0x00090000)
#define EFI_IO_BUS_IP_NETWORK (EFI_IO_BUS | 0x000A0000)
#define EFI_IO_BUS_SMBUS (EFI_IO_BUS | 0x000B0000)
#define EFI_IO_BUS_I2C (EFI_IO_BUS | 0x000C0000)
//
// IO Bus Class Progress Code definitions.
// 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
//
// IO Bus Class Unspecified Subclass Progress Code definitions.
//
//
// IO Bus Class PCI Subclass Progress Code definitions.
//
#define EFI_IOB_PCI_PC_BUS_ENUM (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_IOB_PCI_PC_RES_ALLOC (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_IOB_PCI_PC_HPC_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000002)
//
// IO Bus Class USB Subclass Progress Code definitions.
//
//
// IO Bus Class IBA Subclass Progress Code definitions.
//
//
// IO Bus Class AGP Subclass Progress Code definitions.
//
//
// IO Bus Class PC Card Subclass Progress Code definitions.
//
//
// IO Bus Class LPC Subclass Progress Code definitions.
//
//
// IO Bus Class SCSI Subclass Progress Code definitions.
//
//
// IO Bus Class ATA/ATAPI Subclass Progress Code definitions.
//
#define EFI_IOB_ATA_BUS_SMART_ENABLE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_IOB_ATA_BUS_SMART_DISABLE (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_IOB_ATA_BUS_SMART_OVERTHRESHOLD (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_IOB_ATA_BUS_SMART_UNDERTHRESHOLD (EFI_SUBCLASS_SPECIFIC | 0x00000003)
//
// IO Bus Class FC Subclass Progress Code definitions.
//
//
// IO Bus Class IP Network Subclass Progress Code definitions.
//
//
// IO Bus Class SMBUS Subclass Progress Code definitions.
//
//
// IO Bus Class I2C Subclass Progress Code definitions.
//
//
// IO Bus Class Error Code definitions.
// These are shared by all subclasses.
//
#define EFI_IOB_EC_NON_SPECIFIC 0x00000000
#define EFI_IOB_EC_DISABLED 0x00000001
#define EFI_IOB_EC_NOT_SUPPORTED 0x00000002
#define EFI_IOB_EC_NOT_DETECTED 0x00000003
#define EFI_IOB_EC_NOT_CONFIGURED 0x00000004
#define EFI_IOB_EC_INTERFACE_ERROR 0x00000005
#define EFI_IOB_EC_CONTROLLER_ERROR 0x00000006
#define EFI_IOB_EC_READ_ERROR 0x00000007
#define EFI_IOB_EC_WRITE_ERROR 0x00000008
#define EFI_IOB_EC_RESOURCE_CONFLICT 0x00000009
//
// IO Bus Class Unspecified Subclass Error Code definitions.
//
//
// 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)
//
// IO Bus Class USB Subclass Error Code definitions.
//
//
// IO Bus Class IBA Subclass Error Code definitions.
//
//
// IO Bus Class AGP Subclass Error Code definitions.
//
//
// IO Bus Class PC Card Subclass Error Code definitions.
//
//
// IO Bus Class LPC Subclass Error Code definitions.
//
//
// IO Bus Class SCSI Subclass Error Code definitions.
//
//
// IO Bus Class ATA/ATAPI Subclass Error Code definitions.
//
#define EFI_IOB_ATA_BUS_SMART_NOTSUPPORTED (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_IOB_ATA_BUS_SMART_DISABLED (EFI_SUBCLASS_SPECIFIC | 0x00000001)
//
// IO Bus Class FC Subclass Error Code definitions.
//
//
// IO Bus Class IP Network Subclass Error Code definitions.
//
//
// IO Bus Class SMBUS Subclass Error Code definitions.
//
//
// IO Bus Class I2C Subclass Error Code definitions.
//
///////////////////////////////////////////////////////////////////////////////
// Section 6
///////////////////////////////////////////////////////////////////////////////
//
// Software Subclass definitions.
// Values of 14-127 are reserved for future use by this
// specification.
// Values of 128-255 are reserved for OEM use.
//
#define EFI_SOFTWARE_UNSPECIFIED (EFI_SOFTWARE | 0x00000000)
#define EFI_SOFTWARE_SEC (EFI_SOFTWARE | 0x00010000)
#define EFI_SOFTWARE_PEI_CORE (EFI_SOFTWARE | 0x00020000)
#define EFI_SOFTWARE_PEI_MODULE (EFI_SOFTWARE | 0x00030000)
#define EFI_SOFTWARE_DXE_CORE (EFI_SOFTWARE | 0x00040000)
#define EFI_SOFTWARE_DXE_BS_DRIVER (EFI_SOFTWARE | 0x00050000)
#define EFI_SOFTWARE_DXE_RT_DRIVER (EFI_SOFTWARE | 0x00060000)
#define EFI_SOFTWARE_SMM_DRIVER (EFI_SOFTWARE | 0x00070000)
#define EFI_SOFTWARE_EFI_APPLICATION (EFI_SOFTWARE | 0x00080000)
#define EFI_SOFTWARE_EFI_OS_LOADER (EFI_SOFTWARE | 0x00090000)
#define EFI_SOFTWARE_RT (EFI_SOFTWARE | 0x000A0000)
#define EFI_SOFTWARE_AL (EFI_SOFTWARE | 0x000B0000)
#define EFI_SOFTWARE_EBC_EXCEPTION (EFI_SOFTWARE | 0x000C0000)
#define EFI_SOFTWARE_IA32_EXCEPTION (EFI_SOFTWARE | 0x000D0000)
#define EFI_SOFTWARE_IPF_EXCEPTION (EFI_SOFTWARE | 0x000E0000)
#define EFI_SOFTWARE_PEI_SERVICE (EFI_SOFTWARE | 0x000F0000)
#define EFI_SOFTWARE_EFI_BOOT_SERVICE (EFI_SOFTWARE | 0x00100000)
#define EFI_SOFTWARE_EFI_RUNTIME_SERVICE (EFI_SOFTWARE | 0x00110000)
#define EFI_SOFTWARE_EFI_DXE_SERVICE (EFI_SOFTWARE | 0x00120000)
//
// Software Class Progress Code definitions.
// These are shared by all subclasses.
//
#define EFI_SW_PC_INIT 0x00000000
#define EFI_SW_PC_LOAD 0x00000001
#define EFI_SW_PC_INIT_BEGIN 0x00000002
#define EFI_SW_PC_INIT_END 0x00000003
#define EFI_SW_PC_AUTHENTICATE_BEGIN 0x00000004
#define EFI_SW_PC_AUTHENTICATE_END 0x00000005
#define EFI_SW_PC_INPUT_WAIT 0x00000006
#define EFI_SW_PC_USER_SETUP 0x00000007
//
// Software Class Unspecified Subclass Progress Code definitions.
//
//
// 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)
//
// Software Class PEI Core Subclass Progress Code definitions.
//
#define EFI_SW_PEI_CORE_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_PEI_CORE_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_PEI_CORE_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000002)
//
// Software Class PEI Module Subclass Progress Code definitions.
//
#define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_PEIM_PC_CAPSULE_LOAD (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_PEIM_PC_CAPSULE_START (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_PEIM_PC_RECOVERY_USER (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_PEIM_PC_RECOVERY_AUTO (EFI_SUBCLASS_SPECIFIC | 0x00000004)
//
// Software Class DXE Core Subclass Progress Code definitions.
//
#define EFI_SW_DXE_CORE_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_DXE_CORE_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_DXE_CORE_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_DXE_CORE_PC_START_DRIVER (EFI_SUBCLASS_SPECIFIC | 0x00000003)
//
// 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_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)
//
// Software Class SMM Driver Subclass Progress Code definitions.
//
//
// Software Class EFI Application Subclass Progress Code definitions.
//
//
// Software Class EFI OS Loader Subclass Progress Code definitions.
//
//
// Software Class EFI RT Subclass Progress Code definitions.
//
#define EFI_SW_RT_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_RT_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_RT_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000002)
//
// Software Class EFI AL Subclass Progress Code definitions.
//
#define EFI_SW_AL_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_AL_PC_RETURN_TO_LAST (EFI_SUBCLASS_SPECIFIC | 0x00000001)
//
// Software Class EBC Exception Subclass Progress Code definitions.
//
//
// Software Class IA32 Exception Subclass Progress Code definitions.
//
//
// Software Class IPF Exception Subclass Progress Code definitions.
//
//
// Software Class PEI Services Subclass Progress Code definitions.
//
#define EFI_SW_PS_PC_INSTALL_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_PS_PC_REINSTALL_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_PS_PC_LOCATE_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_PS_PC_NOTIFY_PPI (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_PS_PC_GET_BOOT_MODE (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_SW_PS_PC_SET_BOOT_MODE (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_SW_PS_PC_GET_HOB_LIST (EFI_SUBCLASS_SPECIFIC | 0x00000006)
#define EFI_SW_PS_PC_CREATE_HOB (EFI_SUBCLASS_SPECIFIC | 0x00000007)
#define EFI_SW_PS_PC_FFS_FIND_NEXT_VOLUME (EFI_SUBCLASS_SPECIFIC | 0x00000008)
#define EFI_SW_PS_PC_FFS_FIND_NEXT_FILE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
#define EFI_SW_PS_PC_FFS_FIND_SECTION_DATA (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
#define EFI_SW_PS_PC_INSTALL_PEI_MEMORY (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
#define EFI_SW_PS_PC_ALLOCATE_PAGES (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
#define EFI_SW_PS_PC_ALLOCATE_POOL (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
#define EFI_SW_PS_PC_COPY_MEM (EFI_SUBCLASS_SPECIFIC | 0x0000000E)
#define EFI_SW_PS_PC_SET_MEM (EFI_SUBCLASS_SPECIFIC | 0x0000000F)
//
// Software Class EFI Boot Services Subclass Progress Code definitions.
//
#define EFI_SW_BS_PC_RAISE_TPL (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_BS_PC_RESTORE_TPL (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_BS_PC_ALLOCATE_PAGES (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_BS_PC_FREE_PAGES (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_BS_PC_GET_MEMORY_MAP (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_SW_BS_PC_ALLOCATE_POOL (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_SW_BS_PC_FREE_POOL (EFI_SUBCLASS_SPECIFIC | 0x00000006)
#define EFI_SW_BS_PC_CREATE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000007)
#define EFI_SW_BS_PC_SET_TIMER (EFI_SUBCLASS_SPECIFIC | 0x00000008)
#define EFI_SW_BS_PC_WAIT_FOR_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000009)
#define EFI_SW_BS_PC_SIGNAL_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
#define EFI_SW_BS_PC_CLOSE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
#define EFI_SW_BS_PC_CHECK_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
#define EFI_SW_BS_PC_INSTALL_PROTOCOL_INTERFACE (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
#define EFI_SW_BS_PC_REINSTALL_PROTOCOL_INTERFACE (EFI_SUBCLASS_SPECIFIC | 0x0000000E)
#define EFI_SW_BS_PC_UNINSTALL_PROTOCOL_INTERFACE (EFI_SUBCLASS_SPECIFIC | 0x0000000F)
#define EFI_SW_BS_PC_HANDLE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000010)
#define EFI_SW_BS_PC_PC_HANDLE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000011)
#define EFI_SW_BS_PC_REGISTER_PROTOCOL_NOTIFY (EFI_SUBCLASS_SPECIFIC | 0x00000012)
#define EFI_SW_BS_PC_LOCATE_HANDLE (EFI_SUBCLASS_SPECIFIC | 0x00000013)
#define EFI_SW_BS_PC_INSTALL_CONFIGURATION_TABLE (EFI_SUBCLASS_SPECIFIC | 0x00000014)
#define EFI_SW_BS_PC_LOAD_IMAGE (EFI_SUBCLASS_SPECIFIC | 0x00000015)
#define EFI_SW_BS_PC_START_IMAGE (EFI_SUBCLASS_SPECIFIC | 0x00000016)
#define EFI_SW_BS_PC_EXIT (EFI_SUBCLASS_SPECIFIC | 0x00000017)
#define EFI_SW_BS_PC_UNLOAD_IMAGE (EFI_SUBCLASS_SPECIFIC | 0x00000018)
#define EFI_SW_BS_PC_EXIT_BOOT_SERVICES (EFI_SUBCLASS_SPECIFIC | 0x00000019)
#define EFI_SW_BS_PC_GET_NEXT_MONOTONIC_COUNT (EFI_SUBCLASS_SPECIFIC | 0x0000001A)
#define EFI_SW_BS_PC_STALL (EFI_SUBCLASS_SPECIFIC | 0x0000001B)
#define EFI_SW_BS_PC_SET_WATCHDOG_TIMER (EFI_SUBCLASS_SPECIFIC | 0x0000001C)
#define EFI_SW_BS_PC_CONNECT_CONTROLLER (EFI_SUBCLASS_SPECIFIC | 0x0000001D)
#define EFI_SW_BS_PC_DISCONNECT_CONTROLLER (EFI_SUBCLASS_SPECIFIC | 0x0000001E)
#define EFI_SW_BS_PC_OPEN_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x0000001F)
#define EFI_SW_BS_PC_CLOSE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000020)
#define EFI_SW_BS_PC_OPEN_PROTOCOL_INFORMATION (EFI_SUBCLASS_SPECIFIC | 0x00000021)
#define EFI_SW_BS_PC_PROTOCOLS_PER_HANDLE (EFI_SUBCLASS_SPECIFIC | 0x00000022)
#define EFI_SW_BS_PC_LOCATE_HANDLE_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000023)
#define EFI_SW_BS_PC_LOCATE_PROTOCOL (EFI_SUBCLASS_SPECIFIC | 0x00000024)
#define EFI_SW_BS_PC_INSTALL_MULTIPLE_INTERFACES (EFI_SUBCLASS_SPECIFIC | 0x00000025)
#define EFI_SW_BS_PC_UNINSTALL_MULTIPLE_INTERFACES (EFI_SUBCLASS_SPECIFIC | 0x00000026)
#define EFI_SW_BS_PC_CALCULATE_CRC_32 (EFI_SUBCLASS_SPECIFIC | 0x00000027)
#define EFI_SW_BS_PC_COPY_MEM (EFI_SUBCLASS_SPECIFIC | 0x00000028)
#define EFI_SW_BS_PC_SET_MEM (EFI_SUBCLASS_SPECIFIC | 0x00000029)
//
// Software Class EFI Runtime Services Subclass Progress Code definitions.
//
#define EFI_SW_RS_PC_GET_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_RS_PC_SET_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_RS_PC_GET_WAKEUP_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_RS_PC_SET_WAKEUP_TIME (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_SW_RS_PC_CONVERT_POINTER (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_SW_RS_PC_GET_VARIABLE (EFI_SUBCLASS_SPECIFIC | 0x00000006)
#define EFI_SW_RS_PC_GET_NEXT_VARIABLE_NAME (EFI_SUBCLASS_SPECIFIC | 0x00000007)
#define EFI_SW_RS_PC_SET_VARIABLE (EFI_SUBCLASS_SPECIFIC | 0x00000008)
#define EFI_SW_RS_PC_GET_NEXT_HIGH_MONOTONIC_COUNT (EFI_SUBCLASS_SPECIFIC | 0x00000009)
#define EFI_SW_RS_PC_RESET_SYSTEM (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
//
// Software Class EFI DXE Services Subclass Progress Code definitions
//
#define EFI_SW_DS_PC_ADD_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_DS_PC_ALLOCATE_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000001)
#define EFI_SW_DS_PC_FREE_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_DS_PC_REMOVE_MEMORY_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_DS_PC_GET_MEMORY_SPACE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000004)
#define EFI_SW_DS_PC_SET_MEMORY_SPACE_ATTRIBUTES (EFI_SUBCLASS_SPECIFIC | 0x00000005)
#define EFI_SW_DS_PC_GET_MEMORY_SPACE_MAP (EFI_SUBCLASS_SPECIFIC | 0x00000006)
#define EFI_SW_DS_PC_ADD_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000007)
#define EFI_SW_DS_PC_ALLOCATE_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000008)
#define EFI_SW_DS_PC_FREE_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000009)
#define EFI_SW_DS_PC_REMOVE_IO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x0000000A)
#define EFI_SW_DS_PC_GET_IO_SPACE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x0000000B)
#define EFI_SW_DS_PC_GET_IO_SPACE_MAP (EFI_SUBCLASS_SPECIFIC | 0x0000000C)
#define EFI_SW_DS_PC_DISPATCH (EFI_SUBCLASS_SPECIFIC | 0x0000000D)
#define EFI_SW_DS_PC_SCHEDULE (EFI_SUBCLASS_SPECIFIC | 0x0000000E)
#define EFI_SW_DS_PC_TRUST (EFI_SUBCLASS_SPECIFIC | 0x0000000F)
#define EFI_SW_DS_PC_PROCESS_FIRMWARE_VOLUME (EFI_SUBCLASS_SPECIFIC | 0x00000010)
//
// Software Class Error Code definitions.
// These are shared by all subclasses.
//
#define EFI_SW_EC_NON_SPECIFIC 0x00000000
#define EFI_SW_EC_LOAD_ERROR 0x00000001
#define EFI_SW_EC_INVALID_PARAMETER 0x00000002
#define EFI_SW_EC_UNSUPPORTED 0x00000003
#define EFI_SW_EC_INVALID_BUFFER 0x00000004
#define EFI_SW_EC_OUT_OF_RESOURCES 0x00000005
#define EFI_SW_EC_ABORTED 0x00000006
#define EFI_SW_EC_ILLEGAL_SOFTWARE_STATE 0x00000007
#define EFI_SW_EC_ILLEGAL_HARDWARE_STATE 0x00000008
#define EFI_SW_EC_START_ERROR 0x00000009
#define EFI_SW_EC_BAD_DATE_TIME 0x0000000A
#define EFI_SW_EC_CFG_INVALID 0x0000000B
#define EFI_SW_EC_CFG_CLR_REQUEST 0x0000000C
#define EFI_SW_EC_CFG_DEFAULT 0x0000000D
#define EFI_SW_EC_PWD_INVALID 0x0000000E
#define EFI_SW_EC_PWD_CLR_REQUEST 0x0000000F
#define EFI_SW_EC_PWD_CLEARED 0x00000010
#define EFI_SW_EC_EVENT_LOG_FULL 0x00000011
//
// Software Class Unspecified Subclass Error Code definitions.
//
//
// Software Class SEC Subclass Error Code definitions.
//
//
// Software Class PEI Core Subclass Error Code definitions.
//
#define EFI_SW_PEI_CORE_EC_DXE_CORRUPT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
//
// Software Class PEI Module Subclass Error Code definitions.
//
#define EFI_SW_PEIM_EC_NO_RECOVERY_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_PEIM_EC_INVALID_CAPSULE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000001)
//
// Software Class DXE Core Subclass Error Code definitions.
//
#define EFI_SW_CSM_LEGACY_ROM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000)
//
// Software Class DXE Boot Service Driver Subclass Error Code definitions.
//
#define EFI_SW_DXE_BS_EC_LEGACY_OPROM_NO_SPACE (EFI_SUBCLASS_SPECIFIC | 0x00000000)
//
// Software Class DXE Runtime Service Driver Subclass Error Code definitions.
//
//
// Software Class SMM Driver Subclass Error Code definitions.
//
//
// Software Class EFI Application Subclass Error Code definitions.
//
//
// Software Class EFI OS Loader Subclass Error Code definitions.
//
//
// Software Class EFI RT Subclass Error Code definitions.
//
//
// Software Class EFI AL Subclass Error Code definitions.
//
//
// Software Class EBC Exception Subclass Error Code definitions.
// These exceptions are derived from the debug protocol definitions in the EFI
// specification.
//
#define EFI_SW_EC_EBC_UNDEFINED 0x00000000
#define EFI_SW_EC_EBC_DIVIDE_ERROR EXCEPT_EBC_DIVIDE_ERROR
#define EFI_SW_EC_EBC_DEBUG EXCEPT_EBC_DEBUG
#define EFI_SW_EC_EBC_BREAKPOINT EXCEPT_EBC_BREAKPOINT
#define EFI_SW_EC_EBC_OVERFLOW EXCEPT_EBC_OVERFLOW
#define EFI_SW_EC_EBC_INVALID_OPCODE EXCEPT_EBC_INVALID_OPCODE
#define EFI_SW_EC_EBC_STACK_FAULT EXCEPT_EBC_STACK_FAULT
#define EFI_SW_EC_EBC_ALIGNMENT_CHECK EXCEPT_EBC_ALIGNMENT_CHECK
#define EFI_SW_EC_EBC_INSTRUCTION_ENCODING EXCEPT_EBC_INSTRUCTION_ENCODING
#define EFI_SW_EC_EBC_BAD_BREAK EXCEPT_EBC_BAD_BREAK
#define EFI_SW_EC_EBC_STEP EXCEPT_EBC_STEP
//
// Software Class IA32 Exception Subclass Error Code definitions.
// These exceptions are derived from the debug protocol definitions in the EFI
// specification.
//
#define EFI_SW_EC_IA32_DIVIDE_ERROR EXCEPT_IA32_DIVIDE_ERROR
#define EFI_SW_EC_IA32_DEBUG EXCEPT_IA32_DEBUG
#define EFI_SW_EC_IA32_NMI EXCEPT_IA32_NMI
#define EFI_SW_EC_IA32_BREAKPOINT EXCEPT_IA32_BREAKPOINT
#define EFI_SW_EC_IA32_OVERFLOW EXCEPT_IA32_OVERFLOW
#define EFI_SW_EC_IA32_BOUND EXCEPT_IA32_BOUND
#define EFI_SW_EC_IA32_INVALID_OPCODE EXCEPT_IA32_INVALID_OPCODE
#define EFI_SW_EC_IA32_DOUBLE_FAULT EXCEPT_IA32_DOUBLE_FAULT
#define EFI_SW_EC_IA32_INVALID_TSS EXCEPT_IA32_INVALID_TSS
#define EFI_SW_EC_IA32_SEG_NOT_PRESENT EXCEPT_IA32_SEG_NOT_PRESENT
#define EFI_SW_EC_IA32_STACK_FAULT EXCEPT_IA32_STACK_FAULT
#define EFI_SW_EC_IA32_GP_FAULT EXCEPT_IA32_GP_FAULT
#define EFI_SW_EC_IA32_PAGE_FAULT EXCEPT_IA32_PAGE_FAULT
#define EFI_SW_EC_IA32_FP_ERROR EXCEPT_IA32_FP_ERROR
#define EFI_SW_EC_IA32_ALIGNMENT_CHECK EXCEPT_IA32_ALIGNMENT_CHECK
#define EFI_SW_EC_IA32_MACHINE_CHECK EXCEPT_IA32_MACHINE_CHECK
#define EFI_SW_EC_IA32_SIMD EXCEPT_IA32_SIMD
//
// Software Class IPF Exception Subclass Error Code definitions.
// These exceptions are derived from the debug protocol definitions in the EFI
// specification.
//
#define EFI_SW_EC_IPF_ALT_DTLB EXCEPT_IPF_ALT_DTLB
#define EFI_SW_EC_IPF_DNESTED_TLB EXCEPT_IPF_DNESTED_TLB
#define EFI_SW_EC_IPF_BREAKPOINT EXCEPT_IPF_BREAKPOINT
#define EFI_SW_EC_IPF_EXTERNAL_INTERRUPT EXCEPT_IPF_EXTERNAL_INTERRUPT
#define EFI_SW_EC_IPF_GEN_EXCEPT EXCEPT_IPF_GEN_EXCEPT
#define EFI_SW_EC_IPF_NAT_CONSUMPTION EXCEPT_IPF_NAT_CONSUMPTION
#define EFI_SW_EC_IPF_DEBUG_EXCEPT EXCEPT_IPF_DEBUG_EXCEPT
#define EFI_SW_EC_IPF_UNALIGNED_ACCESS EXCEPT_IPF_UNALIGNED_ACCESS
#define EFI_SW_EC_IPF_FP_FAULT EXCEPT_IPF_FP_FAULT
#define EFI_SW_EC_IPF_FP_TRAP EXCEPT_IPF_FP_TRAP
#define EFI_SW_EC_IPF_TAKEN_BRANCH EXCEPT_IPF_TAKEN_BRANCH
#define EFI_SW_EC_IPF_SINGLE_STEP EXCEPT_IPF_SINGLE_STEP
//
// Software Class PEI Service Subclass Error Code definitions.
//
//
// Software Class EFI Boot Service Subclass Error Code definitions.
//
//
// Software Class EFI Runtime Service Subclass Error Code definitions.
//
//
// Software Class EFI DXE Service Subclass Error Code definitions.
//
///////////////////////////////////////////////////////////////////////////////
// Section 7
///////////////////////////////////////////////////////////////////////////////
//
// Debug Code definitions for all classes and subclass
// Only one debug code is defined at this point and should
// be used for anything that gets sent to debug stream.
//
#define EFI_DC_UNSPECIFIED 0x0
#endif

View File

@ -1,336 +0,0 @@
/** @file
This file defines the data structures to support Status Code Data.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: StatusCodeDataTypeId.h
@par Revision Reference:
These definitions are from Framework of EFI Status Code Spec
Version 0.92.
**/
#ifndef __STATUS_CODE_DATA_TYPE_ID_H__
#define __STATUS_CODE_DATA_TYPE_ID_H__
///
/// The size of string
///
#define EFI_STATUS_CODE_DATA_MAX_STRING_SIZE 150
///
/// This is the max data size including all the headers which can be passed
/// as Status Code data. This data should be multiple of 8 byte
/// to avoid any kind of boundary issue. Also, sum of this data size (inclusive
/// of size of EFI_STATUS_CODE_DATA should not exceed the max record size of
/// data hub
///
#define EFI_STATUS_CODE_DATA_MAX_SIZE 200
#pragma pack(1)
typedef enum {
EfiStringAscii,
EfiStringUnicode,
EfiStringToken
} EFI_STRING_TYPE;
typedef struct {
EFI_HII_HANDLE Handle;
STRING_REF Token;
} EFI_STATUS_CODE_STRING_TOKEN;
typedef union {
CHAR8 *Ascii;
CHAR16 *Unicode;
EFI_STATUS_CODE_STRING_TOKEN Hii;
} EFI_STATUS_CODE_STRING;
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_STRING_TYPE StringType;
EFI_STATUS_CODE_STRING String;
} EFI_STATUS_CODE_STRING_DATA;
#pragma pack()
#pragma pack(1)
typedef struct {
UINT32 ErrorLevel;
//
// 12 * sizeof (UINT64) Var Arg stack
//
// ascii DEBUG () Format string
//
} EFI_DEBUG_INFO;
#pragma pack()
//
// declaration for EFI_EXP_DATA. This may change
//
// typedef UINTN EFI_EXP_DATA;
///
/// Voltage Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_EXP_BASE10_DATA Voltage;
EFI_EXP_BASE10_DATA Threshold;
} EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;
///
/// Microcode Update Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT32 Version;
} EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;
///
/// Asynchronous Timer Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_EXP_BASE10_DATA TimerLimit;
} EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;
///
/// Host Processor Mismatch Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT32 Instance;
UINT16 Attributes;
} EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA;
//
// EFI_COMPUTING_UNIT_MISMATCH_ATTRIBUTES
// All other attributes are reserved for future use and
// must be initialized to 0.
//
#define EFI_COMPUTING_UNIT_MISMATCH_SPEED 0x0001
#define EFI_COMPUTING_UNIT_MISMATCH_FSB_SPEED 0x0002
#define EFI_COMPUTING_UNIT_MISMATCH_FAMILY 0x0004
#define EFI_COMPUTING_UNIT_MISMATCH_MODEL 0x0008
#define EFI_COMPUTING_UNIT_MISMATCH_STEPPING 0x0010
#define EFI_COMPUTING_UNIT_MISMATCH_CACHE_SIZE 0x0020
#define EFI_COMPUTING_UNIT_MISMATCH_OEM1 0x1000
#define EFI_COMPUTING_UNIT_MISMATCH_OEM2 0x2000
#define EFI_COMPUTING_UNIT_MISMATCH_OEM3 0x4000
#define EFI_COMPUTING_UNIT_MISMATCH_OEM4 0x8000
///
/// Thermal Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_EXP_BASE10_DATA Temperature;
EFI_EXP_BASE10_DATA Threshold;
} EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA;
///
/// Processor Disabled Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT32 Cause;
BOOLEAN SoftwareDisabled;
} EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;
typedef enum {
EfiInitCacheDataOnly,
EfiInitCacheInstrOnly,
EfiInitCacheBoth,
EfiInitCacheUnspecified
} EFI_INIT_CACHE_TYPE;
///
/// Embedded cache init extended data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT32 Level;
EFI_INIT_CACHE_TYPE Type;
} EFI_CACHE_INIT_DATA;
//
// Memory Extended Error Data
//
///
/// Memory Error Granularity Definition
///
typedef UINT8 EFI_MEMORY_ERROR_GRANULARITY;
///
/// Memory Error Operation Definition
///
typedef UINT8 EFI_MEMORY_ERROR_OPERATION;
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_MEMORY_ERROR_GRANULARITY Granularity;
EFI_MEMORY_ERROR_OPERATION Operation;
UINTN Syndrome;
EFI_PHYSICAL_ADDRESS Address;
UINTN Resolution;
} EFI_MEMORY_EXTENDED_ERROR_DATA;
//
// Memory Error Granularities
//
#define EFI_MEMORY_ERROR_OTHER 0x01
#define EFI_MEMORY_ERROR_UNKNOWN 0x02
#define EFI_MEMORY_ERROR_DEVICE 0x03
#define EFI_MEMORY_ERROR_PARTITION 0x04
//
// Memory Error Operations
//
#define EFI_MEMORY_OPERATION_OTHER 0x01
#define EFI_MEMORY_OPERATION_UNKNOWN 0x02
#define EFI_MEMORY_OPERATION_READ 0x03
#define EFI_MEMORY_OPERATION_WRITE 0x04
#define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05
//
// Define shorthands to describe Group Operations
// Many memory init operations are essentially group
// operations.
/// A shorthand to describe that the operation is performed
/// on multiple devices within the array
///
#define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe
///
/// A shorthand to describe that the operation is performed on all devices within the array
///
#define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff
///
/// A shorthand to describe that the operation is performed on multiple arrays
///
#define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe
///
/// A shorthand to describe that the operation is performed on all the arrays
///
#define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff
//
// DIMM number
//
#pragma pack(1)
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT16 Array;
UINT16 Device;
} EFI_STATUS_CODE_DIMM_NUMBER;
#pragma pack()
///
/// Memory Module Mismatch Extended Error Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_STATUS_CODE_DIMM_NUMBER Instance;
} EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA;
///
/// Memory Range Extended Data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_PHYSICAL_ADDRESS Start;
EFI_PHYSICAL_ADDRESS Length;
} EFI_MEMORY_RANGE_EXTENDED_DATA;
///
/// Device handle Extended Data. Used for many
/// errors and progress codes to point to the device.
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_HANDLE Handle;
} EFI_DEVICE_HANDLE_EXTENDED_DATA;
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT8 *DevicePath;
} EFI_DEVICE_PATH_EXTENDED_DATA;
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_HANDLE ControllerHandle;
EFI_HANDLE DriverBindingHandle;
UINT16 DevicePathSize;
UINT8 *RemainingDevicePath;
} EFI_STATUS_CODE_START_EXTENDED_DATA;
///
/// Resource Allocation Failure Extended Error Data
///
/*
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
UINT32 Bar;
VOID *ReqRes;
VOID *AllocRes;
} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
*/
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT32 Bar;
UINT16 DevicePathSize;
UINT16 ReqResSize;
UINT16 AllocResSize;
UINT8 *DevicePath;
UINT8 *ReqRes;
UINT8 *AllocRes;
} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
///
/// Extended Error Data for Assert
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
UINT32 LineNumber;
UINT32 FileNameSize;
EFI_STATUS_CODE_STRING_DATA *FileName;
} EFI_DEBUG_ASSERT_DATA;
///
/// System Context Data EBC/IA32/IPF
///
typedef union {
EFI_SYSTEM_CONTEXT_EBC SystemContextEbc;
EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32;
EFI_SYSTEM_CONTEXT_IPF SystemContextIpf;
} EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT;
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context;
} EFI_STATUS_CODE_EXCEP_EXTENDED_DATA;
///
/// Legacy Oprom extended data
///
typedef struct {
EFI_STATUS_CODE_DATA DataHeader;
EFI_HANDLE DeviceHandle;
EFI_PHYSICAL_ADDRESS RomImageBase;
} EFI_LEGACY_OPROM_EXTENDED_DATA;
#endif

View File

@ -1,50 +0,0 @@
/** @file
Root include file for Mde Package DXE modules
DXE modules follow the public Framework specifications and the UEFI
specifiations. The build infrastructure must set
EFI_SPECIFICATION_VERSION before including this file. To support
R9/UEFI2.0 set EFI_SPECIFIATION_VERSION to 0x00020000. To support
R8.5/EFI 1.10 set EFI_SPECIFIATION_VERSION to 0x00010010.
EDK_RELEASE_VERSION must be set to a non zero value.
EFI_SPECIFIATION_VERSION and EDK_RELEASE_VERSION are set automatically
by the build infrastructure for every module.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
**/
#ifndef __DXE_H__
#define __DXE_H__
//
// Check to make sure EFI_SPECIFICATION_VERSION and EDK_RELEASE_VERSION are defined.
//
#if !defined(EFI_SPECIFICATION_VERSION)
#error EFI_SPECIFICATION_VERSION not defined
#elif !defined(EDK_RELEASE_VERSION)
#error EDK_RELEASE_VERSION not defined
#elif (EDK_RELEASE_VERSION == 0)
#error EDK_RELEASE_VERSION can not be zero
#endif
#include <Common/UefiBaseTypes.h>
#include <Dxe/DxeCis.h>
#include <Dxe/SmmCis.h>
#include <Common/DataHubRecords.h>
#include <Guid/DataHubRecords.h>
#include <Protocol/Pcd.h>
#endif

View File

@ -1,589 +0,0 @@
/** @file
Include file matches things in the DXE CIS.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DxeCis.h
@par Revision Reference:
Version 0.91B.
**/
#ifndef __DXE_CIS__
#define __DXE_CIS__
#include <Uefi/UefiSpec.h>
#define TIANO_ERROR(a) (MAX_2_BITS | (a))
#if (EFI_SPECIFICATION_VERSION < 0x00020000)
//
// Tiano added a couple of return types. These are owned by UEFI specification
// and Tiano can not use them. Thus for UEFI 2.0/R9 support we moved the values
// to a UEFI OEM extension range to conform to UEFI specification.
//
#define EFI_NOT_AVAILABLE_YET EFIERR (28)
#define EFI_UNLOAD_IMAGE EFIERR (29)
#else
#define EFI_NOT_AVAILABLE_YET TIANO_ERROR (0)
#define EFI_UNLOAD_IMAGE TIANO_ERROR (1)
#endif
//
// BugBug: Implementation contamination of UEFI 2.0
// Pointer to internal runtime pointer
//
#define EFI_IPF_GP_POINTER 0x00000008
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//
// attributes for reserved memory before it is promoted to system memory
//
#define EFI_MEMORY_PRESENT 0x0100000000000000ULL
#define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
#define EFI_MEMORY_TESTED 0x0400000000000000ULL
//
// range for memory mapped port I/O on IPF
//
#define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
//
// Modifier for EFI DXE Services
//
#define EFI_DXESERVICE
//
// Global Coherencey Domain types
//
typedef enum {
EfiGcdMemoryTypeNonExistent,
EfiGcdMemoryTypeReserved,
EfiGcdMemoryTypeSystemMemory,
EfiGcdMemoryTypeMemoryMappedIo,
EfiGcdMemoryTypeMaximum
} EFI_GCD_MEMORY_TYPE;
typedef enum {
EfiGcdIoTypeNonExistent,
EfiGcdIoTypeReserved,
EfiGcdIoTypeIo,
EfiGcdIoTypeMaximum
} EFI_GCD_IO_TYPE;
typedef enum {
EfiGcdAllocateAnySearchBottomUp,
EfiGcdAllocateMaxAddressSearchBottomUp,
EfiGcdAllocateAddress,
EfiGcdAllocateAnySearchTopDown,
EfiGcdAllocateMaxAddressSearchTopDown,
EfiGcdMaxAllocateType
} EFI_GCD_ALLOCATE_TYPE;
typedef struct {
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
UINT64 Capabilities;
UINT64 Attributes;
EFI_GCD_MEMORY_TYPE GcdMemoryType;
EFI_HANDLE ImageHandle;
EFI_HANDLE DeviceHandle;
} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
typedef struct {
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
EFI_GCD_IO_TYPE GcdIoType;
EFI_HANDLE ImageHandle;
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.
@param GcdMemoryType Memory type of the memory space.
@param BaseAddress Base address of the memory space.
@param Length Length of the memory space.
@param Capabilities alterable attributes of the memory space.
@retval EFI_SUCCESS Merged this memory space into GCD map.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ADD_MEMORY_SPACE) (
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN UINT64 Capabilities
)
;
/**
Allocates nonexistent memory, reserved memory, system memory, or memorymapped
I/O resources from the global coherency domain of the processor.
@param GcdAllocateType The type of allocate operation
@param GcdMemoryType The desired memory type
@param Alignment Align with 2^Alignment
@param Length Length to allocate
@param BaseAddress Base address to allocate
@param Imagehandle The image handle consume the allocated space.
@param DeviceHandle The device handle consume the allocated space.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@retval EFI_NOT_FOUND No descriptor contains the desired space.
@retval EFI_SUCCESS Memory space successfully allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
IN UINTN Alignment,
IN UINT64 Length,
IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,
IN EFI_HANDLE ImageHandle,
IN EFI_HANDLE DeviceHandle OPTIONAL
)
;
/**
Frees nonexistent memory, reserved memory, system memory, or memory-mapped
I/O resources from the global coherency domain of the processor.
@param BaseAddress Base address of the segment.
@param Length Length of the segment.
@retval EFI_SUCCESS Space successfully freed.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FREE_MEMORY_SPACE) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
)
;
/**
Removes reserved memory, system memory, or memory-mapped I/O resources from
the global coherency domain of the processor.
@param BaseAddress Base address of the memory space.
@param Length Length of the memory space.
@retval EFI_SUCCESS Successfully remove a segment of memory space.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_REMOVE_MEMORY_SPACE) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
)
;
/**
Retrieves the descriptor for a memory region containing a specified address.
@param BaseAddress Specified start address
@param Descriptor Specified length
@retval EFI_INVALID_PARAMETER Invalid parameter
@retval EFI_SUCCESS Successfully get memory space descriptor.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor
)
;
/**
Modifies the attributes for a memory region in the global coherency domain of the
processor.
@param BaseAddress Specified start address
@param Length Specified length
@param Attributes Specified attributes
@retval EFI_SUCCESS Successfully set attribute of a segment of memory space.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN UINT64 Attributes
)
;
/**
Returns a map of the memory resources in the global coherency domain of the
processor.
@param NumberOfDescriptors Number of descriptors.
@param MemorySpaceMap Descriptor array
@retval EFI_INVALID_PARAMETER Invalid parameter
@retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
@retval EFI_SUCCESS Successfully get memory space map.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (
OUT UINTN *NumberOfDescriptors,
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap
)
;
/**
Adds reserved I/O or I/O resources to the global coherency domain of the processor.
@param GcdIoType IO type of the segment.
@param BaseAddress Base address of the segment.
@param Length Length of the segment.
@retval EFI_SUCCESS Merged this segment into GCD map.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ADD_IO_SPACE) (
IN EFI_GCD_IO_TYPE GcdIoType,
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
)
;
/**
Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
domain of the processor.
@param GcdAllocateType The type of allocate operation
@param GcdIoType The desired IO type
@param Alignment Align with 2^Alignment
@param Length Length to allocate
@param BaseAddress Base address to allocate
@param Imagehandle The image handle consume the allocated space.
@param DeviceHandle The device handle consume the allocated space.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@retval EFI_NOT_FOUND No descriptor contains the desired space.
@retval EFI_SUCCESS IO space successfully allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ALLOCATE_IO_SPACE) (
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,
IN EFI_GCD_IO_TYPE GcdIoType,
IN UINTN Alignment,
IN UINT64 Length,
IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,
IN EFI_HANDLE ImageHandle,
IN EFI_HANDLE DeviceHandle OPTIONAL
)
;
/**
Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
domain of the processor.
@param BaseAddress Base address of the segment.
@param Length Length of the segment.
@retval EFI_SUCCESS Space successfully freed.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FREE_IO_SPACE) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
)
;
/**
Removes reserved I/O or I/O resources from the global coherency domain of the
processor.
@param BaseAddress Base address of the segment.
@param Length Length of the segment.
@retval EFI_SUCCESS Successfully removed a segment of IO space.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_REMOVE_IO_SPACE) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
)
;
/**
Retrieves the descriptor for an I/O region containing a specified address.
@param BaseAddress Specified start address
@param Descriptor Specified length
@retval EFI_INVALID_PARAMETER Descriptor is NULL.
@retval EFI_SUCCESS Successfully get the IO space descriptor.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor
)
;
/**
Returns a map of the I/O resources in the global coherency domain of the processor.
@param NumberOfDescriptors Number of descriptors.
@param MemorySpaceMap Descriptor array
@retval EFI_INVALID_PARAMETER Invalid parameter
@retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
@retval EFI_SUCCESS Successfully get IO space map.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_IO_SPACE_MAP) (
OUT UINTN *NumberOfDescriptors,
OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap
)
;
/**
Loads and executed DXE drivers from firmware volumes.
@return Status code
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISPATCH) (VOID)
;
/**
Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
@param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
@param DriverName A pointer to the name of the file in a firmware volume.
@return Status code
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCHEDULE) (
IN EFI_HANDLE FirmwareVolumeHandle,
IN EFI_GUID *DriverName
)
;
/**
Promotes a file stored in a firmware volume from the untrusted to the trusted state.
@param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
@param DriverName A pointer to the name of the file in a firmware volume.
@return Status code
**/
typedef
EFI_STATUS
(EFIAPI *EFI_TRUST) (
IN EFI_HANDLE FirmwareVolumeHandle,
IN EFI_GUID *DriverName
)
;
/**
Creates a firmware volume handle for a firmware volume that is present in system memory.
@param FirmwareVolumeHeader A pointer to the header of the firmware volume.
@param Size The size, in bytes, of the firmware volume.
@param FirmwareVolumeHandle On output, a pointer to the created handle.
@return Status code
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME) (
IN VOID *FvHeader,
IN UINTN Size,
OUT EFI_HANDLE *FirmwareVolumeHandle
)
;
//
// DXE Services Table
//
#define EFI_DXE_SERVICES_SIGNATURE 0x565245535f455844ULL
#define EFI_DXE_SERVICES_REVISION ((0 << 16) | (25))
typedef struct {
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;
//
// Dispatcher Services
//
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_DXE_SERVICES;
#include <Common/BootMode.h>
#include <Common/BootScript.h>
#include <Common/Capsule.h>
#include <Common/Dependency.h>
#include <Common/FirmwareVolumeImageFormat.h>
#include <Common/FirmwareVolumeHeader.h>
#include <Common/FirmwareFileSystem.h>
#include <Common/Hob.h>
#include <Common/InternalFormRepresentation.h>
#include <Common/StatusCode.h>
#include <Common/StatusCodeDataTypeId.h>
#include <Guid/AcpiTableStorage.h>
#include <Guid/Apriori.h>
#include <Guid/Capsule.h>
#include <Guid/DxeServices.h>
#include <Guid/EventLegacyBios.h>
#include <Guid/FirmwareFileSystem.h>
#include <Guid/FrameworkDevicePath.h>
#include <Guid/HobList.h>
#include <Guid/MemoryAllocationHob.h>
#include <Guid/SmramMemoryReserve.h>
#include <Guid/StatusCodeDataTypeId.h>
#include <Dxe/ArchProtocol/Bds.h>
#include <Dxe/ArchProtocol/Cpu.h>
#include <Dxe/ArchProtocol/Metronome.h>
#include <Dxe/ArchProtocol/MonotonicCounter.h>
#include <Dxe/ArchProtocol/RealTimeClock.h>
#include <Dxe/ArchProtocol/Reset.h>
#include <Dxe/ArchProtocol/Runtime.h>
#include <Dxe/ArchProtocol/Security.h>
#include <Dxe/ArchProtocol/SecurityPolicy.h>
#include <Dxe/ArchProtocol/StatusCode.h>
#include <Dxe/ArchProtocol/Timer.h>
#include <Dxe/ArchProtocol/Variable.h>
#include <Dxe/ArchProtocol/VariableWrite.h>
#include <Dxe/ArchProtocol/WatchdogTimer.h>
#include <Protocol/AcpiSupport.h>
#include <Protocol/BootScriptSave.h>
#include <Protocol/CpuIo.h>
#include <Protocol/DataHub.h>
#include <Protocol/FirmwareVolume.h>
#include <Protocol/FirmwareVolumeBlock.h>
#include <Protocol/FirmwareVolumeDispatch.h>
#include <Protocol/Hii.h>
#include <Protocol/FormBrowser.h>
#include <Protocol/FormCallback.h>
#include <Protocol/GuidedSectionExtraction.h>
#include <Protocol/IdeControllerInit.h>
#include <Protocol/IncompatiblePciDeviceSupport.h>
#include <Protocol/PciHostBridgeResourceAllocation.h>
#include <Protocol/PciHotPlugInit.h>
#include <Protocol/PciPlatform.h>
#include <Protocol/SectionExtraction.h>
#include <Protocol/Smbus.h>
#include <Protocol/LegacyBios.h>
#include <Protocol/Legacy8259.h>
#include <Protocol/LegacyRegion.h>
#include <Protocol/LegacyBiosPlatform.h>
#include <Protocol/LegacyInterrupt.h>
#endif

View File

@ -1,526 +0,0 @@
/** @file
Include file matches things in the Smm CIS spec.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SmmCis.h
@par Revision Reference:
Version 0.9.
**/
#ifndef __SMM_CIS__
#define __SMM_CIS__
#define EFI_SMM_CPU_IO_GUID \
{ \
0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41 } \
}
typedef struct _EFI_SMM_SYSTEM_TABLE EFI_SMM_SYSTEM_TABLE;
typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;
//
// SMM Base specification constant and types
//
#define SMM_SMST_SIGNATURE EFI_SIGNATURE_32 ('S', 'M', 'S', 'T')
#define EFI_SMM_SYSTEM_TABLE_REVISION (0 << 16) | (0x09)
//
// *******************************************************
// EFI_SMM_IO_WIDTH
// *******************************************************
//
typedef enum {
SMM_IO_UINT8 = 0,
SMM_IO_UINT16 = 1,
SMM_IO_UINT32 = 2,
SMM_IO_UINT64 = 3
} EFI_SMM_IO_WIDTH;
/**
Provides the basic memory and I/O interfaces that are used to
abstract accesses to devices.
@param This The EFI_SMM_CPU_IO_INTERFACE instance.
@param Width Signifies the width of the I/O operations.
@param Address The base address of the I/O operations.
@param Count The number of I/O operations to perform.
@param Buffer For read operations, the destination buffer to store the results.
For write operations, the source buffer from which to write data.
@retval EFI_SUCCESS The data was read from or written to the device.
@retval EFI_UNSUPPORTED The Address is not valid for this system.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_CPU_IO) (
IN EFI_SMM_CPU_IO_INTERFACE *This,
IN EFI_SMM_IO_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN OUT VOID *Buffer
);
typedef struct {
EFI_SMM_CPU_IO Read;
EFI_SMM_CPU_IO Write;
} EFI_SMM_IO_ACCESS;
struct _EFI_SMM_CPU_IO_INTERFACE {
EFI_SMM_IO_ACCESS Mem;
EFI_SMM_IO_ACCESS Io;
};
/**
Allocates pool memory from SMRAM for IA-32 or runtime memory for
the Itanium processor family.
@param PoolType The type of pool to allocate.The only supported type is EfiRuntimeServicesData
@param Size The number of bytes to allocate from the pool.
@param Buffer A pointer to a pointer to the allocated buffer if the call
succeeds; undefined otherwise.
@retval EFI_SUCCESS The requested number of bytes was allocated.
@retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
@retval EFI_UNSUPPORTED In runtime.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMMCORE_ALLOCATE_POOL) (
IN EFI_MEMORY_TYPE PoolType,
IN UINTN Size,
OUT VOID **Buffer
);
/**
Returns pool memory to the system.
@param Buffer Pointer to the buffer to free.
@retval EFI_SUCCESS The memory was returned to the system.
@retval EFI_INVALID_PARAMETER Buffer was invalid.
@retval EFI_UNSUPPORTED In runtime.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMMCORE_FREE_POOL) (
IN VOID *Buffer
);
/**
Allocates memory pages from the system.
@param Type The type of allocation to perform.
@param MemoryType The only supported type is EfiRuntimeServicesData
@param NumberofPages The number of contiguous 4 KB pages to allocate
@param Memory Pointer to a physical address. On input, the way in which
the address is used depends on the value of Type. On output, the address
is set to the base of the page range that was allocated.
@retval EFI_SUCCESS The requested pages were allocated.
@retval EFI_OUT_OF_RESOURCES The pages requested could not be allocated.
@retval EFI_NOT_FOUND The requested pages could not be found.
@retval EFI_INVALID_PARAMETER Type is not AllocateAnyPages or AllocateMaxAddress
or AllocateAddress. Or MemoryType is in the range EfiMaxMemoryType..0x7FFFFFFF.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMMCORE_ALLOCATE_PAGES) (
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN NumberOfPages,
OUT EFI_PHYSICAL_ADDRESS *Memory
);
/**
Frees memory pages for the system.
@param Memory The base physical address of the pages to be freed
@param NumberOfPages The number of contiguous 4 KB pages to free.
@retval EFI_SUCCESS The requested memory pages were freed.
@retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or NumberOfPages is invalid.
@retval EFI_NOT_FOUND The requested memory pages were not allocated with SmmAllocatePages().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMMCORE_FREE_PAGES) (
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN NumberOfPages
);
typedef
VOID
(EFIAPI *EFI_AP_PROCEDURE) (
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_STARTUP_THIS_AP) (
IN EFI_AP_PROCEDURE Procedure,
IN UINTN CpuNumber,
IN OUT VOID *ProcArguments OPTIONAL
);
typedef struct {
UINT8 Reserved1[248];
UINT32 SMBASE;
UINT32 SMMRevId;
UINT16 IORestart;
UINT16 AutoHALTRestart;
UINT8 Reserved2[164];
UINT32 ES;
UINT32 CS;
UINT32 SS;
UINT32 DS;
UINT32 FS;
UINT32 GS;
UINT32 LDTBase;
UINT32 TR;
UINT32 DR7;
UINT32 DR6;
UINT32 EAX;
UINT32 ECX;
UINT32 EDX;
UINT32 EBX;
UINT32 ESP;
UINT32 EBP;
UINT32 ESI;
UINT32 EDI;
UINT32 EIP;
UINT32 EFLAGS;
UINT32 CR3;
UINT32 CR0;
} EFI_SMI_CPU_SAVE_STATE;
typedef struct {
UINT64 reserved;
UINT64 r1;
UINT64 r2;
UINT64 r3;
UINT64 r4;
UINT64 r5;
UINT64 r6;
UINT64 r7;
UINT64 r8;
UINT64 r9;
UINT64 r10;
UINT64 r11;
UINT64 r12;
UINT64 r13;
UINT64 r14;
UINT64 r15;
UINT64 r16;
UINT64 r17;
UINT64 r18;
UINT64 r19;
UINT64 r20;
UINT64 r21;
UINT64 r22;
UINT64 r23;
UINT64 r24;
UINT64 r25;
UINT64 r26;
UINT64 r27;
UINT64 r28;
UINT64 r29;
UINT64 r30;
UINT64 r31;
UINT64 pr;
UINT64 b0;
UINT64 b1;
UINT64 b2;
UINT64 b3;
UINT64 b4;
UINT64 b5;
UINT64 b6;
UINT64 b7;
// application registers
UINT64 ar_rsc;
UINT64 ar_bsp;
UINT64 ar_bspstore;
UINT64 ar_rnat;
UINT64 ar_fcr;
UINT64 ar_eflag;
UINT64 ar_csd;
UINT64 ar_ssd;
UINT64 ar_cflg;
UINT64 ar_fsr;
UINT64 ar_fir;
UINT64 ar_fdr;
UINT64 ar_ccv;
UINT64 ar_unat;
UINT64 ar_fpsr;
UINT64 ar_pfs;
UINT64 ar_lc;
UINT64 ar_ec;
// control registers
UINT64 cr_dcr;
UINT64 cr_itm;
UINT64 cr_iva;
UINT64 cr_pta;
UINT64 cr_ipsr;
UINT64 cr_isr;
UINT64 cr_iip;
UINT64 cr_ifa;
UINT64 cr_itir;
UINT64 cr_iipa;
UINT64 cr_ifs;
UINT64 cr_iim;
UINT64 cr_iha;
// debug registers
UINT64 dbr0;
UINT64 dbr1;
UINT64 dbr2;
UINT64 dbr3;
UINT64 dbr4;
UINT64 dbr5;
UINT64 dbr6;
UINT64 dbr7;
UINT64 ibr0;
UINT64 ibr1;
UINT64 ibr2;
UINT64 ibr3;
UINT64 ibr4;
UINT64 ibr5;
UINT64 ibr6;
UINT64 ibr7;
// virtual registers
UINT64 int_nat; // nat bits for R1-R31
} EFI_PMI_SYSTEM_CONTEXT;
typedef union {
EFI_SMI_CPU_SAVE_STATE Ia32SaveState;
EFI_PMI_SYSTEM_CONTEXT ItaniumSaveState;
} EFI_SMM_CPU_SAVE_STATE;
typedef struct {
UINT16 Fcw;
UINT16 Fsw;
UINT16 Ftw;
UINT16 Opcode;
UINT32 Eip;
UINT16 Cs;
UINT16 Rsvd1;
UINT32 DataOffset;
UINT16 Ds;
UINT8 Rsvd2[10];
UINT8 St0Mm0[10], Rsvd3[6];
UINT8 St0Mm1[10], Rsvd4[6];
UINT8 St0Mm2[10], Rsvd5[6];
UINT8 St0Mm3[10], Rsvd6[6];
UINT8 St0Mm4[10], Rsvd7[6];
UINT8 St0Mm5[10], Rsvd8[6];
UINT8 St0Mm6[10], Rsvd9[6];
UINT8 St0Mm7[10], Rsvd10[6];
UINT8 Rsvd11[22*16];
} EFI_SMI_OPTIONAL_FPSAVE_STATE;
typedef struct {
UINT64 f2[2];
UINT64 f3[2];
UINT64 f4[2];
UINT64 f5[2];
UINT64 f6[2];
UINT64 f7[2];
UINT64 f8[2];
UINT64 f9[2];
UINT64 f10[2];
UINT64 f11[2];
UINT64 f12[2];
UINT64 f13[2];
UINT64 f14[2];
UINT64 f15[2];
UINT64 f16[2];
UINT64 f17[2];
UINT64 f18[2];
UINT64 f19[2];
UINT64 f20[2];
UINT64 f21[2];
UINT64 f22[2];
UINT64 f23[2];
UINT64 f24[2];
UINT64 f25[2];
UINT64 f26[2];
UINT64 f27[2];
UINT64 f28[2];
UINT64 f29[2];
UINT64 f30[2];
UINT64 f31[2];
} EFI_PMI_OPTIONAL_FLOATING_POINT_CONTEXT;
typedef union {
EFI_SMI_OPTIONAL_FPSAVE_STATE Ia32FpSave;
EFI_PMI_OPTIONAL_FLOATING_POINT_CONTEXT ItaniumFpSave;
} EFI_SMM_FLOATING_POINT_SAVE_STATE;
/**
This function is the main entry point for an SMM handler dispatch
or communicate-based callback.
@param SmmImageHandle A unique value returned by the SMM infrastructure
in response to registration for a communicate-based callback or dispatch.
@param CommunicationBuffer An optional buffer that will be populated
by the SMM infrastructure in response to a non-SMM agent (preboot or runtime)
invoking the EFI_SMM_BASE_PROTOCOL.Communicate() service.
@param SourceSize If CommunicationBuffer is non-NULL, this field
indicates the size of the data payload in this buffer.
@return Status Code
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT) (
IN EFI_HANDLE SmmImageHandle,
IN OUT VOID *CommunicationBuffer OPTIONAL,
IN OUT UINTN *SourceSize OPTIONAL
);
/**
The SmmInstallConfigurationTable() function is used to maintain the list
of configuration tables that are stored in the System Management System
Table. The list is stored as an array of (GUID, Pointer) pairs. The list
must be allocated from pool memory with PoolType set to EfiRuntimeServicesData.
@param SystemTable A pointer to the SMM System Table.
@param Guid A pointer to the GUID for the entry to add, update, or remove.
@param Table A pointer to the buffer of the table to add.
@param TableSize The size of the table to install.
@retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
@retval EFI_INVALID_PARAMETER Guid is not valid.
@retval EFI_NOT_FOUND An attempt was made to delete a non-existent entry.
@retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE) (
IN EFI_SMM_SYSTEM_TABLE *SystemTable,
IN EFI_GUID *Guid,
IN VOID *Table,
IN UINTN TableSize
)
;
//
// System Management System Table (SMST)
//
struct _EFI_SMM_SYSTEM_TABLE {
EFI_TABLE_HEADER Hdr;
CHAR16 *SmmFirmwareVendor;
UINT32 SmmFirmwareRevision;
EFI_SMM_INSTALL_CONFIGURATION_TABLE SmmInstallConfigurationTable;
//
// I/O Services
//
EFI_GUID EfiSmmCpuIoGuid;
EFI_SMM_CPU_IO_INTERFACE SmmIo;
//
// Runtime memory service
//
EFI_SMMCORE_ALLOCATE_POOL SmmAllocatePool;
EFI_SMMCORE_FREE_POOL SmmFreePool;
EFI_SMMCORE_ALLOCATE_PAGES SmmAllocatePages;
EFI_SMMCORE_FREE_PAGES SmmFreePages;
//
// MP service
//
EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp;
//
// CPU information records
//
UINTN CurrentlyExecutingCpu;
UINTN NumberOfCpus;
EFI_SMM_CPU_SAVE_STATE *CpuSaveState;
EFI_SMM_FLOATING_POINT_SAVE_STATE *CpuOptionalFloatingPointState;
//
// Extensibility table
//
UINTN NumberOfTableEntries;
EFI_CONFIGURATION_TABLE *SmmConfigurationTable;
};
#include <Guid/SmmCommunicate.h>
#include <Guid/SmramMemoryReserve.h>
#include <Protocol/SmmBase.h>
#include <Protocol/SmmAccess.h>
#include <Protocol/SmmControl.h>
#include <Protocol/SmmGpiDispatch.h>
#include <Protocol/SmmIchnDispatch.h>
#include <Protocol/SmmPeriodicTimerDispatch.h>
#include <Protocol/SmmPowerButtonDispatch.h>
#include <Protocol/SmmStandbyButtonDispatch.h>
#include <Protocol/SmmStatusCode.h>
#include <Protocol/SmmSwDispatch.h>
#include <Protocol/SmmSxDispatch.h>
#include <Protocol/SmmUsbDispatch.h>
extern EFI_GUID gEfiSmmCpuIoGuid;
#endif

View File

@ -1,48 +0,0 @@
/** @file
GUIDs used for ACPI entries in the EFI 1.0 system table
These GUIDs point the ACPI tables as defined in the ACPI specifications.
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, Intel Corporation
All rights reserved. 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.
Module Name: Acpi.h
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
**/
#ifndef __ACPI_GUID_H__
#define __ACPI_GUID_H__
#define EFI_ACPI_10_TABLE_GUID \
{ \
0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
#define EFI_ACPI_TABLE_GUID \
{ \
0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
#define ACPI_10_TABLE_GUID EFI_ACPI_10_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_30_TABLE_GUID EFI_ACPI_TABLE_GUID
extern EFI_GUID gEfiAcpi10TableGuid;
extern EFI_GUID gEfiAcpi20TableGuid;
extern EFI_GUID gEfiAcpi30TableGuid;
#endif

View File

@ -1,66 +0,0 @@
/** @file
DataHubRecord.h include all data hub sub class GUID defitions.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DataHubRecords.h
@par Revision Reference:
These GUID are from Cache subclass spec 0.9, DataHub SubClass spec 0.9, Memory SubClass Spec 0.9,
Processor Subclass spec 0.9, Misc SubClass spec 0.9.
**/
#ifndef _DATAHUB_RECORDS_GUID_H_
#define _DATAHUB_RECORDS_GUID_H_
#define EFI_PROCESSOR_PRODUCER_GUID \
{ 0x1bf06aea, 0x5bec, 0x4a8d, {0x95, 0x76, 0x74, 0x9b, 0x09, 0x56, 0x2d, 0x30 } }
extern EFI_GUID gEfiProcessorProducerGuid;
#define EFI_PROCESSOR_SUBCLASS_GUID \
{ 0x26fdeb7e, 0xb8af, 0x4ccf, {0xaa, 0x97, 0x02, 0x63, 0x3c, 0xe4, 0x8c, 0xa7 } }
extern EFI_GUID gEfiProcessorSubClassGuid;
#define EFI_CACHE_SUBCLASS_GUID \
{ 0x7f0013a7, 0xdc79, 0x4b22, {0x80, 0x99, 0x11, 0xf7, 0x5f, 0xdc, 0x82, 0x9d } }
extern EFI_GUID gEfiCacheSubClassGuid;
#define EFI_MEMORY_PRODUCER_GUID \
{ 0x1d7add6e, 0xb2da, 0x4b0b, {0xb2, 0x9f, 0x49, 0xcb, 0x42, 0xf4, 0x63, 0x56 } }
extern EFI_GUID gEfiMemoryProducerGuid;
#define EFI_MEMORY_SUBCLASS_GUID \
{0x4E8F4EBB, 0x64B9, 0x4e05, {0x9B, 0x18, 0x4C, 0xFE, 0x49, 0x23, 0x50, 0x97} }
extern EFI_GUID gEfiMemorySubClassGuid;
#define EFI_MISC_PRODUCER_GUID \
{ 0x62512c92, 0x63c4, 0x4d80, {0x82, 0xb1, 0xc1, 0xa4, 0xdc, 0x44, 0x80, 0xe5 } }
extern EFI_GUID gEfiMiscProducerGuid;
#define EFI_MISC_SUBCLASS_GUID \
{ 0x772484B2, 0x7482, 0x4b91, {0x9F, 0x9A, 0xAD, 0x43, 0xF8, 0x1C, 0x58, 0x81 } }
extern EFI_GUID gEfiMiscSubClassGuid;
#endif

View File

@ -1,58 +0,0 @@
/** @file
GUID and related data structures used with the Debug Image Info Table.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DebugImageInfoTable.h
@par Revision Reference:
GUID defined in UEFI 2.0 spec.
**/
#ifndef __DEBUG_IMAGE_INFO_GUID_H__
#define __DEBUG_IMAGE_INFO_GUID_H__
#define EFI_DEBUG_IMAGE_INFO_TABLE_GUID \
{ \
0x49152e77, 0x1ada, 0x4764, {0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b } \
}
extern EFI_GUID gEfiDebugImageInfoTableGuid;
#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01
#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02
#define EFI_DEBUG_IMAGE_INFO_INITIAL_SIZE (EFI_PAGE_SIZE / sizeof (UINTN))
#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01
typedef struct {
UINT64 Signature;
EFI_PHYSICAL_ADDRESS EfiSystemTableBase;
UINT32 Crc32;
} EFI_SYSTEM_TABLE_POINTER;
typedef struct {
UINT32 ImageInfoType;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance;
EFI_HANDLE ImageHandle;
} EFI_DEBUG_IMAGE_INFO_NORMAL;
typedef union {
UINTN *ImageInfoType;
EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
} EFI_DEBUG_IMAGE_INFO;
typedef struct {
volatile UINT32 UpdateStatus;
UINT32 TableSize;
EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable;
} EFI_DEBUG_IMAGE_INFO_TABLE_HEADER;
#endif

View File

@ -1,30 +0,0 @@
/** @file
GUID used to identify the DXE Services Table
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DxeServices.h
@par Revision Reference:
GUID defined in DXE CIS spec version 0.91B
**/
#ifndef __DXE_SERVICES_GUID_H__
#define __DXE_SERVICES_GUID_H__
#define EFI_DXE_SERVICES_TABLE_GUID \
{ \
0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } \
}
extern EFI_GUID gEfiDxeServicesTableGuid;
#endif

View File

@ -1,45 +0,0 @@
/** @file
GUIDs for gBS->CreateEventEx Event Groups. Defined in EFI 2.0.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: EventGroup.h
**/
#ifndef __EVENT_GROUP_GUID__
#define __EVENT_GROUP_GUID__
#define EFI_EVENT_GROUP_EXIT_BOOT_SERVICES \
{ 0x27abf055, 0xb1b8, 0x4c26, { 0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf } }
extern EFI_GUID gEfiEventExitBootServicesGuid;
#define EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE \
{ 0x13fa7698, 0xc831, 0x49c7, { 0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96 } }
extern EFI_GUID gEfiEventVirtualAddressChangeGuid;
#define EFI_EVENT_GROUP_MEMORY_MAP_CHANGE \
{ 0x78bee926, 0x692f, 0x48fd, { 0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab } }
extern EFI_GUID gEfiEventMemoryMapChangeGuid;
#define EFI_EVENT_GROUP_READY_TO_BOOT \
{ 0x7ce88fb3, 0x4bd7, 0x4679, { 0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b } }
extern EFI_GUID gEfiEventReadyToBootGuid;
#endif

View File

@ -1,28 +0,0 @@
/** @file
GUID is the name of events used with CreateEventEx in order to be notified when the EFI boot manager is about to boot a legacy boot option. Events of this type are notificated just before Int19h is invoked.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: EventLegacyBios.h
@par Revision Reference:
GUIDs defined in DXE CIS 0.91b.
**/
#ifndef __EVENT_LEGACY_BIOS_GUID_H__
#define __EVENT_LEGACY_BIOS_GUID_H__
#define EFI_EVENT_LEGACY_BOOT_GUID \
{ 0x2a571201, 0x4966, 0x47f6, {0x8b, 0x86, 0xf3, 0x1e, 0x41, 0xf3, 0x2f, 0x10 } }
extern EFI_GUID gEfiEventLegacyBootGuid;
#endif

View File

@ -1,29 +0,0 @@
/** @file
This GUID is used to define a vendor specific device path being owned by the
Framework specificaitons.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FrameworkDevicePath.h
@par Revision Reference:
Spec Version 0.9
**/
#ifndef __FRAMEWORK_DEVICE_PATH_GUID_H__
#define __FRAMEWORK_DEVICE_PATH_GUID_H__
#define EFI_FRAMEWORK_DEVICE_PATH_GUID \
{ 0xb7084e63, 0x46b7, 0x4d1a, { 0x86, 0x77, 0xe3, 0x0b, 0x53, 0xdb, 0xf0, 0x50 } }
extern EFI_GUID gEfiFrameworkDevicePathGuid;
#endif

View File

@ -1,31 +0,0 @@
/** @file
GUID for EFI (NVRAM) Variables.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: GlobalVariable.h
@par Revision Reference:
GUID defined in UEFI 2.0
**/
#ifndef __GLOBAL_VARIABLE_GUID_H__
#define __GLOBAL_VARIABLE_GUID_H__
#define EFI_GLOBAL_VARIABLE_GUID \
{ \
0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C } \
}
#define EFI_GLOBAL_VARIABLE EFI_GLOBAL_VARIABLE_GUID
extern EFI_GUID gEfiGlobalVariableGuid;
#endif

View File

@ -1,45 +0,0 @@
/** @file
Guids used for the GPT (GUID Partition Table)
GPT defines a new disk partitioning scheme and also describes
usage of the legacy Master Boot Record (MBR) partitioning scheme.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Gpt.h
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
**/
#ifndef __GPT_GUID_H__
#define __GPT_GUID_H__
#define EFI_PART_TYPE_UNUSED_GUID \
{ \
0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } \
}
#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \
{ \
0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } \
}
#define EFI_PART_TYPE_LEGACY_MBR_GUID \
{ \
0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f } \
}
extern EFI_GUID gEfiPartTypeUnusedGuid;
extern EFI_GUID gEfiPartTypeSystemPartGuid;
extern EFI_GUID gEfiPartTypeLegacyMbrGuid;
#endif

View File

@ -1,32 +0,0 @@
/** @file
GUIDs used for HOB List entries
These GUIDs point the HOB List passed from PEI to DXE.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: HobList.h
@par Revision Reference:
GUID defined in DXE CIS spec version 0.91
**/
#ifndef __HOB_LIST_GUID_H__
#define __HOB_LIST_GUID_H__
#define EFI_HOB_LIST_GUID \
{ \
0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
extern EFI_GUID gEfiHobListGuid;
#endif

View File

@ -1,36 +0,0 @@
/** @file
GUIDs for HOBs used in memory allcation
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: MemoryAllocationHob.h
@par Revision Reference:
GUID defined in Hob Spec Version 0.9
**/
#ifndef __MEMORY_ALLOCATION_GUID_H__
#define __MEMORY_ALLOCATION_GUID_H__
#define EFI_HOB_MEMORY_ALLOC_BSP_STORE_GUID \
{0x564b33cd, 0xc92a, 0x4593, {0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22} };
#define EFI_HOB_MEMORY_ALLOC_STACK_GUID \
{0x4ed4bf27, 0x4092, 0x42e9, {0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x0, 0xc9, 0xbd} }
#define EFI_HOB_MEMORY_ALLOC_MODULE_GUID \
{0xf8e21975, 0x899, 0x4f58, {0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a} }
extern EFI_GUID gEfiHobMemoryAllocBspStoreGuid;
extern EFI_GUID gEfiHobMemoryAllocStackGuid;
extern EFI_GUID gEfiHobMemoryAllocModuleGuid;
#endif

View File

@ -1,48 +0,0 @@
/** @file
Terminal Device Path Vendor Guid.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PcAnsi.h
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
**/
#ifndef __PC_ANSI_H__
#define __PC_ANSI_H__
#define EFI_PC_ANSI_GUID \
{ \
0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
#define EFI_VT_100_GUID \
{ \
0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
#define EFI_VT_100_PLUS_GUID \
{ \
0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 } \
}
#define EFI_VT_UTF8_GUID \
{ \
0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 } \
}
extern EFI_GUID gEfiPcAnsiGuid;
extern EFI_GUID gEfiVT100Guid;
extern EFI_GUID gEfiVT100PlusGuid;
extern EFI_GUID gEfiVTUTF8Guid;
#endif

View File

@ -1,38 +0,0 @@
/** @file
GUIDs used for SAL system table entries in the EFI system table.
SAL System Table contains Itanium-based processor centric information about
the system.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SalSystemTable.h
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
**/
#ifndef __SAL_SYSTEM_TABLE_GUID_H__
#define __SAL_SYSTEM_TABLE_GUID_H__
#define EFI_SAL_SYSTEM_TABLE_GUID \
{ \
0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
//
// GUID name defined in spec.
//
#define SAL_SYSTEM_TABLE_GUID EFI_SAL_SYSTEM_TABLE_GUID
extern EFI_GUID gEfiSalSystemTableGuid;
#endif

View File

@ -1,68 +0,0 @@
/** @file
GUIDs used to locate the SMBIOS tables in the EFI 1.0 system table.
This GUID in the system table is the only legal way to search for and
locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
tables.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SmBios.h
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
**/
#ifndef __SMBIOS_GUID_H__
#define __SMBIOS_GUID_H__
#define EFI_SMBIOS_TABLE_GUID \
{ \
0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
#define SMBIOS_TABLE_GUID EFI_SMBIOS_TABLE_GUID
//
// Smbios Table Entry Point Structure
//
#pragma pack(1)
typedef struct {
UINT8 AnchorString[4];
UINT8 EntryPointStructureChecksum;
UINT8 EntryPointLength;
UINT8 MajorVersion;
UINT8 MinorVersion;
UINT16 MaxStructureSize;
UINT8 EntryPointRevision;
UINT8 FormattedArea[5];
UINT8 IntermediateAnchorString[5];
UINT8 IntermediateChecksum;
UINT16 TableLength;
UINT32 TableAddress;
UINT16 NumberOfSmbiosStructures;
UINT8 SmbiosBcdRevision;
} SMBIOS_TABLE_ENTRY_POINT;
//
// The Smbios structure header
//
typedef struct {
UINT8 Type;
UINT8 Length;
UINT16 Handle;
} SMBIOS_STRUCTURE;
#pragma pack()
extern EFI_GUID gEfiSmbiosTableGuid;
#endif

View File

@ -1,39 +0,0 @@
/** @file
Definitions EFI_SMM_COMMUNICATE_HEADER used by EFI_SMM_BASE_PROTOCOL.Communicate() functions
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SmmCommunicate.h
@par Revision Reference:
GUIDs defined in SmmCis spec version 0.9
**/
#ifndef __SMM_COMMUNICATE_GUID_H__
#define __SMM_COMMUNICATE_GUID_H__
//******************************************************
// EFI_SMM_COMMUNICATE_HEADER
//******************************************************
#define SMM_COMMUNICATE_HEADER_GUID \
{ \
0xf328e36c, 0x23b6, 0x4a95, {0x85, 0x4b, 0x32, 0xe1, 0x95, 0x34, 0xcd, 0x75 } \
}
typedef struct {
EFI_GUID HeaderGuid;
UINTN MessageLength;
UINT8 Data[1];
} EFI_SMM_COMMUNICATE_HEADER;
extern EFI_GUID gSmmCommunicateHeaderGuid;
#endif

View File

@ -1,67 +0,0 @@
/** @file
GUID for use in reserving SMRAM regions.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SmramMemoryReserve.h
@par Revision Reference:
GUIDs defined in SmmCis spec version 0.9
**/
#ifndef _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_
#define _EFI_SMM_PEI_SMRAM_MEMORY_RESERVE_H_
#define EFI_SMM_PEI_SMRAM_MEMORY_RESERVE \
{ \
0x6dadf1d1, 0xd4cc, 0x4910, {0xbb, 0x6e, 0x82, 0xb1, 0xfd, 0x80, 0xff, 0x3d } \
}
//
// *******************************************************
// EFI_SMRAM_DESCRIPTOR
// *******************************************************
//
typedef struct {
EFI_PHYSICAL_ADDRESS PhysicalStart; // Phsyical location in DRAM
EFI_PHYSICAL_ADDRESS CpuStart; // Address CPU uses to access the SMI handler
// May or may not match PhysicalStart
//
UINT64 PhysicalSize;
UINT64 RegionState;
} EFI_SMRAM_DESCRIPTOR;
//
// *******************************************************
// EFI_SMRAM_STATE
// *******************************************************
//
#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
//
// *******************************************************
// EFI_SMRAM_HOB_DESCRIPTOR_BLOCK
// *******************************************************
//
typedef struct {
UINTN NumberOfSmmReservedRegions;
EFI_SMRAM_DESCRIPTOR Descriptor[1];
} EFI_SMRAM_HOB_DESCRIPTOR_BLOCK;
extern EFI_GUID gEfiSmmPeiSmramMemoryReserve;
#endif

View File

@ -1,82 +0,0 @@
/** @file
GUID used to identify id for the caller who is initiating the Status Code.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: StatusCodeDataTypeId.h
@par Revision Reference:
GUIDs defined in Status Codes Specification 0.92
**/
#ifndef __STATUS_CODE_DATA_TYPE_ID_GUID_H__
#define __STATUS_CODE_DATA_TYPE_ID_GUID_H__
//
// String Data Type defintion. This is part of Status Code Specification
//
#define EFI_STATUS_CODE_DATA_TYPE_STRING_GUID \
{ 0x92D11080, 0x496F, 0x4D95, { 0xBE, 0x7E, 0x03, 0x74, 0x88, 0x38, 0x2B, 0x0A } }
extern EFI_GUID gEfiStatusCodeDataTypeStringGuid;
//
// This GUID indicates that the format of the accompanying data depends
// upon the Status Code Value, but follows this Specification
//
#define EFI_STATUS_CODE_SPECIFIC_DATA_GUID \
{ 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }
extern EFI_GUID gEfiStatusCodeSpecificDataGuid;
//
// Debug Assert Data. This is part of Status Code Specification
//
#define EFI_STATUS_CODE_DATA_TYPE_ASSERT_GUID \
{ 0xDA571595, 0x4D99, 0x487C, { 0x82, 0x7C, 0x26, 0x22, 0x67, 0x7D, 0x33, 0x07 } }
extern EFI_GUID gEfiStatusCodeDataTypeAssertGuid;
//
// Exception Data type (CPU REGS)
//
#define EFI_STATUS_CODE_DATA_TYPE_EXCEPTION_HANDLER_GUID \
{ 0x3BC2BD12, 0xAD2E, 0x11D5, { 0x87, 0xDD, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xB9 } }
extern EFI_GUID gEfiStatusCodeDataTypeExceptionHandlerGuid;
//
// Debug DataType defintions. User Defined Data Types.
//
#define EFI_STATUS_CODE_DATA_TYPE_DEBUG_GUID \
{ 0x9A4E9246, 0xD553, 0x11D5, { 0x87, 0xE2, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xb9 } }
extern EFI_GUID gEfiStatusCodeDataTypeDebugGuid;
//
// Progress Code. User Defined Data Type Guid.
//
#define EFI_STATUS_CODE_DATA_TYPE_ERROR_GUID \
0xAB359CE3, 0x99B3, 0xAE18, { 0xC8, 0x9D, 0x95, 0xD3, 0xB0, 0x72, 0xE1, 0x9B } }
extern EFI_GUID gEfiStatusCodeDataTypeErrorGuid;
//
// Progress Code. User Defined Data Type Guid.
//
#define EFI_STATUS_CODE_DATA_TYPE_PROGRESS_CODE_GUID \
{ 0xA356AB39, 0x35C4, 0x35DA, { 0xB3, 0x7A, 0xF8, 0xEA, 0x9E, 0x8B, 0x36, 0xA3 } }
extern EFI_GUID gEfiStatusCodeDataTypeProgressCodeGuid;
#endif

View File

@ -1,282 +0,0 @@
/** @file
Support for USB 1.1 standard.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Usb.h
**/
#ifndef __USB_H__
#define __USB_H__
//
// USB Descriptor types
//
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02
#define USB_DT_STRING 0x03
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
#define USB_DT_HUB 0x29
#define USB_DT_HID 0x21
//
// USB request type
//
#define USB_TYPE_STANDARD (0x00 << 5)
#define USB_TYPE_CLASS (0x01 << 5)
#define USB_TYPE_VENDOR (0x02 << 5)
#define USB_TYPE_RESERVED (0x03 << 5)
//
// USB request targer device
//
#define USB_RECIP_DEVICE 0x00
#define USB_RECIP_INTERFACE 0x01
#define USB_RECIP_ENDPOINT 0x02
#define USB_RECIP_OTHER 0x03
//
// Request target types.
//
#define USB_RT_DEVICE 0x00
#define USB_RT_INTERFACE 0x01
#define USB_RT_ENDPOINT 0x02
#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
//
// 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
//
//Use 200 ms to increase the error handling response time
//
#define EFI_USB_INTERRUPT_DELAY 2000000
//
// USB transation direction
//
typedef enum {
EfiUsbDataOut,
EfiUsbDataIn,
EfiUsbNoData
} EFI_USB_DATA_DIRECTION;
//
// Usb Data recipient type
//
typedef enum {
EfiUsbDevice,
EfiUsbInterface,
EfiUsbEndpoint
} EFI_USB_RECIPIENT;
typedef enum {
EfiUsbEndpointHalt,
EfiUsbDeviceRemoteWakeup
} EFI_USB_STANDARD_FEATURE_SELECTOR;
#pragma pack(1)
//
// Usb device request structure
//
typedef struct {
UINT8 RequestType;
UINT8 Request;
UINT16 Value;
UINT16 Index;
UINT16 Length;
} EFI_USB_DEVICE_REQUEST;
//
// Standard USB request
//
#define USB_DEV_GET_STATUS 0x00
#define USB_DEV_CLEAR_FEATURE 0x01
#define USB_DEV_SET_FEATURE 0x03
#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_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
#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_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
//
// Device descriptor. refer USB1.1
//
typedef struct usb_device_descriptor {
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;
} EFI_USB_DEVICE_DESCRIPTOR;
//
// Endpoint descriptor
//
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT8 EndpointAddress;
UINT8 Attributes;
UINT16 MaxPacketSize;
UINT8 Interval;
} EFI_USB_ENDPOINT_DESCRIPTOR;
//
// Interface descriptor
//
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT8 InterfaceNumber;
UINT8 AlternateSetting;
UINT8 NumEndpoints;
UINT8 InterfaceClass;
UINT8 InterfaceSubClass;
UINT8 InterfaceProtocol;
UINT8 Interface;
} EFI_USB_INTERFACE_DESCRIPTOR;
//
// USB alternate setting
//
typedef struct {
EFI_USB_INTERFACE_DESCRIPTOR *Interface;
} USB_ALT_SETTING;
//
// Configuration descriptor
//
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT16 TotalLength;
UINT8 NumInterfaces;
UINT8 ConfigurationValue;
UINT8 Configuration;
UINT8 Attributes;
UINT8 MaxPower;
} EFI_USB_CONFIG_DESCRIPTOR;
//
// Supported String Languages
//
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT16 SupportedLanID[1];
} EFI_USB_SUPPORTED_LANGUAGES;
//
// String descriptor
//
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
CHAR16 String[1];
} EFI_USB_STRING_DESCRIPTOR;
//
// Hub descriptor
//
#define MAXBYTES 8
typedef struct {
UINT8 Length;
UINT8 DescriptorType;
UINT8 NbrPorts;
UINT8 HubCharacteristics[2];
UINT8 PwrOn2PwrGood;
UINT8 HubContrCurrent;
UINT8 Filler[MAXBYTES];
} EFI_USB_HUB_DESCRIPTOR;
typedef struct {
UINT16 PortStatus;
UINT16 PortChangeStatus;
} EFI_USB_PORT_STATUS;
//
// Constant value for Port Status & Port Change Status
//
#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_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
//
// Used for set/clear port feature request
//
typedef enum {
EfiUsbPortEnable = 1,
EfiUsbPortSuspend = 2,
EfiUsbPortReset = 4,
EfiUsbPortPower = 8,
EfiUsbPortConnectChange = 16,
EfiUsbPortEnableChange = 17,
EfiUsbPortSuspendChange = 18,
EfiUsbPortOverCurrentChange = 19,
EfiUsbPortResetChange = 20
} EFI_USB_PORT_FEATURE;
#pragma pack()
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,395 +0,0 @@
/** @file
Memory-only library functions with no library constructor/destructor
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: BaseMemoryLib.h
**/
#ifndef __BASE_MEMORY_LIB__
#define __BASE_MEMORY_LIB__
/**
Copy Length bytes from Source to Destination.
This function copies Length bytes from SourceBuffer to DestinationBuffer, and
returns DestinationBuffer. The implementation must be reentrant, and it must
handle the case where SourceBuffer overlaps DestinationBuffer.
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then
ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@param Destination Target of copy
@param Source Place to copy from
@param Length Number of bytes to copy
@return Destination
**/
VOID *
EFIAPI
CopyMem (
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
);
/**
Set Buffer to Value for Size bytes.
This function fills Length bytes of Buffer with Value, and returns Buffer.
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Memory to set.
@param Size Number of bytes to set
@param Value Value of the set operation.
@return Buffer
**/
VOID *
EFIAPI
SetMem (
OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
);
/**
Fills a target buffer with a 16-bit value, and returns the target buffer.
This function fills Length bytes of Buffer with the 16-bit value specified by
Value, and returns Buffer. Value is repeated every 16-bits in for Length
bytes of Buffer.
If Buffer is NULL and Length > 0, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
@param Buffer Pointer to the target buffer to fill.
@param Length Number of bytes in Buffer to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
**/
VOID *
EFIAPI
SetMem16 (
OUT VOID *Buffer,
IN UINTN Length,
IN UINT16 Value
);
/**
Fills a target buffer with a 32-bit value, and returns the target buffer.
This function fills Length bytes of Buffer with the 32-bit value specified by
Value, and returns Buffer. Value is repeated every 32-bits in for Length
bytes of Buffer.
If Buffer is NULL and Length > 0, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
@param Buffer Pointer to the target buffer to fill.
@param Length Number of bytes in Buffer to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
**/
VOID *
EFIAPI
SetMem32 (
OUT VOID *Buffer,
IN UINTN Length,
IN UINT32 Value
);
/**
Fills a target buffer with a 64-bit value, and returns the target buffer.
This function fills Length bytes of Buffer with the 64-bit value specified by
Value, and returns Buffer. Value is repeated every 64-bits in for Length
bytes of Buffer.
If Buffer is NULL and Length > 0, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
@param Buffer Pointer to the target buffer to fill.
@param Length Number of bytes in Buffer to fill.
@param Value Value with which to fill Length bytes of Buffer.
@return Buffer
**/
VOID *
EFIAPI
SetMem64 (
OUT VOID *Buffer,
IN UINTN Length,
IN UINT64 Value
);
/**
Set Buffer to 0 for Size bytes.
This function fills Length bytes of Buffer with zeros, and returns Buffer.
If Buffer is NULL and Length > 0, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Memory to set.
@param Size Number of bytes to set
@return Buffer
**/
VOID *
EFIAPI
ZeroMem (
OUT VOID *Buffer,
IN UINTN Length
);
/**
Compares two memory buffers of a given length.
This function compares Length bytes of SourceBuffer to Length bytes of
DestinationBuffer. If all Length bytes of the two buffers are identical, then
0 is returned. Otherwise, the value returned is the first mismatched byte in
SourceBuffer subtracted from the first mismatched byte in DestinationBuffer.
If DestinationBuffer is NULL and Length > 0, then ASSERT().
If SourceBuffer is NULL and Length > 0, then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then
ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@param DestinationBuffer First memory buffer
@param SourceBuffer Second memory buffer
@param Length Length of DestinationBuffer and SourceBuffer memory
regions to compare
@retval 0 if DestinationBuffer == SourceBuffer
@retval Non-zero if DestinationBuffer != SourceBuffer
**/
INTN
EFIAPI
CompareMem (
IN CONST VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
);
/**
Scans a target buffer for an 8-bit value, and returns a pointer to the
matching 8-bit value in the target buffer.
This function searches target the buffer specified by Buffer and Length from
the lowest address to the highest address for an 8-bit value that matches
Value. If a match is found, then a pointer to the matching byte in the target
buffer is returned. If no match is found, then NULL is returned. If Length is
0, then NULL is returned.
If Buffer is NULL, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@retval NULL if Length == 0 or Value was not found.
**/
VOID *
EFIAPI
ScanMem8 (
IN CONST VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
);
/**
Scans a target buffer for a 16-bit value, and returns a pointer to the
matching 16-bit value in the target buffer.
This function searches target the buffer specified by Buffer and Length from
the lowest address to the highest address at 16-bit increments for a 16-bit
value that matches Value. If a match is found, then a pointer to the matching
value in the target buffer is returned. If no match is found, then NULL is
returned. If Length is 0, then NULL is returned.
If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence.
@retval NULL if Length == 0 or Value was not found.
**/
VOID *
EFIAPI
ScanMem16 (
IN CONST VOID *Buffer,
IN UINTN Length,
IN UINT16 Value
);
/**
Scans a target buffer for a 32-bit value, and returns a pointer to the
matching 32-bit value in the target buffer.
This function searches target the buffer specified by Buffer and Length from
the lowest address to the highest address at 32-bit increments for a 32-bit
value that matches Value. If a match is found, then a pointer to the matching
value in the target buffer is returned. If no match is found, then NULL is
returned. If Length is 0, then NULL is returned.
If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@retval NULL if Length == 0 or Value was not found.
**/
VOID *
EFIAPI
ScanMem32 (
IN CONST VOID *Buffer,
IN UINTN Length,
IN UINT32 Value
);
/**
Scans a target buffer for a 64-bit value, and returns a pointer to the
matching 64-bit value in the target buffer.
This function searches target the buffer specified by Buffer and Length from
the lowest address to the highest address at 64-bit increments for a 64-bit
value that matches Value. If a match is found, then a pointer to the matching
value in the target buffer is returned. If no match is found, then NULL is
returned. If Length is 0, then NULL is returned.
If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
@param Value Value to search for in the target buffer.
@return Pointer to the first occurrence or NULL if not found.
@retval NULL if Length == 0 or Value was not found.
**/
VOID *
EFIAPI
ScanMem64 (
IN CONST VOID *Buffer,
IN UINTN Length,
IN UINT64 Value
);
/**
This function copies a source GUID to a destination GUID.
This function copies the contents of the 128-bit GUID specified by SourceGuid
to DestinationGuid, and returns DestinationGuid.
If DestinationGuid is NULL, then ASSERT().
If SourceGuid is NULL, then ASSERT().
@param DestinationGuid Pointer to the destination GUID.
@param SourceGuid Pointer to the source GUID.
@return DestinationGuid
**/
GUID *
EFIAPI
CopyGuid (
OUT GUID *DestinationGuid,
IN CONST GUID *SourceGuid
);
/**
Compares two GUIDs
This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE
is returned. If there are any bit differences in the two GUIDs, then FALSE is
returned.
If Guid1 is NULL, then ASSERT().
If Guid2 is NULL, then ASSERT().
@param Guid1 guid to compare
@param Guid2 guid to compare
@retval TRUE if Guid1 == Guid2
@retval FALSE if Guid1 != Guid2
**/
BOOLEAN
EFIAPI
CompareGuid (
IN CONST GUID *Guid1,
IN CONST GUID *Guid2
);
/**
Scans a target buffer for a GUID, and returns a pointer to the matching GUID
in the target buffer.
This function searches target the buffer specified by Buffer and Length from
the lowest address to the highest address at 128-bit increments for the
128-bit GUID value that matches Guid. If a match is found, then a pointer to
the matching GUID in the target buffer is returned. If no match is found,
then NULL is returned. If Length is 0, then NULL is returned.
If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@param Length Number of bytes in Buffer to scan.
@param Guid Value to search for in the target buffer.
@return Pointer to the first occurrence.
@retval NULL if Length == 0 or Guid was not found.
**/
VOID *
EFIAPI
ScanGuid (
IN CONST VOID *Buffer,
IN UINTN Length,
IN CONST GUID *Guid
);
#endif

View File

@ -1,699 +0,0 @@
/** @file
PCD Library Class Interface Declarations
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PcdLib.h
**/
#ifndef __PCD_LIB_H__
#define __PCD_LIB_H__
#define PCD_INVALID_TOKEN_NUMBER ((UINTN) -1)
#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
//
// Feature Flag is in the form of a global constant
//
#define FeaturePcdGet(TokenName) _gPcd_FixedAtBuild_##TokenName
//
// Fixed is fixed at build time
//
#define FixedPcdGet8(TokenName) _gPcd_FixedAtBuild_##TokenName
#define FixedPcdGet16(TokenName) _gPcd_FixedAtBuild_##TokenName
#define FixedPcdGet32(TokenName) _gPcd_FixedAtBuild_##TokenName
#define FixedPcdGet64(TokenName) _gPcd_FixedAtBuild_##TokenName
#define FixedPcdGetBool(TokenName) _gPcd_FixedAtBuild_##TokenName
//
// BugBug: This works for strings, but not constants.
//
#define FixedPcdGetPtr(TokenName) ((VOID *)_gPcd_FixedAtBuild_##TokenName)
//
// (Binary) Patch is in the form of a global variable
//
#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = Value)
#define PatchPcdSetPtr(TokenName, Value, Size) CopyMem (_gPcd_BinaryPatch_##TokenName, Value, Size)
//
// Dynamic is via the protocol with only the TokenNumber as argument
// It can also be Patch or Fixed type based on a build option
//
#define PcdGet8(TokenName) _PCD_MODE_8_##TokenName
#define PcdGet16(TokenName) _PCD_MODE_16_##TokenName
#define PcdGet32(TokenName) _PCD_MODE_32_##TokenName
#define PcdGet64(TokenName) _PCD_MODE_64_##TokenName
#define PcdGetPtr(TokenName) _PCD_MODE_PTR_##TokenName
#define PcdGetBool(TokenName) _PCD_MODE_BOOL_##TokenName
//
// Dynamic Ex is to support binary distribution
//
#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 (Guid, _PCD_TOKEN_##TokenName)
#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 (Guid, _PCD_TOKEN_##TokenName)
#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 (Guid, _PCD_TOKEN_##TokenName)
#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 (Guid, _PCD_TOKEN_##TokenName)
#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr (Guid, _PCD_TOKEN_##TokenName)
#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool (Guid, _PCD_TOKEN_##TokenName)
//
// Dynamic Set
//
#define PcdSet8(TokenName, Value) LibPcdSet8 (_PCD_TOKEN_##TokenName, Value)
#define PcdSet16(TokenName, Value) LibPcdSet16 (_PCD_TOKEN_##TokenName, Value)
#define PcdSet32(TokenName, Value) LibPcdSet32 (_PCD_TOKEN_##TokenName, Value)
#define PcdSet64(TokenName, Value) LibPcdSet64 (_PCD_TOKEN_##TokenName, Value)
#define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) LibPcdSetPtr (_PCD_TOKEN_##TokenName, SizeOfBuffer, Buffer)
#define PcdSetBool(TokenName, Value) LibPcdSetBool(_PCD_TOKEN_##TokenName, Value)
//
// Dynamic Set Ex
//
#define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 (Guid, _PCD_TOKEN_##TokenName, Value)
#define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 (Guid, _PCD_TOKEN_##TokenName, Value)
#define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 (Guid, _PCD_TOKEN_##TokenName, Value)
#define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 (Guid, _PCD_TOKEN_##TokenName, Value)
#define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) LibPcdSetExPtr (Guid, _PCD_TOKEN_##TokenName, SizeOfBuffer, Buffer)
#define PcdSetExBool(Guid, TokenName, Value) LibPcdSetExBool(Guid, _PCD_TOKEN_##TokenName, Value)
/**
Sets the current SKU in the PCD database to the value specified by SkuId. SkuId is returned.
@param[in] SkuId The SKU value that will be used when the PCD service will retrieve and
set values associated with a PCD token.
@retval SKU_ID Return the SKU ID that just be set.
**/
UINTN
EFIAPI
LibPcdSetSku (
IN UINTN SkuId
);
/**
Returns the 8-bit value for the token specified by TokenNumber.
@param[in] The PCD token number to retrieve a current value for.
@retval UINT8 Returns the 8-bit value for the token specified by TokenNumber.
**/
UINT8
EFIAPI
LibPcdGet8 (
IN UINTN TokenNumber
);
/**
Returns the 16-bit value for the token specified by TokenNumber.
@param[in] The PCD token number to retrieve a current value for.
@retval UINT16 Returns the 16-bit value for the token specified by TokenNumber.
**/
UINT16
EFIAPI
LibPcdGet16 (
IN UINTN TokenNumber
);
/**
Returns the 32-bit value for the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINT32 Returns the 32-bit value for the token specified by TokenNumber.
**/
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
);
/**
Returns the 64-bit value for the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINT64 Returns the 64-bit value for the token specified by TokenNumber.
**/
UINT64
EFIAPI
LibPcdGet64 (
IN UINTN TokenNumber
);
/**
Returns the pointer to the buffer of the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval VOID* Returns the pointer to the token specified by TokenNumber.
**/
VOID *
EFIAPI
LibPcdGetPtr (
IN UINTN TokenNumber
);
/**
Returns the Boolean value of the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval BOOLEAN Returns the Boolean value of the token specified by TokenNumber.
**/
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
);
/**
Returns the size of the token specified by TokenNumber.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINTN Returns the size of the token specified by TokenNumber.
**/
UINTN
EFIAPI
LibPcdGetSize (
IN UINTN TokenNumber
);
/**
Returns the 8-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINT8 Return the UINT8.
**/
UINT8
EFIAPI
LibPcdGetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the 16-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINT16 Return the UINT16.
**/
UINT16
EFIAPI
LibPcdGetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the 32-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINT32 Return the UINT32.
**/
UINT32
EFIAPI
LibPcdGetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the 64-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINT64 Return the UINT64.
**/
UINT64
EFIAPI
LibPcdGetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the pointer to the buffer of token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval VOID* Return the VOID* pointer.
**/
VOID *
EFIAPI
LibPcdGetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the Boolean value of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval BOOLEAN Return the BOOLEAN.
**/
BOOLEAN
EFIAPI
LibPcdGetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the size of the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates
which namespace to retrieve a value from.
@param[in] TokenNumber The PCD token number to retrieve a current value for.
@retval UINTN Return the size.
**/
UINTN
EFIAPI
LibPcdGetExSize (
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Sets the 8-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@retval UINT8 Return the value been set.
**/
UINT8
EFIAPI
LibPcdSet8 (
IN UINTN TokenNumber,
IN UINT8 Value
);
/**
Sets the 16-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@retval UINT16 Return the value been set.
**/
UINT16
EFIAPI
LibPcdSet16 (
IN UINTN TokenNumber,
IN UINT16 Value
);
/**
Sets the 32-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@retval UINT32 Return the value been set.
**/
UINT32
EFIAPI
LibPcdSet32 (
IN UINTN TokenNumber,
IN UINT32 Value
);
/**
Sets the 64-bit value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@retval UINT64 Return the value been set.
**/
UINT64
EFIAPI
LibPcdSet64 (
IN UINTN TokenNumber,
IN UINT64 Value
);
/**
Sets a buffer for the token specified by TokenNumber to
the value specified by Value. Value is returned.
If Value is NULL, then ASSERT().
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value A pointer to the buffer to set.
@retval VOID* Return the pointer for the buffer been set.
**/
VOID*
EFIAPI
LibPcdSetPtr (
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Value
);
/**
Sets the Boolean value for the token specified by TokenNumber
to the value specified by Value. Value is returned.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The boolean value to set.
@retval BOOLEAN Return the value been set.
**/
BOOLEAN
EFIAPI
LibPcdSetBool (
IN UINTN TokenNumber,
IN BOOLEAN Value
);
/**
Sets the 8-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@retval UINT8 Return the value been set.
**/
UINT8
EFIAPI
LibPcdSetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT8 Value
);
/**
Sets the 16-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 16-bit value to set.
@retval UINT8 Return the value been set.
**/
UINT16
EFIAPI
LibPcdSetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT16 Value
);
/**
Sets the 32-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 32-bit value to set.
@retval UINT32 Return the value been set.
**/
UINT32
EFIAPI
LibPcdSetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT32 Value
);
/**
Sets the 64-bit value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 64-bit value to set.
@retval UINT64 Return the value been set.
**/
UINT64
EFIAPI
LibPcdSetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT64 Value
);
/**
Sets a buffer for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
If Value is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The 8-bit value to set.
@retval VOID * Return the value been set.
**/
VOID *
EFIAPI
LibPcdSetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Value
);
/**
Sets the Boolean value for the token specified by TokenNumber and
Guid to the value specified by Value. Value is returned.
If Guid is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that
designates which namespace to set a value from.
@param[in] TokenNumber The PCD token number to set a current value for.
@param[in] Value The Boolean value to set.
@retval Boolean Return the value been set.
**/
BOOLEAN
EFIAPI
LibPcdSetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN BOOLEAN Value
);
/**
When the token specified by TokenNumber and Guid is set,
then notification function specified by NotificationFunction is called.
If Guid is NULL, then the default token space is used.
If NotificationFunction is NULL, then ASSERT().
@param[in] CallBackGuid The PCD token GUID being set.
@param[in] CallBackToken The PCD token number being set.
@param[in] TokenData A pointer to the token data being set.
@param[in] TokenDataSize The size, in bytes, of the data being set.
@retval VOID
**/
typedef
VOID
(EFIAPI *PCD_CALLBACK) (
IN CONST GUID *CallBackGuid, OPTIONAL
IN UINTN CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
);
/**
When the token specified by TokenNumber and Guid is set,
then notification function specified by NotificationFunction is called.
If Guid is NULL, then the default token space is used.
If NotificationFunction is NULL, then ASSERT().
@param[in] Guid Pointer to a 128-bit unique value that designates which
namespace to set a value from. If NULL, then the default
token space is used.
@param[in] TokenNumber The PCD token number to monitor.
@param[in] NotificationFunction The function to call when the token
specified by Guid and TokenNumber is set.
@retval VOID
**/
VOID
EFIAPI
LibPcdCallbackOnSet (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_CALLBACK NotificationFunction
);
/**
Disable a notification function that was established with LibPcdCallbackonSet().
@param[in] Guid Specify the GUID token space.
@param[in] TokenNumber Specify the token number.
@param[in] NotificationFunction The callback function to be unregistered.
@retval VOID
**/
VOID
EFIAPI
LibPcdCancelCallback (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber,
IN PCD_CALLBACK NotificationFunction
);
/**
Retrieves the next PCD token number from the token space specified by Guid.
If Guid is NULL, then the default token space is used. If TokenNumber is 0,
then the first token number is returned. Otherwise, the token number that
follows TokenNumber in the token space is returned. If TokenNumber is the last
token number in the token space, then 0 is returned. If TokenNumber is not 0 and
is not in the token space specified by Guid, then ASSERT().
@param[in] Pointer to a 128-bit unique value that designates which namespace
to set a value from. If NULL, then the default token space is used.
@param[in] The previous PCD token number. If 0, then retrieves the first PCD
token number.
@retval UINTN The next valid token number.
**/
UINTN
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid, OPTIONAL
IN UINTN TokenNumber
);
#endif

View File

@ -1,173 +0,0 @@
/** @file
Definition of the ACPI Support protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: AcpiSupport.h
@par Revision Reference:
This is defined in the ACPI Specification 0.9.
**/
#ifndef _ACPI_SUPPORT_PROTOCOL_H_
#define _ACPI_SUPPORT_PROTOCOL_H_
typedef struct _EFI_ACPI_SUPPORT_PROTOCOL EFI_ACPI_SUPPORT_PROTOCOL;
//
// ACPI Support Protocol GUID
//
#define EFI_ACPI_SUPPORT_GUID \
{ \
0xdbff9d55, 0x89b7, 0x46da, {0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } \
}
//
// Protocol Data Definitions
//
//
// ACPI Version bitmap definition:
//
// EFI_ACPI_TABLE_VERSION_1_0B - ACPI Version 1.0b
// EFI_ACPI_TABLE_VERSION_2_0 - ACPI Version 2.0
// EFI_ACPI_TABLE_VERSION_3_0 - ACPI Version 3.0
// EFI_ACPI_TABLE_VERSION_NONE - No ACPI Versions. This might be used
// to create memory-based operation regions or other information
// that is not part of the ACPI "tree" but must still be found
// in ACPI memory space and/or managed by the core ACPI driver.
//
// Note that EFI provides discrete GUIDs for each version of ACPI
// that is supported. It is expected that each EFI GUIDed
// version of ACPI will also have a corresponding bitmap
// definition. This allows maintenance of separate ACPI trees
// for each distinctly different version of ACPI.
//
#define EFI_ACPI_TABLE_VERSION UINT32
#define EFI_ACPI_TABLE_VERSION_NONE (1 << 0)
#define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1)
#define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2)
#define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3)
//
// Protocol Member Functions
//
/**
Returns a requested ACPI table.
@param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
@param Index The zero-based index of the table to retrieve.
@param Table Pointer for returning the table buffer.
@param Version Updated with the ACPI versions to which this table belongs.
@param Handle Pointer for identifying the table.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The requested index is too large and a table was not found.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ACPI_GET_ACPI_TABLE) (
IN EFI_ACPI_SUPPORT_PROTOCOL *This,
IN INTN Index,
OUT VOID **Table,
OUT EFI_ACPI_TABLE_VERSION *Version,
OUT UINTN *Handle
);
/**
Used to add, remove, or update ACPI tables.
@param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
@param Table Pointer to the new table to add or update.
@param Checksum If TRUE, indicates that the checksum should be
calculated for this table.
@param Version Indicates to which version(s) of ACPI the table should be added.
@param Pointer to the handle of the table to remove or update.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.
@retval EFI_ABORTED Could not complete the desired action.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ACPI_SET_ACPI_TABLE) (
IN EFI_ACPI_SUPPORT_PROTOCOL *This,
IN VOID *Table OPTIONAL,
IN BOOLEAN Checksum,
IN EFI_ACPI_TABLE_VERSION Version,
IN OUT UINTN *Handle
);
/**
Causes one or more versions of the ACPI tables to be published in
the EFI system configuration tables.
@param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
@param Version Indicates to which version(s) of ACPI that the table should be published.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_ABORTED An error occurred and the function could not complete successfully.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ACPI_PUBLISH_TABLES) (
IN EFI_ACPI_SUPPORT_PROTOCOL *This,
IN EFI_ACPI_TABLE_VERSION Version
);
//
// ACPI Support Protocol
//
/**
@par Protocol Description:
This protocol provides some basic services to support publishing ACPI system
tables. The services handle many of the more mundane tasks that are required
to publish a set of tables.
@param GetAcpiTable
Returns a table specified by an index if it exists.
@param SetAcpiTable
Adds, removes, or updates ACPI tables
@param PublishTables
Publishes the ACPI tables.
**/
struct _EFI_ACPI_SUPPORT_PROTOCOL {
EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;
EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;
EFI_ACPI_PUBLISH_TABLES PublishTables;
};
//
// Extern the GUID for protocol users.
//
extern EFI_GUID gEfiAcpiSupportProtocolGuid;
#endif

View File

@ -1,259 +0,0 @@
/** @file
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Arp.h
**/
#ifndef __EFI_ARP_PROTOCOL_H__
#define __EFI_ARP_PROTOCOL_H__
#define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \
{ \
0xf44c00ee, 0x1f2c, 0x4a00, {0xaa, 0x9, 0x1c, 0x9f, 0x3e, 0x8, 0x0, 0xa3 } \
}
#define EFI_ARP_PROTOCOL_GUID \
{ \
0xf4b427bb, 0xba21, 0x4f16, {0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c } \
}
typedef struct _EFI_ARP_PROTOCOL EFI_ARP_PROTOCOL;
typedef struct {
UINT32 Size;
BOOLEAN DenyFlag;
BOOLEAN StaticFlag;
UINT16 HwAddressType;
UINT16 SwAddressType;
UINT8 HwAddressLength;
UINT8 SwAddressLength;
} EFI_ARP_FIND_DATA;
typedef struct {
UINT16 SwAddressType; // Host byte order
UINT8 SwAddressLength;
VOID *StationAddress; // Network byte order
UINT32 EntryTimeOut;
UINT32 RetryCount;
UINT32 RetryTimeOut;
} EFI_ARP_CONFIG_DATA;
/**
Assigns a station address (protocol type and network address) to this instance of the ARP cache.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@param ConfigData A pointer to the EFI_ARP_CONFIG_DATA structure.Buffer
@retval EFI_SUCCESS The new station address was successfully registered.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
@retval EFI_ACCESS_DENIED The SwAddressType, SwAddressLength, or
StationAddress is different from the one that is already
registered.
@retval EFI_OUT_OF_RESOURCES Storage for the new StationAddress could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_CONFIGURE) (
IN EFI_ARP_PROTOCOL *This,
IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL
)
;
/**
Inserts an entry to the ARP cache.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@param DenyFlag Set to TRUE if this entry is a <20><>deny<6E><79> entry. Set to FALSE if this
entry is a <20><>normal<61><6C> entry.
@param TargetSwAddress Pointer to a protocol address to add (or deny). May be set to
NULL if DenyFlag is TRUE.
@param TargetHwAddress Pointer to a hardware address to add (or deny). May be set to
NULL if DenyFlag is TRUE.
@param TimeoutValue Time in 100-ns units that this entry will remain in the ARP
cache. A value of zero means that the entry is permanent. A
nonzero value will override the one given by Configure() if
the entry to be added is dynamic entry.
@param Overwrite If TRUE, the matching cache entry will be overwritten with the
supplied parameters. If FALSE, EFI_ACCESS_DENIED
@retval EFI_SUCCESS The entry has been added or updated.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
@retval EFI_OUT_OF_RESOURCES The new ARP cache entry could not be allocated.
@retval EFI_ACCESS_DENIED The ARP cache entry already exists and Overwrite is not true.
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_ADD) (
IN EFI_ARP_PROTOCOL *This,
IN BOOLEAN DenyFlag,
IN VOID *TargetSwAddress OPTIONAL,
IN VOID *TargetHwAddress OPTIONAL,
IN UINT32 TimeoutValue,
IN BOOLEAN Overwrite
)
;
/**
Locates one or more entries in the ARP cache.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@param BySwAddress Set to TRUE to look for matching software protocol addresses.
Set to FALSE to look for matching hardware protocol addresses.
@param AddressBuffer Pointer to address buffer. Set to NULL to match all addresses.
@param EntryLength The size of an entry in the entries buffer. To keep the
EFI_ARP_FIND_DATA structure properly aligned, this field
may be longer than sizeof(EFI_ARP_FIND_DATA) plus
the length of the software and hardware addresses.
@param EntryCount The number of ARP cache entries that are found by the specified criteria.
@param Entries Pointer to the buffer that will receive the ARP cache entries.
@param Refresh Set to TRUE to refresh the timeout value of the matching ARP
cache entry.
@retval EFI_SUCCESS The requested ARP cache entries were copied into the buffer.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
@retval EFI_NOT_FOUND No matching entries were found.
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_FIND) (
IN EFI_ARP_PROTOCOL *This,
IN BOOLEAN BySwAddress,
IN VOID *AddressBuffer OPTIONAL,
OUT UINT32 *EntryLength OPTIONAL,
OUT UINT32 *EntryCount OPTIONAL,
OUT EFI_ARP_FIND_DATA **Entries OPTIONAL,
IN BOOLEAN Refresh
)
;
/**
Removes entries from the ARP cache.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@param BySwAddress Set to TRUE to delete matching protocol addresses.
Set to FALSE to delete matching hardware addresses.
@param AddressBuffer Pointer to the address buffer that is used as a key to look for the
cache entry. Set to NULL to delete all entries.
@retval EFI_SUCCESS The entry was removed from the ARP cache.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_FOUND The specified deletion key was not found.
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_DELETE) (
IN EFI_ARP_PROTOCOL *This,
IN BOOLEAN BySwAddress,
IN VOID *AddressBuffer OPTIONAL
)
;
/**
Removes all dynamic ARP cache entries that were added by this interface.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@retval EFI_SUCCESS The cache has been flushed.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_FOUND There are no matching dynamic cache entries.
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_FLUSH) (
IN EFI_ARP_PROTOCOL *This
)
;
/**
Starts an ARP request session.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@param TargetSwAddress Pointer to the protocol address to resolve.
@param ResolvedEvent Pointer to the event that will be signaled when the address is
resolved or some error occurs.
@param TargetHwAddress Pointer to the buffer for the resolved hardware address in
network byte order. The buffer must be large enough to hold the
resulting hardware address. TargetHwAddress must not be
NULL.
@retval EFI_SUCCESS The data was copied from the ARP cache into the
TargetHwAddress buffer.
@retval EFI_INVALID_PARAMETER This or TargetHwAddress is NULL.
@retval EFI_ACCESS_DENIED The requested address is not present in the normal ARP cache but
is present in the deny address list. Outgoing traffic to that address is
forbidden.
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
@retval EFI_NOT_READY The request has been started and is not finished.
@retval EFI_UNSUPPORTED The requested conversion is not supported in this implementation or
configuration.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_REQUEST) (
IN EFI_ARP_PROTOCOL *This,
IN VOID *TargetSwAddress OPTIONAL,
IN EFI_EVENT ResolvedEvent OPTIONAL,
OUT VOID *TargetHwAddress
)
;
/**
Cancels an ARP request session.
@param This A pointer to the EFI_ARP_PROTOCOL instance.
@param TargetSwAddress Pointer to the protocol address in previous request session.
@param ResolvedEvent Pointer to the event that is used as the notification event in
previous request session.
@retval EFI_SUCCESS The pending request session(s) is/are aborted and corresponding
event(s) is/are signaled.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
@retval EFI_NOT_STARTED The ARP driver instance has not been configured.
@retval EFI_NOT_FOUND The request is not issued by
EFI_ARP_PROTOCOL.Request().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ARP_CANCEL) (
IN EFI_ARP_PROTOCOL *This,
IN VOID *TargetSwAddress OPTIONAL,
IN EFI_EVENT ResolvedEvent OPTIONAL
)
;
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;
};
extern EFI_GUID gEfiArpServiceBindingProtocolGuid;
extern EFI_GUID gEfiArpProtocolGuid;
#endif

View File

@ -1,125 +0,0 @@
/** @file
EFI_AUTHENTICATION_INFO_PROTOCOL as defined in UEFI 2.0.
This protocol is used on any device handle to obtain authentication information
associated with the physical or logical device.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: AuthenticationInfo.h
**/
#ifndef __AUTHENTICATION_INFO_H__
#define __AUTHENTICATION_INFO_H__
#define EFI_AUTHENTICATION_INFO_PROTOCOL_GUID \
{ \
0x7671d9d0, 0x53db, 0x4173, {0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } \
}
#define EFI_AUTHENTICATION_CHAP_RADIUS_GUID \
{ \
0xd6062b50, 0x15ca, 0x11da, {0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
}
#define EFI_AUTHENTICATION_CHAP_LOCAL_GUID \
{ \
0xc280c73e, 0x15ca, 0x11da, {0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \
}
typedef struct _EFI_AUTHENTICATION_INFO_PROTOCOL EFI_AUTHENTICATION_INFO_PROTOCOL;
typedef struct {
EFI_GUID Guid;
UINT16 Length;
} AUTH_NODE_HEADER;
typedef struct {
AUTH_NODE_HEADER Header;
EFI_IPv6_ADDRESS RadiusIpAddr; // IPv4 or IPv6 address
UINT16 Reserved;
EFI_IPv6_ADDRESS NasIpAddr; // IPv4 or IPv6 address
UINT16 NasSecretLength;
UINT8 *NasSecret;
UINT16 ChapSecretLength;
UINT8 *ChapSecret;
UINT16 ChapNameLength;
UINT8 *ChapName;
} CHAP_RADIUS_AUTH_NODE;
typedef struct {
AUTH_NODE_HEADER Header;
UINT16 Reserved;
UINT16 UserSecretLength;
UINT8 *UserSecret;
UINT16 UserNameLength;
UINT8 *UserName;
UINT16 ChapSecretLength;
UINT8 *ChapSecret;
UINT16 ChapNameLength;
UINT8 *ChapName;
} CHAP_LOCAL_AUTH_NODE;
/**
Retrieves the Authentication information associated with a particular controller handle.
@param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
@param ControllerHandle Handle to the Controller
@param Buffer Pointer to the authentication information.
@retval EFI_SUCCESS Successfully retrieved Authentication information for the given ControllerHandle
@retval EFI_INVALID_PARAMETER No matching Authentication information found for the given ControllerHandle
@retval EFI_DEVICE_ERROR The authentication information could not be retrieved due to a
hardware error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_GET) (
IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
IN EFI_HANDLE *ControllerHandle,
OUT VOID *Buffer
)
;
/**
Set the Authentication information for a given controller handle.
@param This Pointer to the EFI_AUTHENTICATION_INFO_PROTOCOL
@param ControllerHandle Handle to the Controller
@param Buffer Pointer to the authentication information.
@retval EFI_SUCCESS Successfully set Authentication information for the given ControllerHandle
@retval EFI_UNSUPPORTED If the platform policies do not allow setting of the Authentication
information.
@retval EFI_DEVICE_ERROR The authentication information could not be configured due to a
hardware error.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_AUTHENTICATION_PROTOCOL_INFO_SET) (
IN EFI_AUTHENTICATION_INFO_PROTOCOL *This,
IN EFI_HANDLE *ControllerHandle,
IN VOID *Buffer
)
;
struct _EFI_AUTHENTICATION_INFO_PROTOCOL {
EFI_AUTHENTICATION_PROTOCOL_INFO_GET Get;
EFI_AUTHENTICATION_PROTOCOL_INFO_SET Set;
};
extern EFI_GUID gEfiAuthenticationInfoProtocolGuid;
extern EFI_GUID gEfiAuthenticationChapRadiusGuid;
extern EFI_GUID gEfiAuthenticationChapLocalGuid;
#endif

View File

@ -1,418 +0,0 @@
/** @file
This file defines the BIS protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Bis.h
**/
#ifndef __BIS_H__
#define __BIS_H__
#define EFI_BIS_PROTOCOL_GUID \
{ \
0x0b64aab0, 0x5429, 0x11d4, {0x98, 0x16, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf } \
}
typedef struct _EFI_BIS_PROTOCOL EFI_BIS_PROTOCOL;
//
// Basic types
//
typedef VOID *BIS_APPLICATION_HANDLE;
typedef UINT16 BIS_ALG_ID;
typedef UINT32 BIS_CERT_ID;
//
// EFI_BIS_DATA type.
//
// EFI_BIS_DATA instances obtained from BIS must be freed by calling Free( ).
//
typedef struct {
UINT32 Length; // Length of Data in 8 bit bytes.
UINT8 *Data; // 32 Bit Flat Address of data.
} EFI_BIS_DATA;
//
// EFI_BIS_VERSION type.
//
typedef struct {
UINT32 Major; // BIS Interface version number.
UINT32 Minor; // Build number.
} EFI_BIS_VERSION;
//
// ----------------------------------------------------//
// Use these values to initialize EFI_BIS_VERSION.Major
// and to interpret results of Initialize.
// ----------------------------------------------------//
//
#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1
#define BIS_VERSION_1 1
//
// EFI_BIS_SIGNATURE_INFO type.
//
typedef struct {
BIS_CERT_ID CertificateID; // Truncated hash of platform Boot Object
// authorization certificate.
//
BIS_ALG_ID AlgorithmID; // A signature algorithm number.
UINT16 KeyLength; // Length of alg. keys in bits.
} EFI_BIS_SIGNATURE_INFO;
//
// Currently defined values for EFI_BIS_SIGNATURE_INFO.AlgorithmID.
// The exact numeric values come from
// "Common Data Security Architecture (CDSA) Specification".
//
#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA
#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA
// Currently defined values for EFI_BIS_SIGNATURE_INFO.CertificateId.
//
#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA
#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA
// The following is a mask value that gets applied to the truncated hash of a
// platform Boot Object Authorization Certificate to create the certificateID.
// A certificateID must not have any bits set to the value 1 other than bits in
// this mask.
//
#define BIS_CERT_ID_MASK (0xFF7F7FFF)
//
// Macros for dealing with the EFI_BIS_DATA object obtained
// from BIS_GetSignatureInfo()
// BIS_GET_SIGINFO_COUNT - tells how many EFI_BIS_SIGNATURE_INFO
// elements are contained in a EFI_BIS_DATA struct pointed to
// by the provided EFI_BIS_DATA*.
//
#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO))
//
// BIS_GET_SIGINFO_ARRAY - produces a EFI_BIS_SIGNATURE_INFO*
// from a given EFI_BIS_DATA*.
//
#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data)
//
// Binary Value of "X-Intel-BIS-ParameterSet" Attribute.
// (Value is Base64 encoded in actual signed manifest).
// {EDD35E31-07B9-11d2-83A3-00A0C91FADCF}
//
#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUID \
{ \
0xedd35e31, 0x7b9, 0x11d2, \
{ \
0x83, 0xa3, 0x0, 0xa0, 0xc9, 0x1f, 0xad, 0xcf \
} \
}
//
// Support old name for backward compatible
//
#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUIDVALUE \
BOOT_OBJECT_AUTHORIZATION_PARMSET_GUID
/**
Initializes the BIS service, checking that it is compatible with the version requested by the caller.
After this call, other BIS functions may be invoked.
@param This A pointer to the EFI_BIS_PROTOCOL object.
@param AppHandle The function writes the new BIS_APPLICATION_HANDLE if
successful, otherwise it writes NULL. The caller must eventually
destroy this handle by calling Shutdown().
@param InterfaceVersion On input, the caller supplies the major version number of the
interface version desired.
On output, both the major and minor
version numbers are updated with the major and minor version
numbers of the interface
@param TargetAddress Indicates a network or device address of the BIS platform to connect to.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INCOMPATIBLE_VERSION The InterfaceVersion.Major requested by the
caller was not compatible with the interface version of the
@retval EFI_UNSUPPORTED This is a local-platform implementation and
TargetAddress.Data was not NULL, or
TargetAddress.Data was any other value that was not
supported by the implementation.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_DEVICE_ERROR The function encountered an unexpected internal failure.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_INITIALIZE) (
IN EFI_BIS_PROTOCOL *This,
OUT BIS_APPLICATION_HANDLE *AppHandle,
IN OUT EFI_BIS_VERSION *InterfaceVersion,
IN EFI_BIS_DATA *TargetAddress
);
/**
Frees memory structures allocated and returned by other functions in the EFI_BIS protocol.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param ToFree An EFI_BIS_DATA* and associated memory block to be freed.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER The ToFree parameter is not or is no longer a memory resource
associated with this AppHandle.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_FREE) (
IN BIS_APPLICATION_HANDLE AppHandle,
IN EFI_BIS_DATA *ToFree
);
/**
Shuts down an application<6F><6E>s instance of the BIS service, invalidating the application handle. After
this call, other BIS functions may no longer be invoked using the application handle value.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_DEVICE_ERROR The function encountered an unexpected internal failure.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_SHUTDOWN) (
IN BIS_APPLICATION_HANDLE AppHandle
);
/**
Retrieves the certificate that has been configured as the identity of the organization designated as
the source of authorization for signatures of boot objects.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param Certificate The function writes an allocated EFI_BIS_DATA* containing the Boot
Object Authorization Certificate object.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_NOT_FOUND There is no Boot Object Authorization Certificate currently installed.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER The Certificate parameter supplied by the caller is NULL or
an invalid memory reference.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE) (
IN BIS_APPLICATION_HANDLE AppHandle,
OUT EFI_BIS_DATA **Certificate
);
/**
Verifies the integrity and authorization of the indicated data object according to the
indicated credentials.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param Credentials A Signed Manifest containing verification information for the indicated
data object.
@param DataObject An in-memory copy of the raw data object to be verified.
@param IsVerified The function writes TRUE if the verification succeeded, otherwise
FALSE.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_SECURITY_VIOLATION The signed manifest supplied as the Credentials parameter
was invalid (could not be parsed) or Platform-specific authorization failed, etc.
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_VERIFY_BOOT_OBJECT) (
IN BIS_APPLICATION_HANDLE AppHandle,
IN EFI_BIS_DATA *Credentials,
IN EFI_BIS_DATA *DataObject,
OUT BOOLEAN *IsVerified
);
/**
Retrieves the current status of the Boot Authorization Check Flag.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param CheckIsRequired The function writes the value TRUE if a Boot Authorization Check is
currently required on this platform, otherwise the function writes
FALSE.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER The CheckIsRequired parameter supplied by the caller is
NULL or an invalid memory reference.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG) (
IN BIS_APPLICATION_HANDLE AppHandle,
OUT BOOLEAN *CheckIsRequired
);
/**
Retrieves a unique token value to be included in the request credential for the next update of any
parameter in the Boot Object Authorization set
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param UpdateToken The function writes an allocated EFI_BIS_DATA* containing the new
unique update token value.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER The UpdateToken parameter supplied by the caller is NULL or
an invalid memory reference.
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN) (
IN BIS_APPLICATION_HANDLE AppHandle,
OUT EFI_BIS_DATA **UpdateToken
);
/**
Updates one of the configurable parameters of the Boot Object Authorization set.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param RequestCredential This is a Signed Manifest with embedded attributes that carry the details
of the requested update.
@param NewUpdateToken The function writes an allocated EFI_BIS_DATA* containing the new
unique update token value.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_SECURITY_VIOLATION The signed manifest supplied as the RequestCredential parameter
was invalid (could not be parsed) or Platform-specific authorization failed, etc.
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION) (
IN BIS_APPLICATION_HANDLE AppHandle,
IN EFI_BIS_DATA *RequestCredential,
OUT EFI_BIS_DATA **NewUpdateToken
);
/**
Verifies the integrity and authorization of the indicated data object according to the indicated
credentials and authority certificate.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param Credentials A Signed Manifest containing verification information for the
indicated data object.
@param DataObject An in-memory copy of the raw data object to be verified.
@param SectionName An ASCII (not Unicode) string giving the section name in the
manifest holding the verification information (in other words,
hash value) that corresponds to DataObject.
@param AuthorityCertificate A digital certificate whose public key must match the signer<65><72>s
public key which is found in the credentials.
@param IsVerified The function writes TRUE if the verification was successful.
Otherwise, the function writes FALSE.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_SECURITY_VIOLATION The Credentials.Data supplied by the caller is NULL,
or the AuthorityCertificate supplied by the caller was
invalid (could not be parsed),
or Platform-specific authorization failed, etc.
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL) (
IN BIS_APPLICATION_HANDLE AppHandle,
IN EFI_BIS_DATA *Credentials,
IN EFI_BIS_DATA *DataObject,
IN EFI_BIS_DATA *SectionName,
IN EFI_BIS_DATA *AuthorityCertificate,
OUT BOOLEAN *IsVerified
);
/**
Retrieves a list of digital certificate identifier, digital signature algorithm, hash algorithm, and keylength
combinations that the platform supports.
@param AppHandle An opaque handle that identifies the caller<65><72>s instance of initialization
of the BIS service.
@param SignatureInfo The function writes an allocated EFI_BIS_DATA* containing the array
of EFI_BIS_SIGNATURE_INFO structures representing the supported
digital certificate identifier, algorithm, and key length combinations.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NO_MAPPING The AppHandle parameter is not or is no longer a valid
application instance handle associated with the EFI_BIS protocol.
@retval EFI_OUT_OF_RESOURCES The function failed due to lack of memory or other resources.
@retval EFI_INVALID_PARAMETER The SignatureInfo parameter supplied by the caller is NULL
or an invalid memory reference.
@retval EFI_DEVICE_ERROR An unexpected internal error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BIS_GET_SIGNATURE_INFO) (
IN BIS_APPLICATION_HANDLE AppHandle,
OUT EFI_BIS_DATA **SignatureInfo
);
struct _EFI_BIS_PROTOCOL {
EFI_BIS_INITIALIZE Initialize;
EFI_BIS_SHUTDOWN Shutdown;
EFI_BIS_FREE Free;
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate;
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag;
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken;
EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo;
EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization;
EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject;
EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential;
};
extern EFI_GUID gEfiBisProtocolGuid;
extern EFI_GUID gBootObjectAuthorizationParmsetGuid;
#endif

View File

@ -1,173 +0,0 @@
/** @file
Block IO protocol as defined in the EFI 1.0 specification.
The Block IO protocol is used to abstract block devices like hard drives,
DVD-ROMs and floppy drives.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: BlockIo.h
**/
#ifndef __BLOCK_IO_H__
#define __BLOCK_IO_H__
#define EFI_BLOCK_IO_PROTOCOL_GUID \
{ \
0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL;
/**
Reset the Block Device.
@param This Protocol instance pointer.
@param ExtendedVerification Driver may perform diagnostics on reset.
@retval EFI_SUCCESS The device was reset.
@retval EFI_DEVICE_ERROR The device is not functioning properly and could
not be reset.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BLOCK_RESET) (
IN EFI_BLOCK_IO_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
;
/**
Read BufferSize bytes from Lba into Buffer.
@param This Protocol instance pointer.
@param MediaId Id of the media, changes every time the media is replaced.
@param Lba The starting Logical Block Address to read from
@param BufferSize Size of Buffer, must be a multiple of device block size.
@param Buffer Buffer containing read data
@retval EFI_SUCCESS The data was read correctly from the device.
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.
@retval EFI_NO_MEDIA There is no media in the device.
@retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
@retval EFI_INVALID_PARAMETER The read request contains device addresses that are not
valid for the device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BLOCK_READ) (
IN EFI_BLOCK_IO_PROTOCOL *This,
IN UINT32 MediaId,
IN EFI_LBA Lba,
IN UINTN BufferSize,
OUT VOID *Buffer
)
;
/**
Write BufferSize bytes from Lba into Buffer.
@param This Protocol instance pointer.
@param MediaId Id of the media, changes every time the media is replaced.
@param Lba The starting Logical Block Address to read from
@param BufferSize Size of Buffer, must be a multiple of device block size.
@param Buffer Buffer containing read data
@retval EFI_SUCCESS The data was written correctly to the device.
@retval EFI_WRITE_PROTECTED The device can not be written to.
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.
@retval EFI_NO_MEDIA There is no media in the device.
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
@retval EFI_INVALID_PARAMETER The write request contains a LBA that is not
valid for the device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BLOCK_WRITE) (
IN EFI_BLOCK_IO_PROTOCOL *This,
IN UINT32 MediaId,
IN EFI_LBA Lba,
IN UINTN BufferSize,
IN VOID *Buffer
)
;
/**
Flush the Block Device.
@param This Protocol instance pointer.
@retval EFI_SUCCESS All outstanding data was written to the device
@retval EFI_DEVICE_ERROR The device reported an error while writting back the data
@retval EFI_NO_MEDIA There is no media in the device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BLOCK_FLUSH) (
IN EFI_BLOCK_IO_PROTOCOL *This
)
;
/**
Block IO read only mode data and updated only via members of BlockIO
**/
typedef struct {
UINT32 MediaId; ///< The curent media Id. If the media changes, this value is changed.
BOOLEAN RemovableMedia; ///< TRUE if the media is removable; otherwise, FALSE.
BOOLEAN MediaPresent; /**< 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 LogicalPartition; /**< TRUE if LBA 0 is the first block of a partition; otherwise
FALSE. For media with only one partition this would be TRUE.
**/
BOOLEAN ReadOnly; /**< 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 WriteCaching; ///< TRUE if the WriteBlock () function caches write data.
UINT32 BlockSize; /**< The intrinsic block size of the device. If the media changes, then
this field is updated.
**/
UINT32 IoAlign; ///< Supplies the alignment requirement for any buffer to read or write block(s).
EFI_LBA LastBlock; /**< The last logical block address on the device.
If the media changes, then this field is updated.
**/
} EFI_BLOCK_IO_MEDIA;
#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000
struct _EFI_BLOCK_IO_PROTOCOL {
UINT64 Revision;
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;
#endif

View File

@ -1,110 +0,0 @@
/** @file
Definition of the Boot Script Save protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: BootScriptSave.h
@par Revision Reference:
This protocol defined in the Boot Script Specification, Version 0.91.
**/
#ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H
#define _BOOT_SCRIPT_SAVE_PROTOCOL_H
//
// S3 Save Protocol GUID
//
#define EFI_BOOT_SCRIPT_SAVE_PROTOCOL_GUID \
{ \
0x470e1529, 0xb79e, 0x4e32, {0xa0, 0xfe, 0x6a, 0x15, 0x6d, 0x29, 0xf9, 0xb2 } \
}
typedef struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL EFI_BOOT_SCRIPT_SAVE_PROTOCOL;
//
// Protocol Member_Function
//
/**
Adds a record into a specified Framework boot script table.
@param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
@param TableName Name of the script table.Currently, the only meaningful
value is EFI_ACPI_S3_RESUME_SCRIPT_TABLE.
@param OpCode The operation code (opcode) number.
@param ... Argument list that is specific to each opcode.
@retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table.
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
@retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BOOT_SCRIPT_WRITE) (
IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
IN UINT16 TableName,
IN UINT16 OpCode,
...
);
/**
Closes the specified script table.
@param This A pointer to the EFI_BOOT_SCRIPT_SAVE_PROTOCOL instance.
@param TableName Name of the script table.
@param Address A pointer to the physical address where the table begins.
@retval EFI_SUCCESS The table was successfully returned.
@retval EFI_NOT_FOUND The specified table was not created previously.
@retval EFI_OUT_OF_RESOURCES Memory is insufficient to hold the reorganized boot script table.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BOOT_SCRIPT_CLOSE_TABLE) (
IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL *This,
IN UINT16 TableName,
OUT EFI_PHYSICAL_ADDRESS *Address
);
//
// S3 Save Protocol data structure
//
/**
@par Protocol Description:
The EFI_BOOT_SCRIPT_SAVE_PROTOCOL publishes the Framework boot script abstractions
to store or record various boot scripts into boot script tables.
@param Write
Writes various boot scripts to a boot script table.
@param CloseTable
Retrieves and closes a script table.
**/
struct _EFI_BOOT_SCRIPT_SAVE_PROTOCOL {
EFI_BOOT_SCRIPT_WRITE Write;
EFI_BOOT_SCRIPT_CLOSE_TABLE CloseTable;
};
extern EFI_GUID gEfiBootScriptSaveProtocolGuid;
#endif

View File

@ -1,66 +0,0 @@
/** @file
Bus Specific Driver Override protocol as defined in the EFI 1.1 specification.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: BusSpecificDriverOverride.h
**/
#ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
#define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
//
// Global ID for the Bus Specific Driver Override Protocol
//
#define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID \
{ \
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;
//
// Prototypes for the Bus Specific Driver Override Protocol
//
/**
Uses a bus specific algorithm to retrieve a driver image handle for a controller.
@param This A pointer to the EFI_BUS_SPECIFIC_DRIVER_
OVERRIDE_PROTOCOL instance.
@param DriverImageHandle On input, a pointer to the previous driver image handle returned
by GetDriver(). On output, a pointer to the next driver
image handle. Passing in a NULL, will return the first driver
image handle.
@retval EFI_SUCCESS A bus specific override driver is returned in DriverImageHandle.
@retval EFI_NOT_FOUND The end of the list of override drivers was reached.
@retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a
previous call to GetDriver().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,
IN OUT EFI_HANDLE *DriverImageHandle
);
//
// Interface structure for the Bus Specific Driver Override Protocol
//
struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
};
extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid;
#endif

View File

@ -1,123 +0,0 @@
/** @file
EFI Component Name Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: ComponentName.h
**/
#ifndef __EFI_COMPONENT_NAME_H__
#define __EFI_COMPONENT_NAME_H__
//
// Global ID for the Component Name Protocol
//
#define EFI_COMPONENT_NAME_PROTOCOL_GUID \
{ \
0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;
/**
Retrieves a Unicode string that is the user readable name of the EFI Driver.
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
@param Language A pointer to a three character ISO 639-2 language identifier.
This is the language of the driver name that that the caller
is requesting, and it must match one of the languages specified
in SupportedLanguages. The number of languages supported by a
driver is up to the driver writer.
@param DriverName A pointer to the Unicode string to return. This Unicode string
is the name of the driver specified by This in the language
specified by Language.
@retval EFI_SUCCESS The Unicode string for the Driver specified by This
and the language specified by Language was returned
in DriverName.
@retval EFI_INVALID_PARAMETER Language is NULL.
@retval EFI_INVALID_PARAMETER DriverName is NULL.
@retval EFI_UNSUPPORTED The driver specified by This does not support the
language specified by Language.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
/**
Retrieves a Unicode string that is the user readable name of the controller
that is being managed by an EFI Driver.
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
@param ControllerHandle The handle of a controller that the driver specified by
This is managing. This handle specifies the controller
whose name is to be returned.
@param ChildHandle The handle of the child controller to retrieve the name
of. This is an optional parameter that may be NULL. It
will be NULL for device drivers. It will also be NULL
for a bus drivers that wish to retrieve the name of the
bus controller. It will not be NULL for a bus driver
that wishes to retrieve the name of a child controller.
@param Language A pointer to a three character ISO 639-2 language
identifier. This is the language of the controller name
that that the caller is requesting, and it must match one
of the languages specified in SupportedLanguages. The
number of languages supported by a driver is up to the
driver writer.
@param ControllerName A pointer to the Unicode string to return. This Unicode
string is the name of the controller specified by
ControllerHandle and ChildHandle in the language specified
by Language from the point of view of the driver specified
by This.
@retval EFI_SUCCESS The Unicode string for the user readable name in the
language specified by Language for the driver
specified by This was returned in DriverName.
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER Language is NULL.
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing
the controller specified by ControllerHandle and
ChildHandle.
@retval EFI_UNSUPPORTED The driver specified by This does not support the
language specified by Language.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
//
// Interface structure for the Component Name Protocol
//
struct _EFI_COMPONENT_NAME_PROTOCOL {
EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
CHAR8 *SupportedLanguages;
};
extern EFI_GUID gEfiComponentNameProtocolGuid;
#endif

View File

@ -1,131 +0,0 @@
/** @file
This code abstracts the CPU IO Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: CpuIO.h
@par Revision Reference:
CPU IO Protocol is defined in Framework of EFI CPU IO Protocol Spec
Version 0.9
**/
#ifndef _CPUIO_H_
#define _CPUIO_H_
#define EFI_CPU_IO_PROTOCOL_GUID \
{ \
0xB0732526, 0x38C8, 0x4b40, {0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 } \
}
typedef struct _EFI_CPU_IO_PROTOCOL EFI_CPU_IO_PROTOCOL;
//
// *******************************************************
// EFI_CPU_IO_PROTOCOL_WIDTH
// *******************************************************
//
typedef enum {
EfiCpuIoWidthUint8,
EfiCpuIoWidthUint16,
EfiCpuIoWidthUint32,
EfiCpuIoWidthUint64,
EfiCpuIoWidthFifoUint8,
EfiCpuIoWidthFifoUint16,
EfiCpuIoWidthFifoUint32,
EfiCpuIoWidthFifoUint64,
EfiCpuIoWidthFillUint8,
EfiCpuIoWidthFillUint16,
EfiCpuIoWidthFillUint32,
EfiCpuIoWidthFillUint64,
EfiCpuIoWidthMaximum
} EFI_CPU_IO_PROTOCOL_WIDTH;
//
// *******************************************************
// EFI_CPU_IO_PROTOCOL_IO_MEM
// *******************************************************
//
/**
Enables a driver to access memory-mapped registers in the EFI system memory space.
Or, Enables a driver to access registers in the EFI CPU I/O space.
@param This A pointer to the EFI_CPU_IO_PROTOCOL instance.
@param Width Signifies the width of the I/O or Memory operation.
@param Address The base address of the I/O or Memoryoperation.
@param Count The number of I/O or Memory operations to perform.
The number of bytes moved is Width size * Count, starting at Address.
@param Buffer For read operations, the destination buffer to store the results.
For write operations, the source buffer from which to write data.
@retval EFI_SUCCESS The data was read from or written to the EFI system.
@retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.
@retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
Or,The address range specified by Address, Width, and Count is not valid for this EFI system.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_CPU_IO_PROTOCOL_IO_MEM) (
IN EFI_CPU_IO_PROTOCOL *This,
IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN OUT VOID *Buffer
);
//
// *******************************************************
// EFI_CPU_IO_PROTOCOL_ACCESS
// *******************************************************
//
typedef struct {
EFI_CPU_IO_PROTOCOL_IO_MEM Read;
EFI_CPU_IO_PROTOCOL_IO_MEM Write;
} EFI_CPU_IO_PROTOCOL_ACCESS;
//
// *******************************************************
// EFI_CPU_IO_PROTOCOL
// *******************************************************
//
/**
@par Protocol Description:
Provides the basic memory and I/O interfaces that are used to abstract
accesses to devices in a system.
@param Mem.Read
Allows reads from memory-mapped I/O space.
@param Mem.Write
Allows writes to memory-mapped I/O space.
@param Io.Read
Allows reads from I/O space.
@param Io.Write
Allows writes to I/O space.
**/
struct _EFI_CPU_IO_PROTOCOL {
EFI_CPU_IO_PROTOCOL_ACCESS Mem;
EFI_CPU_IO_PROTOCOL_ACCESS Io;
};
extern EFI_GUID gEfiCpuIoProtocolGuid;
#endif

View File

@ -1,233 +0,0 @@
/** @file
The data hub protocol is used both by agents wishing to log
data and those wishing to be made aware of all information that
has been logged.
For more information please look at Intel Platform Innovation
Framework for EFI Data Hub Specification.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DataHub.h
@par Revision Reference:
This protocol is defined in Framework for EFI Data Hub Specification.
Version 0.9.
**/
#ifndef __DATA_HUB_H__
#define __DATA_HUB_H__
#define EFI_DATA_HUB_PROTOCOL_GUID \
{ \
0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \
}
//
// EFI generic Data Hub Header
//
// A Data Record is an EFI_DATA_RECORD_HEADER followed by RecordSize bytes of
// data. The format of the data is defined by the DataRecordGuid.
//
// If EFI_DATA_RECORD_HEADER is extended in the future the Version number must
// change and the HeaderSize will change if the definition of
// EFI_DATA_RECORD_HEADER is extended.
//
// The logger is responcible for initializing:
// Version, HeaderSize, RecordSize, DataRecordGuid, DataRecordClass
//
// The Data Hub driver is responcible for initializing:
// LogTime and LogMonotonicCount.
//
#define EFI_DATA_RECORD_HEADER_VERSION 0x0100
typedef struct {
UINT16 Version;
UINT16 HeaderSize;
UINT32 RecordSize;
EFI_GUID DataRecordGuid;
EFI_GUID ProducerName;
UINT64 DataRecordClass;
EFI_TIME LogTime;
UINT64 LogMonotonicCount;
} EFI_DATA_RECORD_HEADER;
//
// Definition of DataRecordClass. These are used to filter out class types
// at a very high level. The DataRecordGuid still defines the format of
// the data. See DateHub.doc for rules on what can and can not be a
// new DataRecordClass
//
#define EFI_DATA_RECORD_CLASS_DEBUG 0x0000000000000001
#define EFI_DATA_RECORD_CLASS_ERROR 0x0000000000000002
#define EFI_DATA_RECORD_CLASS_DATA 0x0000000000000004
#define EFI_DATA_RECORD_CLASS_PROGRESS_CODE 0x0000000000000008
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_DATA_HUB_PROTOCOL EFI_DATA_HUB_PROTOCOL;
/**
Logs a data record to the system event log.
@param This The EFI_DATA_HUB_PROTOCOL instance.
@param description
@param DataRecordGuid A GUID that indicates the format of the data passed into RawData.
@param ProducerName A GUID that indicates the identity of the caller to this API.
@param DataRecordClass This class indicates the generic type of the data record.
@param RawData The DataRecordGuid-defined data to be logged.
@param RawDataSize The size in bytes of RawData.
@retval EFI_SUCCESS Data was logged.
@retval EFI_OUT_OF_RESOURCES Data was not logged due to lack of system resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DATA_HUB_LOG_DATA) (
IN EFI_DATA_HUB_PROTOCOL *This,
IN EFI_GUID *DataRecordGuid,
IN EFI_GUID *ProducerName,
IN UINT64 DataRecordClass,
IN VOID *RawData,
IN UINT32 RawDataSize
);
/**
Allows the system data log to be searched.
@param This The EFI_DATA_HUB_PROTOCOL instance.
@param MonotonicCount On input, it specifies the Record to return.
An input of zero means to return the first record.
@param FilterDriver If FilterDriver is not passed in a MonotonicCount of zero,
it means to return the first data record. If FilterDriver is passed in,
then a MonotonicCount of zero means to return the first data not yet read
by FilterDriver.
@param Record Returns a dynamically allocated memory buffer with a data
record that matches MonotonicCount.
@retval EFI_SUCCESS Data was returned in Record.
@retval EFI_INVALID_PARAMETER FilterDriver was passed in but does not exist.
@retval EFI_NOT_FOUND MonotonicCount does not match any data record
in the system. If a MonotonicCount of zero was passed in, then no
data records exist in the system.
@retval EFI_OUT_OF_RESOURCES Record was not returned due to lack
of system resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DATA_HUB_GET_NEXT_RECORD) (
IN EFI_DATA_HUB_PROTOCOL *This,
IN OUT UINT64 *MonotonicCount,
IN EFI_EVENT *FilterDriver OPTIONAL,
OUT EFI_DATA_RECORD_HEADER **Record
);
/**
Registers an event to be signaled every time a data record is logged in the system.
@param This The EFI_DATA_HUB_PROTOCOL instance.
@param FilterEvent The EFI_EVENT to signal whenever data that matches
FilterClass is logged in the system.
@param FilterTpl The maximum EFI_TPL at which FilterEvent can be signaled.
It is strongly recommended that you use the lowest EFI_TPL possible.
@param FilterClass FilterEvent will be signaled whenever a bit
in EFI_DATA_RECORD_HEADER.DataRecordClass is also set in FilterClass.
If FilterClass is zero, no class-based filtering will be performed.
@param FilterDataRecordGuid FilterEvent will be signaled whenever
FilterDataRecordGuid matches EFI_DATA_RECORD_HEADER.DataRecordGuid.
If FilterDataRecordGuid is NULL, then no GUID-based filtering will be performed.
@retval EFI_SUCCESS The filter driver event was registered
@retval EFI_ALREADY_STARTED FilterEvent was previously registered and cannot be registered again.
@retval EFI_OUT_OF_RESOURCES The filter driver event was not registered
due to lack of system resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DATA_HUB_REGISTER_FILTER_DRIVER) (
IN EFI_DATA_HUB_PROTOCOL *This,
IN EFI_EVENT FilterEvent,
IN EFI_TPL FilterTpl,
IN UINT64 FilterClass,
IN EFI_GUID *FilterDataRecordGuid OPTIONAL
);
/**
Stops a filter driver from being notified when data records are logged.
@param This The EFI_DATA_HUB_PROTOCOL instance.
@param FilterEvent The EFI_EVENT to remove from the list of events to be
signaled every time errors are logged.
@retval EFI_SUCCESS The filter driver represented by FilterEvent was shut off.
@retval EFI_NOT_FOUND FilterEvent did not exist.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER) (
IN EFI_DATA_HUB_PROTOCOL *This,
IN EFI_EVENT FilterEvent
);
/**
@par Protocol Description:
This protocol is used to log information and register filter drivers
to receive data records.
@param LogData
Logs a data record.
@param GetNextDataRecord
Gets a data record. Used both to view the memory-based log and to
get information about which data records have been consumed by a filter driver.
@param RegisterFilterDriver
Allows the registration of an EFI event to act as a filter driver for all data records that are logged.
@param UnregisterFilterDriver
Used to remove a filter driver that was added with RegisterFilterDriver().
**/
struct _EFI_DATA_HUB_PROTOCOL {
EFI_DATA_HUB_LOG_DATA LogData;
EFI_DATA_HUB_GET_NEXT_RECORD GetNextRecord;
EFI_DATA_HUB_REGISTER_FILTER_DRIVER RegisterFilterDriver;
EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER UnregisterFilterDriver;
};
extern EFI_GUID gEfiDataHubProtocolGuid;
#endif

View File

@ -1,141 +0,0 @@
/** @file
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DebugPort.h
**/
#ifndef __DEBUG_PORT_H__
#define __DEBUG_PORT_H__
//
// DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
//
#define EFI_DEBUGPORT_PROTOCOL_GUID \
{ \
0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
}
extern EFI_GUID gEfiDebugPortProtocolGuid;
typedef struct _EFI_DEBUGPORT_PROTOCOL EFI_DEBUGPORT_PROTOCOL;
//
// DebugPort member functions
//
/**
Resets the debugport.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@retval EFI_SUCCESS The debugport device was reset and is in usable state.
@retval EFI_DEVICE_ERROR The debugport device could not be reset and is unusable.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DEBUGPORT_RESET) (
IN EFI_DEBUGPORT_PROTOCOL *This
);
/**
Writes data to the debugport.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@param Timeout The number of microseconds to wait before timing out a write operation.
@param BufferSize On input, the requested number of bytes of data to write. On output, the
number of bytes of data actually written.
@param Buffer A pointer to a buffer containing the data to write.
@retval EFI_SUCCESS The data was written.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DEBUGPORT_WRITE) (
IN EFI_DEBUGPORT_PROTOCOL *This,
IN UINT32 Timeout,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
);
/**
Reads data from the debugport.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@param Timeout The number of microseconds to wait before timing out a read operation.
@param BufferSize On input, the requested number of bytes of data to read. On output, the
number of bytes of data actually number of bytes
of data read and returned in Buffer.
@param Buffer A pointer to a buffer into which the data read will be saved.
@retval EFI_SUCCESS The data was read.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_TIMEOUT The operation was stopped due to a timeout or overrun.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DEBUGPORT_READ) (
IN EFI_DEBUGPORT_PROTOCOL *This,
IN UINT32 Timeout,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
/**
Checks to see if any data is available to be read from the debugport device.
@param This A pointer to the EFI_DEBUGPORT_PROTOCOL instance.
@retval EFI_SUCCESS At least one byte of data is available to be read.
@retval EFI_DEVICE_ERROR The debugport device is not functioning correctly.
@retval EFI_NOT_READY No data is available to be read.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DEBUGPORT_POLL) (
IN EFI_DEBUGPORT_PROTOCOL *This
);
//
// DebugPort protocol definition
//
struct _EFI_DEBUGPORT_PROTOCOL {
EFI_DEBUGPORT_RESET Reset;
EFI_DEBUGPORT_WRITE Write;
EFI_DEBUGPORT_READ Read;
EFI_DEBUGPORT_POLL Poll;
};
//
// DEBUGPORT variable definitions...
//
#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
#define gEfiDebugPortVariableGuid gEfiDebugPortProtocolGuid
//
// DebugPort device path definitions...
//
#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
#define gEfiDebugPortDevicePathGuid gEfiDebugPortProtocolGuid
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
EFI_GUID Guid;
} DEBUGPORT_DEVICE_PATH;
#endif

View File

@ -1,517 +0,0 @@
/** @file
DebugSupport protocol and supporting definitions as defined in the EFI 1.1
specification.
The DebugSupport protocol is used by source level debuggers to abstract the
processor and handle context save and restore operations.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DebugSupport.h
**/
#ifndef __DEBUG_SUPPORT_H__
#define __DEBUG_SUPPORT_H__
typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
//
// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
//
#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
{ \
0x2755590C, 0x6F3C, 0x42FA, {0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \
}
//
// Debug Support definitions
//
typedef INTN EFI_EXCEPTION_TYPE;
//
// IA-32 processor exception types
//
#define EXCEPT_IA32_DIVIDE_ERROR 0
#define EXCEPT_IA32_DEBUG 1
#define EXCEPT_IA32_NMI 2
#define EXCEPT_IA32_BREAKPOINT 3
#define EXCEPT_IA32_OVERFLOW 4
#define EXCEPT_IA32_BOUND 5
#define EXCEPT_IA32_INVALID_OPCODE 6
#define EXCEPT_IA32_DOUBLE_FAULT 8
#define EXCEPT_IA32_INVALID_TSS 10
#define EXCEPT_IA32_SEG_NOT_PRESENT 11
#define EXCEPT_IA32_STACK_FAULT 12
#define EXCEPT_IA32_GP_FAULT 13
#define EXCEPT_IA32_PAGE_FAULT 14
#define EXCEPT_IA32_FP_ERROR 16
#define EXCEPT_IA32_ALIGNMENT_CHECK 17
#define EXCEPT_IA32_MACHINE_CHECK 18
#define EXCEPT_IA32_SIMD 19
//
// IA-32 processor context definition
//
//
// FXSAVE_STATE
// FP / MMX / XMM registers (see fxrstor instruction definition)
//
typedef struct {
UINT16 Fcw;
UINT16 Fsw;
UINT16 Ftw;
UINT16 Opcode;
UINT32 Eip;
UINT16 Cs;
UINT16 Reserved1;
UINT32 DataOffset;
UINT16 Ds;
UINT8 Reserved2[10];
UINT8 St0Mm0[10], Reserved3[6];
UINT8 St0Mm1[10], Reserved4[6];
UINT8 St0Mm2[10], Reserved5[6];
UINT8 St0Mm3[10], Reserved6[6];
UINT8 St0Mm4[10], Reserved7[6];
UINT8 St0Mm5[10], Reserved8[6];
UINT8 St0Mm6[10], Reserved9[6];
UINT8 St0Mm7[10], Reserved10[6];
UINT8 Reserved11[22 * 16];
} EFI_FX_SAVE_STATE_IA32;
typedef struct {
UINT32 ExceptionData;
EFI_FX_SAVE_STATE_IA32 FxSaveState;
UINT32 Dr0;
UINT32 Dr1;
UINT32 Dr2;
UINT32 Dr3;
UINT32 Dr6;
UINT32 Dr7;
UINT32 Cr0;
UINT32 Cr1;
UINT32 Cr2;
UINT32 Cr3;
UINT32 Cr4;
UINT32 Eflags;
UINT32 Ldtr;
UINT32 Tr;
UINT32 Gdtr[2];
UINT32 Idtr[2];
UINT32 Eip;
UINT32 Gs;
UINT32 Fs;
UINT32 Es;
UINT32 Ds;
UINT32 Cs;
UINT32 Ss;
UINT32 Edi;
UINT32 Esi;
UINT32 Ebp;
UINT32 Esp;
UINT32 Ebx;
UINT32 Edx;
UINT32 Ecx;
UINT32 Eax;
} EFI_SYSTEM_CONTEXT_IA32;
//
// IPF processor exception types
//
#define EXCEPT_IPF_VHTP_TRANSLATION 0
#define EXCEPT_IPF_INSTRUCTION_TLB 1
#define EXCEPT_IPF_DATA_TLB 2
#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3
#define EXCEPT_IPF_ALT_DATA_TLB 4
#define EXCEPT_IPF_DATA_NESTED_TLB 5
#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6
#define EXCEPT_IPF_DATA_KEY_MISSED 7
#define EXCEPT_IPF_DIRTY_BIT 8
#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9
#define EXCEPT_IPF_DATA_ACCESS_BIT 10
#define EXCEPT_IPF_BREAKPOINT 11
#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12
//
// 13 - 19 reserved
//
#define EXCEPT_IPF_PAGE_NOT_PRESENT 20
#define EXCEPT_IPF_KEY_PERMISSION 21
#define EXCEPT_IPF_INSTRUCTION_ACCESS_RIGHTS 22
#define EXCEPT_IPF_DATA_ACCESS_RIGHTS 23
#define EXCEPT_IPF_GENERAL_EXCEPTION 24
#define EXCEPT_IPF_DISABLED_FP_REGISTER 25
#define EXCEPT_IPF_NAT_CONSUMPTION 26
#define EXCEPT_IPF_SPECULATION 27
//
// 28 reserved
//
#define EXCEPT_IPF_DEBUG 29
#define EXCEPT_IPF_UNALIGNED_REFERENCE 30
#define EXCEPT_IPF_UNSUPPORTED_DATA_REFERENCE 31
#define EXCEPT_IPF_FP_FAULT 32
#define EXCEPT_IPF_FP_TRAP 33
#define EXCEPT_IPF_LOWER_PRIVILEGE_TRANSFER_TRAP 34
#define EXCEPT_IPF_TAKEN_BRANCH 35
#define EXCEPT_IPF_SINGLE_STEP 36
//
// 37 - 44 reserved
//
#define EXCEPT_IPF_IA32_EXCEPTION 45
#define EXCEPT_IPF_IA32_INTERCEPT 46
#define EXCEPT_IPF_IA32_INTERRUPT 47
//
// IPF processor context definition
//
typedef struct {
//
// The first reserved field is necessary to preserve alignment for the correct
// bits in UNAT and to insure F2 is 16 byte aligned..
//
UINT64 Reserved;
UINT64 R1;
UINT64 R2;
UINT64 R3;
UINT64 R4;
UINT64 R5;
UINT64 R6;
UINT64 R7;
UINT64 R8;
UINT64 R9;
UINT64 R10;
UINT64 R11;
UINT64 R12;
UINT64 R13;
UINT64 R14;
UINT64 R15;
UINT64 R16;
UINT64 R17;
UINT64 R18;
UINT64 R19;
UINT64 R20;
UINT64 R21;
UINT64 R22;
UINT64 R23;
UINT64 R24;
UINT64 R25;
UINT64 R26;
UINT64 R27;
UINT64 R28;
UINT64 R29;
UINT64 R30;
UINT64 R31;
UINT64 F2[2];
UINT64 F3[2];
UINT64 F4[2];
UINT64 F5[2];
UINT64 F6[2];
UINT64 F7[2];
UINT64 F8[2];
UINT64 F9[2];
UINT64 F10[2];
UINT64 F11[2];
UINT64 F12[2];
UINT64 F13[2];
UINT64 F14[2];
UINT64 F15[2];
UINT64 F16[2];
UINT64 F17[2];
UINT64 F18[2];
UINT64 F19[2];
UINT64 F20[2];
UINT64 F21[2];
UINT64 F22[2];
UINT64 F23[2];
UINT64 F24[2];
UINT64 F25[2];
UINT64 F26[2];
UINT64 F27[2];
UINT64 F28[2];
UINT64 F29[2];
UINT64 F30[2];
UINT64 F31[2];
UINT64 Pr;
UINT64 B0;
UINT64 B1;
UINT64 B2;
UINT64 B3;
UINT64 B4;
UINT64 B5;
UINT64 B6;
UINT64 B7;
//
// application registers
//
UINT64 ArRsc;
UINT64 ArBsp;
UINT64 ArBspstore;
UINT64 ArRnat;
UINT64 ArFcr;
UINT64 ArEflag;
UINT64 ArCsd;
UINT64 ArSsd;
UINT64 ArCflg;
UINT64 ArFsr;
UINT64 ArFir;
UINT64 ArFdr;
UINT64 ArCcv;
UINT64 ArUnat;
UINT64 ArFpsr;
UINT64 ArPfs;
UINT64 ArLc;
UINT64 ArEc;
//
// control registers
//
UINT64 CrDcr;
UINT64 CrItm;
UINT64 CrIva;
UINT64 CrPta;
UINT64 CrIpsr;
UINT64 CrIsr;
UINT64 CrIip;
UINT64 CrIfa;
UINT64 CrItir;
UINT64 CrIipa;
UINT64 CrIfs;
UINT64 CrIim;
UINT64 CrIha;
//
// debug registers
//
UINT64 Dbr0;
UINT64 Dbr1;
UINT64 Dbr2;
UINT64 Dbr3;
UINT64 Dbr4;
UINT64 Dbr5;
UINT64 Dbr6;
UINT64 Dbr7;
UINT64 Ibr0;
UINT64 Ibr1;
UINT64 Ibr2;
UINT64 Ibr3;
UINT64 Ibr4;
UINT64 Ibr5;
UINT64 Ibr6;
UINT64 Ibr7;
//
// virtual registers - nat bits for R1-R31
//
UINT64 IntNat;
} EFI_SYSTEM_CONTEXT_IPF;
//
// EBC processor exception types
//
#define EXCEPT_EBC_UNDEFINED 0
#define EXCEPT_EBC_DIVIDE_ERROR 1
#define EXCEPT_EBC_DEBUG 2
#define EXCEPT_EBC_BREAKPOINT 3
#define EXCEPT_EBC_OVERFLOW 4
#define EXCEPT_EBC_INVALID_OPCODE 5 // opcode out of range
#define EXCEPT_EBC_STACK_FAULT 6
#define EXCEPT_EBC_ALIGNMENT_CHECK 7
#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 // malformed instruction
#define EXCEPT_EBC_BAD_BREAK 9 // BREAK 0 or undefined BREAK
#define EXCEPT_EBC_STEP 10 // to support debug stepping
//
// For coding convenience, define the maximum valid EBC exception.
//
#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP
//
// EBC processor context definition
//
typedef struct {
UINT64 R0;
UINT64 R1;
UINT64 R2;
UINT64 R3;
UINT64 R4;
UINT64 R5;
UINT64 R6;
UINT64 R7;
UINT64 Flags;
UINT64 ControlFlags;
UINT64 Ip;
} EFI_SYSTEM_CONTEXT_EBC;
//
// Universal EFI_SYSTEM_CONTEXT definition
//
typedef union {
EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc;
EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;
EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;
} EFI_SYSTEM_CONTEXT;
//
// DebugSupport callback function prototypes
//
/**
Registers and enables an exception callback function for the specified exception.
@param ExceptionType Exception types in EBC, IA-32, X64, or IPF
@param SystemContext Exception content.
**/
typedef
VOID
(*EFI_EXCEPTION_CALLBACK) (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
/**
Registers and enables the on-target debug agent<6E><74>s periodic entry point.
@param SystemContext Exception content.
**/
typedef
VOID
(*EFI_PERIODIC_CALLBACK) (
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
//
// Machine type definition
//
typedef enum {
IsaIa32 = IMAGE_FILE_MACHINE_I386, // 0x014C
IsaX64 = IMAGE_FILE_MACHINE_X64, // 0x8664
IsaIpf = IMAGE_FILE_MACHINE_IA64, // 0x0200
IsaEbc = IMAGE_FILE_MACHINE_EBC // 0x0EBC
} EFI_INSTRUCTION_SET_ARCHITECTURE;
//
// DebugSupport member function definitions
//
/**
Returns the maximum value that may be used for the ProcessorIndex parameter in
RegisterPeriodicCallback() and RegisterExceptionCallback().
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
@param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported
processor index is returned.
@retval EFI_SUCCESS The function completed successfully.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_MAXIMUM_PROCESSOR_INDEX) (
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
OUT UINTN *MaxProcessorIndex
);
/**
Registers a function to be called back periodically in interrupt context.
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
@param ProcessorIndex Specifies which processor the callback function applies to.
@param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main
periodic entry point of the debug agent.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
function was previously registered.
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
function.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_REGISTER_PERIODIC_CALLBACK) (
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
IN UINTN ProcessorIndex,
IN EFI_PERIODIC_CALLBACK PeriodicCallback
);
/**
Registers a function to be called when a given processor exception occurs.
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
@param ProcessorIndex Specifies which processor the callback function applies to.
@param PeriodicCallback A pointer to a function of type EXCEPTION_CALLBACK that is called
when the processor exception specified by ExceptionType occurs.
@param ExceptionType Specifies which processor exception to hook.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback
function was previously registered.
@retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback
function.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_REGISTER_EXCEPTION_CALLBACK) (
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
IN UINTN ProcessorIndex,
IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
IN EFI_EXCEPTION_TYPE ExceptionType
);
/**
Invalidates processor instruction cache for a memory range. Subsequent execution in this range
causes a fresh memory fetch to retrieve code to be executed.
@param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance.
@param ProcessorIndex Specifies which processor<6F><72>s instruction cache is to be invalidated.
@param Start Specifies the physical base of the memory range to be invalidated.
@param Length Specifies the minimum number of bytes in the processor<6F><72>s instruction
cache to invalidate.
@retval EFI_SUCCESS The function completed successfully.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_INVALIDATE_INSTRUCTION_CACHE) (
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
IN UINTN ProcessorIndex,
IN VOID *Start,
IN UINT64 Length
);
//
// DebugSupport protocol definition
//
struct _EFI_DEBUG_SUPPORT_PROTOCOL {
EFI_INSTRUCTION_SET_ARCHITECTURE Isa;
EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex;
EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback;
EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback;
EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache;
};
extern EFI_GUID gEfiDebugSupportProtocolGuid;
#endif

View File

@ -1,121 +0,0 @@
/** @file
The Decompress Protocol Interface
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Decompress.h
**/
#ifndef __DECOMPRESS_H__
#define __DECOMPRESS_H__
#define EFI_DECOMPRESS_PROTOCOL_GUID \
{ \
0xd8117cfe, 0x94a6, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
typedef struct _EFI_DECOMPRESS_PROTOCOL EFI_DECOMPRESS_PROTOCOL;
/**
The GetInfo() function retrieves the size of the uncompressed buffer
and the temporary scratch buffer required to decompress the buffer
specified by Source and SourceSize. If the size of the uncompressed
buffer or the size of the scratch buffer cannot be determined from
the compressed data specified by Source and SourceData, then
EFI_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
buffer is returned in DestinationSize, the size of the scratch buffer is
returned in ScratchSize, and EFI_SUCCESS is returned.
The GetInfo() function does not have scratch buffer available to perform
a thorough checking of the validity of the source data. It just retrieves
the 'Original Size' field from the beginning bytes of the source data and
output it as DestinationSize. And ScratchSize is specific to the decompression
implementation.
@param This The protocol instance pointer
@param Source The source buffer containing the compressed data.
@param SourceSize The size, in bytes, of source buffer.
@param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified by
Source and SourceSize.
@retval EFI_SUCCESS The size of the uncompressed data was returned in DestinationSize
and the size of the scratch buffer was returned in ScratchSize.
@retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of the scratch
buffer cannot be determined from the compressed data specified by
Source and SourceData.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DECOMPRESS_GET_INFO) (
IN EFI_DECOMPRESS_PROTOCOL *This,
IN VOID *Source,
IN UINT32 SourceSize,
OUT UINT32 *DestinationSize,
OUT UINT32 *ScratchSize
);
/**
The Decompress() function extracts decompressed data to its original form.
This protocol is designed so that the decompression algorithm can be
implemented without using any memory services. As a result, the
Decompress() function is not allowed to call AllocatePool() or
AllocatePages() in its implementation. It is the caller's responsibility
to allocate and free the Destination and Scratch buffers.
If the compressed source data specified by Source and SourceSize is
sucessfully decompressed into Destination, then EFI_SUCCESS is returned.
If the compressed source data specified by Source and SourceSize is not in
a valid compressed data format, then EFI_INVALID_PARAMETER is returned.
@param This The protocol instance pointer
@param Source The source buffer containing the compressed data.
@param SourceSize The size of source data.
@param Destination On output, the destination buffer that contains
the uncompressed data.
@param DestinationSize The size of destination buffer. The size of destination
buffer needed is obtained from GetInfo().
@param Scratch A temporary scratch buffer that is used to perform the
decompression.
@param ScratchSize The size of scratch buffer. The size of scratch buffer needed
is obtained from GetInfo().
@retval EFI_SUCCESS Decompression completed successfully, and the uncompressed
buffer is returned in Destination.
@retval EFI_INVALID_PARAMETER The source buffer specified by Source and SourceSize is
corrupted (not in a valid compressed format).
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DECOMPRESS_DECOMPRESS) (
IN EFI_DECOMPRESS_PROTOCOL *This,
IN VOID *Source,
IN UINT32 SourceSize,
IN OUT VOID *Destination,
IN UINT32 DestinationSize,
IN OUT VOID *Scratch,
IN UINT32 ScratchSize
);
struct _EFI_DECOMPRESS_PROTOCOL {
EFI_DECOMPRESS_GET_INFO GetInfo;
EFI_DECOMPRESS_DECOMPRESS Decompress;
};
extern EFI_GUID gEfiDecompressProtocolGuid;
#endif

View File

@ -1,73 +0,0 @@
/** @file
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.
This protocol provides service to convert text to device paths and device nodes.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DevicePathFromText.h
**/
#ifndef __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__
#define __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__
//
// Device Path From Text protocol
//
#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
{ \
0x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } \
}
/**
Convert text to the binary representation of a device node.
@param TextDeviceNode TextDeviceNode points to the text representation of a device
node. Conversion starts with the first character and continues
until the first non-device node character.
@retval a_pointer Pointer to the EFI device node.
@retval NULL if TextDeviceNode is NULL or there was insufficient memory.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
IN CONST CHAR16 *TextDeviceNode
)
;
/**
Convert text to the binary representation of a device node.
@param TextDeviceNode TextDevicePath points to the text representation of a device
path. Conversion starts with the first character and continues
until the first non-device path character.
@retval a_pointer Pointer to the allocated device path.
@retval NULL if TextDeviceNode is NULL or there was insufficient memory.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
IN CONST CHAR16 *TextDevicePath
)
;
typedef struct {
EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertDeviceNodeFromText;
EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertDevicePathFromText;
} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
#endif

View File

@ -1,86 +0,0 @@
/** @file
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, Intel Corporation
All rights reserved. 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.
Module Name: DevicePathToText.h
**/
#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
//
// Device Path To Text protocol
//
#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
{ \
0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
}
/**
Convert a device node to its text representation.
@param DeviceNode Points to the device node to be converted.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
representation for a device node can be used, where applicable.
@retval a_pointer a pointer to the allocated text representation of the device node data
@retval NULL if DeviceNode is NULL or there was insufficient memory.
**/
typedef
CHAR16*
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
)
;
/**
Convert a device path to its text representation.
@param DevicePath Points to the device path to be converted.
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
of the display node is used, where applicable. If DisplayOnly
is FALSE, then the longer text representation of the display node
is used.
@param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
text representation for a device node cannot be used.
@retval a_pointer a pointer to the allocated text representation of the device node.
@retval NULL if DevicePath is NULL or there was insufficient memory.
**/
typedef
CHAR16*
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
)
;
typedef struct {
EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
#endif

View File

@ -1,194 +0,0 @@
/** @file
EFI_DEVICE_PATH_UTILITIES_PROTOCOL as defined in UEFI 2.0.
Use to create and manipulate device paths and device nodes.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DevicePathUtilities.h
**/
#ifndef __DEVICE_PATH_UTILITIES_PROTOCOL_H__
#define __DEVICE_PATH_UTILITIES_PROTOCOL_H__
//
// Device Path Utilities protocol
//
#define EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID \
{ \
0x379be4e, 0xd706, 0x437d, {0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 } \
}
/**
Returns the size of the device path, in bytes.
@param DevicePath Points to the start of the EFI device path.
@revtal Size Size of the specified device path, in bytes, including the end-of-path tag.
**/
typedef
UINTN
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
;
/**
Create a duplicate of the specified path.
@param DevicePath Points to the source EFI device path.
@retval Pointer A pointer to the duplicate device path.
@retval NULL insufficient memory
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
;
/**
Create a new path by appending the second device path to the first.
@param Src1 Points to the first device path. If NULL, then it is ignored.
@param Src2 Points to the second device path. If NULL, then it is ignored.
@retval Pointer A pointer to the newly created device path.
@retval NULL Memory could not be allocated
or either DevicePath or DeviceNode is NULL.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
)
;
/**
Creates a new path by appending the device node to the device path.
@param DevicePath Points to the device path.
@param DeviceNode Points to the device node.
@retval Pointer A pointer to the allocated device node.
@retval NULL Memory could not be allocated
or either DevicePath or DeviceNode is NULL.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_NODE) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
)
;
/**
Creates a new path by appending the specified device path instance to the specified device path.
@param DevicePath Points to the device path. If NULL, then ignored.
@param DevicePathInstance Points to the device path instance.
@retval Pointer A pointer to the newly created device path
@retval NULL Memory could not be allocated or DevicePathInstance is NULL.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
)
;
/**
Creates a copy of the current device path instance and returns a pointer to the next device path
instance.
@param DevicePathInstance On input, this holds the pointer to the current device path
instance. On output, this holds the pointer to the next
device path instance or NULL if there are no more device
path instances in the device path.
@param DevicePathInstanceSize On output, this holds the size of the device path instance,
in bytes or zero, if DevicePathInstance is zero.
@retval Pointer A pointer to the copy of the current device path instance.
@retval NULL DevicePathInstace was NULL on entry or there was insufficient memory.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE) (
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
OUT UINTN *DevicePathInstanceSize
)
;
/**
Creates a device node
@param NodeType NodeType is the device node type (EFI_DEVICE_PATH.Type) for
the new device node.
@param NodeSubType NodeSubType is the device node sub-type
EFI_DEVICE_PATH.SubType) for the new device node.
@param NodeLength NodeLength is the length of the device node
(EFI_DEVICE_PATH.Length) for the new device node.
@retval Pointer A pointer to the newly created device node.
@retval NULL NodeLength is less than
the size of the header or there was insufficient memory.
**/
typedef
EFI_DEVICE_PATH_PROTOCOL*
(EFIAPI *EFI_DEVICE_PATH_CREATE_NODE) (
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
)
;
/**
Returns whether a device path is multi-instance.
@param DevicePath Points to the device path. If NULL, then ignored.
@retval TRUE The device path has more than one instance
@retval FALSE The device path is empty or contains only a single instance.
**/
typedef
BOOLEAN
(EFIAPI *EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE) (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
;
typedef struct {
EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
EFI_DEVICE_PATH_CREATE_NODE CreateDeviceNode;
} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
#endif

View File

@ -1,442 +0,0 @@
/** @file
EFI_DHCP4_PROTOCOL as defined in UEFI 2.0.
EFI_DHCP4_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
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, Intel Corporation
All rights reserved. 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.
Module Name: DHCP4.h
**/
#ifndef __EFI_DHCP4_PROTOCOL_H__
#define __EFI_DHCP4_PROTOCOL_H__
#define EFI_DHCP4_PROTOCOL_GUID \
{ \
0x8a219718, 0x4ef5, 0x4761, {0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56 } \
}
#define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
{ \
0x9d9a39d8, 0xbd42, 0x4a73, {0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } \
}
typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL;
#pragma pack(1)
typedef struct {
UINT8 OpCode;
UINT8 Length;
UINT8 Data[1];
} EFI_DHCP4_PACKET_OPTION;
#pragma pack()
#pragma pack(1)
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;
#pragma pack()
#pragma pack(1)
typedef struct {
UINT32 Size;
UINT32 Length;
struct {
EFI_DHCP4_HEADER Header;
UINT32 Magik;
UINT8 Option[1];
} Dhcp4;
} EFI_DHCP4_PACKET;
#pragma pack()
typedef enum {
Dhcp4Stopped = 0x0,
Dhcp4Init = 0x1,
Dhcp4Selecting = 0x2,
Dhcp4Requesting = 0x3,
Dhcp4Bound = 0x4,
Dhcp4Renewing = 0x5,
Dhcp4Rebinding = 0x6,
Dhcp4InitReboot = 0x7,
Dhcp4Rebooting = 0x8
} EFI_DHCP4_STATE;
typedef enum{
Dhcp4SendDiscover = 0x01,
Dhcp4RcvdOffer = 0x02,
Dhcp4SelectOffer = 0x03,
Dhcp4SendRequest = 0x04,
Dhcp4RcvdAck = 0x05,
Dhcp4RcvdNak = 0x06,
Dhcp4SendDecline = 0x07,
Dhcp4BoundCompleted = 0x08,
Dhcp4EnterRenewing = 0x09,
Dhcp4EnterRebinding = 0x0a,
Dhcp4AddressLost = 0x0b,
Dhcp4Fail = 0x0c
} EFI_DHCP4_EVENT;
/**
Callback routine
@param This Pointer to the EFI DHCPv4 Protocol instance that is used to
configure this callback function.
@param Context Pointer to the context that is initialized by
EFI_DHCP4_PROTOCOL.Configure().
@param CurrentState The current operational state of the EFI DHCPv4 Protocol
driver.
@param Dhcp4Event The event that occurs in the current state, which usually means a
state transition.
@param Packet The DHCP packet that is going to be sent or already received.
@param NewPacket The packet that is used to replace the above Packet.
@retval EFI_SUCCESS Tells the EFI DHCPv4 Protocol driver to continue the DHCP process.
@retval EFI_NOT_READY Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol
driver will continue to wait for more DHCPOFFER packets until the retry
timeout expires.
@retval EFI_ABORTED Tells the EFI DHCPv4 Protocol driver to abort the current process and
return to the Dhcp4Init or Dhcp4InitReboot state.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_CALLBACK) (
IN EFI_DHCP4_PROTOCOL *This,
IN VOID *Context,
IN EFI_DHCP4_STATE CurrentState,
IN EFI_DHCP4_EVENT Dhcp4Event,
IN EFI_DHCP4_PACKET *Packet OPTIONAL,
OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
);
typedef struct {
UINT32 DiscoverTryCount;
UINT32 *DiscoverTimeout;
UINT32 RequestTryCount;
UINT32 *RequestTimeout;
EFI_IPv4_ADDRESS ClientAddress;
EFI_DHCP4_CALLBACK Dhcp4Callback;
void *CallbackContext;
UINT32 OptionCount;
EFI_DHCP4_PACKET_OPTION **OptionList;
} EFI_DHCP4_CONFIG_DATA;
typedef struct {
EFI_DHCP4_STATE State;
EFI_DHCP4_CONFIG_DATA ConfigData;
EFI_IPv4_ADDRESS ClientAddress;
EFI_MAC_ADDRESS ClientMacAddress;
EFI_IPv4_ADDRESS ServerAddress;
EFI_IPv4_ADDRESS RouterAddress;
EFI_IPv4_ADDRESS SubnetMask;
UINT32 LeaseTime;
EFI_DHCP4_PACKET *ReplyPacket;
} EFI_DHCP4_MODE_DATA;
typedef struct {
EFI_IPv4_ADDRESS ListenAddress;
EFI_IPv4_ADDRESS SubnetMask;
UINT16 ListenPort;
} EFI_DHCP4_LISTEN_POINT;
typedef struct {
OUT EFI_STATUS Status;
IN EFI_EVENT CompletionEvent;
IN EFI_IPv4_ADDRESS RemoteAddress;
IN UINT16 RemotePort;
IN EFI_IPv4_ADDRESS GatewayAddress;
IN UINT32 ListenPointCount;
IN EFI_DHCP4_LISTEN_POINT *ListenPoints;
IN UINT32 TimeoutValue;
IN EFI_DHCP4_PACKET *Packet;
OUT UINT32 ResponseCount;
OUT EFI_DHCP4_PACKET *ResponseList;
} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
/**
Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.
@retval EFI_SUCCESS The mode data was returned.
@retval EFI_INVALID_PARAMETER This is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_GET_MODE_DATA)(
IN EFI_DHCP4_PROTOCOL *This,
OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData
)
;
/**
Initializes, changes, or resets the operational settings for the EFI DHCPv4 Protocol driver.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or
Dhcp4InitReboot state, if the original state of this driver
was Dhcp4Stopped and the value of Dhcp4CfgData was
not NULL. Otherwise, the state was left unchanged.
@retval EFI_ACCESS_DENIED This instance of the EFI DHCPv4 Protocol driver was not in the
Dhcp4Stopped, Dhcp4Init, Dhcp4InitReboot, or Dhcp4Bound state;
Or onother instance of this EFI DHCPv4 Protocol driver is already
in a valid configured state.
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_CONFIGURE) (
IN EFI_DHCP4_PROTOCOL *This,
IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL
)
;
/**
Starts the DHCP configuration process.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param CompletionEvent If not NULL, indicates the event that will be signaled when the
EFI DHCPv4 Protocol driver is transferred into the
Dhcp4Bound state or when the DHCP process is aborted.
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
check the completion status. If NULL,
EFI_DHCP4_PROTOCOL.Start() will wait until the driver
is transferred into the Dhcp4Bound state or the process fails.
@retval EFI_SUCCESS The DHCP configuration process has started, or it has completed
when CompletionEvent is NULL.
@retval EFI_NOT_STARTED The EFI DHCPv4 Protocol driver is in the Dhcp4Stopped
state. EFI_DHCP4_PROTOCOL. Configure() needs to be called.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_TIMEOUT The DHCP configuration process failed because no response was
received from the server within the specified timeout value.
@retval EFI_ABORTED The user aborted the DHCP process.
@retval EFI_ALREADY_STARTED Some other EFI DHCPv4 Protocol instance already started the
DHCP process.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_START) (
IN EFI_DHCP4_PROTOCOL *This,
IN EFI_EVENT CompletionEvent OPTIONAL
)
;
/**
Extends the lease time by sending a request packet.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param RebindRequest If TRUE, this function broadcasts the request packets and enters
the Dhcp4Rebinding state. Otherwise, it sends a unicast
request packet and enters the Dhcp4Renewing state.
@param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase
completes or some error occurs.
EFI_DHCP4_PROTOCOL.GetModeData() can be called to
check the completion status. If NULL,
EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait
until the DHCP process finishes.
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the
Dhcp4Renewing state or is back to the Dhcp4Bound state.
@retval EFI_NOT_STARTED The EFI DHCPv4 Protocol driver is in the Dhcp4Stopped
state. EFI_DHCP4_PROTOCOL.Configure() needs to
be called.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_TIMEOUT There was no response from the server when the try count was
exceeded.
@retval EFI_ACCESS_DENIED The driver is not in the Dhcp4Bound state.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_RENEW_REBIND) (
IN EFI_DHCP4_PROTOCOL *This,
IN BOOLEAN RebindRequest,
IN EFI_EVENT CompletionEvent OPTIONAL
)
;
/**
Releases the current address configuration.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_ACCESS_DENIED The EFI DHCPv4 Protocol driver is not Dhcp4InitReboot state.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_RELEASE) (
IN EFI_DHCP4_PROTOCOL *This
)
;
/**
Stops the current address configuration.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.
@retval EFI_INVALID_PARAMETER This is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_STOP) (
IN EFI_DHCP4_PROTOCOL *This
)
;
/**
Builds a DHCP packet, given the options to be appended or deleted or replaced.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param SeedPacket Initial packet to be used as a base for building new packet.
@param DeleteCount Number of opcodes in the DeleteList.
@param DeleteList List of opcodes to be deleted from the seed packet.
Ignored if DeleteCount is zero.
@param AppendCount Number of entries in the OptionList.
@param AppendList Pointer to a DHCP option list to be appended to SeedPacket.
If SeedPacket also contains options in this list, they are
replaced by new options (except pad option). Ignored if
AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION
@param NewPacket Pointer to storage for the pointer to the new allocated packet.
Use the EFI Boot Service FreePool() on the resulting pointer
when done with the packet.
@retval EFI_SUCCESS The new packet was built.
@retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated.
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_BUILD) (
IN EFI_DHCP4_PROTOCOL *This,
IN EFI_DHCP4_PACKET *SeedPacket,
IN UINT32 DeleteCount,
IN UINT8 *DeleteList OPTIONAL,
IN UINT32 AppendCount,
IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
OUT EFI_DHCP4_PACKET **NewPacket
);
;
/**
Transmits a DHCP formatted packet and optionally waits for responses.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.
@retval EFI_SUCCESS The packet was successfully queued for transmission.
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
@retval EFI_NOT_READY The previous call to this function has not finished yet. Try to call
this function after collection process completes.
@retval EFI_NO_MAPPING The default station address is not available yet.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval Others Some other unexpected error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE) (
IN EFI_DHCP4_PROTOCOL *This,
IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token
)
;
/**
Parses the packed DHCP option data.
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.
@param Packet Pointer to packet to be parsed.
@param OptionCount On input, the number of entries in the PacketOptionList.
On output, the number of entries that were written into the
PacketOptionList.
@param PacketOptionList List of packet option entries to be filled in. End option or pad
options are not included.
@retval EFI_SUCCESS The packet was successfully parsed.
@retval EFI_INVALID_PARAMETER Some parameter is NULL.
@retval EFI_BUFFER_TOO_SMALL One or more of the following conditions is TRUE:
1) *OptionCount is smaller than the number of options that
were found in the Packet.
2) PacketOptionList is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_PARSE) (
IN EFI_DHCP4_PROTOCOL *This,
IN EFI_DHCP4_PACKET *Packet,
IN OUT UINT32 *OptionCount,
OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL
)
;
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;
};
extern EFI_GUID gEfiDhcp4ProtocolGuid;
extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
#endif

View File

@ -1,98 +0,0 @@
/** @file
Disk IO protocol as defined in the EFI 1.0 specification.
The Disk IO protocol is used to convert block oriented devices into byte
oriented devices. The Disk IO protocol is intended to layer on top of the
Block IO protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DiskIo.h
**/
#ifndef __DISK_IO_H__
#define __DISK_IO_H__
#define EFI_DISK_IO_PROTOCOL_GUID \
{ \
0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL;
/**
Read BufferSize bytes from Offset into Buffer.
@param This Protocol instance pointer.
@param MediaId Id of the media, changes every time the media is replaced.
@param Offset The starting byte offset to read from
@param BufferSize Size of Buffer
@param Buffer Buffer containing read data
@retval EFI_SUCCESS The data was read correctly from the device.
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.
@retval EFI_NO_MEDIA There is no media in the device.
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
@retval EFI_INVALID_PARAMETER The read request contains device addresses that are not
valid for the device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_READ) (
IN EFI_DISK_IO_PROTOCOL *This,
IN UINT32 MediaId,
IN UINT64 Offset,
IN UINTN BufferSize,
OUT VOID *Buffer
)
;
/**
Read BufferSize bytes from Offset into Buffer.
@param This Protocol instance pointer.
@param MediaId Id of the media, changes every time the media is replaced.
@param Offset The starting byte offset to read from
@param BufferSize Size of Buffer
@param Buffer Buffer containing read data
@retval EFI_SUCCESS The data was written correctly to the device.
@retval EFI_WRITE_PROTECTED The device can not be written to.
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.
@retval EFI_NO_MEDIA There is no media in the device.
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
@retval EFI_INVALID_PARAMETER The write request contains device addresses that are not
valid for the device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_WRITE) (
IN EFI_DISK_IO_PROTOCOL *This,
IN UINT32 MediaId,
IN UINT64 Offset,
IN UINTN BufferSize,
IN VOID *Buffer
)
;
#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000
struct _EFI_DISK_IO_PROTOCOL {
UINT64 Revision;
EFI_DISK_READ ReadDisk;
EFI_DISK_WRITE WriteDisk;
};
extern EFI_GUID gEfiDiskIoProtocolGuid;
#endif

View File

@ -1,111 +0,0 @@
/** @file
EFI ControllerHandle Driver Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DriverBinding.h
**/
#ifndef __EFI_DRIVER_BINDING_H__
#define __EFI_DRIVER_BINDING_H__
//
// Global ID for the ControllerHandle Driver Protocol
//
#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
{ \
0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \
}
typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
/**
Test to see if this driver supports ControllerHandle.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to test
@param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@retval EFI_SUCCESS This driver supports this device
@retval EFI_ALREADY_STARTED This driver is already running on this device
@retval other This driver does not support this device
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
)
;
/**
Start this driver on ControllerHandle.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to bind driver to
@param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@retval EFI_SUCCESS This driver is added to ControllerHandle
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
@retval other This driver does not support this device
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_BINDING_START) (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
)
;
/**
Stop this driver on ControllerHandle.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
children is zero stop the entire bus driver.
@param ChildHandleBuffer List of Child Handles to Stop.
@retval EFI_SUCCESS This driver is removed ControllerHandle
@retval other This driver was not removed from this device
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_BINDING_STOP) (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
)
;
//
// Interface structure for the ControllerHandle Driver Protocol
//
struct _EFI_DRIVER_BINDING_PROTOCOL {
EFI_DRIVER_BINDING_SUPPORTED Supported;
EFI_DRIVER_BINDING_START Start;
EFI_DRIVER_BINDING_STOP Stop;
UINT32 Version;
EFI_HANDLE ImageHandle;
EFI_HANDLE DriverBindingHandle;
};
extern EFI_GUID gEfiDriverBindingProtocolGuid;
#endif

View File

@ -1,203 +0,0 @@
/** @file
EFI Driver Configuration Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DriverConfiguration.h
**/
#ifndef __EFI_DRIVER_CONFIGURATION_H__
#define __EFI_DRIVER_CONFIGURATION_H__
//
// Global ID for the Driver Configuration Protocol defined in EFI 1.10
//
#define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
{ \
0x107a772b, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
//
// Global ID for the Driver Configuration Protocol defined in UEFI 2.0
//
#define UEFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
{ \
0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \
}
typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL EFI_DRIVER_CONFIGURATION_PROTOCOL;
typedef enum {
EfiDriverConfigurationActionNone = 0,
EfiDriverConfigurationActionStopController = 1,
EfiDriverConfigurationActionRestartController = 2,
EfiDriverConfigurationActionRestartPlatform = 3,
EfiDriverConfigurationActionMaximum
} EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
#define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
#define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
#define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
#define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
/**
Allows the user to set controller specific options for a controller that a
driver is currently managing.
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
@param ControllerHandle The handle of the controller to set options on.
@param ChildHandle The handle of the child controller to set options on. This
is an optional parameter that may be NULL. It will be NULL
for device drivers, and for a bus drivers that wish to set
options for the bus controller. It will not be NULL for a
bus driver that wishes to set options for one of its child
controllers.
@param Language A pointer to a three character ISO 639-2 language identifier.
This is the language of the user interface that should be
presented to the user, and it must match one of the languages
specified in SupportedLanguages. The number of languages
supported by a driver is up to the driver writer.
@param ActionRequired A pointer to the action that the calling agent is required
to perform when this function returns. See "Related
Definitions" for a list of the actions that the calling
agent is required to perform prior to accessing
ControllerHandle again.
@retval EFI_SUCCESS The driver specified by This successfully set the
configuration options for the controller specified
by ControllerHandle..
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
@retval EFI_UNSUPPORTED The driver specified by This does not support setting
configuration options for the controller specified by
ControllerHandle and ChildHandle.
@retval EFI_UNSUPPORTED The driver specified by This does not support the
language specified by Language.
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the
configuration options for the controller specified
by ControllerHandle and ChildHandle.
@retval EFI_OUT_RESOURCES There are not enough resources available to set the
configuration options for the controller specified
by ControllerHandle and ChildHandle.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_CONFIGURATION_SET_OPTIONS) (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
);
/**
Tests to see if a controller's current configuration options are valid.
@param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
@param ControllerHandle The handle of the controller to test if it's current
configuration options are valid.
@param ChildHandle The handle of the child controller to test if it's current
configuration options are valid. This is an optional
parameter that may be NULL. It will be NULL for device
drivers. It will also be NULL for a bus drivers that wish
to test the configuration options for the bus controller.
It will not be NULL for a bus driver that wishes to test
configuration options for one of its child controllers.
@retval EFI_SUCCESS The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver
specified by This has a valid set of configuration
options.
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
@retval EFI_UNSUPPORTED The driver specified by This is not currently
managing the controller specified by ControllerHandle
and ChildHandle.
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
ChildHandle that is being managed by the driver
specified by This has an invalid set of configuration
options.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_CONFIGURATION_OPTIONS_VALID) (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL
);
/**
Forces a driver to set the default configuration options for a controller.
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
@param ControllerHandle The handle of the controller to force default configuration options on.
@param ChildHandle The handle of the child controller to force default configuration options on This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller. It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.
@param DefaultType The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle. See Table 9-1 for legal values. A DefaultType of 0x00000000 must be supported by this protocol.
@param ActionRequired A pointer to the action that the calling agent is required to perform when this function returns. See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.
@retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS) (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN UINT32 DefaultType,
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
);
//
//
struct _EFI_DRIVER_CONFIGURATION_PROTOCOL {
EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions;
EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid;
EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults;
CHAR8 *SupportedLanguages;
};
/**
Interface structure for the Driver Configuration Protocol.
@par Protocol Description:
Used to set configuration options for a controller that an EFI Driver is managing.
@param SetOptions Allows the use to set drivers specific configuration
options for a controller that the driver is currently managing.
@param OptionsValid Tests to see if a controller's current configuration
options are valid.
@param ForceDefaults Forces a driver to set the default configuration options
for a controller.
@param SupportedLanguages 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.
**/
extern EFI_GUID gEfiDriverConfigurationProtocolGuid;
extern EFI_GUID gUefiDriverConfigurationProtocolGuid;
#endif

View File

@ -1,134 +0,0 @@
/** @file
EFI Driver Diagnostics Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: DriverDiagnostics.h
**/
#ifndef __EFI_DRIVER_DIAGNOSTICS_H__
#define __EFI_DRIVER_DIAGNOSTICS_H__
//
// Global ID for the Driver Diagnostics Protocol as defined in EFI 1.10.
//
#define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
{ \
0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
//
// Global ID for the Driver Diagnostics Protocol as defined in UEFI 2.0.
//
#define UEFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
{ \
0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \
}
typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL EFI_DRIVER_DIAGNOSTICS_PROTOCOL;
typedef enum {
EfiDriverDiagnosticTypeStandard = 0,
EfiDriverDiagnosticTypeExtended = 1,
EfiDriverDiagnosticTypeManufacturing= 2,
EfiDriverDiagnosticTypeMaximum
} EFI_DRIVER_DIAGNOSTIC_TYPE;
/**
Runs diagnostics on a controller.
@param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
@param ControllerHandle The handle of the controller to run diagnostics on.
@param ChildHandle The handle of the child controller to run diagnostics on
This is an optional parameter that may be NULL. It will
be NULL for device drivers. It will also be NULL for a
bus drivers that wish to run diagnostics on the bus
controller. It will not be NULL for a bus driver that
wishes to run diagnostics on one of its child controllers.
@param DiagnosticType Indicates type of diagnostics to perform on the controller
specified by ControllerHandle and ChildHandle. See
"Related Definitions" for the list of supported types.
@param Language A pointer to a three character ISO 639-2 language
identifier. This is the language in which the optional
error message should be returned in Buffer, and it must
match one of the languages specified in SupportedLanguages.
The number of languages supported by a driver is up to
the driver writer.
@param ErrorType A GUID that defines the format of the data returned in Buffer.
@param BufferSize The size, in bytes, of the data returned in Buffer.
@param Buffer A buffer that contains a Null-terminated Unicode string
plus some additional data whose format is defined by
ErrorType. Buffer is allocated by this function with
AllocatePool(), and it is the caller's responsibility
to free it with a call to FreePool().
@retval EFI_SUCCESS The controller specified by ControllerHandle and
ChildHandle passed the diagnostic.
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER Language is NULL.
@retval EFI_INVALID_PARAMETER ErrorType is NULL.
@retval EFI_INVALID_PARAMETER BufferType is NULL.
@retval EFI_INVALID_PARAMETER Buffer is NULL.
@retval EFI_UNSUPPORTED The driver specified by This does not support
running diagnostics for the controller specified
by ControllerHandle and ChildHandle.
@retval EFI_UNSUPPORTED The driver specified by This does not support the
type of diagnostic specified by DiagnosticType.
@retval EFI_UNSUPPORTED The driver specified by This does not support the
language specified by Language.
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete
the diagnostics.
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return
the status information in ErrorType, BufferSize,
and Buffer.
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
ChildHandle did not pass the diagnostic.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (
IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
IN CHAR8 *Language,
OUT EFI_GUID **ErrorType,
OUT UINTN *BufferSize,
OUT CHAR16 **Buffer
);
//
//
/**
Interface structure for the Driver Diagnostics Protocol.
@par Protocol Description:
Used to perform diagnostics on a controller that an EFI Driver is managing.
@param RunDiagnostics Runs diagnostics on a controller.
@param SupportedLanguages 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.
**/
struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {
EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;
CHAR8 *SupportedLanguages;
};
extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;
extern EFI_GUID gUefiDriverDiagnosticsProtocolGuid;
#endif

View File

@ -1,148 +0,0 @@
/** @file
Describes the protocol interface to the EBC interpreter.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Ebc.h
**/
#ifndef __EFI_EBC_PROTOCOL_H__
#define __EFI_EBC_PROTOCOL_H__
#define EFI_EBC_INTERPRETER_PROTOCOL_GUID \
{ \
0x13AC6DD1, 0x73D0, 0x11D4, {0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7 } \
}
//
// Protocol Guid Name defined in spec.
//
#define EFI_EBC_PROTOCOL_GUID EFI_EBC_INTERPRETER_PROTOCOL_GUID
//
// Define for forward reference.
//
typedef struct _EFI_EBC_PROTOCOL EFI_EBC_PROTOCOL;
/**
Create a thunk for an image entry point. In short, given the physical address
of the entry point for a loaded image, create a thunk that does some
fixup of arguments (and perform any other necessary overhead) and then
calls the original entry point. The caller can then use the returned pointer
to the created thunk as the new entry point to image.
@param This protocol instance pointer
@param ImageHandle handle to the image. The EBC interpreter may use this to keep
track of any resource allocations performed in loading and
executing the image.
@param EbcEntryPoint the entry point for the image (as defined in the file header)
@param Thunk pointer to thunk pointer where the address of the created
thunk is returned.
@return Standard EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EBC_CREATE_THUNK) (
IN EFI_EBC_PROTOCOL *This,
IN EFI_HANDLE ImageHandle,
IN VOID *EbcEntryPoint,
OUT VOID **Thunk
);
/**
Perform any cleanup necessary when an image is unloaded. Basically it gives
the EBC interpreter the chance to free up any resources allocated during
load and execution of an EBC image.
@param This protocol instance pointer
@param ImageHandle the handle of the image being unloaded.
@return Standard EFI_STATUS.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EBC_UNLOAD_IMAGE) (
IN EFI_EBC_PROTOCOL *This,
IN EFI_HANDLE ImageHandle
);
/**
The I-Cache-flush registration service takes a pointer to a function to
call to flush the I-Cache. Here's the prototype for that function pointer.
@param Start physical start address of CPU instruction cache to flush.
@param Length how many bytes to flush of the instruction cache.
@return Standard EFI_STATUS.
**/
typedef
EFI_STATUS
(EFIAPI *EBC_ICACHE_FLUSH) (
IN EFI_PHYSICAL_ADDRESS Start,
IN UINT64 Length
);
/**
This routine is called by the core firmware to provide the EBC driver with
a function to call to flush the CPU's instruction cache following creation
of a thunk. It is not required.
@param This protocol instance pointer
@param Flush pointer to the function to call to flush the CPU instruction
cache.
@return Standard EFI_STATUS.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EBC_REGISTER_ICACHE_FLUSH) (
IN EFI_EBC_PROTOCOL *This,
IN EBC_ICACHE_FLUSH Flush
);
/**
This routine can be called to get the VM revision. It returns the same
value as the EBC BREAK 1 instruction returns.
@param This protocol instance pointer
@param Version pointer to where to return the VM version
@return Standard EFI_STATUS.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EBC_GET_VERSION) (
IN EFI_EBC_PROTOCOL *This,
IN OUT UINT64 *Version
);
//
// Prototype for the actual EBC protocol interface
//
struct _EFI_EBC_PROTOCOL {
EFI_EBC_CREATE_THUNK CreateThunk;
EFI_EBC_UNLOAD_IMAGE UnloadImage;
EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush;
EFI_EBC_GET_VERSION GetVersion;
};
//
// Extern the global EBC protocol GUID
//
extern EFI_GUID gEfiEbcProtocolGuid;
#endif

View File

@ -1,34 +0,0 @@
/** @file
EDID Active Protocol from the UEFI 2.0 specification.
Placed on the video output device child handle that are actively displaying output.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: EdidActive.h
**/
#ifndef __EDID_ACTIVE_H__
#define __EDID_ACTIVE_H__
#define EFI_EDID_ACTIVE_PROTOCOL_GUID \
{ \
0xbd8c1056, 0x9f36, 0x44ec, {0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86 } \
}
typedef struct {
UINT32 SizeOfEdid;
UINT8 *Edid;
} EFI_EDID_ACTIVE_PROTOCOL;
extern EFI_GUID gEfiEdidActiveProtocolGuid;
#endif

View File

@ -1,35 +0,0 @@
/** @file
EDID Discovered Protocol from the UEFI 2.0 specification.
This protocol is placed on the video output device child handle and it represents
the EDID information being used for output device represented by the child handle.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: EdidDiscovered.h
**/
#ifndef __EDID_DISCOVERED_H__
#define __EDID_DISCOVERED_H__
#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
{ \
0x1c0c34f6, 0xd380, 0x41fa, {0xa0, 0x49, 0x8a, 0xd0, 0x6c, 0x1a, 0x66, 0xaa } \
}
typedef struct {
UINT32 SizeOfEdid;
UINT8 *Edid;
} EFI_EDID_DISCOVERED_PROTOCOL;
extern EFI_GUID gEfiEdidDiscoveredProtocolGuid;
#endif

View File

@ -1,66 +0,0 @@
/** @file
EDID Override Protocol from the UEFI 2.0 specification.
Allow platform to provide EDID information to producer of the Graphics Output
protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: EdidOverride.h
**/
#ifndef __EDID_OVERRIDE_H__
#define __EDID_OVERRIDE_H__
#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
{ \
0x48ecb431, 0xfb72, 0x45c0, {0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x4, 0xb, 0xd5 } \
}
typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL;
#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01
#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02
/**
Return the current video mode information.
@param This Protocol instance pointer.
@param ChildHandle A child handle produced by the Graphics Output EFI
driver that represents a video output device.
@param Attributes The attributes associated with ChildHandle video output device.
@param EdidSize A pointer to the size, in bytes, of the Edid buffer.
@param Edid A pointer to callee allocated buffer that contains the EDID that
should be used for ChildHandle. A value of NULL
represents no EDID override for ChildHandle.
@retval EFI_SUCCESS Valid overrides returned for ChildHandle.
@retval EFI_UNSUPPORTED ChildHandle has no overrides.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) (
IN EFI_EDID_OVERRIDE_PROTOCOL *This,
IN EFI_HANDLE *ChildHandle,
OUT UINT32 *Attributes,
IN OUT UINTN *EdidSize,
IN OUT UINT8 **Edid
)
;
struct _EFI_EDID_OVERRIDE_PROTOCOL {
EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid;
};
extern EFI_GUID gEfiEdidOverrideProtocolGuid;
#endif

View File

@ -1,92 +0,0 @@
/** @file
Revision history:
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module name:
EfiNetworkInterfaceIdentifier.h
**/
#ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__
#define __EFI_NETWORK_INTERFACE_IDENTIFER_H__
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID \
{ \
0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 } \
}
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00010000
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
typedef enum {
EfiNetworkInterfaceUndi = 1
} EFI_NETWORK_PROTOCOL_TYPE;
struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
UINT64 Revision;
//
// Revision of the network interface identifier protocol interface.
//
UINT64 ID;
//
// Address of the first byte of the identifying structure for this
// network interface. This is set to zero if there is no structure.
//
// For PXE/UNDI this is the first byte of the !PXE structure.
//
UINT64 ImageAddr;
//
// Address of the UNrelocated driver/ROM image. This is set
// to zero if there is no driver/ROM image.
//
// For 16-bit UNDI, this is the first byte of the option ROM in
// upper memory.
//
// For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM
// image.
//
// For H/W UNDI, this is set to zero.
//
UINT32 ImageSize;
//
// Size of the UNrelocated driver/ROM image of this network interface.
// This is set to zero if there is no driver/ROM image.
//
CHAR8 StringId[4];
//
// 4 char ASCII string to go in class identifier (option 60) in DHCP
// and Boot Server discover packets.
// For EfiNetworkInterfaceUndi this field is "UNDI".
// For EfiNetworkInterfaceSnp this field is "SNPN".
//
UINT8 Type;
UINT8 MajorVer;
UINT8 MinorVer;
//
// Information to be placed into the PXE DHCP and Discover packets.
// This is the network interface type and version number that will
// be placed into DHCP option 94 (client network interface identifier).
//
BOOLEAN Ipv6Supported;
UINT8 IfNum; // interface number to be used with pxeid structure
};
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31;
#endif // _EFI_NII_H

View File

@ -1,53 +0,0 @@
/** @file
SimpleFileSystem protocol as defined in the EFI 1.0 specification.
The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
file system specified in EFI 1.0. It can also be used to abstract any
file system other than FAT.
EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FileInfo.c
**/
#ifndef __FILE_INFO_H__
#define __FILE_INFO_H__
#define EFI_FILE_INFO_ID \
{ \
0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
typedef struct {
UINT64 Size;
UINT64 FileSize;
UINT64 PhysicalSize;
EFI_TIME CreateTime;
EFI_TIME LastAccessTime;
EFI_TIME ModificationTime;
UINT64 Attribute;
CHAR16 FileName[1];
} EFI_FILE_INFO;
//
// The FileName field of the EFI_FILE_INFO data structure is variable length.
// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
// be the size of the data structure without the FileName field. The following macro
// 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 EFI_FIELD_OFFSET (EFI_FILE_INFO, FileName)
extern EFI_GUID gEfiFileInfoGuid;
#endif

View File

@ -1,45 +0,0 @@
/** @file
FileSystemInfo protocol as defined in the EFI 1.0 specification.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FileSystemInfo.h
**/
#ifndef __FILE_SYSTEM_INFO_H__
#define __FILE_SYSTEM_INFO_H__
#define EFI_FILE_SYSTEM_INFO_ID_GUID \
{ \
0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
typedef struct {
UINT64 Size;
BOOLEAN ReadOnly;
UINT64 VolumeSize;
UINT64 FreeSpace;
UINT32 BlockSize;
CHAR16 VolumeLabel[1];
} EFI_FILE_SYSTEM_INFO;
//
// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
// to be the size of the data structure without the VolumeLable field. The following macro
// computes this size correctly no matter how big the VolumeLable array is declared.
// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
//
#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET (EFI_FILE_SYSTEM_INFO, VolumeLabel)
extern EFI_GUID gEfiFileSystemInfoGuid;
#endif

View File

@ -1,42 +0,0 @@
/** @file
FileSystemVolumeLabelInfo protocol as defined in the EFI 1.0 specification.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FileSystemVolumeLabelInfo.h
**/
#ifndef __FILE_SYSTEM_VOLUME_LABEL_INFO_H__
#define __FILE_SYSTEM_VOLUME_LABEL_INFO_H__
#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID_GUID \
{ \
0xDB47D7D3, 0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
}
//
// Protocol Name defined in spec.
//
#define EFI_FILE_SYSTEM_VOLUME_LABEL_ID \
EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID_GUID
typedef struct {
CHAR16 VolumeLabel[1];
} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
typedef EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FILE_SYSTEM_VOLUME_LABEL;
#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO \
EFI_FIELD_OFFSET (EFI_FILE_SYSTEM_VOLUME_LABEL_INFO, VolumeLabel)
extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid;
#endif

View File

@ -1,321 +0,0 @@
/** @file
This file declares Firmware Volume protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FirmwareVolume.h
@par Revision Reference:
This protocol is defined in Firmware Volume specification.
Version 0.9
**/
#ifndef __FIRMWARE_VOLUME_H__
#define __FIRMWARE_VOLUME_H__
//
// Firmware Volume Protocol GUID definition
//
#define EFI_FIRMWARE_VOLUME_PROTOCOL_GUID \
{ \
0x389F751F, 0x1838, 0x4388, {0x83, 0x90, 0xCD, 0x81, 0x54, 0xBD, 0x27, 0xF8 } \
}
#define FV_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', '_')
typedef struct _EFI_FIRMWARE_VOLUME_PROTOCOL EFI_FIRMWARE_VOLUME_PROTOCOL;
//
// EFI_FV_ATTRIBUTES bit definitions
//
typedef UINT64 EFI_FV_ATTRIBUTES;
//
// ************************************************************
// EFI_FV_ATTRIBUTES bit definitions
// ************************************************************
//
#define EFI_FV_READ_DISABLE_CAP 0x0000000000000001ULL
#define EFI_FV_READ_ENABLE_CAP 0x0000000000000002ULL
#define EFI_FV_READ_STATUS 0x0000000000000004ULL
#define EFI_FV_WRITE_DISABLE_CAP 0x0000000000000008ULL
#define EFI_FV_WRITE_ENABLE_CAP 0x0000000000000010ULL
#define EFI_FV_WRITE_STATUS 0x0000000000000020ULL
#define EFI_FV_LOCK_CAP 0x0000000000000040ULL
#define EFI_FV_LOCK_STATUS 0x0000000000000080ULL
#define EFI_FV_WRITE_POLICY_RELIABLE 0x0000000000000100ULL
#define EFI_FV_ALIGNMENT_CAP 0x0000000000008000ULL
#define EFI_FV_ALIGNMENT_2 0x0000000000010000ULL
#define EFI_FV_ALIGNMENT_4 0x0000000000020000ULL
#define EFI_FV_ALIGNMENT_8 0x0000000000040000ULL
#define EFI_FV_ALIGNMENT_16 0x0000000000080000ULL
#define EFI_FV_ALIGNMENT_32 0x0000000000100000ULL
#define EFI_FV_ALIGNMENT_64 0x0000000000200000ULL
#define EFI_FV_ALIGNMENT_128 0x0000000000400000ULL
#define EFI_FV_ALIGNMENT_256 0x0000000000800000ULL
#define EFI_FV_ALIGNMENT_512 0x0000000001000000ULL
#define EFI_FV_ALIGNMENT_1K 0x0000000002000000ULL
#define EFI_FV_ALIGNMENT_2K 0x0000000004000000ULL
#define EFI_FV_ALIGNMENT_4K 0x0000000008000000ULL
#define EFI_FV_ALIGNMENT_8K 0x0000000010000000ULL
#define EFI_FV_ALIGNMENT_16K 0x0000000020000000ULL
#define EFI_FV_ALIGNMENT_32K 0x0000000040000000ULL
#define EFI_FV_ALIGNMENT_64K 0x0000000080000000ULL
//
// Protocol API definitions
//
/**
Retrieves attributes, insures positive polarity of attribute bits, returns
resulting attributes in output parameter
@param This Calling context
@param Attributes output buffer which contains attributes
@retval EFI_INVALID_PARAMETER
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FV_GET_ATTRIBUTES) (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
OUT EFI_FV_ATTRIBUTES *Attributes
);
/**
Sets volume attributes
@param This Calling context
@param Attributes Buffer which contains attributes
@retval EFI_INVALID_PARAMETER
@retval EFI_DEVICE_ERROR
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FV_SET_ATTRIBUTES) (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
IN OUT EFI_FV_ATTRIBUTES *Attributes
);
typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
#define EFI_FV_FILE_ATTRIB_ALIGNMENT 0x0000001F
/**
Read the requested file (NameGuid) and returns data in Buffer.
@param This Calling context
@param NameGuid Filename identifying which file to read
@param Buffer Pointer to pointer to buffer in which contents of file are returned.
<br>
If Buffer is NULL, only type, attributes, and size are returned as
there is no output buffer.
<br>
If Buffer != NULL and *Buffer == NULL, the output buffer is allocated
from BS pool by ReadFile
<br>
If Buffer != NULL and *Buffer != NULL, the output buffer has been
allocated by the caller and is being passed in.
@param BufferSize Indicates the buffer size passed in, and on output the size
required to complete the read
@param FoundType Indicates the type of the file who's data is returned
@param FileAttributes Indicates the attributes of the file who's data is resturned
@param AuthenticationStatus Indicates the authentication status of the data
@retval EFI_SUCCESS
@retval EFI_WARN_BUFFER_TOO_SMALL
@retval EFI_NOT_FOUND
@retval EFI_DEVICE_ERROR
@retval EFI_ACCESS_DENIED
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FV_READ_FILE) (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
IN EFI_GUID *NameGuid,
IN OUT VOID **Buffer,
IN OUT UINTN *BufferSize,
OUT EFI_FV_FILETYPE *FoundType,
OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
OUT UINT32 *AuthenticationStatus
);
/**
Read the requested section from the specified file and returns data in Buffer.
@param This Calling context
@param NameGuid Filename identifying the file from which to read
@param SectionType Indicates what section type to retrieve
@param SectionInstance Indicates which instance of SectionType to retrieve
@param Buffer Pointer to pointer to buffer in which contents of file are returned.
<br>
If Buffer is NULL, only type, attributes, and size are returned as
there is no output buffer.
<br>
If Buffer != NULL and *Buffer == NULL, the output buffer is allocated
from BS pool by ReadFile
<br>
If Buffer != NULL and *Buffer != NULL, the output buffer has been
allocated by the caller and is being passed in.
@param BufferSize Indicates the buffer size passed in, and on output the size
required to complete the read
@param AuthenticationStatus Indicates the authentication status of the data
@retval EFI_SUCCESS
@retval EFI_WARN_BUFFER_TOO_SMALL
@retval EFI_OUT_OF_RESOURCES
@retval EFI_NOT_FOUND
@retval EFI_DEVICE_ERROR
@retval EFI_ACCESS_DENIED
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FV_READ_SECTION) (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
IN EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
IN OUT VOID **Buffer,
IN OUT UINTN *BufferSize,
OUT UINT32 *AuthenticationStatus
);
typedef UINT32 EFI_FV_WRITE_POLICY;
#define EFI_FV_UNRELIABLE_WRITE 0x00000000
#define EFI_FV_RELIABLE_WRITE 0x00000001
typedef struct {
EFI_GUID *NameGuid;
EFI_FV_FILETYPE Type;
EFI_FV_FILE_ATTRIBUTES FileAttributes;
VOID *Buffer;
UINT32 BufferSize;
} EFI_FV_WRITE_FILE_DATA;
/**
Write the supplied file (NameGuid) to the FV.
@param This Calling context
@param NumberOfFiles Indicates the number of file records pointed to by FileData
@param WritePolicy Indicates the level of reliability of the write with respect to
things like power failure events.
@param FileData A pointer to an array of EFI_FV_WRITE_FILE_DATA structures. Each
element in the array indicates a file to write, and there are
NumberOfFiles elements in the input array.
@retval EFI_SUCCESS
@retval EFI_OUT_OF_RESOURCES
@retval EFI_DEVICE_ERROR
@retval EFI_WRITE_PROTECTED
@retval EFI_NOT_FOUND
@retval EFI_INVALID_PARAMETER
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FV_WRITE_FILE) (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
IN UINT32 NumberOfFiles,
IN EFI_FV_WRITE_POLICY WritePolicy,
IN EFI_FV_WRITE_FILE_DATA *FileData
);
/**
Given the input key, search for the next matching file in the volume.
@param This Calling context
@param Key Pointer to a caller allocated buffer that contains an implementation
specific key that is used to track where to begin searching on
successive calls.
@param FileType Indicates the file type to filter for
@param NameGuid Guid filename of the file found
@param Attributes Attributes of the file found
@param Size Size in bytes of the file found
@retval EFI_SUCCESS
@retval EFI_NOT_FOUND
@retval EFI_DEVICE_ERROR
@retval EFI_ACCESS_DENIED
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FV_GET_NEXT_FILE) (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
IN OUT VOID *Key,
IN OUT EFI_FV_FILETYPE *FileType,
OUT EFI_GUID *NameGuid,
OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
OUT UINTN *Size
);
/**
@par Protocol Description:
The Firmware Volume Protocol provides file-level access to the firmware volume.
Each firmware volume driver must produce an instance of the Firmware Volume
Protocol if the firmware volume is to be visible to the system. The Firmware
Volume Protocol also provides mechanisms for determining and modifying some
attributes of the firmware volume.
@param GetVolumeAttributes
Retrieves volume capabilities and current settings.
@param SetVolumeAttributes
Modifies the current settings of the firmware volume.
@param ReadFile
Reads an entire file from the firmware volume.
@param ReadSection
Reads a single section from a file into a buffer.
@param WriteFile
Writes an entire file into the firmware volume.
@param GetNextFile
Provides service to allow searching the firmware volume.
@param KeySize
Data field that indicates the size in bytes of the Key input buffer for
the GetNextFile() API.
@param ParentHandle
Handle of the parent firmware volume.
**/
struct _EFI_FIRMWARE_VOLUME_PROTOCOL {
EFI_FV_GET_ATTRIBUTES GetVolumeAttributes;
EFI_FV_SET_ATTRIBUTES SetVolumeAttributes;
EFI_FV_READ_FILE ReadFile;
EFI_FV_READ_SECTION ReadSection;
EFI_FV_WRITE_FILE WriteFile;
EFI_FV_GET_NEXT_FILE GetNextFile;
UINT32 KeySize;
EFI_HANDLE ParentHandle;
};
extern EFI_GUID gEfiFirmwareVolumeProtocolGuid;
#endif

View File

@ -1,251 +0,0 @@
/** @file
This file declares Firmware Volume Block protocol.
Low level firmware device access routines to abstract firmware device
hardware.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FirmwareVolumeBlock.h
@par Revision Reference:
This protocol is defined in Framework of EFI Firmware Volume Block specification.
Version 0.9
**/
#ifndef __FIRMWARE_VOLUME_BLOCK_H__
#define __FIRMWARE_VOLUME_BLOCK_H__
#define EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID \
{ \
0xDE28BC59, 0x6228, 0x41BD, {0xBD, 0xF6, 0xA3, 0xB9, 0xAD, 0xB5, 0x8D, 0xA1 } \
}
typedef struct _EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL;
/**
Retrieves Volume attributes. No polarity translations are done.
@param This Calling context
@param Attributes output buffer which contains attributes
@retval EFI_INVALID_PARAMETER
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_GET_ATTRIBUTES) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
OUT EFI_FVB_ATTRIBUTES *Attributes
)
;
/**
Sets Volume attributes. No polarity translations are done.
@param This Calling context
@param Attributes On input: contains new attributes
On output: contains current attributes of FV
@retval EFI_INVALID_PARAMETER
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_SET_ATTRIBUTES) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
IN OUT EFI_FVB_ATTRIBUTES *Attributes
)
;
/**
Retrieves the physical address of a memory mapped FV.
@param This Calling context
@param Attributes Address is a pointer to a caller allocated EFI_PHYSICAL_ADDRESS
that on successful return from GetPhysicalAddress() contains the
base address of the firmware volume.
@retval EFI_UNSUPPORTED
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_GET_PHYSICAL_ADDRESS) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
OUT EFI_PHYSICAL_ADDRESS *Address
)
;
/**
Retrieves the size in bytes of a specific block within an FV.
@param This Calling context.
@param Lba Indicates which block to return the size for.
@param BlockSize BlockSize is a pointer to a caller allocated
UINTN in which the size of the block is returned.
@param NumberOfBlocks NumberOfBlocks is a pointer to a caller allocated
UINTN in which the number of consecutive blocks
starting with Lba is returned. All blocks in this
range have a size of BlockSize.
@retval EFI_INVALID_PARAMETER
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_GET_BLOCK_SIZE) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
IN EFI_LBA Lba,
OUT UINTN *BlockSize,
OUT UINTN *NumberOfBlocks
)
;
/**
Reads data beginning at Lba:Offset from FV and places the data in Buffer.
The read terminates either when *NumBytes of data have been read, or when
a block boundary is reached. *NumBytes is updated to reflect the actual
number of bytes read.
@param This Calling context
@param Lba Block in which to begin read
@param Offset Offset in the block at which to begin read
@param NumBytes At input, indicates the requested read size. At output, indicates
the actual number of bytes read.
@param Buffer Data buffer in which to place data read.
@retval EFI_INVALID_PARAMETER
@retval EFI_NOT_FOUND
@retval EFI_DEVICE_ERROR
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_READ) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
IN EFI_LBA Lba,
IN UINTN Offset,
IN OUT UINTN *NumBytes,
OUT UINT8 *Buffer
)
;
/**
Writes data beginning at Lba:Offset from FV. The write terminates either
when *NumBytes of data have been written, or when a block boundary is
reached. *NumBytes is updated to reflect the actual number of bytes
written.
@param This Calling context
@param Lba Block in which to begin write
@param Offset Offset in the block at which to begin write
@param NumBytes At input, indicates the requested write size. At output, indicates
the actual number of bytes written.
@param Buffer Buffer containing source data for the write.
@retval EFI_INVALID_PARAMETER
@retval EFI_NOT_FOUND
@retval EFI_DEVICE_ERROR
@retval EFI_SUCCESS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_WRITE) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
IN EFI_LBA Lba,
IN UINTN Offset,
IN OUT UINTN *NumBytes,
IN UINT8 *Buffer
)
;
#define EFI_LBA_LIST_TERMINATOR 0xFFFFFFFFFFFFFFFFULL
/**
The EraseBlock() function erases one or more blocks as denoted by the
variable argument list. The entire parameter list of blocks must be verified
prior to erasing any blocks. If a block is requested that does not exist
within the associated firmware volume (it has a larger index than the last
block of the firmware volume), the EraseBlock() function must return
EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.
@param This Calling context
@param ... Starting LBA followed by Number of Lba to erase. a -1 to terminate
the list.
@retval EFI_INVALID_PARAMETER
@retval EFI_DEVICE_ERROR
@retval EFI_SUCCESS
@retval EFI_ACCESS_DENIED
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FVB_ERASE_BLOCKS) (
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,
...
)
;
/**
@par Protocol Description:
This protocol provides control over block-oriented firmware devices.
Typically, the FFS (or an alternate file system) driver consumes the
Firmware Volume Block Protocol and produces the Firmware Volume Protocol.
@param GetAttributes
Retrieves the current volume attributes.
@param SetAttributes
Sets the current volume attributes.
@param GetPhysicalAddress
Retrieves the memory-mapped address of the firmware volume.
@param GetBlockSize
Retrieves the size for a specific block.
@param Read
Reads n bytes into a buffer from the firmware volume hardware.
@param Write
Writes n bytes from a buffer into the firmware volume hardware.
@param EraseBlocks
Erases specified block(s) and sets all values as indicated by
the EFI_FVB_ERASE_POLARITY bit.
@param ParentHandle
Handle of the parent firmware volume.
**/
struct _EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL {
EFI_FVB_GET_ATTRIBUTES GetVolumeAttributes;
EFI_FVB_SET_ATTRIBUTES SetVolumeAttributes;
EFI_FVB_GET_PHYSICAL_ADDRESS GetPhysicalAddress;
EFI_FVB_GET_BLOCK_SIZE GetBlockSize;
EFI_FVB_READ Read;
EFI_FVB_WRITE Write;
EFI_FVB_ERASE_BLOCKS EraseBlocks;
EFI_HANDLE ParentHandle;
};
extern EFI_GUID gEfiFirmwareVolumeBlockProtocolGuid;
#endif

View File

@ -1,33 +0,0 @@
/** @file
This file declares Firmware Volume Dispatch protocol.
Presence of this protocol tells the dispatch to dispatch from this Firmware
Volume
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FirmwareVolumeDispatch.h
@par Revision Reference:
This protol will be defined in DXE CIS Spec.
Version 0.91C.
**/
#ifndef __FIRMWARE_VOLUME_DISPATCH_H__
#define __FIRMWARE_VOLUME_DISPATCH_H__
#define EFI_FIRMWARE_VOLUME_DISPATCH_PROTOCOL_GUID \
{ 0x7aa35a69, 0x506c, 0x444f, {0xa7, 0xaf, 0x69, 0x4b, 0xf5, 0x6f, 0x71, 0xc8 } }
extern EFI_GUID gEfiFirmwareVolumeDispatchProtocolGuid;
#endif

View File

@ -1,180 +0,0 @@
/** @file
The EFI_FORM_BROWSER_PROTOCOL is the interface to the EFI
Configuration Driver. This will allow the caller to direct the
configuration driver to use either the HII database or use the passed
in packet of data. This will also allow the caller to post messages
into the configuration drivers internal mailbox.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FormBrowser.h
@par Revision Reference:
This protocol is defined in HII spec 0.92.
**/
#ifndef __FORM_BROWSER_H__
#define __FORM_BROWSER_H__
#define EFI_FORM_BROWSER_PROTOCOL_GUID \
{ \
0xe5a1333e, 0xe1b4, 0x4d55, {0xce, 0xeb, 0x35, 0xc3, 0xef, 0x13, 0x34, 0x43 } \
}
typedef struct _EFI_FORM_BROWSER_PROTOCOL EFI_FORM_BROWSER_PROTOCOL;
typedef struct {
UINT32 Length;
UINT16 Type;
UINT8 Data[1];
} EFI_HII_PACKET;
typedef struct {
EFI_HII_IFR_PACK *IfrData;
EFI_HII_STRING_PACK *StringData;
} EFI_IFR_PACKET;
typedef struct {
UINTN LeftColumn;
UINTN RightColumn;
UINTN TopRow;
UINTN BottomRow;
} EFI_SCREEN_DESCRIPTOR;
/**
Provides direction to the configuration driver whether to use the HII
database or a passed-in set of data. This function also establishes a
pointer to the calling driver<65><72>s callback interface.
@param This A pointer to the EFI_FORM_BROWSER_PROTOCOL instance.
@param UseDatabase Determines whether the HII database is to be
used to gather information. If the value is FALSE, the configuration
driver will get the information provided in the passed-in Packet parameters.
@param Handle A pointer to an array of HII handles to display. This value
should correspond to the value of the HII form package that is required to
be displayed.
@param HandleCount The number of handles in the array specified by Handle.
@param Packet A pointer to a set of data containing pointers to IFR
and/or string data.
@param CallbackHandle The handle to the driver<65><72>s callback interface.
This parameter is used only when the UseDatabase parameter is FALSE
and an application wants to register a callback with the browser
@param NvMapOverride This buffer is used only when there is no NV variable
to define the current settings and the caller needs to provide to the browser
the current settings for the "fake" NV variable.
@param ScreenDimensions Allows the browser to be called so that it occupies
a portion of the physical screen instead of dynamically determining the
screen dimensions.
@param ResetRequired This BOOLEAN value will tell the caller if a reset
is required based on the data that might have been changed. The ResetRequired
parameter is primarily applicable for configuration applications, and is an
optional parameter.
@retval EFI_SUCCESS The function completed successfully
@retval EFI_NOT_FOUND The variable was not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
DataSize has been updated with the size needed to complete the request.
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
@retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SEND_FORM) (
IN EFI_FORM_BROWSER_PROTOCOL *This,
IN BOOLEAN UseDatabase,
IN EFI_HII_HANDLE *Handle,
IN UINTN HandleCount,
IN EFI_IFR_PACKET *Packet, OPTIONAL
IN EFI_HANDLE CallbackHandle, OPTIONAL
IN UINT8 *NvMapOverride, OPTIONAL
IN EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
OUT BOOLEAN *ResetRequired OPTIONAL
);
/**
Routine used to abstract a generic dialog interface and return the selected
key or string.
@param NumberOfLines The number of lines for the dialog box.
@param HotKey Defines whether a single character is parsed (TRUE)
and returned in KeyValue or if a string is returned in StringBuffer.
@param MaximumStringSize The maximum size in bytes of a typed-in string.
Because each character is a CHAR16, the minimum string returned is two bytes.
@param StringBuffer The passed-in pointer to the buffer that will hold
the typed in string if HotKey is FALSE.
@param KeyValue The EFI_INPUT_KEY value returned if HotKey is TRUE.
@param String The pointer to the first string in the list of strings
that comprise the dialog box.
@param ... A series of NumberOfLines text strings that will be used
to construct the dialog box.
@retval EFI_SUCCESS The dialog was displayed and user interaction was received.
@retval EFI_DEVICE_ERROR The user typed in an ESC character to exit the routine.
@retval EFI_INVALID_PARAMETER One of the parameters was invalid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_CREATE_POP_UP) (
IN UINTN NumberOfLines,
IN BOOLEAN HotKey,
IN UINTN MaximumStringSize,
OUT CHAR16 *StringBuffer,
OUT EFI_INPUT_KEY *KeyValue,
IN CHAR16 *String,
...
);
/**
@par Protocol Description:
The EFI_FORM_BROWSER_PROTOCOL is the interface to call for drivers to
leverage the EFI configuration driver interface.
@param SendForm
Provides direction to the configuration driver whether to use the HII
database or to use a passed-in set of data. This functions also establishes
a pointer to the calling driver<65><72>s callback interface.
@param CreatePopUp
Routine used to abstract a generic dialog interface and return the
selected key or string.
**/
struct _EFI_FORM_BROWSER_PROTOCOL {
EFI_SEND_FORM SendForm;
EFI_CREATE_POP_UP CreatePopUp;
};
extern EFI_GUID gEfiFormBrowserProtocolGuid;
#endif

View File

@ -1,227 +0,0 @@
/** @file
The EFI_FORM_CALLBACK_PROTOCOL is the defined interface for access to custom
NV storage devices as well as communication of user selections in a more
interactive environment. This protocol should be published by hardware
specific drivers which want to export access to custom hardware storage or
publish IFR which has a requirement to call back the original driver.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: FormCallback.h
@par Revision Reference:
This protocol is defined in HII spec 0.92.
**/
#ifndef __FORM_CALLBACK_H__
#define __FORM_CALLBACK_H__
#define EFI_FORM_CALLBACK_PROTOCOL_GUID \
{ \
0xf3e4543d, 0xcf35, 0x6cef, {0x35, 0xc4, 0x4f, 0xe6, 0x34, 0x4d, 0xfc, 0x54 } \
}
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_FORM_CALLBACK_PROTOCOL EFI_FORM_CALLBACK_PROTOCOL;
#define RESET_REQUIRED 1 // Flags setting to signify that the callback operation resulted in an eventual
// reset to be done upon exit of the browser
//
#define EXIT_REQUIRED 2 // Flags setting to signify that after the processing of the callback results - exit the browser
#define SAVE_REQUIRED 4 // Flags setting to signify that after the processing of the callback results - save the NV data
#define NV_CHANGED 8 // Flags setting to signify that after the processing of the callback results - turn the NV flag on
#define NV_NOT_CHANGED 16 // Flags setting to signify that after the processing of the callback results - turn the NV flag off
#pragma pack(1)
typedef struct {
UINT8 OpCode; // Likely a string, numeric, or one-of
UINT8 Length; // Length of the EFI_IFR_DATA_ENTRY packet
UINT16 Flags; // Flags settings to determine what behavior is desired from the browser after the callback
VOID *Data; // The data in the form based on the op-code type - this is not a pointer to the data, the data follows immediately
// If the OpCode is a OneOf or Numeric type - Data is a UINT16 value
// If the OpCode is a String type - Data is a CHAR16[x] type
// If the OpCode is a Checkbox type - Data is a UINT8 value
// If the OpCode is a NV Access type - Data is a EFI_IFR_NV_DATA structure
//
} EFI_IFR_DATA_ENTRY;
typedef struct {
VOID *NvRamMap; // If the flag of the op-code specified retrieval of a copy of the NVRAM map,
// this is a pointer to a buffer copy
//
UINT32 EntryCount; // How many EFI_IFR_DATA_ENTRY entries
//
// EFI_IFR_DATA_ENTRY Data[1]; // The in-line Data entries.
//
} EFI_IFR_DATA_ARRAY;
typedef union {
EFI_IFR_DATA_ARRAY DataArray; // Primarily used by those who call back to their drivers and use HII as a repository
EFI_IFR_PACKET DataPacket; // Primarily used by those which do not use HII as a repository
CHAR16 *String; // If returning an error - fill the string with null-terminated contents
} EFI_HII_CALLBACK_PACKET;
typedef struct {
EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // Offset into the map
UINT8 StorageWidth; // Width of the value
//
// CHAR8 Data[1]; // The Data itself
//
} EFI_IFR_NV_DATA;
#pragma pack()
//
// The following types are currently defined:
//
/**
Returns the value of a variable.
@param This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.
@param VariableName A NULL-terminated Unicode string that is the
name of the vendor<6F><72>s variable.
@param VendorGuid A unique identifier for the vendor.
@param Attributes If not NULL, a pointer to the memory location to
return the attribute's bit-mask for the variable.
@param DataSize The size in bytes of the Buffer. A size of zero causes
the variable to be deleted.
@param Buffer The buffer to return the contents of the variable.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The variable was not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
DataSize has been updated with the size needed to complete the request.
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
@retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_NV_READ) (
IN EFI_FORM_CALLBACK_PROTOCOL *This,
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
OUT UINT32 *Attributes OPTIONAL,
IN OUT UINTN *DataSize,
OUT VOID *Buffer
);
/**
Sets the value of a variable.
@param This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.
@param VariableName A NULL-terminated Unicode string that is the
name of the vendor's variable. Each VariableName is unique for each VendorGuid.
@param VendorGuid A unique identifier for the vendor.
@param Attributes Attributes bit-mask to set for the variable.
@param DataSize The size in bytes of the Buffer. A size of zero causes
the variable to be deleted.
@param Buffer The buffer containing the contents of the variable.
@param ResetRequired Returns a value from the driver that abstracts
this information and will enable a system to know if a system reset
is required to achieve the configuration changes being enabled through
this function.
@retval EFI_SUCCESS The firmware has successfully stored the variable and
its data as defined by the Attributes.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold
the variable and its data.
@retval EFI_INVALID_PARAMETER An invalid combination of Attributes bits
was supplied, or the DataSize exceeds the maximum allowed.
@retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_NV_WRITE) (
IN EFI_FORM_CALLBACK_PROTOCOL *This,
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
IN UINT32 Attributes,
IN UINTN DataSize,
IN VOID *Buffer,
OUT BOOLEAN *ResetRequired
);
/**
This function is called to provide results data to the driver.
@param This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.
@param KeyValue A unique value which is sent to the original exporting
driver so that it can identify the type of data to expect. The format of
the data tends to vary based on the opcode that generated the callback.
@param Data A pointer to the data being sent to the original exporting driver.
@param Packet A pointer to a packet of information which a driver passes
back to the browser.
@return Status Code
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FORM_CALLBACK) (
IN EFI_FORM_CALLBACK_PROTOCOL *This,
IN UINT16 KeyValue,
IN EFI_IFR_DATA_ARRAY *Data,
OUT EFI_HII_CALLBACK_PACKET **Packet
);
/**
@par Protocol Description:
The EFI_FORM_CALLBACK_PROTOCOL is the defined interface for access to
custom NVS devices as well as communication of user selections in a more
interactive environment. This protocol should be published by hardware-specific
drivers that want to export access to custom hardware storage or publish IFR
that has a requirement to call back the original driver.
@param NvRead
The read operation to access the NV data serviced by a hardware-specific driver.
@param NvWrite
The write operation to access the NV data serviced by a hardware-specific driver.
@param Callback
The function that is called from the configuration browser to communicate key value pairs.
**/
struct _EFI_FORM_CALLBACK_PROTOCOL {
EFI_NV_READ NvRead;
EFI_NV_WRITE NvWrite;
EFI_FORM_CALLBACK Callback;
};
extern EFI_GUID gEfiFormCallbackProtocolGuid;
#endif

View File

@ -1,194 +0,0 @@
/** @file
Graphics Output Protocol from the UEFI 2.0 specification.
Abstraction of a very simple graphics device.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: GraphicsOutput.h
**/
#ifndef __GRAPHICS_OUTPUT_H__
#define __GRAPHICS_OUTPUT_H__
#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
{ \
0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \
}
typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
typedef struct {
UINT32 RedMask;
UINT32 GreenMask;
UINT32 BlueMask;
UINT32 ReservedMask;
} EFI_PIXEL_BITMASK;
typedef enum {
PixelRedGreenBlueReserved8BitPerColor,
PixelBlueGreenRedReserved8BitPerColor,
PixelBitMask,
PixelBltOnly,
PixelFormatMax
} EFI_GRAPHICS_PIXEL_FORMAT;
typedef struct {
UINT32 Version;
UINT32 HorizontalResolution;
UINT32 VerticalResolution;
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
EFI_PIXEL_BITMASK PixelInformation;
UINT32 PixelsPerScanLine;
} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
/**
Return the current video mode information.
@param This Protocol instance pointer.
@param ModeNumber The mode number to return information on.
@param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
@param Info A pointer to callee allocated buffer that returns information about ModeNumber.
@retval EFI_SUCCESS Mode information returned.
@retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
@retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber,
OUT UINTN *SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
)
;
/**
Return the current video mode information.
@param This Protocol instance pointer.
@param ModeNumber The mode number to be set.
@retval EFI_SUCCESS Graphics mode was changed.
@retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
@retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber
)
;
typedef struct {
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_UNION;
typedef enum {
EfiBltVideoFill,
EfiBltVideoToBltBuffer,
EfiBltBufferToVideo,
EfiBltVideoToVideo,
EfiGraphicsOutputBltOperationMax
} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
/**
The following table defines actions for BltOperations:
<B>EfiBltVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
directly to every pixel of the video display rectangle
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
Only one pixel will be used from the BltBuffer. Delta is NOT used.
<B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
the BltBuffer rectangle (DestinationX, DestinationY )
(DestinationX + Width, DestinationY + Height). If DestinationX or
DestinationY is not zero then Delta must be set to the length in bytes
of a row in the BltBuffer.
<B>EfiBltBufferToVideo</B> - Write data from the BltBuffer rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
video display rectangle (DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
not zero then Delta must be set to the length in bytes of a row in the
BltBuffer.
<B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
(SourceX + Width, SourceY + Height) .to the video display rectangle
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
The BltBuffer and Delta are not used in this mode.
@param This Protocol instance pointer.
@param BltBuffer Buffer containing data to blit into video buffer. This
buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
@param BltOperation Operation to perform on BlitBuffer and video memory
@param SourceX X coordinate of source for the BltBuffer.
@param SourceY Y coordinate of source for the BltBuffer.
@param DestinationX X coordinate of destination for the BltBuffer.
@param DestinationY Y coordinate of destination for the BltBuffer.
@param Width Width of rectangle in BltBuffer in pixels.
@param Height Hight of rectangle in BltBuffer in pixels.
@param Delta OPTIONAL
@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.
**/
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_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta OPTIONAL
);
typedef struct {
UINT32 MaxMode;
UINT32 Mode;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
UINTN SizeOfInfo;
EFI_PHYSICAL_ADDRESS FrameBufferBase;
UINTN FrameBufferSize;
} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
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_MODE *Mode;
};
extern EFI_GUID gEfiGraphicsOutputProtocolGuid;
#endif

View File

@ -1,149 +0,0 @@
/** @file
EFI_HASH_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
EFI_HASH_PROTOCOL as defined in UEFI 2.0.
The EFI Hash Service Binding Protocol is used to locate hashing services support
provided by a driver and create and destroy instances of the EFI Hash Protocol
so that a multiple drivers can use the underlying hashing services.
The EFI Service Binding Protocol defines the generic Service Binding Protocol functions.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Hash.h
**/
#ifndef __EFI_HASH_PROTOCOL_H__
#define __EFI_HASH_PROTOCOL_H__
#define EFI_HASH_SERVICE_BINDING_PROTOCOL \
{ \
0x42881c98, 0xa4f3, 0x44b0, {0xa3, 0x9d, 0xdf, 0xa1, 0x86, 0x67, 0xd8, 0xcd } \
}
#define EFI_HASH_PROTOCOL_GUID \
{ \
0xc5184932, 0xdba5, 0x46db, {0xa5, 0xba, 0xcc, 0x0b, 0xda, 0x9c, 0x14, 0x35 } \
}
#define EFI_HASH_ALGORITHM_SHA1_GUID \
{ \
0x2ae9d80f, 0x3fb2, 0x4095, {0xb7, 0xb1, 0xe9, 0x31, 0x57, 0xb9, 0x46, 0xb6 } \
}
#define EFI_HASH_ALGORITHM_SHA224_GUID \
{ \
0x8df01a06, 0x9bd5, 0x4bf7, {0xb0, 0x21, 0xdb, 0x4f, 0xd9, 0xcc, 0xf4, 0x5b } \
}
#define EFI_HASH_ALGORITHM_SHA256_GUID \
{ \
0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
}
#define EFI_HASH_ALGORITHM_SHA384_GUID \
{ \
0xefa96432, 0xde33, 0x4dd2, {0xae, 0xe6, 0x32, 0x8c, 0x33, 0xdf, 0x77, 0x7a } \
}
#define EFI_HASH_ALGORITHM_SHA512_GUID \
{ \
0xcaa4381e, 0x750c, 0x4770, {0xb8, 0x70, 0x7a, 0x23, 0xb4, 0xe4, 0x21, 0x30 } \
}
#define EFI_HASH_ALGORTIHM_MD5_GUID \
{ \
0xaf7c79c, 0x65b5, 0x4319, {0xb0, 0xae, 0x44, 0xec, 0x48, 0x4e, 0x4a, 0xd7 } \
}
typedef struct _EFI_HASH_PROTOCOL EFI_HASH_PROTOCOL;
typedef UINT8 EFI_MD5_HASH[16];
typedef UINT8 EFI_SHA1_HASH[20];
typedef UINT8 EFI_SHA224_HASH[28];
typedef UINT8 EFI_SHA256_HASH[32];
typedef UINT8 EFI_SHA384_HASH[48];
typedef UINT8 EFI_SHA512_HASH[64];
typedef union {
EFI_MD5_HASH *Md5Hash;
EFI_SHA1_HASH *Sha1Hash;
EFI_SHA224_HASH *Sha224Hash;
EFI_SHA256_HASH *Sha256Hash;
EFI_SHA384_HASH *Sha384Hash;
EFI_SHA512_HASH *Sha512Hash;
} EFI_HASH_OUTPUT;
/**
Returns the size of the hash which results from a specific algorithm.
@param This Points to this instance of EFI_HASH_PROTOCOL.
@param HashAlgorithm Points to the EFI_GUID which identifies the algorithm to use.
@param HashSize Holds the returned size of the algorithm<68><6D>s hash.
@retval EFI_SUCCESS Hash size returned successfully.
@retval EFI_INVALID_PARAMETER HashSize is NULL
@retval EFI_UNSUPPORTED The algorithm specified by HashAlgorithm is not supported
by this driver.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_HASH_GET_HASH_SIZE) (
IN CONST EFI_HASH_PROTOCOL *This,
IN CONST EFI_GUID *HashAlgorithm,
OUT UINTN *HashSize
)
;
/**
Returns the size of the hash which results from a specific algorithm.
@param This Points to this instance of EFI_HASH_PROTOCOL.
@param HashAlgorithm Points to the EFI_GUID which identifies the algorithm to use.
@param Extend Specifies whether to create a new hash (FALSE) or extend the specified
existing hash (TRUE).
@param Message Points to the start of the message.
@param MessageSize The size of Message, in bytes.
@param Hash On input, if Extend is TRUE, then this holds the hash to extend. On
output, holds the resulting hash computed from the message.
@retval EFI_SUCCESS Hash returned successfully.
@retval EFI_INVALID_PARAMETER Message or Hash is NULL
@retval EFI_UNSUPPORTED The algorithm specified by HashAlgorithm is not supported by this
driver. Or extend is TRUE and the algorithm doesn<73><6E>t support extending the hash.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_HASH_HASH) (
IN CONST EFI_HASH_PROTOCOL *This,
IN CONST EFI_GUID *HashAlgorithm,
IN BOOLEAN Extend,
IN CONST UINT8 *Message,
IN UINT64 MessageSize,
IN OUT EFI_HASH_OUTPUT *Hash
)
;
struct _EFI_HASH_PROTOCOL {
EFI_HASH_GET_HASH_SIZE GetHashSize;
EFI_HASH_HASH Hash;
};
extern EFI_GUID gEfiHashServiceBindingProtocolGuid;
extern EFI_GUID gEfiHashProtocolGuid;
extern EFI_GUID gEfiHashAlgorithmSha1Guid;
extern EFI_GUID gEfiHashAlgorithmSha224Guid;
extern EFI_GUID gEfiHashAlgorithmSha256Guid;
extern EFI_GUID gEfiHashAlgorithmSha384Guid;
extern EFI_GUID gEfiHashAlgorithmSha512Guid;
extern EFI_GUID gEfiHashAlgorithmMD5Guid;
#endif

View File

@ -1,411 +0,0 @@
/** @file
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: IP4.h
**/
#ifndef __EFI_IP4_PROTOCOL_H__
#define __EFI_IP4_PROTOCOL_H__
#define EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID \
{ \
0xc51711e7, 0xb4bf, 0x404a, {0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } \
}
#define EFI_IP4_PROTOCOL_GUID \
{ \
0x41d94cd2, 0x35b6, 0x455a, {0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } \
}
typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL;
typedef struct {
EFI_IPv4_ADDRESS Ip4Address;
EFI_IPv4_ADDRESS SubnetMask;
} EFI_IP4_ADDRESS_PAIR;
typedef struct {
EFI_HANDLE DriverHandle;
UINT32 AddressCount;
EFI_IP4_ADDRESS_PAIR AddressPairs[1];
} EFI_IP4_VARIABLE_DATA;
typedef struct {
UINT8 DefaultProtocol;
BOOLEAN AcceptAnyProtocol;
BOOLEAN AcceptIcmpErrors;
BOOLEAN AcceptBroadcast;
BOOLEAN AcceptPromiscuous;
BOOLEAN UseDefaultAddress;
EFI_IPv4_ADDRESS StationAddress;
EFI_IPv4_ADDRESS SubnetMask;
UINT8 TypeOfService;
UINT8 TimeToLive;
BOOLEAN DoNotFragment;
BOOLEAN RawData;
UINT32 ReceiveTimeout;
UINT32 TransmitTimeout;
} EFI_IP4_CONFIG_DATA;
typedef struct {
EFI_IPv4_ADDRESS SubnetAddress;
EFI_IPv4_ADDRESS SubnetMask;
EFI_IPv4_ADDRESS GatewayAddress;
} EFI_IP4_ROUTE_TABLE;
typedef struct {
UINT8 Type;
UINT8 Code;
} EFI_IP4_ICMP_TYPE;
typedef struct {
BOOLEAN IsStarted;
EFI_IP4_CONFIG_DATA ConfigData;
BOOLEAN IsConfigured;
UINT32 GroupCount;
EFI_IPv4_ADDRESS *GroupTable;
UINT32 RouteCount;
EFI_IP4_ROUTE_TABLE *RouteTable;
UINT32 IcmpTypeCount;
EFI_IP4_ICMP_TYPE *IcmpTypeList;
} EFI_IP4_MODE_DATA;
#pragma pack(1)
typedef struct {
#ifdef EFI_NET_LITTLE_ENDIAN
UINT8 HeaderLength:4;
UINT8 Version:4;
#else
UINT8 Version:4;
UINT8 HeaderLength:4;
#endif
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;
} 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_IP4_RECEIVE_DATA;
typedef struct {
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_IP4_TRANSMIT_DATA;
typedef struct {
EFI_EVENT Event;
EFI_STATUS Status;
union {
EFI_IP4_RECEIVE_DATA *RxData;
EFI_IP4_TRANSMIT_DATA *TxData;
} Packet;
} EFI_IP4_COMPLETION_TOKEN;
/**
Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param Ip4ModeData Pointer to the EFI IPv4 Protocol mode data structure.
@param MnpConfigData Pointer to the managed network configuration data structure.
@param SnpData Pointer to the simple network mode data structure.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_GET_MODE_DATA) (
IN EFI_IP4_PROTOCOL *This,
OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
)
;
/**
Assigns an IPv4 address and subnet mask to this EFI IPv4 Protocol driver instance.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param IpConfigData Pointer to the EFI IPv4 Protocol configuration data structure.
@retval EFI_SUCCESS The driver instance was successfully opened.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
@retval EFI_UNSUPPORTED One or more of the following conditions is TRUE:
A configuration protocol (DHCP, BOOTP, RARP, etc.) could
not be located when clients choose to use the default IPv4
address. This EFI IPv4 Protocol implementation does not
support this requested filter or timeout setting.
@retval EFI_OUT_OF_RESOURCES The EFI IPv4 Protocol driver instance data could not be allocated.
@retval EFI_ALREADY_STARTED The interface is already open and must be stopped before the
IPv4 address or subnet mask can be changed. The interface must
also be stopped when switching to/from raw packet mode.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI IPv4
Protocol driver instance is not opened.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_CONFIGURE) (
IN EFI_IP4_PROTOCOL *This,
IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL
)
;
/**
Joins and leaves multicast groups.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave.
@param GroupAddress Pointer to the IPv4 multicast address.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER One or more of the following is TRUE:
- This is NULL.
- JoinFlag is TRUE and GroupAddress is NULL.
- GroupAddress is not NULL and *GroupAddress is
not a multicast IPv4 address.
@retval EFI_NOT_STARTED This instance has not been started.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_OUT_OF_RESOURCES System resources could not be allocated.
@retval EFI_UNSUPPORTED This EFI IPv4 Protocol implementation does not support multicast groups.
@retval EFI_ALREADY_STARTED The group address is already in the group table (when
JoinFlag is TRUE).
@retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is FALSE).
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_GROUPS) (
IN EFI_IP4_PROTOCOL *This,
IN BOOLEAN JoinFlag,
IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
)
;
/**
Adds and deletes routing table entries.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param DeleteRoute Set to TRUE to delete this route from the routing table. Set to
FALSE to add this route to the routing table. SubnetAddress
and SubnetMask are used as the key to each route entry.
@param SubnetAddress The address of the subnet that needs to be routed.
@param SubnetMask The subnet mask of SubnetAddress.
@param GatewayAddress The unicast gateway IPv4 address for this route.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_NOT_STARTED The driver instance has not been started.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- SubnetAddress is NULL.
- SubnetMask is NULL.
- GatewayAddress is NULL.
- *SubnetAddress is not a valid subnet address.
- *SubnetMask is not a valid subnet mask.
- *GatewayAddress is not a valid unicast IPv4 address.
@retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table.
@retval EFI_NOT_FOUND This route is not in the routing table (when DeleteRoute is TRUE).
@retval EFI_ACCESS_DENIED The route is already defined in the routing table (when
DeleteRoute is FALSE).
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_ROUTES) (
IN EFI_IP4_PROTOCOL *This,
IN BOOLEAN DeleteRoute,
IN EFI_IPv4_ADDRESS *SubnetAddress,
IN EFI_IPv4_ADDRESS *SubnetMask,
IN EFI_IPv4_ADDRESS *GatewayAddress
)
;
/**
Places outgoing data packets into the transmit queue.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param Token Pointer to the transmit token.
@retval EFI_SUCCESS The data has been queued for transmission.
@retval EFI_NOT_STARTED This instance has not been started.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_INVALID_PARAMETER One or more pameters are invalid.
@retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event
was already in the transmit queue.
@retval EFI_NOT_READY The completion token could not be queued because the transmit
queue is full.
@retval EFI_NOT_FOUND Not route is found to destination address.
@retval EFI_OUT_OF_RESOURCES Could not queue the transmit data.
@retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too
short to transmit.
@retval EFI_BAD_BUFFER_SIZE The length of the IPv4 header + option length + total data length is
greater than MTU (or greater than the maximum packet size if
Token.Packet.TxData.OverrideData.
DoNotFragment is TRUE.)
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_TRANSMIT) (
IN EFI_IP4_PROTOCOL *This,
IN EFI_IP4_COMPLETION_TOKEN *Token
)
;
/**
Places a receiving request into the receiving queue.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param Token Pointer to a token that is associated with the receive data descriptor.
@retval EFI_SUCCESS The receive completion token was cached.
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, RARP, etc.)
is not finished yet.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- Token is NULL.
- Token.Event is NULL.
@retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system
resources (usually memory).
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
The EFI IPv4 Protocol instance has been reset to startup defaults.
EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already
in the receive queue.
@retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
@retval EFI_ICMP_ERROR An ICMP error packet was received.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_RECEIVE) (
IN EFI_IP4_PROTOCOL *This,
IN EFI_IP4_COMPLETION_TOKEN *Token
)
;
/**
Abort an asynchronous transmit or receive request.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@param Token Pointer to a token that has been issued by
EFI_IP4_PROTOCOL.Transmit() or
EFI_IP4_PROTOCOL.Receive(). If NULL, all pending
tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is
defined in EFI_IP4_PROTOCOL.Transmit().
@retval EFI_SUCCESS The asynchronous I/O request was aborted and
Token.->Event was signaled. When Token is NULL, all
pending requests were aborted and their events were signaled.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_STARTED This instance has not been started.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was
not found in the transmit or receive queue. It has either completed
or was not issued by Transmit() and Receive().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_CANCEL) (
IN EFI_IP4_PROTOCOL *This,
IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
)
;
/**
Polls for incoming data packets and processes outgoing data packets.
@param This Pointer to the EFI_IP4_PROTOCOL instance.
@retval EFI_SUCCESS Incoming or outgoing data was processed.
@retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started.
@retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
@retval EFI_NOT_READY No incoming or outgoing data is processed.
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
Consider increasing the polling rate.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_POLL) (
IN EFI_IP4_PROTOCOL *This
)
;
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;
};
extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid;
extern EFI_GUID gEfiIp4ProtocolGuid;
#endif

View File

@ -1,121 +0,0 @@
/** @file
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: IP4Config.h
**/
#ifndef __EFI_IP4CONFIG_PROTOCOL_H__
#define __EFI_IP4CONFIG_PROTOCOL_H__
#define EFI_IP4_CONFIG_PROTOCOL_GUID \
{ \
0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } \
}
typedef struct _EFI_IP4_CONFIG_PROTOCOL EFI_IP4_CONFIG_PROTOCOL;
#define IP4_CONFIG_VARIABLE_ATTRIBUTES \
(EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | \
EFI_VARIABLE_RUNTIME_ACCESS )
typedef struct {
EFI_IPv4_ADDRESS StationAddress;
EFI_IPv4_ADDRESS SubnetMask;
UINT32 RouteTableSize;
EFI_IP4_ROUTE_TABLE *RouteTable; //OPTIONAL
} EFI_IP4_IPCONFIG_DATA;
/**
Starts running the configuration policy for the EFI IPv4 Protocol driver.
@param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
@param DoneEvent Event that will be signaled when the EFI IPv4 Protocol driver
configuration policy completes execution. This event must be of
type EVT_NOTIFY_SIGNAL.
@param ReconfigEvent Event that will be signaled when the EFI IPv4 Protocol driver
configuration needs to be updated. This event must be of type
EVT_NOTIFY_SIGNAL.
@retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol driver is now
running.
@retval EFI_INVALID_PARAMETER This, DoneEvent, or ReconfigEvent is NULL.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol driver was
already started.
@retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
@retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol driver
configuration.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_CONFIG_START) (
IN EFI_IP4_CONFIG_PROTOCOL *This,
IN EFI_EVENT DoneEvent,
IN EFI_EVENT ReconfigEvent
)
;
/**
Stops running the configuration policy for the EFI IPv4 Protocol driver.
@param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
@retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol driver has been stopped.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol driver was not started.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_CONFIG_STOP) (
IN EFI_IP4_CONFIG_PROTOCOL *This
)
;
/**
Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.
@param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
@param IpConfigDataSize On input, the size of the IpConfigData buffer.
On output, the count of bytes that were written into the IpConfigData buffer.
@param IpConfigData Pointer to the EFI IPv4 Configuration Protocol driver
configuration data structure.
@retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol driver is not
running.
@retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running.
@retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete.
@retval EFI_BUFFER_TOO_SMALL *IpConfigDataSize is smaller than the configuration data
buffer or IpConfigData is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IP4_CONFIG_GET_DATA) (
IN EFI_IP4_CONFIG_PROTOCOL *This,
IN OUT UINTN *IpConfigDataSize,
OUT EFI_IP4_IPCONFIG_DATA *IpConfigData OPTIONAL
)
;
struct _EFI_IP4_CONFIG_PROTOCOL {
EFI_IP4_CONFIG_START Start;
EFI_IP4_CONFIG_STOP Stop;
EFI_IP4_CONFIG_GET_DATA GetData;
};
extern EFI_GUID gEfiIp4ConfigProtocolGuid;
#endif

View File

@ -1,92 +0,0 @@
/** @file
EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.
It rovides the ability to get and set the iSCSI Initiator Name.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: IScsiInitatorName.h
**/
#ifndef __ISCSI_INITIATOR_NAME_H__
#define __ISCSI_INITIATOR_NAME_H__
#define EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID \
{ \
0xa6a72875, 0x2962, 0x4c18, {0x9f, 0x46, 0x8d, 0xa6, 0x44, 0xcc, 0xfe } \
}
typedef struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL EFI_ISCSI_INITIATOR_NAME_PROTOCOL;
/**
Retrieves the current set value of iSCSI Initiator Name.
@param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
@param BufferSize Size of the buffer in bytes pointed to by Buffer / Actual size of the
variable data buffer.
@param Buffer Pointer to the buffer for data to be read.
@retval EFI_SUCCESS Data was successfully retrieved into the provided buffer and the
BufferSize was sufficient to handle the iSCSI initiator name
@retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result.
@retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
@retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET) (
IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
;
/**
Sets the iSCSI Initiator Name.
@param This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
@param BufferSize Size of the buffer in bytes pointed to by Buffer.
@param Buffer Pointer to the buffer for data to be written.
@retval EFI_SUCCESS Data was successfully stored by the protocol.
@retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.
@retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.
@retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.
@retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720
(and other related protocols)
**/
typedef EFI_STATUS
(EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET) (
IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
)
;
struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {
EFI_ISCSI_INITIATOR_NAME_GET Get;
EFI_ISCSI_INITIATOR_NAME_SET Set;
};
extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;
#endif

View File

@ -1,485 +0,0 @@
/** @file
This file declares EFI IDE Controller Init Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: IdeControllerInit.h
@par Revision Reference:
This Protocol is defined in IDE Controller Initialization Protocol Specification
Version 0.9
**/
#ifndef _EFI_IDE_CONTROLLER_INIT_PROTOCOL_H
#define _EFI_IDE_CONTROLLER_INIT_PROTOCOL_H
//
// Global ID for the EFI Platform IDE Protocol GUID
//
#define EFI_IDE_CONTROLLER_INIT_PROTOCOL_GUID \
{ 0xa1e37052, 0x80d9, 0x4e65, {0xa3, 0x17, 0x3e, 0x9a, 0x55, 0xc4, 0x3e, 0xc9 } }
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL EFI_IDE_CONTROLLER_INIT_PROTOCOL;
//
//////////////////////////////////////////////////////////////////////////////////////////
// EFI_IDE_BUS_ENUMERATION_PHASE
// EFI_IDE_CONTROLLER_ENUM_PHASE
//
typedef enum{
EfiIdeBeforeChannelEnumeration,
EfiIdeAfterChannelEnumeration,
EfiIdeBeforeChannelReset,
EfiIdeAfterChannelReset,
EfiIdeBusBeforeDevicePresenceDetection,
EfiIdeBusAfterDevicePresenceDetection,
EfiIdeResetMode,
EfiIdeBusPhaseMaximum
} EFI_IDE_CONTROLLER_ENUM_PHASE;
//
//******************************************************
// EFI_ATA_EXT_TRANSFER_PROTOCOL
//******************************************************
//
// This extended mode describes the SATA physical protocol.
// SATA physical layers can operate at different speeds.
// These speeds are defined below. Various PATA protocols
// and associated modes are not applicable to SATA devices.
//
typedef enum {
EfiAtaSataTransferProtocol
} EFI_ATA_EXT_TRANSFER_PROTOCOL;
#define EFI_SATA_AUTO_SPEED 0
#define EFI_SATA_GEN1_SPEED 1
#define EFI_SATA_GEN2_SPEED 2
//
//*******************************************************
// EFI_IDE_CABLE_TYPE
//*******************************************************
//
typedef enum {
EfiIdeCableTypeUnknown,
EfiIdeCableType40pin,
EfiIdeCableType80Pin,
EfiIdeCableTypeSerial,
EfiIdeCableTypeMaximum
} EFI_IDE_CABLE_TYPE;
//
//******************************************************
// EFI_ATA_MODE
//******************************************************
//
typedef struct {
BOOLEAN Valid;
UINT32 Mode;
} EFI_ATA_MODE;
//
//******************************************************
// EFI_ATA_EXTENDED_MODE
//******************************************************
//
typedef struct {
EFI_ATA_EXT_TRANSFER_PROTOCOL TransferProtocol;
UINT32 Mode;
} EFI_ATA_EXTENDED_MODE;
//
//******************************************************
// EFI_ATA_COLLECTIVE_MODE
//******************************************************
//
typedef struct {
EFI_ATA_MODE PioMode;
EFI_ATA_MODE SingleWordDmaMode;
EFI_ATA_MODE MultiWordDmaMode;
EFI_ATA_MODE UdmaMode;
UINT32 ExtModeCount;
EFI_ATA_EXTENDED_MODE ExtMode[1];
} EFI_ATA_COLLECTIVE_MODE;
//
//*******************************************************
// EFI_ATA_IDENTIFY_DATA
//*******************************************************
//
#pragma pack(1)
typedef struct {
UINT16 config; // General Configuration
UINT16 cylinders; // Number of Cylinders
UINT16 reserved_2;
UINT16 heads; //Number of logical heads
UINT16 vendor_data1;
UINT16 vendor_data2;
UINT16 sectors_per_track;
UINT16 vendor_specific_7_9[3];
CHAR8 SerialNo[20]; // ASCII
UINT16 vendor_specific_20_21[2];
UINT16 ecc_bytes_available;
CHAR8 FirmwareVer[8]; // ASCII
CHAR8 ModelName[40]; // ASCII
UINT16 multi_sector_cmd_max_sct_cnt;
UINT16 reserved_48;
UINT16 capabilities;
UINT16 reserved_50;
UINT16 pio_cycle_timing;
UINT16 reserved_52;
UINT16 field_validity;
UINT16 current_cylinders;
UINT16 current_heads;
UINT16 current_sectors;
UINT16 CurrentCapacityLsb;
UINT16 CurrentCapacityMsb;
UINT16 reserved_59;
UINT16 user_addressable_sectors_lo;
UINT16 user_addressable_sectors_hi;
UINT16 reserved_62;
UINT16 multi_word_dma_mode;
UINT16 advanced_pio_modes;
UINT16 min_multi_word_dma_cycle_time;
UINT16 rec_multi_word_dma_cycle_time;
UINT16 min_pio_cycle_time_without_flow_control;
UINT16 min_pio_cycle_time_with_flow_control;
UINT16 reserved_69_79[11];
UINT16 major_version_no;
UINT16 minor_version_no;
UINT16 command_set_supported_82; // word 82
UINT16 command_set_supported_83; // word 83
UINT16 command_set_feature_extn; // word 84
UINT16 command_set_feature_enb_85; // word 85
UINT16 command_set_feature_enb_86; // word 86
UINT16 command_set_feature_default; // word 87
UINT16 ultra_dma_mode; // word 88
UINT16 reserved_89_127[39];
UINT16 security_status;
UINT16 vendor_data_129_159[31];
UINT16 reserved_160_255[96];
} EFI_ATA_IDENTIFY_DATA;
#pragma pack()
//
//*******************************************************
// EFI_ATAPI_IDENTIFY_DATA
//*******************************************************
//
#pragma pack(1)
typedef struct {
UINT16 config; // General Configuration
UINT16 obsolete_1;
UINT16 specific_config;
UINT16 obsolete_3;
UINT16 retired_4_5[2];
UINT16 obsolete_6;
UINT16 cfa_reserved_7_8[2];
UINT16 retired_9;
CHAR8 SerialNo[20]; // ASCII
UINT16 retired_20_21[2];
UINT16 obsolete_22;
CHAR8 FirmwareVer[8]; // ASCII
CHAR8 ModelName[40]; // ASCII
UINT16 multi_sector_cmd_max_sct_cnt;
UINT16 reserved_48;
UINT16 capabilities_49;
UINT16 capabilities_50;
UINT16 obsolete_51_52[2];
UINT16 field_validity;
UINT16 obsolete_54_58[5];
UINT16 mutil_sector_setting;
UINT16 user_addressable_sectors_lo;
UINT16 user_addressable_sectors_hi;
UINT16 obsolete_62;
UINT16 multi_word_dma_mode;
UINT16 advanced_pio_modes;
UINT16 min_multi_word_dma_cycle_time;
UINT16 rec_multi_word_dma_cycle_time;
UINT16 min_pio_cycle_time_without_flow_control;
UINT16 min_pio_cycle_time_with_flow_control;
UINT16 reserved_69_74[6];
UINT16 queue_depth;
UINT16 reserved_76_79[4];
UINT16 major_version_no;
UINT16 minor_version_no;
UINT16 cmd_set_support_82;
UINT16 cmd_set_support_83;
UINT16 cmd_feature_support;
UINT16 cmd_feature_enable_85;
UINT16 cmd_feature_enable_86;
UINT16 cmd_feature_default;
UINT16 ultra_dma_select;
UINT16 time_required_for_sec_erase;
UINT16 time_required_for_enhanced_sec_erase;
UINT16 current_advanced_power_mgmt_value;
UINT16 master_pwd_revison_code;
UINT16 hardware_reset_result;
UINT16 current_auto_acoustic_mgmt_value;
UINT16 reserved_95_99[5];
UINT16 max_user_lba_for_48bit_addr[4];
UINT16 reserved_104_126[23];
UINT16 removable_media_status_notification_support;
UINT16 security_status;
UINT16 vendor_data_129_159[31];
UINT16 cfa_power_mode;
UINT16 cfa_reserved_161_175[15];
UINT16 current_media_serial_no[30];
UINT16 reserved_206_254[49];
UINT16 integrity_word;
} EFI_ATAPI_IDENTIFY_DATA;
#pragma pack()
//
//*******************************************************
// EFI_IDENTIFY_DATA
//*******************************************************
//
typedef union {
EFI_ATA_IDENTIFY_DATA AtaData;
EFI_ATAPI_IDENTIFY_DATA AtapiData;
} EFI_IDENTIFY_DATA;
#define EFI_ATAPI_DEVICE_IDENTIFY_DATA 0x8000
//
/////////////////////////////////////////////////////////////////////////////////////////
// Function prototype declaration, for ANSI compatability
//
/**
Returns the information about the specified IDE channel.
@param This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param Channel Zero-based channel number.
@param Enabled TRUE if this channel is enabled. Disabled channels are not scanned
to see if any devices are present.
@param MaxDevices The maximum number of IDE devices that the bus driver
can expect on this channel.
@retval EFI_SUCCESS Information was returned without any errors.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IDE_CONTROLLER_GET_CHANNEL_INFO) (
IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,
IN UINT8 Channel,
OUT BOOLEAN *Enabled,
OUT UINT8 *MaxDevices
);
/**
The notifications from the IDE bus driver that it is about to enter a certain
phase of the IDE channel enumeration process.
@param This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param Phase The phase during enumeration.
@param Channel Zero-based channel number.
@retval EFI_SUCCESS The notification was accepted without any errors.
@retval EFI_NOT_SUPPORTED Phase is not supported.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_NOT_READY This phase cannot be entered at this time.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IDE_CONTROLLER_NOTIFY_PHASE) (
IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,
IN EFI_IDE_CONTROLLER_ENUM_PHASE Phase,
IN UINT8 Channel
);
/**
Submits the device information to the IDE controller driver.
@param This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param Channel Zero-based channel number.
@param Device Zero-based device number on the Channel.
@param IdentifyData The device<63><65>s response to the ATA IDENTIFY_DEVICE command.
@retval EFI_SUCCESS The information was accepted without any errors.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
Or Device is invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IDE_CONTROLLER_SUBMIT_DATA) (
IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,
IN UINT8 Channel,
IN UINT8 Device,
IN EFI_IDENTIFY_DATA *IdentifyData
);
/**
Disqualifies specific modes for an IDE device.
@param This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param Channel Zero-based channel number.
@param Device Zero-based device number on the Channel.
@param BadModes The modes that the device does not support and that
should be disqualified.
@retval EFI_SUCCESS The modes were accepted without any errors.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
Or Device is invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IDE_CONTROLLER_DISQUALIFY_MODE) (
IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,
IN UINT8 Channel,
IN UINT8 Device,
IN EFI_ATA_COLLECTIVE_MODE *BadModes
);
/**
Returns the information about the optimum modes for the specified IDE device.
@param This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param Channel Zero-based channel number.
@param Device Zero-based device number on the Channel.
@param SupportedModes The optimum modes for the device.
@retval EFI_SUCCESS SupportedModes was returned.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
Or Device is invalid. Or SupportedModes is NULL.
@retval EFI_NOT_READY Modes cannot be calculated due to a lack of data.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IDE_CONTROLLER_CALCULATE_MODE) (
IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,
IN UINT8 Channel,
IN UINT8 Device,
OUT EFI_ATA_COLLECTIVE_MODE **SupportedModes
);
/**
Commands the IDE controller driver to program the IDE controller hardware
so that the specified device can operate at the specified mode.
@param This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param Channel Zero-based channel number.
@param Device Zero-based device number on the Channel.
@param Modes The modes to set.
@retval EFI_SUCCESS The command was accepted without any errors.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
Or Device is invalid.
@retval EFI_NOT_READY Modes cannot be set at this time due to lack of data.
@retval EFI_DEVICE_ERROR Modes cannot be set due to hardware failure.
The IDE bus driver should not use this device.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_IDE_CONTROLLER_SET_TIMING) (
IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,
IN UINT8 Channel,
IN UINT8 Device,
IN EFI_ATA_COLLECTIVE_MODE *Modes
);
//
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface structure
// EFI_IDE_CONTROLLER_INIT_PROTOCOL protocol provides the chipset specific information to the IDE bus driver.
// An IDE Bus driver wants to manage an IDE bus and possible IDE devices will have to retrieve the
// EFI_IDE_CONTROLLER_INIT_PROTOCOL instances.
//
/**
@par Protocol Description:
Provides the basic interfaces to abstract an IDE controller.
@param GetChannelInfo
Returns the information about a specific channel.
@param NotifyPhase
The notification that the IDE bus driver is about to enter the
specified phase during the enumeration process.
@param SubmitData
Submits the Drive Identify data that was returned by the device.
@param DisqualifyMode
Submits information about modes that should be disqualified.
@param CalculateMode
Calculates and returns the optimum mode for a particular IDE device.
@param SetTiming
Programs the IDE controller hardware to the default timing or per the modes
that were returned by the last call to CalculateMode().
@param EnumAll
Set to TRUE if the enumeration group includes all the channels that are
produced by this controller. FALSE if an enumeration group consists of
only one channel.
@param ChannelCount
The number of channels that are produced by this controller.
**/
struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL {
EFI_IDE_CONTROLLER_GET_CHANNEL_INFO GetChannelInfo;
EFI_IDE_CONTROLLER_NOTIFY_PHASE NotifyPhase;
EFI_IDE_CONTROLLER_SUBMIT_DATA SubmitData;
EFI_IDE_CONTROLLER_DISQUALIFY_MODE DisqualifyMode;
EFI_IDE_CONTROLLER_CALCULATE_MODE CalculateMode;
EFI_IDE_CONTROLLER_SET_TIMING SetTiming;
BOOLEAN EnumAll;
UINT8 ChannelCount;
};
extern EFI_GUID gEfiIdeControllerInitProtocolGuid;
#endif

View File

@ -1,84 +0,0 @@
/** @file
This file declares EFI Incompatible PCI Device Support Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: IncompatiblePciDeviceSupport.h
@par Revision Reference:
This protocol is defined in Framework of EFI PCI Platform Support Specification.
Version0.9
**/
#ifndef _INCOMPATIBLE_PCI_DEVICE_SUPPORT_H_
#define _INCOMPATIBLE_PCI_DEVICE_SUPPORT_H_
#define EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL_GUID \
{0xeb23f55a, 0x7863, 0x4ac2, {0x8d, 0x3d, 0x95, 0x65, 0x35, 0xde, 0x03, 0x75} }
typedef struct _EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL;
/**
Returns a list of ACPI resource descriptors that detail the special
resource configuration requirements for an incompatible PCI device.
@param This Pointer to the EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL instance.
@param VendorID A unique ID to identify the manufacturer of the PCI device.
@param DeviceID A unique ID to identify the particular PCI device.
@param RevisionID A PCI device-specific revision identifier.
@param SubsystemVendorId Specifies the subsystem vendor ID.
@param SubsystemDeviceId Specifies the subsystem device ID.
@param Configuration A list of ACPI resource descriptors that detail
the configuration requirement.
@retval EFI_SUCCESS The function always returns EFI_SUCCESS.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_CHECK_DEVICE) (
IN EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL *This,
IN UINTN VendorId,
IN UINTN DeviceId,
IN UINTN Revision,
IN UINTN SubVendorId,OPTIONAL
IN UINTN SubDeviceId,OPTIONAL
OUT VOID **Configuration
);
//
// Interface structure for the Incompatible PCI Device Support Protocol
//
/**
@par Protocol Description:
This protocol can find some incompatible PCI devices and report their
special resource requirements to the PCI bus driver.
@param CheckDevice
Returns a list of ACPI resource descriptors that detail any special
resource configuration requirements if the specified device is a recognized
incompatible PCI device.
**/
struct _EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL {
EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_CHECK_DEVICE CheckDevice;
};
extern EFI_GUID gEfiIncompatiblePciDeviceSupportProtocolGuid;
#endif

View File

@ -1,307 +0,0 @@
/** @file
This protocol abstracts the 8259 interrupt controller. This includes
PCI IRQ routing need to program the PCI Interrupt Line register.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Legacy8259.h
@par Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec
Version 0.96
**/
#ifndef _EFI_LEGACY_8259_H
#define _EFI_LEGACY_8259_H
#define EFI_LEGACY_8259_PROTOCOL_GUID \
{ \
0x38321dba, 0x4fe0, 0x4e17, {0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed, 0xc1 } \
}
typedef struct _EFI_LEGACY_8259_PROTOCOL EFI_LEGACY_8259_PROTOCOL;
typedef enum {
Efi8259Irq0,
Efi8259Irq1,
Efi8259Irq2,
Efi8259Irq3,
Efi8259Irq4,
Efi8259Irq5,
Efi8259Irq6,
Efi8259Irq7,
Efi8259Irq8,
Efi8259Irq9,
Efi8259Irq10,
Efi8259Irq11,
Efi8259Irq12,
Efi8259Irq13,
Efi8259Irq14,
Efi8259Irq15,
Efi8259IrqMax
} EFI_8259_IRQ;
typedef enum {
Efi8259LegacyMode,
Efi8259ProtectedMode,
Efi8259MaxMode
} EFI_8259_MODE;
/**
Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
the legacy mode mask and the protected mode mask. The base address for the 8259
is different for legacy and protected mode, so two masks are required.
@param This Protocol instance pointer.
@param MasterBase The base vector for the Master PIC in the 8259 controller
@param Slavebase The base vector for the Master PIC in the 8259 controller
@retval EFI_SUCCESS The new bases were programmed
@retval EFI_DEVICE_ERROR A device erro occured programming the vector bases
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_SET_VECTOR_BASE) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN UINT8 MasterBase,
IN UINT8 SlaveBase
)
;
/**
Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
the legacy mode mask and the protected mode mask. The base address for the 8259
is different for legacy and protected mode, so two masks are required.
@param This Protocol instance pointer.
@param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15
@param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15
@param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15
@param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15
@retval EFI_SUCCESS 8259 status returned
@retval EFI_DEVICE_ERROR Error reading 8259
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_GET_MASK) (
IN EFI_LEGACY_8259_PROTOCOL *This,
OUT UINT16 *LegacyMask, OPTIONAL
OUT UINT16 *LegacyEdgeLevel, OPTIONAL
OUT UINT16 *ProtectedMask, OPTIONAL
OUT UINT16 *ProtectedEdgeLevel OPTIONAL
)
;
/**
Set the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
the legacy mode mask and the protected mode mask. The base address for the 8259
is different for legacy and protected mode, so two masks are required.
Also set the edge/level masks.
@param This Protocol instance pointer.
@param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15
@param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15
@param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15
@param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15
@retval EFI_SUCCESS 8259 status returned
@retval EFI_DEVICE_ERROR Error reading 8259
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_SET_MASK) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN UINT16 *LegacyMask, OPTIONAL
IN UINT16 *LegacyEdgeLevel, OPTIONAL
IN UINT16 *ProtectedMask, OPTIONAL
IN UINT16 *ProtectedEdgeLevel OPTIONAL
)
;
/**
Set the 8259 mode of operation. The base address for the 8259 is different for
legacy and protected mode. The legacy mode requires the master 8259 to have a
master base of 0x08 and the slave base of 0x70. The protected mode base locations
are not defined. Interrupts must be masked by the caller before this function
is called. The interrupt mask from the current mode is saved. The interrupt
mask for the new mode is Mask, or if Mask does not exist the previously saved
mask is used.
@param This Protocol instance pointer.
@param Mode Mode of operation. i.e. real mode or protected mode
@param Mask Optional interupt mask for the new mode.
@param EdgeLevel Optional trigger mask for the new mode.
@retval EFI_SUCCESS 8259 programmed
@retval EFI_DEVICE_ERROR Error writting to 8259
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_SET_MODE) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_MODE Mode,
IN UINT16 *Mask, OPTIONAL
IN UINT16 *EdgeLevel OPTIONAL
)
;
/**
Convert from IRQ to processor interrupt vector number.
@param This Protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15
@param Vector Processor vector number that matches Irq
@retval EFI_SUCCESS The Vector matching Irq is returned
@retval EFI_INVALID_PARAMETER Irq not valid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_GET_VECTOR) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq,
OUT UINT8 *Vector
)
;
/**
Enable Irq by unmasking interrupt in 8259
@param This Protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15
@param LevelTriggered TRUE if level triggered. FALSE if edge triggered.
@retval EFI_SUCCESS Irq enabled on 8259
@retval EFI_INVALID_PARAMETER Irq not valid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_ENABLE_IRQ) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq,
IN BOOLEAN LevelTriggered
)
;
/**
Disable Irq by masking interrupt in 8259
@param This Protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15
@retval EFI_SUCCESS Irq disabled on 8259
@retval EFI_INVALID_PARAMETER Irq not valid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_DISABLE_IRQ) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq
)
;
/**
PciHandle represents a PCI config space of a PCI function. Vector
represents Interrupt Pin (from PCI config space) and it is the data
that is programmed into the Interrupt Line (from the PCI config space)
register.
@param This Protocol instance pointer.
@param PciHandle PCI function to return vector for
@param Vector Vector for fucntion that matches
@retval EFI_SUCCESS A valid Vector is returned
@retval EFI_INVALID_PARAMETER PciHandle not valid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_GET_INTERRUPT_LINE) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_HANDLE PciHandle,
OUT UINT8 *Vector
)
;
/**
Send an EOI to 8259
@param This Protocol instance pointer.
@param Irq 8259 IRQ0 - IRQ15
@retval EFI_SUCCESS EOI successfully sent to 8259
@retval EFI_INVALID_PARAMETER Irq not valid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_8259_END_OF_INTERRUPT) (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq
)
;
/**
@par Protocol Description:
Abstracts the 8259 and APIC hardware control between EFI usage and
Compatibility16 usage.
@param SetVectorBase
Sets the vector bases for master and slave PICs.
@param GetMask
Gets IRQ and edge/level masks for 16-bit real mode and 32-bit protected mode.
@param SetMask
Sets the IRQ and edge\level masks for 16-bit real mode and 32-bit protected mode.
@param SetMode
Sets PIC mode to 16-bit real mode or 32-bit protected mode.
@param GetVector
Gets the base vector assigned to an IRQ.
@param EnableIrq
Enables an IRQ.
@param DisableIrq
Disables an IRQ.
@param GetInterruptLine
Gets an IRQ that is assigned to a PCI device.
@param EndOfInterrupt
Issues the end of interrupt command.
**/
struct _EFI_LEGACY_8259_PROTOCOL {
EFI_LEGACY_8259_SET_VECTOR_BASE SetVectorBase;
EFI_LEGACY_8259_GET_MASK GetMask;
EFI_LEGACY_8259_SET_MASK SetMask;
EFI_LEGACY_8259_SET_MODE SetMode;
EFI_LEGACY_8259_GET_VECTOR GetVector;
EFI_LEGACY_8259_ENABLE_IRQ EnableIrq;
EFI_LEGACY_8259_DISABLE_IRQ DisableIrq;
EFI_LEGACY_8259_GET_INTERRUPT_LINE GetInterruptLine;
EFI_LEGACY_8259_END_OF_INTERRUPT EndOfInterrupt;
};
extern EFI_GUID gEfiLegacy8259ProtocolGuid;
#endif

View File

@ -1,701 +0,0 @@
/** @file
The EFI Legacy BIOS Protocol is used to abstract legacy Option ROM usage
under EFI and Legacy OS boot.
Note: The names for EFI_IA32_REGISTER_SET elements were picked to follow
well known naming conventions.
Thunk - A thunk is a transition from one processor mode to another. A Thunk
is a transition from native EFI mode to 16-bit mode. A reverse thunk
would be a transition from 16-bit mode to native EFI mode.
You most likely should not use this protocol! Find the EFI way to solve the
problem to make your code portable
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: LegacyBios.h
@par Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec
Version 0.96
**/
#ifndef _EFI_LEGACY_BIOS_H
#define _EFI_LEGACY_BIOS_H
#define EFI_LEGACY_BIOS_PROTOCOL_GUID \
{ \
0xdb9a1e3d, 0x45cb, 0x4abb, {0x85, 0x3b, 0xe5, 0x38, 0x7f, 0xdb, 0x2e, 0x2d } \
}
typedef struct _EFI_LEGACY_BIOS_PROTOCOL EFI_LEGACY_BIOS_PROTOCOL;
//
// Convert from 32-bit address (_Adr) to Segment:Offset 16-bit form
//
#define EFI_SEGMENT(_Adr) (UINT16) ((UINT16) (((UINTN) (_Adr)) >> 4) & 0xf000)
#define EFI_OFFSET(_Adr) (UINT16) (((UINT16) ((UINTN) (_Adr))) & 0xffff)
#define BYTE_GRANULARITY 0x01
#define WORD_GRANULARITY 0x02
#define DWORD_GRANULARITY 0x04
#define QWORD_GRANULARITY 0x08
#define PARAGRAPH_GRANULARITY 0x10
#define CARRY_FLAG 0x01
//*********************************************************
// EFI_EFLAGS_REG
//*********************************************************
typedef struct {
UINT32 CF:1;
UINT32 Reserved1:1;
UINT32 PF:1;
UINT32 Reserved2:1;
UINT32 AF:1;
UINT32 Reserved3:1;
UINT32 ZF:1;
UINT32 SF:1;
UINT32 TF:1;
UINT32 IF:1;
UINT32 DF:1;
UINT32 OF:1;
UINT32 IOPL:2;
UINT32 NT:1;
UINT32 Reserved4:2;
UINT32 VM:1;
UINT32 Reserved5:14;
} EFI_EFLAGS_REG;
//*********************************************************
// EFI_DWORD_REGS
//*********************************************************
typedef struct {
UINT32 EAX;
UINT32 EBX;
UINT32 ECX;
UINT32 EDX;
UINT32 ESI;
UINT32 EDI;
EFI_EFLAGS_REG EFlags;
UINT16 ES;
UINT16 CS;
UINT16 SS;
UINT16 DS;
UINT16 FS;
UINT16 GS;
UINT32 EBP;
UINT32 ESP;
} EFI_DWORD_REGS;
//*******************************************
// EFI_FLAGS_REG
//*******************************************
typedef struct {
UINT16 CF:1;
UINT16 Reserved1:1;
UINT16 PF:1;
UINT16 Reserved2:1;
UINT16 AF:1;
UINT16 Reserved3:1;
UINT16 ZF:1;
UINT16 SF:1;
UINT16 TF:1;
UINT16 IF:1;
UINT16 DF:1;
UINT16 OF:1;
UINT16 IOPL:2;
UINT16 NT:1;
UINT16 Reserved4:1;
} EFI_FLAGS_REG;
//*********************************************************
// EFI_WORD_REGS
//*********************************************************
typedef struct {
UINT16 AX;
UINT16 ReservedAX;
UINT16 BX;
UINT16 ReservedBX;
UINT16 CX;
UINT16 ReservedCX;
UINT16 DX;
UINT16 ReservedDX;
UINT16 SI;
UINT16 ReservedSI;
UINT16 DI;
UINT16 ReservedDI;
EFI_FLAGS_REG Flags;
UINT16 ReservedFlags;
UINT16 ES;
UINT16 CS;
UINT16 SS;
UINT16 DS;
UINT16 FS;
UINT16 GS;
UINT16 BP;
UINT16 ReservedBP;
UINT16 SP;
UINT16 ReservedSP;
} EFI_WORD_REGS;
//*********************************************************
// EFI_BYTE_REGS
//*********************************************************
typedef struct {
UINT8 AL, AH;
UINT16 ReservedAX;
UINT8 BL, BH;
UINT16 ReservedBX;
UINT8 CL, CH;
UINT16 ReservedCX;
UINT8 DL, DH;
UINT16 ReservedDX;
} EFI_BYTE_REGS;
typedef union {
EFI_DWORD_REGS E;
EFI_WORD_REGS X;
EFI_BYTE_REGS H;
} EFI_IA32_REGISTER_SET;
#pragma pack(1)
//
// $EFI table created by Legacy16 code and consumed by EFI Legacy driver
//
typedef struct {
UINT32 Signature; // "$EFI"
UINT8 TableChecksum;
UINT8 TableLength;
UINT8 EfiMajorRevision;
UINT8 EfiMinorRevision;
UINT8 TableMajorRevision;
UINT8 TableMinorRevision;
UINT8 Reserved[2];
UINT16 Legacy16CallSegment;
UINT16 Legacy16CallOffset;
UINT16 PnPInstallationCheckSegment;
UINT16 PnPInstallationCheckOffset;
UINT32 EfiSystemTable;
UINT32 OemStringPointer;
UINT32 AcpiRsdPtrPointer;
UINT16 OemRevision;
UINT32 E820Pointer;
UINT32 E820Length;
UINT32 IrqRoutingTablePointer;
UINT32 IrqRoutingTableLength;
UINT32 MpTablePtr;
UINT32 MpTableLength;
UINT16 OemIntSegment;
UINT16 OemIntOffset;
UINT16 Oem32Segment;
UINT16 Oem32Offset;
UINT16 Oem16Segment;
UINT16 Oem16Offset;
UINT16 TpmSegment;
UINT16 TpmOffset;
UINT32 IbvPointer;
UINT32 PciExpressBase;
UINT8 LastPciBus;
} EFI_COMPATIBILITY16_TABLE;
//
// define maximum number of HDD system supports
//
#define MAX_HDD_ENTRIES 0x30
typedef struct {
UINT16 Raw[256];
} ATAPI_IDENTIFY;
//
// HDD_INFO status
//
#define HDD_PRIMARY 0x01
#define HDD_SECONDARY 0x02
#define HDD_MASTER_ATAPI_CDROM 0x04
#define HDD_SLAVE_ATAPI_CDROM 0x08
#define HDD_MASTER_IDE 0x20
#define HDD_SLAVE_IDE 0x40
#define HDD_MASTER_ATAPI_ZIPDISK 0x10
#define HDD_SLAVE_ATAPI_ZIPDISK 0x80
typedef struct {
UINT16 Status;
UINT32 Bus;
UINT32 Device;
UINT32 Function;
UINT16 CommandBaseAddress;
UINT16 ControlBaseAddress;
UINT16 BusMasterAddress;
UINT8 HddIrq;
ATAPI_IDENTIFY IdentifyDrive[2];
} HDD_INFO;
//
// Parties data structures
//
typedef struct {
UINT8 DirectoryServiceValidity : 1;
UINT8 RabcaUsedFlag : 1;
UINT8 ExecuteHddDiagnosticsFlag : 1;
UINT8 Reserved : 5;
} UDC_ATTRIBUTES;
typedef struct {
UDC_ATTRIBUTES Attributes;
UINT8 DeviceNumber;
UINT8 BbsTableEntryNumberForParentDevice;
UINT8 BbsTableEntryNumberForBoot;
UINT8 BbsTableEntryNumberForHddDiag;
UINT8 BeerData[128];
UINT8 ServiceAreaData[64];
} UD_TABLE;
//
// define BBS Device Types
//
#define BBS_FLOPPY 0x01
#define BBS_HARDDISK 0x02
#define BBS_CDROM 0x03
#define BBS_PCMCIA 0x04
#define BBS_USB 0x05
#define BBS_EMBED_NETWORK 0x06
#define BBS_BEV_DEVICE 0x80
#define BBS_UNKNOWN 0xff
typedef struct {
UINT16 OldPosition : 4;
UINT16 Reserved1 : 4;
UINT16 Enabled : 1;
UINT16 Failed : 1;
UINT16 MediaPresent : 2;
UINT16 Reserved2 : 4;
} BBS_STATUS_FLAGS;
#define MAX_BBS_ENTRIES 0x100
//
// BBS_IGNORE_ENTRY is placed in the BootPriority field if the entry is to
// be skipped.
// BBS_UNPRIORITIZED_ENTRY is placed in the BootPriority field before
// priority has been assigned but indicates valid entry.
// BBS_LOWEST_PRIORITY is normally used for removable media with no media
// inserted. This allows the 16-bit CSM to allocate a drive letter to
// the device.
// BBS_DO_NOT_BOOT_FROM is used for devices that the 16-bit CSM is to assign
// a drive letter to but never boot from.
//
// AdditionalIrq??Handler usage is IBV specific. The fields have been added
// for:
// 1. Saving non-BBS card info about IRQs taken by card.
// 2. For BBS compliant cards that hook IRQs in order to have their SETUP
// executed.
//
#define BBS_DO_NOT_BOOT_FROM 0xFFFC
#define BBS_LOWEST_PRIORITY 0xFFFD
#define BBS_UNPRIORITIZED_ENTRY 0xFFFE
#define BBS_IGNORE_ENTRY 0xFFFF
typedef struct {
UINT16 BootPriority;
UINT32 Bus;
UINT32 Device;
UINT32 Function;
UINT8 Class;
UINT8 SubClass;
UINT16 MfgStringOffset;
UINT16 MfgStringSegment;
UINT16 DeviceType;
BBS_STATUS_FLAGS StatusFlags;
UINT16 BootHandlerOffset;
UINT16 BootHandlerSegment;
UINT16 DescStringOffset;
UINT16 DescStringSegment;
UINT32 InitPerReserved;
UINT32 AdditionalIrq13Handler;
UINT32 AdditionalIrq18Handler;
UINT32 AdditionalIrq19Handler;
UINT32 AdditionalIrq40Handler;
UINT8 AssignedDriveNumber;
UINT32 AdditionalIrq41Handler;
UINT32 AdditionalIrq46Handler;
UINT32 IBV1;
UINT32 IBV2;
} BBS_TABLE;
#pragma pack()
/**
Thunk to 16-bit real mode and execute a software interrupt with a vector
of BiosInt. Regs will contain the 16-bit register context on entry and
exit.
@param This Protocol instance pointer.
@param BiosInt Processor interrupt vector to invoke
@param Reg Register contexted passed into (and returned) from thunk to
16-bit mode
@retval FALSE Thunk completed, and there were no BIOS errors in the target code.
See Regs for status.
@retval TRUE There was a BIOS erro in the target code.
**/
typedef
BOOLEAN
(EFIAPI *EFI_LEGACY_BIOS_INT86) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN UINT8 BiosInt,
IN OUT EFI_IA32_REGISTER_SET *Regs
)
;
/**
Thunk to 16-bit real mode and call Segment:Offset. Regs will contain the
16-bit register context on entry and exit. Arguments can be passed on
the Stack argument
@param This Protocol instance pointer.
@param Segment Segemnt of 16-bit mode call
@param Offset Offset of 16-bit mdoe call
@param Reg Register contexted passed into (and returned) from thunk to
16-bit mode
@param Stack Caller allocated stack used to pass arguments
@param StackSize Size of Stack in bytes
@retval FALSE Thunk completed, and there were no BIOS errors in the target code.
See Regs for status.
@retval TRUE There was a BIOS erro in the target code.
**/
typedef
BOOLEAN
(EFIAPI *EFI_LEGACY_BIOS_FARCALL86) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN UINT16 Segment,
IN UINT16 Offset,
IN EFI_IA32_REGISTER_SET *Regs,
IN VOID *Stack,
IN UINTN StackSize
)
;
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_CHECK_ROM) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN EFI_HANDLE PciHandle,
OUT VOID **RomImage, OPTIONAL
OUT UINTN *RomSize, OPTIONAL
OUT UINTN *Flags
/**
Test to see if a legacy PCI ROM exists for this device. Optionally return
the Legacy ROM instance for this PCI device.
@param This Protocol instance pointer.
@param PciHandle The PCI PC-AT OPROM from this devices ROM BAR will be loaded
@param RomImage Return the legacy PCI ROM for this device
@param RomSize Size of ROM Image
@param Flags Indicates if ROM found and if PC-AT.
@retval EFI_SUCCESS Legacy Option ROM availible for this device
@retval EFI_UNSUPPORTED Legacy Option ROM not supported.
**/
)
;
/**
Load a legacy PC-AT OPROM on the PciHandle device. Return information
about how many disks were added by the OPROM and the shadow address and
size. DiskStart & DiskEnd are INT 13h drive letters. Thus 0x80 is C:
@param This Protocol instance pointer.
@param PciHandle The PCI PC-AT OPROM from this devices ROM BAR will be loaded.
This value is NULL if RomImage is non-NULL. This is the normal
case.
@param RomImage A PCI PC-AT ROM image. This argument is non-NULL if there is
no hardware associated with the ROM and thus no PciHandle,
otherwise is must be NULL.
Example is PXE base code.
@param Flags Return Status if ROM was found and if was Legacy OPROM.
@param DiskStart Disk number of first device hooked by the ROM. If DiskStart
is the same as DiskEnd no disked were hooked.
@param DiskEnd Disk number of the last device hooked by the ROM.
@param RomShadowAddress Shadow address of PC-AT ROM
@param RomShadowSize Size of RomShadowAddress in bytes
@retval EFI_SUCCESS Thunk completed, see Regs for status.
@retval EFI_INVALID_PARAMETER PciHandle not found
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_INSTALL_ROM) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN EFI_HANDLE PciHandle,
IN VOID **RomImage,
OUT UINTN *Flags,
OUT UINT8 *DiskStart, OPTIONAL
OUT UINT8 *DiskEnd, OPTIONAL
OUT VOID **RomShadowAddress, OPTIONAL
OUT UINT32 *ShadowedRomSize OPTIONAL
)
;
/**
Attempt to legacy boot the BootOption. If the EFI contexted has been
compromised this function will not return.
@param This Protocol instance pointer.
@param BootOption EFI Device Path from BootXXXX variable.
@param LoadOptionSize Size of LoadOption in size.
@param LoadOption LoadOption from BootXXXX variable
@retval EFI_SUCCESS Removable media not present
**/
/**
Update BDA with current Scroll, Num & Cap lock LEDS
@param This Protocol instance pointer.
@param Leds Status of current Scroll, Num & Cap lock LEDS
Bit 0 is Scroll Lock 0 = Not locked
Bit 1 is Num Lock
Bit 2 is Caps Lock
@retval EFI_SUCCESS Removable media not present
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_BOOT) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN BBS_BBS_DEVICE_PATH *BootOption,
IN UINT32 LoadOptionsSize,
IN VOID *LoadOptions
)
;
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_UPDATE_KEYBOARD_LED_STATUS) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN UINT8 Leds
)
;
/**
Retrieve legacy BBS info and assign boot priority.
@param This Protocol instance pointer.
@param HddCount Number of HDD_INFO structures
@param HddInfo Onboard IDE controller information
@param BbsCount Number of BBS_TABLE structures
@param BbsTable List BBS entries
@retval EFI_SUCCESS Tables returned
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_GET_BBS_INFO) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
OUT UINT16 *HddCount,
OUT HDD_INFO **HddInfo,
OUT UINT16 *BbsCount,
OUT IN BBS_TABLE **BbsTable
)
;
/**
Assign drive number to legacy HDD drives prior to booting an EFI
aware OS so the OS can access drives without an EFI driver.
@param This Protocol instance pointer.
@param BbsCount Number of BBS_TABLE structures
@param BbsTable List BBS entries
@retval EFI_SUCCESS Drive numbers assigned
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PREPARE_TO_BOOT_EFI) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
OUT UINT16 *BbsCount,
OUT IN BBS_TABLE **BbsTable
)
;
/**
To boot from an unconventional device like parties and/or execute
HDD diagnostics.
@param This Protocol instance pointer.
@param Attributes How to interpret the other input parameters
@param BbsEntry The 0-based index into the BbsTable for the parent
device.
@param BeerData Pointer to the 128 bytes of ram BEER data.
@param ServiceAreaData Pointer to the 64 bytes of raw Service Area data. The
caller must provide a pointer to the specific Service
Area and not the start all Service Areas.
EFI_INVALID_PARAMETER if error. Does NOT return if no error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_BOOT_UNCONVENTIONAL_DEVICE) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN UDC_ATTRIBUTES Attributes,
IN UINTN BbsEntry,
IN VOID *BeerData,
IN VOID *ServiceAreaData
)
;
/**
Shadow all legacy16 OPROMs that haven't been shadowed.
Warning: Use this with caution. This routine disconnects all EFI
drivers. If used externally then caller must re-connect EFI
drivers.
@retval EFI_SUCCESS OPROMs shadowed
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_SHADOW_ALL_LEGACY_OPROMS) (
IN EFI_LEGACY_BIOS_PROTOCOL *This
)
;
/**
Get a region from the LegacyBios for S3 usage.
@param This Protocol instance pointer.
@param LegacyMemorySize Size of required region
@param Region Region to use.
00 = Either 0xE0000 or 0xF0000 block
Bit0 = 1 0xF0000 block
Bit1 = 1 0xE0000 block
@param Alignment Address alignment. Bit mapped. First non-zero
bit from right is alignment.
@param LegacyMemoryAddress Region Assigned
@retval EFI_SUCCESS Region assigned
@retval Other Region not assigned
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_GET_LEGACY_REGION) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN UINTN LegacyMemorySize,
IN UINTN Region,
IN UINTN Alignment,
OUT VOID **LegacyMemoryAddress
)
;
/**
Get a region from the LegacyBios for Tiano usage. Can only be invoked once.
@param This Protocol instance pointer.
@param LegacyMemorySize Size of data to copy
@param LegacyMemoryAddress Legacy Region destination address
Note: must be in region assigned by
LegacyBiosGetLegacyRegion
@param LegacyMemorySourceAddress Source of data
@retval EFI_SUCCESS Region assigned
@retval EFI_ACCESS_DENIED Destination outside assigned region
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_COPY_LEGACY_REGION) (
IN EFI_LEGACY_BIOS_PROTOCOL *This,
IN UINTN LegacyMemorySize,
IN VOID *LegacyMemoryAddress,
IN VOID *LegacyMemorySourceAddress
)
;
/**
@par Protocol Description:
Abstracts the traditional BIOS from the rest of EFI. The LegacyBoot()
member function allows the BDS to support booting a traditional OS.
EFI thunks drivers that make EFI bindings for BIOS INT services use
all the other member functions.
@param Int86
Performs traditional software INT. See the Int86() function description.
@param FarCall86
Performs a far call into Compatibility16 or traditional OpROM code.
@param CheckPciRom
Checks if a traditional OpROM exists for this device.
@param InstallPciRom
Loads a traditional OpROM in traditional OpROM address space.
@param LegacyBoot
Boots a traditional OS.
@param UpdateKeyboardLedStatus
Updates BDA to reflect the current EFI keyboard LED status.
@param GetBbsInfo
Allows an external agent, such as BIOS Setup, to get the BBS data.
@param ShadowAllLegacyOproms
Causes all legacy OpROMs to be shadowed.
@param PrepareToBootEfi
Performs all actions prior to boot. Used when booting an EFI-aware OS
rather than a legacy OS.
@param GetLegacyRegion
Allows EFI to reserve an area in the 0xE0000 or 0xF0000 block.
@param CopyLegacyRegion
Allows EFI to copy data to the area specified by GetLegacyRegion.
@param BootUnconventionalDevice
Allows the user to boot off an unconventional device such as a PARTIES partition.
**/
struct _EFI_LEGACY_BIOS_PROTOCOL {
EFI_LEGACY_BIOS_INT86 Int86;
EFI_LEGACY_BIOS_FARCALL86 FarCall86;
EFI_LEGACY_BIOS_CHECK_ROM CheckPciRom;
EFI_LEGACY_BIOS_INSTALL_ROM InstallPciRom;
EFI_LEGACY_BIOS_BOOT LegacyBoot;
EFI_LEGACY_BIOS_UPDATE_KEYBOARD_LED_STATUS UpdateKeyboardLedStatus;
EFI_LEGACY_BIOS_GET_BBS_INFO GetBbsInfo;
EFI_LEGACY_BIOS_PREPARE_TO_BOOT_EFI PrepareToBootEfi;
EFI_LEGACY_BIOS_SHADOW_ALL_LEGACY_OPROMS ShadowAllLegacyOproms;
EFI_LEGACY_BIOS_GET_LEGACY_REGION GetLegacyRegion;
EFI_LEGACY_BIOS_COPY_LEGACY_REGION CopyLegacyRegion;
EFI_LEGACY_BIOS_BOOT_UNCONVENTIONAL_DEVICE BootUnconventionalDevice;
};
extern EFI_GUID gEfiLegacyBiosProtocolGuid;
#endif

View File

@ -1,307 +0,0 @@
/** @file
The EFI Legacy BIOS Patform Protocol is used to mate a Legacy16
implementation with this EFI code. The EFI driver that produces
the Legacy BIOS protocol is generic and consumes this protocol.
A driver that matches the Legacy16 produces this protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: LegacyBiosPlatform.h
@par Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec
Version 0.96
**/
#ifndef _EFI_LEGACY_BIOS_PLATFORM_H
#define _EFI_LEGACY_BIOS_PLATFORM_H
#define EFI_LEGACY_BIOS_PLATFORM_PROTOCOL_GUID \
{ \
0x783658a3, 0x4172, 0x4421, {0xa2, 0x99, 0xe0, 0x9, 0x7, 0x9c, 0xc, 0xb4 } \
}
typedef struct _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL EFI_LEGACY_BIOS_PLATFORM_PROTOCOL;
#pragma pack(1)
//
// Define structures for GetOemIntData
// Note:
// OemIntDataElenent is an array of structures from 0 to Count-1.
// RawData is an array of bytes from 0 to RamDataLength-1.
//
typedef struct {
UINT16 Int;
UINT16 Ax;
UINT32 RawDataLength;
UINT8 RawData[1];
} EFI_OEM_INT_DATA_ELEMENT;
typedef struct {
UINT16 Count;
EFI_OEM_INT_DATA_ELEMENT OemIntDataElement[1];
} EFI_OEM_INT_DATA;
#pragma pack()
typedef enum {
EfiGetPlatformBinaryMpTable = 0,
EfiGetPlatformBinaryOemIntData = 1,
EfiGetPlatformBinaryOem16Data = 2,
EfiGetPlatformBinaryOem32Data = 3,
EfiGetPlatformBinaryTpmBinary = 4,
EfiGetPlatformBinarySystemRom = 5,
EfiGetPlatformPciExpressBase = 6,
EfiGetPlatformPmmSize = 7,
EfiGetPlatformEndOpromShadowAddr = 8,
} EFI_GET_PLATFORM_INFO_MODE;
typedef enum {
EfiGetPlatformVgaHandle = 0,
EfiGetPlatformIdeHandle = 1,
EfiGetPlatformIsaBusHandle = 2,
EfiGetPlatformUsbHandle = 3
} EFI_GET_PLATFORM_HANDLE_MODE;
typedef enum {
EfiPlatformHookPrepareToScanRom = 0,
EfiPlatformHookShadowServiceRoms= 1,
EfiPlatformHookAfterRomInit = 2
} EFI_GET_PLATFORM_HOOK_MODE;
/**
Finds the binary data or other platform information.
@param This Protocol instance pointer.
@param Mode Specifies what data to return
@param Table Pointer to MP table.
@param TableSize Size in bytes of table.
@param Location Legacy region requested
0x00 = Any location
Bit 0 = 0xF0000 region
Bit 1 = 0xE0000 region
Multiple bits can be set
@param Alignment Address alignment for allocation.
Bit mapped. First non-zero bit from right
is alignment.
@param LegacySegment Segment in LegacyBios where Table is stored
@param LegacyOffset Offset in LegacyBios where Table is stored
@retval EFI_SUCCESS Data was returned successfully.
@retval EFI_UNSUPPORTED Mode is not supported on the platform.
@retval EFI_NOT_FOUND Binary image or table not found.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
IN EFI_GET_PLATFORM_INFO_MODE Mode,
OUT VOID **Table,
OUT UINTN *TableSize,
OUT UINTN *Location,
OUT UINTN *Alignment,
IN UINT16 LegacySegment,
IN UINT16 LegacyOffset
)
;
/**
Returns a buffer of handles for the requested sub-function.
@param This Protocol instance pointer.
@param Mode Specifies what handle to return.
@param Type Type from Device Path for Handle to represent.
@param HandleBuffer Handles of the device/controller in priority order
with HandleBuffer[0] highest priority.
@param HandleCount Number of handles in the buffer.
@param AdditionalData Mode specific.
@retval EFI_SUCCESS Handle is valid
@retval EFI_UNSUPPORTED Mode is not supported on the platform.
@retval EFI_NOT_FOUND Handle is not known
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
IN EFI_GET_PLATFORM_HANDLE_MODE Mode,
IN UINT16 Type,
OUT EFI_HANDLE **HandleBuffer,
OUT UINTN *HandleCount,
IN VOID **AdditionalData OPTIONAL
)
;
/**
Load and initialize the Legacy BIOS SMM handler.
@param This Protocol instance pointer.
@param EfiToLegacy16BootTable Pointer to Legacy16 boot table.
@retval EFI_SUCCESS SMM code loaded.
@retval EFI_DEVICE_ERROR SMM code failed to load
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_SMM_INIT) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
IN VOID *EfiToLegacy16BootTable
)
;
/**
Allows platform to perform any required action after a LegacyBios operation.
@param This Protocol instance pointer.
@param Mode Specifies what handle to return.
@param Type Mode specific.
@param DeviceHandle List of PCI devices in the system.
@param ShadowAddress First free OpROM area, after other OpROMs have been dispatched.
@param Compatibility16Table Pointer to Compatibility16Table.
@param AdditionalData Mode specific Pointer to additional data returned <20>C mode specific.
@retval EFI_SUCCESS RomImage is valid
@retval EFI_UNSUPPORTED Mode is not supported on the platform.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_HOOKS) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
IN EFI_GET_PLATFORM_HOOK_MODE Mode,
IN UINT16 Type,
IN EFI_HANDLE DeviceHandle,
IN OUT UINTN *ShadowAddress,
IN EFI_COMPATIBILITY16_TABLE *Compatibility16Table,
IN VOID **AdditionalData OPTIONAL
)
;
/**
Returns information associated with PCI IRQ routing.
@param This Protocol instance pointer.
@param RoutingTable Pointer to PCI IRQ Routing table.
@param RoutingTableEntries Number of entries in table.
@param LocalPirqTable $PIR table
@param PirqTableSize $PIR table size
@param LocalIrqPriorityTable List of interrupts in priority order to assign
@param IrqPriorityTableEntries- Number of entries in priority table
@retval EFI_SUCCESS Data was successfully returned.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_ROUTING_TABLE) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
OUT VOID **RoutingTable,
OUT UINTN *RoutingTableEntries,
OUT VOID **LocalPirqTable, OPTIONAL
OUT UINTN *PirqTableSize, OPTIONAL
OUT VOID **LocalIrqPriorityTable, OPTIONAL
OUT UINTN *IrqPriorityTableEntries OPTIONAL
)
;
/**
Translates the given PIRQ accounting for bridge
@param This Protocol instance pointer.
@param PciBus PCI bus number for this device.
@param PciDevice PCI device number for this device.
@param PciFunction PCI function number for this device.
@param Pirq Input is PIRQ reported by device, output is true PIRQ.
@param PciIrq The IRQ already assigned to the PIRQ or the IRQ to be
assigned to the PIRQ.
@retval EFI_SUCCESS The PIRQ was translated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_TRANSLATE_PIRQ) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
IN UINTN PciBus,
IN UINTN PciDevice,
IN UINTN PciFunction,
IN OUT UINT8 *Pirq,
OUT UINT8 *PciIrq
)
;
/**
Attempt to legacy boot the BootOption. If the EFI contexted has been
compromised this function will not return.
@param This Protocol instance pointer.
@param BbsDevicePath EFI Device Path from BootXXXX variable.
@param BbsTable Internal BBS table.
@param LoadOptionSize Size of LoadOption in size.
@param LoadOption LoadOption from BootXXXX variable
@param EfiToLegacy16BootTable Pointer to BootTable structure
@retval EFI_SUCCESS Ready to boot.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_PREPARE_TO_BOOT) (
IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This,
IN BBS_BBS_DEVICE_PATH *BbsDevicePath,
IN VOID *BbsTable,
IN UINT32 LoadOptionsSize,
IN VOID *LoadOptions,
IN VOID *EfiToLegacy16BootTable
)
;
/**
@par Protocol Description:
Abstracts the platform portion of the traditional BIOS.
@param GetPlatformInfo
Gets binary data or other platform information.
@param GetPlatformHandle
Returns a buffer of all handles matching the requested subfunction.
@param SmmInit
Loads and initializes the traditional BIOS SMM handler.
@param PlatformHooks
Allows platform to perform any required actions after a LegacyBios operation.
@param GetRoutingTable
Gets $PIR table.
@param TranslatePirq
Translates the given PIRQ to the final value after traversing any PCI bridges.
@param PrepareToBoot
Final platform function before the system attempts to boot to a traditional OS.
**/
struct _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL {
EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO GetPlatformInfo;
EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE GetPlatformHandle;
EFI_LEGACY_BIOS_PLATFORM_SMM_INIT SmmInit;
EFI_LEGACY_BIOS_PLATFORM_HOOKS PlatformHooks;
EFI_LEGACY_BIOS_PLATFORM_GET_ROUTING_TABLE GetRoutingTable;
EFI_LEGACY_BIOS_PLATFORM_TRANSLATE_PIRQ TranslatePirq;
EFI_LEGACY_BIOS_PLATFORM_PREPARE_TO_BOOT PrepareToBoot;
};
extern EFI_GUID gEfiLegacyBiosPlatformProtocolGuid;
#endif

View File

@ -1,131 +0,0 @@
/** @file
This protocol manages the legacy memory regions between 0xc0000 - 0xfffff
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: LegacyInterrupt.h
@par Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec
Version 0.96
**/
#ifndef _EFI_LEGACY_INTERRUPT_H_
#define _EFI_LEGACY_INTERRUPT_H_
#define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \
{ \
0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \
}
typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL;
/**
Get the number of PIRQs this hardware supports.
@param This Protocol instance pointer.
@param NumberPirsq Number of PIRQs.
@retval EFI_SUCCESS Number of PIRQs returned.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS) (
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
OUT UINT8 *NumberPirqs
);
/**
Gets the PCI location associated with this protocol.
@param This Protocol instance pointer.
@param Bus PCI Bus
@param Device PCI Device
@param Function PCI Function
@retval EFI_SUCCESS Bus/Device/Function returned
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION) (
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
OUT UINT8 *Bus,
OUT UINT8 *Device,
OUT UINT8 *Function
);
/**
Read the PIRQ register and return the data
@param This Protocol instance pointer.
@param PirqNumber PIRQ register to read
@param PirqData Data read
@retval EFI_SUCCESS Data was read
@retval EFI_INVALID_PARAMETER Invalid PIRQ number
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ) (
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
IN UINT8 PirqNumber,
OUT UINT8 *PirqData
);
/**
Write the specified PIRQ register with the given data.
@param This Protocol instance pointer.
@param PirqNumber PIRQ register to read.
@param PirqData Data written.
@retval EFI_SUCCESS Table pointer returned
@retval EFI_INVALID_PARAMETER Invalid PIRQ number
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ) (
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
IN UINT8 PirqNumber,
IN UINT8 PirqData
);
/**
@par Protocol Description:
Abstracts the PIRQ programming from the generic EFI Compatibility Support Modules
@param GetNumberPirqs
Gets the number of PIRQs supported.
@param GetLocation
Gets the PCI bus, device, and function that associated with this protocol.
@param ReadPirq
Reads the indicated PIRQ register.
@param WritePirq
Writes to the indicated PIRQ register.
**/
struct _EFI_LEGACY_INTERRUPT_PROTOCOL {
EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;
EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation;
EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;
EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;
};
extern EFI_GUID gEfiLegacyInterruptProtocolGuid;
#endif

View File

@ -1,152 +0,0 @@
/** @file
This protocol manages the legacy memory regions between 0xc0000 - 0xfffff
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: LegacyRegion.h
@par Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec
Version 0.96
**/
#ifndef _EFI_LEGACY_REGION_H_
#define _EFI_LEGACY_REGION_H_
#define EFI_LEGACY_REGION_PROTOCOL_GUID \
{ \
0xfc9013a, 0x568, 0x4ba9, {0x9b, 0x7e, 0xc9, 0xc3, 0x90, 0xa6, 0x60, 0x9b } \
}
typedef struct _EFI_LEGACY_REGION_PROTOCOL EFI_LEGACY_REGION_PROTOCOL;
/**
Sets hardware to decode or not decode a region.
@param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
@param Start Start of region to decode.
@param Length Size in bytes of the region.
@param On Decode/nondecode flag.
@retval EFI_SUCCESS Decode range successfully changed.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_REGION_DECODE) (
IN EFI_LEGACY_REGION_PROTOCOL *This,
IN UINT32 Start,
IN UINT32 Length,
IN BOOLEAN *On
);
/**
Sets a region to read only.
@param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
@param Start Start of region to lock.
@param Length Size in bytes of the region.
@param Granularity Lock attribute affects this granularity in bytes.
@retval EFI_SUCCESS The region was made read only.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_REGION_LOCK) (
IN EFI_LEGACY_REGION_PROTOCOL *This,
IN UINT32 Start,
IN UINT32 Length,
OUT UINT32 *Granularity OPTIONAL
);
/**
Sets a region to read only and ensures that flash is locked from being
inadvertently modified.
@param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
@param Start Start of region to lock.
@param Length Size in bytes of the region.
@param Granularity Lock attribute affects this granularity in bytes.
@retval EFI_SUCCESS The region was made read only and flash is locked.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_REGION_BOOT_LOCK) (
IN EFI_LEGACY_REGION_PROTOCOL *This,
IN UINT32 Start,
IN UINT32 Length,
OUT UINT32 *Granularity OPTIONAL
);
/**
Sets a region to read-write.
@param This Indicates the EFI_LEGACY_REGION_PROTOCOL instance
@param Start Start of region to lock.
@param Length Size in bytes of the region.
@param Granularity Lock attribute affects this granularity in bytes.
@retval EFI_SUCCESS The region was successfully made read-write.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LEGACY_REGION_UNLOCK) (
IN EFI_LEGACY_REGION_PROTOCOL *This,
IN UINT32 Start,
IN UINT32 Length,
OUT UINT32 *Granularity OPTIONAL
);
/**
@par Protocol Description:
Abstracts the hardware control of the physical address region 0xC0000<30>C0xFFFFF
for the traditional BIOS.
@param Decode
Specifies a region for the chipset to decode
@param Lock
Makes the specified OpROM region read only or locked.
@param BootLock
Sets a region to read only and ensures tat flash is locked from
inadvertent modification.
@param Unlock
Makes the specified OpROM region read-write or unlocked.
**/
struct _EFI_LEGACY_REGION_PROTOCOL {
EFI_LEGACY_REGION_DECODE Decode;
EFI_LEGACY_REGION_LOCK Lock;
EFI_LEGACY_REGION_BOOT_LOCK BootLock;
EFI_LEGACY_REGION_UNLOCK UnLock;
};
extern EFI_GUID gEfiLegacyRegionProtocolGuid;
#endif

View File

@ -1,83 +0,0 @@
/** @file
Load File protocol as defined in the EFI 1.0 specification.
Load file protocol exists to supports the addition of new boot devices,
and to support booting from devices that do not map well to file system.
Network boot is done via a LoadFile protocol.
EFI 1.0 can boot from any device that produces a LoadFile protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: LoadFile.h
**/
#ifndef __EFI_LOAD_FILE_PROTOCOL_H__
#define __EFI_LOAD_FILE_PROTOCOL_H__
#define LOAD_FILE_PROTOCOL_GUID \
{ \
0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
}
//
// Protocol Guid Name defined by UEFI 2.0 spec.
//
#define EFI_LOAD_FILE_PROTOCOL_GUID LOAD_FILE_PROTOCOL_GUID
typedef struct _EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL;
/**
Causes the driver to load a specified file.
@param This Protocol instance pointer.
@param FilePath The device specific path of the file to load.
@param BootPolicy If TRUE, indicates that the request originates from the
boot manager is attempting to load FilePath as a boot
selection. If FALSE, then FilePath must match as exact file
to be loaded.
@param BufferSize On input the size of Buffer in bytes. On output with a return
code of EFI_SUCCESS, the amount of data transferred to
Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
the size of Buffer required to retrieve the requested file.
@param Buffer The memory buffer to transfer the file to. IF Buffer is NULL,
then no the size of the requested file is returned in
BufferSize.
@retval EFI_SUCCESS The file was loaded.
@retval EFI_UNSUPPORTED The device does not support the provided BootPolicy
@retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or
BufferSize is NULL.
@retval EFI_NO_MEDIA No medium was present to load the file.
@retval EFI_DEVICE_ERROR The file was not loaded due to a device error.
@retval EFI_NO_RESPONSE The remote system did not respond.
@retval EFI_NOT_FOUND The file was not found
@retval EFI_ABORTED The file load process was manually cancelled.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_LOAD_FILE) (
IN EFI_LOAD_FILE_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
IN BOOLEAN BootPolicy,
IN OUT UINTN *BufferSize,
IN VOID *Buffer OPTIONAL
)
;
struct _EFI_LOAD_FILE_PROTOCOL {
EFI_LOAD_FILE LoadFile;
};
extern EFI_GUID gEfiLoadFileProtocolGuid;
#endif

View File

@ -1,69 +0,0 @@
/** @file
EFI 1.0 Loaded image protocol definition.
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, Intel Corporation
All rights reserved. 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.
Module Name: LoadedImage.h
**/
#ifndef __LOADED_IMAGE_PROTOCOL_H__
#define __LOADED_IMAGE_PROTOCOL_H__
#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
{ \
0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
}
//
// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
//
#define EFI_LOADED_IMAGE_INFORMATION_REVISION 0x1000
#define EFI_LOADED_IMAGE_PROTOCOL_REVISION EFI_LOADED_IMAGE_INFORMATION_REVISION
typedef struct {
UINT32 Revision;
EFI_HANDLE ParentHandle;
EFI_SYSTEM_TABLE *SystemTable;
//
// Source location of image
//
EFI_HANDLE DeviceHandle;
EFI_DEVICE_PATH_PROTOCOL *FilePath;
VOID *Reserved;
//
// Images load options
//
UINT32 LoadOptionsSize;
VOID *LoadOptions;
//
// Location of where image was loaded
//
VOID *ImageBase;
UINT64 ImageSize;
EFI_MEMORY_TYPE ImageCodeType;
EFI_MEMORY_TYPE ImageDataType;
//
// If the driver image supports a dynamic unload request
//
EFI_IMAGE_UNLOAD Unload;
} EFI_LOADED_IMAGE_PROTOCOL;
extern EFI_GUID gEfiLoadedImageProtocolGuid;
#endif

View File

@ -1,314 +0,0 @@
/** @file
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, Intel Corporation
All rights reserved. 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.
Module Name: ManagedNetwork.h
**/
#ifndef _EFI_MANAGED_NETWORK_PROTOCOL_H
#define _EFI_MANAGED_NETWORK_PROTOCOL_H
#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
{ \
0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } \
}
#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
{ \
0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x7, 0x8, 0x92, 0xe0, 0x5e } \
}
typedef struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL;
typedef struct {
UINT32 ReceivedQueueTimeoutValue;
UINT32 TransmitQueueTimeoutValue;
UINT16 ProtocolTypeFilter;
BOOLEAN EnableUnicastReceive;
BOOLEAN EnableMulticastReceive;
BOOLEAN EnableBroadcastReceive;
BOOLEAN EnablePromiscuousReceive;
BOOLEAN FlushQueuesOnReset;
BOOLEAN EnableReceiveTimestamps;
BOOLEAN DisableBackgroundPolling;
} 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_MANAGED_NETWORK_RECEIVE_DATA;
typedef struct {
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_MANAGED_NETWORK_TRANSMIT_DATA;
typedef struct {
EFI_EVENT Event;
EFI_STATUS Status;
union {
EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData;
EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData;
} Packet;
} EFI_MANAGED_NETWORK_COMPLETION_TOKEN;
/**
Returns the operational parameters for the current MNP child driver.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param MnpConfigData Pointer to storage for MNP operational parameters.
@param SnpModeData Pointer to storage for SNP operational parameters.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured. The default
values are returned in MnpConfigData if it is not NULL.
@retval Other The mode data could not be read.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
)
;
/**
Sets or clears the operational parameters for the MNP child driver.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param MnpConfigData Pointer to configuration data that will be assigned to the MNP
child driver instance. If NULL, the MNP child driver instance is
reset to startup defaults and all pending transmit and receive
requests are flushed.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Required system resources (usually memory) could not be
allocated.
@retval EFI_UNSUPPORTED The requested feature is unsupported in this [MNP]
implementation.
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
@retval Other The MNP child driver instance has been reset to startup defaults.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL
)
;
/**
Translates an IP multicast address to a hardware (MAC) multicast address.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
Set to FALSE if IpAddress is an IPv4 multicast address.
@param IpAddress Pointer to the multicast IP address (in network byte order) to convert.
@param MacAddress Pointer to the resulting multicast MAC address.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
- This is NULL.
- IpAddress is NULL.
- *IpAddress is not a valid multicast IP address.
- MacAddress is NULL.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
@retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
@retval Other The address could not be converted.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
IN BOOLEAN Ipv6Flag,
IN EFI_IP_ADDRESS *IpAddress,
OUT EFI_MAC_ADDRESS *MacAddress
)
;
/**
Enables and disables receive filters for multicast address.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param JoinFlag Set to TRUE to join this multicast group.
Set to FALSE to leave this multicast group.
@param MacAddress Pointer to the multicast MAC group (address) to join or leave.
@retval EFI_SUCCESS The requested operation completed successfully.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- JoinFlag is TRUE and MacAddress is NULL.
- *MacAddress is not a valid multicast MAC address.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
@retval EFI_ALREADY_STARTED The supplied multicast group is already joined.
@retval EFI_NOT_FOUND The supplied multicast group is not joined.
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
@retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation.
@retval Other The requested operation could not be completed.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_GROUPS) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
IN BOOLEAN JoinFlag,
IN EFI_MAC_ADDRESS *MacAddress OPTIONAL
)
;
/**
Places asynchronous outgoing data packets into the transmit queue.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param Token Pointer to a token associated with the transmit data descriptor.
@retval EFI_SUCCESS The transmit completion token was cached.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_ACCESS_DENIED The transmit completion token is already in the transmit queue.
@retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources
(usually memory).
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
@retval EFI_NOT_READY The transmit request could not be queued because the transmit queue is full.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token
)
;
/**
Places an asynchronous receiving request into the receiving queue.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param Token Pointer to a token associated with the receive data descriptor.
@retval EFI_SUCCESS The receive completion token was cached.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- Token is NULL.
- Token.Event is NULL
@retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources
(usually memory).
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
@retval EFI_ACCESS_DENIED The receive completion token was already in the receive queue.
@retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token
)
;
/**
Aborts an asynchronous transmit or receive request.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@param Token Pointer to a token that has been issued by
EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If
NULL, all pending tokens are aborted.
@retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event
was signaled. When Token is NULL, all pending requests were
aborted and their events were signaled.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was
not found in the transmit or receive queue. It has either completed
or was not issued by Transmit() and Receive().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_CANCEL) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL
)
;
/**
Polls for incoming data packets and processes outgoing data packets.
@param This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
@retval EFI_SUCCESS Incoming or outgoing data was processed.
@retval EFI_NOT_STARTED This MNP child driver instance has not been configured.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
@retval EFI_NOT_READY No incoming or outgoing data was processed. Consider increasing
the polling rate.
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
Consider increasing the polling rate.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MANAGED_NETWORK_POLL) (
IN EFI_MANAGED_NETWORK_PROTOCOL *This
)
;
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;
};
extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid;
extern EFI_GUID gEfiManagedNetworkProtocolGuid;
#endif

View File

@ -1,508 +0,0 @@
/** @file
EFI Multicast Trivial File Tranfer Protocol Definition
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Mtftp4.h
**/
#ifndef __EFI_MTFTP4_PROTOCOL_H__
#define __EFI_MTFTP4_PROTOCOL_H__
#define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \
{ \
0x2FE800BE, 0x8F01, 0x4aa6, {0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } \
}
#define EFI_MTFTP4_PROTOCOL_GUID \
{ \
0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } \
}
typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL;
typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN;
//
//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
//
// MTFTP4 error code definition
//
#define EFI_MTFTP4_ERRORCODE_NOT_DEFINED 0
#define EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND 1
#define EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION 2
#define EFI_MTFTP4_ERRORCODE_DISK_FULL 3
#define EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION 4
#define EFI_MTFTP4_ERRORCODE_UNKNOWN_TRANSFER_ID 5
#define EFI_MTFTP4_ERRORCODE_FILE_ALREADY_EXISTS 6
#define EFI_MTFTP4_ERRORCODE_NO_SUCH_USER 7
#define EFI_MTFTP4_ERRORCODE_REQUEST_DENIED 8
//
// MTFTP4 pacekt definitions
//
#pragma pack(1)
typedef struct {
UINT16 OpCode;
UINT8 Filename[1];
} EFI_MTFTP4_REQ_HEADER;
typedef struct {
UINT16 OpCode;
UINT8 Data[1];
} EFI_MTFTP4_OACK_HEADER;
typedef struct {
UINT16 OpCode;
UINT16 Block;
UINT8 Data[1];
} EFI_MTFTP4_DATA_HEADER;
typedef struct {
UINT16 OpCode;
UINT16 Block[1];
} EFI_MTFTP4_ACK_HEADER;
typedef struct {
UINT16 OpCode;
UINT64 Block;
UINT8 Data[1];
} EFI_MTFTP4_DATA8_HEADER;
typedef struct {
UINT16 OpCode;
UINT64 Block[1];
} EFI_MTFTP4_ACK8_HEADER;
typedef struct {
UINT16 OpCode;
UINT16 ErrorCode;
UINT8 ErrorMessage[1];
} EFI_MTFTP4_ERROR_HEADER;
typedef union {
UINT16 OpCode;
EFI_MTFTP4_REQ_HEADER Rrq;
EFI_MTFTP4_REQ_HEADER Wrq;
EFI_MTFTP4_OACK_HEADER Oack;
EFI_MTFTP4_DATA_HEADER Data;
EFI_MTFTP4_ACK_HEADER Ack;
EFI_MTFTP4_DATA8_HEADER Data8;
EFI_MTFTP4_ACK8_HEADER Ack8;
EFI_MTFTP4_ERROR_HEADER Error;
} EFI_MTFTP4_PACKET;
#pragma pack()
//
// MTFTP4 option definition
//
typedef struct {
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;
} EFI_MTFTP4_CONFIG_DATA;
typedef struct {
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_MTFTP4_OVERRIDE_DATA;
//
// Protocol interfaces definition
//
/**
a callback function that is provided by the caller to intercept
the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the
EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept
EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to
EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory().
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param Token The token that the caller provided in the
EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile()
or ReadDirectory() function.
@param PacketLen Indicates the length of the packet.
@param Packet Pointer to an MTFTPv4 packet.
@retval EFI_SUCCESS Operation sucess
@retval Others Abort transfer process
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_CHECK_PACKET)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_TOKEN *Token,
IN UINT16 PacketLen,
IN EFI_MTFTP4_PACKET *Paket
)
;
/**
Timeout callback funtion.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param Token The token that is provided in the
EFI_MTFTP4_PROTOCOL.ReadFile() or
EFI_MTFTP4_PROTOCOL.WriteFile() or
EFI_MTFTP4_PROTOCOL.ReadDirectory() functions
by the caller.
@retval EFI_SUCCESS Operation sucess
@retval Others Aborts download process.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_TOKEN *Token
)
;
/**
a callback function that the caller provides to feed data to the
EFI_MTFTP4_PROTOCOL.WriteFile() function.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param Token The token provided in the
EFI_MTFTP4_PROTOCOL.WriteFile() by the caller.
@param Length Indicates the length of the raw data wanted on input, and the
length the data available on output.
@param Buffer Pointer to the buffer where the data is stored.
@retval EFI_SUCCESS Operation sucess
@retval Others Aborts session.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_PACKET_NEEDED)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_TOKEN *Token,
IN OUT UINT16 *Length,
OUT VOID **Buffer
)
;
/**
Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param ModeData Pointer to storage for the EFI MTFTPv4 Protocol driver mode data.
@retval EFI_SUCCESS The configuration data was successfully returned.
@retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
@retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_GET_MODE_DATA)(
IN EFI_MTFTP4_PROTOCOL *This,
OUT EFI_MTFTP4_MODE_DATA *ModeData
)
;
/**
Initializes, changes, or resets the default operational setting for this
EFI MTFTPv4 Protocol driver instance.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param MtftpConfigData Pointer to the configuration data structure.
@retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this time because
there is one MTFTP background operation in progress.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) has not finished yet.
@retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) could not
be located when clients choose to use the default address
settings.
@retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be
allocated.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI
MTFTPv4 Protocol driver instance is not configured.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_CONFIGURE)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL
)
;
/**
Gets information about a file from an MTFTPv4 server.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param OverrideData Data that is used to override the existing parameters. If NULL,
the default parameters that were set in the
EFI_MTFTP4_PROTOCOL.Configure() function are used.
@param Filename Pointer to ASCIIZ file name string.
@param ModeStr Pointer to ASCIIZ mode string. If NULL, <20><>octet<65><74> will be used.
@param OptionCount Number of option/value string pairs in OptionList.
@param OptionList Pointer to array of option/value string pairs. Ignored if
OptionCount is zero.
@param PacketLength The number of bytes in the returned packet.
@param Packet The pointer to the received packet. This buffer must be freed by
the caller.
@retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Buffer.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more options in the OptionList are in the
unsupported list of structure EFI_MTFTP4_MODE_DATA.
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) has not finished yet.
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the buffer.
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received and is in the Buffer.
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the buffer.
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_GET_INFO)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL,
IN UINT8 *Filename,
IN UINT8 *ModeStr OPTIONAL,
IN UINT8 OptionCount,
IN EFI_MTFTP4_OPTION *OptionList,
OUT UINT32 *PacketLength,
OUT EFI_MTFTP4_PACKET **Packet OPTIONAL
)
;
/**
Parses the options in an MTFTPv4 OACK packet.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param PacketLen Length of the OACK packet to be parsed.
@param Packet Pointer to the OACK packet to be parsed.
@param OptionCount Pointer to the number of options in following OptionList.
@param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot
Service FreePool() to release each option if they are not
needed any more.
@retval EFI_SUCCESS The OACK packet was valid and the OptionCount and
OptionList parameters have been updated.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- PacketLen is 0.
- Packet is NULL or Packet is not a valid MTFTPv4 packet.
- OptionCount is NULL.
@retval EFI_NOT_FOUND No options were found in the OACK packet.
@retval EFI_OUT_OF_RESOURCES Storage for the OptionList array cannot be allocated.
@retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_PARSE_OPTIONS)(
IN EFI_MTFTP4_PROTOCOL *This,
IN UINT32 PacketLen,
IN EFI_MTFTP4_PACKET *Packet,
OUT UINT32 *OptionCount,
OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL
)
;
/**
Downloads a file from an MTFTPv4 server.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param Token Pointer to the token structure to provide the parameters that are
used in this operation.
@retval EFI_SUCCESS The data file has been transferred successfully.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data
in downloading process.
@retval EFI_ABORTED Current operation is aborted by user.
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received.
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received.
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_READ_FILE)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_TOKEN *Token
)
;
/**
Sends a file to an MTFTPv4 server.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param Token Pointer to the token structure to provide the parameters that are
used in this operation.
@retval EFI_SUCCESS The upload session has started.
@retval EFI_UNSUPPORTED The operation is not supported by this implementation.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in
the unsupported list of structure EFI_MTFTP4_MODE_DATA.
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_WRITE_FILE)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_TOKEN *Token
)
;
/**
Downloads a data file <20><>directory<72><79> from an MTFTPv4 server. May be unsupported in some EFI
implementations.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@param Token Pointer to the token structure to provide the parameters that are
used in this operation.
@retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded.
@retval EFI_UNSUPPORTED The operation is not supported by this implementation.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in
the unsupported list of structure EFI_MTFTP4_MODE_DATA.
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_READ_DIRECTORY)(
IN EFI_MTFTP4_PROTOCOL *This,
IN EFI_MTFTP4_TOKEN *Token
)
;
/**
Polls for incoming data packets and processes outgoing data packets.
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
@retval EFI_SUCCESS Incoming or outgoing data was processed.
@retval EFI_NOT_STARTED This EFI MTFTPv4 Protocol instance has not been started.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
Consider increasing the polling rate.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MTFTP4_POLL) (
IN EFI_MTFTP4_PROTOCOL *This
)
;
struct _EFI_MTFTP4_PROTOCOL {
EFI_MTFTP4_GET_MODE_DATA GetModeData;
EFI_MTFTP4_CONFIGURE Configure;
EFI_MTFTP4_GET_INFO GetInfo;
EFI_MTFTP4_PARSE_OPTIONS ParseOptions;
EFI_MTFTP4_READ_FILE ReadFile;
EFI_MTFTP4_WRITE_FILE WriteFile;
EFI_MTFTP4_READ_DIRECTORY ReadDirectory;
EFI_MTFTP4_POLL Poll;
};
struct _EFI_MTFTP4_TOKEN {
OUT EFI_STATUS Status;
IN EFI_EVENT Event;
IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData;
IN UINT8 *Filename;
IN UINT8 *ModeStr;
IN UINT32 OptionCount;
IN EFI_MTFTP4_OPTION *OptionList;
IN OUT UINT64 BufferSize;
IN OUT VOID *Buffer;
IN EFI_MTFTP4_CHECK_PACKET CheckPacket;
IN EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback;
IN EFI_MTFTP4_PACKET_NEEDED PacketNeeded;
};
extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid;
extern EFI_GUID gEfiMtftp4ProtocolGuid;
#endif

View File

@ -1,297 +0,0 @@
/** @file
Platform Configuration Database (PCD) Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: Pcd.h
**/
#ifndef __PCD_H__
#define __PCD_H__
extern EFI_GUID gPcdProtocolGuid;
#define PCD_PROTOCOL_GUID \
{ 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7 } }
#define PCD_INVALID_TOKEN_NUMBER ((UINTN) -1)
typedef
VOID
(EFIAPI *PCD_PROTOCOL_SET_SKU) (
IN UINTN SkuId
);
typedef
UINT8
(EFIAPI *PCD_PROTOCOL_GET8) (
IN UINTN TokenNumber
);
typedef
UINT16
(EFIAPI *PCD_PROTOCOL_GET16) (
IN UINTN TokenNumber
);
typedef
UINT32
(EFIAPI *PCD_PROTOCOL_GET32) (
IN UINTN TokenNumber
);
typedef
UINT64
(EFIAPI *PCD_PROTOCOL_GET64) (
IN UINTN TokenNumber
);
typedef
VOID *
(EFIAPI *PCD_PROTOCOL_GET_POINTER) (
IN UINTN TokenNumber
);
typedef
BOOLEAN
(EFIAPI *PCD_PROTOCOL_GET_BOOLEAN) (
IN UINTN TokenNumber
);
typedef
UINTN
(EFIAPI *PCD_PROTOCOL_GET_SIZE) (
IN UINTN TokenNumber
);
typedef
UINT8
(EFIAPI *PCD_PROTOCOL_GET_EX_8) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
UINT16
(EFIAPI *PCD_PROTOCOL_GET_EX_16) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
UINT32
(EFIAPI *PCD_PROTOCOL_GET_EX_32) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
UINT64
(EFIAPI *PCD_PROTOCOL_GET_EX_64) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
VOID *
(EFIAPI *PCD_PROTOCOL_GET_EX_POINTER) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
BOOLEAN
(EFIAPI *PCD_PROTOCOL_GET_EX_BOOLEAN) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
UINTN
(EFIAPI *PCD_PROTOCOL_GET_EX_SIZE) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET8) (
IN UINTN TokenNumber,
IN UINT8 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET16) (
IN UINTN TokenNumber,
IN UINT16 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET32) (
IN UINTN TokenNumber,
IN UINT32 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET64) (
IN UINTN TokenNumber,
IN UINT64 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_POINTER) (
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_BOOLEAN) (
IN UINTN TokenNumber,
IN BOOLEAN Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_8) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT8 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_16) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT16 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_32) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT32 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_64) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINT64 Value
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_POINTER) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN UINTN SizeOfBuffer,
IN VOID *Buffer
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_SET_EX_BOOLEAN) (
IN CONST EFI_GUID *Guid,
IN UINTN TokenNumber,
IN BOOLEAN Value
);
/**
Callback on SET function prototype definition.
@param[in] CallBackGuid The PCD token GUID being set.
@param[in] CallBackToken The PCD token number being set.
@param[in] TokenData A pointer to the token data being set.
@param[in] TokenDataSize The size, in bytes, of the data being set.
@retval VOID
--*/
typedef
VOID
(EFIAPI *PCD_PROTOCOL_CALLBACK) (
IN CONST EFI_GUID *CallBackGuid, OPTIONAL
IN UINTN CallBackToken,
IN OUT VOID *TokenData,
IN UINTN TokenDataSize
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_CALLBACK_ONSET) (
IN UINTN TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_CANCEL_CALLBACK) (
IN UINTN TokenNumber,
IN CONST EFI_GUID *Guid, OPTIONAL
IN PCD_PROTOCOL_CALLBACK CallBackFunction
);
typedef
EFI_STATUS
(EFIAPI *PCD_PROTOCOL_GET_NEXT_TOKEN) (
IN CONST EFI_GUID *Guid, OPTIONAL
IN OUT UINTN *TokenNumber
);
typedef struct {
PCD_PROTOCOL_SET_SKU SetSku;
PCD_PROTOCOL_GET8 Get8;
PCD_PROTOCOL_GET16 Get16;
PCD_PROTOCOL_GET32 Get32;
PCD_PROTOCOL_GET64 Get64;
PCD_PROTOCOL_GET_POINTER GetPtr;
PCD_PROTOCOL_GET_BOOLEAN GetBool;
PCD_PROTOCOL_GET_SIZE GetSize;
PCD_PROTOCOL_GET_EX_8 Get8Ex;
PCD_PROTOCOL_GET_EX_16 Get16Ex;
PCD_PROTOCOL_GET_EX_32 Get32Ex;
PCD_PROTOCOL_GET_EX_64 Get64Ex;
PCD_PROTOCOL_GET_EX_POINTER GetPtrEx;
PCD_PROTOCOL_GET_EX_BOOLEAN GetBoolEx;
PCD_PROTOCOL_GET_EX_SIZE GetSizeEx;
PCD_PROTOCOL_SET8 Set8;
PCD_PROTOCOL_SET16 Set16;
PCD_PROTOCOL_SET32 Set32;
PCD_PROTOCOL_SET64 Set64;
PCD_PROTOCOL_SET_POINTER SetPtr;
PCD_PROTOCOL_SET_BOOLEAN SetBool;
PCD_PROTOCOL_SET_EX_8 Set8Ex;
PCD_PROTOCOL_SET_EX_16 Set16Ex;
PCD_PROTOCOL_SET_EX_32 Set32Ex;
PCD_PROTOCOL_SET_EX_64 Set64Ex;
PCD_PROTOCOL_SET_EX_POINTER SetPtrEx;
PCD_PROTOCOL_SET_EX_BOOLEAN SetBoolEx;
PCD_PROTOCOL_CALLBACK_ONSET CallbackOnSet;
PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback;
PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken;
} PCD_PROTOCOL;
#endif

View File

@ -1,363 +0,0 @@
/** @file
This file declares Pci Host Bridge Resource Allocation Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PciHostBridgeResourceAllocation.h
@par Revision Reference:
This protocol is defined in Framework of EFI Pci Host Bridge Resource Allocation Protocol Spec
Version 0.9
**/
#ifndef _PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_H_
#define _PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_H_
#define EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GUID \
{ 0xCF8034BE, 0x6768, 0x4d8b, {0xB7,0x39,0x7C,0xCE,0x68,0x3A,0x9F,0xBE }}
typedef struct _EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL;
//
// EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ATTRIBUTES
//
// If this bit is set, then the PCI Root Bridge does not
// support separate windows for Non-prefetchable and Prefetchable
// memory. A PCI bus driver needs to include requests for Prefetchable
// memory in the Non-prefetchable memory pool.
//
#define EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM 1
//
// If this bit is set, then the PCI Root Bridge supports
// 64 bit memory windows. If this bit is not set,
// the PCI bus driver needs to include requests for 64 bit
// memory address in the corresponding 32 bit memory pool.
//
#define EFI_PCI_HOST_BRIDGE_MEM64_DECODE 2
//
// EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE
//
typedef enum {
EfiPciHostBridgeBeginEnumeration,
EfiPciHostBridgeBeginBusAllocation,
EfiPciHostBridgeEndBusAllocation,
EfiPciHostBridgeBeginResourceAllocation,
EfiPciHostBridgeAllocateResources,
EfiPciHostBridgeSetResources,
EfiPciHostBridgeFreeResources,
EfiPciHostBridgeEndResourceAllocation
} EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE;
//
// EfiPciHostBridgeBeginEnumeration
// Reset the host bridge PCI apertures and internal data structures.
// PCI enumerator should issue this notification before starting fresh
// enumeration process. Enumeration cannot be restarted after sending
// any other notification such as EfiPciHostBridgeBeginBusAllocation.
//
// EfiPciHostBridgeBeginBusAllocation
// The bus allocation phase is about to begin. No specific action
// is required here. This notification can be used to perform any
// chipset specific programming.
//
// EfiPciHostBridgeEndBusAllocation
// The bus allocation and bus programming phase is complete. No specific
// action is required here. This notification can be used to perform any
// chipset specific programming.
//
// EfiPciHostBridgeBeginResourceAllocation
// The resource allocation phase is about to begin.No specific action is
// required here. This notification can be used to perform any chipset specific programming.
//
// EfiPciHostBridgeAllocateResources
// Allocate resources per previously submitted requests for all the PCI Root
// Bridges. These resource settings are returned on the next call to
// GetProposedResources().
//
// EfiPciHostBridgeSetResources
// Program the Host Bridge hardware to decode previously allocated resources
// (proposed resources) for all the PCI Root Bridges.
//
// EfiPciHostBridgeFreeResources
// De-allocate previously allocated resources previously for all the PCI
// Root Bridges and reset the I/O and memory apertures to initial state.
//
// EfiPciHostBridgeEndResourceAllocation
// The resource allocation phase is completed. No specific action is required
// here. This notification can be used to perform any chipset specific programming.
//
// EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE
//
typedef enum {
EfiPciBeforeChildBusEnumeration,
EfiPciBeforeResourceCollection
} EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE;
//
// EfiPciBeforeChildBusEnumeration
// This notification is only applicable to PCI-PCI bridges and
// indicates that the PCI enumerator is about to begin enumerating
// the bus behind the PCI-PCI Bridge. This notification is sent after
// the primary bus number, the secondary bus number and the subordinate
// bus number registers in the PCI-PCI Bridge are programmed to valid
// (not necessary final) values
//
// EfiPciBeforeResourceCollection
// This notification is sent before the PCI enumerator probes BAR registers
// for every valid PCI function.
//
/**
Enter a certain phase of the PCI enumeration process
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance
@param Phase The phase during enumeration
@retval EFI_SUCCESS Success
@retval EFI_OUT_OF_RESOURCES If SubmitResources ( ) could not allocate resources
@retval EFI_NOT_READY This phase cannot be entered at this time
@retval EFI_DEVICE_ERROR SetResources failed due to HW error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_NOTIFY_PHASE) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase
);
/**
Return the device handle of the next PCI root bridge that is associated with
this Host Bridge
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle Returns the device handle of the next PCI Root Bridge.
On input, it holds the RootBridgeHandle returned by the most
recent call to GetNextRootBridge().The handle for the first
PCI Root Bridge is returned if RootBridgeHandle is NULL on input
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_NEXT_ROOT_BRIDGE) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN OUT EFI_HANDLE *RootBridgeHandle
);
/**
Returns the attributes of a PCI Root Bridge.
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle The device handle of the PCI Root Bridge
that the caller is interested in
@param Attribute The pointer to attributes of the PCI Root Bridge
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
@retval EFI_INVALID_PARAMETER Attributes is NULL
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_ATTRIBUTES) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_HANDLE RootBridgeHandle,
OUT UINT64 *Attributes
);
/**
This is the request from the PCI enumerator to set up
the specified PCI Root Bridge for bus enumeration process.
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle The PCI Root Bridge to be set up
@param Configuration Pointer to the pointer to the PCI bus resource descriptor
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
@retval EFI_DEVICE_ERROR Request failed due to hardware error
@retval EFI_OUT_OF_RESOURCES Request failed due to lack of resources
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_START_BUS_ENUMERATION) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_HANDLE RootBridgeHandle,
OUT VOID **Configuration
);
/**
This function programs the PCI Root Bridge hardware so that
it decodes the specified PCI bus range
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle The PCI Root Bridge whose bus range is to be programmed
@param Configuration The pointer to the PCI bus resource descriptor
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
@retval EFI_INVALID_PARAMETER Configuration is NULL
@retval EFI_INVALID_PARAMETER Configuration does not point to a valid ACPI resource descriptor
@retval EFI_INVALID_PARAMETER Configuration contains one or more memory or IO ACPI resource descriptor
@retval EFI_INVALID_PARAMETER Address Range Minimum or Address Range Length fields in Configuration
are invalid for this Root Bridge.
@retval EFI_INVALID_PARAMETER Configuration contains one or more invalid ACPI resource descriptor
@retval EFI_DEVICE_ERROR Request failed due to hardware error
@retval EFI_OUT_OF_RESOURCES Request failed due to lack of resources
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SET_BUS_NUMBERS) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_HANDLE RootBridgeHandle,
IN VOID *Configuration
);
/**
Submits the I/O and memory resource requirements for the specified PCI Root Bridge
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle The PCI Root Bridge whose I/O and memory resource requirements
are being submitted
@param Configuration The pointer to the PCI I/O and PCI memory resource descriptor
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
@retval EFI_INVALID_PARAMETER Configuration is NULL
@retval EFI_INVALID_PARAMETER Configuration does not point to a valid ACPI resource descriptor
@retval EFI_INVALID_PARAMETER Configuration includes a resource descriptor of unsupported type
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SUBMIT_RESOURCES) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_HANDLE RootBridgeHandle,
IN VOID *Configuration
);
/**
This function returns the proposed resource settings for the specified
PCI Root Bridge
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle The PCI Root Bridge handle
@param Configuration The pointer to the pointer to the PCI I/O
and memory resource descriptor
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
@retval EFI_DEVICE_ERROR Request failed due to hardware error
@retval EFI_OUT_OF_RESOURCES Request failed due to lack of resources
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_PROPOSED_RESOURCES) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_HANDLE RootBridgeHandle,
OUT VOID **Configuration
);
/**
This function is called for all the PCI controllers that the PCI
bus driver finds. Can be used to Preprogram the controller.
@param This The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance
@param RootBridgeHandle The PCI Root Bridge handle
@param PciBusAddress Address of the controller on the PCI bus
@param Phase The Phase during resource allocation
@retval EFI_SUCCESS Success
@retval EFI_INVALID_PARAMETER RootBridgeHandle is invalid
@retval EFI_DEVICE_ERROR Device pre-initialization failed due to hardware error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_CONTROLLER) (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,
IN EFI_HANDLE RootBridgeHandle,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS PciAddress,
IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase
);
/**
@par Protocol Description:
Provides the basic interfaces to abstract a PCI host bridge resource allocation.
@param NotifyPhase
The notification from the PCI bus enumerator that it is about to enter
a certain phase during the enumeration process.
@param GetNextRootBridge
Retrieves the device handle for the next PCI root bridge that is produced by the
host bridge to which this instance of the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL is attached.
@param GetAllocAttributes
Retrieves the allocation-related attributes of a PCI root bridge.
@param StartBusEnumeration
Sets up a PCI root bridge for bus enumeration.
@param SetBusNumbers
Sets up the PCI root bridge so that it decodes a specific range of bus numbers.
@param SubmitResources
Submits the resource requirements for the specified PCI root bridge.
@param GetProposedResources
Returns the proposed resource assignment for the specified PCI root bridges.
@param PreprocessController
Provides hooks from the PCI bus driver to every PCI controller
(device/function) at various stages of the PCI enumeration process that
allow the host bridge driver to preinitialize individual PCI controllers
before enumeration.
**/
struct _EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL {
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_NOTIFY_PHASE NotifyPhase;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_NEXT_ROOT_BRIDGE GetNextRootBridge;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_ATTRIBUTES GetAllocAttributes;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_START_BUS_ENUMERATION StartBusEnumeration;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SET_BUS_NUMBERS SetBusNumbers;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SUBMIT_RESOURCES SubmitResources;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_PROPOSED_RESOURCES GetProposedResources;
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_CONTROLLER PreprocessController;
};
extern EFI_GUID gEfiPciHostBridgeResourceAllocationProtocolGuid;
#endif

View File

@ -1,185 +0,0 @@
/** @file
This file declares EFI PCI Hot Plug Init Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PciHotPlugInit.h
@par Revision Reference:
This protocol is defined in Framework of EFI Hot Plug Pci Initialization Protocol Spec
Version 0.9
**/
#ifndef _EFI_PCI_HOT_PLUG_INIT_H
#define _EFI_PCI_HOT_PLUG_INIT_H
//
// Global ID for the PCI Hot Plug Protocol
//
#define EFI_PCI_HOT_PLUG_INIT_PROTOCOL_GUID \
{ 0xaa0e8bc1, 0xdabc, 0x46b0, {0xa8, 0x44, 0x37, 0xb8, 0x16, 0x9b, 0x2b, 0xea } }
typedef struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL EFI_PCI_HOT_PLUG_INIT_PROTOCOL;
#define EFI_HPC_STATE_INITIALIZED 0x01
#define EFI_HPC_STATE_ENABLED 0x02
typedef UINT16 EFI_HPC_STATE;
typedef struct{
EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath;
EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath;
} EFI_HPC_LOCATION;
typedef enum{
EfiPaddingPciBus,
EfiPaddingPciRootBridge
} EFI_HPC_PADDING_ATTRIBUTES;
/**
Returns a list of root Hot Plug Controllers (HPCs) that require initialization
during the boot process.
@param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.
@param HpcCount The number of root HPCs that were returned.
@param HpcList The list of root HPCs. HpcCount defines the number of
elements in this list.
@retval EFI_SUCCESS HpcList was returned.
@retval EFI_OUT_OF_RESOURCES HpcList was not returned due to insufficient resources.
@retval EFI_INVALID_PARAMETER HpcCount is NULL or HpcList is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_ROOT_HPC_LIST) (
IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,
OUT UINTN *HpcCount,
OUT EFI_HPC_LOCATION **HpcList
);
/**
Initializes one root Hot Plug Controller (HPC). This process may causes
initialization of its subordinate buses.
@param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.
@param HpcDevicePath The device path to the HPC that is being initialized.
@param HpcPciAddress The address of the HPC function on the PCI bus.
@param Event The event that should be signaled when the HPC initialization
is complete.
@param HpcState The state of the HPC hardware.
@retval EFI_SUCCESS If Event is NULL, the specific HPC was successfully
initialized. If Event is not NULL, Event will be signaled at a later time
when initialization is complete.
@retval EFI_UNSUPPORTED This instance of EFI_PCI_HOT_PLUG_INIT_PROTOCOL
does not support the specified HPC.
@retval EFI_OUT_OF_RESOURCES Initialization failed due to insufficient
resources.
@retval EFI_INVALID_PARAMETER HpcState is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_INITIALIZE_ROOT_HPC) (
IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
IN UINT64 HpcPciAddress,
IN EFI_EVENT Event, OPTIONAL
OUT EFI_HPC_STATE *HpcState
);
/**
Returns the resource padding that is required by the PCI bus that is controlled
by the specified Hot Plug Controller (HPC).
@param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.
@param HpcDevicePath The device path to the HPC.
@param HpcPciAddress The address of the HPC function on the PCI bus.
@param HpcState The state of the HPC hardware.
@param Padding The amount of resource padding that is required by the
PCI bus under the control of the specified HPC.
@param Attributes Describes how padding is accounted for. The padding
is returned in the form of ACPI 2.0 resource descriptors.
@retval EFI_SUCCESS The resource padding was successfully returned.
@retval EFI_UNSUPPORTED This instance of the EFI_PCI_HOT_PLUG_INIT_PROTOCOL
does not support the specified HPC.
@retval EFI_NOT_READY This function was called before HPC initialization is complete.
@retval EFI_INVALID_PARAMETER HpcState or Padding or Attributes is NULL.
@retval EFI_OUT_OF_RESOURCES ACPI 2.0 resource descriptors for Padding
cannot be allocated due to insufficient resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_PCI_HOT_PLUG_PADDING) (
IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,
IN UINT64 HpcPciAddress,
OUT EFI_HPC_STATE *HpcState,
OUT VOID **Padding,
OUT EFI_HPC_PADDING_ATTRIBUTES *Attributes
);
//
// Prototypes for the PCI Hot Plug Init Protocol
//
/**
@par Protocol Description:
This protocol provides the necessary functionality to initialize the
Hot Plug Controllers (HPCs) and the buses that they control. This protocol
also provides information regarding resource padding.
@param GetRootHpcList
Returns a list of root HPCs and the buses that they control.
@param InitializeRootHpc
Initializes the specified root HPC.
@param GetResourcePadding
Returns the resource padding that is required by the HPC.
**/
struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL {
EFI_GET_ROOT_HPC_LIST GetRootHpcList;
EFI_INITIALIZE_ROOT_HPC InitializeRootHpc;
EFI_GET_PCI_HOT_PLUG_PADDING GetResourcePadding;
};
extern EFI_GUID gEfiPciHotPlugInitProtocolGuid;
#endif

View File

@ -1,503 +0,0 @@
/** @file
EFI PCI I/O Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PciIo.h
**/
#ifndef __PCI_IO_H__
#define __PCI_IO_H__
//
// Global ID for the PCI I/O Protocol
//
#define EFI_PCI_IO_PROTOCOL_GUID \
{ \
0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \
}
typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL;
//
// Prototypes for the PCI I/O Protocol
//
typedef enum {
EfiPciIoWidthUint8 = 0,
EfiPciIoWidthUint16,
EfiPciIoWidthUint32,
EfiPciIoWidthUint64,
EfiPciIoWidthFifoUint8,
EfiPciIoWidthFifoUint16,
EfiPciIoWidthFifoUint32,
EfiPciIoWidthFifoUint64,
EfiPciIoWidthFillUint8,
EfiPciIoWidthFillUint16,
EfiPciIoWidthFillUint32,
EfiPciIoWidthFillUint64,
EfiPciIoWidthMaximum
} EFI_PCI_IO_PROTOCOL_WIDTH;
//
// 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 write 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 0x30000 // 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)
//
// *******************************************************
// EFI_PCI_IO_PROTOCOL_OPERATION
// *******************************************************
//
typedef enum {
EfiPciIoOperationBusMasterRead,
EfiPciIoOperationBusMasterWrite,
EfiPciIoOperationBusMasterCommonBuffer,
EfiPciIoOperationMaximum
} EFI_PCI_IO_PROTOCOL_OPERATION;
//
// *******************************************************
// EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
// *******************************************************
//
typedef enum {
EfiPciIoAttributeOperationGet,
EfiPciIoAttributeOperationSet,
EfiPciIoAttributeOperationEnable,
EfiPciIoAttributeOperationDisable,
EfiPciIoAttributeOperationSupported,
EfiPciIoAttributeOperationMaximum
} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION;
/**
Reads from the memory space of a PCI controller. Returns when either the polling exit criteria is
satisfied or after a defined duration.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Width Signifies the width of the memory or I/O operations.
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
base address for the memory operation to perform.
@param Offset The offset within the selected BAR to start the memory operation.
@param Mask Mask used for the polling criteria.
@param Value The comparison value used for the polling exit criteria.
@param Delay The number of 100 ns units to poll.
@param Result Pointer to the last value read from the memory location.
@retval EFI_SUCCESS The last data returned from the access matched the poll exit criteria.
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
@retval EFI_UNSUPPORTED Offset is not valid for the BarIndex of this PCI controller.
@retval EFI_TIMEOUT Delay expired before a match occurred.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_POLL_IO_MEM) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 BarIndex,
IN UINT64 Offset,
IN UINT64 Mask,
IN UINT64 Value,
IN UINT64 Delay,
OUT UINT64 *Result
);
/**
Enable a PCI driver to access PCI controller registers in the PCI memory or I/O space.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Width Signifies the width of the memory or I/O operations.
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
base address for the memory or I/O operation to perform.
@param Offset The offset within the selected BAR to start the memory or I/O operation.
@param Count The number of memory or I/O operations to perform.
@param Buffer For read operations, the destination buffer to store the results. For write
operations, the source buffer to write data from.
@retval EFI_SUCCESS The data was read from or written to the PCI controller.
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
@retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
valid for the PCI BAR specified by BarIndex.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_IO_MEM) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 BarIndex,
IN UINT64 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
);
typedef struct {
EFI_PCI_IO_PROTOCOL_IO_MEM Read;
EFI_PCI_IO_PROTOCOL_IO_MEM Write;
} EFI_PCI_IO_PROTOCOL_ACCESS;
/**
Enable a PCI driver to access PCI controller registers in PCI configuration space.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Width Signifies the width of the memory operations.
@param Offset The offset within the PCI configuration space for the PCI controller.
@param Count The number of PCI configuration operations to perform.
@param Buffer For read operations, the destination buffer to store the results. For write
operations, the source buffer to write data from.
@retval EFI_SUCCESS The data was read from or written to the PCI controller.
@retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
valid for the PCI configuration header of the PCI controller.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER Buffer is NULL or Width is invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_CONFIG) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT32 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
);
typedef struct {
EFI_PCI_IO_PROTOCOL_CONFIG Read;
EFI_PCI_IO_PROTOCOL_CONFIG Write;
} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
/**
Enables a PCI driver to copy one region of PCI memory space to another region of PCI
memory space.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Width Signifies the width of the memory operations.
@param DestBarIndex The BAR index in the standard PCI Configuration header to use as the
base address for the memory operation to perform.
@param DestOffset The destination offset within the BAR specified by DestBarIndex to
start the memory writes for the copy operation.
@param SrcBarIndex The BAR index in the standard PCI Configuration header to use as the
base address for the memory operation to perform.
@param SrcOffset The source offset within the BAR specified by SrcBarIndex to start
the memory reads for the copy operation.
@param Count The number of memory operations to perform. Bytes moved is Width
size * Count, starting at DestOffset and SrcOffset.
@retval EFI_SUCCESS The data was copied from one memory region to another memory region.
@retval EFI_UNSUPPORTED DestBarIndex not valid for this PCI controller.
@retval EFI_UNSUPPORTED SrcBarIndex not valid for this PCI controller.
@retval EFI_UNSUPPORTED The address range specified by DestOffset, Width, and Count
is not valid for the PCI BAR specified by DestBarIndex.
@retval EFI_UNSUPPORTED The address range specified by SrcOffset, Width, and Count is
not valid for the PCI BAR specified by SrcBarIndex.
@retval EFI_INVALID_PARAMETER Width is invalid.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_COPY_MEM) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_WIDTH Width,
IN UINT8 DestBarIndex,
IN UINT64 DestOffset,
IN UINT8 SrcBarIndex,
IN UINT64 SrcOffset,
IN UINTN Count
);
/**
Provides the PCI controller<65>Cspecific addresses needed to access system memory.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Operation Indicates if the bus master is going to read or write to system memory.
@param HostAddress The system memory address to map to the PCI controller.
@param NumberOfBytes On input the number of bytes to map. On output the number of bytes
that were mapped.
@param DeviceAddress The resulting map address for the bus master PCI controller to use to
access the hosts HostAddress.
@param Mapping A resulting value to pass to Unmap().
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
@retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.
@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_DEVICE_ERROR The system hardware could not map the requested address.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_MAP) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
IN VOID *HostAddress,
IN OUT UINTN *NumberOfBytes,
OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
);
/**
Completes the Map() operation and releases any corresponding resources.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Mapping The mapping value returned from Map().
@retval EFI_SUCCESS The range was unmapped.
@retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_UNMAP) (
IN EFI_PCI_IO_PROTOCOL *This,
IN VOID *Mapping
);
/**
Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer
mapping.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Type This parameter is not used and must be ignored.
@param MemoryType The type of memory to allocate, EfiBootServicesData or
EfiRuntimeServicesData.
@param Pages The number of pages to allocate.
@param HostAddress A pointer to store the base system memory address of the
allocated range.
@param Attributes The requested bit mask of attributes for the allocated range.
@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.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress,
IN UINT64 Attributes
);
/**
Frees memory that was allocated with AllocateBuffer().
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Pages The number of pages to free.
@param HostAddress The base system memory address of the allocated range.
@retval EFI_SUCCESS The requested memory pages were freed.
@retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages
was not allocated with AllocateBuffer().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_FREE_BUFFER) (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINTN Pages,
IN VOID *HostAddress
);
/**
Flushes all PCI posted write transactions from a PCI host bridge to system memory.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@retval EFI_SUCCESS The PCI posted write transactions were flushed from the PCI host
bridge to system memory.
@retval EFI_DEVICE_ERROR The PCI posted write transactions were not flushed from the PCI
host bridge due to a hardware error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_FLUSH) (
IN EFI_PCI_IO_PROTOCOL *This
);
/**
Retrieves this PCI controller<65><72>s current PCI bus number, device number, and function number.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param SegmentNumber The PCI controller<65><72>s current PCI segment number.
@param BusNumber The PCI controller<65><72>s current PCI bus number.
@param DeviceNumber The PCI controller<65><72>s current PCI device number.
@param FunctionNumber The PCI controller<65><72>s current PCI function number.
@retval EFI_SUCCESS The PCI controller location was returned.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_LOCATION) (
IN EFI_PCI_IO_PROTOCOL *This,
OUT UINTN *SegmentNumber,
OUT UINTN *BusNumber,
OUT UINTN *DeviceNumber,
OUT UINTN *FunctionNumber
);
/**
Performs an operation on the attributes that this PCI controller supports. The operations include
getting the set of supported attributes, retrieving the current attributes, setting the current
attributes, enabling attributes, and disabling attributes.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Operation The operation to perform on the attributes for this PCI controller.
@param Attributes The mask of attributes that are used for Set, Enable, and Disable
operations.
@param Result A pointer to the result mask of attributes that are returned for the Get
and Supported operations.
@retval EFI_SUCCESS The operation on the PCI controller's attributes was completed.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED one or more of the bits set in
Attributes are not supported by this PCI controller or one of
its parent bridges when Operation is Set, Enable or Disable.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_ATTRIBUTES) (
IN EFI_PCI_IO_PROTOCOL *This,
IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
IN UINT64 Attributes,
OUT UINT64 *Result OPTIONAL
);
/**
Gets the attributes that this PCI controller supports setting on a BAR using
SetBarAttributes(), and retrieves the list of resource descriptors for a BAR.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
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
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
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 VOID **Resources OPTIONAL
);
/**
Sets the attributes for a range of a BAR on a PCI controller.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@param Attributes The mask of attributes to set for the resource range specified by
BarIndex, Offset, and Length.
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
base address for resource range. The legal range for this field is 0..5.
@param Offset A pointer to the BAR relative base address of the resource range to be
modified by the attributes specified by Attributes.
@param Length A pointer to the length of the resource range to be modified by the
attributes specified by Attributes.
@retval EFI_SUCCESS The set of attributes specified by Attributes for the resource
range specified by BarIndex, Offset, and Length were
set on the PCI controller, and the actual resource range is returned
in Offset and Length.
@retval EFI_INVALID_PARAMETER Offset or Length is NULL.
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the attributes on the
resource range specified by BarIndex, Offset, and
Length.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES) (
IN EFI_PCI_IO_PROTOCOL *This,
IN UINT64 Attributes,
IN UINT8 BarIndex,
IN OUT UINT64 *Offset,
IN OUT UINT64 *Length
);
//
// Interface structure for the PCI I/O Protocol
//
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;
UINT64 RomSize;
VOID *RomImage;
};
extern EFI_GUID gEfiPciIoProtocolGuid;
#endif

View File

@ -1,207 +0,0 @@
/** @file
This file declares PlatfromOpRom protocols.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PciPlatform.h
@par Revision Reference:
This protocol is defined in PCI Platform Support Specification
Version 0.9
**/
#ifndef _PCI_PLATFORM_H_
#define _PCI_PLATFORM_H_
//
// Protocol for GUID.
//
#define EFI_PCI_PLATFORM_PROTOCOL_GUID \
{ 0x7d75280, 0x27d4, 0x4d69, {0x90, 0xd0, 0x56, 0x43, 0xe2, 0x38, 0xb3, 0x41} }
typedef struct _EFI_PCI_PLATFORM_PROTOCOL EFI_PCI_PLATFORM_PROTOCOL;
typedef UINT32 EFI_PCI_PLATFORM_POLICY;
#define EFI_RESERVE_NONE_IO_ALIAS 0x0000
#define EFI_RESERVE_ISA_IO_ALIAS 0x0001
#define EFI_RESERVE_ISA_IO_NO_ALIAS 0x0002
#define EFI_RESERVE_VGA_IO_ALIAS 0x0004
#define EFI_RESERVE_VGA_IO_NO_ALIAS 0x0008
typedef enum {
ChipsetEntry,
ChipsetExit,
MaximumChipsetPhase
} EFI_PCI_CHIPSET_EXECUTION_PHASE;
/**
The PlatformNotify() function can be used to notify the platform driver so that
it can perform platform-specific actions. No specific actions are required.
Eight notification points are defined at this time. More synchronization points
may be added as required in the future. The PCI bus driver calls the platform driver
twice for every Phase-once before the PCI Host Bridge Resource Allocation Protocol
driver is notified, and once after the PCI Host Bridge Resource Allocation Protocol
driver has been notified.
This member function may not perform any error checking on the input parameters. It
also does not return any error codes. If this member function detects any error condition,
it needs to handle those errors on its own because there is no way to surface any
errors to the caller.
@param This Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
@param HostBridge The handle of the host bridge controller.
@param Phase The phase of the PCI bus enumeration.
@param ChipsetPhase Defines the execution phase of the PCI chipset driver.
@retval EFI_SUCCESS The function completed successfully.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_PLATFORM_PHASE_NOTIFY) (
IN EFI_PCI_PLATFORM_PROTOCOL *This,
IN EFI_HANDLE HostBridge,
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase,
IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase
)
;
/**
The PlatformPrepController() function can be used to notify the platform driver so that
it can perform platform-specific actions. No specific actions are required.
Several notification points are defined at this time. More synchronization points may be
added as required in the future. The PCI bus driver calls the platform driver twice for
every PCI controller-once before the PCI Host Bridge Resource Allocation Protocol driver
is notified, and once after the PCI Host Bridge Resource Allocation Protocol driver has
been notified.
This member function may not perform any error checking on the input parameters. It also
does not return any error codes. If this member function detects any error condition, it
needs to handle those errors on its own because there is no way to surface any errors to
the caller.
@param This Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
@param HostBridge The associated PCI host bridge handle.
@param RootBridge The associated PCI root bridge handle.
@param PciAddress The address of the PCI device on the PCI bus.
@param Phase The phase of the PCI controller enumeration.
@param ChipsetPhase Defines the execution phase of the PCI chipset driver.
@retval EFI_SUCCESS The function completed successfully.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_PLATFORM_PREPROCESS_CONTROLLER) (
IN EFI_PCI_PLATFORM_PROTOCOL *This,
IN EFI_HANDLE HostBridge,
IN EFI_HANDLE RootBridge,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS PciAddress,
IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase,
IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase
)
;
/**
The GetPlatformPolicy() function retrieves the platform policy regarding PCI
enumeration. The PCI bus driver and the PCI Host Bridge Resource Allocation Protocol
driver can call this member function to retrieve the policy.
@param This Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
@param PciPolicy The platform policy with respect to VGA and ISA aliasing.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER PciPolicy is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_PLATFORM_GET_PLATFORM_POLICY) (
IN EFI_PCI_PLATFORM_PROTOCOL *This,
OUT EFI_PCI_PLATFORM_POLICY *PciPolicy
)
;
/**
The GetPciRom() function gets the PCI device's option ROM from a platform-specific location.
The option ROM will be loaded into memory. This member function is used to return an image
that is packaged as a PCI 2.2 option ROM. The image may contain both legacy and EFI option
ROMs. See the EFI 1.10 Specification for details. This member function can be used to return
option ROM images for embedded controllers. Option ROMs for embedded controllers are typically
stored in platform-specific storage, and this member function can retrieve it from that storage
and return it to the PCI bus driver. The PCI bus driver will call this member function before
scanning the ROM that is attached to any controller, which allows a platform to specify a ROM
image that is different from the ROM image on a PCI card.
@param This Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.
@param PciHandle The handle of the PCI device.
@param RomImage If the call succeeds, the pointer to the pointer to the option ROM image.
Otherwise, this field is undefined. The memory for RomImage is allocated
by EFI_PCI_PLATFORM_PROTOCOL.GetPciRom() using the EFI Boot Service AllocatePool().
It is the caller's responsibility to free the memory using the EFI Boot Service
FreePool(), when the caller is done with the option ROM.
@param RomSize If the call succeeds, a pointer to the size of the option ROM size. Otherwise,
this field is undefined.
@retval EFI_SUCCESS The option ROM was available for this device and loaded into memory.
@retval EFI_NOT_FOUND No option ROM was available for this device.
@retval EFI_OUT_OF_RESOURCES No memory was available to load the option ROM.
@retval EFI_DEVICE_ERROR An error occurred in getting the option ROM.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_PLATFORM_GET_PCI_ROM) (
IN EFI_PCI_PLATFORM_PROTOCOL *This,
IN EFI_HANDLE PciHandle,
OUT VOID **RomImage,
OUT UINTN *RomSize
)
;
/**
@par Protocol Description:
This protocol provides the interface between the PCI bus driver/PCI Host
Bridge Resource Allocation driver and a platform-specific driver to describe
the unique features of a platform.
@param PlatformNotify
The notification from the PCI bus enumerator to the platform that it is
about to enter a certain phase during the enumeration process.
@param PlatformPrepController
The notification from the PCI bus enumerator to the platform for each PCI
controller at several predefined points during PCI controller initialization.
@param GetPlatformPolicy
Retrieves the platform policy regarding enumeration.
@param GetPciRom
Gets the PCI device<63><65>s option ROM from a platform-specific location.
**/
struct _EFI_PCI_PLATFORM_PROTOCOL {
EFI_PCI_PLATFORM_PHASE_NOTIFY PhaseNotify;
EFI_PCI_PLATFORM_PREPROCESS_CONTROLLER PlatformPrepController;
EFI_PCI_PLATFORM_GET_PLATFORM_POLICY GetPlatformPolicy;
EFI_PCI_PLATFORM_GET_PCI_ROM GetPciRom;
};
extern EFI_GUID gEfiPciPlatformProtocolGuid;
#endif

View File

@ -1,384 +0,0 @@
/** @file
PCI Root Bridge I/O protocol as defined in the EFI 1.1 specification.
PCI Root Bridge I/O protocol is used by PCI Bus Driver to perform PCI Memory, PCI I/O,
and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
defferent types of bus mastering DMA
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PciRootBridgeIo.h
**/
#ifndef __PCI_ROOT_BRIDGE_IO_H__
#define __PCI_ROOT_BRIDGE_IO_H__
#define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
{ \
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 enum {
EfiPciWidthUint8,
EfiPciWidthUint16,
EfiPciWidthUint32,
EfiPciWidthUint64,
EfiPciWidthFifoUint8,
EfiPciWidthFifoUint16,
EfiPciWidthFifoUint32,
EfiPciWidthFifoUint64,
EfiPciWidthFillUint8,
EfiPciWidthFillUint16,
EfiPciWidthFillUint32,
EfiPciWidthFillUint64,
EfiPciWidthMaximum
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH;
typedef enum {
EfiPciOperationBusMasterRead,
EfiPciOperationBusMasterWrite,
EfiPciOperationBusMasterCommonBuffer,
EfiPciOperationBusMasterRead64,
EfiPciOperationBusMasterWrite64,
EfiPciOperationBusMasterCommonBuffer64,
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_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_ADDRESS(bus, dev, func, reg) \
((UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)))
typedef struct {
UINT8 Register;
UINT8 Function;
UINT8 Device;
UINT8 Bus;
UINT32 ExtendedRegister;
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS;
/**
Reads from the I/O space of a PCI Root Bridge. Returns when either the polling exit criteria is
satisfied or after a defined duration.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Width Signifies the width of the memory or I/O operations.
@param Address The base address of the memory or I/O operations.
@param Mask Mask used for the polling criteria.
@param Value The comparison value used for the polling exit criteria.
@param Delay The number of 100 ns units to poll.
@param Result Pointer to the last value read from the memory location.
@retval EFI_SUCCESS The last data returned from the access matched the poll exit criteria.
@retval EFI_TIMEOUT Delay expired before a match occurred.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 Address,
IN UINT64 Mask,
IN UINT64 Value,
IN UINT64 Delay,
OUT UINT64 *Result
);
/**
Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Width Signifies the width of the memory operations.
@param Address The base address of the memory operations.
@param Count The number of memory operations to perform.
@param Buffer For read operations, the destination buffer to store the results. For write
operations, the source buffer to write data from.
@retval EFI_SUCCESS The data was read from or written to the PCI root bridge.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN OUT VOID *Buffer
);
typedef struct {
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write;
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS;
/**
Enables a PCI driver to copy one region of PCI root bridge memory space to another region of PCI
root bridge memory space.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.
@param Width Signifies the width of the memory operations.
@param DestAddress The destination address of the memory operation.
@param SrcAddress The source address of the memory operation.
@param Count The number of memory operations to perform.
@retval EFI_SUCCESS The data was copied from one memory region to another memory region.
@retval EFI_INVALID_PARAMETER Width is invalid for this PCI root bridge.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 DestAddress,
IN UINT64 SrcAddress,
IN UINTN Count
);
/**
Provides the PCI controller<65>Cspecific addresses required to access system memory from a
DMA bus master.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Operation Indicates if the bus master is going to read or write to system memory.
@param HostAddress The system memory address to map to the PCI controller.
@param NumberOfBytes On input the number of bytes to map. On output the number of bytes
that were mapped.
@param DeviceAddress The resulting map address for the bus master PCI controller to use to
access the hosts HostAddress.
@param Mapping A resulting value to pass to Unmap().
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
@retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.
@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_DEVICE_ERROR The system hardware could not map the requested address.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation,
IN VOID *HostAddress,
IN OUT UINTN *NumberOfBytes,
OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
);
/**
Completes the Map() operation and releases any corresponding resources.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Mapping The mapping value returned from Map().
@retval EFI_SUCCESS The range was unmapped.
@retval EFI_INVALID_PARAMETER Mapping is not a value that was returned by Map().
@retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN VOID *Mapping
);
/**
Allocates pages that are suitable for an EfiPciOperationBusMasterCommonBuffer or
EfiPciOperationBusMasterCommonBuffer64 mapping.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Type This parameter is not used and must be ignored.
@param MemoryType The type of memory to allocate, EfiBootServicesData or
EfiRuntimeServicesData.
@param Pages The number of pages to allocate.
@param HostAddress A pointer to store the base system memory address of the
allocated range.
@param Attributes The requested bit mask of attributes for the allocated range.
@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.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
IN OUT VOID **HostAddress,
IN UINT64 Attributes
);
/**
Frees memory that was allocated with AllocateBuffer().
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Pages The number of pages to free.
@param HostAddress The base system memory address of the allocated range.
@retval EFI_SUCCESS The requested memory pages were freed.
@retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages
was not allocated with AllocateBuffer().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN UINTN Pages,
IN VOID *HostAddress
);
/**
Flushes all PCI posted write transactions from a PCI host bridge to system memory.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@retval EFI_SUCCESS The PCI posted write transactions were flushed from the PCI host
bridge to system memory.
@retval EFI_DEVICE_ERROR The PCI posted write transactions were not flushed from the PCI
host bridge due to a hardware error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This
);
/**
Gets the attributes that a PCI root bridge supports setting with SetAttributes(), and the
attributes that a PCI root bridge is currently using.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Supports A pointer to the mask of attributes that this PCI root bridge supports
setting with SetAttributes().
@param Attributes A pointer to the mask of attributes that this PCI root bridge is currently
using.
@retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI root
bridge supports is returned in Supports. If Attributes is
not NULL, then the attributes that the PCI root bridge is currently
using is returned in Attributes.
@retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
OUT UINT64 *Supports,
OUT UINT64 *Attributes
);
/**
Sets attributes for a resource range on a PCI root bridge.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Attributes The mask of attributes to set.
@param ResourceBase A pointer to the base address of the resource range to be modified by the
attributes specified by Attributes.
@param ResourceLength A pointer to the length of the resource range to be modified by the
attributes specified by Attributes.
@retval EFI_SUCCESS The set of attributes specified by Attributes for the resource
range specified by ResourceBase and ResourceLength
were set on the PCI root bridge, and the actual resource range is
returned in ResuourceBase and ResourceLength.
@retval EFI_UNSUPPORTED A bit is set in Attributes that is not supported by the PCI Root
Bridge.
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the attributes on the
resource range specified by BaseAddress and Length.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN UINT64 Attributes,
IN OUT UINT64 *ResourceBase,
IN OUT UINT64 *ResourceLength
);
/**
Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0
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
configuration of this PCI root bridge.
@retval EFI_SUCCESS The current configuration of this PCI root bridge was returned in
Resources.
@retval EFI_UNSUPPORTED The current configuration of this PCI root bridge could not be
retrieved.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION) (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,
IN VOID **Resources
);
struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL {
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;
UINT32 SegmentNumber;
};
extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid;
#endif

View File

@ -1,135 +0,0 @@
/** @file
Platform Driver Override protocol as defined in the EFI 1.1 specification.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PlatformDriverOverride.h
**/
#ifndef __EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H__
#define __EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H__
//
// Global ID for the Platform Driver Override Protocol
//
#define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID \
{ \
0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;
//
// Prototypes for the Platform Driver Override Protocol
//
/**
Retrieves the image handle of the platform override driver for a controller in the system.
@param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_
PROTOCOL instance.
@param ControllerHandle The device handle of the controller to check if a driver override
exists.
@param DriverImageHandle On input, a pointer to the previous driver image handle returned
by GetDriver(). On output, a pointer to the next driver
image handle.
@retval EFI_SUCCESS The driver override for ControllerHandle was returned in
DriverImageHandle.
@retval EFI_NOT_FOUND A driver override for ControllerHandle was not found.
@retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is not a valid handle.
@retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a
previous call to GetDriver().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER) (
IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN OUT EFI_HANDLE *DriverImageHandle
);
/**
Retrieves the device path of the platform override driver for a controller in the system.
@param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_
PROTOCOL instance.
@param ControllerHandle The device handle of the controller to check if a driver override
exists.
@param DriverImageHandle On input, a pointer to the previous driver image handle returned
by GetDriverPath(). On output, a pointer to the next driver
device path.
@retval EFI_SUCCESS The driver override for ControllerHandle was returned in
DriverImageHandle.
@retval EFI_UNSUPPORTED The operation is not supported.
@retval EFI_NOT_FOUND A driver override for ControllerHandle was not found.
@retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is not a valid handle.
@retval EFI_INVALID_PARAMETER DriverImagePath is not a device path that was returned on a
previous call to GetDriverPath().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH) (
IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DriverImagePath
);
/**
Used to associate a driver image handle with a device path that was returned on a prior call to the
GetDriverPath() service. This driver image handle will then be available through the
GetDriver() service.
@param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_
PROTOCOL instance.
@param ControllerHandle The device handle of the controller.
@param DriverImagePath A pointer to the driver device path that was returned in a prior
call to GetDriverPath().
@param DriverImageHandle The driver image handle that was returned by LoadImage()
when the driver specified by DriverImagePath was loaded
into memory.
@retval EFI_SUCCESS The association between DriverImagePath and
DriverImageHandle was established for the controller specified
by ControllerHandle.
@retval EFI_UNSUPPORTED The operation is not supported.
@retval EFI_NOT_FOUND DriverImagePath is not a device path that was returned on a prior
call to GetDriverPath() for the controller specified by
ControllerHandle.
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid device handle.
@retval EFI_INVALID_PARAMETER DriverImagePath is not a valid device path.
@retval EFI_INVALID_PARAMETER DriverImageHandle is not a valid image handle.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED) (
IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *DriverImagePath,
IN EFI_HANDLE DriverImageHandle
);
//
// Interface structure for the Platform Driver Override Protocol
//
struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {
EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH GetDriverPath;
EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED DriverLoaded;
};
extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid;
#endif

View File

@ -1,622 +0,0 @@
/** @file
EFI PXE Base Code Protocol definitions.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PxeBaseCode.h
**/
#ifndef __PXE_BASE_CODE_PROTOCOL_H__
#define __PXE_BASE_CODE_PROTOCOL_H__
//
// PXE Base Code protocol
//
#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \
{ \
0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL;
//
// Default IP TTL and ToS.
//
#define DEFAULT_TTL 16
#define DEFAULT_ToS 0
//
// ICMP error format
//
typedef struct {
UINT8 Type;
UINT8 Code;
UINT16 Checksum;
union {
UINT32 reserved;
UINT32 Mtu;
UINT32 Pointer;
struct {
UINT16 Identifier;
UINT16 Sequence;
} Echo;
} u;
UINT8 Data[494];
} EFI_PXE_BASE_CODE_ICMP_ERROR;
//
// TFTP error format
//
typedef struct {
UINT8 ErrorCode;
CHAR8 ErrorString[127];
} EFI_PXE_BASE_CODE_TFTP_ERROR;
//
// IP Receive Filter definitions
//
#define EFI_PXE_BASE_CODE_MAX_IPCNT 8
typedef struct {
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
//
// ARP Cache definitions
//
typedef struct {
EFI_IP_ADDRESS IpAddr;
EFI_MAC_ADDRESS MacAddr;
} EFI_PXE_BASE_CODE_ARP_ENTRY;
typedef struct {
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;
#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
//
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
#define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4
#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5
#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6
#define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7
#define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8
#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9
#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10
#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11
#define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12
#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13
#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
//
// 17 through 32767 are reserved
// 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_LAYER_MASK 0x7FFF
#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000
//
// Discover() server list structure.
//
typedef struct {
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];
} EFI_PXE_BASE_CODE_DISCOVER_INFO;
//
// Mtftp() definitions
//
typedef enum {
EFI_PXE_BASE_CODE_TFTP_FIRST,
EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE,
EFI_PXE_BASE_CODE_TFTP_READ_FILE,
EFI_PXE_BASE_CODE_TFTP_WRITE_FILE,
EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY,
EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,
EFI_PXE_BASE_CODE_MTFTP_READ_FILE,
EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY,
EFI_PXE_BASE_CODE_MTFTP_LAST
} EFI_PXE_BASE_CODE_TFTP_OPCODE;
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_PXE_BASE_CODE_MTFTP_INFO;
//
// PXE Base Code Mode structure
//
#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
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;
} EFI_PXE_BASE_CODE_MODE;
//
// PXE Base Code Interface Function definitions
//
/**
Enables the use of the PXE Base Code Protocol functions.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param UseIpv6 Specifies the type of IP addresses that are to be used during the session
that is being started. Set to TRUE for IPv6 addresses, and FALSE for
IPv4 addresses.
@retval EFI_SUCCESS The PXE Base Code Protocol was started.
@retval EFI_DEVICE_ERROR The network device encountered an error during this oper
@retval EFI_UNSUPPORTED UseIpv6 is TRUE, but the Ipv6Supported field of the
EFI_PXE_BASE_CODE_MODE structure is FALSE.
@retval EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state.
@retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
EFI_PXE_BASE_CODE_PROTOCOL structure.
@retval EFI_OUT_OF_RESOURCES Could not allocate enough memory or other resources to start the
PXE Base Code Protocol.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_START) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN BOOLEAN UseIpv6
);
/**
Disables the use of the PXE Base Code Protocol functions.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@retval EFI_SUCCESS The PXE Base Code Protocol was stopped.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is already in the stopped state.
@retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
EFI_PXE_BASE_CODE_PROTOCOL structure.
@retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_STOP) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This
);
/**
Attempts to complete a DHCPv4 D.O.R.A. (discover / offer / request / acknowledge) or DHCPv6
S.A.R.R (solicit / advertise / request / reply) sequence.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param SortOffers TRUE if the offers received should be sorted. Set to FALSE to try the
offers in the order that they are received.
@retval EFI_SUCCESS Valid DHCP has completed.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
EFI_PXE_BASE_CODE_PROTOCOL structure.
@retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
@retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Protocol.
@retval EFI_ABORTED The callback function aborted the DHCP Protocol.
@retval EFI_TIMEOUT The DHCP Protocol timed out.
@retval EFI_ICMP_ERROR An ICMP error packet was received during the DHCP session.
@retval EFI_NO_RESPONSE Valid PXE offer was not received.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_DHCP) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN BOOLEAN SortOffers
);
/**
Attempts to complete the PXE Boot Server and/or boot image discovery sequence.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param Type The type of bootstrap to perform.
@param Layer Pointer to the boot server layer number to discover, which must be
PXE_BOOT_LAYER_INITIAL when a new server type is being
discovered.
@param UseBis TRUE if Boot Integrity Services are to be used. FALSE otherwise.
@param Info Pointer to a data structure that contains additional information on the
type of discovery operation that is to be performed.
@retval EFI_SUCCESS The Discovery sequence has been completed.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
@retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete Discovery.
@retval EFI_ABORTED The callback function aborted the Discovery sequence.
@retval EFI_TIMEOUT The Discovery sequence timed out.
@retval EFI_ICMP_ERROR An ICMP error packet was received during the PXE discovery
session.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN UINT16 Type,
IN UINT16 *Layer,
IN BOOLEAN UseBis,
IN EFI_PXE_BASE_CODE_DISCOVER_INFO *Info OPTIONAL
);
/**
Used to perform TFTP and MTFTP services.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param Operation The type of operation to perform.
@param BufferPtr A pointer to the data buffer.
@param Overwrite Only used on write file operations. TRUE if a file on a remote server can
be overwritten.
@param BufferSize For get-file-size operations, *BufferSize returns the size of the
requested file.
@param BlockSize The requested block size to be used during a TFTP transfer.
@param ServerIp The TFTP / MTFTP server IP address.
@param Filename A Null-terminated ASCII string that specifies a directory name or a file
name.
@param Info Pointer to the MTFTP information.
@param DontUseBuffer Set to FALSE for normal TFTP and MTFTP read file operation.
@retval EFI_SUCCESS The TFTP/MTFTP operation was completed.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
@retval EFI_BUFFER_TOO_SMALL The buffer is not large enough to complete the read operation.
@retval EFI_ABORTED The callback function aborted the TFTP/MTFTP operation.
@retval EFI_TIMEOUT The TFTP/MTFTP operation timed out.
@retval EFI_ICMP_ERROR An ICMP error packet was received during the MTFTP session.
@retval EFI_TFTP_ERROR A TFTP error packet was received during the MTFTP session.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,
IN OUT VOID *BufferPtr OPTIONAL,
IN BOOLEAN Overwrite,
IN OUT UINT64 *BufferSize,
IN UINTN *BlockSize OPTIONAL,
IN EFI_IP_ADDRESS *ServerIp,
IN UINT8 *Filename OPTIONAL,
IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL,
IN BOOLEAN DontUseBuffer
);
/**
Writes a UDP packet to the network interface.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param OpFlags The UDP operation flags.
@param DestIp The destination IP address.
@param DestPort The destination UDP port number.
@param GatewayIp The gateway IP address.
@param SrcIp The source IP address.
@param SrcPort The source UDP port number.
@param HeaderSize An optional field which may be set to the length of a header at
HeaderPtr to be prefixed to the data at BufferPtr.
@param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
data at BufferPtr.
@param BufferSize A pointer to the size of the data at BufferPtr.
@param BufferPtr A pointer to the data to be written.
@retval EFI_SUCCESS The UDP Write operation was completed.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_BAD_BUFFER_SIZE The buffer is too long to be transmitted.
@retval EFI_ABORTED The callback function aborted the UDP Write operation.
@retval EFI_TIMEOUT The UDP Write operation timed out.
@retval EFI_ICMP_ERROR An ICMP error packet was received during the UDP write session.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
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 UINTN *BufferSize,
IN VOID *BufferPtr
);
/**
Reads a UDP packet from the network interface.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param OpFlags The UDP operation flags.
@param DestIp The destination IP address.
@param DestPort The destination UDP port number.
@param GatewayIp The gateway IP address.
@param SrcIp The source IP address.
@param SrcPort The source UDP port number.
@param HeaderSize An optional field which may be set to the length of a header at
HeaderPtr to be prefixed to the data at BufferPtr.
@param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
data at BufferPtr.
@param BufferSize A pointer to the size of the data at BufferPtr.
@param BufferPtr A pointer to the data to be read.
@retval EFI_SUCCESS The UDP Write operation was completed.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
@retval EFI_BUFFER_TOO_SMALL The packet is larger than Buffer can hold.
@retval EFI_ABORTED The callback function aborted the UDP Read operation.
@retval EFI_TIMEOUT The UDP Read operation timed out.
**/
typedef
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 UINTN *BufferSize,
IN VOID *BufferPtr
);
/**
Updates the IP receive filters of a network device and enables software filtering.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param NewFilter Pointer to the new set of IP receive filters.
@retval EFI_SUCCESS The IP receive filter settings were updated.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter
);
/**
Uses the ARP protocol to resolve a MAC address.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param IpAddr Pointer to the IP address that is used to resolve a MAC address.
@param MacAddr If not NULL, a pointer to the MAC address that was resolved with the
ARP protocol.
@retval EFI_SUCCESS The IP or MAC address was resolved.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
@retval EFI_ABORTED The callback function aborted the ARP Protocol.
@retval EFI_TIMEOUT The ARP Protocol encountered a timeout condition.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_ARP) (
IN EFI_PXE_BASE_CODE_PROTOCOL *This,
IN EFI_IP_ADDRESS *IpAddr,
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
);
/**
Updates the parameters that affect the operation of the PXE Base Code Protocol.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param NewAutoArp If not NULL, a pointer to a value that specifies whether to replace the
current value of AutoARP.
@param NewSendGUID If not NULL, a pointer to a value that specifies whether to replace the
current value of SendGUID.
@param NewTTL If not NULL, a pointer to be used in place of the current value of TTL,
the <20><>time to live<76><65> field of the IP header.
@param NewToS If not NULL, a pointer to be used in place of the current value of ToS,
the <20><>type of service<63><65> field of the IP header.
@param NewMakeCallback If not NULL, a pointer to a value that specifies whether to replace the
current value of the MakeCallback field of the Mode structure.
@retval EFI_SUCCESS The new parameters values were updated.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
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 *NewMakeCallback OPTIONAL
);
/**
Updates the station IP address and/or subnet mask values of a network device.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param NewStationIp Pointer to the new IP address to be used by the network device.
@param NewSubnetMask Pointer to the new subnet mask to be used by the network device.
@retval EFI_SUCCESS The new station IP address and/or subnet mask were updated.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
**/
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 *NewSubnetMask OPTIONAL
);
/**
Updates the contents of the cached DHCP and Discover packets.
@param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
@param NewDhcpDiscoverValid Pointer to a value that will replace the current
DhcpDiscoverValid field.
@param NewDhcpAckReceived Pointer to a value that will replace the current
DhcpAckReceived field.
@param NewProxyOfferReceived Pointer to a value that will replace the current
ProxyOfferReceived field.
@param NewPxeDiscoverValid Pointer to a value that will replace the current
ProxyOfferReceived field.
@param NewPxeReplyReceived Pointer to a value that will replace the current
PxeReplyReceived field.
@param NewPxeBisReplyReceived Pointer to a value that will replace the current
PxeBisReplyReceived field.
@param NewDhcpDiscover Pointer to the new cached DHCP Discover packet contents.
@param NewDhcpAck Pointer to the new cached DHCP Ack packet contents.
@param NewProxyOffer Pointer to the new cached Proxy Offer packet contents.
@param NewPxeDiscover Pointer to the new cached PXE Discover packet contents.
@param NewPxeReply Pointer to the new cached PXE Reply packet contents.
@param NewPxeBisReply Pointer to the new cached PXE BIS Reply packet contents.
@retval EFI_SUCCESS The cached packet contents were updated.
@retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
@retval EFI_INVALID_PARAMETER This is NULL or not point to a valid EFI_PXE_BASE_CODE_PROTOCOL structure.
**/
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
IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL
);
//
// PXE Base Code Protocol structure
//
#define EFI_PXE_BASE_CODE_INTERFACE_REVISION 0x00010000
#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION EFI_PXE_BASE_CODE_INTERFACE_REVISION
struct _EFI_PXE_BASE_CODE_PROTOCOL {
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;
EFI_PXE_BASE_CODE_MODE *Mode;
};
extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;
#endif

View File

@ -1,94 +0,0 @@
/** @file
EFI PXE Base Code CallBack Protocol
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: PxeBaseCodeCallBack.h
**/
#ifndef _PXE_BASE_CODE_CALLBACK_H_
#define _PXE_BASE_CODE_CALLBACK_H_
//
// Call Back Definitions
//
#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID \
{ \
0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
//
// Revision Number
//
#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000
#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION \
EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION
//
// Protocol definition
//
typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
typedef enum {
EFI_PXE_BASE_CODE_FUNCTION_FIRST,
EFI_PXE_BASE_CODE_FUNCTION_DHCP,
EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,
EFI_PXE_BASE_CODE_FUNCTION_MTFTP,
EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,
EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,
EFI_PXE_BASE_CODE_FUNCTION_ARP,
EFI_PXE_BASE_CODE_FUNCTION_IGMP,
EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST
} EFI_PXE_BASE_CODE_FUNCTION;
typedef enum {
EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,
EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,
EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,
EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST
} EFI_PXE_BASE_CODE_CALLBACK_STATUS;
/**
Callback function that is invoked when the PXE Base Code Protocol is about to transmit, has
received, or is waiting to receive a packet.
@param This Pointer to the EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL instance.
@param Function The PXE Base Code Protocol function that is waiting for an event.
@param Received TRUE if the callback is being invoked due to a receive event. FALSE if
the callback is being invoked due to a transmit event.
@param PacketLen The length, in bytes, of Packet. This field will have a value of zero if
this is a wait for receive event.
@param Packet If Received is TRUE, a pointer to the packet that was just received;
otherwise a pointer to the packet that is about to be transmitted.
@retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE if Function specifies a continue operation
@retval EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT if Function specifies an abort operation
**/
typedef
EFI_PXE_BASE_CODE_CALLBACK_STATUS
(EFIAPI *EFI_PXE_CALLBACK)(
IN EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL *This,
IN EFI_PXE_BASE_CODE_FUNCTION Function,
IN BOOLEAN Received,
IN UINT32 PacketLen,
IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL
);
struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL {
UINT64 Revision;
EFI_PXE_CALLBACK Callback;
};
extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid;
#endif

View File

@ -1,233 +0,0 @@
/** @file
EFI_SCSI_IO_PROTOCOL as defined in UEFI 2.0.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: ScsiIo.h
**/
#ifndef __EFI_SCSI_IO_PROTOCOL_H__
#define __EFI_SCSI_IO_PROTOCOL_H__
#define EFI_SCSI_IO_PROTOCOL_GUID \
{ \
0x932f4736, 0x2362, 0x4002, {0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \
}
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL;
//
// SCSI Data Direction definition
//
#define EFI_SCSI_IO_DATA_DIRECTION_READ 0
#define EFI_SCSI_IO_DATA_DIRECTION_WRITE 1
#define EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL 2
//
// SCSI Host Adapter Status definition
//
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OK 0x00
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 // timeout when processing the command
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_TIMEOUT 0x0b // timeout when waiting for the command processing
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d // a message reject was received when processing command
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_BUS_RESET 0x0e // a bus reset was detected
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 // the adapter failed in issuing request sense command
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 // selection timeout
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 // data overrun or data underrun
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_BUS_FREE 0x13 // Unexepected bus free
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 // Target bus phase sequence failure
#define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OTHER 0x7f
//
// SCSI Target Status definition
//
#define EFI_SCSI_IO_STATUS_TARGET_GOOD 0x00
#define EFI_SCSI_IO_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition
#define EFI_SCSI_IO_STATUS_TARGET_CONDITION_MET 0x04 // condition met
#define EFI_SCSI_IO_STATUS_TARGET_BUSY 0x08 // busy
#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate
#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met
#define EFI_SCSI_IO_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict
#define EFI_SCSI_IO_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated
#define EFI_SCSI_IO_STATUS_TARGET_QUEUE_FULL 0x28 // queue full
typedef struct {
UINT64 Timeout;
VOID *InDataBuffer;
VOID *OutDataBuffer;
VOID *SenseData;
VOID *Cdb;
UINT32 InTransferLength;
UINT32 OutTransferLength;
UINT8 CdbLength;
UINT8 DataDirection;
UINT8 HostAdapterStatus;
UINT8 TargetStatus;
UINT8 SenseDataLength;
} EFI_SCSI_IO_SCSI_REQUEST_PACKET;
/**
Retrieves the device type information of the SCSI Controller.
@param This Protocol instance pointer.
@param DeviceType A pointer to the device type information
retrieved from the SCSI Controller.
@retval EFI_SUCCESS Retrieves the device type information successfully.
@retval EFI_INVALID_PARAMETER The DeviceType is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE) (
IN EFI_SCSI_IO_PROTOCOL *This,
OUT UINT8 *DeviceType
)
;
/**
Retrieves the device location in the SCSI channel.
@param This Protocol instance pointer.
@param Target A pointer to the Target ID of a SCSI device
on the SCSI channel.
@param Lun A pointer to the LUN of the SCSI device on
the SCSI channel.
@retval EFI_SUCCESS Retrieves the device location successfully.
@retval EFI_INVALID_PARAMETER The Target or Lun is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION) (
IN EFI_SCSI_IO_PROTOCOL *This,
IN OUT UINT8 **Target,
OUT UINT64 *Lun
)
;
/**
Resets the SCSI Bus that the SCSI Controller is attached to.
@param This Protocol instance pointer.
@retval EFI_SUCCESS The SCSI bus is reset successfully.
@retval EFI_DEVICE_ERROR Errors encountered when resetting the SCSI bus.
@retval EFI_UNSUPPORTED The bus reset operation is not supported by the
SCSI Host Controller.
@retval EFI_TIMEOUT A timeout occurred while attempting to reset
the SCSI bus.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_BUS) (
IN EFI_SCSI_IO_PROTOCOL *This
)
;
/**
Resets the SCSI Controller that the device handle specifies.
@param This Protocol instance pointer.
@retval EFI_SUCCESS Reset the SCSI controller successfully.
@retval EFI_DEVICE_ERROR Errors are encountered when resetting the
SCSI Controller.
@retval EFI_UNSUPPORTED The SCSI bus does not support a device
reset operation.
@retval EFI_TIMEOUT A timeout occurred while attempting to
reset the SCSI Controller.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_DEVICE) (
IN EFI_SCSI_IO_PROTOCOL *This
)
;
/**
Sends a SCSI Request Packet to the SCSI Controller for execution.
@param This Protocol instance pointer.
@param Packet The SCSI request packet to send to the SCSI
Controller specified by the device handle.
@param Event If the SCSI bus where the SCSI device is attached
does not support non-blocking I/O, then Event is
ignored, and blocking I/O is performed.
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 SCSI Request
Packet completes.
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host
successfully, and TransferLength bytes were
transferred to/from DataBuffer.See
HostAdapterStatus, TargetStatus,
SenseDataLength, and SenseData in that order
for additional status information.
@retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
in TransferLength. See HostAdapterStatus,
TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because
there are too many SCSI Command Packets already
queued.The caller may retry again later.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. See HostAdapterStatus,
TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
@retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid.
The SCSI Request Packet was not sent, so no
additional status information is available.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the SCSI initiator(i.e., SCSI
Host Controller). The SCSI Request Packet was not
sent, so no additional status information is
available.
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute. See HostAdapterStatus,
TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND) (
IN EFI_SCSI_IO_PROTOCOL *This,
IN OUT EFI_SCSI_IO_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
;
struct _EFI_SCSI_IO_PROTOCOL {
EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE GetDeviceType;
EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION GetDeviceLocation;
EFI_SCSI_IO_PROTOCOL_RESET_BUS ResetBus;
EFI_SCSI_IO_PROTOCOL_RESET_DEVICE ResetDevice;
EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND ExecuteSCSICommand;
UINT32 IoAlign;
};
extern EFI_GUID gEfiScsiIoProtocolGuid;
#endif

View File

@ -1,312 +0,0 @@
/** @file
SCSI Pass Through protocol.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: ScsiPassThru.h
**/
#ifndef __SCSI_PASS_THROUGH_H__
#define __SCSI_PASS_THROUGH_H__
#define EFI_SCSI_PASS_THRU_PROTOCOL_GUID \
{ \
0xa59e8fcf, 0xbda0, 0x43bb, {0x90, 0xb1, 0xd3, 0x73, 0x2e, 0xca, 0xa8, 0x77 } \
}
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_SCSI_PASS_THRU_PROTOCOL EFI_SCSI_PASS_THRU_PROTOCOL;
#define EFI_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001
#define EFI_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002
#define EFI_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004
//
// SCSI Host Adapter Status definition
//
#define EFI_SCSI_STATUS_HOST_ADAPTER_OK 0x00
#define EFI_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 // timeout when processing the command
#define EFI_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b // timeout when waiting for the command processing
#define EFI_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d // a message reject was received when processing command
#define EFI_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e // a bus reset was detected
#define EFI_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
#define EFI_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 // the adapter failed in issuing request sense command
#define EFI_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 // selection timeout
#define EFI_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 // data overrun or data underrun
#define EFI_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13 // Unexepected bus free
#define EFI_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 // Target bus phase sequence failure
#define EFI_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f
//
// SCSI Target Status definition
//
#define EFI_SCSI_STATUS_TARGET_GOOD 0x00
#define EFI_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition
#define EFI_SCSI_STATUS_TARGET_CONDITION_MET 0x04 // condition met
#define EFI_SCSI_STATUS_TARGET_BUSY 0x08 // busy
#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate
#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met
#define EFI_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict
#define EFI_SCSI_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated
#define EFI_SCSI_STATUS_TARGET_QUEUE_FULL 0x28 // queue full
typedef struct {
UINT64 Timeout;
VOID *DataBuffer;
VOID *SenseData;
VOID *Cdb;
UINT32 TransferLength;
UINT8 CdbLength;
UINT8 DataDirection;
UINT8 HostAdapterStatus;
UINT8 TargetStatus;
UINT8 SenseDataLength;
} EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET;
typedef struct {
CHAR16 *ControllerName;
CHAR16 *ChannelName;
UINT32 AdapterId;
UINT32 Attributes;
UINT32 IoAlign;
} EFI_SCSI_PASS_THRU_MODE;
/**
Sends a SCSI Request Packet to a SCSI device that is attached to
the SCSI channel. This function supports both blocking I/O and
non-blocking I/O. The blocking I/O functionality is required,
and the non-blocking I/O functionality is optional.
@param This Protocol instance pointer.
@param Target The Target ID of the SCSI device to
send the SCSI Request Packet.
@param Lun The LUN of the SCSI device to send the
SCSI Request Packet.
@param Packet A pointer to the SCSI Request Packet to send
to the SCSI device specified by Target and Lun.
@param Event If non-blocking I/O is not supported then Event
is ignored, and blocking I/O is performed.
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 SCSI Request
Packet completes
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host, and
TransferLength bytes were transferred to/from
DataBuffer.See HostAdapterStatus, TargetStatus,
SenseDataLength,and SenseData in that order
for additional status information.
@retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed, but the
entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
in TransferLength. See HostAdapterStatus,
TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because
there are too many SCSI Request Packets already
queued. The caller may retry again later.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
the SCSI Request Packet. See HostAdapterStatus,
TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket
are invalid. The SCSI Request Packet was not sent,
so no additional status information is available.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
is not supported by the host adapter. The SCSI
Request Packet was not sent, so no additional
status information is available.
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
Request Packet to execute. See HostAdapterStatus,
TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_PASS_THRU_PASSTHRU) (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT32 Target,
IN UINT64 Lun,
IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
;
/**
Used to retrieve the list of legal Target IDs for SCSI devices
on a SCSI channel.
@param This Protocol instance pointer.
@param Target On input, a pointer to the Target ID of a
SCSI device present on the SCSI channel.
On output, a pointer to the Target ID of
the next SCSI device present on a SCSI channel.
An input value of 0xFFFFFFFF retrieves the
Target ID of the first SCSI device present on
a SCSI channel.
@param Lun On input, a pointer to the LUN of a SCSI device
present on the SCSI channel.On output, a pointer
to the LUN of the next SCSI device present on a
SCSI channel.
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI
channel was returned in Target and Lun.
@retval EFI_NOT_FOUND There are no more SCSI devices on this SCSI channel.
@retval EFI_INVALID_PARAMETER Target is not 0xFFFFFFFF, and Target and Lun were
not returned on a previous call to GetNextDevice().
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE) (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT32 *Target,
IN OUT UINT64 *Lun
)
;
/**
Used to allocate and build a device path node for a SCSI device
on a SCSI channel.
@param This Protocol instance pointer.
@param Target The Target ID of the SCSI device for which
a device path node is to be allocated and built.
@param Lun The LUN of the SCSI device for which a device
path node is to be allocated and built.
@param DevicePath A pointer to a single device path node that
describes the SCSI device specified by
Target and Lun. This function is responsible
for allocating the buffer DevicePath with the boot
service AllocatePool(). It is the caller's
responsibility to free DevicePath when the caller
is finished with DevicePath.
@retval EFI_SUCCESS The device path node that describes the SCSI device
specified by Target and Lun was allocated and
returned in DevicePath.
@retval EFI_NOT_FOUND The SCSI devices specified by Target and Lun does
not exist on the SCSI channel.
@retval EFI_INVALID_PARAMETER DevicePath is NULL.
@retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate
DevicePath.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH) (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT32 Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
;
/**
Used to translate a device path node to a Target ID and LUN.
@param This Protocol instance pointer.
@param DevicePath A pointer to the device path node that
describes a SCSI device on the SCSI channel.
@param Target A pointer to the Target ID of a SCSI device
on the SCSI channel.
@param Lun A pointer to the LUN of a SCSI device on
the SCSI channel.
@retval EFI_SUCCESS DevicePath was successfully translated to a
Target ID and LUN, and they were returned
in Target and Lun.
@retval EFI_INVALID_PARAMETER DevicePath is NULL.
@retval EFI_INVALID_PARAMETER Target is NULL.
@retval EFI_INVALID_PARAMETER Lun is NULL.
@retval EFI_UNSUPPORTED This driver does not support the device path
node type in DevicePath.
@retval EFI_NOT_FOUND A valid translation from DevicePath to a
Target ID and LUN does not exist.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_PASS_THRU_GET_TARGET_LUN) (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT32 *Target,
OUT UINT64 *Lun
)
;
/**
Resets a SCSI channel.This operation resets all the
SCSI devices connected to the SCSI channel.
@param This Protocol instance pointer.
@retval EFI_SUCCESS The SCSI channel was reset.
@retval EFI_UNSUPPORTED The SCSI channel does not support
a channel reset operation.
@retval EFI_DEVICE_ERROR A device error occurred while
attempting to reset the SCSI channel.
@retval EFI_TIMEOUT A timeout occurred while attempting
to reset the SCSI channel.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_PASS_THRU_RESET_CHANNEL) (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This
)
;
/**
Resets a SCSI device that is connected to a SCSI channel.
@param This Protocol instance pointer.
@param Target The Target ID of the SCSI device to reset.
@param Lun The LUN of the SCSI device to reset.
@retval EFI_SUCCESS The SCSI device specified by Target and
Lun was reset.
@retval EFI_UNSUPPORTED The SCSI channel does not support a target
reset operation.
@retval EFI_INVALID_PARAMETER Target or Lun are invalid.
@retval EFI_DEVICE_ERROR A device error occurred while attempting
to reset the SCSI device specified by Target
and Lun.
@retval EFI_TIMEOUT A timeout occurred while attempting to reset
the SCSI device specified by Target and Lun.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SCSI_PASS_THRU_RESET_TARGET) (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT32 Target,
IN UINT64 Lun
)
;
struct _EFI_SCSI_PASS_THRU_PROTOCOL {
EFI_SCSI_PASS_THRU_MODE *Mode;
EFI_SCSI_PASS_THRU_PASSTHRU PassThru;
EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE GetNextDevice;
EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath;
EFI_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun;
EFI_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel;
EFI_SCSI_PASS_THRU_RESET_TARGET ResetTarget;
};
extern EFI_GUID gEfiScsiPassThruProtocolGuid;
#endif

View File

@ -1,332 +0,0 @@
/** @file
EFI_EXT_SCSI_PASS_THRU_PROTOCOL as defined in UEFI 2.0.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: ScsiPassThruExt.h
**/
#ifndef __EXT_SCSI_PASS_THROUGH_PROTOCOL_H__
#define __EXT_SCSI_PASS_THROUGH_PROTOCOL_H__
#define EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID \
{ \
0x1d3de7f0, 0x0807, 0x424f, {0xaa, 0x69, 0x11, 0xa5, 0x4e, 0x19, 0xa4, 0x6f } \
}
typedef struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL EFI_EXT_SCSI_PASS_THRU_PROTOCOL;
#define TARGET_MAX_BYTES 0x10
#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001
#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002
#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004
//
// DataDirection
//
#define EFI_EXT_SCSI_DATA_DIRECTION_READ 0
#define EFI_EXT_SCSI_DATA_DIRECTION_WRITE 1
#define EFI_EXT_SCSI_DATA_DIRECTION_BIDIRECTIONAL 2
//
// HostAdapterStatus
//
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OK 0x00
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14
#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f
//
// TargetStatus
//
#define EFI_EXT_SCSI_STATUS_TARGET_GOOD 0x00
#define EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02
#define EFI_EXT_SCSI_STATUS_TARGET_CONDITION_MET 0x04
#define EFI_EXT_SCSI_STATUS_TARGET_BUSY 0x08
#define EFI_EXT_SCSI_STATUS_TARGET_INTERMEDIATE 0x10
#define EFI_EXT_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14
#define EFI_EXT_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18
#define EFI_EXT_SCSI_STATUS_TARGET_TASK_SET_FULL 0x28
#define EFI_EXT_SCSI_STATUS_TARGET_ACA_ACTIVE 0x30
#define EFI_EXT_SCSI_STATUS_TARGET_TASK_ABORTED 0x40
typedef struct {
UINT32 AdapterId;
UINT32 Attributes;
UINT32 IoAlign;
} EFI_EXT_SCSI_PASS_THRU_MODE;
typedef struct {
UINT64 Timeout;
VOID *InDataBuffer;
VOID *OutDataBuffer;
VOID *SenseData;
VOID *Cdb;
UINT32 InTransferLength;
UINT32 OutTransferLength;
UINT8 CdbLength;
UINT8 DataDirection;
UINT8 HostAdapterStatus;
UINT8 TargetStatus;
UINT8 SenseDataLength;
} EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET;
/**
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function
supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the
nonblocking I/O functionality is optional.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param Target The Target is an array of size TARGET_MAX_BYTES and it represents
the id of the SCSI device to send the SCSI Request Packet. Each
transport driver may chose to utilize a subset of this size to suit the needs
of transport target representation. For example, a Fibre Channel driver
may use only 8 bytes (WWN) to represent an FC target.
@param Lun The LUN of the SCSI device to send the SCSI Request Packet.
@param Packet A pointer to the SCSI Request Packet to send to the SCSI device
specified by Target and Lun.
@param Event If nonblocking I/O is not supported then Event is ignored, and blocking
I/O is performed. If Event is NULL, then blocking I/O is performed. If
Event is not NULL and non blocking I/O is supported, then
nonblocking I/O is performed, and Event will be signaled when the
SCSI Request Packet completes.
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host. For bi-directional
commands, InTransferLength bytes were transferred from
InDataBuffer. For write and bi-directional commands,
OutTransferLength bytes were transferred by
OutDataBuffer.
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was not executed. The number of bytes that
could be transferred is returned in InTransferLength. For write
and bi-directional commands, OutTransferLength bytes were
transferred by OutDataBuffer.
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
SCSI Request Packets already queued. The caller may retry again later.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send the SCSI Request
Packet.
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket are invalid.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported
by the host adapter. This includes the case of Bi-directional SCSI
commands not supported by the implementation. The SCSI Request
Packet was not sent, so no additional status information is available.
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_PASSTHRU) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
;
/**
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These
can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal
Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the
Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI
channel.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param Target On input, a pointer to the Target ID (an array of size
TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel.
On output, a pointer to the Target ID (an array of
TARGET_MAX_BYTES) of the next SCSI device present on a SCSI
channel. An input value of 0xF(all bytes in the array are 0xF) in the
Target array retrieves the Target ID of the first SCSI device present on a
SCSI channel.
@param Lun On input, a pointer to the LUN of a SCSI device present on the SCSI
channel. On output, a pointer to the LUN of the next SCSI device present
on a SCSI channel.
@retval EFI_SUCCESS The Target ID and LUN of the next SCSI device on the SCSI
channel was returned in Target and Lun.
@retval EFI_INVALID_PARAMETER Target array is not all 0xF, and Target and Lun were
not returned on a previous call to GetNextTargetLun().
@retval EFI_NOT_FOUND There are no more SCSI devices on this SCSI channel.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target,
IN OUT UINT64 *Lun
)
;
/**
Used to allocate and build a device path node for a SCSI device on a SCSI channel.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param Target The Target is an array of size TARGET_MAX_BYTES and it specifies the
Target ID of the SCSI device for which a device path node is to be
allocated and built. Transport drivers may chose to utilize a subset of
this size to suit the representation of targets. For example, a Fibre
Channel driver may use only 8 bytes (WWN) in the array to represent a
FC target.
@param Lun The LUN of the SCSI device for which a device path node is to be
allocated and built.
@param DevicePath A pointer to a single device path node that describes the SCSI device
specified by Target and Lun. This function is responsible for
allocating the buffer DevicePath with the boot service
AllocatePool(). It is the caller's responsibility to free
DevicePath when the caller is finished with DevicePath.
@retval EFI_SUCCESS The device path node that describes the SCSI device specified by
Target and Lun was allocated and returned in
DevicePath.
@retval EFI_INVALID_PARAMETER DevicePath is NULL.
@retval EFI_NOT_FOUND The SCSI devices specified by Target and Lun does not exist
on the SCSI channel.
@retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate DevicePath.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
;
/**
Used to translate a device path node to a Target ID and LUN.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param DevicePath A pointer to a single device path node that describes the SCSI device
on the SCSI channel.
@param Target A pointer to the Target Array which represents the ID of a SCSI device
on the SCSI channel.
@param Lun A pointer to the LUN of a SCSI device on the SCSI channel.
@retval EFI_SUCCESS DevicePath was successfully translated to a Target ID and
LUN, and they were returned in Target and Lun.
@retval EFI_INVALID_PARAMETER DevicePath or Target or Lun is NULL.
@retval EFI_NOT_FOUND A valid translation from DevicePath to a Target ID and LUN
does not exist.
@retval EFI_UNSUPPORTED This driver does not support the device path node type in
DevicePath.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT8 **Target,
OUT UINT64 *Lun
)
;
/**
Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@retval EFI_SUCCESS The SCSI channel was reset.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to reset the SCSI channel.
@retval EFI_TIMEOUT A timeout occurred while attempting to reset the SCSI channel.
@retval EFI_UNSUPPORTED The SCSI channel does not support a channel reset operation.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
)
;
/**
Resets a SCSI logical unit that is connected to a SCSI channel.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param Target The Target is an array of size TARGET_MAX_BYTE and it represents the
target port ID of the SCSI device containing the SCSI logical unit to
reset. Transport drivers may chose to utilize a subset of this array to suit
the representation of their targets.
@param Lun The LUN of the SCSI device to reset.
@retval EFI_SUCCESS The SCSI device specified by Target and Lun was reset.
@retval EFI_INVALID_PARAMETER Target or Lun is NULL.
@retval EFI_TIMEOUT A timeout occurred while attempting to reset the SCSI device
specified by Target and Lun.
@retval EFI_UNSUPPORTED The SCSI channel does not support a target reset operation.
@retval EFI_DEVICE_ERROR A device error occurred while attempting to reset the SCSI device
specified by Target and Lun.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun
)
;
/**
Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either
be the list SCSI devices that are actually present on the SCSI channel, or the list of legal Target IDs
for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to
see if a SCSI device is actually present at that location on the SCSI channel.
@param This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param Target (TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel.
On output, a pointer to the Target ID (an array of
TARGET_MAX_BYTES) of the next SCSI device present on a SCSI
channel. An input value of 0xF(all bytes in the array are 0xF) in the
Target array retrieves the Target ID of the first SCSI device present on a
SCSI channel.
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI
channel was returned in Target.
@retval EFI_INVALID_PARAMETER Target or Lun is NULL.
@retval EFI_TIMEOUT Target array is not all 0xF, and Target were not
returned on a previous call to GetNextTarget().
@retval EFI_NOT_FOUND There are no more SCSI devices on this SCSI channel.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET) (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target
)
;
struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL {
EFI_EXT_SCSI_PASS_THRU_MODE *Mode;
EFI_EXT_SCSI_PASS_THRU_PASSTHRU PassThru;
EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN GetNextTargetLun;
EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath;
EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun;
EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel;
EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN ResetTargetLun;
EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET GetNextTarget;
};
extern EFI_GUID gEfiExtScsiPassThruProtocolGuid;
#endif

View File

@ -1,162 +0,0 @@
/** @file
This file declares Section Extraction protocols.
This interface provides a means of decoding a set of sections into a linked list of
leaf sections. This provides for an extensible and flexible file format.
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the 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.
Module Name: SectionExtraction.h
@par Revision Reference:
This protocol is defined in Firmware Volume Specification.
Version 0.9
**/
#ifndef __SECTION_EXTRACTION_PROTOCOL_H__
#define __SECTION_EXTRACTION_PROTOCOL_H__
//
// Protocol GUID definition
//
#define EFI_SECTION_EXTRACTION_PROTOCOL_GUID \
{ \
0x448F5DA4, 0x6DD7, 0x4FE1, {0x93, 0x07, 0x69, 0x22, 0x41, 0x92, 0x21, 0x5D } \
}
typedef struct _EFI_SECTION_EXTRACTION_PROTOCOL EFI_SECTION_EXTRACTION_PROTOCOL;
//
// Protocol member functions
//
/**
Creates and returns a new section stream handle to represent the new section stream.
@param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.
@param SectionStreamLength Size in bytes of the section stream.
@param SectionStream Buffer containing the new section stream.
@param SectionStreamHandle A pointer to a caller-allocated UINTN that,
on output, contains the new section stream handle.
@retval EFI_SUCCESS The SectionStream was successfully processed and
the section stream handle was returned.
@retval EFI_OUT_OF_RESOURCES The system has insufficient resources to
process the request.
@retval EFI_INVALID_PARAMETER The section stream may be corrupt or the value
of SectionStreamLength may be incorrect.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_OPEN_SECTION_STREAM) (
IN EFI_SECTION_EXTRACTION_PROTOCOL *This,
IN UINTN SectionStreamLength,
IN VOID *SectionStream,
OUT UINTN *SectionStreamHandle
);
/**
Reads and returns a single section from a section stream.
@param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.
@param SectionStreamHandle Indicates from which section stream to read.
@param SectionType Pointer to an EFI_SECTION_TYPE.
@param SectionDefinitionGuid Pointer to an EFI_GUID.If SectionType ==
EFI_SECTION_GUID_DEFINED, SectionDefinitionGuid indicates what section GUID
to search for.If SectionType !=EFI_SECTION_GUID_DEFINED, then
SectionDefinitionGuid is unused and is ignored.
@param SectionInstance Indicates which instance of the requested section
type to return when SectionType is not NULL.
@param SectionStreamHandle A pointer to a caller-allocated UINTN that, on output,
contains the new section stream handle.
@param Buffer Pointer to a pointer to a buffer in which the section
contents are returned.
@param BufferSize Pointer to a caller-allocated UINTN.
@param AuthenticationStatus Pointer to a caller-allocated UINT32 in
which any meta-data from encapsulation GUID-defined sections is returned.
@retval EFI_SUCCESS The SectionStream was successfully processed and
the section contents were returned in Buffer.
@retval EFI_PROTOCOL_ERROR A GUID-defined section was encountered in
the section stream with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,
but there was no corresponding GUIDed Section Extraction Protocol in
the handle database.
@retval EFI_NOT_FOUND An error was encountered when parsing the SectionStream,
which indicates that the SectionStream is not correctly formatted.
Or The requested section does not exist.
@retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process
the request.
@retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.
@retval EFI_BUFFER_TOO_SMALL The size of the input buffer is insufficient to
contain the requested section.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_SECTION) (
IN EFI_SECTION_EXTRACTION_PROTOCOL *This,
IN UINTN SectionStreamHandle,
IN EFI_SECTION_TYPE *SectionType,
IN EFI_GUID *SectionDefinitionGuid,
IN UINTN SectionInstance,
IN VOID **Buffer,
IN OUT UINTN *BufferSize,
OUT UINT32 *AuthenticationStatus
);
/**
Deletes a section stream handle and returns all associated resources to the system.
@param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.
@param SectionStreamHandle Indicates the section stream to close.
@retval EFI_SUCCESS The SectionStream was successfully processed and
the section stream handle was returned.
@retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_CLOSE_SECTION_STREAM) (
IN EFI_SECTION_EXTRACTION_PROTOCOL *This,
IN UINTN SectionStreamHandle
);
//
// Protocol definition
//
/**
@par Protocol Description:
The Section Extraction Protocol provides a simple method of extracting
sections from arbitrarily complex files.
@param OpenSectionStream
Takes a bounded stream of sections and returns a section stream handle.
@param GetSection
Given a section stream handle, retrieves the requested section and
meta-data from the section stream.
@param CloseSectionStream
Given a section stream handle, closes the section stream.
**/
struct _EFI_SECTION_EXTRACTION_PROTOCOL {
EFI_OPEN_SECTION_STREAM OpenSectionStream;
EFI_GET_SECTION GetSection;
EFI_CLOSE_SECTION_STREAM CloseSectionStream;
};
extern EFI_GUID gEfiSectionExtractionProtocolGuid;
#endif

View File

@ -1,266 +0,0 @@
/** @file
Serial IO protocol as defined in the EFI 1.0 specification.
Abstraction of a basic serial device. Targeted at 16550 UART, but
could be much more generic.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SerialIo.h
**/
#ifndef __SERIAL_IO_PROTOCOL_H__
#define __SERIAL_IO_PROTOCOL_H__
#define EFI_SERIAL_IO_PROTOCOL_GUID \
{ \
0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \
}
typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL;
//
// Serial IO Data structures
//
typedef enum {
DefaultParity,
NoParity,
EvenParity,
OddParity,
MarkParity,
SpaceParity
} EFI_PARITY_TYPE;
typedef enum {
DefaultStopBits,
OneStopBit,
OneFiveStopBits,
TwoStopBits
} EFI_STOP_BITS_TYPE;
//
// define for Control bits, grouped by read only, write only, and read write
//
//
// Read Only
//
#define EFI_SERIAL_CLEAR_TO_SEND 0x00000010
#define EFI_SERIAL_DATA_SET_READY 0x00000020
#define EFI_SERIAL_RING_INDICATE 0x00000040
#define EFI_SERIAL_CARRIER_DETECT 0x00000080
#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x00000100
#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x00000200
//
// Write Only
//
#define EFI_SERIAL_REQUEST_TO_SEND 0x00000002
#define EFI_SERIAL_DATA_TERMINAL_READY 0x00000001
//
// Read Write
//
#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.
@param This Protocol instance pointer.
@retval EFI_SUCCESS The device was reset.
@retval EFI_DEVICE_ERROR The serial device could not be reset.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_RESET) (
IN EFI_SERIAL_IO_PROTOCOL *This
)
;
/**
Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
data buts, and stop bits on a serial device.
@param This Protocol instance pointer.
@param BaudRate The requested baud rate. A BaudRate value of 0 will use the the
device's default interface speed.
@param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the
serial interface. A ReceiveFifoDepth value of 0 will use
the device's dfault FIFO depth.
@param Timeout The requested time out for a single character in microseconds.
This timeout applies to both the transmit and receive side of the
interface. A Timeout value of 0 will use the device's default time
out value.
@param Parity The type of parity to use on this serial device. A Parity value of
DefaultParity will use the device's default parity value.
@param DataBits The number of data bits to use on the serial device. A DataBits
vaule of 0 will use the device's default data bit setting.
@param StopBits The number of stop bits to use on this serial device. A StopBits
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.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (
IN EFI_SERIAL_IO_PROTOCOL *This,
IN UINT64 BaudRate,
IN UINT32 ReceiveFifoDepth,
IN UINT32 Timeout,
IN EFI_PARITY_TYPE Parity,
IN UINT8 DataBits,
IN EFI_STOP_BITS_TYPE StopBits
)
;
/**
Set the control bits on a serial device
@param This Protocol instance pointer.
@param Control Set the bits of Control that are settable.
@retval EFI_SUCCESS The new control bits were set on the serial device.
@retval EFI_UNSUPPORTED The serial device does not support this operation.
@retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
IN EFI_SERIAL_IO_PROTOCOL *This,
IN UINT32 Control
)
;
/**
Retrieves the status of thecontrol bits on a serial device
@param This Protocol instance pointer.
@param Control A pointer to return the current Control signals from the serial device.
@retval EFI_SUCCESS The control bits were read from the serial device.
@retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (
IN EFI_SERIAL_IO_PROTOCOL *This,
OUT UINT32 *Control
)
;
/**
Writes data to a serial device.
@param This Protocol instance pointer.
@param BufferSize On input, the size of the Buffer. On output, the amount of
data actually written.
@param Buffer The buffer of data to write
@retval EFI_SUCCESS The data was written.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_WRITE) (
IN EFI_SERIAL_IO_PROTOCOL *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
)
;
/**
Writes data to a serial device.
@param This Protocol instance pointer.
@param BufferSize On input, the size of the Buffer. On output, the amount of
data returned in Buffer.
@param Buffer The buffer to return the data into.
@retval EFI_SUCCESS The data was read.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_TIMEOUT The data write was stopped due to a timeout.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERIAL_READ) (
IN EFI_SERIAL_IO_PROTOCOL *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
;
/**
The data values in SERIAL_IO_MODE are read-only and are updated by the code
that produces the SERIAL_IO_PROTOCOL member functions.
ControlMask - A mask fo the Control bits that the device supports. The device
must always support the Input Buffer Empty control bit.
TimeOut - If applicable, the number of microseconds to wait before timing out
a Read or Write operation.
BaudRate - If applicable, the current baud rate setting of the device; otherwise,
baud rate has the value of zero to indicate that device runs at the
device's designed speed.
ReceiveFifoDepth - The number of characters the device will buffer on input
DataBits - The number of characters the device will buffer on input
Parity - If applicable, this is the EFI_PARITY_TYPE that is computed or
checked as each character is transmitted or reveived. If the device
does not support parity the value is the default parity value.
StopBits - If applicable, the EFI_STOP_BITS_TYPE number of stop bits per
character. If the device does not support stop bits the value is
the default stop bit values.
**/
typedef struct {
UINT32 ControlMask;
//
// current Attributes
//
UINT32 Timeout;
UINT64 BaudRate;
UINT32 ReceiveFifoDepth;
UINT32 DataBits;
UINT32 Parity;
UINT32 StopBits;
} EFI_SERIAL_IO_MODE;
#define SERIAL_IO_INTERFACE_REVISION 0x00010000
#define EFI_SERIAL_IO_PROTOCOL_REVISION SERIAL_IO_INTERFACE_REVISION
struct _EFI_SERIAL_IO_PROTOCOL {
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;
EFI_SERIAL_IO_MODE *Mode;
};
extern EFI_GUID gEfiSerialIoProtocolGuid;
#endif

View File

@ -1,74 +0,0 @@
/** @file
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: ServiceBinding.h
**/
#ifndef __EFI_SERVICE_BINDING_H__
#define __EFI_SERVICE_BINDING_H__
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_SERVICE_BINDING_PROTOCOL EFI_SERVICE_BINDING_PROTOCOL;
/**
Creates a child handle with a set of I/O services.
@param This Protocol instance pointer.
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
then a new handle is created. If it is not NULL, then the
I/O services are added to the existing child handle.
@retval EFI_SUCCES The child handle was created with the I/O services
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
@retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
the child
@retval other The child handle was not created
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) (
IN EFI_SERVICE_BINDING_PROTOCOL *This,
IN OUT EFI_HANDLE *ChildHandle
)
;
/**
Destroys a child handle with a set of I/O services.
@param This Protocol instance pointer.
@param ChildHandle Handle of the child to destroy
@retval EFI_SUCCES The I/O services were removed from the child handle
@retval EFI_UNSUPPORTED The child handle does not support the I/O services
that are being removed.
@retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
@retval EFI_ACCESS_DENIED The child handle could not be destroyed because its
I/O services are being used.
@retval other The child handle was not destroyed
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) (
IN EFI_SERVICE_BINDING_PROTOCOL *This,
IN EFI_HANDLE ChildHandle
)
;
struct _EFI_SERVICE_BINDING_PROTOCOL {
EFI_SERVICE_BINDING_CREATE_CHILD CreateChild;
EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
};
#endif

View File

@ -1,328 +0,0 @@
/** @file
SimpleFileSystem protocol as defined in the EFI 1.0 specification.
The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
file system specified in EFI 1.0. It can also be used to abstract a file
system other than FAT.
EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SimpleFileSystem.h
**/
#ifndef __SIMPLE_FILE_SYSTEM_H__
#define __SIMPLE_FILE_SYSTEM_H__
#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_FILE EFI_FILE;
typedef struct _EFI_FILE *EFI_FILE_HANDLE;
typedef struct _EFI_FILE EFI_FILE_PROTOCOL;
/**
Open the root directory on a volume.
@param This Protocol instance pointer.
@param Root Returns an Open file handle for the root directory
@retval EFI_SUCCESS The device was opened.
@retval EFI_UNSUPPORTED This volume does not suppor the file system.
@retval EFI_NO_MEDIA The device has no media.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_ACCESS_DENIED The service denied access to the file
@retval EFI_OUT_OF_RESOURCES The volume was not opened due to lack of resources
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME) (
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,
OUT EFI_FILE **Root
)
;
#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000
struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL {
UINT64 Revision;
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume;
};
/**
Open the root directory on a volume.
@param This Protocol instance pointer.
@param NewHandle Returns File Handle for FileName
@param FileName Null terminated string. "\", ".", and ".." are supported
@param OpenMode Open mode for file.
@param Attributes Only used for EFI_FILE_MODE_CREATE
@retval EFI_SUCCESS The device was opened.
@retval EFI_NOT_FOUND The specified file could not be found on the device
@retval EFI_NO_MEDIA The device has no media.
@retval EFI_MEDIA_CHANGED The media has changed
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_ACCESS_DENIED The service denied access to the file
@retval EFI_OUT_OF_RESOURCES The volume was not opened due to lack of resources
@retval EFI_VOLUME_FULL The volume is full.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_OPEN) (
IN EFI_FILE *This,
OUT EFI_FILE **NewHandle,
IN CHAR16 *FileName,
IN UINT64 OpenMode,
IN UINT64 Attributes
)
;
//
// Open modes
//
#define EFI_FILE_MODE_READ 0x0000000000000001ULL
#define EFI_FILE_MODE_WRITE 0x0000000000000002ULL
#define EFI_FILE_MODE_CREATE 0x8000000000000000ULL
//
// 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
/**
Close the file handle
@param This Protocol instance pointer.
@retval EFI_SUCCESS The device was opened.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_CLOSE) (
IN EFI_FILE *This
)
;
/**
Close and delete the file handle
@param This Protocol instance pointer.
@retval EFI_SUCCESS The device was opened.
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_DELETE) (
IN EFI_FILE *This
)
;
/**
Read data from the file.
@param This Protocol instance pointer.
@param BufferSize On input size of buffer, on output amount of data in buffer.
@param Buffer The buffer in which data is read.
@retval EFI_SUCCESS Data was read.
@retval EFI_NO_MEDIA The device has no media
@retval EFI_DEVICE_ERROR The device reported an error
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_BUFFER_TO_SMALL BufferSize is too small. BufferSize contains required size
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_READ) (
IN EFI_FILE *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
;
/**
Write data from to the file.
@param This Protocol instance pointer.
@param BufferSize On input size of buffer, on output amount of data in buffer.
@param Buffer The buffer in which data to write.
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORT Writes to Open directory are not supported
@retval EFI_NO_MEDIA The device has no media
@retval EFI_DEVICE_ERROR The device reported an error
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_WRITE_PROTECTED The device is write protected
@retval EFI_ACCESS_DENIED The file was open for read only
@retval EFI_VOLUME_FULL The volume is full
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_WRITE) (
IN EFI_FILE *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
)
;
/**
Set a files current position
@param This Protocol instance pointer.
@param Position Byte possition from the start of the file
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_SET_POSITION) (
IN EFI_FILE *This,
IN UINT64 Position
)
;
/**
Get a files current position
@param This Protocol instance pointer.
@param Position Byte possition from the start of the file
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_GET_POSITION) (
IN EFI_FILE *This,
OUT UINT64 *Position
)
;
/**
Get information about a file
@param This Protocol instance pointer.
@param InformationType Type of info to return in Buffer
@param BufferSize On input size of buffer, on output amount of data in buffer.
@param Buffer The buffer to return data.
@retval EFI_SUCCESS Data was returned.
@retval EFI_UNSUPPORT InformationType is not supported
@retval EFI_NO_MEDIA The device has no media
@retval EFI_DEVICE_ERROR The device reported an error
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_WRITE_PROTECTED The device is write protected
@retval EFI_ACCESS_DENIED The file was open for read only
@retval EFI_BUFFER_TOO_SMALL Buffer was too small, required size returned in BufferSize
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_GET_INFO) (
IN EFI_FILE *This,
IN EFI_GUID *InformationType,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
;
/**
Set information about a file
@param File Protocol instance pointer.
@param InformationType Type of info in Buffer
@param BufferSize Size of buffer.
@param Buffer The data to write.
@retval EFI_SUCCESS Data was returned.
@retval EFI_UNSUPPORT InformationType is not supported
@retval EFI_NO_MEDIA The device has no media
@retval EFI_DEVICE_ERROR The device reported an error
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_WRITE_PROTECTED The device is write protected
@retval EFI_ACCESS_DENIED The file was open for read only
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_SET_INFO) (
IN EFI_FILE *This,
IN EFI_GUID *InformationType,
IN UINTN BufferSize,
IN VOID *Buffer
)
;
/**
Flush data back for the file handle
@param This Protocol instance pointer.
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORT Writes to Open directory are not supported
@retval EFI_NO_MEDIA The device has no media
@retval EFI_DEVICE_ERROR The device reported an error
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted
@retval EFI_WRITE_PROTECTED The device is write protected
@retval EFI_ACCESS_DENIED The file was open for read only
@retval EFI_VOLUME_FULL The volume is full
**/
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_FLUSH) (
IN EFI_FILE *This
)
;
#define EFI_FILE_HANDLE_REVISION 0x00010000
#define EFI_FILE_PROTOCOL_REVISION EFI_FILE_HANDLE_REVISION
struct _EFI_FILE {
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;
};
extern EFI_GUID gEfiSimpleFileSystemProtocolGuid;
#endif

View File

@ -1,580 +0,0 @@
/** @file
Simple Network protocol as defined in the EFI 1.0 specification.
Basic network device abstraction.
Rx - Received
Tx - Transmit
MCast - MultiCast
...
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name: SimpleNetwork.h
**/
#ifndef __SIMPLE_NETWORK_H__
#define __SIMPLE_NETWORK_H__
#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;
//
// Simple Network Protocol data structures
//
typedef struct {
//
// Total number of frames received. Includes frames with errors and
// dropped frames.
//
UINT64 RxTotalFrames;
//
// Number of valid frames received and copied into receive buffers.
//
UINT64 RxGoodFrames;
//
// Number of frames below the minimum length for the media.
// This would be <64 for ethernet.
//
UINT64 RxUndersizeFrames;
//
// Number of frames longer than the maxminum length for the
// media. This would be >1500 for ethernet.
//
UINT64 RxOversizeFrames;
//
// Valid frames that were dropped because receive buffers were full.
//
UINT64 RxDroppedFrames;
//
// Number of valid unicast frames received and not dropped.
//
UINT64 RxUnicastFrames;
//
// Number of valid broadcast frames received and not dropped.
//
UINT64 RxBroadcastFrames;
//
// Number of valid mutlicast frames received and not dropped.
//
UINT64 RxMulticastFrames;
//
// Number of frames w/ CRC or alignment errors.
//
UINT64 RxCrcErrorFrames;
//
// Total number of bytes received. Includes frames with errors
// and dropped frames.
//
UINT64 RxTotalBytes;
//
// Transmit statistics.
//
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;
//
// Number of frames destined for unsupported protocol.
//
UINT64 UnsupportedProtocol;
} EFI_NETWORK_STATISTICS;
typedef enum {
EfiSimpleNetworkStopped,
EfiSimpleNetworkStarted,
EfiSimpleNetworkInitialized,
EfiSimpleNetworkMaxState
} EFI_SIMPLE_NETWORK_STATE;
#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
#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 MAX_MCAST_FILTER_CNT 16
typedef struct {
UINT32 State;
UINT32 HwAddressSize;
UINT32 MediaHeaderSize;
UINT32 MaxPacketSize;
UINT32 NvRamSize;
UINT32 NvRamAccessSize;
UINT32 ReceiveFilterMask;
UINT32 ReceiveFilterSetting;
UINT32 MaxMCastFilterCount;
UINT32 MCastFilterCount;
EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
EFI_MAC_ADDRESS CurrentAddress;
EFI_MAC_ADDRESS BroadcastAddress;
EFI_MAC_ADDRESS PermanentAddress;
UINT8 IfType;
BOOLEAN MacAddressChangeable;
BOOLEAN MultipleTxSupported;
BOOLEAN MediaPresentSupported;
BOOLEAN MediaPresent;
} EFI_SIMPLE_NETWORK_MODE;
//
// Protocol Member Functions
//
/**
Changes the state of a network interface from "stopped" to "started".
@param This Protocol instance pointer.
@retval EFI_SUCCESS The network interface was started.
@retval EFI_ALREADY_STARTED The network interface is already in the started state.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_START) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
)
;
/**
Changes the state of a network interface from "started" to "stopped".
@param This Protocol instance pointer.
@retval EFI_SUCCESS The network interface was stopped.
@retval EFI_ALREADY_STARTED The network interface is already in the stopped state.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
)
;
/**
Resets a network adapter and allocates the transmit and receive buffers
required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers.
@param This Protocol instance pointer.
@param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space
that the driver should allocate for the network interface.
Some network interfaces will not be able to use the extra
buffer, and the caller will not know if it is actually
being used.
@param ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space
that the driver should allocate for the network interface.
Some network interfaces will not be able to use the extra
buffer, and the caller will not know if it is actually
being used.
@retval EFI_SUCCESS The network interface was initialized.
@retval EFI_NOT_STARTED The network interface has not been started
@retval EFI_OUT_OF_RESOURCES There was not enough memory for the transmit and
receive buffers. .
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL
)
;
/**
Resets a network adapter and re-initializes it with the parameters that were
provided in the previous call to Initialize().
@param This Protocol instance pointer.
@param ExtendedVerification Indicates that the driver may perform a more
exhaustive verification operation of the device
during reset.
@retval EFI_SUCCESS The network interface was reset.
@retval EFI_NOT_STARTED The network interface has not been started
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
;
/**
Resets a network adapter and leaves it in a state that is safe for
another driver to initialize.
@param This Protocol instance pointer.
@retval EFI_SUCCESS The network interface was shutdown.
@retval EFI_NOT_STARTED The network interface has not been started
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
)
;
/**
Manages the multicast receive filters of a network interface.
@param This Protocol instance pointer.
@param Enable A bit mask of receive filters to enable on the network interface.
@param Disable A bit mask of receive filters to disable on the network interface.
@param ResetMCastFilter Set to TRUE to reset the contents of the multicast receive
filters on the network interface to their default values.
@param McastFilterCnt Number of multicast HW MAC addresses in the new
MCastFilter list. This value must be less than or equal to
the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This
field is optional if ResetMCastFilter is TRUE.
@param MCastFilter A pointer to a list of new multicast receive filter HW MAC
addresses. This list will replace any existing multicast
HW MAC address list. This field is optional if
ResetMCastFilter is TRUE.
@retval EFI_SUCCESS The multicast receive filter list was updated.
@retval EFI_NOT_STARTED The network interface has not been started
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINT32 Enable,
IN UINT32 Disable,
IN BOOLEAN ResetMCastFilter,
IN UINTN MCastFilterCnt OPTIONAL,
IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
)
;
/**
Modifies or resets the current station address, if supported.
@param This Protocol instance pointer.
@param Reset Flag used to reset the station address to the network interfaces
permanent address.
@param New New station address to be used for the network interface.
@retval EFI_SUCCESS The network interfaces station address was updated.
@retval EFI_NOT_STARTED The network interface has not been started
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN EFI_MAC_ADDRESS *New OPTIONAL
)
;
/**
Resets or collects the statistics on a network interface.
@param This Protocol instance pointer.
@param Reset Set to TRUE to reset the statistics for the network interface.
@param StatisticsSize On input the size, in bytes, of StatisticsTable. On
output the size, in bytes, of the resulting table of
statistics.
@param StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that
contains the statistics.
@retval EFI_SUCCESS The statistics were collected from the network interface.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer
size needed to hold the statistics is returned in
StatisticsSize.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN OUT UINTN *StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
)
;
/**
Converts a multicast IP address to a multicast HW MAC address.
@param This Protocol instance pointer.
@param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set
to FALSE if the multicast IP address is IPv4 [RFC 791].
@param IP The multicast IP address that is to be converted to a multicast
HW MAC address.
@param MAC The multicast HW MAC address that is to be generated from IP.
@retval EFI_SUCCESS The multicast IP address was mapped to the multicast
HW MAC address.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer
size needed to hold the statistics is returned in
StatisticsSize.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN IPv6,
IN EFI_IP_ADDRESS *IP,
OUT EFI_MAC_ADDRESS *MAC
)
;
/**
Performs read and write operations on the NVRAM device attached to a
network interface.
@param This Protocol instance pointer.
@param ReadWrite TRUE for read operations, FALSE for write operations.
@param Offset Byte offset in the NVRAM device at which to start the read or
write operation. This must be a multiple of NvRamAccessSize and
less than NvRamSize.
@param BufferSize The number of bytes to read or write from the NVRAM device.
This must also be a multiple of NvramAccessSize.
@param Buffer A pointer to the data buffer.
@retval EFI_SUCCESS The NVRAM access was performed.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ReadWrite,
IN UINTN Offset,
IN UINTN BufferSize,
IN OUT VOID *Buffer
)
;
/**
Reads the current interrupt status and recycled transmit buffer status from
a network interface.
@param This Protocol instance pointer.
@param InterruptStatus A pointer to the bit mask of the currently active interrupts
If this is NULL, the interrupt status will not be read from
the device. If this is not NULL, the interrupt status will
be read from the device. When the interrupt status is read,
it will also be cleared. Clearing the transmit interrupt
does not empty the recycled transmit buffer array.
@param TxBuf Recycled transmit buffer address. The network interface will
not transmit if its internal recycled transmit buffer array
is full. Reading the transmit buffer does not clear the
transmit interrupt. If this is NULL, then the transmit buffer
status will not be read. If there are no transmit buffers to
recycle and TxBuf is not NULL, * TxBuf will be set to NULL.
@retval EFI_SUCCESS The status of the network interface was retrieved.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINT32 *InterruptStatus OPTIONAL,
OUT VOID **TxBuf OPTIONAL
)
;
/**
Places a packet in the transmit queue of a network interface.
@param This Protocol instance pointer.
@param HeaderSize The size, in bytes, of the media header to be filled in by
the Transmit() function. If HeaderSize is non-zero, then it
must be equal to This->Mode->MediaHeaderSize and the DestAddr
and Protocol parameters must not be NULL.
@param BufferSize The size, in bytes, of the entire packet (media header and
data) to be transmitted through the network interface.
@param Buffer A pointer to the packet (media header followed by data) to be
transmitted. This parameter cannot be NULL. If HeaderSize is zero,
then the media header in Buffer must already be filled in by the
caller. If HeaderSize is non-zero, then the media header will be
filled in by the Transmit() function.
@param SrcAddr The source HW MAC address. If HeaderSize is zero, then this parameter
is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then
This->Mode->CurrentAddress is used for the source HW MAC address.
@param DsetAddr The destination HW MAC address. If HeaderSize is zero, then this
parameter is ignored.
@param Protocol The type of header to build. If HeaderSize is zero, then this
parameter is ignored. See RFC 1700, section "Ether Types", for
examples.
@retval EFI_SUCCESS The packet was placed on the transmit queue.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_NOT_READY The network interface is too busy to accept this transmit request.
@retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN HeaderSize,
IN UINTN BufferSize,
IN VOID *Buffer,
IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
IN UINT16 *Protocol OPTIONAL
)
;
/**
Receives a packet from a network interface.
@param This Protocol instance pointer.
@param HeaderSize The size, in bytes, of the media header received on the network
interface. If this parameter is NULL, then the media header size
will not be returned.
@param BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in
bytes, of the packet that was received on the network interface.
@param Buffer A pointer to the data buffer to receive both the media header and
the data.
@param SrcAddr The source HW MAC address. If this parameter is NULL, the
HW MAC source address will not be extracted from the media
header.
@param DsetAddr The destination HW MAC address. If this parameter is NULL,
the HW MAC destination address will not be extracted from the
media header.
@param Protocol The media header type. If this parameter is NULL, then the
protocol will not be extracted from the media header. See
RFC 1700 section "Ether Types" for examples.
@retval EFI_SUCCESS The received data was stored in Buffer, and BufferSize has
been updated to the number of bytes received.
@retval EFI_NOT_STARTED The network interface has not been started.
@retval EFI_NOT_READY The network interface is too busy to accept this transmit
request.
@retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small.
@retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value.
@retval EFI_DEVICE_ERROR The command could not be sent to the network interface.
@retval EFI_UNSUPPORTED This function is not supported by the network interface.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINTN *HeaderSize OPTIONAL,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
OUT UINT16 *Protocol OPTIONAL
)
;
#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000
struct _EFI_SIMPLE_NETWORK_PROTOCOL {
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;
EFI_EVENT WaitForPacket;
EFI_SIMPLE_NETWORK_MODE *Mode;
};
extern EFI_GUID gEfiSimpleNetworkProtocolGuid;
#endif

Some files were not shown because too many files have changed in this diff Show More