mirror of
https://github.com/opnsense/src.git
synced 2026-06-05 06:42:56 -04:00
loader/efi: strip trailing whitespace
Many of these no-doubt are in upstream, but they are interfering with the filters I use to judge commits (no traling whitespace). We don't directly get stuff from upstream. If/when we pull this from contrib we'll revisit. Sponsored by: Netflix
This commit is contained in:
parent
7e791e2de6
commit
3a05fa14f9
19 changed files with 258 additions and 259 deletions
|
|
@ -28,17 +28,17 @@ Revision History
|
|||
|
||||
#ifdef EFI_NT_EMULATOR
|
||||
#define POST_CODE(_Data)
|
||||
#else
|
||||
#else
|
||||
#ifdef EFI_DEBUG
|
||||
#define POST_CODE(_Data) __asm mov eax,(_Data) __asm out 0x80,al
|
||||
#else
|
||||
#define POST_CODE(_Data)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define EFIERR(a) (0x8000000000000000 | a)
|
||||
#define EFI_ERROR_MASK 0x8000000000000000
|
||||
#define EFIERR_OEM(a) (0xc000000000000000 | a)
|
||||
#define EFIERR_OEM(a) (0xc000000000000000 | a)
|
||||
|
||||
|
||||
#define BAD_POINTER 0xFBFBFBFBFBFBFBFB
|
||||
|
|
@ -72,18 +72,18 @@ Revision History
|
|||
// BOOTSERVICE - prototype for implementation of a boot service interface
|
||||
// RUNTIMESERVICE - prototype for implementation of a runtime service interface
|
||||
// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
//
|
||||
|
||||
#ifdef __amd64__
|
||||
#define EFIAPI __attribute__((ms_abi))
|
||||
#endif
|
||||
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#else
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ Revision History
|
|||
|
||||
#define VOLATILE volatile
|
||||
|
||||
#define MEMORY_FENCE()
|
||||
#define MEMORY_FENCE()
|
||||
|
||||
#ifdef EFI_NO_INTERFACE_DECL
|
||||
#define EFI_FORWARD_DECLARATION(x)
|
||||
|
|
@ -149,9 +149,9 @@ Revision History
|
|||
|
||||
|
||||
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
|
||||
(_if)->LoadInternal(type, name, NULL)
|
||||
(_if)->LoadInternal(type, name, NULL)
|
||||
|
||||
#else // EFI_NT_EMULATOR
|
||||
#else // EFI_NT_EMULATOR
|
||||
|
||||
//
|
||||
// When building similar to FW, link everything together as
|
||||
|
|
@ -163,7 +163,7 @@ Revision History
|
|||
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
|
||||
(_if)->LoadInternal(type, name, entry)
|
||||
|
||||
#endif // EFI_FW_NT
|
||||
#endif // EFI_FW_NT
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define INTERFACE_DECL(x) struct x
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
PE32+ header file
|
||||
*/
|
||||
#ifndef _PE_H
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
#define IMAGE_DOS_SIGNATURE 0x5A4D // MZ
|
||||
#define IMAGE_OS2_SIGNATURE 0x454E // NE
|
||||
#define IMAGE_OS2_SIGNATURE_LE 0x454C // LE
|
||||
#define IMAGE_NT_SIGNATURE 0x00004550 // PE00
|
||||
#define IMAGE_NT_SIGNATURE 0x00004550 // PE00
|
||||
#define IMAGE_EDOS_SIGNATURE 0x44454550 // PEED
|
||||
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ typedef struct _IMAGE_OPTIONAL_HEADER {
|
|||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
UINT32 BaseOfData;
|
||||
|
||||
|
||||
//
|
||||
// NT additional fields.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ Revision History
|
|||
//
|
||||
#define BIT63 0x8000000000000000
|
||||
|
||||
#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63)
|
||||
#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63)
|
||||
#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) )
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Macro's with casts make this much easier to use and read.
|
||||
//
|
||||
#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port)))
|
||||
|
|
@ -45,7 +45,7 @@ Revision History
|
|||
|
||||
#define EFIERR(a) (0x8000000000000000 | a)
|
||||
#define EFI_ERROR_MASK 0x8000000000000000
|
||||
#define EFIERR_OEM(a) (0xc000000000000000 | a)
|
||||
#define EFIERR_OEM(a) (0xc000000000000000 | a)
|
||||
|
||||
#define BAD_POINTER 0xFBFBFBFBFBFBFBFB
|
||||
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF
|
||||
|
|
@ -77,14 +77,14 @@ Revision History
|
|||
// BOOTSERVICE - prototype for implementation of a boot service interface
|
||||
// RUNTIMESERVICE - prototype for implementation of a runtime service interface
|
||||
// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
//
|
||||
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#else
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ Revision History
|
|||
//
|
||||
// BugBug: Need to find out if this is portable across compilers.
|
||||
//
|
||||
void __mfa (void);
|
||||
void __mfa (void);
|
||||
#define MEMORY_FENCE() __mfa()
|
||||
|
||||
#ifdef EFI_NO_INTERFACE_DECL
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Revision history:
|
|||
2000-Feb-18 M(f)J GUID updated.
|
||||
Structure order changed for machine word alignment.
|
||||
Added StringId[4] to structure.
|
||||
|
||||
|
||||
2000-Feb-14 M(f)J Genesis.
|
||||
--*/
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@ extern UINTN EFIDebug;
|
|||
|
||||
#define DBGASSERT(a) DbgAssert(__FILE__, __LINE__, #a)
|
||||
#define DEBUG(a) DbgPrint a
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#define DBGASSERT(a)
|
||||
#define DEBUG(a)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if EFI_DEBUG_CLEAR_MEMORY
|
||||
|
|
@ -59,7 +59,7 @@ extern UINTN EFIDebug;
|
|||
#define D_INFO 0x00000040 // Verbose
|
||||
#define D_VARIABLE 0x00000100 // Variable
|
||||
#define D_VAR 0x00000100 // Variable
|
||||
#define D_BM 0x00000400 // Boot Manager
|
||||
#define D_BM 0x00000400 // Boot Manager
|
||||
#define D_BLKIO 0x00001000 // BlkIo Driver
|
||||
#define D_BLKIO_ULTRA 0x00002000 // BlkIo Driver
|
||||
#define D_NET 0x00004000 // SNI Driver
|
||||
|
|
@ -90,9 +90,9 @@ extern UINTN EFIDebug;
|
|||
|
||||
#else
|
||||
|
||||
#define ASSERT(a)
|
||||
#define ASSERT_LOCKED(l)
|
||||
#define ASSERT_STRUCT(p,t)
|
||||
#define ASSERT(a)
|
||||
#define ASSERT_LOCKED(l)
|
||||
#define ASSERT_STRUCT(p,t)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ typedef VOID *EFI_EVENT;
|
|||
// A GUID
|
||||
//
|
||||
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
UINT32 Data1;
|
||||
UINT16 Data2;
|
||||
UINT16 Data3;
|
||||
UINT8 Data4[8];
|
||||
UINT8 Data4[8];
|
||||
} EFI_GUID;
|
||||
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ typedef struct {
|
|||
// Time
|
||||
//
|
||||
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
UINT16 Year; // 1998 - 20XX
|
||||
UINT8 Month; // 1 - 12
|
||||
UINT8 Day; // 1 - 31
|
||||
|
|
@ -179,9 +179,9 @@ typedef enum {
|
|||
#define EFI_MEMORY_WC 0x0000000000000002
|
||||
#define EFI_MEMORY_WT 0x0000000000000004
|
||||
#define EFI_MEMORY_WB 0x0000000000000008
|
||||
#define EFI_MEMORY_UCE 0x0000000000000010
|
||||
#define EFI_MEMORY_UCE 0x0000000000000010
|
||||
|
||||
// physical memory protection on range
|
||||
// physical memory protection on range
|
||||
#define EFI_MEMORY_WP 0x0000000000001000
|
||||
#define EFI_MEMORY_RP 0x0000000000002000
|
||||
#define EFI_MEMORY_XP 0x0000000000004000
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ typedef struct _ACPI_EXTENDED_HID_DEVICE_PATH {
|
|||
// bits[31:16] - binary number
|
||||
// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
|
||||
//
|
||||
#define PNP_EISA_ID_CONST 0x41d0
|
||||
#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
|
||||
#define PNP_EISA_ID_CONST 0x41d0
|
||||
#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
|
||||
#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
|
||||
#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ typedef struct _ACPI_EXTENDED_HID_DEVICE_PATH {
|
|||
/*
|
||||
*
|
||||
*/
|
||||
#define MESSAGING_DEVICE_PATH 0x03
|
||||
#define MESSAGING_DEVICE_PATH 0x03
|
||||
|
||||
#define MSG_ATAPI_DP 0x01
|
||||
typedef struct _ATAPI_DEVICE_PATH {
|
||||
|
|
@ -174,7 +174,7 @@ typedef struct _ATAPI_DEVICE_PATH {
|
|||
typedef struct _SCSI_DEVICE_PATH {
|
||||
EFI_DEVICE_PATH Header;
|
||||
UINT16 Pun;
|
||||
UINT16 Lun;
|
||||
UINT16 Lun;
|
||||
} SCSI_DEVICE_PATH;
|
||||
|
||||
#define MSG_FIBRECHANNEL_DP 0x03
|
||||
|
|
@ -283,7 +283,7 @@ typedef struct _UART_DEVICE_PATH {
|
|||
|
||||
#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
|
||||
{ 0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43} }
|
||||
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_UTF8 \
|
||||
{ 0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88} }
|
||||
|
||||
|
|
@ -393,7 +393,7 @@ typedef union {
|
|||
PCCARD_DEVICE_PATH PcCard;
|
||||
MEMMAP_DEVICE_PATH MemMap;
|
||||
VENDOR_DEVICE_PATH Vendor;
|
||||
UNKNOWN_DEVICE_VENDOR_DEVICE_PATH UnknownVendor;
|
||||
UNKNOWN_DEVICE_VENDOR_DEVICE_PATH UnknownVendor;
|
||||
CONTROLLER_DEVICE_PATH Controller;
|
||||
ACPI_HID_DEVICE_PATH Acpi;
|
||||
|
||||
|
|
@ -427,7 +427,7 @@ typedef union {
|
|||
PCCARD_DEVICE_PATH *PcCard;
|
||||
MEMMAP_DEVICE_PATH *MemMap;
|
||||
VENDOR_DEVICE_PATH *Vendor;
|
||||
UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
|
||||
UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
|
||||
CONTROLLER_DEVICE_PATH *Controller;
|
||||
ACPI_HID_DEVICE_PATH *Acpi;
|
||||
ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ typedef struct _EFI_LBAL {
|
|||
UINT32 ArrayCount;
|
||||
} EFI_LBAL;
|
||||
|
||||
// Array size
|
||||
// Array size
|
||||
#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
|
||||
(((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
|
||||
|
||||
|
|
|
|||
|
|
@ -172,8 +172,8 @@ typedef struct {
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_START) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This
|
||||
);
|
||||
|
|
@ -181,8 +181,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This
|
||||
);
|
||||
|
|
@ -190,8 +190,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN UINTN ExtraRxBufferSize OPTIONAL,
|
||||
|
|
@ -201,8 +201,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
|
|
@ -211,8 +211,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This
|
||||
);
|
||||
|
|
@ -220,8 +220,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN UINT32 Enable,
|
||||
|
|
@ -234,8 +234,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN BOOLEAN Reset,
|
||||
|
|
@ -245,8 +245,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN BOOLEAN Reset,
|
||||
|
|
@ -257,8 +257,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN BOOLEAN IPv6,
|
||||
|
|
@ -269,8 +269,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN BOOLEAN ReadWrite,
|
||||
|
|
@ -282,8 +282,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
OUT UINT32 *InterruptStatus OPTIONAL,
|
||||
|
|
@ -293,8 +293,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
IN UINTN HeaderSize,
|
||||
|
|
@ -308,8 +308,8 @@ EFI_STATUS
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
|
||||
IN struct _EFI_SIMPLE_NETWORK *This,
|
||||
OUT UINTN *HeaderSize OPTIONAL,
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ Intel Corporation.
|
|||
Module Name:
|
||||
|
||||
efipart.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Abstract:
|
||||
Info about disk partitions and Master Boot Records
|
||||
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ typedef struct {
|
|||
#define MIN_MBR_DEVICE_SIZE 0x80000
|
||||
#define MBR_ERRATA_PAD 0x40000 // 128 MB
|
||||
|
||||
#define MAX_MBR_PARTITIONS 4
|
||||
#define MAX_MBR_PARTITIONS 4
|
||||
typedef struct {
|
||||
UINT8 BootStrapCode[440];
|
||||
UINT8 UniqueMbrSignature[4];
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
/** @file
|
||||
EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
|
||||
EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
|
||||
and DMA interfaces that a driver uses to access its PCI controller.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
|
@ -127,27 +127,27 @@ typedef enum {
|
|||
EfiPciIoAttributeOperationMaximum
|
||||
} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION;
|
||||
|
||||
/**
|
||||
/**
|
||||
Reads from the memory space of a PCI controller. Returns either when the polling exit criteria is
|
||||
satisfied or after a defined duration.
|
||||
|
||||
satisfied or after a defined duration.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Width Signifies the width of the memory or I/O operations.
|
||||
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
|
||||
base address for the memory operation to perform.
|
||||
base address for the memory operation to perform.
|
||||
@param Offset The offset within the selected BAR to start the memory operation.
|
||||
@param Mask Mask used for the polling criteria.
|
||||
@param Value The comparison value used for the polling exit criteria.
|
||||
@param Delay The number of 100 ns units to poll.
|
||||
@param Result Pointer to the last value read from the memory location.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The last data returned from the access matched the poll exit criteria.
|
||||
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
|
||||
@retval EFI_UNSUPPORTED Offset is not valid for the BarIndex of this PCI controller.
|
||||
@retval EFI_TIMEOUT Delay expired before a match occurred.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -162,25 +162,25 @@ EFI_STATUS
|
|||
OUT UINT64 *Result
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Enable a PCI driver to access PCI controller registers in the PCI memory or I/O space.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Width Signifies the width of the memory or I/O operations.
|
||||
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
|
||||
base address for the memory or I/O operation to perform.
|
||||
@param Offset The offset within the selected BAR to start the memory or I/O operation.
|
||||
base address for the memory or I/O operation to perform.
|
||||
@param Offset The offset within the selected BAR to start the memory or I/O operation.
|
||||
@param Count The number of memory or I/O operations to perform.
|
||||
@param Buffer For read operations, the destination buffer to store the results. For write
|
||||
operations, the source buffer to write data from.
|
||||
|
||||
operations, the source buffer to write data from.
|
||||
|
||||
@retval EFI_SUCCESS The data was read from or written to the PCI controller.
|
||||
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
|
||||
@retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
|
||||
valid for the PCI BAR specified by BarIndex.
|
||||
valid for the PCI BAR specified by BarIndex.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -204,23 +204,22 @@ typedef struct {
|
|||
EFI_PCI_IO_PROTOCOL_IO_MEM Write;
|
||||
} EFI_PCI_IO_PROTOCOL_ACCESS;
|
||||
|
||||
/**
|
||||
/**
|
||||
Enable a PCI driver to access PCI controller registers in PCI configuration space.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Width Signifies the width of the memory operations.
|
||||
@param Offset The offset within the PCI configuration space for the PCI controller.
|
||||
@param Count The number of PCI configuration operations to perform.
|
||||
@param Buffer For read operations, the destination buffer to store the results. For write
|
||||
operations, the source buffer to write data from.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read from or written to the PCI controller.
|
||||
@retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
|
||||
valid for the PCI configuration header of the PCI controller.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Width is invalid.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
@retval EFI_INVALID_PARAMETER Buffer is NULL or Width is invalid.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -243,33 +242,33 @@ typedef struct {
|
|||
EFI_PCI_IO_PROTOCOL_CONFIG Write;
|
||||
} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
|
||||
|
||||
/**
|
||||
/**
|
||||
Enables a PCI driver to copy one region of PCI memory space to another region of PCI
|
||||
memory space.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Width Signifies the width of the memory operations.
|
||||
@param DestBarIndex The BAR index in the standard PCI Configuration header to use as the
|
||||
base address for the memory operation to perform.
|
||||
base address for the memory operation to perform.
|
||||
@param DestOffset The destination offset within the BAR specified by DestBarIndex to
|
||||
start the memory writes for the copy operation.
|
||||
start the memory writes for the copy operation.
|
||||
@param SrcBarIndex The BAR index in the standard PCI Configuration header to use as the
|
||||
base address for the memory operation to perform.
|
||||
base address for the memory operation to perform.
|
||||
@param SrcOffset The source offset within the BAR specified by SrcBarIndex to start
|
||||
the memory reads for the copy operation.
|
||||
the memory reads for the copy operation.
|
||||
@param Count The number of memory operations to perform. Bytes moved is Width
|
||||
size * Count, starting at DestOffset and SrcOffset.
|
||||
|
||||
size * Count, starting at DestOffset and SrcOffset.
|
||||
|
||||
@retval EFI_SUCCESS The data was copied from one memory region to another memory region.
|
||||
@retval EFI_UNSUPPORTED DestBarIndex not valid for this PCI controller.
|
||||
@retval EFI_UNSUPPORTED SrcBarIndex not valid for this PCI controller.
|
||||
@retval EFI_UNSUPPORTED The address range specified by DestOffset, Width, and Count
|
||||
is not valid for the PCI BAR specified by DestBarIndex.
|
||||
is not valid for the PCI BAR specified by DestBarIndex.
|
||||
@retval EFI_UNSUPPORTED The address range specified by SrcOffset, Width, and Count is
|
||||
not valid for the PCI BAR specified by SrcBarIndex.
|
||||
not valid for the PCI BAR specified by SrcBarIndex.
|
||||
@retval EFI_INVALID_PARAMETER Width is invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -283,24 +282,24 @@ EFI_STATUS
|
|||
IN UINTN Count
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
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.
|
||||
@param HostAddress The system memory address to map to the PCI controller.
|
||||
@param NumberOfBytes On input the number of bytes to map. On output the number of bytes
|
||||
that were mapped.
|
||||
that were mapped.
|
||||
@param DeviceAddress The resulting map address for the bus master PCI controller to use to
|
||||
access the hosts HostAddress.
|
||||
access the hosts HostAddress.
|
||||
@param Mapping A resulting value to pass to Unmap().
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
|
||||
@retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.
|
||||
@retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
|
||||
@retval EFI_DEVICE_ERROR The system hardware could not map the requested address.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -313,15 +312,15 @@ EFI_STATUS
|
|||
OUT VOID **Mapping
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Completes the Map() operation and releases any corresponding resources.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Mapping The mapping value returned from Map().
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The range was unmapped.
|
||||
@retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -330,25 +329,25 @@ EFI_STATUS
|
|||
IN VOID *Mapping
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer
|
||||
mapping.
|
||||
|
||||
mapping.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Type This parameter is not used and must be ignored.
|
||||
@param MemoryType The type of memory to allocate, EfiBootServicesData or
|
||||
EfiRuntimeServicesData.
|
||||
@param Pages The number of pages to allocate.
|
||||
EfiRuntimeServicesData.
|
||||
@param Pages The number of pages to allocate.
|
||||
@param HostAddress A pointer to store the base system memory address of the
|
||||
allocated range.
|
||||
allocated range.
|
||||
@param Attributes The requested bit mask of attributes for the allocated range.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were allocated.
|
||||
@retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are
|
||||
MEMORY_WRITE_COMBINE and MEMORY_CACHED.
|
||||
MEMORY_WRITE_COMBINE and MEMORY_CACHED.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -361,17 +360,17 @@ EFI_STATUS
|
|||
IN UINT64 Attributes
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Frees memory that was allocated with AllocateBuffer().
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Pages The number of pages to free.
|
||||
@param HostAddress The base system memory address of the allocated range.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Pages The number of pages to free.
|
||||
@param HostAddress The base system memory address of the allocated range.
|
||||
|
||||
@retval EFI_SUCCESS The requested memory pages were freed.
|
||||
@retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages
|
||||
was not allocated with AllocateBuffer().
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -381,16 +380,16 @@ EFI_STATUS
|
|||
IN VOID *HostAddress
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Flushes all PCI posted write transactions from a PCI host bridge to system memory.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The PCI posted write transactions were flushed from the PCI host
|
||||
bridge to system memory.
|
||||
bridge to system memory.
|
||||
@retval EFI_DEVICE_ERROR The PCI posted write transactions were not flushed from the PCI
|
||||
host bridge due to a hardware error.
|
||||
|
||||
host bridge due to a hardware error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -398,18 +397,18 @@ EFI_STATUS
|
|||
IN EFI_PCI_IO_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Retrieves this PCI controller's current PCI bus number, device number, and function number.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param SegmentNumber The PCI controller's current PCI segment number.
|
||||
@param BusNumber The PCI controller's current PCI bus number.
|
||||
@param DeviceNumber The PCI controller's current PCI device number.
|
||||
@param FunctionNumber The PCI controller's current PCI function number.
|
||||
|
||||
@retval EFI_SUCCESS The PCI controller location was returned.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The PCI controller location was returned.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -421,24 +420,24 @@ EFI_STATUS
|
|||
OUT UINTN *FunctionNumber
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Performs an operation on the attributes that this PCI controller supports. The operations include
|
||||
getting the set of supported attributes, retrieving the current attributes, setting the current
|
||||
attributes, enabling attributes, and disabling attributes.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
getting the set of supported attributes, retrieving the current attributes, setting the current
|
||||
attributes, enabling attributes, and disabling attributes.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Operation The operation to perform on the attributes for this PCI controller.
|
||||
@param Attributes The mask of attributes that are used for Set, Enable, and Disable
|
||||
operations.
|
||||
operations.
|
||||
@param Result A pointer to the result mask of attributes that are returned for the Get
|
||||
and Supported operations.
|
||||
|
||||
and Supported operations.
|
||||
|
||||
@retval EFI_SUCCESS The operation on the PCI controller's attributes was completed.
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED one or more of the bits set in
|
||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED one or more of the bits set in
|
||||
Attributes are not supported by this PCI controller or one of
|
||||
its parent bridges when Operation is Set, Enable or Disable.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -449,27 +448,27 @@ EFI_STATUS
|
|||
OUT UINT64 *Result OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gets the attributes that this PCI controller supports setting on a BAR using
|
||||
SetBarAttributes(), and retrieves the list of resource descriptors for a BAR.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
|
||||
base address for resource range. The legal range for this field is 0..5.
|
||||
@param Supports A pointer to the mask of attributes that this PCI controller supports
|
||||
setting for this BAR with SetBarAttributes().
|
||||
setting for this BAR with SetBarAttributes().
|
||||
@param Resources A pointer to the ACPI 2.0 resource descriptors that describe the current
|
||||
configuration of this BAR of the PCI controller.
|
||||
|
||||
@retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI
|
||||
controller supports are returned in Supports. If Resources
|
||||
configuration of this BAR of the PCI controller.
|
||||
|
||||
@retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI
|
||||
controller supports are returned in Supports. If Resources
|
||||
is not NULL, then the ACPI 2.0 resource descriptors that the PCI
|
||||
controller is currently using are returned in Resources.
|
||||
controller is currently using are returned in Resources.
|
||||
@retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.
|
||||
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate
|
||||
Resources.
|
||||
|
||||
Resources.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -480,29 +479,29 @@ EFI_STATUS
|
|||
OUT VOID **Resources OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Sets the attributes for a range of a BAR on a PCI controller.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
|
||||
@param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
|
||||
@param Attributes The mask of attributes to set for the resource range specified by
|
||||
BarIndex, Offset, and Length.
|
||||
BarIndex, Offset, and Length.
|
||||
@param BarIndex The BAR index of the standard PCI Configuration header to use as the
|
||||
base address for resource range. The legal range for this field is 0..5.
|
||||
@param Offset A pointer to the BAR relative base address of the resource range to be
|
||||
modified by the attributes specified by Attributes.
|
||||
modified by the attributes specified by Attributes.
|
||||
@param Length A pointer to the length of the resource range to be modified by the
|
||||
attributes specified by Attributes.
|
||||
|
||||
@retval EFI_SUCCESS The set of attributes specified by Attributes for the resource
|
||||
range specified by BarIndex, Offset, and Length were
|
||||
attributes specified by Attributes.
|
||||
|
||||
@retval EFI_SUCCESS The set of attributes specified by Attributes for the resource
|
||||
range specified by BarIndex, Offset, and Length were
|
||||
set on the PCI controller, and the actual resource range is returned
|
||||
in Offset and Length.
|
||||
in Offset and Length.
|
||||
@retval EFI_INVALID_PARAMETER Offset or Length is NULL.
|
||||
@retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources to set the attributes on the
|
||||
resource range specified by BarIndex, Offset, and
|
||||
Length.
|
||||
|
||||
resource range specified by BarIndex, Offset, and
|
||||
Length.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
|
|
@ -515,11 +514,11 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
///
|
||||
/// The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration,
|
||||
/// 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.
|
||||
/// The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration,
|
||||
/// 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.
|
||||
///
|
||||
struct _EFI_PCI_IO_PROTOCOL {
|
||||
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem;
|
||||
|
|
@ -537,20 +536,20 @@ struct _EFI_PCI_IO_PROTOCOL {
|
|||
EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes;
|
||||
EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes;
|
||||
EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes;
|
||||
|
||||
|
||||
///
|
||||
/// The size, in bytes, of the ROM image.
|
||||
///
|
||||
UINT64 RomSize;
|
||||
|
||||
///
|
||||
/// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible
|
||||
/// for allocating memory for the ROM image, and copying the contents of the ROM to memory.
|
||||
/// The contents of this buffer are either from the PCI option ROM that can be accessed
|
||||
/// through the ROM BAR of the PCI controller, or it is from a platform-specific location.
|
||||
/// The Attributes() function can be used to determine from which of these two sources
|
||||
/// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible
|
||||
/// for allocating memory for the ROM image, and copying the contents of the ROM to memory.
|
||||
/// The contents of this buffer are either from the PCI option ROM that can be accessed
|
||||
/// through the ROM BAR of the PCI controller, or it is from a platform-specific location.
|
||||
/// The Attributes() function can be used to determine from which of these two sources
|
||||
/// the RomImage buffer was initialized.
|
||||
///
|
||||
///
|
||||
VOID *RomImage;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -308,9 +308,9 @@ typedef struct {
|
|||
//
|
||||
// The FileName field of the EFI_FILE_INFO data structure is variable length.
|
||||
// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
|
||||
// be the size of the data structure without the FileName field. The following macro
|
||||
// be the size of the data structure without the FileName field. The following macro
|
||||
// computes this size correctly no matter how big the FileName array is declared.
|
||||
// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
|
||||
// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
|
||||
//
|
||||
|
||||
#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
|
||||
|
|
@ -330,9 +330,9 @@ typedef struct {
|
|||
//
|
||||
// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
|
||||
// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
|
||||
// to be the size of the data structure without the VolumeLable field. The following macro
|
||||
// to be the size of the data structure without the VolumeLable field. The following macro
|
||||
// computes this size correctly no matter how big the VolumeLable array is declared.
|
||||
// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
|
||||
// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
|
||||
//
|
||||
|
||||
#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
|
||||
|
|
@ -412,7 +412,7 @@ typedef struct {
|
|||
EFI_DEVICE_IO Write;
|
||||
} EFI_IO_ACCESS;
|
||||
|
||||
typedef
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_DEVICE_PATH) (
|
||||
IN struct _EFI_DEVICE_IO_INTERFACE *This,
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ typedef struct {
|
|||
// Discover() definitions
|
||||
//
|
||||
|
||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
|
||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
|
||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
|
||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
|
||||
#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
|
||||
|
|
@ -355,7 +355,7 @@ typedef
|
|||
EFI_STATUS
|
||||
(EFIAPI *EFI_PXE_BASE_CODE_ARP) (
|
||||
IN struct _EFI_PXE_BASE_CODE *This,
|
||||
IN EFI_IP_ADDRESS *IpAddr,
|
||||
IN EFI_IP_ADDRESS *IpAddr,
|
||||
IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
|
||||
);
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ typedef enum {
|
|||
} EFI_PXE_BASE_CODE_CALLBACK_STATUS;
|
||||
|
||||
typedef
|
||||
EFI_PXE_BASE_CODE_CALLBACK_STATUS
|
||||
EFI_PXE_BASE_CODE_CALLBACK_STATUS
|
||||
(EFIAPI *EFI_PXE_CALLBACK) (
|
||||
IN struct _EFI_PXE_BASE_CODE_CALLBACK *This,
|
||||
IN EFI_PXE_BASE_CODE_FUNCTION Function,
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
* Copyright 2006 - 2016 Unified EFI, Inc.<BR>
|
||||
* Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
* Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
* This program and the accompanying materials
|
||||
* are licensed and made available under the terms and conditions of the BSD License
|
||||
* which accompanies this distribution. The full text of the license may be found at
|
||||
* 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,
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ Revision History
|
|||
INTERFACE_DECL(_SERIAL_IO_INTERFACE);
|
||||
|
||||
typedef enum {
|
||||
DefaultParity,
|
||||
NoParity,
|
||||
DefaultParity,
|
||||
NoParity,
|
||||
EvenParity,
|
||||
OddParity,
|
||||
MarkParity,
|
||||
|
|
@ -43,7 +43,7 @@ typedef enum {
|
|||
} EFI_PARITY_TYPE;
|
||||
|
||||
typedef enum {
|
||||
DefaultStopBits,
|
||||
DefaultStopBits,
|
||||
OneStopBit, // 1 stop bit
|
||||
OneFiveStopBits, // 1.5 stop bits
|
||||
TwoStopBits // 2 stop bits
|
||||
|
|
|
|||
|
|
@ -99,33 +99,33 @@ typedef enum {
|
|||
|
||||
The following table defines actions for BltOperations:
|
||||
|
||||
<B>EfiUgaVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||
directly to every pixel of the video display rectangle
|
||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
<B>EfiUgaVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||
directly to every pixel of the video display rectangle
|
||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
||||
|
||||
<B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle
|
||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||
DestinationY is not zero then Delta must be set to the length in bytes
|
||||
<B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle
|
||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||
DestinationY is not zero then Delta must be set to the length in bytes
|
||||
of a row in the BltBuffer.
|
||||
|
||||
<B>EfiUgaBltBufferToVideo</B> - Write data from the BltBuffer rectangle
|
||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||
video display rectangle (DestinationX, DestinationY)
|
||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||
not zero then Delta must be set to the length in bytes of a row in the
|
||||
<B>EfiUgaBltBufferToVideo</B> - Write data from the BltBuffer rectangle
|
||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||
video display rectangle (DestinationX, DestinationY)
|
||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||
not zero then Delta must be set to the length in bytes of a row in the
|
||||
BltBuffer.
|
||||
|
||||
<B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
|
||||
(SourceX + Width, SourceY + Height) .to the video display rectangle
|
||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
(SourceX + Width, SourceY + Height) .to the video display rectangle
|
||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
The BltBuffer and Delta are not used in this mode.
|
||||
|
||||
|
||||
@param[in] This - Protocol instance pointer.
|
||||
@param[in] BltBuffer - Buffer containing data to blit into video buffer. This
|
||||
@param[in] BltBuffer - Buffer containing data to blit into video buffer. This
|
||||
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
||||
@param[in] BltOperation - Operation to perform on BlitBuffer and video memory
|
||||
@param[in] SourceX - X coordinate of source for the BltBuffer.
|
||||
|
|
@ -135,7 +135,7 @@ typedef enum {
|
|||
@param[in] Width - Width of rectangle in BltBuffer in pixels.
|
||||
@param[in] Height - Hight of rectangle in BltBuffer in pixels.
|
||||
@param[in] Delta - OPTIONAL
|
||||
|
||||
|
||||
@retval EFI_SUCCESS - The Blt operation completed.
|
||||
@retval EFI_INVALID_PARAMETER - BltOperation is not valid.
|
||||
@retval EFI_DEVICE_ERROR - A hardware error occurred writing to the video buffer.
|
||||
|
|
|
|||
|
|
@ -28,17 +28,17 @@ Revision History
|
|||
|
||||
#ifdef EFI_NT_EMULATOR
|
||||
#define POST_CODE(_Data)
|
||||
#else
|
||||
#else
|
||||
#ifdef EFI_DEBUG
|
||||
#define POST_CODE(_Data) __asm mov eax,(_Data) __asm out 0x80,al
|
||||
#else
|
||||
#define POST_CODE(_Data)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define EFIERR(a) (0x80000000 | a)
|
||||
#define EFI_ERROR_MASK 0x80000000
|
||||
#define EFIERR_OEM(a) (0xc0000000 | a)
|
||||
#define EFIERR_OEM(a) (0xc0000000 | a)
|
||||
|
||||
|
||||
#define BAD_POINTER 0xFBFBFBFB
|
||||
|
|
@ -72,14 +72,14 @@ Revision History
|
|||
// BOOTSERVICE - prototype for implementation of a boot service interface
|
||||
// RUNTIMESERVICE - prototype for implementation of a runtime service interface
|
||||
// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
//
|
||||
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#else
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ Revision History
|
|||
|
||||
#define VOLATILE volatile
|
||||
|
||||
#define MEMORY_FENCE()
|
||||
#define MEMORY_FENCE()
|
||||
|
||||
#ifdef EFI_NO_INTERFACE_DECL
|
||||
#define EFI_FORWARD_DECLARATION(x)
|
||||
|
|
@ -145,9 +145,9 @@ Revision History
|
|||
|
||||
|
||||
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
|
||||
(_if)->LoadInternal(type, name, NULL)
|
||||
(_if)->LoadInternal(type, name, NULL)
|
||||
|
||||
#else // EFI_NT_EMULATOR
|
||||
#else // EFI_NT_EMULATOR
|
||||
|
||||
//
|
||||
// When build similar to FW, then link everything together as
|
||||
|
|
@ -159,7 +159,7 @@ Revision History
|
|||
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
|
||||
(_if)->LoadInternal(type, name, entry)
|
||||
|
||||
#endif // EFI_FW_NT
|
||||
#endif // EFI_FW_NT
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define INTERFACE_DECL(x) struct x
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
PE32+ header file
|
||||
*/
|
||||
#ifndef _PE_H
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
#define IMAGE_DOS_SIGNATURE 0x5A4D // MZ
|
||||
#define IMAGE_OS2_SIGNATURE 0x454E // NE
|
||||
#define IMAGE_OS2_SIGNATURE_LE 0x454C // LE
|
||||
#define IMAGE_NT_SIGNATURE 0x00004550 // PE00
|
||||
#define IMAGE_NT_SIGNATURE 0x00004550 // PE00
|
||||
#define IMAGE_EDOS_SIGNATURE 0x44454550 // PEED
|
||||
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ typedef struct _IMAGE_OPTIONAL_HEADER {
|
|||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
UINT32 BaseOfData;
|
||||
|
||||
|
||||
//
|
||||
// NT additional fields.
|
||||
//
|
||||
|
|
@ -606,7 +606,7 @@ typedef struct {
|
|||
UINT32 Signature; // "NB10"
|
||||
UINT32 Unknown;
|
||||
UINT32 Unknown2;
|
||||
UINT32 Unknown3;
|
||||
UINT32 Unknown3;
|
||||
//
|
||||
// Filename of .PDB goes here
|
||||
//
|
||||
|
|
@ -618,9 +618,9 @@ typedef struct {
|
|||
UINT32 Signature; // "RSDS"
|
||||
UINT32 Unknown;
|
||||
UINT32 Unknown2;
|
||||
UINT32 Unknown3;
|
||||
UINT32 Unknown4;
|
||||
UINT32 Unknown5;
|
||||
UINT32 Unknown3;
|
||||
UINT32 Unknown4;
|
||||
UINT32 Unknown5;
|
||||
//
|
||||
// Filename of .PDB goes here
|
||||
//
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ Revision History
|
|||
//
|
||||
#define BIT63 0x8000000000000000
|
||||
|
||||
#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63)
|
||||
#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63)
|
||||
#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) )
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
// Macro's with casts make this much easier to use and read.
|
||||
//
|
||||
#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port)))
|
||||
|
|
@ -45,7 +45,7 @@ Revision History
|
|||
|
||||
#define EFIERR(a) (0x8000000000000000 | a)
|
||||
#define EFI_ERROR_MASK 0x8000000000000000
|
||||
#define EFIERR_OEM(a) (0xc000000000000000 | a)
|
||||
#define EFIERR_OEM(a) (0xc000000000000000 | a)
|
||||
|
||||
#define BAD_POINTER 0xFBFBFBFBFBFBFBFB
|
||||
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF
|
||||
|
|
@ -77,14 +77,14 @@ Revision History
|
|||
// BOOTSERVICE - prototype for implementation of a boot service interface
|
||||
// RUNTIMESERVICE - prototype for implementation of a runtime service interface
|
||||
// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
// RUNTIME_CODE - pragma macro for declaring runtime code
|
||||
//
|
||||
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
|
||||
#else
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#define EFIAPI // Substitute expresion to force C calling convention
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ Revision History
|
|||
//
|
||||
// BugBug: Need to find out if this is portable across compilers.
|
||||
//
|
||||
void __mfa (void);
|
||||
void __mfa (void);
|
||||
#define MEMORY_FENCE() __mfa()
|
||||
|
||||
#ifdef EFI_NO_INTERFACE_DECL
|
||||
|
|
|
|||
Loading…
Reference in a new issue