summaryrefslogtreecommitdiff
path: root/gnu-efi/inc/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'gnu-efi/inc/protocol')
-rw-r--r--gnu-efi/inc/protocol/adapterdebug.h32
-rw-r--r--gnu-efi/inc/protocol/eficonsplit.h32
-rw-r--r--gnu-efi/inc/protocol/efivar.h133
-rw-r--r--gnu-efi/inc/protocol/intload.h27
-rw-r--r--gnu-efi/inc/protocol/legacyboot.h119
-rw-r--r--gnu-efi/inc/protocol/piflash64.h121
-rw-r--r--gnu-efi/inc/protocol/readme.txt3
-rw-r--r--gnu-efi/inc/protocol/vgaclass.h95
8 files changed, 562 insertions, 0 deletions
diff --git a/gnu-efi/inc/protocol/adapterdebug.h b/gnu-efi/inc/protocol/adapterdebug.h
new file mode 100644
index 00000000..d70af5df
--- /dev/null
+++ b/gnu-efi/inc/protocol/adapterdebug.h
@@ -0,0 +1,32 @@
+#ifndef _ADAPTER_DEBUG_H
+#define _ADAPTER_DEBUG_H
+
+/*++
+
+Copyright (c) 1999 Intel Corporation
+
+Module Name:
+
+ AdapterDebug.h
+
+Abstract:
+
+ Protocol to debug the EDD 3.0 enablement of BIOS option ROMs
+
+
+
+Revision History
+
+--*/
+
+// {82F86881-282B-11d4-BC7D-0080C73C8881}
+#define ADAPTER_DEBUG_PROTOCOL \
+{ 0x82f86881, 0x282b, 0x11d4, {0xbc, 0x7d, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
+
+//
+// This protocol points to the BIOS_LEGACY_DRIVE data structure
+// see edd.h for more details
+//
+
+#endif
+
diff --git a/gnu-efi/inc/protocol/eficonsplit.h b/gnu-efi/inc/protocol/eficonsplit.h
new file mode 100644
index 00000000..15adb925
--- /dev/null
+++ b/gnu-efi/inc/protocol/eficonsplit.h
@@ -0,0 +1,32 @@
+#ifndef _EFI_CONFORK_H
+#define _EFI_CONFORK_H
+/*++
+
+Copyright (c) 1999 Intel Corporation
+
+Module Name:
+
+Abstract:
+
+
+
+Revision History
+
+--*/
+
+
+
+//
+// ConOut Forker Protocol
+//
+
+#define TEXT_OUT_SPLITER_PROTOCOL \
+ { 0x56d830a0, 0x7e7a, 0x11d3, {0xbb, 0xa0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
+
+#define ERROR_OUT_SPLITER_PROTOCOL \
+ { 0xf0ba9039, 0x68f1, 0x425e, {0xaa, 0x7f, 0xd9, 0xaa, 0xf9, 0x1b, 0x82, 0xa1}}
+
+#define TEXT_IN_SPLITER_PROTOCOL \
+ { 0xf9a3c550, 0x7fb5, 0x11d3, {0xbb, 0xa0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
+
+#endif
diff --git a/gnu-efi/inc/protocol/efivar.h b/gnu-efi/inc/protocol/efivar.h
new file mode 100644
index 00000000..92dc506a
--- /dev/null
+++ b/gnu-efi/inc/protocol/efivar.h
@@ -0,0 +1,133 @@
+/*++
+
+Copyright (c) 1998 Intel Corporation
+
+Module Name:
+
+Abstract:
+
+
+
+Revision History
+
+--*/
+
+
+
+//
+// The variable store protocol interface is specific to the reference
+// implementation. The initialization code adds variable store devices
+// to the system, and the FW connects to the devices to provide the
+// variable store interfaces through these devices.
+//
+
+//
+// Variable Store Device protocol
+//
+
+#define VARIABLE_STORE_PROTOCOL \
+ { 0xf088cd91, 0xa046, 0x11d2, {0x8e, 0x42, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
+
+INTERFACE_DECL(_EFI_VARIABLE_STORE);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_STORE_CLEAR) (
+ IN struct _EFI_VARIABLE_STORE *This,
+ IN UINTN BankNo,
+ IN OUT VOID *Scratch
+ );
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_STORE_READ) (
+ IN struct _EFI_VARIABLE_STORE *This,
+ IN UINTN BankNo,
+ IN UINTN Offset,
+ IN UINTN BufferSize,
+ OUT VOID *Buffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_STORE_UPDATE) (
+ IN struct _EFI_VARIABLE_STORE *This,
+ IN UINTN BankNo,
+ IN UINTN Offset,
+ IN UINTN BufferSize,
+ IN VOID *Buffer
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_STORE_SIZE) (
+ IN struct _EFI_VARIABLE_STORE *This,
+ IN UINTN NoBanks
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TRANSACTION_UPDATE) (
+ IN struct _EFI_VARIABLE_STORE *This,
+ IN UINTN BankNo,
+ IN VOID *NewContents
+ );
+
+typedef struct _EFI_VARIABLE_STORE {
+
+ //
+ // Number of banks and bank size
+ //
+
+ UINT32 Attributes;
+ UINT32 BankSize;
+ UINT32 NoBanks;
+
+ //
+ // Functions to access the storage banks
+ //
+
+ EFI_STORE_CLEAR ClearStore;
+ EFI_STORE_READ ReadStore;
+ EFI_STORE_UPDATE UpdateStore;
+ EFI_STORE_SIZE SizeStore OPTIONAL;
+ EFI_TRANSACTION_UPDATE TransactionUpdate OPTIONAL;
+
+} EFI_VARIABLE_STORE;
+
+
+//
+//
+// ClearStore() - A function to clear the requested storage bank. A cleared
+// bank contains all "on" bits.
+//
+// ReadStore() - Read data from the requested store.
+//
+// UpdateStore() - Updates data on the requested store. The FW will only
+// ever issue updates to clear bits in the store. Updates must be
+// performed in LSb to MSb order of the update buffer.
+//
+// SizeStore() - An optional function for non-runtime stores that can be
+// dynamically sized. The FW will only ever increase or decrease the store
+// by 1 banksize at a time, and it is always adding or removing a bank from
+// the end of the store.
+//
+// By default the FW will update variables and storage banks in an
+// "atomic" manner by keeping 1 old copy of the data during an update,
+// and recovering appropiately if the power is lost during the middle
+// of an operation. To do this the FW needs to have multiple banks
+// of storage dedicated to its use. If that's not possible, the driver
+// can implement an atomic bank update function and the FW will allow
+// 1 bank in this case. (It will allow any number of banks,
+// but it won't require an "extra" bank to provide its bank transaction
+// function).
+//
+// TransactionUpdate() - An optional function that can clear & update an
+// entire bank in an "atomic" fashion. If the operation fails in the
+// middle the driver is responsible for having either the previous copy
+// of the bank's data or the new copy. A copy that's partially written
+// is not valid as internal data settings may get lost. Supply this
+// function only when needed.
+//
+
diff --git a/gnu-efi/inc/protocol/intload.h b/gnu-efi/inc/protocol/intload.h
new file mode 100644
index 00000000..fb24e3f4
--- /dev/null
+++ b/gnu-efi/inc/protocol/intload.h
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 1999 Intel Corporation
+
+Module Name:
+
+ intload
+
+Abstract:
+
+ EFI support for loading internally linked in apps
+
+
+
+Revision History
+
+--*/
+
+#ifndef _INTERNAL_LOAD_INCLUDE_
+#define _INTERNAL_LOAD_INCLUDE_
+
+// {D65A6B8C-71E5-4df0-A909-F0D2992B5AA9}
+#define INTERNAL_SHELL_GUID \
+ { 0xd65a6b8c, 0x71e5, 0x4df0, {0xa9, 0x09, 0xf0, 0xd2, 0x99, 0x2b, 0x5a, 0xa9} }
+
+
+#endif
diff --git a/gnu-efi/inc/protocol/legacyboot.h b/gnu-efi/inc/protocol/legacyboot.h
new file mode 100644
index 00000000..16e94e7e
--- /dev/null
+++ b/gnu-efi/inc/protocol/legacyboot.h
@@ -0,0 +1,119 @@
+/*++
+
+Copyright (c) 1999 Intel Corporation
+
+Module Name:
+
+ legacyboot
+
+Abstract:
+
+ EFI support for legacy boot
+
+
+
+Revision History
+
+--*/
+
+#ifndef _LEGACY_BOOT_INCLUDE_
+#define _LEGACY_BOOT_INCLUDE_
+
+#define LEGACY_BOOT_PROTOCOL \
+ { 0x376e5eb2, 0x30e4, 0x11d3, { 0xba, 0xe5, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
+
+#pragma pack(1)
+
+//
+// BBS 1.01 (See Appendix A) IPL and BCV Table Entry Data structure.
+// Seg:Off pointers have been converted to EFI pointers in this data structure
+// This is the structure that also maps to the EFI device path for the boot selection
+//
+typedef struct {
+ UINT16 DeviceType;
+ UINT16 StatusFlag;
+ UINT32 Reserved;
+ VOID *BootHandler; // Not an EFI entry point
+ CHAR8 *DescString;
+} BBS_TABLE_ENTRY;
+#pragma pack()
+
+typedef
+EFI_STATUS
+(EFIAPI *LEGACY_BOOT_CALL) (
+ IN EFI_DEVICE_PATH *DevicePath
+ );
+
+
+//
+// BBS support functions
+// PnP Call numbers and BiosSelector hidden in implementation
+//
+
+typedef enum {
+ IplRelative,
+ BcvRelative
+} BBS_TYPE;
+
+INTERFACE_DECL(_LEGACY_BOOT_INTERFACE);
+
+//
+// == PnP Function 0x60 then BbsVersion == 0x0101 if this call fails then BbsVersion == 0x0000
+//
+
+//
+// == PnP Function 0x61
+//
+typedef
+EFI_STATUS
+(EFIAPI *GET_DEVICE_COUNT) (
+ IN struct _LEGACY_BOOT_INTERFACE *This,
+ IN BBS_TYPE *TableType,
+ OUT UINTN *DeviceCount,
+ OUT UINTN *MaxCount
+ );
+
+//
+// == PnP Function 0x62
+//
+typedef
+EFI_STATUS
+(EFIAPI *GET_PRIORITY_AND_TABLE) (
+ IN struct _LEGACY_BOOT_INTERFACE *This,
+ IN BBS_TYPE *TableType,
+ IN OUT UINTN *PrioritySize, // MaxCount * sizeof(UINT8)
+ OUT UINTN *Priority,
+ IN OUT UINTN *TableSize, // MaxCount * sizeof(BBS_TABLE_ENTRY)
+ OUT BBS_TABLE_ENTRY *TableEntrySize
+ );
+
+//
+// == PnP Function 0x63
+//
+typedef
+EFI_STATUS
+(EFIAPI *SET_PRIORITY) (
+ IN struct _LEGACY_BOOT_INTERFACE *This,
+ IN BBS_TYPE *TableType,
+ IN OUT UINTN *PrioritySize,
+ OUT UINTN *Priority
+ );
+
+typedef struct _LEGACY_BOOT_INTERFACE {
+ LEGACY_BOOT_CALL BootIt;
+
+ //
+ // New functions to allow BBS booting to be configured from EFI
+ //
+ UINTN BbsVersion; // Currently 0x0101
+ GET_DEVICE_COUNT GetDeviceCount;
+ GET_PRIORITY_AND_TABLE GetPriorityAndTable;
+ SET_PRIORITY SetPriority;
+} LEGACY_BOOT_INTERFACE;
+
+EFI_STATUS
+PlInitializeLegacyBoot (
+ VOID
+ );
+
+#endif
diff --git a/gnu-efi/inc/protocol/piflash64.h b/gnu-efi/inc/protocol/piflash64.h
new file mode 100644
index 00000000..d521dfcc
--- /dev/null
+++ b/gnu-efi/inc/protocol/piflash64.h
@@ -0,0 +1,121 @@
+#ifndef _PIFLASH64_H
+#define _PIFLASH64_H
+
+/*++
+
+Copyright (c) 1999 Intel Corporation
+
+Module Name:
+
+ PIflash64.h
+
+Abstract:
+
+ Iflash64.efi protocol to abstract iflash from
+ the system.
+
+Revision History
+
+--*/
+
+//
+// Guid that identifies the IFLASH protocol
+//
+#define IFLASH64_PROTOCOL_PROTOCOL \
+ { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 };
+
+//
+// Unlock FLASH from StartAddress to EndAddress and return a LockKey
+//
+typedef
+EFI_STATUS
+(EFIAPI *UNLOCK_FLASH_API)(
+ IN struct _IFLASH64_PROTOCOL_INTERFACE *This
+ );
+
+//
+// Lock the flash represented by the LockKey
+//
+typedef
+EFI_STATUS
+(EFIAPI *LOCK_FLASH_API)(
+ IN struct _IFLASH64_PROTOCOL_INTERFACE *This
+ );
+
+//
+// Status callback for a utility like IFLASH64
+//
+// Token would map to a list like Ted proposed. The utility has no idea what
+// happens on the other side.
+// ErrorStatus - Level of Error or success. Independent of Token. If you
+// don't know the token you will at least know pass or fail.
+// String - Optional extra information about the error. Could be used for
+// debug or future expansion
+//
+// Attributes - Options screen attributes for String. Could allow the string to be different colors.
+//
+typedef
+EFI_STATUS
+(EFIAPI *UTILITY_PROGRESS_API)(
+ IN struct _IFLASH64_PROTOCOL_INTERFACE *This,
+ IN UINTN Token,
+ IN EFI_STATUS ErrorStatus,
+ IN CHAR16 *String, OPTIONAL
+ IN UINTN *Attributes OPTIONAL
+ );
+
+//
+// Token Values
+//
+// IFlash64 Token Codes
+#define IFLASH_TOKEN_IFLASHSTART 0xB0 // IFlash64 has started
+#define IFLASH_TOKEN_READINGFILE 0xB1 // Reading File
+#define IFLASH_TOKEN_INITVPP 0xB2 // Initializing Vpp
+#define IFLASH_TOKEN_DISABLEVPP 0x10 // Disable Vpp
+#define IFLASH_TOKEN_FLASHUNLOCK 0xB3 // Unlocking FLASH Devices
+#define IFLASH_TOKEN_FLASHERASE 0xB4 // Erasing FLASH Devices
+#define IFLASH_TOKEN_FLASHPROGRAM 0xB5 // Programming FLASH
+#define IFLASH_TOKEN_FLASHVERIFY 0xB6 // Verifying FLASH
+#define IFLASH_TOKEN_UPDATESUCCES 0xB7 // FLASH Updage Success!
+
+#define IFLASH_TOKEN_PROGRESS_READINGFILE 0x11 // % Reading File
+#define IFLASH_TOKEN_PROGRESS_FLASHUNLOCK 0x13 // % Unlocking FLASH Devices
+#define IFLASH_TOKEN_PROGRESS_FLASHERASE 0x14 // % Erasing FLASH Devices
+#define IFLASH_TOKEN_PROGRESS_FLASHPROGRAM 0x15 // % Programming FLASH
+#define IFLASH_TOKEN_PROGRESS_FLASHVERIFY 0x16 // % Verifying FLASH
+
+#define IFLASH_TOKEN_READINGFILE_ER 0xB8 // File Read Error
+#define IFLASH_TOKEN_INITVPP_ER 0xB9 // Initialization of IFB Error
+#define IFLASH_TOKEN_FLASHUNLOCK_ER 0xBA // FLASH Unlock Error
+#define IFLASH_TOKEN_FLASHERASE_ER 0xBB // FLASH Erase Error
+#define IFLASH_TOKEN_FLASHVERIFY_ER 0xBC // FLASH Verify Error
+#define IFLASH_TOKEN_FLASHPROG_ER 0xBD // FLASH Program Error
+
+#define IFLASH_TABLE_END 0x00
+
+//
+// If this number changes one of the existing API's has changes
+//
+#define IFLASH_PI_MAJOR_VERSION 0x01
+
+//
+// This number changes when new APIs or data variables get added to the end
+// of the data structure
+//
+#define IFLASH_PI_MINOR_VERSION 0x01
+
+typedef struct _IFLASH64_PROTOCOL_INTERFACE {
+ UINT32 MajorVersion;
+ UINT32 MinorVersion;
+ UNLOCK_FLASH_API UnlockFlash;
+ LOCK_FLASH_API LockFlash;
+ UTILITY_PROGRESS_API Progress;
+
+ //
+ // Future expansion goes here
+ //
+
+} IFLASH64_PROTOCOL_INTERFACE;
+
+
+#endif
diff --git a/gnu-efi/inc/protocol/readme.txt b/gnu-efi/inc/protocol/readme.txt
new file mode 100644
index 00000000..66e155cc
--- /dev/null
+++ b/gnu-efi/inc/protocol/readme.txt
@@ -0,0 +1,3 @@
+The protocol directory contains non Architectural
+Protocols that span the FW, Platform, or application
+space. \ No newline at end of file
diff --git a/gnu-efi/inc/protocol/vgaclass.h b/gnu-efi/inc/protocol/vgaclass.h
new file mode 100644
index 00000000..d0deb5ce
--- /dev/null
+++ b/gnu-efi/inc/protocol/vgaclass.h
@@ -0,0 +1,95 @@
+#ifndef _VGA_CLASS_H
+#define _VGA_CLASS_H
+
+/*++
+
+Copyright (c) 1999 Intel Corporation
+
+Module Name:
+
+ VgaClass.h
+
+Abstract:
+
+ Vga Mini port binding to Vga Class protocol
+
+
+
+Revision History
+
+--*/
+
+//
+// VGA Device Structure
+//
+
+// {0E3D6310-6FE4-11d3-BB81-0080C73C8881}
+#define VGA_CLASS_DRIVER_PROTOCOL \
+ { 0xe3d6310, 0x6fe4, 0x11d3, {0xbb, 0x81, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
+
+typedef
+EFI_STATUS
+(* INIT_VGA_CARD) (
+ IN UINTN VgaMode,
+ IN VOID *Context
+ );
+
+typedef struct {
+ UINTN MaxColumns;
+ UINTN MaxRows;
+} MAX_CONSOLE_GEOMETRY;
+
+#define VGA_CON_OUT_DEV_SIGNATURE EFI_SIGNATURE_32('c','v','g','a')
+typedef struct {
+ UINTN Signature;
+
+ EFI_HANDLE Handle;
+ SIMPLE_TEXT_OUTPUT_INTERFACE ConOut;
+ SIMPLE_TEXT_OUTPUT_MODE ConOutMode;
+ EFI_DEVICE_PATH *DevicePath;
+
+ UINT8 *Buffer;
+ EFI_DEVICE_IO_INTERFACE *DeviceIo;
+
+ //
+ // Video Card Context
+ //
+ INIT_VGA_CARD InitVgaCard;
+ VOID *VgaCardContext;
+ MAX_CONSOLE_GEOMETRY *Geometry;
+ //
+ // Video buffer normally 0xb8000
+ //
+ UINT64 VideoBuffer;
+
+ //
+ // Clear Screen & Default Attribute
+ //
+ UINT32 Attribute;
+
+ //
+ // -1 means search for active VGA device
+ //
+ EFI_PCI_ADDRESS_UNION Pci;
+} VGA_CON_OUT_DEV;
+
+#define VGA_CON_OUT_DEV_FROM_THIS(a) CR(a, VGA_CON_OUT_DEV, ConOut, VGA_CON_OUT_DEV_SIGNATURE)
+
+//
+// Vga Class Driver Protocol.
+// GUID defined in EFI Lib
+//
+
+typedef
+EFI_STATUS
+(EFIAPI *INSTALL_VGA_DRIVER) (
+ IN VGA_CON_OUT_DEV *ConOutDev
+ );
+
+typedef struct {
+ UINT32 Version;
+ INSTALL_VGA_DRIVER InstallGenericVgaDriver;
+} INSTALL_VGA_DRIVER_INTERFACE;
+
+#endif
+