aboutsummaryrefslogtreecommitdiff
path: root/src/include/ipxe/efi/Protocol
diff options
context:
space:
mode:
authorGeoff Lywood <glywood@vmware.com>2010-05-28 15:06:24 -0700
committerMichael Brown <mcb30@ipxe.org>2010-05-29 23:49:39 +0100
commiteef46c23d6baf3f2717aa8fc201c83928018d162 (patch)
tree108a0da79e18ea1860d6f0c5dd61a5d04f82e328 /src/include/ipxe/efi/Protocol
parent6514d6430d97effafa6c534e939053628ee783b0 (diff)
downloadipxe-eef46c23d6baf3f2717aa8fc201c83928018d162.zip
ipxe-eef46c23d6baf3f2717aa8fc201c83928018d162.tar.gz
ipxe-eef46c23d6baf3f2717aa8fc201c83928018d162.tar.bz2
[efi] Update UEFI header files with latest version from TianoCore
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi/Protocol')
-rw-r--r--src/include/ipxe/efi/Protocol/ComponentName2.h35
-rw-r--r--src/include/ipxe/efi/Protocol/Cpu.h13
-rw-r--r--src/include/ipxe/efi/Protocol/CpuIo.h120
-rw-r--r--src/include/ipxe/efi/Protocol/CpuIo2.h142
-rw-r--r--src/include/ipxe/efi/Protocol/DebugSupport.h143
-rw-r--r--src/include/ipxe/efi/Protocol/DevicePath.h663
-rw-r--r--src/include/ipxe/efi/Protocol/DriverBinding.h158
-rw-r--r--src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h53
-rw-r--r--src/include/ipxe/efi/Protocol/PciIo.h53
-rw-r--r--src/include/ipxe/efi/Protocol/PciRootBridgeIo.h48
-rw-r--r--src/include/ipxe/efi/Protocol/SimpleNetwork.h123
-rw-r--r--src/include/ipxe/efi/Protocol/SimpleTextIn.h31
-rw-r--r--src/include/ipxe/efi/Protocol/SimpleTextOut.h98
13 files changed, 1272 insertions, 408 deletions
diff --git a/src/include/ipxe/efi/Protocol/ComponentName2.h b/src/include/ipxe/efi/Protocol/ComponentName2.h
index 0f01014..3c5ec07 100644
--- a/src/include/ipxe/efi/Protocol/ComponentName2.h
+++ b/src/include/ipxe/efi/Protocol/ComponentName2.h
@@ -3,8 +3,8 @@
This protocol is used to retrieve user readable names of drivers
and controllers managed by UEFI Drivers.
- Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -27,7 +27,7 @@ typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;
/**
- Retrieves a Unicode string that is the user readable name of
+ Retrieves a string that is the user readable name of
the EFI Driver.
@param This A pointer to the
@@ -40,15 +40,15 @@ typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;
languages specified in SupportedLanguages.
The number of languages supported by a
driver is up to the driver writer. Language
- is specified in RFC 3066 language code
+ is specified in RFC 4646 language code
format.
- @param DriverName A pointer to the Unicode string to return.
- This Unicode string is the name of the
+ @param DriverName A pointer to the string to return.
+ This string is the name of the
driver specified by This in the language
specified by Language.
- @retval EFI_SUCCESS The Unicode string for the
+ @retval EFI_SUCCESS The string for the
Driver specified by This and the
language specified by Language
was returned in DriverName.
@@ -72,7 +72,7 @@ EFI_STATUS
/**
- Retrieves a Unicode string that is the user readable name of
+ Retrieves a string that is the user readable name of
the controller that is being managed by an EFI Driver.
@param This A pointer to the
@@ -83,11 +83,11 @@ EFI_STATUS
This handle specifies the controller
whose name is to be returned.
- @param ChildHandle The handle of the child controller to
+ @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
+ It will also be NULL for bus
drivers that wish to retrieve the
name of the bus controller. It will
not be NULL for a bus driver that
@@ -103,18 +103,17 @@ EFI_STATUS
SupportedLanguages. The number of
languages supported by a driver is up
to the driver writer. Language is
- specified in RFC 3066 language code
+ specified in RFC 4646 language code
format.
- @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
+ @param ControllerName A pointer to the string to return.
+ This 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
+ @retval EFI_SUCCESS The string for the user
readable name in the language
specified by Language for the
driver specified by This was
@@ -164,7 +163,7 @@ struct _EFI_COMPONENT_NAME2_PROTOCOL {
/// supported language codes. This is the list of language codes that
/// this protocol supports. The number of languages supported by a
/// driver is up to the driver writer. SupportedLanguages is
- /// specified in RFC 3066 format.
+ /// specified in RFC 4646 format.
///
CHAR8 *SupportedLanguages;
};
diff --git a/src/include/ipxe/efi/Protocol/Cpu.h b/src/include/ipxe/efi/Protocol/Cpu.h
index b06c0df..73200aa 100644
--- a/src/include/ipxe/efi/Protocol/Cpu.h
+++ b/src/include/ipxe/efi/Protocol/Cpu.h
@@ -3,8 +3,8 @@
This code abstracts the DXE core from processor implementation details.
- Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -24,6 +24,9 @@
typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL;
+///
+/// The type of flush operation
+///
typedef enum {
EfiCpuFlushTypeWriteBackInvalidate,
EfiCpuFlushTypeWriteBack,
@@ -31,6 +34,9 @@ typedef enum {
EfiCpuMaxFlushType
} EFI_CPU_FLUSH_TYPE;
+///
+/// The type of processor INIT.
+///
typedef enum {
EfiCpuInit,
EfiCpuMaxInitType
@@ -206,7 +212,8 @@ EFI_STATUS
must be between 0 and NumberOfTimers-1.
@param TimerValue Pointer to the returned timer value.
@param TimerPeriod A pointer to the amount of time that passes in femtoseconds for each increment
- of TimerValue.
+ of TimerValue. If TimerValue does not increment at a predictable rate, then 0 is
+ returned. This parameter is optional and may be NULL.
@retval EFI_SUCCESS The processor timer value specified by TimerIndex was returned in TimerValue.
@retval EFI_DEVICE_ERROR An error occurred attempting to read one of the processor's timers.
diff --git a/src/include/ipxe/efi/Protocol/CpuIo.h b/src/include/ipxe/efi/Protocol/CpuIo.h
index e3d9610..5328317 100644
--- a/src/include/ipxe/efi/Protocol/CpuIo.h
+++ b/src/include/ipxe/efi/Protocol/CpuIo.h
@@ -2,126 +2,44 @@
This code abstracts the CPU IO Protocol which installed by some platform or chipset-specific
PEIM that abstracts the processor-visible I/O operations.
- Copyright (c) 2007, 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
+ Note: This is a runtime protocol and can be used by runtime drivers after ExitBootServices().
+ It is different from the PI 1.2 CPU I/O 2 Protocol, which is a boot services only protocol
+ and may not be used by runtime drivers after ExitBootServices().
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- Module Name: CpuIO.h
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
CPU IO Protocol is defined in Framework of EFI CPU IO Protocol Spec
- Version 0.9
+ Version 0.9.
**/
#ifndef _CPUIO_H_
#define _CPUIO_H_
-#include <ipxe/efi/PiDxe.h>
+#include <ipxe/efi/Protocol/CpuIo2.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;
-
+// Framework CPU IO protocol structure is the same as CPU IO 2 protocol defined in PI 1.2 spec.
+// However, there is a significant different between the Framework CPU I/O
+// Protocol and the PI 1.2 CPU I/O 2 Protocol. The Framework one is a runtime
+// protocol, which means it can be used by runtime drivers after ExitBootServices().
+// The PI one is not runtime safe, so it is a boot services only protocol and may
+// not be used by runtime drivers after ExitBootServices().
//
-// *******************************************************
-// 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;
-};
+typedef EFI_CPU_IO2_PROTOCOL EFI_CPU_IO_PROTOCOL;
extern EFI_GUID gEfiCpuIoProtocolGuid;
diff --git a/src/include/ipxe/efi/Protocol/CpuIo2.h b/src/include/ipxe/efi/Protocol/CpuIo2.h
new file mode 100644
index 0000000..e6fd0f2
--- /dev/null
+++ b/src/include/ipxe/efi/Protocol/CpuIo2.h
@@ -0,0 +1,142 @@
+/** @file
+ This files describes the CPU I/O 2 Protocol.
+
+ This protocol provides an I/O abstraction for a system processor. This protocol
+ is used by a PCI root bridge I/O driver to perform memory-mapped I/O and I/O transactions.
+ The I/O or memory primitives can be used by the consumer of the protocol to materialize
+ bus-specific configuration cycles, such as the transitional configuration address and data
+ ports for PCI. Only drivers that require direct access to the entire system should use this
+ protocol.
+
+ Note: This is a boot-services only protocol and it may not be used by runtime drivers after
+ ExitBootServices(). It is different from the Framework CPU I/O Protocol, which is a runtime
+ protocol and can be used by runtime drivers after ExitBootServices().
+
+ Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ @par Revision Reference:
+ This Protocol is defined in UEFI Platform Initialization Specification 1.2
+ Volume 5: Standards
+
+**/
+
+#ifndef __CPU_IO2_H__
+#define __CPU_IO2_H__
+
+#define EFI_CPU_IO2_PROTOCOL_GUID \
+ { \
+ 0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f} \
+ }
+
+typedef struct _EFI_CPU_IO2_PROTOCOL EFI_CPU_IO2_PROTOCOL;
+
+///
+/// Enumeration that defines the width of the I/O operation.
+///
+typedef enum {
+ EfiCpuIoWidthUint8,
+ EfiCpuIoWidthUint16,
+ EfiCpuIoWidthUint32,
+ EfiCpuIoWidthUint64,
+ EfiCpuIoWidthFifoUint8,
+ EfiCpuIoWidthFifoUint16,
+ EfiCpuIoWidthFifoUint32,
+ EfiCpuIoWidthFifoUint64,
+ EfiCpuIoWidthFillUint8,
+ EfiCpuIoWidthFillUint16,
+ EfiCpuIoWidthFillUint32,
+ EfiCpuIoWidthFillUint64,
+ EfiCpuIoWidthMaximum
+} EFI_CPU_IO_PROTOCOL_WIDTH;
+
+/**
+ Enables a driver to access registers in the PI CPU I/O space.
+
+ The Io.Read() and Io.Write() functions enable a driver to access PCI controller
+ registers in the PI CPU I/O space.
+
+ The I/O operations are carried out exactly as requested. The caller is responsible
+ for satisfying any alignment and I/O width restrictions that a PI System on a
+ platform might require. For example on some platforms, width requests of
+ EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will
+ be handled by the driver.
+
+ If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32,
+ or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for
+ each of the Count operations that is performed.
+
+ If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16,
+ EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is
+ incremented for each of the Count operations that is performed. The read or
+ write operation is performed Count times on the same Address.
+
+ If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16,
+ EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is
+ incremented for each of the Count operations that is performed. The read or
+ write operation is performed Count times from the first element of Buffer.
+
+ @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.
+ @param[in] Width Signifies the width of the I/O or Memory operation.
+ @param[in] Address The base address of the I/O operation.
+ @param[in] Count The number of I/O operations to perform. The number
+ of bytes moved is Width size * Count, starting at Address.
+ @param[in, out] 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 PI system.
+ @retval EFI_INVALID_PARAMETER Width is invalid for this PI system.
+ @retval EFI_INVALID_PARAMETER Buffer is NULL.
+ @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
+ @retval EFI_UNSUPPORTED The address range specified by Address, Width,
+ and Count is not valid for this PI system.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_IO_PROTOCOL_IO_MEM)(
+ IN EFI_CPU_IO2_PROTOCOL *This,
+ IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
+ IN UINT64 Address,
+ IN UINTN Count,
+ IN OUT VOID *Buffer
+ );
+
+///
+/// Service for read and write accesses.
+///
+typedef struct {
+ ///
+ /// This service provides the various modalities of memory and I/O read.
+ ///
+ EFI_CPU_IO_PROTOCOL_IO_MEM Read;
+ ///
+ /// This service provides the various modalities of memory and I/O write.
+ ///
+ EFI_CPU_IO_PROTOCOL_IO_MEM Write;
+} EFI_CPU_IO_PROTOCOL_ACCESS;
+
+///
+/// Provides the basic memory and I/O interfaces that are used to abstract
+/// accesses to devices in a system.
+///
+struct _EFI_CPU_IO2_PROTOCOL {
+ ///
+ /// Enables a driver to access memory-mapped registers in the EFI system memory space.
+ ///
+ EFI_CPU_IO_PROTOCOL_ACCESS Mem;
+ ///
+ /// Enables a driver to access registers in the EFI CPU I/O space.
+ ///
+ EFI_CPU_IO_PROTOCOL_ACCESS Io;
+};
+
+extern EFI_GUID gEfiCpuIo2ProtocolGuid;
+
+#endif
diff --git a/src/include/ipxe/efi/Protocol/DebugSupport.h b/src/include/ipxe/efi/Protocol/DebugSupport.h
index 370614d..0b6f4ed 100644
--- a/src/include/ipxe/efi/Protocol/DebugSupport.h
+++ b/src/include/ipxe/efi/Protocol/DebugSupport.h
@@ -5,27 +5,26 @@
The DebugSupport protocol is used by source level debuggers to abstract the
processor and handle context save and restore operations.
- Copyright (c) 2006 - 2008, 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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+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 __DEBUG_SUPPORT_H__
#define __DEBUG_SUPPORT_H__
-#include <ipxe/efi/ProcessorBind.h>
#include <ipxe/efi/IndustryStandard/PeImage.h>
typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
///
-/// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
+/// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}.
///
#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
{ \
@@ -33,13 +32,14 @@ typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
}
///
-/// Debug Support definitions
+/// Processor exception to be hooked.
+/// All exception types for IA32, X64, Itanium and EBC processors are defined.
///
typedef INTN EFI_EXCEPTION_TYPE;
-//
-// IA-32 processor exception types
-//
+///
+/// IA-32 processor exception types.
+///
#define EXCEPT_IA32_DIVIDE_ERROR 0
#define EXCEPT_IA32_DEBUG 1
#define EXCEPT_IA32_NMI 2
@@ -59,11 +59,8 @@ typedef INTN EFI_EXCEPTION_TYPE;
#define EXCEPT_IA32_SIMD 19
///
-/// IA-32 processor context definition
-///
-///
-/// FXSAVE_STATE
-/// FP / MMX / XMM registers (see fxrstor instruction definition)
+/// FXSAVE_STATE.
+/// FP / MMX / XMM registers (see fxrstor instruction definition).
///
typedef struct {
UINT16 Fcw;
@@ -95,6 +92,9 @@ typedef struct {
UINT8 Reserved11[14 * 16];
} EFI_FX_SAVE_STATE_IA32;
+///
+/// IA-32 processor context definition.
+///
typedef struct {
UINT32 ExceptionData;
EFI_FX_SAVE_STATE_IA32 FxSaveState;
@@ -131,9 +131,9 @@ typedef struct {
UINT32 Eax;
} EFI_SYSTEM_CONTEXT_IA32;
-//
-// X64 processor exception types
-//
+///
+/// x64 processor exception types.
+///
#define EXCEPT_X64_DIVIDE_ERROR 0
#define EXCEPT_X64_DEBUG 1
#define EXCEPT_X64_NMI 2
@@ -153,10 +153,8 @@ typedef struct {
#define EXCEPT_X64_SIMD 19
///
-/// X64 processor context definition
-///
-/// FXSAVE_STATE
-/// FP / MMX / XMM registers (see fxrstor instruction definition)
+/// FXSAVE_STATE.
+/// FP / MMX / XMM registers (see fxrstor instruction definition).
///
typedef struct {
UINT16 Fcw;
@@ -188,6 +186,9 @@ typedef struct {
UINT8 Reserved11[14 * 16];
} EFI_FX_SAVE_STATE_X64;
+///
+/// x64 processor context definition.
+///
typedef struct {
UINT64 ExceptionData;
EFI_FX_SAVE_STATE_X64 FxSaveState;
@@ -233,9 +234,9 @@ typedef struct {
UINT64 R15;
} EFI_SYSTEM_CONTEXT_X64;
-//
-// IPF processor exception types
-//
+///
+/// Itanium Processor Family Exception types.
+///
#define EXCEPT_IPF_VHTP_TRANSLATION 0
#define EXCEPT_IPF_INSTRUCTION_TLB 1
#define EXCEPT_IPF_DATA_TLB 2
@@ -279,12 +280,12 @@ typedef struct {
#define EXCEPT_IPF_IA32_INTERRUPT 47
///
-/// IPF processor context definition
+/// 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..
+ // bits in UNAT and to insure F2 is 16 byte aligned.
//
UINT64 Reserved;
UINT64 R1;
@@ -434,27 +435,27 @@ typedef struct {
} EFI_SYSTEM_CONTEXT_IPF;
-//
-// EBC processor exception types
-//
+///
+/// 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_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
+#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
+/// EBC processor context definition.
///
typedef struct {
UINT64 R0;
@@ -470,14 +471,61 @@ typedef struct {
UINT64 Ip;
} EFI_SYSTEM_CONTEXT_EBC;
+
+
+///
+/// ARM processor exception types.
+///
+#define EXCEPT_ARM_RESET 0
+#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1
+#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2
+#define EXCEPT_ARM_PREFETCH_ABORT 3
+#define EXCEPT_ARM_DATA_ABORT 4
+#define EXCEPT_ARM_RESERVED 5
+#define EXCEPT_ARM_IRQ 6
+#define EXCEPT_ARM_FIQ 7
+
+///
+/// For coding convenience, define the maximum valid ARM exception.
+///
+#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ
+
+///
+/// ARM processor context definition.
+///
+typedef struct {
+ UINT32 R0;
+ UINT32 R1;
+ UINT32 R2;
+ UINT32 R3;
+ UINT32 R4;
+ UINT32 R5;
+ UINT32 R6;
+ UINT32 R7;
+ UINT32 R8;
+ UINT32 R9;
+ UINT32 R10;
+ UINT32 R11;
+ UINT32 R12;
+ UINT32 SP;
+ UINT32 LR;
+ UINT32 PC;
+ UINT32 CPSR;
+ UINT32 DFSR;
+ UINT32 DFAR;
+ UINT32 IFSR;
+ UINT32 IFAR;
+} EFI_SYSTEM_CONTEXT_ARM;
+
///
-/// Universal EFI_SYSTEM_CONTEXT definition
+/// Universal EFI_SYSTEM_CONTEXT definition.
///
typedef union {
EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc;
EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;
EFI_SYSTEM_CONTEXT_X64 *SystemContextX64;
EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;
+ EFI_SYSTEM_CONTEXT_ARM *SystemContextArm;
} EFI_SYSTEM_CONTEXT;
//
@@ -487,13 +535,13 @@ typedef union {
/**
Registers and enables an exception callback function for the specified exception.
- @param ExceptionType Exception types in EBC, IA-32, X64, or IPF
+ @param ExceptionType Exception types in EBC, IA-32, x64, or IPF.
@param SystemContext Exception content.
**/
typedef
VOID
-(*EFI_EXCEPTION_CALLBACK)(
+(EFIAPI *EFI_EXCEPTION_CALLBACK)(
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
@@ -506,7 +554,7 @@ VOID
**/
typedef
VOID
-(*EFI_PERIODIC_CALLBACK)(
+(EFIAPI *EFI_PERIODIC_CALLBACK)(
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
@@ -514,10 +562,11 @@ VOID
/// 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
+ IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C
+ IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664
+ IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200
+ IsaEbc = IMAGE_FILE_MACHINE_EBC, ///< 0x0EBC
+ IsaArm = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED ///< 0x01c2
} EFI_INSTRUCTION_SET_ARCHITECTURE;
@@ -571,7 +620,7 @@ EFI_STATUS
@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
+ @param ExceptionCallback 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.
diff --git a/src/include/ipxe/efi/Protocol/DevicePath.h b/src/include/ipxe/efi/Protocol/DevicePath.h
index 4d31008..f8556b8 100644
--- a/src/include/ipxe/efi/Protocol/DevicePath.h
+++ b/src/include/ipxe/efi/Protocol/DevicePath.h
@@ -1,18 +1,18 @@
/** @file
The device path protocol as defined in UEFI 2.0.
- The device path represents a programatic path to a device. It's the view
- from a software point of view. It also must persist from boot to boot, so
+ The device path represents a programmatic path to a device,
+ from a software point of view. The path must persist from boot to boot, so
it can not contain things like PCI bus numbers that change from boot to boot.
- Copyright (c) 2006 - 2008, 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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -22,19 +22,15 @@
#include <ipxe/efi/Guid/PcAnsi.h>
///
-/// Device Path protocol
+/// Device Path protocol.
///
#define EFI_DEVICE_PATH_PROTOCOL_GUID \
{ \
0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
-//
-// Protocol GUID defined in EFI1.1.
-//
-
///
-/// Device Path information
+/// Device Path guid definition for backward-compatible with EFI1.1.
///
#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
@@ -49,17 +45,17 @@
that make up the Device Path.
**/
typedef struct {
- UINT8 Type; ///< 0x01 Hardware Device Path
- ///< 0x02 ACPI Device Path
- ///< 0x03 Messaging Device Path
- ///< 0x04 Media Device Path
- ///< 0x05 BIOS Boot Specification Device Path
- ///< 0x7F End of Hardware Device Path
+ UINT8 Type; ///< 0x01 Hardware Device Path.
+ ///< 0x02 ACPI Device Path.
+ ///< 0x03 Messaging Device Path.
+ ///< 0x04 Media Device Path.
+ ///< 0x05 BIOS Boot Specification Device Path.
+ ///< 0x7F End of Hardware Device Path.
UINT8 SubType; ///< Varies by Type
///< 0xFF End Entire Device Path, or
///< 0x01 End This Instance of a Device Path and start a new
- ///< Device Path
+ ///< Device Path.
UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define
///< type of data. Size of data is included in Length.
@@ -67,70 +63,168 @@ typedef struct {
} EFI_DEVICE_PATH_PROTOCOL;
///
-/// For backward-compatible with EFI1.1.
+/// Device Path protocol definition for backward-compatible with EFI1.1.
///
typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;
///
-/// Hardware Device Paths
+/// Hardware Device Paths.
///
#define HARDWARE_DEVICE_PATH 0x01
+///
+/// PCI Device Path SubType.
+///
#define HW_PCI_DP 0x01
+
+///
+/// PCI Device Path.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// PCI Function Number.
+ ///
UINT8 Function;
+ ///
+ /// PCI Device Number.
+ ///
UINT8 Device;
} PCI_DEVICE_PATH;
+///
+/// PCCARD Device Path SubType.
+///
#define HW_PCCARD_DP 0x02
+
+///
+/// PCCARD Device Path.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Function Number (0 = First Function).
+ ///
UINT8 FunctionNumber;
} PCCARD_DEVICE_PATH;
+///
+/// Memory Mapped Device Path SubType.
+///
#define HW_MEMMAP_DP 0x03
+
+///
+/// Memory Mapped Device Path.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// EFI_MEMORY_TYPE
+ ///
UINT32 MemoryType;
+ ///
+ /// Starting Memory Address.
+ ///
EFI_PHYSICAL_ADDRESS StartingAddress;
+ ///
+ /// Ending Memory Address.
+ ///
EFI_PHYSICAL_ADDRESS EndingAddress;
} MEMMAP_DEVICE_PATH;
+///
+/// Hardware Vendor Device Path SubType.
+///
#define HW_VENDOR_DP 0x04
+
+///
+/// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must
+/// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the
+/// contents on the n bytes that follow in the Vendor Device Path node.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Vendor-assigned GUID that defines the data that follows.
+ ///
EFI_GUID Guid;
+ ///
+ /// Vendor-defined variable size data.
+ ///
} VENDOR_DEVICE_PATH;
+///
+/// Controller Device Path SubType.
+///
#define HW_CONTROLLER_DP 0x05
+
+///
+/// Controller Device Path.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Controller number.
+ ///
UINT32 ControllerNumber;
} CONTROLLER_DEVICE_PATH;
///
-/// ACPI Device Paths
+/// ACPI Device Paths.
///
#define ACPI_DEVICE_PATH 0x02
+///
+/// ACPI Device Path SubType.
+///
#define ACPI_DP 0x01
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Device's PnP hardware ID stored in a numeric 32-bit
+ /// compressed EISA-type ID. This value must match the
+ /// corresponding _HID in the ACPI name space.
+ ///
UINT32 HID;
+ ///
+ /// Unique ID that is required by ACPI if two devices have the
+ /// same _HID. This value must also match the corresponding
+ /// _UID/_HID pair in the ACPI name space. Only the 32-bit
+ /// numeric value type of _UID is supported. Thus, strings must
+ /// not be used for the _UID in the ACPI name space.
+ ///
UINT32 UID;
} ACPI_HID_DEVICE_PATH;
+///
+/// Expanded ACPI Device Path SubType.
+///
#define ACPI_EXTENDED_DP 0x02
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Device's PnP hardware ID stored in a numeric 32-bit
+ /// compressed EISA-type ID. This value must match the
+ /// corresponding _HID in the ACPI name space.
+ ///
UINT32 HID;
+ ///
+ /// Unique ID that is required by ACPI if two devices have the
+ /// same _HID. This value must also match the corresponding
+ /// _UID/_HID pair in the ACPI name space.
+ ///
UINT32 UID;
+ ///
+ /// Device's compatible PnP hardware ID stored in a numeric
+ /// 32-bit compressed EISA-type ID. This value must match at
+ /// least one of the compatible device IDs returned by the
+ /// corresponding _CID in the ACPI name space.
+ ///
UINT32 CID;
///
- /// Optional variable length _HIDSTR
- /// Optional variable length _UIDSTR
- /// Optional variable length _CIDSTR
+ /// Optional variable length _HIDSTR.
+ /// Optional variable length _UIDSTR.
+ /// Optional variable length _CIDSTR.
///
} ACPI_EXTENDED_HID_DEVICE_PATH;
@@ -149,11 +243,27 @@ typedef struct {
#define PNP_EISA_ID_MASK 0xffff
#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
-
+///
+/// ACPI _ADR Device Path SubType.
+///
#define ACPI_ADR_DP 0x03
+
+///
+/// The _ADR device path is used to contain video output device attributes to support the Graphics
+/// Output Protocol. The device path can contain multiple _ADR entries if multiple video output
+/// devices are displaying the same output.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// _ADR value. For video output devices the value of this
+ /// field comes from Table B-2 of the ACPI 3.0 specification. At
+ /// least one _ADR value is required.
+ ///
UINT32 ADR;
+ //
+ // This device path may optionally contain more than one _ADR entry.
+ //
} ACPI_ADR_DEVICE_PATH;
#define ACPI_ADR_DISPLAY_TYPE_OTHER 0
@@ -173,123 +283,331 @@ typedef struct {
((_Index) & 0xf) ))
///
-/// Messaging Device Paths
+/// Messaging Device Paths.
+/// This Device Path is used to describe the connection of devices outside the resource domain of the
+/// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
+/// information like networking protocol IP addresses.
///
#define MESSAGING_DEVICE_PATH 0x03
+///
+/// ATAPI Device Path SubType
+///
#define MSG_ATAPI_DP 0x01
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Set to zero for primary, or one for secondary.
+ ///
UINT8 PrimarySecondary;
+ ///
+ /// Set to zero for master, or one for slave mode.
+ ///
UINT8 SlaveMaster;
+ ///
+ /// Logical Unit Number.
+ ///
UINT16 Lun;
} ATAPI_DEVICE_PATH;
+///
+/// SCSI Device Path SubType.
+///
#define MSG_SCSI_DP 0x02
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Target ID on the SCSI bus (PUN).
+ ///
UINT16 Pun;
+ ///
+ /// Logical Unit Number (LUN).
+ ///
UINT16 Lun;
} SCSI_DEVICE_PATH;
+///
+/// Fibre Channel SubType.
+///
#define MSG_FIBRECHANNEL_DP 0x03
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Reserved for the future.
+ ///
UINT32 Reserved;
+ ///
+ /// Fibre Channel World Wide Number.
+ ///
UINT64 WWN;
+ ///
+ /// Fibre Channel Logical Unit Number.
+ ///
UINT64 Lun;
} FIBRECHANNEL_DEVICE_PATH;
+///
+/// 1394 Device Path SubType
+///
#define MSG_1394_DP 0x04
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Reserved for the future.
+ ///
UINT32 Reserved;
+ ///
+ /// 1394 Global Unique ID (GUID).
+ ///
UINT64 Guid;
} F1394_DEVICE_PATH;
+///
+/// USB Device Path SubType.
+///
#define MSG_USB_DP 0x05
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 ParentPortNumber;
- UINT8 InterfaceNumber;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// USB Parent Port Number.
+ ///
+ UINT8 ParentPortNumber;
+ ///
+ /// USB Interface Number.
+ ///
+ UINT8 InterfaceNumber;
} USB_DEVICE_PATH;
+///
+/// USB Class Device Path SubType.
+///
#define MSG_USB_CLASS_DP 0x0f
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 VendorId;
- UINT16 ProductId;
- UINT8 DeviceClass;
- UINT8 DeviceSubClass;
- UINT8 DeviceProtocol;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
+ /// match any Vendor ID.
+ ///
+ UINT16 VendorId;
+ ///
+ /// Product ID assigned by USB-IF. A value of 0xFFFF will
+ /// match any Product ID.
+ ///
+ UINT16 ProductId;
+ ///
+ /// The class code assigned by the USB-IF. A value of 0xFF
+ /// will match any class code.
+ ///
+ UINT8 DeviceClass;
+ ///
+ /// The subclass code assigned by the USB-IF. A value of
+ /// 0xFF will match any subclass code.
+ ///
+ UINT8 DeviceSubClass;
+ ///
+ /// The protocol code assigned by the USB-IF. A value of
+ /// 0xFF will match any protocol code.
+ ///
+ UINT8 DeviceProtocol;
} USB_CLASS_DEVICE_PATH;
+///
+/// USB WWID Device Path SubType.
+///
#define MSG_USB_WWID_DP 0x10
+
+///
+/// This device path describes a USB device using its serial number.
+///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT16 InterfaceNumber;
- UINT16 VendorId;
- UINT16 ProductId;
- // CHAR16 SerialNumber[...];
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// USB interface number.
+ ///
+ UINT16 InterfaceNumber;
+ ///
+ /// USB vendor id of the device.
+ ///
+ UINT16 VendorId;
+ ///
+ /// USB product id of the device.
+ ///
+ UINT16 ProductId;
+ ///
+ /// Last 64-or-fewer UTF-16 characters of the USB
+ /// serial number. The length of the string is
+ /// determined by the Length field less the offset of the
+ /// Serial Number field (10)
+ ///
+ /// CHAR16 SerialNumber[...];
} USB_WWID_DEVICE_PATH;
-
+///
+/// Device Logical Unit SubType.
+///
#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 Lun;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Logical Unit Number for the interface.
+ ///
+ UINT8 Lun;
} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
+///
+/// SATA Device Path SubType.
+///
#define MSG_SATA_DP 0x12
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// The HBA port number that facilitates the connection to the
+ /// device or a port multiplier. The value 0xFFFF is reserved.
+ ///
UINT16 HBAPortNumber;
+ ///
+ /// The Port multiplier port number that facilitates the connection
+ /// to the device. Bit 15 should be set if the device is directly
+ /// connected to the HBA.
+ ///
UINT16 PortMultiplierPortNumber;
+ ///
+ /// Logical Unit Number.
+ ///
UINT16 Lun;
} SATA_DEVICE_PATH;
+///
+/// Flag for if the device is directly connected to the HBA.
+///
+#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
+
+///
+/// I2O Device Path SubType.
+///
#define MSG_I2O_DP 0x06
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Target ID (TID) for a device.
+ ///
UINT32 Tid;
} I2O_DEVICE_PATH;
+///
+/// MAC Address Device Path SubType.
+///
#define MSG_MAC_ADDR_DP 0x0b
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// The MAC address for a network interface padded with 0s.
+ ///
EFI_MAC_ADDRESS MacAddress;
+ ///
+ /// Network interface type(i.e. 802.3, FDDI).
+ ///
UINT8 IfType;
} MAC_ADDR_DEVICE_PATH;
+///
+/// IPv4 Device Path SubType
+///
#define MSG_IPv4_DP 0x0c
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// The local IPv4 address.
+ ///
EFI_IPv4_ADDRESS LocalIpAddress;
+ ///
+ /// The remote IPv4 address.
+ ///
EFI_IPv4_ADDRESS RemoteIpAddress;
+ ///
+ /// The local port number.
+ ///
UINT16 LocalPort;
+ ///
+ /// The remote port number.
+ ///
UINT16 RemotePort;
+ ///
+ /// The network protocol(i.e. UDP, TCP).
+ ///
UINT16 Protocol;
+ ///
+ /// 0x00 - The Source IP Address was assigned though DHCP.
+ /// 0x01 - The Source IP Address is statically bound.
+ ///
BOOLEAN StaticIpAddress;
} IPv4_DEVICE_PATH;
+///
+/// IPv6 Device Path SubType.
+///
#define MSG_IPv6_DP 0x0d
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// The local IPv6 address.
+ ///
EFI_IPv6_ADDRESS LocalIpAddress;
+ ///
+ /// The remote IPv6 address.
+ ///
EFI_IPv6_ADDRESS RemoteIpAddress;
+ ///
+ /// The local port number.
+ ///
UINT16 LocalPort;
+ ///
+ /// The remote port number.
+ ///
UINT16 RemotePort;
+ ///
+ /// The network protocol(i.e. UDP, TCP).
+ ///
UINT16 Protocol;
+ ///
+ /// 0x00 - The Source IP Address was assigned though DHCP.
+ /// 0x01 - The Source IP Address is statically bound.
+ ///
BOOLEAN StaticIpAddress;
} IPv6_DEVICE_PATH;
+///
+/// InfiniBand Device Path SubType.
+///
#define MSG_INFINIBAND_DP 0x09
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Flags to help identify/manage InfiniBand device path elements:
+ /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
+ /// Bit 1 - Extend Boot Environment.
+ /// Bit 2 - Console Protocol.
+ /// Bit 3 - Storage Protocol.
+ /// Bit 4 - Network Protocol.
+ /// All other bits are reserved.
+ ///
UINT32 ResourceFlags;
+ ///
+ /// 128-bit Global Identifier for remote fabric port.
+ ///
UINT8 PortGid[16];
+ ///
+ /// 64-bit unique identifier to remote IOC or server process.
+ /// Interpretation of field specified by Resource Flags (bit 0).
+ ///
UINT64 ServiceId;
+ ///
+ /// 64-bit persistent ID of remote IOC port.
+ ///
UINT64 TargetPortId;
+ ///
+ /// 64-bit persistent ID of remote device.
+ ///
UINT64 DeviceId;
} INFINIBAND_DEVICE_PATH;
@@ -299,13 +617,43 @@ typedef struct {
#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
+///
+/// UART Device Path SubType.
+///
#define MSG_UART_DP 0x0e
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Reserved.
+ ///
UINT32 Reserved;
+ ///
+ /// The baud rate setting for the UART style device. A value of 0
+ /// means that the device's default baud rate will be used.
+ ///
UINT64 BaudRate;
+ ///
+ /// The number of data bits for the UART style device. A value
+ /// of 0 means that the device's default number of data bits will be used.
+ ///
UINT8 DataBits;
+ ///
+ /// The parity setting for the UART style device.
+ /// Parity 0x00 - Default Parity.
+ /// Parity 0x01 - No Parity.
+ /// Parity 0x02 - Even Parity.
+ /// Parity 0x03 - Odd Parity.
+ /// Parity 0x04 - Mark Parity.
+ /// Parity 0x05 - Space Parity.
+ ///
UINT8 Parity;
+ ///
+ /// The number of stop bits for the UART style device.
+ /// Stop Bits 0x00 - Default Stop Bits.
+ /// Stop Bits 0x01 - 1 Stop Bit.
+ /// Stop Bits 0x02 - 1.5 Stop Bits.
+ /// Stop Bits 0x03 - 2 Stop Bits.
+ ///
UINT8 StopBits;
} UART_DEVICE_PATH;
@@ -320,34 +668,88 @@ typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
-#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL EFI_UART_DEVICE_PATH_GUID
-
+///
+/// A new device path node is defined to declare flow control characteristics.
+/// UART Flow Control Messaging Device Path
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// Bitmap of supported flow control types.
+ /// Bit 0 set indicates hardware flow control.
+ /// Bit 1 set indicates Xon/Xoff flow control.
+ /// All other bits are reserved and are clear.
+ ///
UINT32 FlowControlMap;
} UART_FLOW_CONTROL_DEVICE_PATH;
-#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
+#define UART_FLOW_CONTROL_HARDWARE 0x00000001
+#define UART_FLOW_CONTROL_XON_XOFF 0x00000010
+#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
+///
+/// Serial Attached SCSI (SAS) devices.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// DEVICE_PATH_MESSAGING_SAS GUID.
+ ///
EFI_GUID Guid;
+ ///
+ /// Reserved for future use.
+ ///
UINT32 Reserved;
+ ///
+ /// SAS Address for Serial Attached SCSI Target.
+ ///
UINT64 SasAddress;
+ ///
+ /// SAS Logical Unit Number.
+ ///
UINT64 Lun;
+ ///
+ /// More Information about the device and its interconnect.
+ ///
UINT16 DeviceTopology;
+ ///
+ /// Relative Target Port (RTP).
+ ///
UINT16 RelativeTargetPort;
} SAS_DEVICE_PATH;
+///
+/// iSCSI Device Path SubType
+///
#define MSG_ISCSI_DP 0x13
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Network Protocol (0 = TCP, 1+ = reserved).
+ ///
UINT16 NetworkProtocol;
+ ///
+ /// iSCSI Login Options.
+ ///
UINT16 LoginOption;
+ ///
+ /// iSCSI Logical Unit Number.
+ ///
UINT64 Lun;
+ ///
+ /// iSCSI Target Portal group tag the initiator intends
+ /// to establish a session with.
+ ///
UINT16 TargetPortalGroupTag;
- // CHAR8 iSCSI Target Name
+ ///
+ /// iSCSI NodeTarget Name. The length of the name
+ /// is determined by subtracting the offset of this field from Length.
+ ///
+ /// CHAR8 iSCSI Target Name.
} ISCSI_DEVICE_PATH;
#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
@@ -359,78 +761,212 @@ typedef struct {
#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
+///
+/// VLAN Device Path SubType.
+///
+#define MSG_VLAN_DP 0x14
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// VLAN identifier (0-4094).
+ ///
+ UINT16 VlanId;
+} VLAN_DEVICE_PATH;
+
//
// Media Device Path
//
#define MEDIA_DEVICE_PATH 0x04
+///
+/// Hard Drive Media Device Path SubType.
+///
#define MEDIA_HARDDRIVE_DP 0x01
+
+///
+/// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Describes the entry in a partition table, starting with entry 1.
+ /// Partition number zero represents the entire device. Valid
+ /// partition numbers for a MBR partition are [1, 4]. Valid
+ /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
+ ///
UINT32 PartitionNumber;
+ ///
+ /// Starting LBA of the partition on the hard drive.
+ ///
UINT64 PartitionStart;
+ ///
+ /// Size of the partition in units of Logical Blocks.
+ ///
UINT64 PartitionSize;
+ ///
+ /// Signature unique to this partition:
+ /// If SignatureType is 0, this field has to be initialized with 16 zeros.
+ /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.
+ /// The other 12 bytes are initialized with zeros.
+ /// If SignatureType is 2, this field contains a 16 byte signature.
+ ///
UINT8 Signature[16];
+ ///
+ /// Partition Format: (Unused values reserved).
+ /// 0x01 - PC-AT compatible legacy MBR.
+ /// 0x02 - GUID Partition Table.
+ ///
UINT8 MBRType;
+ ///
+ /// Type of Disk Signature: (Unused values reserved).
+ /// 0x00 - No Disk Signature.
+ /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
+ /// 0x02 - GUID signature.
+ ///
UINT8 SignatureType;
} HARDDRIVE_DEVICE_PATH;
#define MBR_TYPE_PCAT 0x01
#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
+#define NO_DISK_SIGNATURE 0x00
#define SIGNATURE_TYPE_MBR 0x01
#define SIGNATURE_TYPE_GUID 0x02
+///
+/// CD-ROM Media Device Path SubType.
+///
#define MEDIA_CDROM_DP 0x02
+
+///
+/// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
+ ///
UINT32 BootEntry;
+ ///
+ /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
+ ///
UINT64 PartitionStart;
+ ///
+ /// Size of the partition in units of Blocks, also called Sectors.
+ ///
UINT64 PartitionSize;
} CDROM_DEVICE_PATH;
//
// Use VENDOR_DEVICE_PATH struct
//
-#define MEDIA_VENDOR_DP 0x03
+#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
+///
+/// File Path Media Device Path SubType
+///
#define MEDIA_FILEPATH_DP 0x04
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// A NULL-terminated Path string including directory and file names.
+ ///
CHAR16 PathName[1];
} FILEPATH_DEVICE_PATH;
-#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
+#define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
+///
+/// Media Protocol Device Path SubType.
+///
#define MEDIA_PROTOCOL_DP 0x05
+
+///
+/// The Media Protocol Device Path is used to denote the protocol that is being
+/// used in a device path at the location of the path specified.
+/// Many protocols are inherent to the style of device path.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// The ID of the protocol.
+ ///
EFI_GUID Protocol;
} MEDIA_PROTOCOL_DEVICE_PATH;
+///
+/// PIWG Firmware Volume Device Path SubType.
+///
+#define MEDIA_PIWG_FW_FILE_DP 0x06
+
+///
+/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
+///
+typedef struct {
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Firmware file name
+ ///
+ EFI_GUID FvFileName;
+} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
-#define MEDIA_PIWG_FW_VOL_DP 0x7
+///
+/// PIWG Firmware Volume Device Path SubType.
+///
+#define MEDIA_PIWG_FW_VOL_DP 0x07
+
+///
+/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Firmware volume name.
+ ///
EFI_GUID FvName;
} MEDIA_FW_VOL_DEVICE_PATH;
+///
+/// Media relative offset range device path.
+///
+#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
-#define MEDIA_PIWG_FW_FILE_DP 0x6
+///
+/// Used to describe the offset range of media relative.
+///
typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- EFI_GUID FvFileName;
-} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
+ EFI_DEVICE_PATH_PROTOCOL Header;
+ UINT32 Reserved;
+ UINT64 StartingOffset;
+ UINT64 EndingOffset;
+} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
-//
-// BBS Device Path
-//
+///
+/// BIOS Boot Specification Device Path.
+///
#define BBS_DEVICE_PATH 0x05
+
+///
+/// BIOS Boot Specification Device Path SubType.
+///
#define BBS_BBS_DP 0x01
+
+///
+/// This Device Path is used to describe the booting of non-EFI-aware operating systems.
+///
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
+ ///
+ /// Device Type as defined by the BIOS Boot Specification.
+ ///
UINT16 DeviceType;
+ ///
+ /// Status Flags as defined by the BIOS Boot Specification.
+ ///
UINT16 StatusFlag;
+ ///
+ /// ASCIIZ string that describes the boot device to a user.
+ ///
CHAR8 String[1];
} BBS_BBS_DEVICE_PATH;
@@ -448,9 +984,8 @@ typedef struct {
///
-/// Union of all possible Device Paths and pointers to Device Paths
+/// Union of all possible Device Paths and pointers to Device Paths.
///
-
typedef union {
EFI_DEVICE_PATH_PROTOCOL DevPath;
PCI_DEVICE_PATH Pci;
@@ -482,6 +1017,7 @@ typedef union {
FILEPATH_DEVICE_PATH FilePath;
MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
+ MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;
BBS_BBS_DEVICE_PATH Bbs;
} EFI_DEV_PATH;
@@ -519,6 +1055,7 @@ typedef union {
FILEPATH_DEVICE_PATH *FilePath;
MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
+ MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;
BBS_BBS_DEVICE_PATH *Bbs;
UINT8 *Raw;
diff --git a/src/include/ipxe/efi/Protocol/DriverBinding.h b/src/include/ipxe/efi/Protocol/DriverBinding.h
index 2ee7845..94fe36f 100644
--- a/src/include/ipxe/efi/Protocol/DriverBinding.h
+++ b/src/include/ipxe/efi/Protocol/DriverBinding.h
@@ -4,23 +4,22 @@
This protocol is produced by every driver that follows the UEFI Driver Model,
and it is the central component that allows drivers and controllers to be managed.
- Copyright (c) 2006 - 2008, 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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+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 __EFI_DRIVER_BINDING_H__
#define __EFI_DRIVER_BINDING_H__
-#include <ipxe/efi/Protocol/DevicePath.h>
///
-/// Global ID for the ControllerHandle Driver Protocol
+/// The global ID for the ControllerHandle Driver Protocol.
///
#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
{ \
@@ -30,22 +29,46 @@
typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
/**
- Test to see if this driver supports ControllerHandle. This service
- is called by the EFI boot service ConnectController(). In
- order to make drivers as small as possible, there are a few calling
- restrictions for this service. ConnectController() must
- follow these calling restrictions. If any other agent wishes to call
- Supported() it must also follow these calling restrictions.
-
- @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
-
+ Tests to see if this driver supports a given controller. If a child device is provided,
+ it further tests to see if this driver supports creating a handle for the specified child device.
+
+ This function checks to see if the driver specified by This supports the device specified by
+ ControllerHandle. Drivers will typically use the device path attached to
+ ControllerHandle and/or the services from the bus I/O abstraction attached to
+ ControllerHandle to determine if the driver supports ControllerHandle. This function
+ may be called many times during platform initialization. In order to reduce boot times, the tests
+ performed by this function must be very small, and take as little time as possible to execute. This
+ function must not change the state of any hardware devices, and this function must be aware that the
+ device specified by ControllerHandle may already be managed by the same driver or a
+ different driver. This function must match its calls to AllocatePages() with FreePages(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ Because ControllerHandle may have been previously started by the same driver, if a protocol is
+ already in the opened state, then it must not be closed with CloseProtocol(). This is required
+ to guarantee the state of ControllerHandle is not modified by this function.
+
+ @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
+ an I/O abstraction to the driver.
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
+ bus driver.
+
+ @retval EFI_SUCCESS The device specified by ControllerHandle and
+ RemainingDevicePath is supported by the driver specified by This.
+ @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
+ RemainingDevicePath is already being managed by the driver
+ specified by This.
+ @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
+ RemainingDevicePath is already being managed by a different
+ driver or an application that requires exclusive access.
+ Currently not implemented.
+ @retval EFI_UNSUPPORTED The device specified by ControllerHandle and
+ RemainingDevicePath is not supported by the driver specified by This.
**/
typedef
EFI_STATUS
@@ -56,21 +79,38 @@ EFI_STATUS
);
/**
- Start this driver on ControllerHandle. This service is called by the
- EFI boot service ConnectController(). In order to make
- drivers as small as possible, there are a few calling restrictions for
- this service. ConnectController() must follow these
- calling restrictions. If any other agent wishes to call Start() it
- must also follow these calling restrictions.
-
- @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
+ Starts a device controller or a bus controller.
+
+ The Start() function is designed to be invoked from the EFI boot service ConnectController().
+ As a result, much of the error checking on the parameters to Start() has been moved into this
+ common boot service. It is legal to call Start() from other locations,
+ but the following calling restrictions must be followed, or the system behavior will not be deterministic.
+ 1. ControllerHandle must be a valid EFI_HANDLE.
+ 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
+ EFI_DEVICE_PATH_PROTOCOL.
+ 3. Prior to calling Start(), the Supported() function for the driver specified by This must
+ have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
+
+ @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
+ an I/O abstraction to the driver.
+ @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
+ parameter is ignored by device drivers, and is optional for bus
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ If this parameter is not NULL and the first Device Path Node is
+ not the End of Device Path Node, then only the handle for the
+ child device specified by the first Device Path Node of
+ RemainingDevicePath is created by this driver.
+ If the first Device Path Node of RemainingDevicePath is
+ the End of Device Path Node, no child handle is created by this
+ driver.
+
+ @retval EFI_SUCCESS The device was started.
+ @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
+ @retval Others The driver failded to start the device.
**/
typedef
@@ -82,21 +122,29 @@ EFI_STATUS
);
/**
- Stop this driver on ControllerHandle. This service is called by the
- EFI boot service DisconnectController(). In order to
- make drivers as small as possible, there are a few calling
- restrictions for this service. DisconnectController()
- must follow these calling restrictions. If any other agent wishes
- to call Stop() it must also follow these calling restrictions.
-
- @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
+ Stops a device controller or a bus controller.
+
+ The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
+ As a result, much of the error checking on the parameters to Stop() has been moved
+ into this common boot service. It is legal to call Stop() from other locations,
+ but the following calling restrictions must be followed, or the system behavior will not be deterministic.
+ 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
+ same driver's Start() function.
+ 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
+ EFI_HANDLE. In addition, all of these handles must have been created in this driver's
+ Start() function, and the Start() function must have called OpenProtocol() on
+ ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
+
+ @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
+ to use to stop the device.
+ @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
+ @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
+ if NumberOfChildren is 0.
+
+ @retval EFI_SUCCESS The device was stopped.
+ @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
**/
typedef
diff --git a/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h b/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h
index e99ec38..dc0c709 100644
--- a/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h
+++ b/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h
@@ -1,27 +1,39 @@
/** @file
- EFI Network Interface Identifier Protocol
+ EFI Network Interface Identifier Protocol.
- Copyright (c) 2006 - 2008, 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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ @par Revision Reference:
+ This Protocol is introduced in EFI Specification 1.10.
**/
#ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__
#define __EFI_NETWORK_INTERFACE_IDENTIFER_H__
-
+//
+// GUID retired from UEFI Specification 2.1b
+//
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID \
{ \
0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 } \
}
+//
+// GUID intruduced in UEFI Specification 2.1b
+//
+#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31 \
+ { \
+ 0x1ACED566, 0x76ED, 0x4218, {0xBC, 0x81, 0x76, 0x7F, 0x1F, 0x97, 0x7A, 0x89 } \
+ }
+
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00010000
///
@@ -30,7 +42,7 @@
#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION
///
-/// Forward reference for pure ANSI compatability
+/// Forward reference for pure ANSI compatability.
///
typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
@@ -39,22 +51,18 @@ typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE
///
typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
-typedef enum {
- EfiNetworkInterfaceUndi = 1
-} EFI_NETWORK_PROTOCOL_TYPE;
-
///
/// An optional protocol that is used to describe details about the software
/// layer that is used to produce the Simple Network Protocol.
///
struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
UINT64 Revision; ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol.
- UINT64 ID; ///< Address of the first byte of the identifying structure for this network
+ UINT64 Id; ///< The address of the first byte of the identifying structure for this network
///< interface. This is only valid when the network interface is started
///< (see Start()). When the network interface is not started, this field is set to zero.
- UINT64 ImageAddr; ///< Address of the first byte of the identifying structure for this
+ UINT64 ImageAddr; ///< The address of the first byte of the identifying structure for this
///< network interface. This is set to zero if there is no structure.
- UINT32 ImageSize; ///< Size of unrelocated network interface image.
+ UINT32 ImageSize; ///< The size of unrelocated network interface image.
CHAR8 StringId[4];///< A four-character ASCII string that is sent in the class identifier field of
///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI.
UINT8 Type; ///< Network interface type. This will be set to one of the values
@@ -68,7 +76,16 @@ struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
};
+///
+///*******************************************************
+/// EFI_NETWORK_INTERFACE_TYPE
+///*******************************************************
+///
+typedef enum {
+ EfiNetworkInterfaceUndi = 1
+} EFI_NETWORK_INTERFACE_TYPE;
+
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31;
-#endif // _EFI_NII_H
+#endif
diff --git a/src/include/ipxe/efi/Protocol/PciIo.h b/src/include/ipxe/efi/Protocol/PciIo.h
index 5aea5b4..3ec9a42 100644
--- a/src/include/ipxe/efi/Protocol/PciIo.h
+++ b/src/include/ipxe/efi/Protocol/PciIo.h
@@ -2,8 +2,8 @@
EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
and DMA interfaces that a driver uses to access its PCI controller.
- Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -27,7 +27,9 @@
typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL;
///
-/// Prototypes for the PCI I/O Protocol
+/// *******************************************************
+/// EFI_PCI_IO_PROTOCOL_WIDTH
+/// *******************************************************
///
typedef enum {
EfiPciIoWidthUint8 = 0,
@@ -57,7 +59,7 @@ typedef enum {
#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_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so writes are combined
#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header
@@ -79,8 +81,18 @@ typedef enum {
/// *******************************************************
///
typedef enum {
+ ///
+ /// A read operation from system memory by a bus master.
+ ///
EfiPciIoOperationBusMasterRead,
+ ///
+ /// A write operation from system memory by a bus master.
+ ///
EfiPciIoOperationBusMasterWrite,
+ ///
+ /// Provides both read and write access to system memory by both the processor and a
+ /// bus master. The buffer is coherent from both the processor's and the bus master's point of view.
+ ///
EfiPciIoOperationBusMasterCommonBuffer,
EfiPciIoOperationMaximum
} EFI_PCI_IO_PROTOCOL_OPERATION;
@@ -91,16 +103,31 @@ typedef enum {
/// *******************************************************
///
typedef enum {
+ ///
+ /// Retrieve the PCI controller's current attributes, and return them in Result.
+ ///
EfiPciIoAttributeOperationGet,
+ ///
+ /// Set the PCI controller's current attributes to Attributes.
+ ///
EfiPciIoAttributeOperationSet,
+ ///
+ /// Enable the attributes specified by the bits that are set in Attributes for this PCI controller.
+ ///
EfiPciIoAttributeOperationEnable,
+ ///
+ /// Disable the attributes specified by the bits that are set in Attributes for this PCI controller.
+ ///
EfiPciIoAttributeOperationDisable,
+ ///
+ /// Retrieve the PCI controller's supported attributes, and return them in Result.
+ ///
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
+ Reads from the memory space of a PCI controller. Returns either when the polling exit criteria is
satisfied or after a defined duration.
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
@@ -166,7 +193,13 @@ EFI_STATUS
);
typedef struct {
+ ///
+ /// Read PCI controller registers in the PCI memory or I/O space.
+ ///
EFI_PCI_IO_PROTOCOL_IO_MEM Read;
+ ///
+ /// Write PCI controller registers in the PCI memory or I/O space.
+ ///
EFI_PCI_IO_PROTOCOL_IO_MEM Write;
} EFI_PCI_IO_PROTOCOL_ACCESS;
@@ -199,7 +232,13 @@ EFI_STATUS
);
typedef struct {
+ ///
+ /// Read PCI controller registers in PCI configuration space.
+ ///
EFI_PCI_IO_PROTOCOL_CONFIG Read;
+ ///
+ /// Write PCI controller registers in PCI configuration space.
+ ///
EFI_PCI_IO_PROTOCOL_CONFIG Write;
} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
@@ -244,7 +283,7 @@ EFI_STATUS
);
/**
- Provides the PCI controller-Cspecific addresses needed to access system memory.
+ Provides the PCI controller-specific 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.
@@ -476,7 +515,7 @@ EFI_STATUS
///
/// The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration,
-/// and DMA interfaces that are used to abstract accesses to PCI controllers.
+/// and DMA interfaces used to abstract accesses to PCI controllers.
/// There is one EFI_PCI_IO_PROTOCOL instance for each PCI controller on a PCI bus.
/// A device driver that wishes to manage a PCI controller in a system will have to
/// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller.
diff --git a/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h b/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h
index a1150f0..482c438 100644
--- a/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h
+++ b/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h
@@ -3,10 +3,10 @@
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
+ defferent types of bus mastering DMA.
- Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -26,6 +26,11 @@
typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL;
+///
+/// *******************************************************
+/// EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH
+/// *******************************************************
+///
typedef enum {
EfiPciWidthUint8,
EfiPciWidthUint16,
@@ -42,12 +47,41 @@ typedef enum {
EfiPciWidthMaximum
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH;
+///
+/// *******************************************************
+/// EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION
+/// *******************************************************
+///
typedef enum {
+ ///
+ /// A read operation from system memory by a bus master that is not capable of producing
+ /// PCI dual address cycles.
+ ///
EfiPciOperationBusMasterRead,
+ ///
+ /// A write operation from system memory by a bus master that is not capable of producing
+ /// PCI dual address cycles.
+ ///
EfiPciOperationBusMasterWrite,
+ ///
+ /// Provides both read and write access to system memory by both the processor and a bus
+ /// master that is not capable of producing PCI dual address cycles.
+ ///
EfiPciOperationBusMasterCommonBuffer,
+ ///
+ /// A read operation from system memory by a bus master that is capable of producing PCI
+ /// dual address cycles.
+ ///
EfiPciOperationBusMasterRead64,
+ ///
+ /// A write operation to system memory by a bus master that is capable of producing PCI
+ /// dual address cycles.
+ ///
EfiPciOperationBusMasterWrite64,
+ ///
+ /// Provides both read and write access to system memory by both the processor and a bus
+ /// master that is capable of producing PCI dual address cycles.
+ ///
EfiPciOperationBusMasterCommonBuffer64,
EfiPciOperationMaximum
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION;
@@ -135,7 +169,13 @@ EFI_STATUS
);
typedef struct {
+ ///
+ /// Read PCI controller registers in the PCI root bridge memory space.
+ ///
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read;
+ ///
+ /// Write PCI controller registers in the PCI root bridge memory space.
+ ///
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write;
} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS;
@@ -165,7 +205,7 @@ EFI_STATUS
);
/**
- Provides the PCI controller-Cspecific addresses required to access system memory from a
+ Provides the PCI controller-specific addresses required to access system memory from a
DMA bus master.
@param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
diff --git a/src/include/ipxe/efi/Protocol/SimpleNetwork.h b/src/include/ipxe/efi/Protocol/SimpleNetwork.h
index d3d2afc..3057590 100644
--- a/src/include/ipxe/efi/Protocol/SimpleNetwork.h
+++ b/src/include/ipxe/efi/Protocol/SimpleNetwork.h
@@ -1,5 +1,6 @@
/** @file
- Simple Network protocol as defined in the UEFI 2.0 specification.
+ The EFI_SIMPLE_NETWORK_PROTOCOL provides services to initialize a network interface,
+ transmit packets, receive packets, and close a network interface.
Basic network device abstraction.
@@ -8,14 +9,17 @@
MCast - MultiCast
...
- Copyright (c) 2006 - 2008, 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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ @par Revision Reference:
+ This Protocol is introduced in EFI Specification 1.10.
**/
@@ -36,7 +40,7 @@ typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL;
typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK;
///
-/// Simple Network Protocol data structures
+/// Simple Network Protocol data structures.
///
typedef struct {
///
@@ -119,6 +123,11 @@ typedef struct {
} EFI_NETWORK_STATISTICS;
+///
+/// The state of the network interface.
+/// When an EFI_SIMPLE_NETWORK_PROTOCOL driver initializes a
+/// network interface, the network interface is left in the EfiSimpleNetworkStopped state.
+///
typedef enum {
EfiSimpleNetworkStopped,
EfiSimpleNetworkStarted,
@@ -139,24 +148,84 @@ typedef enum {
#define MAX_MCAST_FILTER_CNT 16
typedef struct {
+ ///
+ /// Reports the current state of the network interface.
+ ///
UINT32 State;
+ ///
+ /// The size, in bytes, of the network interface's HW address.
+ ///
UINT32 HwAddressSize;
+ ///
+ /// The size, in bytes, of the network interface's media header.
+ ///
UINT32 MediaHeaderSize;
+ ///
+ /// The maximum size, in bytes, of the packets supported by the network interface.
+ ///
UINT32 MaxPacketSize;
+ ///
+ /// The size, in bytes, of the NVRAM device attached to the network interface.
+ ///
UINT32 NvRamSize;
+ ///
+ /// The size that must be used for all NVRAM reads and writes. The
+ /// start address for NVRAM read and write operations and the total
+ /// length of those operations, must be a multiple of this value. The
+ /// legal values for this field are 0, 1, 2, 4, and 8.
+ ///
UINT32 NvRamAccessSize;
+ ///
+ /// The multicast receive filter settings supported by the network interface.
+ ///
UINT32 ReceiveFilterMask;
+ ///
+ /// The current multicast receive filter settings.
+ ///
UINT32 ReceiveFilterSetting;
+ ///
+ /// The maximum number of multicast address receive filters supported by the driver.
+ ///
UINT32 MaxMCastFilterCount;
+ ///
+ /// The current number of multicast address receive filters.
+ ///
UINT32 MCastFilterCount;
+ ///
+ /// Array containing the addresses of the current multicast address receive filters.
+ ///
EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
+ ///
+ /// The current HW MAC address for the network interface.
+ ///
EFI_MAC_ADDRESS CurrentAddress;
+ ///
+ /// The current HW MAC address for broadcast packets.
+ ///
EFI_MAC_ADDRESS BroadcastAddress;
+ ///
+ /// The permanent HW MAC address for the network interface.
+ ///
EFI_MAC_ADDRESS PermanentAddress;
+ ///
+ /// The interface type of the network interface.
+ ///
UINT8 IfType;
+ ///
+ /// TRUE if the HW MAC address can be changed.
+ ///
BOOLEAN MacAddressChangeable;
+ ///
+ /// TRUE if the network interface can transmit more than one packet at a time.
+ ///
BOOLEAN MultipleTxSupported;
+ ///
+ /// TRUE if the presence of media can be determined; otherwise FALSE.
+ ///
BOOLEAN MediaPresentSupported;
+ ///
+ /// TRUE if media are connected to the network interface; otherwise FALSE.
+ ///
BOOLEAN MediaPresent;
} EFI_SIMPLE_NETWORK_MODE;
@@ -204,7 +273,7 @@ EFI_STATUS
required by the network interface; optionally, also requests allocation
of additional transmit and receive buffers.
- @param This Protocol instance pointer.
+ @param This The 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
@@ -217,9 +286,9 @@ EFI_STATUS
being used.
@retval EFI_SUCCESS The network interface was initialized.
- @retval EFI_NOT_STARTED The network interface has not been started
+ @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. .
+ 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.
@@ -237,13 +306,13 @@ EFI_STATUS
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 This The 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_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.
@@ -263,7 +332,7 @@ EFI_STATUS
@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_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.
@@ -278,7 +347,7 @@ EFI_STATUS
/**
Manages the multicast receive filters of a network interface.
- @param This Protocol instance pointer.
+ @param This The 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
@@ -293,7 +362,7 @@ EFI_STATUS
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_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.
@@ -313,13 +382,13 @@ EFI_STATUS
/**
Modifies or resets the current station address, if supported.
- @param This Protocol instance pointer.
+ @param This The 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.
+ @param New The 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_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.
@@ -366,7 +435,7 @@ EFI_STATUS
/**
Converts a multicast IP address to a multicast HW MAC address.
- @param This Protocol instance pointer.
+ @param This The 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
@@ -397,7 +466,7 @@ EFI_STATUS
Performs read and write operations on the NVRAM device attached to a
network interface.
- @param This Protocol instance pointer.
+ @param This The 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
@@ -427,7 +496,7 @@ EFI_STATUS
Reads the current interrupt status and recycled transmit buffer status from
a network interface.
- @param This Protocol instance pointer.
+ @param This The 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
@@ -459,7 +528,7 @@ EFI_STATUS
/**
Places a packet in the transmit queue of a network interface.
- @param This Protocol instance pointer.
+ @param This The 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
@@ -474,7 +543,7 @@ EFI_STATUS
@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
+ @param DestAddr 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
@@ -504,7 +573,7 @@ EFI_STATUS
/**
Receives a packet from a network interface.
- @param This Protocol instance pointer.
+ @param This The 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.
@@ -515,7 +584,7 @@ EFI_STATUS
@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,
+ @param DestAddr 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
diff --git a/src/include/ipxe/efi/Protocol/SimpleTextIn.h b/src/include/ipxe/efi/Protocol/SimpleTextIn.h
index 787d8f1..83ba9e7 100644
--- a/src/include/ipxe/efi/Protocol/SimpleTextIn.h
+++ b/src/include/ipxe/efi/Protocol/SimpleTextIn.h
@@ -1,11 +1,11 @@
/** @file
- Simple Text In protocol from the UEFI 2.0 specification.
+ Simple Text Input protocol from the UEFI 2.0 specification.
Abstraction of a very simple input device like a keyboard or serial
terminal.
- Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
@@ -18,27 +18,26 @@
#ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__
#define __SIMPLE_TEXT_IN_PROTOCOL_H__
-#include <ipxe/efi/ProcessorBind.h>
-
#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
{ \
0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
+typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
+
///
-/// Protocol GUID defined in EFI1.1.
+/// Protocol GUID name defined in EFI1.1.
///
#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
-typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
-
///
-/// Backward-compatible with EFI1.1.
+/// Protocol name in EFI1.1 for backward-compatible.
///
typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE;
-//
-// Data structures
-//
+
+///
+/// The keystroke information for the key that was pressed.
+///
typedef struct {
UINT16 ScanCode;
CHAR16 UnicodeChar;
@@ -82,7 +81,7 @@ typedef struct {
#define SCAN_ESC 0x0017
/**
- Reset the input device and optionaly run diagnostics
+ Reset the input device and optionally run diagnostics
@param This Protocol instance pointer.
@param ExtendedVerification Driver may perform diagnostics on reset.
@@ -100,14 +99,14 @@ EFI_STATUS
/**
Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
+ be used to test for existence of a keystroke via WaitForEvent () call.
@param This Protocol instance pointer.
@param Key Driver may perform diagnostics on reset.
@retval EFI_SUCCESS The keystroke information was returned.
- @retval EFI_NOT_READY There was no keystroke data availiable.
- @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to
+ @retval EFI_NOT_READY There was no keystroke data available.
+ @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
hardware errors.
**/
diff --git a/src/include/ipxe/efi/Protocol/SimpleTextOut.h b/src/include/ipxe/efi/Protocol/SimpleTextOut.h
index 426ce81..7e1c70c 100644
--- a/src/include/ipxe/efi/Protocol/SimpleTextOut.h
+++ b/src/include/ipxe/efi/Protocol/SimpleTextOut.h
@@ -3,17 +3,17 @@
Abstraction of a very simple text based output device like VGA text mode or
a serial terminal. The Simple Text Out protocol instance can represent
- a single hardware device or a virtual device that is an agregation
+ a single hardware device or a virtual device that is an aggregation
of multiple physical devices.
- Copyright (c) 2006 - 2008, 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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -137,18 +137,18 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
//
// We currently define attributes from 0 - 7F for color manipulations
-// To internally handle the local display characteristics for a particular character, we are defining
-// Bit 7 to signify the local glyph representation for a character. If turned on, glyphs will be
+// To internally handle the local display characteristics for a particular character,
+// Bit 7 signifies the local glyph representation for a character. If turned on, glyphs will be
// pulled from the wide glyph database and will display locally as a wide character (16 X 19 versus 8 X 19)
// If bit 7 is off, the narrow glyph database will be used. This does NOT affect information that is sent to
-// non-local displays (e.g. serial or LAN consoles).
+// non-local displays, such as serial or LAN consoles.
//
#define EFI_WIDE_ATTRIBUTE 0x80
/**
Reset the text output device hardware and optionaly run diagnostics
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@param ExtendedVerification Driver may perform more exhaustive verfication
operation of the device during reset.
@@ -165,12 +165,12 @@ EFI_STATUS
);
/**
- Write a Unicode string to the output device.
+ Write a string to the output device.
- @param This Protocol instance pointer.
- @param String The NULL-terminated Unicode string to be displayed on the output
+ @param This The protocol instance pointer.
+ @param String The NULL-terminated string to be displayed on the output
device(s). All output devices must also support the Unicode
- drawing defined in this file.
+ drawing character codes defined in this file.
@retval EFI_SUCCESS The string was output to the device.
@retval EFI_DEVICE_ERROR The device reported an error while attempting to output
@@ -178,7 +178,7 @@ EFI_STATUS
@retval EFI_UNSUPPORTED The output device's mode is not currently in a
defined text mode.
@retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
- characters in the Unicode string could not be
+ characters in the string could not be
rendered and were skipped.
**/
@@ -190,15 +190,15 @@ EFI_STATUS
);
/**
- Verifies that all characters in a Unicode string can be output to the
+ Verifies that all characters in a string can be output to the
target device.
- @param This Protocol instance pointer.
- @param String The NULL-terminated Unicode string to be examined for the output
+ @param This The protocol instance pointer.
+ @param String The NULL-terminated string to be examined for the output
device(s).
@retval EFI_SUCCESS The device(s) are capable of rendering the output string.
- @retval EFI_UNSUPPORTED Some of the characters in the Unicode string cannot be
+ @retval EFI_UNSUPPORTED Some of the characters in the string cannot be
rendered by one or more of the output devices mapped
by the EFI handle.
@@ -214,7 +214,7 @@ EFI_STATUS
Returns information for an available text mode that the output device(s)
supports.
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@param ModeNumber The mode number to return information on.
@param Columns Returns the geometry of the text output device for the
requested ModeNumber.
@@ -238,7 +238,7 @@ EFI_STATUS
/**
Sets the output device(s) to a specified mode.
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@param ModeNumber The mode number to set.
@retval EFI_SUCCESS The requested text mode was set.
@@ -257,14 +257,14 @@ EFI_STATUS
Sets the background and foreground colors for the OutputString () and
ClearScreen () functions.
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@param Attribute The attribute to set. Bits 0..3 are the foreground color, and
bits 4..6 are the background color. All other bits are undefined
and must be zero. The valid Attributes are defined in this file.
- @retval EFI_SUCCESS The attribute was set.
- @retval EFI_DEVICE_ ERROR The device had an error and could not complete the request.
- @retval EFI_UNSUPPORTED The attribute requested is not defined.
+ @retval EFI_SUCCESS The attribute was set.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
+ @retval EFI_UNSUPPORTED The attribute requested is not defined.
**/
typedef
@@ -278,7 +278,7 @@ EFI_STATUS
Clears the output device(s) display to the currently selected background
color.
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
@@ -294,7 +294,7 @@ EFI_STATUS
/**
Sets the current coordinates of the cursor position
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@param Column The position to set the cursor to. Must be greater than or
equal to zero and less than the number of columns and rows
by QueryMode ().
@@ -319,7 +319,7 @@ EFI_STATUS
/**
Makes the cursor visible or invisible
- @param This Protocol instance pointer.
+ @param This The protocol instance pointer.
@param Visible If TRUE, the cursor is set to be visible. If FALSE, the cursor is
set to be invisible.
@@ -340,36 +340,36 @@ EFI_STATUS
/**
@par Data Structure Description:
Mode Structure pointed to by Simple Text Out protocol.
-
- @param MaxMode
- The number of modes supported by QueryMode () and SetMode ().
-
- @param Mode
- The text mode of the output device(s).
-
- @param Attribute
- The current character output attribute
-
- @param CursorColumn
- The cursor's column.
-
- @param CursorRow
- The cursor's row.
-
- @param CursorVisible
- The cursor is currently visbile or not.
-
**/
typedef struct {
+ ///
+ /// The number of modes supported by QueryMode () and SetMode ().
+ ///
INT32 MaxMode;
//
// current settings
//
+
+ ///
+ /// The text mode of the output device(s).
+ ///
INT32 Mode;
+ ///
+ /// The current character output attribute.
+ ///
INT32 Attribute;
+ ///
+ /// The cursor's column.
+ ///
INT32 CursorColumn;
+ ///
+ /// The cursor's row.
+ ///
INT32 CursorRow;
+ ///
+ /// The cursor is currently visbile or not.
+ ///
BOOLEAN CursorVisible;
} EFI_SIMPLE_TEXT_OUTPUT_MODE;