summaryrefslogtreecommitdiff
path: root/roms/ipxe/src/include/ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'roms/ipxe/src/include/ipxe')
-rw-r--r--roms/ipxe/src/include/ipxe/asn1.h16
-rw-r--r--roms/ipxe/src/include/ipxe/bitops.h230
-rw-r--r--roms/ipxe/src/include/ipxe/cdc.h49
-rw-r--r--roms/ipxe/src/include/ipxe/dhcp.h18
-rw-r--r--roms/ipxe/src/include/ipxe/efi/AArch64/ProcessorBind.h150
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Arm/ProcessorBind.h171
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Base.h60
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Guid/SmBios.h14
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Ia32/ProcessorBind.h22
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi20.h547
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi30.h731
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi40.h1311
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi50.h2121
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi51.h2141
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi60.h2348
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Bluetooth.h49
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Pci22.h3
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Tpm20.h1822
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h110
-rw-r--r--roms/ipxe/src/include/ipxe/efi/IndustryStandard/Usb.h388
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Library/BaseLib.h433
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Pi/PiDxeCis.h62
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Pi/PiFirmwareFile.h8
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Pi/PiHob.h31
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Pi/PiMultiPhase.h16
-rw-r--r--roms/ipxe/src/include/ipxe/efi/ProcessorBind.h8
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/AbsolutePointer.h207
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/AppleNetBoot.h46
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h302
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h173
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h3
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h3
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/HiiFont.h474
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/HiiImage.h356
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h4
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/SerialIo.h301
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h21
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/SimplePointer.h145
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h17
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h10
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/UgaDraw.h168
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/UnicodeCollation.h194
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/Usb2HostController.h666
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/UsbHostController.h510
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Protocol/UsbIo.h514
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Uefi/UefiBaseType.h6
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h17
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Uefi/UefiMultiPhase.h40
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Uefi/UefiPxe.h22
-rw-r--r--roms/ipxe/src/include/ipxe/efi/Uefi/UefiSpec.h646
-rw-r--r--roms/ipxe/src/include/ipxe/efi/X64/ProcessorBind.h26
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi.h30
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi_driver.h2
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi_pxe.h17
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi_snp.h6
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi_timer.h18
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi_usb.h80
-rw-r--r--roms/ipxe/src/include/ipxe/efi/efi_utils.h1
-rw-r--r--roms/ipxe/src/include/ipxe/eoib.h103
-rw-r--r--roms/ipxe/src/include/ipxe/errfile.h17
-rw-r--r--roms/ipxe/src/include/ipxe/fbcon.h26
-rw-r--r--roms/ipxe/src/include/ipxe/ib_cmrc.h7
-rw-r--r--roms/ipxe/src/include/ipxe/ib_mad.h31
-rw-r--r--roms/ipxe/src/include/ipxe/ib_mcast.h21
-rw-r--r--roms/ipxe/src/include/ipxe/ib_packet.h5
-rw-r--r--roms/ipxe/src/include/ipxe/ib_service.h20
-rw-r--r--roms/ipxe/src/include/ipxe/if_arp.h10
-rw-r--r--roms/ipxe/src/include/ipxe/image.h1
-rw-r--r--roms/ipxe/src/include/ipxe/infiniband.h39
-rw-r--r--roms/ipxe/src/include/ipxe/io.h26
-rw-r--r--roms/ipxe/src/include/ipxe/iomap.h78
-rw-r--r--roms/ipxe/src/include/ipxe/iomap_virt.h33
-rw-r--r--roms/ipxe/src/include/ipxe/ipoib.h1
-rw-r--r--roms/ipxe/src/include/ipxe/linux_compat.h27
-rw-r--r--roms/ipxe/src/include/ipxe/ntp.h109
-rw-r--r--roms/ipxe/src/include/ipxe/pci.h26
-rw-r--r--roms/ipxe/src/include/ipxe/pciea.h70
-rw-r--r--roms/ipxe/src/include/ipxe/pool.h2
-rw-r--r--roms/ipxe/src/include/ipxe/pseudobit.h249
-rw-r--r--roms/ipxe/src/include/ipxe/sanboot.h2
-rw-r--r--roms/ipxe/src/include/ipxe/settings.h14
-rw-r--r--roms/ipxe/src/include/ipxe/smbios.h3
-rw-r--r--roms/ipxe/src/include/ipxe/tcp.h10
-rw-r--r--roms/ipxe/src/include/ipxe/tcpip.h54
-rw-r--r--roms/ipxe/src/include/ipxe/time.h15
-rw-r--r--roms/ipxe/src/include/ipxe/uri.h9
-rw-r--r--roms/ipxe/src/include/ipxe/usb.h114
-rw-r--r--roms/ipxe/src/include/ipxe/usbhid.h34
-rw-r--r--roms/ipxe/src/include/ipxe/virtio-pci.h207
-rw-r--r--roms/ipxe/src/include/ipxe/virtio-ring.h14
-rw-r--r--roms/ipxe/src/include/ipxe/xen.h14
-rw-r--r--roms/ipxe/src/include/ipxe/xsigo.h406
92 files changed, 1067 insertions, 18614 deletions
diff --git a/roms/ipxe/src/include/ipxe/asn1.h b/roms/ipxe/src/include/ipxe/asn1.h
index 2e635b48a..5fbd58281 100644
--- a/roms/ipxe/src/include/ipxe/asn1.h
+++ b/roms/ipxe/src/include/ipxe/asn1.h
@@ -315,26 +315,14 @@ struct asn1_bit_string {
} __attribute__ (( packed ));
/**
- * Invalidate ASN.1 object cursor
- *
- * @v cursor ASN.1 object cursor
- */
-static inline __attribute__ (( always_inline )) void
-asn1_invalidate_cursor ( struct asn1_cursor *cursor ) {
- cursor->len = 0;
-}
-
-/**
* Extract ASN.1 type
*
* @v cursor ASN.1 object cursor
- * @ret type Type, or ASN1_END if cursor is invalid
+ * @ret type Type
*/
static inline __attribute__ (( always_inline )) unsigned int
asn1_type ( const struct asn1_cursor *cursor ) {
- const uint8_t *type = cursor->data;
-
- return ( ( cursor->len >= sizeof ( *type ) ) ? *type : ASN1_END );
+ return ( *( ( const uint8_t * ) cursor->data ) );
}
extern void asn1_invalidate_cursor ( struct asn1_cursor *cursor );
diff --git a/roms/ipxe/src/include/ipxe/bitops.h b/roms/ipxe/src/include/ipxe/bitops.h
index 7366cd9f1..220ab0fe7 100644
--- a/roms/ipxe/src/include/ipxe/bitops.h
+++ b/roms/ipxe/src/include/ipxe/bitops.h
@@ -1,19 +1,235 @@
#ifndef _IPXE_BITOPS_H
#define _IPXE_BITOPS_H
-/** @file
+/*
+ * Copyright (C) 2008 Michael Brown <mbrown@fensystems.co.uk>.
*
- * Bit operations
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
*
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * You can also choose to distribute this program under the terms of
+ * the Unmodified Binary Distribution Licence (as given in the file
+ * COPYING.UBDL), provided that you have satisfied its requirements.
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-#include <bits/bitops.h>
+/**
+ * @file
+ *
+ * Bit operations
+ *
+ */
+
+#include <stdint.h>
+#include <byteswap.h>
+
+/* Endianness selection.
+ *
+ * This is a property of the NIC, not a property of the host CPU.
+ */
+#ifdef BITOPS_LITTLE_ENDIAN
+#define cpu_to_BIT64 cpu_to_le64
+#define cpu_to_BIT32 cpu_to_le32
+#define BIT64_to_cpu le64_to_cpu
+#define BIT32_to_cpu le32_to_cpu
+#endif
+#ifdef BITOPS_BIG_ENDIAN
+#define cpu_to_BIT64 cpu_to_be64
+#define cpu_to_BIT32 cpu_to_be32
+#define BIT64_to_cpu be64_to_cpu
+#define BIT32_to_cpu be32_to_cpu
+#endif
+
+/** Datatype used to represent a bit in the pseudo-structures */
+typedef unsigned char pseudo_bit_t;
+
+/**
+ * Wrapper structure for pseudo_bit_t structures
+ *
+ * This structure provides a wrapper around pseudo_bit_t structures.
+ * It has the correct size, and also encapsulates type information
+ * about the underlying pseudo_bit_t-based structure, which allows the
+ * BIT_FILL() etc. macros to work without requiring explicit type
+ * information.
+ */
+#define PSEUDO_BIT_STRUCT( _structure ) \
+ union { \
+ uint8_t bytes[ sizeof ( _structure ) / 8 ]; \
+ uint32_t dwords[ sizeof ( _structure ) / 32 ]; \
+ uint64_t qwords[ sizeof ( _structure ) / 64 ]; \
+ _structure *dummy[0]; \
+ } __attribute__ (( packed )) u
+
+/** Get pseudo_bit_t structure type from wrapper structure pointer */
+#define PSEUDO_BIT_STRUCT_TYPE( _ptr ) \
+ typeof ( *((_ptr)->u.dummy[0]) )
+
+/** Bit offset of a field within a pseudo_bit_t structure */
+#define BIT_OFFSET( _ptr, _field ) \
+ offsetof ( PSEUDO_BIT_STRUCT_TYPE ( _ptr ), _field )
+
+/** Bit width of a field within a pseudo_bit_t structure */
+#define BIT_WIDTH( _ptr, _field ) \
+ sizeof ( ( ( PSEUDO_BIT_STRUCT_TYPE ( _ptr ) * ) NULL )->_field )
+
+/** Qword offset of a field within a pseudo_bit_t structure */
+#define QWORD_OFFSET( _ptr, _field ) \
+ ( BIT_OFFSET ( _ptr, _field ) / 64 )
+
+/** Qword bit offset of a field within a pseudo_bit_t structure */
+#define QWORD_BIT_OFFSET( _ptr, _index, _field ) \
+ ( BIT_OFFSET ( _ptr, _field ) - ( 64 * (_index) ) )
+
+/** Bit mask for a field within a pseudo_bit_t structure */
+#define BIT_MASK( _ptr, _field ) \
+ ( ( ~( ( uint64_t ) 0 ) ) >> \
+ ( 64 - BIT_WIDTH ( _ptr, _field ) ) )
+
+/*
+ * Assemble native-endian qword from named fields and values
+ *
+ */
+
+#define BIT_ASSEMBLE_1( _ptr, _index, _field, _value ) \
+ ( ( ( uint64_t) (_value) ) << \
+ QWORD_BIT_OFFSET ( _ptr, _index, _field ) )
+
+#define BIT_ASSEMBLE_2( _ptr, _index, _field, _value, ... ) \
+ ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
+ BIT_ASSEMBLE_1 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_ASSEMBLE_3( _ptr, _index, _field, _value, ... ) \
+ ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
+ BIT_ASSEMBLE_2 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_ASSEMBLE_4( _ptr, _index, _field, _value, ... ) \
+ ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
+ BIT_ASSEMBLE_3 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_ASSEMBLE_5( _ptr, _index, _field, _value, ... ) \
+ ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
+ BIT_ASSEMBLE_4 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_ASSEMBLE_6( _ptr, _index, _field, _value, ... ) \
+ ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
+ BIT_ASSEMBLE_5 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_ASSEMBLE_7( _ptr, _index, _field, _value, ... ) \
+ ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
+ BIT_ASSEMBLE_6 ( _ptr, _index, __VA_ARGS__ ) )
+
+/*
+ * Build native-endian (positive) qword bitmasks from named fields
+ *
+ */
+
+#define BIT_MASK_1( _ptr, _index, _field ) \
+ ( BIT_MASK ( _ptr, _field ) << \
+ QWORD_BIT_OFFSET ( _ptr, _index, _field ) )
+
+#define BIT_MASK_2( _ptr, _index, _field, ... ) \
+ ( BIT_MASK_1 ( _ptr, _index, _field ) | \
+ BIT_MASK_1 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_MASK_3( _ptr, _index, _field, ... ) \
+ ( BIT_MASK_1 ( _ptr, _index, _field ) | \
+ BIT_MASK_2 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_MASK_4( _ptr, _index, _field, ... ) \
+ ( BIT_MASK_1 ( _ptr, _index, _field ) | \
+ BIT_MASK_3 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_MASK_5( _ptr, _index, _field, ... ) \
+ ( BIT_MASK_1 ( _ptr, _index, _field ) | \
+ BIT_MASK_4 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_MASK_6( _ptr, _index, _field, ... ) \
+ ( BIT_MASK_1 ( _ptr, _index, _field ) | \
+ BIT_MASK_5 ( _ptr, _index, __VA_ARGS__ ) )
+
+#define BIT_MASK_7( _ptr, _index, _field, ... ) \
+ ( BIT_MASK_1 ( _ptr, _index, _field ) | \
+ BIT_MASK_6 ( _ptr, _index, __VA_ARGS__ ) )
+
+/*
+ * Populate little-endian qwords from named fields and values
+ *
+ */
+
+#define BIT_FILL( _ptr, _index, _assembled ) do { \
+ uint64_t *__ptr = &(_ptr)->u.qwords[(_index)]; \
+ uint64_t __assembled = (_assembled); \
+ *__ptr = cpu_to_BIT64 ( __assembled ); \
+ } while ( 0 )
+
+#define BIT_FILL_1( _ptr, _field1, ... ) \
+ BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ BIT_ASSEMBLE_1 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ _field1, __VA_ARGS__ ) )
+
+#define BIT_FILL_2( _ptr, _field1, ... ) \
+ BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ BIT_ASSEMBLE_2 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ _field1, __VA_ARGS__ ) )
+
+#define BIT_FILL_3( _ptr, _field1, ... ) \
+ BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ BIT_ASSEMBLE_3 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ _field1, __VA_ARGS__ ) )
+
+#define BIT_FILL_4( _ptr, _field1, ... ) \
+ BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ BIT_ASSEMBLE_4 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ _field1, __VA_ARGS__ ) )
+
+#define BIT_FILL_5( _ptr, _field1, ... ) \
+ BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ BIT_ASSEMBLE_5 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ _field1, __VA_ARGS__ ) )
+
+#define BIT_FILL_6( _ptr, _field1, ... ) \
+ BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ BIT_ASSEMBLE_6 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
+ _field1, __VA_ARGS__ ) )
+
+/** Extract value of named field */
+#define BIT_GET64( _ptr, _field ) \
+ ( { \
+ unsigned int __index = QWORD_OFFSET ( _ptr, _field ); \
+ uint64_t *__ptr = &(_ptr)->u.qwords[__index]; \
+ uint64_t __value = BIT64_to_cpu ( *__ptr ); \
+ __value >>= \
+ QWORD_BIT_OFFSET ( _ptr, __index, _field ); \
+ __value &= BIT_MASK ( _ptr, _field ); \
+ __value; \
+ } )
+
+/** Extract value of named field (for fields up to the size of a long) */
+#define BIT_GET( _ptr, _field ) \
+ ( ( unsigned long ) BIT_GET64 ( _ptr, _field ) )
-void set_bit ( unsigned int bit, volatile void *bits );
-void clear_bit ( unsigned int bit, volatile void *bits );
-int test_and_set_bit ( unsigned int bit, volatile void *bits );
-int test_and_clear_bit ( unsigned int bit, volatile void *bits );
+#define BIT_SET( _ptr, _field, _value ) do { \
+ unsigned int __index = QWORD_OFFSET ( _ptr, _field ); \
+ uint64_t *__ptr = &(_ptr)->u.qwords[__index]; \
+ unsigned int __shift = \
+ QWORD_BIT_OFFSET ( _ptr, __index, _field ); \
+ uint64_t __value = (_value); \
+ *__ptr &= cpu_to_BIT64 ( ~( BIT_MASK ( _ptr, _field ) << \
+ __shift ) ); \
+ *__ptr |= cpu_to_BIT64 ( __value << __shift ); \
+ } while ( 0 )
#endif /* _IPXE_BITOPS_H */
diff --git a/roms/ipxe/src/include/ipxe/cdc.h b/roms/ipxe/src/include/ipxe/cdc.h
index b8b4a59d9..f1799cd9a 100644
--- a/roms/ipxe/src/include/ipxe/cdc.h
+++ b/roms/ipxe/src/include/ipxe/cdc.h
@@ -14,16 +14,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** Class code for communications devices */
#define USB_CLASS_CDC 2
-/** Send encapsulated command */
-#define CDC_SEND_ENCAPSULATED_COMMAND \
- ( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
- USB_REQUEST_TYPE ( 0x00 ) )
-
-/** Get encapsulated response */
-#define CDC_GET_ENCAPSULATED_RESPONSE \
- ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
- USB_REQUEST_TYPE ( 0x01 ) )
-
/** Union functional descriptor */
struct cdc_union_descriptor {
/** Descriptor header */
@@ -40,11 +30,6 @@ struct cdc_union_descriptor {
/** Ethernet descriptor subtype */
#define CDC_SUBTYPE_ETHERNET 15
-/** Response available */
-#define CDC_RESPONSE_AVAILABLE \
- ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
- USB_REQUEST_TYPE ( 0x01 ) )
-
/** Network connection notification */
#define CDC_NETWORK_CONNECTION \
( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
@@ -67,38 +52,4 @@ extern struct cdc_union_descriptor *
cdc_union_descriptor ( struct usb_configuration_descriptor *config,
struct usb_interface_descriptor *interface );
-/**
- * Send encapsulated command
- *
- * @v usb USB device
- * @v interface Interface number
- * @v data Command
- * @v len Length of command
- * @ret rc Return status code
- */
-static inline __attribute__ (( always_inline )) int
-cdc_send_encapsulated_command ( struct usb_device *usb, unsigned int interface,
- void *data, size_t len ) {
-
- return usb_control ( usb, CDC_SEND_ENCAPSULATED_COMMAND, 0, interface,
- data, len );
-}
-
-/**
-* Get encapsulated response
-*
-* @v usb USB device
-* @v interface Interface number
-* @v data Response buffer
-* @v len Length of response buffer
-* @ret rc Return status code
-*/
-static inline __attribute__ (( always_inline )) int
-cdc_get_encapsulated_response ( struct usb_device *usb, unsigned int interface,
- void *data, size_t len ) {
-
- return usb_control ( usb, CDC_GET_ENCAPSULATED_RESPONSE, 0, interface,
- data, len );
-}
-
#endif /* _IPXE_CDC_H */
diff --git a/roms/ipxe/src/include/ipxe/dhcp.h b/roms/ipxe/src/include/ipxe/dhcp.h
index 693aa7e73..a11db3497 100644
--- a/roms/ipxe/src/include/ipxe/dhcp.h
+++ b/roms/ipxe/src/include/ipxe/dhcp.h
@@ -266,16 +266,12 @@ enum dhcp_client_architecture_values {
DHCP_CLIENT_ARCHITECTURE_LC = 0x0005,
/** EFI IA32 */
DHCP_CLIENT_ARCHITECTURE_IA32 = 0x0006,
- /** EFI x86-64 */
- DHCP_CLIENT_ARCHITECTURE_X86_64 = 0x0007,
+ /** EFI BC */
+ DHCP_CLIENT_ARCHITECTURE_EFI = 0x0007,
/** EFI Xscale */
DHCP_CLIENT_ARCHITECTURE_XSCALE = 0x0008,
- /** EFI BC */
- DHCP_CLIENT_ARCHITECTURE_EFI = 0x0009,
- /** EFI 32-bit ARM */
- DHCP_CLIENT_ARCHITECTURE_ARM32 = 0x000a,
- /** EFI 64-bit ARM */
- DHCP_CLIENT_ARCHITECTURE_ARM64 = 0x000b,
+ /** EFI x86-64 */
+ DHCP_CLIENT_ARCHITECTURE_X86_64 = 0x0009,
};
/** Client network device interface */
@@ -407,12 +403,12 @@ struct dhcp_netdev_desc {
/** Use cached network settings (obsolete; do not reuse this value) */
#define DHCP_EB_USE_CACHED DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb2 )
-/** SAN drive number
+/** BIOS drive number
*
- * This is the drive number for a SAN-hooked drive. For BIOS, 0x80 is
+ * This is the drive number for a drive emulated via INT 13. 0x80 is
* the first hard disk, 0x81 is the second hard disk, etc.
*/
-#define DHCP_EB_SAN_DRIVE DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbd )
+#define DHCP_EB_BIOS_DRIVE DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbd )
/** Username
*
diff --git a/roms/ipxe/src/include/ipxe/efi/AArch64/ProcessorBind.h b/roms/ipxe/src/include/ipxe/efi/AArch64/ProcessorBind.h
deleted file mode 100644
index d4301726f..000000000
--- a/roms/ipxe/src/include/ipxe/efi/AArch64/ProcessorBind.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/** @file
- Processor or Compiler specific defines and types for AArch64.
-
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
- Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
-
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __PROCESSOR_BIND_H__
-#define __PROCESSOR_BIND_H__
-
-FILE_LICENCE ( BSD3 );
-
-///
-/// Define the processor type so other code can make processor based choices
-///
-#define MDE_CPU_AARCH64
-
-//
-// Make sure we are using the correct packing rules per EFI specification
-//
-#ifndef __GNUC__
-#pragma pack()
-#endif
-
-#if _MSC_EXTENSIONS
- //
- // use Microsoft* C complier dependent integer width types
- //
- typedef unsigned __int64 UINT64;
- typedef __int64 INT64;
- typedef unsigned __int32 UINT32;
- typedef __int32 INT32;
- typedef unsigned short UINT16;
- typedef unsigned short CHAR16;
- typedef short INT16;
- typedef unsigned char BOOLEAN;
- typedef unsigned char UINT8;
- typedef char CHAR8;
- typedef signed char INT8;
-#else
- //
- // Assume standard AARCH64 alignment.
- //
- typedef unsigned long long UINT64;
- typedef long long INT64;
- typedef unsigned int UINT32;
- typedef int INT32;
- typedef unsigned short UINT16;
- typedef unsigned short CHAR16;
- typedef short INT16;
- typedef unsigned char BOOLEAN;
- typedef unsigned char UINT8;
- typedef char CHAR8;
- typedef signed char INT8;
-#endif
-
-///
-/// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions,
-/// 8 bytes on supported 64-bit processor instructions)
-///
-typedef UINT64 UINTN;
-
-///
-/// Signed value of native width. (4 bytes on supported 32-bit processor instructions,
-/// 8 bytes on supported 64-bit processor instructions)
-///
-typedef INT64 INTN;
-
-//
-// Processor specific defines
-//
-
-///
-/// A value of native width with the highest bit set.
-///
-#define MAX_BIT 0x8000000000000000ULL
-
-///
-/// A value of native width with the two highest bits set.
-///
-#define MAX_2_BITS 0xC000000000000000ULL
-
-///
-/// Maximum legal AARCH64 address
-///
-#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
-
-///
-/// Maximum legal AArch64 INTN and UINTN values.
-///
-#define MAX_INTN ((INTN)0x7FFFFFFFFFFFFFFFULL)
-#define MAX_UINTN ((UINTN)0xFFFFFFFFFFFFFFFFULL)
-
-///
-/// The stack alignment required for AARCH64
-///
-#define CPU_STACK_ALIGNMENT 16
-
-//
-// Modifier to ensure that all protocol member functions and EFI intrinsics
-// use the correct C calling convention. All protocol member functions and
-// EFI intrinsics are required to modify their member functions with EFIAPI.
-//
-#define EFIAPI
-
-// When compiling with Clang, we still use GNU as for the assembler, so we still
-// need to define the GCC_ASM* macros.
-#if defined(__GNUC__) || defined(__clang__)
- ///
- /// For GNU assembly code, .global or .globl can declare global symbols.
- /// Define this macro to unify the usage.
- ///
- #define ASM_GLOBAL .globl
-
- #define GCC_ASM_EXPORT(func__) \
- .global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\
- .type ASM_PFX(func__), %function
-
- #define GCC_ASM_IMPORT(func__) \
- .extern _CONCATENATE (__USER_LABEL_PREFIX__, func__)
-
-#endif
-
-/**
- Return the pointer to the first instruction of a function given a function pointer.
- On ARM CPU architectures, these two pointer values are the same,
- so the implementation of this macro is very simple.
-
- @param FunctionPointer A pointer to a function.
-
- @return The pointer to the first instruction of a function given a function pointer.
-
-**/
-#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__
-#endif
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Arm/ProcessorBind.h b/roms/ipxe/src/include/ipxe/efi/Arm/ProcessorBind.h
deleted file mode 100644
index 51a727145..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Arm/ProcessorBind.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/** @file
- Processor or Compiler specific defines and types for ARM.
-
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __PROCESSOR_BIND_H__
-#define __PROCESSOR_BIND_H__
-
-FILE_LICENCE ( BSD3 );
-
-///
-/// Define the processor type so other code can make processor based choices
-///
-#define MDE_CPU_ARM
-
-//
-// Make sure we are using the correct packing rules per EFI specification
-//
-#ifndef __GNUC__
-#pragma pack()
-#endif
-
-#if _MSC_EXTENSIONS
- //
- // use Microsoft* C complier dependent integer width types
- //
- typedef unsigned __int64 UINT64;
- typedef __int64 INT64;
- typedef unsigned __int32 UINT32;
- typedef __int32 INT32;
- typedef unsigned short UINT16;
- typedef unsigned short CHAR16;
- typedef short INT16;
- typedef unsigned char BOOLEAN;
- typedef unsigned char UINT8;
- typedef char CHAR8;
- typedef signed char INT8;
-#else
- //
- // Assume standard ARM alignment.
- // Need to check portability of long long
- //
- typedef unsigned long long UINT64;
- typedef long long INT64;
- typedef unsigned int UINT32;
- typedef int INT32;
- typedef unsigned short UINT16;
- typedef unsigned short CHAR16;
- typedef short INT16;
- typedef unsigned char BOOLEAN;
- typedef unsigned char UINT8;
- typedef char CHAR8;
- typedef signed char INT8;
-#endif
-
-///
-/// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions,
-/// 8 bytes on supported 64-bit processor instructions)
-///
-typedef UINT32 UINTN;
-
-///
-/// Signed value of native width. (4 bytes on supported 32-bit processor instructions,
-/// 8 bytes on supported 64-bit processor instructions)
-///
-typedef INT32 INTN;
-
-//
-// Processor specific defines
-//
-
-///
-/// A value of native width with the highest bit set.
-///
-#define MAX_BIT 0x80000000
-
-///
-/// A value of native width with the two highest bits set.
-///
-#define MAX_2_BITS 0xC0000000
-
-///
-/// Maximum legal ARM address
-///
-#define MAX_ADDRESS 0xFFFFFFFF
-
-///
-/// Maximum legal ARM INTN and UINTN values.
-///
-#define MAX_INTN ((INTN)0x7FFFFFFF)
-#define MAX_UINTN ((UINTN)0xFFFFFFFF)
-
-///
-/// The stack alignment required for ARM
-///
-#define CPU_STACK_ALIGNMENT sizeof(UINT64)
-
-//
-// Modifier to ensure that all protocol member functions and EFI intrinsics
-// use the correct C calling convention. All protocol member functions and
-// EFI intrinsics are required to modify their member functions with EFIAPI.
-//
-#define EFIAPI
-
-// When compiling with Clang, we still use GNU as for the assembler, so we still
-// need to define the GCC_ASM* macros.
-#if defined(__GNUC__) || defined(__clang__)
- ///
- /// For GNU assembly code, .global or .globl can declare global symbols.
- /// Define this macro to unify the usage.
- ///
- #define ASM_GLOBAL .globl
-
- #if !defined(__APPLE__)
- ///
- /// ARM EABI defines that the linker should not manipulate call relocations
- /// (do bl/blx conversion) unless the target symbol has function type.
- /// CodeSourcery 2010.09 started requiring the .type to function properly
- ///
- #define INTERWORK_FUNC(func__) .type ASM_PFX(func__), %function
-
- #define GCC_ASM_EXPORT(func__) \
- .global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\
- .type ASM_PFX(func__), %function
-
- #define GCC_ASM_IMPORT(func__) \
- .extern _CONCATENATE (__USER_LABEL_PREFIX__, func__)
-
- #else
- //
- // .type not supported by Apple Xcode tools
- //
- #define INTERWORK_FUNC(func__)
-
- #define GCC_ASM_EXPORT(func__) \
- .globl _CONCATENATE (__USER_LABEL_PREFIX__, func__) \
-
- #define GCC_ASM_IMPORT(name)
-
- #endif
-#endif
-
-/**
- Return the pointer to the first instruction of a function given a function pointer.
- On ARM CPU architectures, these two pointer values are the same,
- so the implementation of this macro is very simple.
-
- @param FunctionPointer A pointer to a function.
-
- @return The pointer to the first instruction of a function given a function pointer.
-
-**/
-#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__
-#endif
-
-#endif
-
-
diff --git a/roms/ipxe/src/include/ipxe/efi/Base.h b/roms/ipxe/src/include/ipxe/efi/Base.h
index 8a047aef0..844f428f1 100644
--- a/roms/ipxe/src/include/ipxe/efi/Base.h
+++ b/roms/ipxe/src/include/ipxe/efi/Base.h
@@ -6,7 +6,7 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -29,12 +29,6 @@ FILE_LICENCE ( BSD3 );
//
#include <ipxe/efi/ProcessorBind.h>
-#if defined(_MSC_EXTENSIONS)
-//
-// Disable warning when last field of data structure is a zero sized array.
-//
-#pragma warning ( disable : 4200 )
-#endif
/**
Verifies the storage size of a given data type.
@@ -943,11 +937,6 @@ typedef UINTN RETURN_STATUS;
#define RETURN_COMPROMISED_DATA ENCODE_ERROR (33)
///
-/// A HTTP error occurred during the network operation.
-///
-#define RETURN_HTTP_ERROR ENCODE_ERROR (35)
-
-///
/// The string contained one or more characters that
/// the device could not render and were skipped.
///
@@ -976,12 +965,6 @@ typedef UINTN RETURN_STATUS;
///
#define RETURN_WARN_STALE_DATA ENCODE_WARNING (5)
-///
-/// The resulting buffer contains UEFI-compliant file system.
-///
-#define RETURN_WARN_FILE_SYSTEM ENCODE_WARNING (6)
-
-
/**
Returns a 16-bit signature built from 2 ASCII characters.
@@ -1035,46 +1018,5 @@ typedef UINTN RETURN_STATUS;
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
(SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))
-#if defined(_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC)
- #pragma intrinsic(_ReturnAddress)
- /**
- Get the return address of the calling funcation.
-
- Based on intrinsic function _ReturnAddress that provides the address of
- the instruction in the calling function that will be executed after
- control returns to the caller.
-
- @param L Return Level.
-
- @return The return address of the calling funcation or 0 if L != 0.
-
- **/
- #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
-#elif defined(__GNUC__)
- void * __builtin_return_address (unsigned int level);
- /**
- Get the return address of the calling funcation.
-
- Based on built-in Function __builtin_return_address that returns
- the return address of the current function, or of one of its callers.
-
- @param L Return Level.
-
- @return The return address of the calling funcation.
-
- **/
- #define RETURN_ADDRESS(L) __builtin_return_address (L)
-#else
- /**
- Get the return address of the calling funcation.
-
- @param L Return Level.
-
- @return 0 as compilers don't support this feature.
-
- **/
- #define RETURN_ADDRESS(L) ((VOID *) 0)
-#endif
-
#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Guid/SmBios.h b/roms/ipxe/src/include/ipxe/efi/Guid/SmBios.h
index 49142897a..cc4a1f946 100644
--- a/roms/ipxe/src/include/ipxe/efi/Guid/SmBios.h
+++ b/roms/ipxe/src/include/ipxe/efi/Guid/SmBios.h
@@ -1,11 +1,11 @@
/** @file
- GUIDs used to locate the SMBIOS tables in the UEFI 2.5 system table.
+ GUIDs used to locate the SMBIOS tables in the UEFI 2.0 system table.
- These GUIDs in the system table are the only legal ways to search for and
+ This GUID in the system table is the only legal way to search for and
locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
tables.
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+ 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
@@ -15,7 +15,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
- GUIDs defined in UEFI 2.5 spec.
+ GUIDs defined in UEFI 2.0 spec.
**/
@@ -29,12 +29,6 @@ FILE_LICENCE ( BSD3 );
0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
-#define SMBIOS3_TABLE_GUID \
- { \
- 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \
- }
-
extern EFI_GUID gEfiSmbiosTableGuid;
-extern EFI_GUID gEfiSmbios3TableGuid;
#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Ia32/ProcessorBind.h b/roms/ipxe/src/include/ipxe/efi/Ia32/ProcessorBind.h
index 375ff2d92..16e30b358 100644
--- a/roms/ipxe/src/include/ipxe/efi/Ia32/ProcessorBind.h
+++ b/roms/ipxe/src/include/ipxe/efi/Ia32/ProcessorBind.h
@@ -1,7 +1,7 @@
/** @file
Processor or Compiler specific defines and types for IA-32 architecture.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -95,26 +95,6 @@ FILE_LICENCE ( BSD3 );
//
#pragma warning ( disable : 4206 )
-#if _MSC_VER == 1800 || _MSC_VER == 1900
-
-//
-// Disable these warnings for VS2013.
-//
-
-//
-// This warning is for potentially uninitialized local variable, and it may cause false
-// positive issues in VS2013 and VS2015 build
-//
-#pragma warning ( disable : 4701 )
-
-//
-// This warning is for potentially uninitialized local pointer variable, and it may cause
-// false positive issues in VS2013 and VS2015 build
-//
-#pragma warning ( disable : 4703 )
-
-#endif
-
#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi20.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi20.h
deleted file mode 100644
index f5ff44c9c..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi20.h
+++ /dev/null
@@ -1,547 +0,0 @@
-/** @file
- ACPI 2.0 definitions from the ACPI Specification, revision 2.0
-
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef _ACPI_2_0_H_
-#define _ACPI_2_0_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Acpi10.h>
-
-//
-// Define for Desriptor
-//
-#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02
-
-#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// Generic Register Descriptor
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AddressSize;
- UINT64 RegisterAddress;
-} EFI_ACPI_GENERIC_REGISTER_DESCRIPTOR;
-
-#pragma pack()
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// ACPI 2.0 Generic Address Space definition
-///
-typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 Reserved;
- UINT64 Address;
-} EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE;
-
-//
-// Generic Address Space Address IDs
-//
-#define EFI_ACPI_2_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_2_0_SYSTEM_IO 1
-#define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_2_0_SMBUS 4
-#define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
-
-//
-// ACPI 2.0 table structures
-//
-
-///
-/// Root System Description Pointer Structure
-///
-typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
-} EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
-
-///
-/// RSD_PTR Revision (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02
-
-///
-/// Common table header, this prefaces all ACPI tables, including FACS, but
-/// excluding the RSD PTR structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_2_0_COMMON_HEADER;
-
-//
-// Root System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
-//
-
-///
-/// RSDT Revision (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-//
-// Extended System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
-//
-
-///
-/// XSDT Revision (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Fixed ACPI Description Table Structure (FADT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
-} EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE;
-
-///
-/// FADT Version (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03
-
-//
-// Fixed ACPI Description Table Preferred Power Management Profile
-//
-#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6
-
-//
-// Fixed ACPI Description Table Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_2_0_8042 BIT1
-
-//
-// Fixed ACPI Description Table Fixed Feature Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_2_0_WBINVD BIT0
-#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_2_0_PROC_C1 BIT2
-#define EFI_ACPI_2_0_P_LVL2_UP BIT3
-#define EFI_ACPI_2_0_PWR_BUTTON BIT4
-#define EFI_ACPI_2_0_SLP_BUTTON BIT5
-#define EFI_ACPI_2_0_FIX_RTC BIT6
-#define EFI_ACPI_2_0_RTC_S4 BIT7
-#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_2_0_DCK_CAP BIT9
-#define EFI_ACPI_2_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_2_0_SEALED_CASE BIT11
-#define EFI_ACPI_2_0_HEADLESS BIT12
-#define EFI_ACPI_2_0_CPU_SW_SLP BIT13
-
-///
-/// Firmware ACPI Control Structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved[31];
-} EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
-
-///
-/// FACS Version (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
-
-///
-/// Firmware Control Structure Feature Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_2_0_S4BIOS_F BIT0
-
-///
-/// Multiple APIC Description Table header definition. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
-} EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
-
-///
-/// MADT Revision (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Multiple APIC Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_2_0_PCAT_COMPAT BIT0
-
-//
-// Multiple APIC Description Table APIC structure types
-// All other values between 0x09 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00
-#define EFI_ACPI_2_0_IO_APIC 0x01
-#define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02
-#define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
-#define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04
-#define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
-#define EFI_ACPI_2_0_IO_SAPIC 0x06
-#define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07
-#define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08
-
-//
-// APIC Structure Definitions
-//
-
-///
-/// Processor Local APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
-} EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
-
-///
-/// Local APIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0
-
-///
-/// IO APIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
-} EFI_ACPI_2_0_IO_APIC_STRUCTURE;
-
-///
-/// Interrupt Source Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
-} EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
-
-///
-/// Non-Maskable Interrupt Source Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
-} EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
-
-///
-/// Local APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
-} EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE;
-
-///
-/// Local APIC Address Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
-} EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
-
-///
-/// IO SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
-} EFI_ACPI_2_0_IO_SAPIC_STRUCTURE;
-
-///
-/// Local SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
-} EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 Reserved;
-} EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
-
-///
-/// Smart Battery Description Table (SBST)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
-} EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE;
-
-///
-/// SBST Version (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Embedded Controller Boot Resources Table (ECDT)
-/// The table is followed by a null terminated ASCII string that contains
-/// a fully qualified reference to the name space object.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
-} EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
-
-///
-/// ECDT Version (as defined in ACPI 2.0 spec.)
-///
-#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
-
-//
-// Known table signatures
-//
-
-///
-/// "RSD PTR " Root System Description Pointer
-///
-#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-
-///
-/// "SPIC" Multiple SAPIC Description Table
-///
-/// BUGBUG: Don't know where this came from except SR870BN4 uses it.
-/// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053
-///
-#define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "BOOT" MS Simple Boot Spec
-///
-#define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
-
-///
-/// "DBGP" MS Bebug Port Spec
-///
-#define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
-
-///
-/// "DSDT" Differentiated System Description Table
-///
-#define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
-
-///
-/// "ECDT" Embedded Controller Boot Resources Table
-///
-#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
-
-///
-/// "ETDT" Event Timer Description Table
-///
-#define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
-
-///
-/// "FACS" Firmware ACPI Control Structure
-///
-#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
-
-///
-/// "FACP" Fixed ACPI Description Table
-///
-#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
-
-///
-/// "APIC" Multiple APIC Description Table
-///
-#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "PSDT" Persistent System Description Table
-///
-#define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
-
-///
-/// "RSDT" Root System Description Table
-///
-#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
-
-///
-/// "SBST" Smart Battery Specification Table
-///
-#define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
-
-///
-/// "SLIT" System Locality Information Table
-///
-#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
-
-///
-/// "SPCR" Serial Port Concole Redirection Table
-///
-#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
-
-///
-/// "SRAT" Static Resource Affinity Table
-///
-#define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
-
-///
-/// "SSDT" Secondary System Description Table
-///
-#define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
-
-///
-/// "SPMI" Server Platform Management Interface Table
-///
-#define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
-
-///
-/// "XSDT" Extended System Description Table
-///
-#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
-
-///
-/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
-///
-#define EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi30.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi30.h
deleted file mode 100644
index abaa72128..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi30.h
+++ /dev/null
@@ -1,731 +0,0 @@
-/** @file
- ACPI 3.0 definitions from the ACPI Specification Revision 3.0b October 10, 2006
-
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef _ACPI_3_0_H_
-#define _ACPI_3_0_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Acpi20.h>
-
-//
-// Define for Desriptor
-//
-#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B
-
-#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR 0x8B
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// Extended Address Space Descriptor
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 ResType;
- UINT8 GenFlag;
- UINT8 SpecificFlag;
- UINT8 RevisionId;
- UINT8 Reserved;
- UINT64 AddrSpaceGranularity;
- UINT64 AddrRangeMin;
- UINT64 AddrRangeMax;
- UINT64 AddrTranslationOffset;
- UINT64 AddrLen;
- UINT64 TypeSpecificAttribute;
-} EFI_ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR;
-
-#pragma pack()
-
-//
-// Memory Type Specific Flags
-//
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC 0x0000000000000001
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC 0x0000000000000002
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT 0x0000000000000004
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB 0x0000000000000008
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010
-#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV 0x0000000000008000
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// ACPI 3.0 Generic Address Space definition
-///
-typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
-} EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE;
-
-//
-// Generic Address Space Address IDs
-//
-#define EFI_ACPI_3_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_3_0_SYSTEM_IO 1
-#define EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_3_0_SMBUS 4
-#define EFI_ACPI_3_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
-
-//
-// Generic Address Space Access Sizes
-//
-#define EFI_ACPI_3_0_UNDEFINED 0
-#define EFI_ACPI_3_0_BYTE 1
-#define EFI_ACPI_3_0_WORD 2
-#define EFI_ACPI_3_0_DWORD 3
-#define EFI_ACPI_3_0_QWORD 4
-
-//
-// ACPI 3.0 table structures
-//
-
-///
-/// Root System Description Pointer Structure
-///
-typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
-} EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
-
-///
-/// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
-///
-#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
-
-///
-/// Common table header, this prefaces all ACPI tables, including FACS, but
-/// excluding the RSD PTR structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_3_0_COMMON_HEADER;
-
-//
-// Root System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
-//
-
-///
-/// RSDT Revision (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-//
-// Extended System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
-//
-
-///
-/// XSDT Revision (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Fixed ACPI Description Table Structure (FADT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
-} EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE;
-
-///
-/// FADT Version (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
-
-//
-// Fixed ACPI Description Table Preferred Power Management Profile
-//
-#define EFI_ACPI_3_0_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_3_0_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_3_0_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_3_0_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_3_0_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_3_0_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_3_0_PM_PROFILE_APPLIANCE_PC 6
-#define EFI_ACPI_3_0_PM_PROFILE_PERFORMANCE_SERVER 7
-
-//
-// Fixed ACPI Description Table Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_3_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_3_0_8042 BIT1
-#define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4
-
-//
-// Fixed ACPI Description Table Fixed Feature Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_3_0_WBINVD BIT0
-#define EFI_ACPI_3_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_3_0_PROC_C1 BIT2
-#define EFI_ACPI_3_0_P_LVL2_UP BIT3
-#define EFI_ACPI_3_0_PWR_BUTTON BIT4
-#define EFI_ACPI_3_0_SLP_BUTTON BIT5
-#define EFI_ACPI_3_0_FIX_RTC BIT6
-#define EFI_ACPI_3_0_RTC_S4 BIT7
-#define EFI_ACPI_3_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_3_0_DCK_CAP BIT9
-#define EFI_ACPI_3_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_3_0_SEALED_CASE BIT11
-#define EFI_ACPI_3_0_HEADLESS BIT12
-#define EFI_ACPI_3_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_3_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-
-///
-/// Firmware ACPI Control Structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved[31];
-} EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
-
-///
-/// FACS Version (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01
-
-///
-/// Firmware Control Structure Feature Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_3_0_S4BIOS_F BIT0
-
-//
-// Differentiated System Description Table,
-// Secondary System Description Table
-// and Persistent System Description Table,
-// no definition needed as they are common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
-//
-#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Multiple APIC Description Table header definition. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
-} EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
-
-///
-/// MADT Revision (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Multiple APIC Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_3_0_PCAT_COMPAT BIT0
-
-//
-// Multiple APIC Description Table APIC structure types
-// All other values between 0x09 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC 0x00
-#define EFI_ACPI_3_0_IO_APIC 0x01
-#define EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE 0x02
-#define EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
-#define EFI_ACPI_3_0_LOCAL_APIC_NMI 0x04
-#define EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
-#define EFI_ACPI_3_0_IO_SAPIC 0x06
-#define EFI_ACPI_3_0_LOCAL_SAPIC 0x07
-#define EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES 0x08
-
-//
-// APIC Structure Definitions
-//
-
-///
-/// Processor Local APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
-} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
-
-///
-/// Local APIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0
-
-///
-/// IO APIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
-} EFI_ACPI_3_0_IO_APIC_STRUCTURE;
-
-///
-/// Interrupt Source Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
-} EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
-} EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
-
-//
-// MPS INTI flags.
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_3_0_POLARITY (3 << 0)
-#define EFI_ACPI_3_0_TRIGGER_MODE (3 << 2)
-
-///
-/// Non-Maskable Interrupt Source Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
-} EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
-
-///
-/// Local APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
-} EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE;
-
-///
-/// Local APIC Address Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
-} EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
-
-///
-/// IO SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
-} EFI_ACPI_3_0_IO_SAPIC_STRUCTURE;
-
-///
-/// Local SAPIC Structure
-/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
-} EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
-} EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
-
-///
-/// Platform Interrupt Source Flags.
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0
-
-///
-/// Smart Battery Description Table (SBST)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
-} EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE;
-
-///
-/// SBST Version (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Embedded Controller Boot Resources Table (ECDT)
-/// The table is followed by a null terminated ASCII string that contains
-/// a fully qualified reference to the name space object.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
-} EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
-
-///
-/// ECDT Version (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
-
-///
-/// System Resource Affinity Table (SRAT. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
-} EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
-
-///
-/// SRAT Version (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x02
-
-//
-// SRAT structure types.
-// All other values between 0x02 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
-#define EFI_ACPI_3_0_MEMORY_AFFINITY 0x01
-
-///
-/// Processor Local APIC/SAPIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT8 Reserved[4];
-} EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
-
-///
-/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
-
-///
-/// Memory Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
-} EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE;
-
-//
-// Memory Flags. All other bits are reserved and must be 0.
-//
-#define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2)
-
-///
-/// System Locality Distance Information Table (SLIT).
-/// The rest of the table is a matrix.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
-} EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
-
-///
-/// SLIT Version (as defined in ACPI 3.0 spec.)
-///
-#define EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
-
-//
-// Known table signatures
-//
-
-///
-/// "RSD PTR " Root System Description Pointer
-///
-#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-
-///
-/// "APIC" Multiple APIC Description Table
-///
-#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "DSDT" Differentiated System Description Table
-///
-#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
-
-///
-/// "ECDT" Embedded Controller Boot Resources Table
-///
-#define EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
-
-///
-/// "FACP" Fixed ACPI Description Table
-///
-#define EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
-
-///
-/// "FACS" Firmware ACPI Control Structure
-///
-#define EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
-
-///
-/// "PSDT" Persistent System Description Table
-///
-#define EFI_ACPI_3_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
-
-///
-/// "RSDT" Root System Description Table
-///
-#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
-
-///
-/// "SBST" Smart Battery Specification Table
-///
-#define EFI_ACPI_3_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
-
-///
-/// "SLIT" System Locality Information Table
-///
-#define EFI_ACPI_3_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
-
-///
-/// "SRAT" System Resource Affinity Table
-///
-#define EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
-
-///
-/// "SSDT" Secondary System Description Table
-///
-#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
-
-///
-/// "XSDT" Extended System Description Table
-///
-#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
-
-///
-/// "BOOT" MS Simple Boot Spec
-///
-#define EFI_ACPI_3_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
-
-///
-/// "CPEP" Corrected Platform Error Polling Table
-///
-#define EFI_ACPI_3_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
-
-///
-/// "DBGP" MS Debug Port Spec
-///
-#define EFI_ACPI_3_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
-
-///
-/// "ETDT" Event Timer Description Table
-///
-#define EFI_ACPI_3_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
-
-///
-/// "HPET" IA-PC High Precision Event Timer Table
-///
-#define EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
-
-///
-/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
-///
-#define EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
-
-///
-/// "SPCR" Serial Port Concole Redirection Table
-///
-#define EFI_ACPI_3_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
-
-///
-/// "SPMI" Server Platform Management Interface Table
-///
-#define EFI_ACPI_3_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
-
-///
-/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
-///
-#define EFI_ACPI_3_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
-
-///
-/// "WDRT" Watchdog Resource Table
-///
-#define EFI_ACPI_3_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
-
-///
-/// "WDAT" Watchdog Action Table
-///
-#define EFI_ACPI_3_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
-
-///
-/// "WSPT" Windows Specific Properties Table
-///
-#define EFI_ACPI_3_0_WINDOWS_SPECIFIC_PROPERTIES_TABLE_SIGNATURE SIGNATURE_32('W', 'S', 'P', 'T')
-
-///
-/// "iBFT" iSCSI Boot Firmware Table
-///
-#define EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi40.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi40.h
deleted file mode 100644
index 5fcad3e42..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi40.h
+++ /dev/null
@@ -1,1311 +0,0 @@
-/** @file
- ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
-
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef _ACPI_4_0_H_
-#define _ACPI_4_0_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Acpi30.h>
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// ACPI 4.0 Generic Address Space definition
-///
-typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
-} EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE;
-
-//
-// Generic Address Space Address IDs
-//
-#define EFI_ACPI_4_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_4_0_SYSTEM_IO 1
-#define EFI_ACPI_4_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_4_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_4_0_SMBUS 4
-#define EFI_ACPI_4_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
-
-//
-// Generic Address Space Access Sizes
-//
-#define EFI_ACPI_4_0_UNDEFINED 0
-#define EFI_ACPI_4_0_BYTE 1
-#define EFI_ACPI_4_0_WORD 2
-#define EFI_ACPI_4_0_DWORD 3
-#define EFI_ACPI_4_0_QWORD 4
-
-//
-// ACPI 4.0 table structures
-//
-
-///
-/// Root System Description Pointer Structure
-///
-typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
-} EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
-
-///
-/// RSD_PTR Revision (as defined in ACPI 4.0b spec.)
-///
-#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 4.0a) says current value is 2
-
-///
-/// Common table header, this prefaces all ACPI tables, including FACS, but
-/// excluding the RSD PTR structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_4_0_COMMON_HEADER;
-
-//
-// Root System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
-//
-
-///
-/// RSDT Revision (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-//
-// Extended System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
-//
-
-///
-/// XSDT Revision (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Fixed ACPI Description Table Structure (FADT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
-} EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE;
-
-///
-/// FADT Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x04
-
-//
-// Fixed ACPI Description Table Preferred Power Management Profile
-//
-#define EFI_ACPI_4_0_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_4_0_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_4_0_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_4_0_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_4_0_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_4_0_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_4_0_PM_PROFILE_APPLIANCE_PC 6
-#define EFI_ACPI_4_0_PM_PROFILE_PERFORMANCE_SERVER 7
-
-//
-// Fixed ACPI Description Table Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_4_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_4_0_8042 BIT1
-#define EFI_ACPI_4_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_4_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS BIT4
-
-//
-// Fixed ACPI Description Table Fixed Feature Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_4_0_WBINVD BIT0
-#define EFI_ACPI_4_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_4_0_PROC_C1 BIT2
-#define EFI_ACPI_4_0_P_LVL2_UP BIT3
-#define EFI_ACPI_4_0_PWR_BUTTON BIT4
-#define EFI_ACPI_4_0_SLP_BUTTON BIT5
-#define EFI_ACPI_4_0_FIX_RTC BIT6
-#define EFI_ACPI_4_0_RTC_S4 BIT7
-#define EFI_ACPI_4_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_4_0_DCK_CAP BIT9
-#define EFI_ACPI_4_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_4_0_SEALED_CASE BIT11
-#define EFI_ACPI_4_0_HEADLESS BIT12
-#define EFI_ACPI_4_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_4_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_4_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_4_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-
-///
-/// Firmware ACPI Control Structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
-} EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
-
-///
-/// FACS Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x02
-
-///
-/// Firmware Control Structure Feature Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_4_0_S4BIOS_F BIT0
-#define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F BIT1
-
-///
-/// OSPM Enabled Firmware Control Structure Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F BIT0
-
-//
-// Differentiated System Description Table,
-// Secondary System Description Table
-// and Persistent System Description Table,
-// no definition needed as they are common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
-//
-#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Multiple APIC Description Table header definition. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
-} EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
-
-///
-/// MADT Revision (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
-
-///
-/// Multiple APIC Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_4_0_PCAT_COMPAT BIT0
-
-//
-// Multiple APIC Description Table APIC structure types
-// All other values between 0x0B an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC 0x00
-#define EFI_ACPI_4_0_IO_APIC 0x01
-#define EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE 0x02
-#define EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
-#define EFI_ACPI_4_0_LOCAL_APIC_NMI 0x04
-#define EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
-#define EFI_ACPI_4_0_IO_SAPIC 0x06
-#define EFI_ACPI_4_0_LOCAL_SAPIC 0x07
-#define EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES 0x08
-#define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC 0x09
-#define EFI_ACPI_4_0_LOCAL_X2APIC_NMI 0x0A
-
-//
-// APIC Structure Definitions
-//
-
-///
-/// Processor Local APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
-} EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
-
-///
-/// Local APIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_4_0_LOCAL_APIC_ENABLED BIT0
-
-///
-/// IO APIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
-} EFI_ACPI_4_0_IO_APIC_STRUCTURE;
-
-///
-/// Interrupt Source Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
-} EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
-} EFI_ACPI_4_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
-
-//
-// MPS INTI flags.
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_4_0_POLARITY (3 << 0)
-#define EFI_ACPI_4_0_TRIGGER_MODE (3 << 2)
-
-///
-/// Non-Maskable Interrupt Source Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
-} EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
-
-///
-/// Local APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
-} EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE;
-
-///
-/// Local APIC Address Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
-} EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
-
-///
-/// IO SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
-} EFI_ACPI_4_0_IO_SAPIC_STRUCTURE;
-
-///
-/// Local SAPIC Structure
-/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
-} EFI_ACPI_4_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
-} EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
-
-///
-/// Platform Interrupt Source Flags.
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE BIT0
-
-///
-/// Processor Local x2APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
-} EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
-
-///
-/// Local x2APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
-} EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE;
-
-///
-/// Smart Battery Description Table (SBST)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
-} EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE;
-
-///
-/// SBST Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Embedded Controller Boot Resources Table (ECDT)
-/// The table is followed by a null terminated ASCII string that contains
-/// a fully qualified reference to the name space object.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
-} EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
-
-///
-/// ECDT Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
-
-///
-/// System Resource Affinity Table (SRAT. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
-} EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
-
-///
-/// SRAT Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x03
-
-//
-// SRAT structure types.
-// All other values between 0x03 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
-#define EFI_ACPI_4_0_MEMORY_AFFINITY 0x01
-#define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY 0x02
-
-///
-/// Processor Local APIC/SAPIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
-} EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
-
-///
-/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
-
-///
-/// Memory Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
-} EFI_ACPI_4_0_MEMORY_AFFINITY_STRUCTURE;
-
-//
-// Memory Flags. All other bits are reserved and must be 0.
-//
-#define EFI_ACPI_4_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_4_0_MEMORY_NONVOLATILE (1 << 2)
-
-///
-/// Processor Local x2APIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
-} EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
-
-///
-/// System Locality Distance Information Table (SLIT).
-/// The rest of the table is a matrix.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
-} EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
-
-///
-/// SLIT Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
-
-///
-/// Corrected Platform Error Polling Table (CPEP)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
-} EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
-
-///
-/// CPEP Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
-
-//
-// CPEP processor structure types.
-//
-#define EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC 0x00
-
-///
-/// Corrected Platform Error Polling Processor Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
-} EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
-
-///
-/// Maximum System Characteristics Table (MSCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
-} EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
-
-///
-/// MSCT Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
-
-///
-/// Maximum Proximity Domain Information Structure Definition
-///
-typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
-} EFI_ACPI_4_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
-
-///
-/// Boot Error Record Table (BERT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
-} EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_HEADER;
-
-///
-/// BERT Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
-
-///
-/// Boot Error Region Block Status Definition
-///
-typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
-} EFI_ACPI_4_0_ERROR_BLOCK_STATUS;
-
-///
-/// Boot Error Region Definition
-///
-typedef struct {
- EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_4_0_BOOT_ERROR_REGION_STRUCTURE;
-
-//
-// Boot Error Severity types
-//
-#define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTABLE 0x00
-#define EFI_ACPI_4_0_ERROR_SEVERITY_FATAL 0x01
-#define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTED 0x02
-#define EFI_ACPI_4_0_ERROR_SEVERITY_NONE 0x03
-
-///
-/// Generic Error Data Entry Definition
-///
-typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
-} EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
-
-///
-/// Generic Error Data Entry Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_REVISION 0x0201
-
-///
-/// HEST - Hardware Error Source Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
-} EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
-
-///
-/// HEST Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
-
-//
-// Error Source structure types.
-//
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION 0x00
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK 0x01
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR 0x02
-#define EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER 0x06
-#define EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER 0x07
-#define EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER 0x08
-#define EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR 0x09
-
-//
-// Error Source structure flags.
-//
-#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
-
-///
-/// IA-32 Architecture Machine Check Exception Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
-} EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure Definition
-///
-typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
-} EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure MCA data format
-///
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
-
-//
-// Hardware Error Notification types. All other values are reserved
-//
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
-
-///
-/// Hardware Error Notification Configuration Write Enable Structure Definition
-///
-typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
-} EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
-
-///
-/// Hardware Error Notification Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
-} EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
-
-///
-/// IA-32 Architecture Corrected Machine Check Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
-} EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
-
-///
-/// IA-32 Architecture NMI Error Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
-} EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
-
-///
-/// PCI Express Root Port AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
-} EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
-
-///
-/// PCI Express Device AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
-
-///
-/// PCI Express Bridge AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
-
-///
-/// Generic Hardware Error Source Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
-} EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
-
-///
-/// Generic Error Status Definition
-///
-typedef struct {
- EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_4_0_GENERIC_ERROR_STATUS_STRUCTURE;
-
-///
-/// ERST - Error Record Serialization Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
-} EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
-
-///
-/// ERST Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
-
-///
-/// ERST Serialization Actions
-///
-#define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_4_0_ERST_END_OPERATION 0x03
-#define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
-
-///
-/// ERST Action Command Status
-///
-#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_4_0_EINJ_STATUS_FAILED 0x03
-#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND 0x05
-
-///
-/// ERST Serialization Instructions
-///
-#define EFI_ACPI_4_0_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_4_0_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_4_0_ERST_NOOP 0x04
-#define EFI_ACPI_4_0_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_4_0_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_4_0_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_4_0_ERST_ADD 0x08
-#define EFI_ACPI_4_0_ERST_SUBTRACT 0x09
-#define EFI_ACPI_4_0_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_4_0_ERST_STALL 0x0C
-#define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_4_0_ERST_GOTO 0x0F
-#define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_4_0_ERST_MOVE_DATA 0x12
-
-///
-/// ERST Instruction Flags
-///
-#define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER 0x01
-
-///
-/// ERST Serialization Instruction Entry
-///
-typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_4_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ - Error Injection Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
-} EFI_ACPI_4_0_ERROR_INJECTION_TABLE_HEADER;
-
-///
-/// EINJ Version (as defined in ACPI 4.0 spec.)
-///
-#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01
-
-///
-/// EINJ Error Injection Actions
-///
-#define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_4_0_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR 0xFF
-
-///
-/// EINJ Action Command Status
-///
-#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS 0x02
-
-///
-/// EINJ Error Type Definition
-///
-#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
-
-///
-/// EINJ Injection Instructions
-///
-#define EFI_ACPI_4_0_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_4_0_EINJ_NOOP 0x04
-
-///
-/// EINJ Instruction Flags
-///
-#define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER 0x01
-
-///
-/// EINJ Injection Instruction Entry
-///
-typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_4_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ Trigger Action Table
-///
-typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
-} EFI_ACPI_4_0_EINJ_TRIGGER_ACTION_TABLE;
-
-//
-// Known table signatures
-//
-
-///
-/// "RSD PTR " Root System Description Pointer
-///
-#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-
-///
-/// "APIC" Multiple APIC Description Table
-///
-#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "BERT" Boot Error Record Table
-///
-#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE SIGNATURE_32('B', 'E', 'R', 'T')
-
-///
-/// "CPEP" Corrected Platform Error Polling Table
-///
-#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
-
-///
-/// "DSDT" Differentiated System Description Table
-///
-#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
-
-///
-/// "ECDT" Embedded Controller Boot Resources Table
-///
-#define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
-
-///
-/// "EINJ" Error Injection Table
-///
-#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_SIGNATURE SIGNATURE_32('E', 'I', 'N', 'J')
-
-///
-/// "ERST" Error Record Serialization Table
-///
-#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE SIGNATURE_32('E', 'R', 'S', 'T')
-
-///
-/// "FACP" Fixed ACPI Description Table
-///
-#define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
-
-///
-/// "FACS" Firmware ACPI Control Structure
-///
-#define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
-
-///
-/// "HEST" Hardware Error Source Table
-///
-#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE SIGNATURE_32('H', 'E', 'S', 'T')
-
-///
-/// "MSCT" Maximum System Characteristics Table
-///
-#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'C', 'T')
-
-///
-/// "PSDT" Persistent System Description Table
-///
-#define EFI_ACPI_4_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
-
-///
-/// "RSDT" Root System Description Table
-///
-#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
-
-///
-/// "SBST" Smart Battery Specification Table
-///
-#define EFI_ACPI_4_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
-
-///
-/// "SLIT" System Locality Information Table
-///
-#define EFI_ACPI_4_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
-
-///
-/// "SRAT" System Resource Affinity Table
-///
-#define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
-
-///
-/// "SSDT" Secondary System Description Table
-///
-#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
-
-///
-/// "XSDT" Extended System Description Table
-///
-#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
-
-///
-/// "BOOT" MS Simple Boot Spec
-///
-#define EFI_ACPI_4_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
-
-///
-/// "DBGP" MS Debug Port Spec
-///
-#define EFI_ACPI_4_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
-
-///
-/// "DMAR" DMA Remapping Table
-///
-#define EFI_ACPI_4_0_DMA_REMAPPING_TABLE_SIGNATURE SIGNATURE_32('D', 'M', 'A', 'R')
-
-///
-/// "ETDT" Event Timer Description Table
-///
-#define EFI_ACPI_4_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
-
-///
-/// "HPET" IA-PC High Precision Event Timer Table
-///
-#define EFI_ACPI_4_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
-
-///
-/// "iBFT" iSCSI Boot Firmware Table
-///
-#define EFI_ACPI_4_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
-
-///
-/// "IVRS" I/O Virtualization Reporting Structure
-///
-#define EFI_ACPI_4_0_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE SIGNATURE_32('I', 'V', 'R', 'S')
-
-///
-/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
-///
-#define EFI_ACPI_4_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
-
-///
-/// "MCHI" Management Controller Host Interface Table
-///
-#define EFI_ACPI_4_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'H', 'I')
-
-///
-/// "SPCR" Serial Port Concole Redirection Table
-///
-#define EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
-
-///
-/// "SPMI" Server Platform Management Interface Table
-///
-#define EFI_ACPI_4_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
-
-///
-/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
-///
-#define EFI_ACPI_4_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
-
-///
-/// "UEFI" UEFI ACPI Data Table
-///
-#define EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE SIGNATURE_32('U', 'E', 'F', 'I')
-
-///
-/// "WAET" Windows ACPI Enlightenment Table
-///
-#define EFI_ACPI_4_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T')
-
-///
-/// "WDAT" Watchdog Action Table
-///
-#define EFI_ACPI_4_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
-
-///
-/// "WDRT" Watchdog Resource Table
-///
-#define EFI_ACPI_4_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi50.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi50.h
deleted file mode 100644
index df9e71531..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi50.h
+++ /dev/null
@@ -1,2121 +0,0 @@
-/** @file
- ACPI 5.0 definitions from the ACPI Specification Revision 5.0a November 13, 2013.
-
- Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef _ACPI_5_0_H_
-#define _ACPI_5_0_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Acpi40.h>
-
-//
-// Define for Desriptor
-//
-#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME 0x0A
-#define ACPI_LARGE_GPIO_CONNECTION_DESCRIPTOR_NAME 0x0C
-#define ACPI_LARGE_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR_NAME 0x0E
-
-#define ACPI_FIXED_DMA_DESCRIPTOR 0x55
-#define ACPI_GPIO_CONNECTION_DESCRIPTOR 0x8C
-#define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR 0x8E
-
-#pragma pack(1)
-
-///
-/// Generic DMA Descriptor.
-///
-typedef PACKED struct {
- ACPI_SMALL_RESOURCE_HEADER Header;
- UINT16 DmaRequestLine;
- UINT16 DmaChannel;
- UINT8 DmaTransferWidth;
-} EFI_ACPI_FIXED_DMA_DESCRIPTOR;
-
-///
-/// GPIO Connection Descriptor
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 RevisionId;
- UINT8 ConnectionType;
- UINT16 GeneralFlags;
- UINT16 InterruptFlags;
- UINT8 PinConfiguration;
- UINT16 OutputDriveStrength;
- UINT16 DebounceTimeout;
- UINT16 PinTableOffset;
- UINT8 ResourceSourceIndex;
- UINT16 ResourceSourceNameOffset;
- UINT16 VendorDataOffset;
- UINT16 VendorDataLength;
-} EFI_ACPI_GPIO_CONNECTION_DESCRIPTOR;
-
-#define EFI_ACPI_GPIO_CONNECTION_TYPE_INTERRUPT 0x0
-#define EFI_ACPI_GPIO_CONNECTION_TYPE_IO 0x1
-
-///
-/// Serial Bus Resource Descriptor (Generic)
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 RevisionId;
- UINT8 ResourceSourceIndex;
- UINT8 SerialBusType;
- UINT8 GeneralFlags;
- UINT16 TypeSpecificFlags;
- UINT8 TypeSpecificRevisionId;
- UINT16 TypeDataLength;
-// Type specific data
-} EFI_ACPI_SERIAL_BUS_RESOURCE_DESCRIPTOR;
-
-#define EFI_ACPI_SERIAL_BUS_RESOURCE_TYPE_I2C 0x1
-#define EFI_ACPI_SERIAL_BUS_RESOURCE_TYPE_SPI 0x2
-#define EFI_ACPI_SERIAL_BUS_RESOURCE_TYPE_UART 0x3
-
-///
-/// Serial Bus Resource Descriptor (I2C)
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 RevisionId;
- UINT8 ResourceSourceIndex;
- UINT8 SerialBusType;
- UINT8 GeneralFlags;
- UINT16 TypeSpecificFlags;
- UINT8 TypeSpecificRevisionId;
- UINT16 TypeDataLength;
- UINT32 ConnectionSpeed;
- UINT16 SlaveAddress;
-} EFI_ACPI_SERIAL_BUS_RESOURCE_I2C_DESCRIPTOR;
-
-///
-/// Serial Bus Resource Descriptor (SPI)
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 RevisionId;
- UINT8 ResourceSourceIndex;
- UINT8 SerialBusType;
- UINT8 GeneralFlags;
- UINT16 TypeSpecificFlags;
- UINT8 TypeSpecificRevisionId;
- UINT16 TypeDataLength;
- UINT32 ConnectionSpeed;
- UINT8 DataBitLength;
- UINT8 Phase;
- UINT8 Polarity;
- UINT16 DeviceSelection;
-} EFI_ACPI_SERIAL_BUS_RESOURCE_SPI_DESCRIPTOR;
-
-///
-/// Serial Bus Resource Descriptor (UART)
-///
-typedef PACKED struct {
- ACPI_LARGE_RESOURCE_HEADER Header;
- UINT8 RevisionId;
- UINT8 ResourceSourceIndex;
- UINT8 SerialBusType;
- UINT8 GeneralFlags;
- UINT16 TypeSpecificFlags;
- UINT8 TypeSpecificRevisionId;
- UINT16 TypeDataLength;
- UINT32 DefaultBaudRate;
- UINT16 RxFIFO;
- UINT16 TxFIFO;
- UINT8 Parity;
- UINT8 SerialLinesEnabled;
-} EFI_ACPI_SERIAL_BUS_RESOURCE_UART_DESCRIPTOR;
-
-#pragma pack()
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// ACPI 5.0 Generic Address Space definition
-///
-typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
-} EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE;
-
-//
-// Generic Address Space Address IDs
-//
-#define EFI_ACPI_5_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_5_0_SYSTEM_IO 1
-#define EFI_ACPI_5_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_5_0_SMBUS 4
-#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL 0x0A
-#define EFI_ACPI_5_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
-
-//
-// Generic Address Space Access Sizes
-//
-#define EFI_ACPI_5_0_UNDEFINED 0
-#define EFI_ACPI_5_0_BYTE 1
-#define EFI_ACPI_5_0_WORD 2
-#define EFI_ACPI_5_0_DWORD 3
-#define EFI_ACPI_5_0_QWORD 4
-
-//
-// ACPI 5.0 table structures
-//
-
-///
-/// Root System Description Pointer Structure
-///
-typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
-} EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
-
-///
-/// RSD_PTR Revision (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.0) says current value is 2
-
-///
-/// Common table header, this prefaces all ACPI tables, including FACS, but
-/// excluding the RSD PTR structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_5_0_COMMON_HEADER;
-
-//
-// Root System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
-//
-
-///
-/// RSDT Revision (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-//
-// Extended System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
-//
-
-///
-/// XSDT Revision (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Fixed ACPI Description Table Structure (FADT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT8 Reserved2[3];
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
-} EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE;
-
-///
-/// FADT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x05
-
-//
-// Fixed ACPI Description Table Preferred Power Management Profile
-//
-#define EFI_ACPI_5_0_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_5_0_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_5_0_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_5_0_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_5_0_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_5_0_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_5_0_PM_PROFILE_APPLIANCE_PC 6
-#define EFI_ACPI_5_0_PM_PROFILE_PERFORMANCE_SERVER 7
-#define EFI_ACPI_5_0_PM_PROFILE_TABLET 8
-
-//
-// Fixed ACPI Description Table Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_5_0_8042 BIT1
-#define EFI_ACPI_5_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_5_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_5_0_PCIE_ASPM_CONTROLS BIT4
-#define EFI_ACPI_5_0_CMOS_RTC_NOT_PRESENT BIT5
-
-//
-// Fixed ACPI Description Table Fixed Feature Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_0_WBINVD BIT0
-#define EFI_ACPI_5_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_5_0_PROC_C1 BIT2
-#define EFI_ACPI_5_0_P_LVL2_UP BIT3
-#define EFI_ACPI_5_0_PWR_BUTTON BIT4
-#define EFI_ACPI_5_0_SLP_BUTTON BIT5
-#define EFI_ACPI_5_0_FIX_RTC BIT6
-#define EFI_ACPI_5_0_RTC_S4 BIT7
-#define EFI_ACPI_5_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_5_0_DCK_CAP BIT9
-#define EFI_ACPI_5_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_5_0_SEALED_CASE BIT11
-#define EFI_ACPI_5_0_HEADLESS BIT12
-#define EFI_ACPI_5_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_5_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_5_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_5_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_5_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_5_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_5_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-#define EFI_ACPI_5_0_HW_REDUCED_ACPI BIT20
-#define EFI_ACPI_5_0_LOW_POWER_S0_IDLE_CAPABLE BIT21
-
-///
-/// Firmware ACPI Control Structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
-} EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
-
-///
-/// FACS Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x02
-
-///
-/// Firmware Control Structure Feature Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_0_S4BIOS_F BIT0
-#define EFI_ACPI_5_0_64BIT_WAKE_SUPPORTED_F BIT1
-
-///
-/// OSPM Enabled Firmware Control Structure Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_0_OSPM_64BIT_WAKE_F BIT0
-
-//
-// Differentiated System Description Table,
-// Secondary System Description Table
-// and Persistent System Description Table,
-// no definition needed as they are common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
-//
-#define EFI_ACPI_5_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_5_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Multiple APIC Description Table header definition. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
-} EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
-
-///
-/// MADT Revision (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
-
-///
-/// Multiple APIC Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_0_PCAT_COMPAT BIT0
-
-//
-// Multiple APIC Description Table APIC structure types
-// All other values between 0x0D and 0x7F are reserved and
-// will be ignored by OSPM. 0x80 ~ 0xFF are reserved for OEM.
-//
-#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC 0x00
-#define EFI_ACPI_5_0_IO_APIC 0x01
-#define EFI_ACPI_5_0_INTERRUPT_SOURCE_OVERRIDE 0x02
-#define EFI_ACPI_5_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
-#define EFI_ACPI_5_0_LOCAL_APIC_NMI 0x04
-#define EFI_ACPI_5_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
-#define EFI_ACPI_5_0_IO_SAPIC 0x06
-#define EFI_ACPI_5_0_LOCAL_SAPIC 0x07
-#define EFI_ACPI_5_0_PLATFORM_INTERRUPT_SOURCES 0x08
-#define EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC 0x09
-#define EFI_ACPI_5_0_LOCAL_X2APIC_NMI 0x0A
-#define EFI_ACPI_5_0_GIC 0x0B
-#define EFI_ACPI_5_0_GICD 0x0C
-
-//
-// APIC Structure Definitions
-//
-
-///
-/// Processor Local APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
-} EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
-
-///
-/// Local APIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_0_LOCAL_APIC_ENABLED BIT0
-
-///
-/// IO APIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
-} EFI_ACPI_5_0_IO_APIC_STRUCTURE;
-
-///
-/// Interrupt Source Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
-} EFI_ACPI_5_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
-} EFI_ACPI_5_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
-
-//
-// MPS INTI flags.
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_0_POLARITY (3 << 0)
-#define EFI_ACPI_5_0_TRIGGER_MODE (3 << 2)
-
-///
-/// Non-Maskable Interrupt Source Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
-} EFI_ACPI_5_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
-
-///
-/// Local APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
-} EFI_ACPI_5_0_LOCAL_APIC_NMI_STRUCTURE;
-
-///
-/// Local APIC Address Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
-} EFI_ACPI_5_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
-
-///
-/// IO SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
-} EFI_ACPI_5_0_IO_SAPIC_STRUCTURE;
-
-///
-/// Local SAPIC Structure
-/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
-} EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
-} EFI_ACPI_5_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
-
-///
-/// Platform Interrupt Source Flags.
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_0_CPEI_PROCESSOR_OVERRIDE BIT0
-
-///
-/// Processor Local x2APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
-} EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
-
-///
-/// Local x2APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
-} EFI_ACPI_5_0_LOCAL_X2APIC_NMI_STRUCTURE;
-
-///
-/// GIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 GicId;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ParkingProtocolVersion;
- UINT32 PerformanceInterruptGsiv;
- UINT64 ParkedAddress;
- UINT64 PhysicalBaseAddress;
-} EFI_ACPI_5_0_GIC_STRUCTURE;
-
-///
-/// GIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_0_GIC_ENABLED BIT0
-#define EFI_ACPI_5_0_PERFORMANCE_INTERRUPT_MODEL BIT1
-
-///
-/// GIC Distributor Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicId;
- UINT64 PhysicalBaseAddress;
- UINT32 SystemVectorBase;
- UINT32 Reserved2;
-} EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE;
-
-///
-/// Smart Battery Description Table (SBST)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
-} EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE;
-
-///
-/// SBST Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Embedded Controller Boot Resources Table (ECDT)
-/// The table is followed by a null terminated ASCII string that contains
-/// a fully qualified reference to the name space object.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
-} EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
-
-///
-/// ECDT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
-
-///
-/// System Resource Affinity Table (SRAT). The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
-} EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
-
-///
-/// SRAT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x03
-
-//
-// SRAT structure types.
-// All other values between 0x03 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
-#define EFI_ACPI_5_0_MEMORY_AFFINITY 0x01
-#define EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY 0x02
-
-///
-/// Processor Local APIC/SAPIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
-} EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
-
-///
-/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
-
-///
-/// Memory Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
-} EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE;
-
-//
-// Memory Flags. All other bits are reserved and must be 0.
-//
-#define EFI_ACPI_5_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_5_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_5_0_MEMORY_NONVOLATILE (1 << 2)
-
-///
-/// Processor Local x2APIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
-} EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
-
-///
-/// System Locality Distance Information Table (SLIT).
-/// The rest of the table is a matrix.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
-} EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
-
-///
-/// SLIT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
-
-///
-/// Corrected Platform Error Polling Table (CPEP)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
-} EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
-
-///
-/// CPEP Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
-
-//
-// CPEP processor structure types.
-//
-#define EFI_ACPI_5_0_CPEP_PROCESSOR_APIC_SAPIC 0x00
-
-///
-/// Corrected Platform Error Polling Processor Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
-} EFI_ACPI_5_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
-
-///
-/// Maximum System Characteristics Table (MSCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
-} EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
-
-///
-/// MSCT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
-
-///
-/// Maximum Proximity Domain Information Structure Definition
-///
-typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
-} EFI_ACPI_5_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
-
-///
-/// ACPI RAS Feature Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier[12];
-} EFI_ACPI_5_0_RAS_FEATURE_TABLE;
-
-///
-/// RASF Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_RAS_FEATURE_TABLE_REVISION 0x01
-
-///
-/// ACPI RASF Platform Communication Channel Shared Memory Region definition.
-///
-typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT16 Version;
- UINT8 RASCapabilities[16];
- UINT8 SetRASCapabilities[16];
- UINT16 NumberOfRASFParameterBlocks;
- UINT32 SetRASCapabilitiesStatus;
-} EFI_ACPI_5_0_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
-
-///
-/// ACPI RASF PCC command code
-///
-#define EFI_ACPI_5_0_RASF_PCC_COMMAND_CODE_EXECUTE_RASF_COMMAND 0x01
-
-///
-/// ACPI RASF Platform RAS Capabilities
-///
-#define EFI_ACPI_5_0_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED 0x01
-#define EFI_ACPI_5_0_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED_AND_EXPOSED_TO_SOFTWARE 0x02
-
-///
-/// ACPI RASF Parameter Block structure for PATROL_SCRUB
-///
-typedef struct {
- UINT16 Type;
- UINT16 Version;
- UINT16 Length;
- UINT16 PatrolScrubCommand;
- UINT64 RequestedAddressRange[2];
- UINT64 ActualAddressRange[2];
- UINT16 Flags;
- UINT8 RequestedSpeed;
-} EFI_ACPI_5_0_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
-
-///
-/// ACPI RASF Patrol Scrub command
-///
-#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
-#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
-#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
-
-///
-/// Memory Power State Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier;
- UINT8 Reserved[3];
-// Memory Power Node Structure
-// Memory Power State Characteristics
-} EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE;
-
-///
-/// MPST Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01
-
-///
-/// MPST Platform Communication Channel Shared Memory Region definition.
-///
-typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT32 MemoryPowerCommandRegister;
- UINT32 MemoryPowerStatusRegister;
- UINT32 PowerStateId;
- UINT32 MemoryPowerNodeId;
- UINT64 MemoryEnergyConsumed;
- UINT64 ExpectedAveragePowerComsuned;
-} EFI_ACPI_5_0_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
-
-///
-/// ACPI MPST PCC command code
-///
-#define EFI_ACPI_5_0_MPST_PCC_COMMAND_CODE_EXECUTE_MPST_COMMAND 0x03
-
-///
-/// ACPI MPST Memory Power command
-///
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
-
-///
-/// MPST Memory Power Node Table
-///
-typedef struct {
- UINT8 PowerStateValue;
- UINT8 PowerStateInformationIndex;
-} EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE;
-
-typedef struct {
- UINT8 Flag;
- UINT8 Reserved;
- UINT16 MemoryPowerNodeId;
- UINT32 Length;
- UINT64 AddressBase;
- UINT64 AddressLength;
- UINT32 NumberOfPowerStates;
- UINT32 NumberOfPhysicalComponents;
-//EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
-//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
-} EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE;
-
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
-
-typedef struct {
- UINT16 MemoryPowerNodeCount;
- UINT8 Reserved[2];
-} EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE;
-
-///
-/// MPST Memory Power State Characteristics Table
-///
-typedef struct {
- UINT8 PowerStateStructureID;
- UINT8 Flag;
- UINT16 Reserved;
- UINT32 AveragePowerConsumedInMPS0;
- UINT32 RelativePowerSavingToMPS0;
- UINT64 ExitLatencyToMPS0;
-} EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
-
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
-#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
-
-typedef struct {
- UINT16 MemoryPowerStateCharacteristicsCount;
- UINT8 Reserved[2];
-} EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
-
-///
-/// Memory Topology Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
-} EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE;
-
-///
-/// PMTT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
-
-///
-/// Common Memory Aggregator Device Structure.
-///
-typedef struct {
- UINT8 Type;
- UINT8 Reserved;
- UINT16 Length;
- UINT16 Flags;
- UINT16 Reserved1;
-} EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// Memory Aggregator Device Type
-///
-#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x1
-#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x2
-#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x3
-
-///
-/// Socket Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 SocketIdentifier;
- UINT16 Reserved;
-//EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
-} EFI_ACPI_5_0_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// MemoryController Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 OptimalAccessUnit;
- UINT16 OptimalAccessAlignment;
- UINT16 Reserved;
- UINT16 NumberOfProximityDomains;
-//UINT32 ProximityDomain[NumberOfProximityDomains];
-//EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
-} EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// DIMM Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 PhysicalComponentIdentifier;
- UINT16 Reserved;
- UINT32 SizeOfDimm;
- UINT32 SmbiosHandle;
-} EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// Boot Graphics Resource Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- ///
- /// 2-bytes (16 bit) version ID. This value must be 1.
- ///
- UINT16 Version;
- ///
- /// 1-byte status field indicating current status about the table.
- /// Bits[7:1] = Reserved (must be zero)
- /// Bit [0] = Valid. A one indicates the boot image graphic is valid.
- ///
- UINT8 Status;
- ///
- /// 1-byte enumerated type field indicating format of the image.
- /// 0 = Bitmap
- /// 1 - 255 Reserved (for future use)
- ///
- UINT8 ImageType;
- ///
- /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
- /// of the image bitmap.
- ///
- UINT64 ImageAddress;
- ///
- /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
- /// (X, Y) display offset of the top left corner of the boot image.
- /// The top left corner of the display is at offset (0, 0).
- ///
- UINT32 ImageOffsetX;
- ///
- /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
- /// (X, Y) display offset of the top left corner of the boot image.
- /// The top left corner of the display is at offset (0, 0).
- ///
- UINT32 ImageOffsetY;
-} EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE;
-
-///
-/// BGRT Revision
-///
-#define EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
-
-///
-/// BGRT Version
-///
-#define EFI_ACPI_5_0_BGRT_VERSION 0x01
-
-///
-/// BGRT Status
-///
-#define EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED 0x00
-#define EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED 0x01
-#define EFI_ACPI_5_0_BGRT_STATUS_INVALID EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED
-#define EFI_ACPI_5_0_BGRT_STATUS_VALID EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED
-
-///
-/// BGRT Image Type
-///
-#define EFI_ACPI_5_0_BGRT_IMAGE_TYPE_BMP 0x00
-
-///
-/// FPDT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
-
-///
-/// FPDT Performance Record Types
-///
-#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
-#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
-
-///
-/// FPDT Performance Record Revision
-///
-#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
-#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
-
-///
-/// FPDT Runtime Performance Record Types
-///
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
-
-///
-/// FPDT Runtime Performance Record Revision
-///
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_REVISION_S3_RESUME 0x01
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_REVISION_S3_SUSPEND 0x01
-#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_REVISION_FIRMWARE_BASIC_BOOT 0x02
-
-///
-/// FPDT Performance Record header
-///
-typedef struct {
- UINT16 Type;
- UINT8 Length;
- UINT8 Revision;
-} EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER;
-
-///
-/// FPDT Performance Table header
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER;
-
-///
-/// FPDT Firmware Basic Boot Performance Pointer Record Structure
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// 64-bit processor-relative physical address of the Basic Boot Performance Table.
- ///
- UINT64 BootPerformanceTablePointer;
-} EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
-
-///
-/// FPDT S3 Performance Table Pointer Record Structure
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// 64-bit processor-relative physical address of the S3 Performance Table.
- ///
- UINT64 S3PerformanceTablePointer;
-} EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
-
-///
-/// FPDT Firmware Basic Boot Performance Record Structure
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// Timer value logged at the beginning of firmware image execution.
- /// This may not always be zero or near zero.
- ///
- UINT64 ResetEnd;
- ///
- /// Timer value logged just prior to loading the OS boot loader into memory.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 OsLoaderLoadImageStart;
- ///
- /// Timer value logged just prior to launching the previously loaded OS boot loader image.
- /// For non-UEFI compatible boots, the timer value logged will be just prior
- /// to the INT 19h handler invocation.
- ///
- UINT64 OsLoaderStartImageStart;
- ///
- /// Timer value logged at the point when the OS loader calls the
- /// ExitBootServices function for UEFI compatible firmware.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 ExitBootServicesEntry;
- ///
- /// Timer value logged at the point just prior towhen the OS loader gaining
- /// control back from calls the ExitBootServices function for UEFI compatible firmware.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 ExitBootServicesExit;
-} EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
-
-///
-/// FPDT Firmware Basic Boot Performance Table signature
-///
-#define EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_SIGNATURE SIGNATURE_32('F', 'B', 'P', 'T')
-
-//
-// FPDT Firmware Basic Boot Performance Table
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
- //
- // one or more Performance Records.
- //
-} EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_TABLE;
-
-///
-/// FPDT "S3PT" S3 Performance Table
-///
-#define EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_SIGNATURE SIGNATURE_32('S', '3', 'P', 'T')
-
-//
-// FPDT Firmware S3 Boot Performance Table
-//
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
- //
- // one or more Performance Records.
- //
-} EFI_ACPI_5_0_FPDT_FIRMWARE_S3_BOOT_TABLE;
-
-///
-/// FPDT Basic S3 Resume Performance Record
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// A count of the number of S3 resume cycles since the last full boot sequence.
- ///
- UINT32 ResumeCount;
- ///
- /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
- /// OS waking vector. Only the most recent resume cycle's time is retained.
- ///
- UINT64 FullResume;
- ///
- /// Average timer value of all resume cycles logged since the last full boot
- /// sequence, including the most recent resume. Note that the entire log of
- /// timer values does not need to be retained in order to calculate this average.
- ///
- UINT64 AverageResume;
-} EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD;
-
-///
-/// FPDT Basic S3 Suspend Performance Record
-///
-typedef struct {
- EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
- /// Only the most recent suspend cycle's timer value is retained.
- ///
- UINT64 SuspendStart;
- ///
- /// Timer value recorded at the final firmware write to SLP_TYP (or other
- /// mechanism) used to trigger hardware entry to S3.
- /// Only the most recent suspend cycle's timer value is retained.
- ///
- UINT64 SuspendEnd;
-} EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD;
-
-///
-/// Firmware Performance Record Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
-} EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_RECORD_TABLE;
-
-///
-/// Generic Timer Description Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 PhysicalAddress;
- UINT32 GlobalFlags;
- UINT32 SecurePL1TimerGSIV;
- UINT32 SecurePL1TimerFlags;
- UINT32 NonSecurePL1TimerGSIV;
- UINT32 NonSecurePL1TimerFlags;
- UINT32 VirtualTimerGSIV;
- UINT32 VirtualTimerFlags;
- UINT32 NonSecurePL2TimerGSIV;
- UINT32 NonSecurePL2TimerFlags;
-} EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE;
-
-///
-/// GTDT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Global Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_MEMORY_MAPPED_BLOCK_PRESENT BIT0
-#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_INTERRUPT_MODE BIT1
-
-///
-/// Timer Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-
-///
-/// Boot Error Record Table (BERT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
-} EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_HEADER;
-
-///
-/// BERT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
-
-///
-/// Boot Error Region Block Status Definition
-///
-typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
-} EFI_ACPI_5_0_ERROR_BLOCK_STATUS;
-
-///
-/// Boot Error Region Definition
-///
-typedef struct {
- EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_5_0_BOOT_ERROR_REGION_STRUCTURE;
-
-//
-// Boot Error Severity types
-//
-#define EFI_ACPI_5_0_ERROR_SEVERITY_CORRECTABLE 0x00
-#define EFI_ACPI_5_0_ERROR_SEVERITY_FATAL 0x01
-#define EFI_ACPI_5_0_ERROR_SEVERITY_CORRECTED 0x02
-#define EFI_ACPI_5_0_ERROR_SEVERITY_NONE 0x03
-
-///
-/// Generic Error Data Entry Definition
-///
-typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
-} EFI_ACPI_5_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
-
-///
-/// Generic Error Data Entry Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_GENERIC_ERROR_DATA_ENTRY_REVISION 0x0201
-
-///
-/// HEST - Hardware Error Source Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
-} EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
-
-///
-/// HEST Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
-
-//
-// Error Source structure types.
-//
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION 0x00
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK 0x01
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_NMI_ERROR 0x02
-#define EFI_ACPI_5_0_PCI_EXPRESS_ROOT_PORT_AER 0x06
-#define EFI_ACPI_5_0_PCI_EXPRESS_DEVICE_AER 0x07
-#define EFI_ACPI_5_0_PCI_EXPRESS_BRIDGE_AER 0x08
-#define EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR 0x09
-
-//
-// Error Source structure flags.
-//
-#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
-
-///
-/// IA-32 Architecture Machine Check Exception Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
-} EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure Definition
-///
-typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
-} EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure MCA data format
-///
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
-
-//
-// Hardware Error Notification types. All other values are reserved
-//
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
-
-///
-/// Hardware Error Notification Configuration Write Enable Structure Definition
-///
-typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
-} EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
-
-///
-/// Hardware Error Notification Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
-} EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
-
-///
-/// IA-32 Architecture Corrected Machine Check Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
-} EFI_ACPI_5_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
-
-///
-/// IA-32 Architecture NMI Error Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
-} EFI_ACPI_5_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
-
-///
-/// PCI Express Root Port AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
-} EFI_ACPI_5_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
-
-///
-/// PCI Express Device AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_5_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
-
-///
-/// PCI Express Bridge AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_5_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
-
-///
-/// Generic Hardware Error Source Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
-} EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
-
-///
-/// Generic Error Status Definition
-///
-typedef struct {
- EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_5_0_GENERIC_ERROR_STATUS_STRUCTURE;
-
-///
-/// ERST - Error Record Serialization Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
-} EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
-
-///
-/// ERST Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
-
-///
-/// ERST Serialization Actions
-///
-#define EFI_ACPI_5_0_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_5_0_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_5_0_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_5_0_ERST_END_OPERATION 0x03
-#define EFI_ACPI_5_0_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_5_0_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_0_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_0_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_0_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_5_0_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_5_0_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_5_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
-
-///
-/// ERST Action Command Status
-///
-#define EFI_ACPI_5_0_ERST_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_5_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_5_0_ERST_STATUS_FAILED 0x03
-#define EFI_ACPI_5_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_5_0_ERST_STATUS_RECORD_NOT_FOUND 0x05
-
-///
-/// ERST Serialization Instructions
-///
-#define EFI_ACPI_5_0_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_5_0_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_0_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_0_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_0_ERST_NOOP 0x04
-#define EFI_ACPI_5_0_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_5_0_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_5_0_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_5_0_ERST_ADD 0x08
-#define EFI_ACPI_5_0_ERST_SUBTRACT 0x09
-#define EFI_ACPI_5_0_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_5_0_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_5_0_ERST_STALL 0x0C
-#define EFI_ACPI_5_0_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_5_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_5_0_ERST_GOTO 0x0F
-#define EFI_ACPI_5_0_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_5_0_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_5_0_ERST_MOVE_DATA 0x12
-
-///
-/// ERST Instruction Flags
-///
-#define EFI_ACPI_5_0_ERST_PRESERVE_REGISTER 0x01
-
-///
-/// ERST Serialization Instruction Entry
-///
-typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_5_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ - Error Injection Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
-} EFI_ACPI_5_0_ERROR_INJECTION_TABLE_HEADER;
-
-///
-/// EINJ Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION 0x01
-
-///
-/// EINJ Error Injection Actions
-///
-#define EFI_ACPI_5_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_5_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_5_0_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_5_0_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_5_0_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_5_0_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_0_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_0_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_0_EINJ_TRIGGER_ERROR 0xFF
-
-///
-/// EINJ Action Command Status
-///
-#define EFI_ACPI_5_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_5_0_EINJ_STATUS_INVALID_ACCESS 0x02
-
-///
-/// EINJ Error Type Definition
-///
-#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
-
-///
-/// EINJ Injection Instructions
-///
-#define EFI_ACPI_5_0_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_5_0_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_0_EINJ_NOOP 0x04
-
-///
-/// EINJ Instruction Flags
-///
-#define EFI_ACPI_5_0_EINJ_PRESERVE_REGISTER 0x01
-
-///
-/// EINJ Injection Instruction Entry
-///
-typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_5_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ Trigger Action Table
-///
-typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
-} EFI_ACPI_5_0_EINJ_TRIGGER_ACTION_TABLE;
-
-///
-/// Platform Communications Channel Table (PCCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Flags;
- UINT64 Reserved;
-} EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
-
-///
-/// PCCT Version (as defined in ACPI 5.0 spec.)
-///
-#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
-
-///
-/// PCCT Global Flags
-///
-#define EFI_ACPI_5_0_PCCT_FLAGS_SCI_DOORBELL BIT0
-
-//
-// PCCT Subspace type
-//
-#define EFI_ACPI_5_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00
-
-///
-/// PCC Subspace Structure Header
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
-} EFI_ACPI_5_0_PCCT_SUBSPACE_HEADER;
-
-///
-/// Generic Communications Subspace Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[6];
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
-} EFI_ACPI_5_0_PCCT_SUBSPACE_GENERIC;
-
-///
-/// Generic Communications Channel Shared Memory Region
-///
-
-typedef struct {
- UINT8 Command;
- UINT8 Reserved:7;
- UINT8 GenerateSci:1;
-} EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
-
-typedef struct {
- UINT8 CommandComplete:1;
- UINT8 SciDoorbell:1;
- UINT8 Error:1;
- UINT8 PlatformNotification:1;
- UINT8 Reserved:4;
- UINT8 Reserved1;
-} EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
-
-typedef struct {
- UINT32 Signature;
- EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND Command;
- EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status;
-} EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER;
-
-//
-// Known table signatures
-//
-
-///
-/// "RSD PTR " Root System Description Pointer
-///
-#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-
-///
-/// "APIC" Multiple APIC Description Table
-///
-#define EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "BERT" Boot Error Record Table
-///
-#define EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE SIGNATURE_32('B', 'E', 'R', 'T')
-
-///
-/// "BGRT" Boot Graphics Resource Table
-///
-#define EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('B', 'G', 'R', 'T')
-
-///
-/// "CPEP" Corrected Platform Error Polling Table
-///
-#define EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
-
-///
-/// "DSDT" Differentiated System Description Table
-///
-#define EFI_ACPI_5_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
-
-///
-/// "ECDT" Embedded Controller Boot Resources Table
-///
-#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
-
-///
-/// "EINJ" Error Injection Table
-///
-#define EFI_ACPI_5_0_ERROR_INJECTION_TABLE_SIGNATURE SIGNATURE_32('E', 'I', 'N', 'J')
-
-///
-/// "ERST" Error Record Serialization Table
-///
-#define EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE SIGNATURE_32('E', 'R', 'S', 'T')
-
-///
-/// "FACP" Fixed ACPI Description Table
-///
-#define EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
-
-///
-/// "FACS" Firmware ACPI Control Structure
-///
-#define EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
-
-///
-/// "FPDT" Firmware Performance Data Table
-///
-#define EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE SIGNATURE_32('F', 'P', 'D', 'T')
-
-///
-/// "GTDT" Generic Timer Description Table
-///
-#define EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('G', 'T', 'D', 'T')
-
-///
-/// "HEST" Hardware Error Source Table
-///
-#define EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE SIGNATURE_32('H', 'E', 'S', 'T')
-
-///
-/// "MPST" Memory Power State Table
-///
-#define EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_SIGNATURE SIGNATURE_32('M', 'P', 'S', 'T')
-
-///
-/// "MSCT" Maximum System Characteristics Table
-///
-#define EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'C', 'T')
-
-///
-/// "PMTT" Platform Memory Topology Table
-///
-#define EFI_ACPI_5_0_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE SIGNATURE_32('P', 'M', 'T', 'T')
-
-///
-/// "PSDT" Persistent System Description Table
-///
-#define EFI_ACPI_5_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
-
-///
-/// "RASF" ACPI RAS Feature Table
-///
-#define EFI_ACPI_5_0_ACPI_RAS_FEATURE_TABLE_SIGNATURE SIGNATURE_32('R', 'A', 'S', 'F')
-
-///
-/// "RSDT" Root System Description Table
-///
-#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
-
-///
-/// "SBST" Smart Battery Specification Table
-///
-#define EFI_ACPI_5_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
-
-///
-/// "SLIT" System Locality Information Table
-///
-#define EFI_ACPI_5_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
-
-///
-/// "SRAT" System Resource Affinity Table
-///
-#define EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
-
-///
-/// "SSDT" Secondary System Description Table
-///
-#define EFI_ACPI_5_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
-
-///
-/// "XSDT" Extended System Description Table
-///
-#define EFI_ACPI_5_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
-
-///
-/// "BOOT" MS Simple Boot Spec
-///
-#define EFI_ACPI_5_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
-
-///
-/// "CSRT" MS Core System Resource Table
-///
-#define EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('C', 'S', 'R', 'T')
-
-///
-/// "DBG2" MS Debug Port 2 Spec
-///
-#define EFI_ACPI_5_0_DEBUG_PORT_2_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', '2')
-
-///
-/// "DBGP" MS Debug Port Spec
-///
-#define EFI_ACPI_5_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
-
-///
-/// "DMAR" DMA Remapping Table
-///
-#define EFI_ACPI_5_0_DMA_REMAPPING_TABLE_SIGNATURE SIGNATURE_32('D', 'M', 'A', 'R')
-
-///
-/// "DRTM" Dynamic Root of Trust for Measurement Table
-///
-#define EFI_ACPI_5_0_DYNAMIC_ROOT_OF_TRUST_FOR_MEASUREMENT_TABLE_SIGNATURE SIGNATURE_32('D', 'R', 'T', 'M')
-
-///
-/// "ETDT" Event Timer Description Table
-///
-#define EFI_ACPI_5_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
-
-///
-/// "HPET" IA-PC High Precision Event Timer Table
-///
-#define EFI_ACPI_5_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
-
-///
-/// "iBFT" iSCSI Boot Firmware Table
-///
-#define EFI_ACPI_5_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
-
-///
-/// "IVRS" I/O Virtualization Reporting Structure
-///
-#define EFI_ACPI_5_0_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE SIGNATURE_32('I', 'V', 'R', 'S')
-
-///
-/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
-///
-#define EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
-
-///
-/// "MCHI" Management Controller Host Interface Table
-///
-#define EFI_ACPI_5_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'H', 'I')
-
-///
-/// "MSDM" MS Data Management Table
-///
-#define EFI_ACPI_5_0_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
-
-///
-/// "SLIC" MS Software Licensing Table Specification
-///
-#define EFI_ACPI_5_0_SOFTWARE_LICENSING_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'C')
-
-///
-/// "SPCR" Serial Port Concole Redirection Table
-///
-#define EFI_ACPI_5_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
-
-///
-/// "SPMI" Server Platform Management Interface Table
-///
-#define EFI_ACPI_5_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
-
-///
-/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
-///
-#define EFI_ACPI_5_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
-
-///
-/// "TPM2" Trusted Computing Platform 1 Table
-///
-#define EFI_ACPI_5_0_TRUSTED_COMPUTING_PLATFORM_2_TABLE_SIGNATURE SIGNATURE_32('T', 'P', 'M', '2')
-
-///
-/// "UEFI" UEFI ACPI Data Table
-///
-#define EFI_ACPI_5_0_UEFI_ACPI_DATA_TABLE_SIGNATURE SIGNATURE_32('U', 'E', 'F', 'I')
-
-///
-/// "WAET" Windows ACPI Emulated Devices Table
-///
-#define EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T')
-#define EFI_ACPI_5_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE
-
-///
-/// "WDAT" Watchdog Action Table
-///
-#define EFI_ACPI_5_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
-
-///
-/// "WDRT" Watchdog Resource Table
-///
-#define EFI_ACPI_5_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
-
-///
-/// "WPBT" MS Platform Binary Table
-///
-#define EFI_ACPI_5_0_PLATFORM_BINARY_TABLE_SIGNATURE SIGNATURE_32('W', 'P', 'B', 'T')
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi51.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi51.h
deleted file mode 100644
index b00613942..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi51.h
+++ /dev/null
@@ -1,2141 +0,0 @@
-/** @file
- ACPI 5.1 definitions from the ACPI Specification Revision 5.1 July, 2014.
-
- Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
- (C) Copyright 2015 Hewlett Packard Enterprise Development LP<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.
-**/
-
-#ifndef _ACPI_5_1_H_
-#define _ACPI_5_1_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Acpi50.h>
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// ACPI 5.1 Generic Address Space definition
-///
-typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
-} EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE;
-
-//
-// Generic Address Space Address IDs
-//
-#define EFI_ACPI_5_1_SYSTEM_MEMORY 0
-#define EFI_ACPI_5_1_SYSTEM_IO 1
-#define EFI_ACPI_5_1_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_5_1_SMBUS 4
-#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A
-#define EFI_ACPI_5_1_FUNCTIONAL_FIXED_HARDWARE 0x7F
-
-//
-// Generic Address Space Access Sizes
-//
-#define EFI_ACPI_5_1_UNDEFINED 0
-#define EFI_ACPI_5_1_BYTE 1
-#define EFI_ACPI_5_1_WORD 2
-#define EFI_ACPI_5_1_DWORD 3
-#define EFI_ACPI_5_1_QWORD 4
-
-//
-// ACPI 5.1 table structures
-//
-
-///
-/// Root System Description Pointer Structure
-///
-typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
-} EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER;
-
-///
-/// RSD_PTR Revision (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.1) says current value is 2
-
-///
-/// Common table header, this prefaces all ACPI tables, including FACS, but
-/// excluding the RSD PTR structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_5_1_COMMON_HEADER;
-
-//
-// Root System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
-//
-
-///
-/// RSDT Revision (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-//
-// Extended System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
-//
-
-///
-/// XSDT Revision (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Fixed ACPI Description Table Structure (FADT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT16 ArmBootArch;
- UINT8 MinorVersion;
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
-} EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE;
-
-///
-/// FADT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x05
-#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x01
-
-//
-// Fixed ACPI Description Table Preferred Power Management Profile
-//
-#define EFI_ACPI_5_1_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_5_1_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_5_1_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_5_1_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_5_1_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_5_1_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_5_1_PM_PROFILE_APPLIANCE_PC 6
-#define EFI_ACPI_5_1_PM_PROFILE_PERFORMANCE_SERVER 7
-#define EFI_ACPI_5_1_PM_PROFILE_TABLET 8
-
-//
-// Fixed ACPI Description Table Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_1_LEGACY_DEVICES BIT0
-#define EFI_ACPI_5_1_8042 BIT1
-#define EFI_ACPI_5_1_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_5_1_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_5_1_PCIE_ASPM_CONTROLS BIT4
-#define EFI_ACPI_5_1_CMOS_RTC_NOT_PRESENT BIT5
-
-//
-// Fixed ACPI Description Table Arm Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_1_ARM_PSCI_COMPLIANT BIT0
-#define EFI_ACPI_5_1_ARM_PSCI_USE_HVC BIT1
-
-//
-// Fixed ACPI Description Table Fixed Feature Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_1_WBINVD BIT0
-#define EFI_ACPI_5_1_WBINVD_FLUSH BIT1
-#define EFI_ACPI_5_1_PROC_C1 BIT2
-#define EFI_ACPI_5_1_P_LVL2_UP BIT3
-#define EFI_ACPI_5_1_PWR_BUTTON BIT4
-#define EFI_ACPI_5_1_SLP_BUTTON BIT5
-#define EFI_ACPI_5_1_FIX_RTC BIT6
-#define EFI_ACPI_5_1_RTC_S4 BIT7
-#define EFI_ACPI_5_1_TMR_VAL_EXT BIT8
-#define EFI_ACPI_5_1_DCK_CAP BIT9
-#define EFI_ACPI_5_1_RESET_REG_SUP BIT10
-#define EFI_ACPI_5_1_SEALED_CASE BIT11
-#define EFI_ACPI_5_1_HEADLESS BIT12
-#define EFI_ACPI_5_1_CPU_SW_SLP BIT13
-#define EFI_ACPI_5_1_PCI_EXP_WAK BIT14
-#define EFI_ACPI_5_1_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_5_1_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_5_1_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_5_1_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_5_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-#define EFI_ACPI_5_1_HW_REDUCED_ACPI BIT20
-#define EFI_ACPI_5_1_LOW_POWER_S0_IDLE_CAPABLE BIT21
-
-///
-/// Firmware ACPI Control Structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
-} EFI_ACPI_5_1_FIRMWARE_ACPI_CONTROL_STRUCTURE;
-
-///
-/// FACS Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x02
-
-///
-/// Firmware Control Structure Feature Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_1_S4BIOS_F BIT0
-#define EFI_ACPI_5_1_64BIT_WAKE_SUPPORTED_F BIT1
-
-///
-/// OSPM Enabled Firmware Control Structure Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_1_OSPM_64BIT_WAKE_F BIT0
-
-//
-// Differentiated System Description Table,
-// Secondary System Description Table
-// and Persistent System Description Table,
-// no definition needed as they are common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
-//
-#define EFI_ACPI_5_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_5_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Multiple APIC Description Table header definition. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
-} EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
-
-///
-/// MADT Revision (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
-
-///
-/// Multiple APIC Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_1_PCAT_COMPAT BIT0
-
-//
-// Multiple APIC Description Table APIC structure types
-// All other values between 0x0D and 0x7F are reserved and
-// will be ignored by OSPM. 0x80 ~ 0xFF are reserved for OEM.
-//
-#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC 0x00
-#define EFI_ACPI_5_1_IO_APIC 0x01
-#define EFI_ACPI_5_1_INTERRUPT_SOURCE_OVERRIDE 0x02
-#define EFI_ACPI_5_1_NON_MASKABLE_INTERRUPT_SOURCE 0x03
-#define EFI_ACPI_5_1_LOCAL_APIC_NMI 0x04
-#define EFI_ACPI_5_1_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
-#define EFI_ACPI_5_1_IO_SAPIC 0x06
-#define EFI_ACPI_5_1_LOCAL_SAPIC 0x07
-#define EFI_ACPI_5_1_PLATFORM_INTERRUPT_SOURCES 0x08
-#define EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC 0x09
-#define EFI_ACPI_5_1_LOCAL_X2APIC_NMI 0x0A
-#define EFI_ACPI_5_1_GIC 0x0B
-#define EFI_ACPI_5_1_GICD 0x0C
-#define EFI_ACPI_5_1_GIC_MSI_FRAME 0x0D
-#define EFI_ACPI_5_1_GICR 0x0E
-
-//
-// APIC Structure Definitions
-//
-
-///
-/// Processor Local APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 ApicId;
- UINT32 Flags;
-} EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_STRUCTURE;
-
-///
-/// Local APIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_LOCAL_APIC_ENABLED BIT0
-
-///
-/// IO APIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
-} EFI_ACPI_5_1_IO_APIC_STRUCTURE;
-
-///
-/// Interrupt Source Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
-} EFI_ACPI_5_1_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
-} EFI_ACPI_5_1_PLATFORM_INTERRUPT_APIC_STRUCTURE;
-
-//
-// MPS INTI flags.
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_5_1_POLARITY (3 << 0)
-#define EFI_ACPI_5_1_TRIGGER_MODE (3 << 2)
-
-///
-/// Non-Maskable Interrupt Source Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
-} EFI_ACPI_5_1_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
-
-///
-/// Local APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT16 Flags;
- UINT8 LocalApicLint;
-} EFI_ACPI_5_1_LOCAL_APIC_NMI_STRUCTURE;
-
-///
-/// Local APIC Address Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
-} EFI_ACPI_5_1_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
-
-///
-/// IO SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
-} EFI_ACPI_5_1_IO_SAPIC_STRUCTURE;
-
-///
-/// Local SAPIC Structure
-/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
-} EFI_ACPI_5_1_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
-} EFI_ACPI_5_1_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
-
-///
-/// Platform Interrupt Source Flags.
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_5_1_CPEI_PROCESSOR_OVERRIDE BIT0
-
-///
-/// Processor Local x2APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
-} EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
-
-///
-/// Local x2APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
-} EFI_ACPI_5_1_LOCAL_X2APIC_NMI_STRUCTURE;
-
-///
-/// GIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 CPUInterfaceNumber;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ParkingProtocolVersion;
- UINT32 PerformanceInterruptGsiv;
- UINT64 ParkedAddress;
- UINT64 PhysicalBaseAddress;
- UINT64 GICV;
- UINT64 GICH;
- UINT32 VGICMaintenanceInterrupt;
- UINT64 GICRBaseAddress;
- UINT64 MPIDR;
-} EFI_ACPI_5_1_GIC_STRUCTURE;
-
-///
-/// GIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_GIC_ENABLED BIT0
-#define EFI_ACPI_5_1_PERFORMANCE_INTERRUPT_MODEL BIT1
-#define EFI_ACPI_5_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2
-
-///
-/// GIC Distributor Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicId;
- UINT64 PhysicalBaseAddress;
- UINT32 SystemVectorBase;
- UINT8 GicVersion;
- UINT8 Reserved2[3];
-} EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE;
-
-///
-/// GIC Version
-///
-#define EFI_ACPI_5_1_GIC_V2 0x01
-#define EFI_ACPI_5_1_GIC_V2m 0x02
-#define EFI_ACPI_5_1_GIC_V3 0x03
-#define EFI_ACPI_5_1_GIC_V4 0x04
-
-///
-/// GIC MSI Frame Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicMsiFrameId;
- UINT64 PhysicalBaseAddress;
- UINT32 Flags;
- UINT16 SPICount;
- UINT16 SPIBase;
-} EFI_ACPI_5_1_GIC_MSI_FRAME_STRUCTURE;
-
-///
-/// GIC MSI Frame Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_SPI_COUNT_BASE_SELECT BIT0
-
-///
-/// GICR Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 DiscoveryRangeBaseAddress;
- UINT32 DiscoveryRangeLength;
-} EFI_ACPI_5_1_GICR_STRUCTURE;
-
-///
-/// Smart Battery Description Table (SBST)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
-} EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE;
-
-///
-/// SBST Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Embedded Controller Boot Resources Table (ECDT)
-/// The table is followed by a null terminated ASCII string that contains
-/// a fully qualified reference to the name space object.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
-} EFI_ACPI_5_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
-
-///
-/// ECDT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
-
-///
-/// System Resource Affinity Table (SRAT). The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
-} EFI_ACPI_5_1_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
-
-///
-/// SRAT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x03
-
-//
-// SRAT structure types.
-// All other values between 0x04 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
-#define EFI_ACPI_5_1_MEMORY_AFFINITY 0x01
-#define EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_AFFINITY 0x02
-#define EFI_ACPI_5_1_GICC_AFFINITY 0x03
-
-///
-/// Processor Local APIC/SAPIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
-} EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
-
-///
-/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
-
-///
-/// Memory Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
-} EFI_ACPI_5_1_MEMORY_AFFINITY_STRUCTURE;
-
-//
-// Memory Flags. All other bits are reserved and must be 0.
-//
-#define EFI_ACPI_5_1_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_5_1_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_5_1_MEMORY_NONVOLATILE (1 << 2)
-
-///
-/// Processor Local x2APIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
-} EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
-
-///
-/// GICC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ClockDomain;
-} EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE;
-
-///
-/// GICC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_GICC_ENABLED (1 << 0)
-
-///
-/// System Locality Distance Information Table (SLIT).
-/// The rest of the table is a matrix.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
-} EFI_ACPI_5_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
-
-///
-/// SLIT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
-
-///
-/// Corrected Platform Error Polling Table (CPEP)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
-} EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
-
-///
-/// CPEP Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
-
-//
-// CPEP processor structure types.
-//
-#define EFI_ACPI_5_1_CPEP_PROCESSOR_APIC_SAPIC 0x00
-
-///
-/// Corrected Platform Error Polling Processor Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
-} EFI_ACPI_5_1_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
-
-///
-/// Maximum System Characteristics Table (MSCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
-} EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
-
-///
-/// MSCT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
-
-///
-/// Maximum Proximity Domain Information Structure Definition
-///
-typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
-} EFI_ACPI_5_1_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
-
-///
-/// ACPI RAS Feature Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier[12];
-} EFI_ACPI_5_1_RAS_FEATURE_TABLE;
-
-///
-/// RASF Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_RAS_FEATURE_TABLE_REVISION 0x01
-
-///
-/// ACPI RASF Platform Communication Channel Shared Memory Region definition.
-///
-typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT16 Version;
- UINT8 RASCapabilities[16];
- UINT8 SetRASCapabilities[16];
- UINT16 NumberOfRASFParameterBlocks;
- UINT32 SetRASCapabilitiesStatus;
-} EFI_ACPI_5_1_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
-
-///
-/// ACPI RASF PCC command code
-///
-#define EFI_ACPI_5_1_RASF_PCC_COMMAND_CODE_EXECUTE_RASF_COMMAND 0x01
-
-///
-/// ACPI RASF Platform RAS Capabilities
-///
-#define EFI_ACPI_5_1_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED 0x01
-#define EFI_ACPI_5_1_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED_AND_EXPOSED_TO_SOFTWARE 0x02
-
-///
-/// ACPI RASF Parameter Block structure for PATROL_SCRUB
-///
-typedef struct {
- UINT16 Type;
- UINT16 Version;
- UINT16 Length;
- UINT16 PatrolScrubCommand;
- UINT64 RequestedAddressRange[2];
- UINT64 ActualAddressRange[2];
- UINT16 Flags;
- UINT8 RequestedSpeed;
-} EFI_ACPI_5_1_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
-
-///
-/// ACPI RASF Patrol Scrub command
-///
-#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
-#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
-#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
-
-///
-/// Memory Power State Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier;
- UINT8 Reserved[3];
-// Memory Power Node Structure
-// Memory Power State Characteristics
-} EFI_ACPI_5_1_MEMORY_POWER_STATUS_TABLE;
-
-///
-/// MPST Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01
-
-///
-/// MPST Platform Communication Channel Shared Memory Region definition.
-///
-typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT32 MemoryPowerCommandRegister;
- UINT32 MemoryPowerStatusRegister;
- UINT32 PowerStateId;
- UINT32 MemoryPowerNodeId;
- UINT64 MemoryEnergyConsumed;
- UINT64 ExpectedAveragePowerComsuned;
-} EFI_ACPI_5_1_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
-
-///
-/// ACPI MPST PCC command code
-///
-#define EFI_ACPI_5_1_MPST_PCC_COMMAND_CODE_EXECUTE_MPST_COMMAND 0x03
-
-///
-/// ACPI MPST Memory Power command
-///
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
-
-///
-/// MPST Memory Power Node Table
-///
-typedef struct {
- UINT8 PowerStateValue;
- UINT8 PowerStateInformationIndex;
-} EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE;
-
-typedef struct {
- UINT8 Flag;
- UINT8 Reserved;
- UINT16 MemoryPowerNodeId;
- UINT32 Length;
- UINT64 AddressBase;
- UINT64 AddressLength;
- UINT32 NumberOfPowerStates;
- UINT32 NumberOfPhysicalComponents;
-//EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
-//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
-} EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE;
-
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
-
-typedef struct {
- UINT16 MemoryPowerNodeCount;
- UINT8 Reserved[2];
-} EFI_ACPI_5_1_MPST_MEMORY_POWER_NODE_TABLE;
-
-///
-/// MPST Memory Power State Characteristics Table
-///
-typedef struct {
- UINT8 PowerStateStructureID;
- UINT8 Flag;
- UINT16 Reserved;
- UINT32 AveragePowerConsumedInMPS0;
- UINT32 RelativePowerSavingToMPS0;
- UINT64 ExitLatencyToMPS0;
-} EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
-
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
-#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
-
-typedef struct {
- UINT16 MemoryPowerStateCharacteristicsCount;
- UINT8 Reserved[2];
-} EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
-
-///
-/// Memory Topology Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
-} EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE;
-
-///
-/// PMTT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
-
-///
-/// Common Memory Aggregator Device Structure.
-///
-typedef struct {
- UINT8 Type;
- UINT8 Reserved;
- UINT16 Length;
- UINT16 Flags;
- UINT16 Reserved1;
-} EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// Memory Aggregator Device Type
-///
-#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x1
-#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x2
-#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x3
-
-///
-/// Socket Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 SocketIdentifier;
- UINT16 Reserved;
-//EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
-} EFI_ACPI_5_1_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// MemoryController Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 OptimalAccessUnit;
- UINT16 OptimalAccessAlignment;
- UINT16 Reserved;
- UINT16 NumberOfProximityDomains;
-//UINT32 ProximityDomain[NumberOfProximityDomains];
-//EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
-} EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// DIMM Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 PhysicalComponentIdentifier;
- UINT16 Reserved;
- UINT32 SizeOfDimm;
- UINT32 SmbiosHandle;
-} EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// Boot Graphics Resource Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- ///
- /// 2-bytes (16 bit) version ID. This value must be 1.
- ///
- UINT16 Version;
- ///
- /// 1-byte status field indicating current status about the table.
- /// Bits[7:1] = Reserved (must be zero)
- /// Bit [0] = Valid. A one indicates the boot image graphic is valid.
- ///
- UINT8 Status;
- ///
- /// 1-byte enumerated type field indicating format of the image.
- /// 0 = Bitmap
- /// 1 - 255 Reserved (for future use)
- ///
- UINT8 ImageType;
- ///
- /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
- /// of the image bitmap.
- ///
- UINT64 ImageAddress;
- ///
- /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
- /// (X, Y) display offset of the top left corner of the boot image.
- /// The top left corner of the display is at offset (0, 0).
- ///
- UINT32 ImageOffsetX;
- ///
- /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
- /// (X, Y) display offset of the top left corner of the boot image.
- /// The top left corner of the display is at offset (0, 0).
- ///
- UINT32 ImageOffsetY;
-} EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE;
-
-///
-/// BGRT Revision
-///
-#define EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
-
-///
-/// BGRT Version
-///
-#define EFI_ACPI_5_1_BGRT_VERSION 0x01
-
-///
-/// BGRT Status
-///
-#define EFI_ACPI_5_1_BGRT_STATUS_NOT_DISPLAYED 0x00
-#define EFI_ACPI_5_1_BGRT_STATUS_DISPLAYED 0x01
-
-///
-/// BGRT Image Type
-///
-#define EFI_ACPI_5_1_BGRT_IMAGE_TYPE_BMP 0x00
-
-///
-/// FPDT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
-
-///
-/// FPDT Performance Record Types
-///
-#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
-#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
-
-///
-/// FPDT Performance Record Revision
-///
-#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
-#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
-
-///
-/// FPDT Runtime Performance Record Types
-///
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
-
-///
-/// FPDT Runtime Performance Record Revision
-///
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_REVISION_S3_RESUME 0x01
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_REVISION_S3_SUSPEND 0x01
-#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_REVISION_FIRMWARE_BASIC_BOOT 0x02
-
-///
-/// FPDT Performance Record header
-///
-typedef struct {
- UINT16 Type;
- UINT8 Length;
- UINT8 Revision;
-} EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER;
-
-///
-/// FPDT Performance Table header
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER;
-
-///
-/// FPDT Firmware Basic Boot Performance Pointer Record Structure
-///
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// 64-bit processor-relative physical address of the Basic Boot Performance Table.
- ///
- UINT64 BootPerformanceTablePointer;
-} EFI_ACPI_5_1_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
-
-///
-/// FPDT S3 Performance Table Pointer Record Structure
-///
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// 64-bit processor-relative physical address of the S3 Performance Table.
- ///
- UINT64 S3PerformanceTablePointer;
-} EFI_ACPI_5_1_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
-
-///
-/// FPDT Firmware Basic Boot Performance Record Structure
-///
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// Timer value logged at the beginning of firmware image execution.
- /// This may not always be zero or near zero.
- ///
- UINT64 ResetEnd;
- ///
- /// Timer value logged just prior to loading the OS boot loader into memory.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 OsLoaderLoadImageStart;
- ///
- /// Timer value logged just prior to launching the previously loaded OS boot loader image.
- /// For non-UEFI compatible boots, the timer value logged will be just prior
- /// to the INT 19h handler invocation.
- ///
- UINT64 OsLoaderStartImageStart;
- ///
- /// Timer value logged at the point when the OS loader calls the
- /// ExitBootServices function for UEFI compatible firmware.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 ExitBootServicesEntry;
- ///
- /// Timer value logged at the point just prior towhen the OS loader gaining
- /// control back from calls the ExitBootServices function for UEFI compatible firmware.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 ExitBootServicesExit;
-} EFI_ACPI_5_1_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
-
-///
-/// FPDT Firmware Basic Boot Performance Table signature
-///
-#define EFI_ACPI_5_1_FPDT_BOOT_PERFORMANCE_TABLE_SIGNATURE SIGNATURE_32('F', 'B', 'P', 'T')
-
-//
-// FPDT Firmware Basic Boot Performance Table
-//
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header;
- //
- // one or more Performance Records.
- //
-} EFI_ACPI_5_1_FPDT_FIRMWARE_BASIC_BOOT_TABLE;
-
-///
-/// FPDT "S3PT" S3 Performance Table
-///
-#define EFI_ACPI_5_1_FPDT_S3_PERFORMANCE_TABLE_SIGNATURE SIGNATURE_32('S', '3', 'P', 'T')
-
-//
-// FPDT Firmware S3 Boot Performance Table
-//
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header;
- //
- // one or more Performance Records.
- //
-} EFI_ACPI_5_1_FPDT_FIRMWARE_S3_BOOT_TABLE;
-
-///
-/// FPDT Basic S3 Resume Performance Record
-///
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// A count of the number of S3 resume cycles since the last full boot sequence.
- ///
- UINT32 ResumeCount;
- ///
- /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
- /// OS waking vector. Only the most recent resume cycle's time is retained.
- ///
- UINT64 FullResume;
- ///
- /// Average timer value of all resume cycles logged since the last full boot
- /// sequence, including the most recent resume. Note that the entire log of
- /// timer values does not need to be retained in order to calculate this average.
- ///
- UINT64 AverageResume;
-} EFI_ACPI_5_1_FPDT_S3_RESUME_RECORD;
-
-///
-/// FPDT Basic S3 Suspend Performance Record
-///
-typedef struct {
- EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
- /// Only the most recent suspend cycle's timer value is retained.
- ///
- UINT64 SuspendStart;
- ///
- /// Timer value recorded at the final firmware write to SLP_TYP (or other
- /// mechanism) used to trigger hardware entry to S3.
- /// Only the most recent suspend cycle's timer value is retained.
- ///
- UINT64 SuspendEnd;
-} EFI_ACPI_5_1_FPDT_S3_SUSPEND_RECORD;
-
-///
-/// Firmware Performance Record Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
-} EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_RECORD_TABLE;
-
-///
-/// Generic Timer Description Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 CntControlBasePhysicalAddress;
- UINT32 Reserved;
- UINT32 SecurePL1TimerGSIV;
- UINT32 SecurePL1TimerFlags;
- UINT32 NonSecurePL1TimerGSIV;
- UINT32 NonSecurePL1TimerFlags;
- UINT32 VirtualTimerGSIV;
- UINT32 VirtualTimerFlags;
- UINT32 NonSecurePL2TimerGSIV;
- UINT32 NonSecurePL2TimerFlags;
- UINT64 CntReadBasePhysicalAddress;
- UINT32 PlatformTimerCount;
- UINT32 PlatformTimerOffset;
-} EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE;
-
-///
-/// GTDT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Timer Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2
-
-///
-/// Platform Timer Type
-///
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK 0
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG 1
-
-///
-/// GT Block Structure
-///
-typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 CntCtlBase;
- UINT32 GTBlockTimerCount;
- UINT32 GTBlockTimerOffset;
-} EFI_ACPI_5_1_GTDT_GT_BLOCK_STRUCTURE;
-
-///
-/// GT Block Timer Structure
-///
-typedef struct {
- UINT8 GTFrameNumber;
- UINT8 Reserved[3];
- UINT64 CntBaseX;
- UINT64 CntEL0BaseX;
- UINT32 GTxPhysicalTimerGSIV;
- UINT32 GTxPhysicalTimerFlags;
- UINT32 GTxVirtualTimerGSIV;
- UINT32 GTxVirtualTimerFlags;
- UINT32 GTxCommonFlags;
-} EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_STRUCTURE;
-
-///
-/// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-
-///
-/// Common Flags Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0
-#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1
-
-///
-/// SBSA Generic Watchdog Structure
-///
-typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 RefreshFramePhysicalAddress;
- UINT64 WatchdogControlFramePhysicalAddress;
- UINT32 WatchdogTimerGSIV;
- UINT32 WatchdogTimerFlags;
-} EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE;
-
-///
-/// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2
-
-///
-/// Boot Error Record Table (BERT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
-} EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_HEADER;
-
-///
-/// BERT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
-
-///
-/// Boot Error Region Block Status Definition
-///
-typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
-} EFI_ACPI_5_1_ERROR_BLOCK_STATUS;
-
-///
-/// Boot Error Region Definition
-///
-typedef struct {
- EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_5_1_BOOT_ERROR_REGION_STRUCTURE;
-
-//
-// Boot Error Severity types
-//
-#define EFI_ACPI_5_1_ERROR_SEVERITY_CORRECTABLE 0x00
-#define EFI_ACPI_5_1_ERROR_SEVERITY_FATAL 0x01
-#define EFI_ACPI_5_1_ERROR_SEVERITY_CORRECTED 0x02
-#define EFI_ACPI_5_1_ERROR_SEVERITY_NONE 0x03
-
-///
-/// Generic Error Data Entry Definition
-///
-typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
-} EFI_ACPI_5_1_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
-
-///
-/// Generic Error Data Entry Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_GENERIC_ERROR_DATA_ENTRY_REVISION 0x0201
-
-///
-/// HEST - Hardware Error Source Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
-} EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
-
-///
-/// HEST Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
-
-//
-// Error Source structure types.
-//
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION 0x00
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK 0x01
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_NMI_ERROR 0x02
-#define EFI_ACPI_5_1_PCI_EXPRESS_ROOT_PORT_AER 0x06
-#define EFI_ACPI_5_1_PCI_EXPRESS_DEVICE_AER 0x07
-#define EFI_ACPI_5_1_PCI_EXPRESS_BRIDGE_AER 0x08
-#define EFI_ACPI_5_1_GENERIC_HARDWARE_ERROR 0x09
-
-//
-// Error Source structure flags.
-//
-#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
-
-///
-/// IA-32 Architecture Machine Check Exception Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
-} EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure Definition
-///
-typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
-} EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure MCA data format
-///
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
-
-//
-// Hardware Error Notification types. All other values are reserved
-//
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
-
-///
-/// Hardware Error Notification Configuration Write Enable Structure Definition
-///
-typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
-} EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
-
-///
-/// Hardware Error Notification Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
-} EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
-
-///
-/// IA-32 Architecture Corrected Machine Check Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
-} EFI_ACPI_5_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
-
-///
-/// IA-32 Architecture NMI Error Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
-} EFI_ACPI_5_1_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
-
-///
-/// PCI Express Root Port AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
-} EFI_ACPI_5_1_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
-
-///
-/// PCI Express Device AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_5_1_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
-
-///
-/// PCI Express Bridge AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_5_1_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
-
-///
-/// Generic Hardware Error Source Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
-} EFI_ACPI_5_1_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
-
-///
-/// Generic Error Status Definition
-///
-typedef struct {
- EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_5_1_GENERIC_ERROR_STATUS_STRUCTURE;
-
-///
-/// ERST - Error Record Serialization Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
-} EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
-
-///
-/// ERST Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
-
-///
-/// ERST Serialization Actions
-///
-#define EFI_ACPI_5_1_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_5_1_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_5_1_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_5_1_ERST_END_OPERATION 0x03
-#define EFI_ACPI_5_1_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_5_1_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_1_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_1_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_1_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_5_1_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_5_1_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_5_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
-
-///
-/// ERST Action Command Status
-///
-#define EFI_ACPI_5_1_ERST_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_5_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_5_1_ERST_STATUS_FAILED 0x03
-#define EFI_ACPI_5_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_5_1_ERST_STATUS_RECORD_NOT_FOUND 0x05
-
-///
-/// ERST Serialization Instructions
-///
-#define EFI_ACPI_5_1_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_5_1_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_1_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_1_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_1_ERST_NOOP 0x04
-#define EFI_ACPI_5_1_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_5_1_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_5_1_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_5_1_ERST_ADD 0x08
-#define EFI_ACPI_5_1_ERST_SUBTRACT 0x09
-#define EFI_ACPI_5_1_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_5_1_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_5_1_ERST_STALL 0x0C
-#define EFI_ACPI_5_1_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_5_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_5_1_ERST_GOTO 0x0F
-#define EFI_ACPI_5_1_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_5_1_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_5_1_ERST_MOVE_DATA 0x12
-
-///
-/// ERST Instruction Flags
-///
-#define EFI_ACPI_5_1_ERST_PRESERVE_REGISTER 0x01
-
-///
-/// ERST Serialization Instruction Entry
-///
-typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_5_1_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ - Error Injection Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
-} EFI_ACPI_5_1_ERROR_INJECTION_TABLE_HEADER;
-
-///
-/// EINJ Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_ERROR_INJECTION_TABLE_REVISION 0x01
-
-///
-/// EINJ Error Injection Actions
-///
-#define EFI_ACPI_5_1_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_5_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_5_1_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_5_1_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_5_1_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_5_1_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_5_1_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_5_1_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_5_1_EINJ_TRIGGER_ERROR 0xFF
-
-///
-/// EINJ Action Command Status
-///
-#define EFI_ACPI_5_1_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_5_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_5_1_EINJ_STATUS_INVALID_ACCESS 0x02
-
-///
-/// EINJ Error Type Definition
-///
-#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
-
-///
-/// EINJ Injection Instructions
-///
-#define EFI_ACPI_5_1_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_5_1_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_5_1_EINJ_NOOP 0x04
-
-///
-/// EINJ Instruction Flags
-///
-#define EFI_ACPI_5_1_EINJ_PRESERVE_REGISTER 0x01
-
-///
-/// EINJ Injection Instruction Entry
-///
-typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_5_1_EINJ_INJECTION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ Trigger Action Table
-///
-typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
-} EFI_ACPI_5_1_EINJ_TRIGGER_ACTION_TABLE;
-
-///
-/// Platform Communications Channel Table (PCCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Flags;
- UINT64 Reserved;
-} EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
-
-///
-/// PCCT Version (as defined in ACPI 5.1 spec.)
-///
-#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
-
-///
-/// PCCT Global Flags
-///
-#define EFI_ACPI_5_1_PCCT_FLAGS_SCI_DOORBELL BIT0
-
-//
-// PCCT Subspace type
-//
-#define EFI_ACPI_5_1_PCCT_SUBSPACE_TYPE_GENERIC 0x00
-
-///
-/// PCC Subspace Structure Header
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
-} EFI_ACPI_5_1_PCCT_SUBSPACE_HEADER;
-
-///
-/// Generic Communications Subspace Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[6];
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
-} EFI_ACPI_5_1_PCCT_SUBSPACE_GENERIC;
-
-///
-/// Generic Communications Channel Shared Memory Region
-///
-
-typedef struct {
- UINT8 Command;
- UINT8 Reserved:7;
- UINT8 GenerateSci:1;
-} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
-
-typedef struct {
- UINT8 CommandComplete:1;
- UINT8 SciDoorbell:1;
- UINT8 Error:1;
- UINT8 PlatformNotification:1;
- UINT8 Reserved:4;
- UINT8 Reserved1;
-} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
-
-typedef struct {
- UINT32 Signature;
- EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND Command;
- EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status;
-} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER;
-
-//
-// Known table signatures
-//
-
-///
-/// "RSD PTR " Root System Description Pointer
-///
-#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-
-///
-/// "APIC" Multiple APIC Description Table
-///
-#define EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "BERT" Boot Error Record Table
-///
-#define EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_SIGNATURE SIGNATURE_32('B', 'E', 'R', 'T')
-
-///
-/// "BGRT" Boot Graphics Resource Table
-///
-#define EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('B', 'G', 'R', 'T')
-
-///
-/// "CPEP" Corrected Platform Error Polling Table
-///
-#define EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
-
-///
-/// "DSDT" Differentiated System Description Table
-///
-#define EFI_ACPI_5_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
-
-///
-/// "ECDT" Embedded Controller Boot Resources Table
-///
-#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
-
-///
-/// "EINJ" Error Injection Table
-///
-#define EFI_ACPI_5_1_ERROR_INJECTION_TABLE_SIGNATURE SIGNATURE_32('E', 'I', 'N', 'J')
-
-///
-/// "ERST" Error Record Serialization Table
-///
-#define EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE SIGNATURE_32('E', 'R', 'S', 'T')
-
-///
-/// "FACP" Fixed ACPI Description Table
-///
-#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
-
-///
-/// "FACS" Firmware ACPI Control Structure
-///
-#define EFI_ACPI_5_1_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
-
-///
-/// "FPDT" Firmware Performance Data Table
-///
-#define EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE SIGNATURE_32('F', 'P', 'D', 'T')
-
-///
-/// "GTDT" Generic Timer Description Table
-///
-#define EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('G', 'T', 'D', 'T')
-
-///
-/// "HEST" Hardware Error Source Table
-///
-#define EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE SIGNATURE_32('H', 'E', 'S', 'T')
-
-///
-/// "MPST" Memory Power State Table
-///
-#define EFI_ACPI_5_1_MEMORY_POWER_STATE_TABLE_SIGNATURE SIGNATURE_32('M', 'P', 'S', 'T')
-
-///
-/// "MSCT" Maximum System Characteristics Table
-///
-#define EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'C', 'T')
-
-///
-/// "PMTT" Platform Memory Topology Table
-///
-#define EFI_ACPI_5_1_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE SIGNATURE_32('P', 'M', 'T', 'T')
-
-///
-/// "PSDT" Persistent System Description Table
-///
-#define EFI_ACPI_5_1_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
-
-///
-/// "RASF" ACPI RAS Feature Table
-///
-#define EFI_ACPI_5_1_ACPI_RAS_FEATURE_TABLE_SIGNATURE SIGNATURE_32('R', 'A', 'S', 'F')
-
-///
-/// "RSDT" Root System Description Table
-///
-#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
-
-///
-/// "SBST" Smart Battery Specification Table
-///
-#define EFI_ACPI_5_1_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
-
-///
-/// "SLIT" System Locality Information Table
-///
-#define EFI_ACPI_5_1_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
-
-///
-/// "SRAT" System Resource Affinity Table
-///
-#define EFI_ACPI_5_1_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
-
-///
-/// "SSDT" Secondary System Description Table
-///
-#define EFI_ACPI_5_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
-
-///
-/// "XSDT" Extended System Description Table
-///
-#define EFI_ACPI_5_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
-
-///
-/// "BOOT" MS Simple Boot Spec
-///
-#define EFI_ACPI_5_1_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
-
-///
-/// "CSRT" MS Core System Resource Table
-///
-#define EFI_ACPI_5_1_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('C', 'S', 'R', 'T')
-
-///
-/// "DBG2" MS Debug Port 2 Spec
-///
-#define EFI_ACPI_5_1_DEBUG_PORT_2_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', '2')
-
-///
-/// "DBGP" MS Debug Port Spec
-///
-#define EFI_ACPI_5_1_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
-
-///
-/// "DMAR" DMA Remapping Table
-///
-#define EFI_ACPI_5_1_DMA_REMAPPING_TABLE_SIGNATURE SIGNATURE_32('D', 'M', 'A', 'R')
-
-///
-/// "DRTM" Dynamic Root of Trust for Measurement Table
-///
-#define EFI_ACPI_5_1_DYNAMIC_ROOT_OF_TRUST_FOR_MEASUREMENT_TABLE_SIGNATURE SIGNATURE_32('D', 'R', 'T', 'M')
-
-///
-/// "ETDT" Event Timer Description Table
-///
-#define EFI_ACPI_5_1_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
-
-///
-/// "HPET" IA-PC High Precision Event Timer Table
-///
-#define EFI_ACPI_5_1_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
-
-///
-/// "iBFT" iSCSI Boot Firmware Table
-///
-#define EFI_ACPI_5_1_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
-
-///
-/// "IVRS" I/O Virtualization Reporting Structure
-///
-#define EFI_ACPI_5_1_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE SIGNATURE_32('I', 'V', 'R', 'S')
-
-///
-/// "LPIT" Low Power Idle Table
-///
-#define EFI_ACPI_5_1_IO_LOW_POWER_IDLE_TABLE_STRUCTURE_SIGNATURE SIGNATURE_32('L', 'P', 'I', 'T')
-
-///
-/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
-///
-#define EFI_ACPI_5_1_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
-
-///
-/// "MCHI" Management Controller Host Interface Table
-///
-#define EFI_ACPI_5_1_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'H', 'I')
-
-///
-/// "MSDM" MS Data Management Table
-///
-#define EFI_ACPI_5_1_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
-
-///
-/// "SLIC" MS Software Licensing Table Specification
-///
-#define EFI_ACPI_5_1_SOFTWARE_LICENSING_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'C')
-
-///
-/// "SPCR" Serial Port Concole Redirection Table
-///
-#define EFI_ACPI_5_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
-
-///
-/// "SPMI" Server Platform Management Interface Table
-///
-#define EFI_ACPI_5_1_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
-
-///
-/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
-///
-#define EFI_ACPI_5_1_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
-
-///
-/// "TPM2" Trusted Computing Platform 1 Table
-///
-#define EFI_ACPI_5_1_TRUSTED_COMPUTING_PLATFORM_2_TABLE_SIGNATURE SIGNATURE_32('T', 'P', 'M', '2')
-
-///
-/// "UEFI" UEFI ACPI Data Table
-///
-#define EFI_ACPI_5_1_UEFI_ACPI_DATA_TABLE_SIGNATURE SIGNATURE_32('U', 'E', 'F', 'I')
-
-///
-/// "WAET" Windows ACPI Emulated Devices Table
-///
-#define EFI_ACPI_5_1_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T')
-
-///
-/// "WDAT" Watchdog Action Table
-///
-#define EFI_ACPI_5_1_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
-
-///
-/// "WDRT" Watchdog Resource Table
-///
-#define EFI_ACPI_5_1_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
-
-///
-/// "WPBT" MS Platform Binary Table
-///
-#define EFI_ACPI_5_1_PLATFORM_BINARY_TABLE_SIGNATURE SIGNATURE_32('W', 'P', 'B', 'T')
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi60.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi60.h
deleted file mode 100644
index 18eb5f7d9..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Acpi60.h
+++ /dev/null
@@ -1,2348 +0,0 @@
-/** @file
- ACPI 6.0 definitions from the ACPI Specification Revision 6.0 April, 2015.
-
- Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
- (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<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.
-**/
-
-#ifndef _ACPI_6_0_H_
-#define _ACPI_6_0_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Acpi51.h>
-
-//
-// Ensure proper structure formats
-//
-#pragma pack(1)
-
-///
-/// ACPI 6.0 Generic Address Space definition
-///
-typedef struct {
- UINT8 AddressSpaceId;
- UINT8 RegisterBitWidth;
- UINT8 RegisterBitOffset;
- UINT8 AccessSize;
- UINT64 Address;
-} EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE;
-
-//
-// Generic Address Space Address IDs
-//
-#define EFI_ACPI_6_0_SYSTEM_MEMORY 0
-#define EFI_ACPI_6_0_SYSTEM_IO 1
-#define EFI_ACPI_6_0_PCI_CONFIGURATION_SPACE 2
-#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER 3
-#define EFI_ACPI_6_0_SMBUS 4
-#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL 0x0A
-#define EFI_ACPI_6_0_FUNCTIONAL_FIXED_HARDWARE 0x7F
-
-//
-// Generic Address Space Access Sizes
-//
-#define EFI_ACPI_6_0_UNDEFINED 0
-#define EFI_ACPI_6_0_BYTE 1
-#define EFI_ACPI_6_0_WORD 2
-#define EFI_ACPI_6_0_DWORD 3
-#define EFI_ACPI_6_0_QWORD 4
-
-//
-// ACPI 6.0 table structures
-//
-
-///
-/// Root System Description Pointer Structure
-///
-typedef struct {
- UINT64 Signature;
- UINT8 Checksum;
- UINT8 OemId[6];
- UINT8 Revision;
- UINT32 RsdtAddress;
- UINT32 Length;
- UINT64 XsdtAddress;
- UINT8 ExtendedChecksum;
- UINT8 Reserved[3];
-} EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
-
-///
-/// RSD_PTR Revision (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.0) says current value is 2
-
-///
-/// Common table header, this prefaces all ACPI tables, including FACS, but
-/// excluding the RSD PTR structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_6_0_COMMON_HEADER;
-
-//
-// Root System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
-//
-
-///
-/// RSDT Revision (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-//
-// Extended System Description Table
-// No definition needed as it is a common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
-//
-
-///
-/// XSDT Revision (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Fixed ACPI Description Table Structure (FADT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 FirmwareCtrl;
- UINT32 Dsdt;
- UINT8 Reserved0;
- UINT8 PreferredPmProfile;
- UINT16 SciInt;
- UINT32 SmiCmd;
- UINT8 AcpiEnable;
- UINT8 AcpiDisable;
- UINT8 S4BiosReq;
- UINT8 PstateCnt;
- UINT32 Pm1aEvtBlk;
- UINT32 Pm1bEvtBlk;
- UINT32 Pm1aCntBlk;
- UINT32 Pm1bCntBlk;
- UINT32 Pm2CntBlk;
- UINT32 PmTmrBlk;
- UINT32 Gpe0Blk;
- UINT32 Gpe1Blk;
- UINT8 Pm1EvtLen;
- UINT8 Pm1CntLen;
- UINT8 Pm2CntLen;
- UINT8 PmTmrLen;
- UINT8 Gpe0BlkLen;
- UINT8 Gpe1BlkLen;
- UINT8 Gpe1Base;
- UINT8 CstCnt;
- UINT16 PLvl2Lat;
- UINT16 PLvl3Lat;
- UINT16 FlushSize;
- UINT16 FlushStride;
- UINT8 DutyOffset;
- UINT8 DutyWidth;
- UINT8 DayAlrm;
- UINT8 MonAlrm;
- UINT8 Century;
- UINT16 IaPcBootArch;
- UINT8 Reserved1;
- UINT32 Flags;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ResetReg;
- UINT8 ResetValue;
- UINT16 ArmBootArch;
- UINT8 MinorVersion;
- UINT64 XFirmwareCtrl;
- UINT64 XDsdt;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
- UINT64 HypervisorVendorIdentity;
-} EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE;
-
-///
-/// FADT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06
-#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x00
-
-//
-// Fixed ACPI Description Table Preferred Power Management Profile
-//
-#define EFI_ACPI_6_0_PM_PROFILE_UNSPECIFIED 0
-#define EFI_ACPI_6_0_PM_PROFILE_DESKTOP 1
-#define EFI_ACPI_6_0_PM_PROFILE_MOBILE 2
-#define EFI_ACPI_6_0_PM_PROFILE_WORKSTATION 3
-#define EFI_ACPI_6_0_PM_PROFILE_ENTERPRISE_SERVER 4
-#define EFI_ACPI_6_0_PM_PROFILE_SOHO_SERVER 5
-#define EFI_ACPI_6_0_PM_PROFILE_APPLIANCE_PC 6
-#define EFI_ACPI_6_0_PM_PROFILE_PERFORMANCE_SERVER 7
-#define EFI_ACPI_6_0_PM_PROFILE_TABLET 8
-
-//
-// Fixed ACPI Description Table Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_6_0_LEGACY_DEVICES BIT0
-#define EFI_ACPI_6_0_8042 BIT1
-#define EFI_ACPI_6_0_VGA_NOT_PRESENT BIT2
-#define EFI_ACPI_6_0_MSI_NOT_SUPPORTED BIT3
-#define EFI_ACPI_6_0_PCIE_ASPM_CONTROLS BIT4
-#define EFI_ACPI_6_0_CMOS_RTC_NOT_PRESENT BIT5
-
-//
-// Fixed ACPI Description Table Arm Boot Architecture Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_6_0_ARM_PSCI_COMPLIANT BIT0
-#define EFI_ACPI_6_0_ARM_PSCI_USE_HVC BIT1
-
-//
-// Fixed ACPI Description Table Fixed Feature Flags
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_6_0_WBINVD BIT0
-#define EFI_ACPI_6_0_WBINVD_FLUSH BIT1
-#define EFI_ACPI_6_0_PROC_C1 BIT2
-#define EFI_ACPI_6_0_P_LVL2_UP BIT3
-#define EFI_ACPI_6_0_PWR_BUTTON BIT4
-#define EFI_ACPI_6_0_SLP_BUTTON BIT5
-#define EFI_ACPI_6_0_FIX_RTC BIT6
-#define EFI_ACPI_6_0_RTC_S4 BIT7
-#define EFI_ACPI_6_0_TMR_VAL_EXT BIT8
-#define EFI_ACPI_6_0_DCK_CAP BIT9
-#define EFI_ACPI_6_0_RESET_REG_SUP BIT10
-#define EFI_ACPI_6_0_SEALED_CASE BIT11
-#define EFI_ACPI_6_0_HEADLESS BIT12
-#define EFI_ACPI_6_0_CPU_SW_SLP BIT13
-#define EFI_ACPI_6_0_PCI_EXP_WAK BIT14
-#define EFI_ACPI_6_0_USE_PLATFORM_CLOCK BIT15
-#define EFI_ACPI_6_0_S4_RTC_STS_VALID BIT16
-#define EFI_ACPI_6_0_REMOTE_POWER_ON_CAPABLE BIT17
-#define EFI_ACPI_6_0_FORCE_APIC_CLUSTER_MODEL BIT18
-#define EFI_ACPI_6_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-#define EFI_ACPI_6_0_HW_REDUCED_ACPI BIT20
-#define EFI_ACPI_6_0_LOW_POWER_S0_IDLE_CAPABLE BIT21
-
-///
-/// Firmware ACPI Control Structure
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
- UINT32 HardwareSignature;
- UINT32 FirmwareWakingVector;
- UINT32 GlobalLock;
- UINT32 Flags;
- UINT64 XFirmwareWakingVector;
- UINT8 Version;
- UINT8 Reserved0[3];
- UINT32 OspmFlags;
- UINT8 Reserved1[24];
-} EFI_ACPI_6_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
-
-///
-/// FACS Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x02
-
-///
-/// Firmware Control Structure Feature Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_6_0_S4BIOS_F BIT0
-#define EFI_ACPI_6_0_64BIT_WAKE_SUPPORTED_F BIT1
-
-///
-/// OSPM Enabled Firmware Control Structure Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_6_0_OSPM_64BIT_WAKE_F BIT0
-
-//
-// Differentiated System Description Table,
-// Secondary System Description Table
-// and Persistent System Description Table,
-// no definition needed as they are common description table header, the same with
-// EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
-//
-#define EFI_ACPI_6_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-#define EFI_ACPI_6_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Multiple APIC Description Table header definition. The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 LocalApicAddress;
- UINT32 Flags;
-} EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
-
-///
-/// MADT Revision (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
-
-///
-/// Multiple APIC Flags
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_6_0_PCAT_COMPAT BIT0
-
-//
-// Multiple APIC Description Table APIC structure types
-// All other values between 0x0D and 0x7F are reserved and
-// will be ignored by OSPM. 0x80 ~ 0xFF are reserved for OEM.
-//
-#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC 0x00
-#define EFI_ACPI_6_0_IO_APIC 0x01
-#define EFI_ACPI_6_0_INTERRUPT_SOURCE_OVERRIDE 0x02
-#define EFI_ACPI_6_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
-#define EFI_ACPI_6_0_LOCAL_APIC_NMI 0x04
-#define EFI_ACPI_6_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05
-#define EFI_ACPI_6_0_IO_SAPIC 0x06
-#define EFI_ACPI_6_0_LOCAL_SAPIC 0x07
-#define EFI_ACPI_6_0_PLATFORM_INTERRUPT_SOURCES 0x08
-#define EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC 0x09
-#define EFI_ACPI_6_0_LOCAL_X2APIC_NMI 0x0A
-#define EFI_ACPI_6_0_GIC 0x0B
-#define EFI_ACPI_6_0_GICD 0x0C
-#define EFI_ACPI_6_0_GIC_MSI_FRAME 0x0D
-#define EFI_ACPI_6_0_GICR 0x0E
-#define EFI_ACPI_6_0_GIC_ITS 0x0F
-
-//
-// APIC Structure Definitions
-//
-
-///
-/// Processor Local APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorUid;
- UINT8 ApicId;
- UINT32 Flags;
-} EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
-
-///
-/// Local APIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_LOCAL_APIC_ENABLED BIT0
-
-///
-/// IO APIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 IoApicAddress;
- UINT32 GlobalSystemInterruptBase;
-} EFI_ACPI_6_0_IO_APIC_STRUCTURE;
-
-///
-/// Interrupt Source Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Bus;
- UINT8 Source;
- UINT32 GlobalSystemInterrupt;
- UINT16 Flags;
-} EFI_ACPI_6_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
- UINT8 CpeiProcessorOverride;
- UINT8 Reserved[31];
-} EFI_ACPI_6_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
-
-//
-// MPS INTI flags.
-// All other bits are reserved and must be set to 0.
-//
-#define EFI_ACPI_6_0_POLARITY (3 << 0)
-#define EFI_ACPI_6_0_TRIGGER_MODE (3 << 2)
-
-///
-/// Non-Maskable Interrupt Source Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 GlobalSystemInterrupt;
-} EFI_ACPI_6_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
-
-///
-/// Local APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorUid;
- UINT16 Flags;
- UINT8 LocalApicLint;
-} EFI_ACPI_6_0_LOCAL_APIC_NMI_STRUCTURE;
-
-///
-/// Local APIC Address Override Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 LocalApicAddress;
-} EFI_ACPI_6_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
-
-///
-/// IO SAPIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 IoApicId;
- UINT8 Reserved;
- UINT32 GlobalSystemInterruptBase;
- UINT64 IoSapicAddress;
-} EFI_ACPI_6_0_IO_SAPIC_STRUCTURE;
-
-///
-/// Local SAPIC Structure
-/// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 AcpiProcessorId;
- UINT8 LocalSapicId;
- UINT8 LocalSapicEid;
- UINT8 Reserved[3];
- UINT32 Flags;
- UINT32 ACPIProcessorUIDValue;
-} EFI_ACPI_6_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
-
-///
-/// Platform Interrupt Sources Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT8 InterruptType;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT8 IoSapicVector;
- UINT32 GlobalSystemInterrupt;
- UINT32 PlatformInterruptSourceFlags;
-} EFI_ACPI_6_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
-
-///
-/// Platform Interrupt Source Flags.
-/// All other bits are reserved and must be set to 0.
-///
-#define EFI_ACPI_6_0_CPEI_PROCESSOR_OVERRIDE BIT0
-
-///
-/// Processor Local x2APIC Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[2];
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 AcpiProcessorUid;
-} EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
-
-///
-/// Local x2APIC NMI Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Flags;
- UINT32 AcpiProcessorUid;
- UINT8 LocalX2ApicLint;
- UINT8 Reserved[3];
-} EFI_ACPI_6_0_LOCAL_X2APIC_NMI_STRUCTURE;
-
-///
-/// GIC Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 CPUInterfaceNumber;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ParkingProtocolVersion;
- UINT32 PerformanceInterruptGsiv;
- UINT64 ParkedAddress;
- UINT64 PhysicalBaseAddress;
- UINT64 GICV;
- UINT64 GICH;
- UINT32 VGICMaintenanceInterrupt;
- UINT64 GICRBaseAddress;
- UINT64 MPIDR;
- UINT8 ProcessorPowerEfficiencyClass;
- UINT8 Reserved2[3];
-} EFI_ACPI_6_0_GIC_STRUCTURE;
-
-///
-/// GIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_GIC_ENABLED BIT0
-#define EFI_ACPI_6_0_PERFORMANCE_INTERRUPT_MODEL BIT1
-#define EFI_ACPI_6_0_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2
-
-///
-/// GIC Distributor Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicId;
- UINT64 PhysicalBaseAddress;
- UINT32 SystemVectorBase;
- UINT8 GicVersion;
- UINT8 Reserved2[3];
-} EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE;
-
-///
-/// GIC Version
-///
-#define EFI_ACPI_6_0_GIC_V1 0x01
-#define EFI_ACPI_6_0_GIC_V2 0x02
-#define EFI_ACPI_6_0_GIC_V3 0x03
-#define EFI_ACPI_6_0_GIC_V4 0x04
-
-///
-/// GIC MSI Frame Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved1;
- UINT32 GicMsiFrameId;
- UINT64 PhysicalBaseAddress;
- UINT32 Flags;
- UINT16 SPICount;
- UINT16 SPIBase;
-} EFI_ACPI_6_0_GIC_MSI_FRAME_STRUCTURE;
-
-///
-/// GIC MSI Frame Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_SPI_COUNT_BASE_SELECT BIT0
-
-///
-/// GICR Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT64 DiscoveryRangeBaseAddress;
- UINT32 DiscoveryRangeLength;
-} EFI_ACPI_6_0_GICR_STRUCTURE;
-
-///
-/// GIC Interrupt Translation Service Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT16 Reserved;
- UINT32 GicItsId;
- UINT64 PhysicalBaseAddress;
- UINT32 Reserved2;
-} EFI_ACPI_6_0_GIC_ITS_STRUCTURE;
-
-///
-/// Smart Battery Description Table (SBST)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 WarningEnergyLevel;
- UINT32 LowEnergyLevel;
- UINT32 CriticalEnergyLevel;
-} EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE;
-
-///
-/// SBST Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
-
-///
-/// Embedded Controller Boot Resources Table (ECDT)
-/// The table is followed by a null terminated ASCII string that contains
-/// a fully qualified reference to the name space object.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcControl;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcData;
- UINT32 Uid;
- UINT8 GpeBit;
-} EFI_ACPI_6_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
-
-///
-/// ECDT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01
-
-///
-/// System Resource Affinity Table (SRAT). The rest of the table
-/// must be defined in a platform specific manner.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved1; ///< Must be set to 1
- UINT64 Reserved2;
-} EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
-
-///
-/// SRAT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION 0x03
-
-//
-// SRAT structure types.
-// All other values between 0x04 an 0xFF are reserved and
-// will be ignored by OSPM.
-//
-#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY 0x00
-#define EFI_ACPI_6_0_MEMORY_AFFINITY 0x01
-#define EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_AFFINITY 0x02
-#define EFI_ACPI_6_0_GICC_AFFINITY 0x03
-
-///
-/// Processor Local APIC/SAPIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProximityDomain7To0;
- UINT8 ApicId;
- UINT32 Flags;
- UINT8 LocalSapicEid;
- UINT8 ProximityDomain31To8[3];
- UINT32 ClockDomain;
-} EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
-
-///
-/// Local APIC/SAPIC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
-
-///
-/// Memory Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT16 Reserved1;
- UINT32 AddressBaseLow;
- UINT32 AddressBaseHigh;
- UINT32 LengthLow;
- UINT32 LengthHigh;
- UINT32 Reserved2;
- UINT32 Flags;
- UINT64 Reserved3;
-} EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE;
-
-//
-// Memory Flags. All other bits are reserved and must be 0.
-//
-#define EFI_ACPI_6_0_MEMORY_ENABLED (1 << 0)
-#define EFI_ACPI_6_0_MEMORY_HOT_PLUGGABLE (1 << 1)
-#define EFI_ACPI_6_0_MEMORY_NONVOLATILE (1 << 2)
-
-///
-/// Processor Local x2APIC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved1[2];
- UINT32 ProximityDomain;
- UINT32 X2ApicId;
- UINT32 Flags;
- UINT32 ClockDomain;
- UINT8 Reserved2[4];
-} EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
-
-///
-/// GICC Affinity Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT32 ProximityDomain;
- UINT32 AcpiProcessorUid;
- UINT32 Flags;
- UINT32 ClockDomain;
-} EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE;
-
-///
-/// GICC Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_GICC_ENABLED (1 << 0)
-
-///
-/// System Locality Distance Information Table (SLIT).
-/// The rest of the table is a matrix.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 NumberOfSystemLocalities;
-} EFI_ACPI_6_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
-
-///
-/// SLIT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION 0x01
-
-///
-/// Corrected Platform Error Polling Table (CPEP)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 Reserved[8];
-} EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
-
-///
-/// CPEP Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
-
-//
-// CPEP processor structure types.
-//
-#define EFI_ACPI_6_0_CPEP_PROCESSOR_APIC_SAPIC 0x00
-
-///
-/// Corrected Platform Error Polling Processor Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 ProcessorId;
- UINT8 ProcessorEid;
- UINT32 PollingInterval;
-} EFI_ACPI_6_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
-
-///
-/// Maximum System Characteristics Table (MSCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 OffsetProxDomInfo;
- UINT32 MaximumNumberOfProximityDomains;
- UINT32 MaximumNumberOfClockDomains;
- UINT64 MaximumPhysicalAddress;
-} EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
-
-///
-/// MSCT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
-
-///
-/// Maximum Proximity Domain Information Structure Definition
-///
-typedef struct {
- UINT8 Revision;
- UINT8 Length;
- UINT32 ProximityDomainRangeLow;
- UINT32 ProximityDomainRangeHigh;
- UINT32 MaximumProcessorCapacity;
- UINT64 MaximumMemoryCapacity;
-} EFI_ACPI_6_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
-
-///
-/// ACPI RAS Feature Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier[12];
-} EFI_ACPI_6_0_RAS_FEATURE_TABLE;
-
-///
-/// RASF Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_RAS_FEATURE_TABLE_REVISION 0x01
-
-///
-/// ACPI RASF Platform Communication Channel Shared Memory Region definition.
-///
-typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT16 Version;
- UINT8 RASCapabilities[16];
- UINT8 SetRASCapabilities[16];
- UINT16 NumberOfRASFParameterBlocks;
- UINT32 SetRASCapabilitiesStatus;
-} EFI_ACPI_6_0_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
-
-///
-/// ACPI RASF PCC command code
-///
-#define EFI_ACPI_6_0_RASF_PCC_COMMAND_CODE_EXECUTE_RASF_COMMAND 0x01
-
-///
-/// ACPI RASF Platform RAS Capabilities
-///
-#define EFI_ACPI_6_0_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED 0x01
-#define EFI_ACPI_6_0_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPOTED_AND_EXPOSED_TO_SOFTWARE 0x02
-
-///
-/// ACPI RASF Parameter Block structure for PATROL_SCRUB
-///
-typedef struct {
- UINT16 Type;
- UINT16 Version;
- UINT16 Length;
- UINT16 PatrolScrubCommand;
- UINT64 RequestedAddressRange[2];
- UINT64 ActualAddressRange[2];
- UINT16 Flags;
- UINT8 RequestedSpeed;
-} EFI_ACPI_6_0_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE;
-
-///
-/// ACPI RASF Patrol Scrub command
-///
-#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01
-#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02
-#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03
-
-///
-/// Memory Power State Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT8 PlatformCommunicationChannelIdentifier;
- UINT8 Reserved[3];
-// Memory Power Node Structure
-// Memory Power State Characteristics
-} EFI_ACPI_6_0_MEMORY_POWER_STATUS_TABLE;
-
-///
-/// MPST Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01
-
-///
-/// MPST Platform Communication Channel Shared Memory Region definition.
-///
-typedef struct {
- UINT32 Signature;
- UINT16 Command;
- UINT16 Status;
- UINT32 MemoryPowerCommandRegister;
- UINT32 MemoryPowerStatusRegister;
- UINT32 PowerStateId;
- UINT32 MemoryPowerNodeId;
- UINT64 MemoryEnergyConsumed;
- UINT64 ExpectedAveragePowerComsuned;
-} EFI_ACPI_6_0_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION;
-
-///
-/// ACPI MPST PCC command code
-///
-#define EFI_ACPI_6_0_MPST_PCC_COMMAND_CODE_EXECUTE_MPST_COMMAND 0x03
-
-///
-/// ACPI MPST Memory Power command
-///
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04
-
-///
-/// MPST Memory Power Node Table
-///
-typedef struct {
- UINT8 PowerStateValue;
- UINT8 PowerStateInformationIndex;
-} EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE;
-
-typedef struct {
- UINT8 Flag;
- UINT8 Reserved;
- UINT16 MemoryPowerNodeId;
- UINT32 Length;
- UINT64 AddressBase;
- UINT64 AddressLength;
- UINT32 NumberOfPowerStates;
- UINT32 NumberOfPhysicalComponents;
-//EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates];
-//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents];
-} EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE;
-
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04
-
-typedef struct {
- UINT16 MemoryPowerNodeCount;
- UINT8 Reserved[2];
-} EFI_ACPI_6_0_MPST_MEMORY_POWER_NODE_TABLE;
-
-///
-/// MPST Memory Power State Characteristics Table
-///
-typedef struct {
- UINT8 PowerStateStructureID;
- UINT8 Flag;
- UINT16 Reserved;
- UINT32 AveragePowerConsumedInMPS0;
- UINT32 RelativePowerSavingToMPS0;
- UINT64 ExitLatencyToMPS0;
-} EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE;
-
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02
-#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04
-
-typedef struct {
- UINT16 MemoryPowerStateCharacteristicsCount;
- UINT8 Reserved[2];
-} EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE;
-
-///
-/// Memory Topology Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
-} EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE;
-
-///
-/// PMTT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01
-
-///
-/// Common Memory Aggregator Device Structure.
-///
-typedef struct {
- UINT8 Type;
- UINT8 Reserved;
- UINT16 Length;
- UINT16 Flags;
- UINT16 Reserved1;
-} EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// Memory Aggregator Device Type
-///
-#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x1
-#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x2
-#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x3
-
-///
-/// Socket Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 SocketIdentifier;
- UINT16 Reserved;
-//EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[];
-} EFI_ACPI_6_0_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// MemoryController Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT32 ReadLatency;
- UINT32 WriteLatency;
- UINT32 ReadBandwidth;
- UINT32 WriteBandwidth;
- UINT16 OptimalAccessUnit;
- UINT16 OptimalAccessAlignment;
- UINT16 Reserved;
- UINT16 NumberOfProximityDomains;
-//UINT32 ProximityDomain[NumberOfProximityDomains];
-//EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[];
-} EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// DIMM Memory Aggregator Device Structure.
-///
-typedef struct {
- EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header;
- UINT16 PhysicalComponentIdentifier;
- UINT16 Reserved;
- UINT32 SizeOfDimm;
- UINT32 SmbiosHandle;
-} EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE;
-
-///
-/// Boot Graphics Resource Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- ///
- /// 2-bytes (16 bit) version ID. This value must be 1.
- ///
- UINT16 Version;
- ///
- /// 1-byte status field indicating current status about the table.
- /// Bits[7:1] = Reserved (must be zero)
- /// Bit [0] = Valid. A one indicates the boot image graphic is valid.
- ///
- UINT8 Status;
- ///
- /// 1-byte enumerated type field indicating format of the image.
- /// 0 = Bitmap
- /// 1 - 255 Reserved (for future use)
- ///
- UINT8 ImageType;
- ///
- /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy
- /// of the image bitmap.
- ///
- UINT64 ImageAddress;
- ///
- /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image.
- /// (X, Y) display offset of the top left corner of the boot image.
- /// The top left corner of the display is at offset (0, 0).
- ///
- UINT32 ImageOffsetX;
- ///
- /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image.
- /// (X, Y) display offset of the top left corner of the boot image.
- /// The top left corner of the display is at offset (0, 0).
- ///
- UINT32 ImageOffsetY;
-} EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE;
-
-///
-/// BGRT Revision
-///
-#define EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1
-
-///
-/// BGRT Version
-///
-#define EFI_ACPI_6_0_BGRT_VERSION 0x01
-
-///
-/// BGRT Status
-///
-#define EFI_ACPI_6_0_BGRT_STATUS_NOT_DISPLAYED 0x00
-#define EFI_ACPI_6_0_BGRT_STATUS_DISPLAYED 0x01
-
-///
-/// BGRT Image Type
-///
-#define EFI_ACPI_6_0_BGRT_IMAGE_TYPE_BMP 0x00
-
-///
-/// FPDT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01
-
-///
-/// FPDT Performance Record Types
-///
-#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000
-#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001
-
-///
-/// FPDT Performance Record Revision
-///
-#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01
-#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01
-
-///
-/// FPDT Runtime Performance Record Types
-///
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002
-
-///
-/// FPDT Runtime Performance Record Revision
-///
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_REVISION_S3_RESUME 0x01
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_REVISION_S3_SUSPEND 0x01
-#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_REVISION_FIRMWARE_BASIC_BOOT 0x02
-
-///
-/// FPDT Performance Record header
-///
-typedef struct {
- UINT16 Type;
- UINT8 Length;
- UINT8 Revision;
-} EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER;
-
-///
-/// FPDT Performance Table header
-///
-typedef struct {
- UINT32 Signature;
- UINT32 Length;
-} EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER;
-
-///
-/// FPDT Firmware Basic Boot Performance Pointer Record Structure
-///
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// 64-bit processor-relative physical address of the Basic Boot Performance Table.
- ///
- UINT64 BootPerformanceTablePointer;
-} EFI_ACPI_6_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD;
-
-///
-/// FPDT S3 Performance Table Pointer Record Structure
-///
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// 64-bit processor-relative physical address of the S3 Performance Table.
- ///
- UINT64 S3PerformanceTablePointer;
-} EFI_ACPI_6_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD;
-
-///
-/// FPDT Firmware Basic Boot Performance Record Structure
-///
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- UINT32 Reserved;
- ///
- /// Timer value logged at the beginning of firmware image execution.
- /// This may not always be zero or near zero.
- ///
- UINT64 ResetEnd;
- ///
- /// Timer value logged just prior to loading the OS boot loader into memory.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 OsLoaderLoadImageStart;
- ///
- /// Timer value logged just prior to launching the previously loaded OS boot loader image.
- /// For non-UEFI compatible boots, the timer value logged will be just prior
- /// to the INT 19h handler invocation.
- ///
- UINT64 OsLoaderStartImageStart;
- ///
- /// Timer value logged at the point when the OS loader calls the
- /// ExitBootServices function for UEFI compatible firmware.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 ExitBootServicesEntry;
- ///
- /// Timer value logged at the point just prior towhen the OS loader gaining
- /// control back from calls the ExitBootServices function for UEFI compatible firmware.
- /// For non-UEFI compatible boots, this field must be zero.
- ///
- UINT64 ExitBootServicesExit;
-} EFI_ACPI_6_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD;
-
-///
-/// FPDT Firmware Basic Boot Performance Table signature
-///
-#define EFI_ACPI_6_0_FPDT_BOOT_PERFORMANCE_TABLE_SIGNATURE SIGNATURE_32('F', 'B', 'P', 'T')
-
-//
-// FPDT Firmware Basic Boot Performance Table
-//
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
- //
- // one or more Performance Records.
- //
-} EFI_ACPI_6_0_FPDT_FIRMWARE_BASIC_BOOT_TABLE;
-
-///
-/// FPDT "S3PT" S3 Performance Table
-///
-#define EFI_ACPI_6_0_FPDT_S3_PERFORMANCE_TABLE_SIGNATURE SIGNATURE_32('S', '3', 'P', 'T')
-
-//
-// FPDT Firmware S3 Boot Performance Table
-//
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header;
- //
- // one or more Performance Records.
- //
-} EFI_ACPI_6_0_FPDT_FIRMWARE_S3_BOOT_TABLE;
-
-///
-/// FPDT Basic S3 Resume Performance Record
-///
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// A count of the number of S3 resume cycles since the last full boot sequence.
- ///
- UINT32 ResumeCount;
- ///
- /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the
- /// OS waking vector. Only the most recent resume cycle's time is retained.
- ///
- UINT64 FullResume;
- ///
- /// Average timer value of all resume cycles logged since the last full boot
- /// sequence, including the most recent resume. Note that the entire log of
- /// timer values does not need to be retained in order to calculate this average.
- ///
- UINT64 AverageResume;
-} EFI_ACPI_6_0_FPDT_S3_RESUME_RECORD;
-
-///
-/// FPDT Basic S3 Suspend Performance Record
-///
-typedef struct {
- EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header;
- ///
- /// Timer value recorded at the OS write to SLP_TYP upon entry to S3.
- /// Only the most recent suspend cycle's timer value is retained.
- ///
- UINT64 SuspendStart;
- ///
- /// Timer value recorded at the final firmware write to SLP_TYP (or other
- /// mechanism) used to trigger hardware entry to S3.
- /// Only the most recent suspend cycle's timer value is retained.
- ///
- UINT64 SuspendEnd;
-} EFI_ACPI_6_0_FPDT_S3_SUSPEND_RECORD;
-
-///
-/// Firmware Performance Record Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
-} EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_RECORD_TABLE;
-
-///
-/// Generic Timer Description Table definition.
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 CntControlBasePhysicalAddress;
- UINT32 Reserved;
- UINT32 SecurePL1TimerGSIV;
- UINT32 SecurePL1TimerFlags;
- UINT32 NonSecurePL1TimerGSIV;
- UINT32 NonSecurePL1TimerFlags;
- UINT32 VirtualTimerGSIV;
- UINT32 VirtualTimerFlags;
- UINT32 NonSecurePL2TimerGSIV;
- UINT32 NonSecurePL2TimerFlags;
- UINT64 CntReadBasePhysicalAddress;
- UINT32 PlatformTimerCount;
- UINT32 PlatformTimerOffset;
-} EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE;
-
-///
-/// GTDT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02
-
-///
-/// Timer Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2
-
-///
-/// Platform Timer Type
-///
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK 0
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG 1
-
-///
-/// GT Block Structure
-///
-typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 CntCtlBase;
- UINT32 GTBlockTimerCount;
- UINT32 GTBlockTimerOffset;
-} EFI_ACPI_6_0_GTDT_GT_BLOCK_STRUCTURE;
-
-///
-/// GT Block Timer Structure
-///
-typedef struct {
- UINT8 GTFrameNumber;
- UINT8 Reserved[3];
- UINT64 CntBaseX;
- UINT64 CntEL0BaseX;
- UINT32 GTxPhysicalTimerGSIV;
- UINT32 GTxPhysicalTimerFlags;
- UINT32 GTxVirtualTimerGSIV;
- UINT32 GTxVirtualTimerFlags;
- UINT32 GTxCommonFlags;
-} EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_STRUCTURE;
-
-///
-/// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-
-///
-/// Common Flags Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0
-#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1
-
-///
-/// SBSA Generic Watchdog Structure
-///
-typedef struct {
- UINT8 Type;
- UINT16 Length;
- UINT8 Reserved;
- UINT64 RefreshFramePhysicalAddress;
- UINT64 WatchdogControlFramePhysicalAddress;
- UINT32 WatchdogTimerGSIV;
- UINT32 WatchdogTimerFlags;
-} EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE;
-
-///
-/// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0.
-///
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1
-#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2
-
-//
-// NVDIMM Firmware Interface Table definition.
-//
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Reserved;
-} EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE;
-
-//
-// NFIT Version (as defined in ACPI 6.0 spec.)
-//
-#define EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1
-
-//
-// Definition for NFIT Table Structure Types
-//
-#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_TO_SYSTEM_ADDRESS_RANGE_MAP_STRUCTURE_TYPE 1
-#define EFI_ACPI_6_0_NFIT_INTERLEAVE_STRUCTURE_TYPE 2
-#define EFI_ACPI_6_0_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3
-#define EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4
-#define EFI_ACPI_6_0_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5
-#define EFI_ACPI_6_0_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6
-
-//
-// Definition for NFIT Structure Header
-//
-typedef struct {
- UINT16 Type;
- UINT16 Length;
-} EFI_ACPI_6_0_NFIT_STRUCTURE_HEADER;
-
-//
-// Definition for System Physical Address Range Structure
-//
-#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0
-#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1
-#define EFI_ACPI_6_0_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }}
-#define EFI_ACPI_6_0_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }}
-#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }}
-#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }}
-#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }}
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 SPARangeStructureIndex;
- UINT16 Flags;
- UINT32 Reserved_8;
- UINT32 ProximityDomain;
- GUID AddressRangeTypeGUID;
- UINT64 SystemPhysicalAddressRangeBase;
- UINT64 SystemPhysicalAddressRangeLength;
- UINT64 AddressRangeMemoryMappingAttribute;
-} EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE;
-
-//
-// Definition for Memory Device to System Physical Address Range Mapping Structure
-//
-typedef struct {
- UINT32 DIMMNumber:4;
- UINT32 MemoryChannelNumber:4;
- UINT32 MemoryControllerID:4;
- UINT32 SocketID:4;
- UINT32 NodeControllerID:12;
- UINT32 Reserved_28:4;
-} EFI_ACPI_6_0_NFIT_DEVICE_HANDLE;
-
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_LAST_RESTORE_FAIL BIT1
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_PLATFORM_FLUSH_FAIL BIT2
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_NOT_ARMED_PRIOR_TO_OSPM_HAND_OFF BIT3
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_SMART_HEALTH_EVENTS_PRIOR_OSPM_HAND_OFF BIT4
-#define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS BIT5
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle;
- UINT16 MemoryDevicePhysicalID;
- UINT16 MemoryDeviceRegionID;
- UINT16 SPARangeStructureIndex ;
- UINT16 NVDIMMControlRegionStructureIndex;
- UINT64 MemoryDeviceRegionSize;
- UINT64 RegionOffset;
- UINT64 MemoryDevicePhysicalAddressRegionBase;
- UINT16 InterleaveStructureIndex;
- UINT16 InterleaveWays;
- UINT16 MemoryDeviceStateFlags;
- UINT16 Reserved_46;
-} EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_TO_SYSTEM_ADDRESS_RANGE_MAP_STRUCTURE;
-
-//
-// Definition for Interleave Structure
-//
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 InterleaveStructureIndex;
- UINT16 Reserved_6;
- UINT32 NumberOfLines;
- UINT32 LineSize;
-//UINT32 LineOffset[NumberOfLines];
-} EFI_ACPI_6_0_NFIT_INTERLEAVE_STRUCTURE;
-
-//
-// Definition for SMBIOS Management Information Structure
-//
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT32 Reserved_4;
-//UINT8 Data[];
-} EFI_ACPI_6_0_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE;
-
-//
-// Definition for NVDIMM Control Region Structure
-//
-#define EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 NVDIMMControlRegionStructureIndex;
- UINT16 VendorID;
- UINT16 DeviceID;
- UINT16 RevisionID;
- UINT16 SubsystemVendorID;
- UINT16 SubsystemDeviceID;
- UINT16 SubsystemRevisionID;
- UINT8 Reserved_18[6];
- UINT32 SerialNumber;
- UINT16 RegionFormatInterfaceCode;
- UINT16 NumberOfBlockControlWindows;
- UINT64 SizeOfBlockControlWindow;
- UINT64 CommandRegisterOffsetInBlockControlWindow;
- UINT64 SizeOfCommandRegisterInBlockControlWindows;
- UINT64 StatusRegisterOffsetInBlockControlWindow;
- UINT64 SizeOfStatusRegisterInBlockControlWindows;
- UINT16 NVDIMMControlRegionFlag;
- UINT8 Reserved_74[6];
-} EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE;
-
-//
-// Definition for NVDIMM Block Data Window Region Structure
-//
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- UINT16 NVDIMMControlRegionStructureIndex;
- UINT16 NumberOfBlockDataWindows;
- UINT64 BlockDataWindowStartOffset;
- UINT64 SizeOfBlockDataWindow;
- UINT64 BlockAccessibleMemoryCapacity;
- UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory;
-} EFI_ACPI_6_0_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE;
-
-//
-// Definition for Flush Hint Address Structure
-//
-typedef struct {
- UINT16 Type;
- UINT16 Length;
- EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle;
- UINT16 NumberOfFlushHintAddresses;
- UINT8 Reserved_10[6];
-//UINT64 FlushHintAddress[NumberOfFlushHintAddresses];
-} EFI_ACPI_6_0_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE;
-
-///
-/// Boot Error Record Table (BERT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 BootErrorRegionLength;
- UINT64 BootErrorRegion;
-} EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_HEADER;
-
-///
-/// BERT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
-
-///
-/// Boot Error Region Block Status Definition
-///
-typedef struct {
- UINT32 UncorrectableErrorValid:1;
- UINT32 CorrectableErrorValid:1;
- UINT32 MultipleUncorrectableErrors:1;
- UINT32 MultipleCorrectableErrors:1;
- UINT32 ErrorDataEntryCount:10;
- UINT32 Reserved:18;
-} EFI_ACPI_6_0_ERROR_BLOCK_STATUS;
-
-///
-/// Boot Error Region Definition
-///
-typedef struct {
- EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_6_0_BOOT_ERROR_REGION_STRUCTURE;
-
-//
-// Boot Error Severity types
-//
-#define EFI_ACPI_6_0_ERROR_SEVERITY_CORRECTABLE 0x00
-#define EFI_ACPI_6_0_ERROR_SEVERITY_FATAL 0x01
-#define EFI_ACPI_6_0_ERROR_SEVERITY_CORRECTED 0x02
-#define EFI_ACPI_6_0_ERROR_SEVERITY_NONE 0x03
-
-///
-/// Generic Error Data Entry Definition
-///
-typedef struct {
- UINT8 SectionType[16];
- UINT32 ErrorSeverity;
- UINT16 Revision;
- UINT8 ValidationBits;
- UINT8 Flags;
- UINT32 ErrorDataLength;
- UINT8 FruId[16];
- UINT8 FruText[20];
-} EFI_ACPI_6_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
-
-///
-/// Generic Error Data Entry Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_GENERIC_ERROR_DATA_ENTRY_REVISION 0x0201
-
-///
-/// HEST - Hardware Error Source Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 ErrorSourceCount;
-} EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
-
-///
-/// HEST Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
-
-//
-// Error Source structure types.
-//
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION 0x00
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK 0x01
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_NMI_ERROR 0x02
-#define EFI_ACPI_6_0_PCI_EXPRESS_ROOT_PORT_AER 0x06
-#define EFI_ACPI_6_0_PCI_EXPRESS_DEVICE_AER 0x07
-#define EFI_ACPI_6_0_PCI_EXPRESS_BRIDGE_AER 0x08
-#define EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR 0x09
-
-//
-// Error Source structure flags.
-//
-#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0)
-#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1)
-
-///
-/// IA-32 Architecture Machine Check Exception Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT64 GlobalCapabilityInitData;
- UINT64 GlobalControlInitData;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[7];
-} EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure Definition
-///
-typedef struct {
- UINT8 BankNumber;
- UINT8 ClearStatusOnInitialization;
- UINT8 StatusDataFormat;
- UINT8 Reserved0;
- UINT32 ControlRegisterMsrAddress;
- UINT64 ControlInitData;
- UINT32 StatusRegisterMsrAddress;
- UINT32 AddressRegisterMsrAddress;
- UINT32 MiscRegisterMsrAddress;
-} EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
-
-///
-/// IA-32 Architecture Machine Check Bank Structure MCA data format
-///
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01
-#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02
-
-//
-// Hardware Error Notification types. All other values are reserved
-//
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06
-#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07
-
-///
-/// Hardware Error Notification Configuration Write Enable Structure Definition
-///
-typedef struct {
- UINT16 Type:1;
- UINT16 PollInterval:1;
- UINT16 SwitchToPollingThresholdValue:1;
- UINT16 SwitchToPollingThresholdWindow:1;
- UINT16 ErrorThresholdValue:1;
- UINT16 ErrorThresholdWindow:1;
- UINT16 Reserved:10;
-} EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
-
-///
-/// Hardware Error Notification Structure Definition
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable;
- UINT32 PollInterval;
- UINT32 Vector;
- UINT32 SwitchToPollingThresholdValue;
- UINT32 SwitchToPollingThresholdWindow;
- UINT32 ErrorThresholdValue;
- UINT32 ErrorThresholdWindow;
-} EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
-
-///
-/// IA-32 Architecture Corrected Machine Check Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT8 NumberOfHardwareBanks;
- UINT8 Reserved1[3];
-} EFI_ACPI_6_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
-
-///
-/// IA-32 Architecture NMI Error Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
-} EFI_ACPI_6_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
-
-///
-/// PCI Express Root Port AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 RootErrorCommand;
-} EFI_ACPI_6_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
-
-///
-/// PCI Express Device AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_6_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
-
-///
-/// PCI Express Bridge AER Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT8 Reserved0[2];
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 Bus;
- UINT16 Device;
- UINT16 Function;
- UINT16 DeviceControl;
- UINT8 Reserved1[2];
- UINT32 UncorrectableErrorMask;
- UINT32 UncorrectableErrorSeverity;
- UINT32 CorrectableErrorMask;
- UINT32 AdvancedErrorCapabilitiesAndControl;
- UINT32 SecondaryUncorrectableErrorMask;
- UINT32 SecondaryUncorrectableErrorSeverity;
- UINT32 SecondaryAdvancedErrorCapabilitiesAndControl;
-} EFI_ACPI_6_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
-
-///
-/// Generic Hardware Error Source Structure Definition
-///
-typedef struct {
- UINT16 Type;
- UINT16 SourceId;
- UINT16 RelatedSourceId;
- UINT8 Flags;
- UINT8 Enabled;
- UINT32 NumberOfRecordsToPreAllocate;
- UINT32 MaxSectionsPerRecord;
- UINT32 MaxRawDataLength;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress;
- EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure;
- UINT32 ErrorStatusBlockLength;
-} EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
-
-///
-/// Generic Error Status Definition
-///
-typedef struct {
- EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus;
- UINT32 RawDataOffset;
- UINT32 RawDataLength;
- UINT32 DataLength;
- UINT32 ErrorSeverity;
-} EFI_ACPI_6_0_GENERIC_ERROR_STATUS_STRUCTURE;
-
-///
-/// ERST - Error Record Serialization Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 SerializationHeaderSize;
- UINT8 Reserved0[4];
- UINT32 InstructionEntryCount;
-} EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
-
-///
-/// ERST Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
-
-///
-/// ERST Serialization Actions
-///
-#define EFI_ACPI_6_0_ERST_BEGIN_WRITE_OPERATION 0x00
-#define EFI_ACPI_6_0_ERST_BEGIN_READ_OPERATION 0x01
-#define EFI_ACPI_6_0_ERST_BEGIN_CLEAR_OPERATION 0x02
-#define EFI_ACPI_6_0_ERST_END_OPERATION 0x03
-#define EFI_ACPI_6_0_ERST_SET_RECORD_OFFSET 0x04
-#define EFI_ACPI_6_0_ERST_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_6_0_ERST_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_6_0_ERST_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_6_0_ERST_GET_RECORD_IDENTIFIER 0x08
-#define EFI_ACPI_6_0_ERST_SET_RECORD_IDENTIFIER 0x09
-#define EFI_ACPI_6_0_ERST_GET_RECORD_COUNT 0x0A
-#define EFI_ACPI_6_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B
-#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D
-#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E
-#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F
-
-///
-/// ERST Action Command Status
-///
-#define EFI_ACPI_6_0_ERST_STATUS_SUCCESS 0x00
-#define EFI_ACPI_6_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01
-#define EFI_ACPI_6_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02
-#define EFI_ACPI_6_0_ERST_STATUS_FAILED 0x03
-#define EFI_ACPI_6_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04
-#define EFI_ACPI_6_0_ERST_STATUS_RECORD_NOT_FOUND 0x05
-
-///
-/// ERST Serialization Instructions
-///
-#define EFI_ACPI_6_0_ERST_READ_REGISTER 0x00
-#define EFI_ACPI_6_0_ERST_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_6_0_ERST_WRITE_REGISTER 0x02
-#define EFI_ACPI_6_0_ERST_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_6_0_ERST_NOOP 0x04
-#define EFI_ACPI_6_0_ERST_LOAD_VAR1 0x05
-#define EFI_ACPI_6_0_ERST_LOAD_VAR2 0x06
-#define EFI_ACPI_6_0_ERST_STORE_VAR1 0x07
-#define EFI_ACPI_6_0_ERST_ADD 0x08
-#define EFI_ACPI_6_0_ERST_SUBTRACT 0x09
-#define EFI_ACPI_6_0_ERST_ADD_VALUE 0x0A
-#define EFI_ACPI_6_0_ERST_SUBTRACT_VALUE 0x0B
-#define EFI_ACPI_6_0_ERST_STALL 0x0C
-#define EFI_ACPI_6_0_ERST_STALL_WHILE_TRUE 0x0D
-#define EFI_ACPI_6_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E
-#define EFI_ACPI_6_0_ERST_GOTO 0x0F
-#define EFI_ACPI_6_0_ERST_SET_SRC_ADDRESS_BASE 0x10
-#define EFI_ACPI_6_0_ERST_SET_DST_ADDRESS_BASE 0x11
-#define EFI_ACPI_6_0_ERST_MOVE_DATA 0x12
-
-///
-/// ERST Instruction Flags
-///
-#define EFI_ACPI_6_0_ERST_PRESERVE_REGISTER 0x01
-
-///
-/// ERST Serialization Instruction Entry
-///
-typedef struct {
- UINT8 SerializationAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_6_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ - Error Injection Table
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 InjectionHeaderSize;
- UINT8 InjectionFlags;
- UINT8 Reserved0[3];
- UINT32 InjectionEntryCount;
-} EFI_ACPI_6_0_ERROR_INJECTION_TABLE_HEADER;
-
-///
-/// EINJ Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_ERROR_INJECTION_TABLE_REVISION 0x01
-
-///
-/// EINJ Error Injection Actions
-///
-#define EFI_ACPI_6_0_EINJ_BEGIN_INJECTION_OPERATION 0x00
-#define EFI_ACPI_6_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01
-#define EFI_ACPI_6_0_EINJ_SET_ERROR_TYPE 0x02
-#define EFI_ACPI_6_0_EINJ_GET_ERROR_TYPE 0x03
-#define EFI_ACPI_6_0_EINJ_END_OPERATION 0x04
-#define EFI_ACPI_6_0_EINJ_EXECUTE_OPERATION 0x05
-#define EFI_ACPI_6_0_EINJ_CHECK_BUSY_STATUS 0x06
-#define EFI_ACPI_6_0_EINJ_GET_COMMAND_STATUS 0x07
-#define EFI_ACPI_6_0_EINJ_TRIGGER_ERROR 0xFF
-
-///
-/// EINJ Action Command Status
-///
-#define EFI_ACPI_6_0_EINJ_STATUS_SUCCESS 0x00
-#define EFI_ACPI_6_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01
-#define EFI_ACPI_6_0_EINJ_STATUS_INVALID_ACCESS 0x02
-
-///
-/// EINJ Error Type Definition
-///
-#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0)
-#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1)
-#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2)
-#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3)
-#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4)
-#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5)
-#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6)
-#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7)
-#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8)
-#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9)
-#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10)
-#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11)
-
-///
-/// EINJ Injection Instructions
-///
-#define EFI_ACPI_6_0_EINJ_READ_REGISTER 0x00
-#define EFI_ACPI_6_0_EINJ_READ_REGISTER_VALUE 0x01
-#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER 0x02
-#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER_VALUE 0x03
-#define EFI_ACPI_6_0_EINJ_NOOP 0x04
-
-///
-/// EINJ Instruction Flags
-///
-#define EFI_ACPI_6_0_EINJ_PRESERVE_REGISTER 0x01
-
-///
-/// EINJ Injection Instruction Entry
-///
-typedef struct {
- UINT8 InjectionAction;
- UINT8 Instruction;
- UINT8 Flags;
- UINT8 Reserved0;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
- UINT64 Value;
- UINT64 Mask;
-} EFI_ACPI_6_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
-
-///
-/// EINJ Trigger Action Table
-///
-typedef struct {
- UINT32 HeaderSize;
- UINT32 Revision;
- UINT32 TableSize;
- UINT32 EntryCount;
-} EFI_ACPI_6_0_EINJ_TRIGGER_ACTION_TABLE;
-
-///
-/// Platform Communications Channel Table (PCCT)
-///
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Flags;
- UINT64 Reserved;
-} EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER;
-
-///
-/// PCCT Version (as defined in ACPI 6.0 spec.)
-///
-#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01
-
-///
-/// PCCT Global Flags
-///
-#define EFI_ACPI_6_0_PCCT_FLAGS_SCI_DOORBELL BIT0
-
-//
-// PCCT Subspace type
-//
-#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00
-
-///
-/// PCC Subspace Structure Header
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
-} EFI_ACPI_6_0_PCCT_SUBSPACE_HEADER;
-
-///
-/// Generic Communications Subspace Structure
-///
-typedef struct {
- UINT8 Type;
- UINT8 Length;
- UINT8 Reserved[6];
- UINT64 BaseAddress;
- UINT64 AddressLength;
- EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister;
- UINT64 DoorbellPreserve;
- UINT64 DoorbellWrite;
- UINT32 NominalLatency;
- UINT32 MaximumPeriodicAccessRate;
- UINT16 MinimumRequestTurnaroundTime;
-} EFI_ACPI_6_0_PCCT_SUBSPACE_GENERIC;
-
-///
-/// Generic Communications Channel Shared Memory Region
-///
-
-typedef struct {
- UINT8 Command;
- UINT8 Reserved:7;
- UINT8 GenerateSci:1;
-} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND;
-
-typedef struct {
- UINT8 CommandComplete:1;
- UINT8 SciDoorbell:1;
- UINT8 Error:1;
- UINT8 PlatformNotification:1;
- UINT8 Reserved:4;
- UINT8 Reserved1;
-} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
-
-typedef struct {
- UINT32 Signature;
- EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND Command;
- EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status;
-} EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER;
-
-//
-// Known table signatures
-//
-
-///
-/// "RSD PTR " Root System Description Pointer
-///
-#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
-
-///
-/// "APIC" Multiple APIC Description Table
-///
-#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
-
-///
-/// "BERT" Boot Error Record Table
-///
-#define EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE SIGNATURE_32('B', 'E', 'R', 'T')
-
-///
-/// "BGRT" Boot Graphics Resource Table
-///
-#define EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('B', 'G', 'R', 'T')
-
-///
-/// "CPEP" Corrected Platform Error Polling Table
-///
-#define EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE SIGNATURE_32('C', 'P', 'E', 'P')
-
-///
-/// "DSDT" Differentiated System Description Table
-///
-#define EFI_ACPI_6_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
-
-///
-/// "ECDT" Embedded Controller Boot Resources Table
-///
-#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE SIGNATURE_32('E', 'C', 'D', 'T')
-
-///
-/// "EINJ" Error Injection Table
-///
-#define EFI_ACPI_6_0_ERROR_INJECTION_TABLE_SIGNATURE SIGNATURE_32('E', 'I', 'N', 'J')
-
-///
-/// "ERST" Error Record Serialization Table
-///
-#define EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE SIGNATURE_32('E', 'R', 'S', 'T')
-
-///
-/// "FACP" Fixed ACPI Description Table
-///
-#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
-
-///
-/// "FACS" Firmware ACPI Control Structure
-///
-#define EFI_ACPI_6_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
-
-///
-/// "FPDT" Firmware Performance Data Table
-///
-#define EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_DATA_TABLE_SIGNATURE SIGNATURE_32('F', 'P', 'D', 'T')
-
-///
-/// "GTDT" Generic Timer Description Table
-///
-#define EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('G', 'T', 'D', 'T')
-
-///
-/// "HEST" Hardware Error Source Table
-///
-#define EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE SIGNATURE_32('H', 'E', 'S', 'T')
-
-///
-/// "MPST" Memory Power State Table
-///
-#define EFI_ACPI_6_0_MEMORY_POWER_STATE_TABLE_SIGNATURE SIGNATURE_32('M', 'P', 'S', 'T')
-
-///
-/// "MSCT" Maximum System Characteristics Table
-///
-#define EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'C', 'T')
-
-///
-/// "NFIT" NVDIMM Firmware Interface Table
-///
-#define EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE_STRUCTURE_SIGNATURE SIGNATURE_32('N', 'F', 'I', 'T')
-
-///
-/// "PMTT" Platform Memory Topology Table
-///
-#define EFI_ACPI_6_0_PLATFORM_MEMORY_TOPOLOGY_TABLE_SIGNATURE SIGNATURE_32('P', 'M', 'T', 'T')
-
-///
-/// "PSDT" Persistent System Description Table
-///
-#define EFI_ACPI_6_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
-
-///
-/// "RASF" ACPI RAS Feature Table
-///
-#define EFI_ACPI_6_0_ACPI_RAS_FEATURE_TABLE_SIGNATURE SIGNATURE_32('R', 'A', 'S', 'F')
-
-///
-/// "RSDT" Root System Description Table
-///
-#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
-
-///
-/// "SBST" Smart Battery Specification Table
-///
-#define EFI_ACPI_6_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
-
-///
-/// "SLIT" System Locality Information Table
-///
-#define EFI_ACPI_6_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'T')
-
-///
-/// "SRAT" System Resource Affinity Table
-///
-#define EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE SIGNATURE_32('S', 'R', 'A', 'T')
-
-///
-/// "SSDT" Secondary System Description Table
-///
-#define EFI_ACPI_6_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
-
-///
-/// "XSDT" Extended System Description Table
-///
-#define EFI_ACPI_6_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('X', 'S', 'D', 'T')
-
-///
-/// "BOOT" MS Simple Boot Spec
-///
-#define EFI_ACPI_6_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE SIGNATURE_32('B', 'O', 'O', 'T')
-
-///
-/// "CSRT" MS Core System Resource Table
-///
-#define EFI_ACPI_6_0_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('C', 'S', 'R', 'T')
-
-///
-/// "DBG2" MS Debug Port 2 Spec
-///
-#define EFI_ACPI_6_0_DEBUG_PORT_2_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', '2')
-
-///
-/// "DBGP" MS Debug Port Spec
-///
-#define EFI_ACPI_6_0_DEBUG_PORT_TABLE_SIGNATURE SIGNATURE_32('D', 'B', 'G', 'P')
-
-///
-/// "DMAR" DMA Remapping Table
-///
-#define EFI_ACPI_6_0_DMA_REMAPPING_TABLE_SIGNATURE SIGNATURE_32('D', 'M', 'A', 'R')
-
-///
-/// "DRTM" Dynamic Root of Trust for Measurement Table
-///
-#define EFI_ACPI_6_0_DYNAMIC_ROOT_OF_TRUST_FOR_MEASUREMENT_TABLE_SIGNATURE SIGNATURE_32('D', 'R', 'T', 'M')
-
-///
-/// "ETDT" Event Timer Description Table
-///
-#define EFI_ACPI_6_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('E', 'T', 'D', 'T')
-
-///
-/// "HPET" IA-PC High Precision Event Timer Table
-///
-#define EFI_ACPI_6_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE SIGNATURE_32('H', 'P', 'E', 'T')
-
-///
-/// "iBFT" iSCSI Boot Firmware Table
-///
-#define EFI_ACPI_6_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE SIGNATURE_32('i', 'B', 'F', 'T')
-
-///
-/// "IORT" Interrupt Source Override
-///
-#define EFI_ACPI_6_0_INTERRUPT_SOURCE_OVERRIDE_SIGNATURE SIGNATURE_32('I', 'O', 'R', 'T')
-
-///
-/// "IVRS" I/O Virtualization Reporting Structure
-///
-#define EFI_ACPI_6_0_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE SIGNATURE_32('I', 'V', 'R', 'S')
-
-///
-/// "LPIT" Low Power Idle Table
-///
-#define EFI_ACPI_6_0_LOW_POWER_IDLE_TABLE_STRUCTURE_SIGNATURE SIGNATURE_32('L', 'P', 'I', 'T')
-
-///
-/// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
-///
-#define EFI_ACPI_6_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'F', 'G')
-
-///
-/// "MCHI" Management Controller Host Interface Table
-///
-#define EFI_ACPI_6_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('M', 'C', 'H', 'I')
-
-///
-/// "MSDM" MS Data Management Table
-///
-#define EFI_ACPI_6_0_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
-
-///
-/// "SLIC" MS Software Licensing Table Specification
-///
-#define EFI_ACPI_6_0_SOFTWARE_LICENSING_TABLE_SIGNATURE SIGNATURE_32('S', 'L', 'I', 'C')
-
-///
-/// "SPCR" Serial Port Concole Redirection Table
-///
-#define EFI_ACPI_6_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'C', 'R')
-
-///
-/// "SPMI" Server Platform Management Interface Table
-///
-#define EFI_ACPI_6_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE SIGNATURE_32('S', 'P', 'M', 'I')
-
-///
-/// "STAO" _STA Override Table
-///
-#define EFI_ACPI_6_0_STA_OVERRIDE_TABLE_SIGNATURE SIGNATURE_32('S', 'T', 'A', 'O')
-
-///
-/// "TCPA" Trusted Computing Platform Alliance Capabilities Table
-///
-#define EFI_ACPI_6_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE SIGNATURE_32('T', 'C', 'P', 'A')
-
-///
-/// "TPM2" Trusted Computing Platform 1 Table
-///
-#define EFI_ACPI_6_0_TRUSTED_COMPUTING_PLATFORM_2_TABLE_SIGNATURE SIGNATURE_32('T', 'P', 'M', '2')
-
-///
-/// "UEFI" UEFI ACPI Data Table
-///
-#define EFI_ACPI_6_0_UEFI_ACPI_DATA_TABLE_SIGNATURE SIGNATURE_32('U', 'E', 'F', 'I')
-
-///
-/// "WAET" Windows ACPI Emulated Devices Table
-///
-#define EFI_ACPI_6_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T')
-
-///
-/// "WDAT" Watchdog Action Table
-///
-#define EFI_ACPI_6_0_WATCHDOG_ACTION_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'A', 'T')
-
-///
-/// "WDRT" Watchdog Resource Table
-///
-#define EFI_ACPI_6_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE SIGNATURE_32('W', 'D', 'R', 'T')
-
-///
-/// "WPBT" MS Platform Binary Table
-///
-#define EFI_ACPI_6_0_PLATFORM_BINARY_TABLE_SIGNATURE SIGNATURE_32('W', 'P', 'B', 'T')
-
-///
-/// "XENV" Xen Project Table
-///
-#define EFI_ACPI_6_0_XEN_PROJECT_TABLE_SIGNATURE SIGNATURE_32('X', 'E', 'N', 'V')
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Bluetooth.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Bluetooth.h
deleted file mode 100644
index f63ab8901..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Bluetooth.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/** @file
- This file contains the Bluetooth definitions that are consumed by drivers.
- These definitions are from Bluetooth Core Specification Version 4.0 June, 2010
-
- Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _BLUETOOTH_H_
-#define _BLUETOOTH_H_
-
-FILE_LICENCE ( BSD3 );
-
-#pragma pack(1)
-
-///
-/// BLUETOOTH_ADDRESS
-///
-typedef struct {
- ///
- /// 48bit Bluetooth device address.
- ///
- UINT8 Address[6];
-} BLUETOOTH_ADDRESS;
-
-///
-/// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail.
-///
-typedef struct {
- UINT8 FormatType:2;
- UINT8 MinorDeviceClass: 6;
- UINT16 MajorDeviceClass: 5;
- UINT16 MajorServiceClass:11;
-} BLUETOOTH_CLASS_OF_DEVICE;
-
-#pragma pack()
-
-#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248
-
-#define BLUETOOTH_HCI_LINK_KEY_SIZE 16
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Pci22.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Pci22.h
index f0f2ae922..a73820f69 100644
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Pci22.h
+++ b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Pci22.h
@@ -9,7 +9,7 @@
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
- Copyright (c) 2014 - 2105, Hewlett-Packard Development Company, L.P.<BR>
+ Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<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
@@ -554,7 +554,6 @@ typedef struct {
#define PCI_BRIDGE_PRIMARY_BUS_REGISTER_OFFSET 0x18
#define PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET 0x19
#define PCI_BRIDGE_SUBORDINATE_BUS_REGISTER_OFFSET 0x1a
-#define PCI_BRIDGE_SECONDARY_LATENCY_TIMER_OFFSET 0x1b
#define PCI_BRIDGE_STATUS_REGISTER_OFFSET 0x1E
#define PCI_BRIDGE_CONTROL_REGISTER_OFFSET 0x3E
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Tpm20.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Tpm20.h
deleted file mode 100644
index 656bf21eb..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Tpm20.h
+++ /dev/null
@@ -1,1822 +0,0 @@
-/** @file
- TPM2.0 Specification data structures
- (Trusted Platform Module Library Specification, Family "2.0", Level 00, Revision 00.96,
- @http://www.trustedcomputinggroup.org/resources/tpm_library_specification)
-
- Check http://trustedcomputinggroup.org for latest specification updates.
-
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-
-#ifndef _TPM20_H_
-#define _TPM20_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Tpm12.h>
-
-#pragma pack (1)
-
-// Annex A Algorithm Constants
-
-// Table 205 - Defines for SHA1 Hash Values
-#define SHA1_DIGEST_SIZE 20
-#define SHA1_BLOCK_SIZE 64
-
-// Table 206 - Defines for SHA256 Hash Values
-#define SHA256_DIGEST_SIZE 32
-#define SHA256_BLOCK_SIZE 64
-
-// Table 207 - Defines for SHA384 Hash Values
-#define SHA384_DIGEST_SIZE 48
-#define SHA384_BLOCK_SIZE 128
-
-// Table 208 - Defines for SHA512 Hash Values
-#define SHA512_DIGEST_SIZE 64
-#define SHA512_BLOCK_SIZE 128
-
-// Table 209 - Defines for SM3_256 Hash Values
-#define SM3_256_DIGEST_SIZE 32
-#define SM3_256_BLOCK_SIZE 64
-
-// Table 210 - Defines for Architectural Limits Values
-#define MAX_SESSION_NUMBER 3
-
-// Annex B Implementation Definitions
-
-// Table 211 - Defines for Logic Values
-#define YES 1
-#define NO 0
-#define SET 1
-#define CLEAR 0
-
-// Table 215 - Defines for RSA Algorithm Constants
-#define MAX_RSA_KEY_BITS 2048
-#define MAX_RSA_KEY_BYTES ((MAX_RSA_KEY_BITS + 7) / 8)
-
-// Table 216 - Defines for ECC Algorithm Constants
-#define MAX_ECC_KEY_BITS 256
-#define MAX_ECC_KEY_BYTES ((MAX_ECC_KEY_BITS + 7) / 8)
-
-// Table 217 - Defines for AES Algorithm Constants
-#define MAX_AES_KEY_BITS 128
-#define MAX_AES_BLOCK_SIZE_BYTES 16
-#define MAX_AES_KEY_BYTES ((MAX_AES_KEY_BITS + 7) / 8)
-
-// Table 218 - Defines for SM4 Algorithm Constants
-#define MAX_SM4_KEY_BITS 128
-#define MAX_SM4_BLOCK_SIZE_BYTES 16
-#define MAX_SM4_KEY_BYTES ((MAX_SM4_KEY_BITS + 7) / 8)
-
-// Table 219 - Defines for Symmetric Algorithm Constants
-#define MAX_SYM_KEY_BITS MAX_AES_KEY_BITS
-#define MAX_SYM_KEY_BYTES MAX_AES_KEY_BYTES
-#define MAX_SYM_BLOCK_SIZE MAX_AES_BLOCK_SIZE_BYTES
-
-// Table 220 - Defines for Implementation Values
-typedef UINT16 BSIZE;
-#define BUFFER_ALIGNMENT 4
-#define IMPLEMENTATION_PCR 24
-#define PLATFORM_PCR 24
-#define DRTM_PCR 17
-#define NUM_LOCALITIES 5
-#define MAX_HANDLE_NUM 3
-#define MAX_ACTIVE_SESSIONS 64
-typedef UINT16 CONTEXT_SLOT;
-typedef UINT64 CONTEXT_COUNTER;
-#define MAX_LOADED_SESSIONS 3
-#define MAX_SESSION_NUM 3
-#define MAX_LOADED_OBJECTS 3
-#define MIN_EVICT_OBJECTS 2
-#define PCR_SELECT_MIN ((PLATFORM_PCR + 7) / 8)
-#define PCR_SELECT_MAX ((IMPLEMENTATION_PCR + 7) / 8)
-#define NUM_POLICY_PCR_GROUP 1
-#define NUM_AUTHVALUE_PCR_GROUP 1
-#define MAX_CONTEXT_SIZE 4000
-#define MAX_DIGEST_BUFFER 1024
-#define MAX_NV_INDEX_SIZE 1024
-#define MAX_CAP_BUFFER 1024
-#define NV_MEMORY_SIZE 16384
-#define NUM_STATIC_PCR 16
-#define MAX_ALG_LIST_SIZE 64
-#define TIMER_PRESCALE 100000
-#define PRIMARY_SEED_SIZE 32
-#define CONTEXT_ENCRYPT_ALG TPM_ALG_AES
-#define CONTEXT_ENCRYPT_KEY_BITS MAX_SYM_KEY_BITS
-#define CONTEXT_ENCRYPT_KEY_BYTES ((CONTEXT_ENCRYPT_KEY_BITS + 7) / 8)
-#define CONTEXT_INTEGRITY_HASH_ALG TPM_ALG_SHA256
-#define CONTEXT_INTEGRITY_HASH_SIZE SHA256_DIGEST_SIZE
-#define PROOF_SIZE CONTEXT_INTEGRITY_HASH_SIZE
-#define NV_CLOCK_UPDATE_INTERVAL 12
-#define NUM_POLICY_PCR 1
-#define MAX_COMMAND_SIZE 4096
-#define MAX_RESPONSE_SIZE 4096
-#define ORDERLY_BITS 8
-#define MAX_ORDERLY_COUNT ((1 << ORDERLY_BITS) - 1)
-#define ALG_ID_FIRST TPM_ALG_FIRST
-#define ALG_ID_LAST TPM_ALG_LAST
-#define MAX_SYM_DATA 128
-#define MAX_RNG_ENTROPY_SIZE 64
-#define RAM_INDEX_SPACE 512
-#define RSA_DEFAULT_PUBLIC_EXPONENT 0x00010001
-#define CRT_FORMAT_RSA YES
-#define PRIVATE_VENDOR_SPECIFIC_BYTES ((MAX_RSA_KEY_BYTES / 2) * ( 3 + CRT_FORMAT_RSA * 2))
-
-// Capability related MAX_ value
-#define MAX_CAP_DATA (MAX_CAP_BUFFER - sizeof(TPM_CAP) - sizeof(UINT32))
-#define MAX_CAP_ALGS (MAX_CAP_DATA / sizeof(TPMS_ALG_PROPERTY))
-#define MAX_CAP_HANDLES (MAX_CAP_DATA / sizeof(TPM_HANDLE))
-#define MAX_CAP_CC (MAX_CAP_DATA / sizeof(TPM_CC))
-#define MAX_TPM_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PROPERTY))
-#define MAX_PCR_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PCR_SELECT))
-#define MAX_ECC_CURVES (MAX_CAP_DATA / sizeof(TPM_ECC_CURVE))
-
-//
-// Always set 5 here, because we want to support all hash algo in BIOS.
-//
-#define HASH_COUNT 5
-
-// 5 Base Types
-
-// Table 3 - Definition of Base Types
-typedef UINT8 BYTE;
-
-// Table 4 - Definition of Types for Documentation Clarity
-//
-// NOTE: Comment because it has same name as TPM1.2 (value is same, so not runtime issue)
-//
-//typedef UINT32 TPM_ALGORITHM_ID;
-//typedef UINT32 TPM_MODIFIER_INDICATOR;
-typedef UINT32 TPM_AUTHORIZATION_SIZE;
-typedef UINT32 TPM_PARAMETER_SIZE;
-typedef UINT16 TPM_KEY_SIZE;
-typedef UINT16 TPM_KEY_BITS;
-
-// 6 Constants
-
-// Table 6 - TPM_GENERATED Constants
-typedef UINT32 TPM_GENERATED;
-#define TPM_GENERATED_VALUE (TPM_GENERATED)(0xff544347)
-
-// Table 7 - TPM_ALG_ID Constants
-typedef UINT16 TPM_ALG_ID;
-//
-// NOTE: Comment some algo which has same name as TPM1.2 (value is same, so not runtime issue)
-//
-#define TPM_ALG_ERROR (TPM_ALG_ID)(0x0000)
-#define TPM_ALG_FIRST (TPM_ALG_ID)(0x0001)
-//#define TPM_ALG_RSA (TPM_ALG_ID)(0x0001)
-//#define TPM_ALG_SHA (TPM_ALG_ID)(0x0004)
-#define TPM_ALG_SHA1 (TPM_ALG_ID)(0x0004)
-//#define TPM_ALG_HMAC (TPM_ALG_ID)(0x0005)
-#define TPM_ALG_AES (TPM_ALG_ID)(0x0006)
-//#define TPM_ALG_MGF1 (TPM_ALG_ID)(0x0007)
-#define TPM_ALG_KEYEDHASH (TPM_ALG_ID)(0x0008)
-//#define TPM_ALG_XOR (TPM_ALG_ID)(0x000A)
-#define TPM_ALG_SHA256 (TPM_ALG_ID)(0x000B)
-#define TPM_ALG_SHA384 (TPM_ALG_ID)(0x000C)
-#define TPM_ALG_SHA512 (TPM_ALG_ID)(0x000D)
-#define TPM_ALG_NULL (TPM_ALG_ID)(0x0010)
-#define TPM_ALG_SM3_256 (TPM_ALG_ID)(0x0012)
-#define TPM_ALG_SM4 (TPM_ALG_ID)(0x0013)
-#define TPM_ALG_RSASSA (TPM_ALG_ID)(0x0014)
-#define TPM_ALG_RSAES (TPM_ALG_ID)(0x0015)
-#define TPM_ALG_RSAPSS (TPM_ALG_ID)(0x0016)
-#define TPM_ALG_OAEP (TPM_ALG_ID)(0x0017)
-#define TPM_ALG_ECDSA (TPM_ALG_ID)(0x0018)
-#define TPM_ALG_ECDH (TPM_ALG_ID)(0x0019)
-#define TPM_ALG_ECDAA (TPM_ALG_ID)(0x001A)
-#define TPM_ALG_SM2 (TPM_ALG_ID)(0x001B)
-#define TPM_ALG_ECSCHNORR (TPM_ALG_ID)(0x001C)
-#define TPM_ALG_ECMQV (TPM_ALG_ID)(0x001D)
-#define TPM_ALG_KDF1_SP800_56a (TPM_ALG_ID)(0x0020)
-#define TPM_ALG_KDF2 (TPM_ALG_ID)(0x0021)
-#define TPM_ALG_KDF1_SP800_108 (TPM_ALG_ID)(0x0022)
-#define TPM_ALG_ECC (TPM_ALG_ID)(0x0023)
-#define TPM_ALG_SYMCIPHER (TPM_ALG_ID)(0x0025)
-#define TPM_ALG_CTR (TPM_ALG_ID)(0x0040)
-#define TPM_ALG_OFB (TPM_ALG_ID)(0x0041)
-#define TPM_ALG_CBC (TPM_ALG_ID)(0x0042)
-#define TPM_ALG_CFB (TPM_ALG_ID)(0x0043)
-#define TPM_ALG_ECB (TPM_ALG_ID)(0x0044)
-#define TPM_ALG_LAST (TPM_ALG_ID)(0x0044)
-
-// Table 8 - TPM_ECC_CURVE Constants
-typedef UINT16 TPM_ECC_CURVE;
-#define TPM_ECC_NONE (TPM_ECC_CURVE)(0x0000)
-#define TPM_ECC_NIST_P192 (TPM_ECC_CURVE)(0x0001)
-#define TPM_ECC_NIST_P224 (TPM_ECC_CURVE)(0x0002)
-#define TPM_ECC_NIST_P256 (TPM_ECC_CURVE)(0x0003)
-#define TPM_ECC_NIST_P384 (TPM_ECC_CURVE)(0x0004)
-#define TPM_ECC_NIST_P521 (TPM_ECC_CURVE)(0x0005)
-#define TPM_ECC_BN_P256 (TPM_ECC_CURVE)(0x0010)
-#define TPM_ECC_BN_P638 (TPM_ECC_CURVE)(0x0011)
-#define TPM_ECC_SM2_P256 (TPM_ECC_CURVE)(0x0020)
-
-// Table 11 - TPM_CC Constants (Numeric Order)
-typedef UINT32 TPM_CC;
-#define TPM_CC_FIRST (TPM_CC)(0x0000011F)
-#define TPM_CC_PP_FIRST (TPM_CC)(0x0000011F)
-#define TPM_CC_NV_UndefineSpaceSpecial (TPM_CC)(0x0000011F)
-#define TPM_CC_EvictControl (TPM_CC)(0x00000120)
-#define TPM_CC_HierarchyControl (TPM_CC)(0x00000121)
-#define TPM_CC_NV_UndefineSpace (TPM_CC)(0x00000122)
-#define TPM_CC_ChangeEPS (TPM_CC)(0x00000124)
-#define TPM_CC_ChangePPS (TPM_CC)(0x00000125)
-#define TPM_CC_Clear (TPM_CC)(0x00000126)
-#define TPM_CC_ClearControl (TPM_CC)(0x00000127)
-#define TPM_CC_ClockSet (TPM_CC)(0x00000128)
-#define TPM_CC_HierarchyChangeAuth (TPM_CC)(0x00000129)
-#define TPM_CC_NV_DefineSpace (TPM_CC)(0x0000012A)
-#define TPM_CC_PCR_Allocate (TPM_CC)(0x0000012B)
-#define TPM_CC_PCR_SetAuthPolicy (TPM_CC)(0x0000012C)
-#define TPM_CC_PP_Commands (TPM_CC)(0x0000012D)
-#define TPM_CC_SetPrimaryPolicy (TPM_CC)(0x0000012E)
-#define TPM_CC_FieldUpgradeStart (TPM_CC)(0x0000012F)
-#define TPM_CC_ClockRateAdjust (TPM_CC)(0x00000130)
-#define TPM_CC_CreatePrimary (TPM_CC)(0x00000131)
-#define TPM_CC_NV_GlobalWriteLock (TPM_CC)(0x00000132)
-#define TPM_CC_PP_LAST (TPM_CC)(0x00000132)
-#define TPM_CC_GetCommandAuditDigest (TPM_CC)(0x00000133)
-#define TPM_CC_NV_Increment (TPM_CC)(0x00000134)
-#define TPM_CC_NV_SetBits (TPM_CC)(0x00000135)
-#define TPM_CC_NV_Extend (TPM_CC)(0x00000136)
-#define TPM_CC_NV_Write (TPM_CC)(0x00000137)
-#define TPM_CC_NV_WriteLock (TPM_CC)(0x00000138)
-#define TPM_CC_DictionaryAttackLockReset (TPM_CC)(0x00000139)
-#define TPM_CC_DictionaryAttackParameters (TPM_CC)(0x0000013A)
-#define TPM_CC_NV_ChangeAuth (TPM_CC)(0x0000013B)
-#define TPM_CC_PCR_Event (TPM_CC)(0x0000013C)
-#define TPM_CC_PCR_Reset (TPM_CC)(0x0000013D)
-#define TPM_CC_SequenceComplete (TPM_CC)(0x0000013E)
-#define TPM_CC_SetAlgorithmSet (TPM_CC)(0x0000013F)
-#define TPM_CC_SetCommandCodeAuditStatus (TPM_CC)(0x00000140)
-#define TPM_CC_FieldUpgradeData (TPM_CC)(0x00000141)
-#define TPM_CC_IncrementalSelfTest (TPM_CC)(0x00000142)
-#define TPM_CC_SelfTest (TPM_CC)(0x00000143)
-#define TPM_CC_Startup (TPM_CC)(0x00000144)
-#define TPM_CC_Shutdown (TPM_CC)(0x00000145)
-#define TPM_CC_StirRandom (TPM_CC)(0x00000146)
-#define TPM_CC_ActivateCredential (TPM_CC)(0x00000147)
-#define TPM_CC_Certify (TPM_CC)(0x00000148)
-#define TPM_CC_PolicyNV (TPM_CC)(0x00000149)
-#define TPM_CC_CertifyCreation (TPM_CC)(0x0000014A)
-#define TPM_CC_Duplicate (TPM_CC)(0x0000014B)
-#define TPM_CC_GetTime (TPM_CC)(0x0000014C)
-#define TPM_CC_GetSessionAuditDigest (TPM_CC)(0x0000014D)
-#define TPM_CC_NV_Read (TPM_CC)(0x0000014E)
-#define TPM_CC_NV_ReadLock (TPM_CC)(0x0000014F)
-#define TPM_CC_ObjectChangeAuth (TPM_CC)(0x00000150)
-#define TPM_CC_PolicySecret (TPM_CC)(0x00000151)
-#define TPM_CC_Rewrap (TPM_CC)(0x00000152)
-#define TPM_CC_Create (TPM_CC)(0x00000153)
-#define TPM_CC_ECDH_ZGen (TPM_CC)(0x00000154)
-#define TPM_CC_HMAC (TPM_CC)(0x00000155)
-#define TPM_CC_Import (TPM_CC)(0x00000156)
-#define TPM_CC_Load (TPM_CC)(0x00000157)
-#define TPM_CC_Quote (TPM_CC)(0x00000158)
-#define TPM_CC_RSA_Decrypt (TPM_CC)(0x00000159)
-#define TPM_CC_HMAC_Start (TPM_CC)(0x0000015B)
-#define TPM_CC_SequenceUpdate (TPM_CC)(0x0000015C)
-#define TPM_CC_Sign (TPM_CC)(0x0000015D)
-#define TPM_CC_Unseal (TPM_CC)(0x0000015E)
-#define TPM_CC_PolicySigned (TPM_CC)(0x00000160)
-#define TPM_CC_ContextLoad (TPM_CC)(0x00000161)
-#define TPM_CC_ContextSave (TPM_CC)(0x00000162)
-#define TPM_CC_ECDH_KeyGen (TPM_CC)(0x00000163)
-#define TPM_CC_EncryptDecrypt (TPM_CC)(0x00000164)
-#define TPM_CC_FlushContext (TPM_CC)(0x00000165)
-#define TPM_CC_LoadExternal (TPM_CC)(0x00000167)
-#define TPM_CC_MakeCredential (TPM_CC)(0x00000168)
-#define TPM_CC_NV_ReadPublic (TPM_CC)(0x00000169)
-#define TPM_CC_PolicyAuthorize (TPM_CC)(0x0000016A)
-#define TPM_CC_PolicyAuthValue (TPM_CC)(0x0000016B)
-#define TPM_CC_PolicyCommandCode (TPM_CC)(0x0000016C)
-#define TPM_CC_PolicyCounterTimer (TPM_CC)(0x0000016D)
-#define TPM_CC_PolicyCpHash (TPM_CC)(0x0000016E)
-#define TPM_CC_PolicyLocality (TPM_CC)(0x0000016F)
-#define TPM_CC_PolicyNameHash (TPM_CC)(0x00000170)
-#define TPM_CC_PolicyOR (TPM_CC)(0x00000171)
-#define TPM_CC_PolicyTicket (TPM_CC)(0x00000172)
-#define TPM_CC_ReadPublic (TPM_CC)(0x00000173)
-#define TPM_CC_RSA_Encrypt (TPM_CC)(0x00000174)
-#define TPM_CC_StartAuthSession (TPM_CC)(0x00000176)
-#define TPM_CC_VerifySignature (TPM_CC)(0x00000177)
-#define TPM_CC_ECC_Parameters (TPM_CC)(0x00000178)
-#define TPM_CC_FirmwareRead (TPM_CC)(0x00000179)
-#define TPM_CC_GetCapability (TPM_CC)(0x0000017A)
-#define TPM_CC_GetRandom (TPM_CC)(0x0000017B)
-#define TPM_CC_GetTestResult (TPM_CC)(0x0000017C)
-#define TPM_CC_Hash (TPM_CC)(0x0000017D)
-#define TPM_CC_PCR_Read (TPM_CC)(0x0000017E)
-#define TPM_CC_PolicyPCR (TPM_CC)(0x0000017F)
-#define TPM_CC_PolicyRestart (TPM_CC)(0x00000180)
-#define TPM_CC_ReadClock (TPM_CC)(0x00000181)
-#define TPM_CC_PCR_Extend (TPM_CC)(0x00000182)
-#define TPM_CC_PCR_SetAuthValue (TPM_CC)(0x00000183)
-#define TPM_CC_NV_Certify (TPM_CC)(0x00000184)
-#define TPM_CC_EventSequenceComplete (TPM_CC)(0x00000185)
-#define TPM_CC_HashSequenceStart (TPM_CC)(0x00000186)
-#define TPM_CC_PolicyPhysicalPresence (TPM_CC)(0x00000187)
-#define TPM_CC_PolicyDuplicationSelect (TPM_CC)(0x00000188)
-#define TPM_CC_PolicyGetDigest (TPM_CC)(0x00000189)
-#define TPM_CC_TestParms (TPM_CC)(0x0000018A)
-#define TPM_CC_Commit (TPM_CC)(0x0000018B)
-#define TPM_CC_PolicyPassword (TPM_CC)(0x0000018C)
-#define TPM_CC_ZGen_2Phase (TPM_CC)(0x0000018D)
-#define TPM_CC_EC_Ephemeral (TPM_CC)(0x0000018E)
-#define TPM_CC_LAST (TPM_CC)(0x0000018E)
-
-// Table 15 - TPM_RC Constants (Actions)
-typedef UINT32 TPM_RC;
-#define TPM_RC_SUCCESS (TPM_RC)(0x000)
-#define TPM_RC_BAD_TAG (TPM_RC)(0x030)
-#define RC_VER1 (TPM_RC)(0x100)
-#define TPM_RC_INITIALIZE (TPM_RC)(RC_VER1 + 0x000)
-#define TPM_RC_FAILURE (TPM_RC)(RC_VER1 + 0x001)
-#define TPM_RC_SEQUENCE (TPM_RC)(RC_VER1 + 0x003)
-#define TPM_RC_PRIVATE (TPM_RC)(RC_VER1 + 0x00B)
-#define TPM_RC_HMAC (TPM_RC)(RC_VER1 + 0x019)
-#define TPM_RC_DISABLED (TPM_RC)(RC_VER1 + 0x020)
-#define TPM_RC_EXCLUSIVE (TPM_RC)(RC_VER1 + 0x021)
-#define TPM_RC_AUTH_TYPE (TPM_RC)(RC_VER1 + 0x024)
-#define TPM_RC_AUTH_MISSING (TPM_RC)(RC_VER1 + 0x025)
-#define TPM_RC_POLICY (TPM_RC)(RC_VER1 + 0x026)
-#define TPM_RC_PCR (TPM_RC)(RC_VER1 + 0x027)
-#define TPM_RC_PCR_CHANGED (TPM_RC)(RC_VER1 + 0x028)
-#define TPM_RC_UPGRADE (TPM_RC)(RC_VER1 + 0x02D)
-#define TPM_RC_TOO_MANY_CONTEXTS (TPM_RC)(RC_VER1 + 0x02E)
-#define TPM_RC_AUTH_UNAVAILABLE (TPM_RC)(RC_VER1 + 0x02F)
-#define TPM_RC_REBOOT (TPM_RC)(RC_VER1 + 0x030)
-#define TPM_RC_UNBALANCED (TPM_RC)(RC_VER1 + 0x031)
-#define TPM_RC_COMMAND_SIZE (TPM_RC)(RC_VER1 + 0x042)
-#define TPM_RC_COMMAND_CODE (TPM_RC)(RC_VER1 + 0x043)
-#define TPM_RC_AUTHSIZE (TPM_RC)(RC_VER1 + 0x044)
-#define TPM_RC_AUTH_CONTEXT (TPM_RC)(RC_VER1 + 0x045)
-#define TPM_RC_NV_RANGE (TPM_RC)(RC_VER1 + 0x046)
-#define TPM_RC_NV_SIZE (TPM_RC)(RC_VER1 + 0x047)
-#define TPM_RC_NV_LOCKED (TPM_RC)(RC_VER1 + 0x048)
-#define TPM_RC_NV_AUTHORIZATION (TPM_RC)(RC_VER1 + 0x049)
-#define TPM_RC_NV_UNINITIALIZED (TPM_RC)(RC_VER1 + 0x04A)
-#define TPM_RC_NV_SPACE (TPM_RC)(RC_VER1 + 0x04B)
-#define TPM_RC_NV_DEFINED (TPM_RC)(RC_VER1 + 0x04C)
-#define TPM_RC_BAD_CONTEXT (TPM_RC)(RC_VER1 + 0x050)
-#define TPM_RC_CPHASH (TPM_RC)(RC_VER1 + 0x051)
-#define TPM_RC_PARENT (TPM_RC)(RC_VER1 + 0x052)
-#define TPM_RC_NEEDS_TEST (TPM_RC)(RC_VER1 + 0x053)
-#define TPM_RC_NO_RESULT (TPM_RC)(RC_VER1 + 0x054)
-#define TPM_RC_SENSITIVE (TPM_RC)(RC_VER1 + 0x055)
-#define RC_MAX_FM0 (TPM_RC)(RC_VER1 + 0x07F)
-#define RC_FMT1 (TPM_RC)(0x080)
-#define TPM_RC_ASYMMETRIC (TPM_RC)(RC_FMT1 + 0x001)
-#define TPM_RC_ATTRIBUTES (TPM_RC)(RC_FMT1 + 0x002)
-#define TPM_RC_HASH (TPM_RC)(RC_FMT1 + 0x003)
-#define TPM_RC_VALUE (TPM_RC)(RC_FMT1 + 0x004)
-#define TPM_RC_HIERARCHY (TPM_RC)(RC_FMT1 + 0x005)
-#define TPM_RC_KEY_SIZE (TPM_RC)(RC_FMT1 + 0x007)
-#define TPM_RC_MGF (TPM_RC)(RC_FMT1 + 0x008)
-#define TPM_RC_MODE (TPM_RC)(RC_FMT1 + 0x009)
-#define TPM_RC_TYPE (TPM_RC)(RC_FMT1 + 0x00A)
-#define TPM_RC_HANDLE (TPM_RC)(RC_FMT1 + 0x00B)
-#define TPM_RC_KDF (TPM_RC)(RC_FMT1 + 0x00C)
-#define TPM_RC_RANGE (TPM_RC)(RC_FMT1 + 0x00D)
-#define TPM_RC_AUTH_FAIL (TPM_RC)(RC_FMT1 + 0x00E)
-#define TPM_RC_NONCE (TPM_RC)(RC_FMT1 + 0x00F)
-#define TPM_RC_PP (TPM_RC)(RC_FMT1 + 0x010)
-#define TPM_RC_SCHEME (TPM_RC)(RC_FMT1 + 0x012)
-#define TPM_RC_SIZE (TPM_RC)(RC_FMT1 + 0x015)
-#define TPM_RC_SYMMETRIC (TPM_RC)(RC_FMT1 + 0x016)
-#define TPM_RC_TAG (TPM_RC)(RC_FMT1 + 0x017)
-#define TPM_RC_SELECTOR (TPM_RC)(RC_FMT1 + 0x018)
-#define TPM_RC_INSUFFICIENT (TPM_RC)(RC_FMT1 + 0x01A)
-#define TPM_RC_SIGNATURE (TPM_RC)(RC_FMT1 + 0x01B)
-#define TPM_RC_KEY (TPM_RC)(RC_FMT1 + 0x01C)
-#define TPM_RC_POLICY_FAIL (TPM_RC)(RC_FMT1 + 0x01D)
-#define TPM_RC_INTEGRITY (TPM_RC)(RC_FMT1 + 0x01F)
-#define TPM_RC_TICKET (TPM_RC)(RC_FMT1 + 0x020)
-#define TPM_RC_RESERVED_BITS (TPM_RC)(RC_FMT1 + 0x021)
-#define TPM_RC_BAD_AUTH (TPM_RC)(RC_FMT1 + 0x022)
-#define TPM_RC_EXPIRED (TPM_RC)(RC_FMT1 + 0x023)
-#define TPM_RC_POLICY_CC (TPM_RC)(RC_FMT1 + 0x024 )
-#define TPM_RC_BINDING (TPM_RC)(RC_FMT1 + 0x025)
-#define TPM_RC_CURVE (TPM_RC)(RC_FMT1 + 0x026)
-#define TPM_RC_ECC_POINT (TPM_RC)(RC_FMT1 + 0x027)
-#define RC_WARN (TPM_RC)(0x900)
-#define TPM_RC_CONTEXT_GAP (TPM_RC)(RC_WARN + 0x001)
-#define TPM_RC_OBJECT_MEMORY (TPM_RC)(RC_WARN + 0x002)
-#define TPM_RC_SESSION_MEMORY (TPM_RC)(RC_WARN + 0x003)
-#define TPM_RC_MEMORY (TPM_RC)(RC_WARN + 0x004)
-#define TPM_RC_SESSION_HANDLES (TPM_RC)(RC_WARN + 0x005)
-#define TPM_RC_OBJECT_HANDLES (TPM_RC)(RC_WARN + 0x006)
-#define TPM_RC_LOCALITY (TPM_RC)(RC_WARN + 0x007)
-#define TPM_RC_YIELDED (TPM_RC)(RC_WARN + 0x008)
-#define TPM_RC_CANCELED (TPM_RC)(RC_WARN + 0x009)
-#define TPM_RC_TESTING (TPM_RC)(RC_WARN + 0x00A)
-#define TPM_RC_REFERENCE_H0 (TPM_RC)(RC_WARN + 0x010)
-#define TPM_RC_REFERENCE_H1 (TPM_RC)(RC_WARN + 0x011)
-#define TPM_RC_REFERENCE_H2 (TPM_RC)(RC_WARN + 0x012)
-#define TPM_RC_REFERENCE_H3 (TPM_RC)(RC_WARN + 0x013)
-#define TPM_RC_REFERENCE_H4 (TPM_RC)(RC_WARN + 0x014)
-#define TPM_RC_REFERENCE_H5 (TPM_RC)(RC_WARN + 0x015)
-#define TPM_RC_REFERENCE_H6 (TPM_RC)(RC_WARN + 0x016)
-#define TPM_RC_REFERENCE_S0 (TPM_RC)(RC_WARN + 0x018)
-#define TPM_RC_REFERENCE_S1 (TPM_RC)(RC_WARN + 0x019)
-#define TPM_RC_REFERENCE_S2 (TPM_RC)(RC_WARN + 0x01A)
-#define TPM_RC_REFERENCE_S3 (TPM_RC)(RC_WARN + 0x01B)
-#define TPM_RC_REFERENCE_S4 (TPM_RC)(RC_WARN + 0x01C)
-#define TPM_RC_REFERENCE_S5 (TPM_RC)(RC_WARN + 0x01D)
-#define TPM_RC_REFERENCE_S6 (TPM_RC)(RC_WARN + 0x01E)
-#define TPM_RC_NV_RATE (TPM_RC)(RC_WARN + 0x020)
-#define TPM_RC_LOCKOUT (TPM_RC)(RC_WARN + 0x021)
-#define TPM_RC_RETRY (TPM_RC)(RC_WARN + 0x022)
-#define TPM_RC_NV_UNAVAILABLE (TPM_RC)(RC_WARN + 0x023)
-#define TPM_RC_NOT_USED (TPM_RC)(RC_WARN + 0x7F)
-#define TPM_RC_H (TPM_RC)(0x000)
-#define TPM_RC_P (TPM_RC)(0x040)
-#define TPM_RC_S (TPM_RC)(0x800)
-#define TPM_RC_1 (TPM_RC)(0x100)
-#define TPM_RC_2 (TPM_RC)(0x200)
-#define TPM_RC_3 (TPM_RC)(0x300)
-#define TPM_RC_4 (TPM_RC)(0x400)
-#define TPM_RC_5 (TPM_RC)(0x500)
-#define TPM_RC_6 (TPM_RC)(0x600)
-#define TPM_RC_7 (TPM_RC)(0x700)
-#define TPM_RC_8 (TPM_RC)(0x800)
-#define TPM_RC_9 (TPM_RC)(0x900)
-#define TPM_RC_A (TPM_RC)(0xA00)
-#define TPM_RC_B (TPM_RC)(0xB00)
-#define TPM_RC_C (TPM_RC)(0xC00)
-#define TPM_RC_D (TPM_RC)(0xD00)
-#define TPM_RC_E (TPM_RC)(0xE00)
-#define TPM_RC_F (TPM_RC)(0xF00)
-#define TPM_RC_N_MASK (TPM_RC)(0xF00)
-
-// Table 16 - TPM_CLOCK_ADJUST Constants
-typedef INT8 TPM_CLOCK_ADJUST;
-#define TPM_CLOCK_COARSE_SLOWER (TPM_CLOCK_ADJUST)(-3)
-#define TPM_CLOCK_MEDIUM_SLOWER (TPM_CLOCK_ADJUST)(-2)
-#define TPM_CLOCK_FINE_SLOWER (TPM_CLOCK_ADJUST)(-1)
-#define TPM_CLOCK_NO_CHANGE (TPM_CLOCK_ADJUST)(0)
-#define TPM_CLOCK_FINE_FASTER (TPM_CLOCK_ADJUST)(1)
-#define TPM_CLOCK_MEDIUM_FASTER (TPM_CLOCK_ADJUST)(2)
-#define TPM_CLOCK_COARSE_FASTER (TPM_CLOCK_ADJUST)(3)
-
-// Table 17 - TPM_EO Constants
-typedef UINT16 TPM_EO;
-#define TPM_EO_EQ (TPM_EO)(0x0000)
-#define TPM_EO_NEQ (TPM_EO)(0x0001)
-#define TPM_EO_SIGNED_GT (TPM_EO)(0x0002)
-#define TPM_EO_UNSIGNED_GT (TPM_EO)(0x0003)
-#define TPM_EO_SIGNED_LT (TPM_EO)(0x0004)
-#define TPM_EO_UNSIGNED_LT (TPM_EO)(0x0005)
-#define TPM_EO_SIGNED_GE (TPM_EO)(0x0006)
-#define TPM_EO_UNSIGNED_GE (TPM_EO)(0x0007)
-#define TPM_EO_SIGNED_LE (TPM_EO)(0x0008)
-#define TPM_EO_UNSIGNED_LE (TPM_EO)(0x0009)
-#define TPM_EO_BITSET (TPM_EO)(0x000A)
-#define TPM_EO_BITCLEAR (TPM_EO)(0x000B)
-
-// Table 18 - TPM_ST Constants
-typedef UINT16 TPM_ST;
-#define TPM_ST_RSP_COMMAND (TPM_ST)(0x00C4)
-#define TPM_ST_NULL (TPM_ST)(0X8000)
-#define TPM_ST_NO_SESSIONS (TPM_ST)(0x8001)
-#define TPM_ST_SESSIONS (TPM_ST)(0x8002)
-#define TPM_ST_ATTEST_NV (TPM_ST)(0x8014)
-#define TPM_ST_ATTEST_COMMAND_AUDIT (TPM_ST)(0x8015)
-#define TPM_ST_ATTEST_SESSION_AUDIT (TPM_ST)(0x8016)
-#define TPM_ST_ATTEST_CERTIFY (TPM_ST)(0x8017)
-#define TPM_ST_ATTEST_QUOTE (TPM_ST)(0x8018)
-#define TPM_ST_ATTEST_TIME (TPM_ST)(0x8019)
-#define TPM_ST_ATTEST_CREATION (TPM_ST)(0x801A)
-#define TPM_ST_CREATION (TPM_ST)(0x8021)
-#define TPM_ST_VERIFIED (TPM_ST)(0x8022)
-#define TPM_ST_AUTH_SECRET (TPM_ST)(0x8023)
-#define TPM_ST_HASHCHECK (TPM_ST)(0x8024)
-#define TPM_ST_AUTH_SIGNED (TPM_ST)(0x8025)
-#define TPM_ST_FU_MANIFEST (TPM_ST)(0x8029)
-
-// Table 19 - TPM_SU Constants
-typedef UINT16 TPM_SU;
-#define TPM_SU_CLEAR (TPM_SU)(0x0000)
-#define TPM_SU_STATE (TPM_SU)(0x0001)
-
-// Table 20 - TPM_SE Constants
-typedef UINT8 TPM_SE;
-#define TPM_SE_HMAC (TPM_SE)(0x00)
-#define TPM_SE_POLICY (TPM_SE)(0x01)
-#define TPM_SE_TRIAL (TPM_SE)(0x03)
-
-// Table 21 - TPM_CAP Constants
-typedef UINT32 TPM_CAP;
-#define TPM_CAP_FIRST (TPM_CAP)(0x00000000)
-#define TPM_CAP_ALGS (TPM_CAP)(0x00000000)
-#define TPM_CAP_HANDLES (TPM_CAP)(0x00000001)
-#define TPM_CAP_COMMANDS (TPM_CAP)(0x00000002)
-#define TPM_CAP_PP_COMMANDS (TPM_CAP)(0x00000003)
-#define TPM_CAP_AUDIT_COMMANDS (TPM_CAP)(0x00000004)
-#define TPM_CAP_PCRS (TPM_CAP)(0x00000005)
-#define TPM_CAP_TPM_PROPERTIES (TPM_CAP)(0x00000006)
-#define TPM_CAP_PCR_PROPERTIES (TPM_CAP)(0x00000007)
-#define TPM_CAP_ECC_CURVES (TPM_CAP)(0x00000008)
-#define TPM_CAP_LAST (TPM_CAP)(0x00000008)
-#define TPM_CAP_VENDOR_PROPERTY (TPM_CAP)(0x00000100)
-
-// Table 22 - TPM_PT Constants
-typedef UINT32 TPM_PT;
-#define TPM_PT_NONE (TPM_PT)(0x00000000)
-#define PT_GROUP (TPM_PT)(0x00000100)
-#define PT_FIXED (TPM_PT)(PT_GROUP * 1)
-#define TPM_PT_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 0)
-#define TPM_PT_LEVEL (TPM_PT)(PT_FIXED + 1)
-#define TPM_PT_REVISION (TPM_PT)(PT_FIXED + 2)
-#define TPM_PT_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 3)
-#define TPM_PT_YEAR (TPM_PT)(PT_FIXED + 4)
-#define TPM_PT_MANUFACTURER (TPM_PT)(PT_FIXED + 5)
-#define TPM_PT_VENDOR_STRING_1 (TPM_PT)(PT_FIXED + 6)
-#define TPM_PT_VENDOR_STRING_2 (TPM_PT)(PT_FIXED + 7)
-#define TPM_PT_VENDOR_STRING_3 (TPM_PT)(PT_FIXED + 8)
-#define TPM_PT_VENDOR_STRING_4 (TPM_PT)(PT_FIXED + 9)
-#define TPM_PT_VENDOR_TPM_TYPE (TPM_PT)(PT_FIXED + 10)
-#define TPM_PT_FIRMWARE_VERSION_1 (TPM_PT)(PT_FIXED + 11)
-#define TPM_PT_FIRMWARE_VERSION_2 (TPM_PT)(PT_FIXED + 12)
-#define TPM_PT_INPUT_BUFFER (TPM_PT)(PT_FIXED + 13)
-#define TPM_PT_HR_TRANSIENT_MIN (TPM_PT)(PT_FIXED + 14)
-#define TPM_PT_HR_PERSISTENT_MIN (TPM_PT)(PT_FIXED + 15)
-#define TPM_PT_HR_LOADED_MIN (TPM_PT)(PT_FIXED + 16)
-#define TPM_PT_ACTIVE_SESSIONS_MAX (TPM_PT)(PT_FIXED + 17)
-#define TPM_PT_PCR_COUNT (TPM_PT)(PT_FIXED + 18)
-#define TPM_PT_PCR_SELECT_MIN (TPM_PT)(PT_FIXED + 19)
-#define TPM_PT_CONTEXT_GAP_MAX (TPM_PT)(PT_FIXED + 20)
-#define TPM_PT_NV_COUNTERS_MAX (TPM_PT)(PT_FIXED + 22)
-#define TPM_PT_NV_INDEX_MAX (TPM_PT)(PT_FIXED + 23)
-#define TPM_PT_MEMORY (TPM_PT)(PT_FIXED + 24)
-#define TPM_PT_CLOCK_UPDATE (TPM_PT)(PT_FIXED + 25)
-#define TPM_PT_CONTEXT_HASH (TPM_PT)(PT_FIXED + 26)
-#define TPM_PT_CONTEXT_SYM (TPM_PT)(PT_FIXED + 27)
-#define TPM_PT_CONTEXT_SYM_SIZE (TPM_PT)(PT_FIXED + 28)
-#define TPM_PT_ORDERLY_COUNT (TPM_PT)(PT_FIXED + 29)
-#define TPM_PT_MAX_COMMAND_SIZE (TPM_PT)(PT_FIXED + 30)
-#define TPM_PT_MAX_RESPONSE_SIZE (TPM_PT)(PT_FIXED + 31)
-#define TPM_PT_MAX_DIGEST (TPM_PT)(PT_FIXED + 32)
-#define TPM_PT_MAX_OBJECT_CONTEXT (TPM_PT)(PT_FIXED + 33)
-#define TPM_PT_MAX_SESSION_CONTEXT (TPM_PT)(PT_FIXED + 34)
-#define TPM_PT_PS_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 35)
-#define TPM_PT_PS_LEVEL (TPM_PT)(PT_FIXED + 36)
-#define TPM_PT_PS_REVISION (TPM_PT)(PT_FIXED + 37)
-#define TPM_PT_PS_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 38)
-#define TPM_PT_PS_YEAR (TPM_PT)(PT_FIXED + 39)
-#define TPM_PT_SPLIT_MAX (TPM_PT)(PT_FIXED + 40)
-#define TPM_PT_TOTAL_COMMANDS (TPM_PT)(PT_FIXED + 41)
-#define TPM_PT_LIBRARY_COMMANDS (TPM_PT)(PT_FIXED + 42)
-#define TPM_PT_VENDOR_COMMANDS (TPM_PT)(PT_FIXED + 43)
-#define PT_VAR (TPM_PT)(PT_GROUP * 2)
-#define TPM_PT_PERMANENT (TPM_PT)(PT_VAR + 0)
-#define TPM_PT_STARTUP_CLEAR (TPM_PT)(PT_VAR + 1)
-#define TPM_PT_HR_NV_INDEX (TPM_PT)(PT_VAR + 2)
-#define TPM_PT_HR_LOADED (TPM_PT)(PT_VAR + 3)
-#define TPM_PT_HR_LOADED_AVAIL (TPM_PT)(PT_VAR + 4)
-#define TPM_PT_HR_ACTIVE (TPM_PT)(PT_VAR + 5)
-#define TPM_PT_HR_ACTIVE_AVAIL (TPM_PT)(PT_VAR + 6)
-#define TPM_PT_HR_TRANSIENT_AVAIL (TPM_PT)(PT_VAR + 7)
-#define TPM_PT_HR_PERSISTENT (TPM_PT)(PT_VAR + 8)
-#define TPM_PT_HR_PERSISTENT_AVAIL (TPM_PT)(PT_VAR + 9)
-#define TPM_PT_NV_COUNTERS (TPM_PT)(PT_VAR + 10)
-#define TPM_PT_NV_COUNTERS_AVAIL (TPM_PT)(PT_VAR + 11)
-#define TPM_PT_ALGORITHM_SET (TPM_PT)(PT_VAR + 12)
-#define TPM_PT_LOADED_CURVES (TPM_PT)(PT_VAR + 13)
-#define TPM_PT_LOCKOUT_COUNTER (TPM_PT)(PT_VAR + 14)
-#define TPM_PT_MAX_AUTH_FAIL (TPM_PT)(PT_VAR + 15)
-#define TPM_PT_LOCKOUT_INTERVAL (TPM_PT)(PT_VAR + 16)
-#define TPM_PT_LOCKOUT_RECOVERY (TPM_PT)(PT_VAR + 17)
-#define TPM_PT_NV_WRITE_RECOVERY (TPM_PT)(PT_VAR + 18)
-#define TPM_PT_AUDIT_COUNTER_0 (TPM_PT)(PT_VAR + 19)
-#define TPM_PT_AUDIT_COUNTER_1 (TPM_PT)(PT_VAR + 20)
-
-// Table 23 - TPM_PT_PCR Constants
-typedef UINT32 TPM_PT_PCR;
-#define TPM_PT_PCR_FIRST (TPM_PT_PCR)(0x00000000)
-#define TPM_PT_PCR_SAVE (TPM_PT_PCR)(0x00000000)
-#define TPM_PT_PCR_EXTEND_L0 (TPM_PT_PCR)(0x00000001)
-#define TPM_PT_PCR_RESET_L0 (TPM_PT_PCR)(0x00000002)
-#define TPM_PT_PCR_EXTEND_L1 (TPM_PT_PCR)(0x00000003)
-#define TPM_PT_PCR_RESET_L1 (TPM_PT_PCR)(0x00000004)
-#define TPM_PT_PCR_EXTEND_L2 (TPM_PT_PCR)(0x00000005)
-#define TPM_PT_PCR_RESET_L2 (TPM_PT_PCR)(0x00000006)
-#define TPM_PT_PCR_EXTEND_L3 (TPM_PT_PCR)(0x00000007)
-#define TPM_PT_PCR_RESET_L3 (TPM_PT_PCR)(0x00000008)
-#define TPM_PT_PCR_EXTEND_L4 (TPM_PT_PCR)(0x00000009)
-#define TPM_PT_PCR_RESET_L4 (TPM_PT_PCR)(0x0000000A)
-#define TPM_PT_PCR_NO_INCREMENT (TPM_PT_PCR)(0x00000011)
-#define TPM_PT_PCR_DRTM_RESET (TPM_PT_PCR)(0x00000012)
-#define TPM_PT_PCR_POLICY (TPM_PT_PCR)(0x00000013)
-#define TPM_PT_PCR_AUTH (TPM_PT_PCR)(0x00000014)
-#define TPM_PT_PCR_LAST (TPM_PT_PCR)(0x00000014)
-
-// Table 24 - TPM_PS Constants
-typedef UINT32 TPM_PS;
-#define TPM_PS_MAIN (TPM_PS)(0x00000000)
-#define TPM_PS_PC (TPM_PS)(0x00000001)
-#define TPM_PS_PDA (TPM_PS)(0x00000002)
-#define TPM_PS_CELL_PHONE (TPM_PS)(0x00000003)
-#define TPM_PS_SERVER (TPM_PS)(0x00000004)
-#define TPM_PS_PERIPHERAL (TPM_PS)(0x00000005)
-#define TPM_PS_TSS (TPM_PS)(0x00000006)
-#define TPM_PS_STORAGE (TPM_PS)(0x00000007)
-#define TPM_PS_AUTHENTICATION (TPM_PS)(0x00000008)
-#define TPM_PS_EMBEDDED (TPM_PS)(0x00000009)
-#define TPM_PS_HARDCOPY (TPM_PS)(0x0000000A)
-#define TPM_PS_INFRASTRUCTURE (TPM_PS)(0x0000000B)
-#define TPM_PS_VIRTUALIZATION (TPM_PS)(0x0000000C)
-#define TPM_PS_TNC (TPM_PS)(0x0000000D)
-#define TPM_PS_MULTI_TENANT (TPM_PS)(0x0000000E)
-#define TPM_PS_TC (TPM_PS)(0x0000000F)
-
-// 7 Handles
-
-// Table 25 - Handles Types
-//
-// NOTE: Comment because it has same name as TPM1.2 (value is same, so not runtime issue)
-//
-//typedef UINT32 TPM_HANDLE;
-
-// Table 26 - TPM_HT Constants
-typedef UINT8 TPM_HT;
-#define TPM_HT_PCR (TPM_HT)(0x00)
-#define TPM_HT_NV_INDEX (TPM_HT)(0x01)
-#define TPM_HT_HMAC_SESSION (TPM_HT)(0x02)
-#define TPM_HT_LOADED_SESSION (TPM_HT)(0x02)
-#define TPM_HT_POLICY_SESSION (TPM_HT)(0x03)
-#define TPM_HT_ACTIVE_SESSION (TPM_HT)(0x03)
-#define TPM_HT_PERMANENT (TPM_HT)(0x40)
-#define TPM_HT_TRANSIENT (TPM_HT)(0x80)
-#define TPM_HT_PERSISTENT (TPM_HT)(0x81)
-
-// Table 27 - TPM_RH Constants
-typedef UINT32 TPM_RH;
-#define TPM_RH_FIRST (TPM_RH)(0x40000000)
-#define TPM_RH_SRK (TPM_RH)(0x40000000)
-#define TPM_RH_OWNER (TPM_RH)(0x40000001)
-#define TPM_RH_REVOKE (TPM_RH)(0x40000002)
-#define TPM_RH_TRANSPORT (TPM_RH)(0x40000003)
-#define TPM_RH_OPERATOR (TPM_RH)(0x40000004)
-#define TPM_RH_ADMIN (TPM_RH)(0x40000005)
-#define TPM_RH_EK (TPM_RH)(0x40000006)
-#define TPM_RH_NULL (TPM_RH)(0x40000007)
-#define TPM_RH_UNASSIGNED (TPM_RH)(0x40000008)
-#define TPM_RS_PW (TPM_RH)(0x40000009)
-#define TPM_RH_LOCKOUT (TPM_RH)(0x4000000A)
-#define TPM_RH_ENDORSEMENT (TPM_RH)(0x4000000B)
-#define TPM_RH_PLATFORM (TPM_RH)(0x4000000C)
-#define TPM_RH_PLATFORM_NV (TPM_RH)(0x4000000D)
-#define TPM_RH_AUTH_00 (TPM_RH)(0x40000010)
-#define TPM_RH_AUTH_FF (TPM_RH)(0x4000010F)
-#define TPM_RH_LAST (TPM_RH)(0x4000010F)
-
-// Table 28 - TPM_HC Constants
-typedef TPM_HANDLE TPM_HC;
-#define HR_HANDLE_MASK (TPM_HC)(0x00FFFFFF)
-#define HR_RANGE_MASK (TPM_HC)(0xFF000000)
-#define HR_SHIFT (TPM_HC)(24)
-#define HR_PCR (TPM_HC)((TPM_HC)TPM_HT_PCR << HR_SHIFT)
-#define HR_HMAC_SESSION (TPM_HC)((TPM_HC)TPM_HT_HMAC_SESSION << HR_SHIFT)
-#define HR_POLICY_SESSION (TPM_HC)((TPM_HC)TPM_HT_POLICY_SESSION << HR_SHIFT)
-#define HR_TRANSIENT (TPM_HC)((TPM_HC)TPM_HT_TRANSIENT << HR_SHIFT)
-#define HR_PERSISTENT (TPM_HC)((TPM_HC)TPM_HT_PERSISTENT << HR_SHIFT)
-#define HR_NV_INDEX (TPM_HC)((TPM_HC)TPM_HT_NV_INDEX << HR_SHIFT)
-#define HR_PERMANENT (TPM_HC)((TPM_HC)TPM_HT_PERMANENT << HR_SHIFT)
-#define PCR_FIRST (TPM_HC)(HR_PCR + 0)
-#define PCR_LAST (TPM_HC)(PCR_FIRST + IMPLEMENTATION_PCR - 1)
-#define HMAC_SESSION_FIRST (TPM_HC)(HR_HMAC_SESSION + 0)
-#define HMAC_SESSION_LAST (TPM_HC)(HMAC_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1)
-#define LOADED_SESSION_FIRST (TPM_HC)(HMAC_SESSION_FIRST)
-#define LOADED_SESSION_LAST (TPM_HC)(HMAC_SESSION_LAST)
-#define POLICY_SESSION_FIRST (TPM_HC)(HR_POLICY_SESSION + 0)
-#define POLICY_SESSION_LAST (TPM_HC)(POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1)
-#define TRANSIENT_FIRST (TPM_HC)(HR_TRANSIENT + 0)
-#define ACTIVE_SESSION_FIRST (TPM_HC)(POLICY_SESSION_FIRST)
-#define ACTIVE_SESSION_LAST (TPM_HC)(POLICY_SESSION_LAST)
-#define TRANSIENT_LAST (TPM_HC)(TRANSIENT_FIRST+MAX_LOADED_OBJECTS - 1)
-#define PERSISTENT_FIRST (TPM_HC)(HR_PERSISTENT + 0)
-#define PERSISTENT_LAST (TPM_HC)(PERSISTENT_FIRST + 0x00FFFFFF)
-#define PLATFORM_PERSISTENT (TPM_HC)(PERSISTENT_FIRST + 0x00800000)
-#define NV_INDEX_FIRST (TPM_HC)(HR_NV_INDEX + 0)
-#define NV_INDEX_LAST (TPM_HC)(NV_INDEX_FIRST + 0x00FFFFFF)
-#define PERMANENT_FIRST (TPM_HC)(TPM_RH_FIRST)
-#define PERMANENT_LAST (TPM_HC)(TPM_RH_LAST)
-
-// 8 Attribute Structures
-
-// Table 29 - TPMA_ALGORITHM Bits
-typedef struct {
- UINT32 asymmetric : 1;
- UINT32 symmetric : 1;
- UINT32 hash : 1;
- UINT32 object : 1;
- UINT32 reserved4_7 : 4;
- UINT32 signing : 1;
- UINT32 encrypting : 1;
- UINT32 method : 1;
- UINT32 reserved11_31 : 21;
-} TPMA_ALGORITHM;
-
-// Table 30 - TPMA_OBJECT Bits
-typedef struct {
- UINT32 reserved1 : 1;
- UINT32 fixedTPM : 1;
- UINT32 stClear : 1;
- UINT32 reserved4 : 1;
- UINT32 fixedParent : 1;
- UINT32 sensitiveDataOrigin : 1;
- UINT32 userWithAuth : 1;
- UINT32 adminWithPolicy : 1;
- UINT32 reserved8_9 : 2;
- UINT32 noDA : 1;
- UINT32 encryptedDuplication : 1;
- UINT32 reserved12_15 : 4;
- UINT32 restricted : 1;
- UINT32 decrypt : 1;
- UINT32 sign : 1;
- UINT32 reserved19_31 : 13;
-} TPMA_OBJECT;
-
-// Table 31 - TPMA_SESSION Bits
-typedef struct {
- UINT8 continueSession : 1;
- UINT8 auditExclusive : 1;
- UINT8 auditReset : 1;
- UINT8 reserved3_4 : 2;
- UINT8 decrypt : 1;
- UINT8 encrypt : 1;
- UINT8 audit : 1;
-} TPMA_SESSION;
-
-// Table 32 - TPMA_LOCALITY Bits
-//
-// NOTE: Use low case here to resolve conflict
-//
-typedef struct {
- UINT8 locZero : 1;
- UINT8 locOne : 1;
- UINT8 locTwo : 1;
- UINT8 locThree : 1;
- UINT8 locFour : 1;
- UINT8 Extended : 3;
-} TPMA_LOCALITY;
-
-// Table 33 - TPMA_PERMANENT Bits
-typedef struct {
- UINT32 ownerAuthSet : 1;
- UINT32 endorsementAuthSet : 1;
- UINT32 lockoutAuthSet : 1;
- UINT32 reserved3_7 : 5;
- UINT32 disableClear : 1;
- UINT32 inLockout : 1;
- UINT32 tpmGeneratedEPS : 1;
- UINT32 reserved11_31 : 21;
-} TPMA_PERMANENT;
-
-// Table 34 - TPMA_STARTUP_CLEAR Bits
-typedef struct {
- UINT32 phEnable : 1;
- UINT32 shEnable : 1;
- UINT32 ehEnable : 1;
- UINT32 reserved3_30 : 28;
- UINT32 orderly : 1;
-} TPMA_STARTUP_CLEAR;
-
-// Table 35 - TPMA_MEMORY Bits
-typedef struct {
- UINT32 sharedRAM : 1;
- UINT32 sharedNV : 1;
- UINT32 objectCopiedToRam : 1;
- UINT32 reserved3_31 : 29;
-} TPMA_MEMORY;
-
-// Table 36 - TPMA_CC Bits
-typedef struct {
- UINT32 commandIndex : 16;
- UINT32 reserved16_21 : 6;
- UINT32 nv : 1;
- UINT32 extensive : 1;
- UINT32 flushed : 1;
- UINT32 cHandles : 3;
- UINT32 rHandle : 1;
- UINT32 V : 1;
- UINT32 Res : 2;
-} TPMA_CC;
-
-// 9 Interface Types
-
-// Table 37 - TPMI_YES_NO Type
-typedef BYTE TPMI_YES_NO;
-
-// Table 38 - TPMI_DH_OBJECT Type
-typedef TPM_HANDLE TPMI_DH_OBJECT;
-
-// Table 39 - TPMI_DH_PERSISTENT Type
-typedef TPM_HANDLE TPMI_DH_PERSISTENT;
-
-// Table 40 - TPMI_DH_ENTITY Type
-typedef TPM_HANDLE TPMI_DH_ENTITY;
-
-// Table 41 - TPMI_DH_PCR Type
-typedef TPM_HANDLE TPMI_DH_PCR;
-
-// Table 42 - TPMI_SH_AUTH_SESSION Type
-typedef TPM_HANDLE TPMI_SH_AUTH_SESSION;
-
-// Table 43 - TPMI_SH_HMAC Type
-typedef TPM_HANDLE TPMI_SH_HMAC;
-
-// Table 44 - TPMI_SH_POLICY Type
-typedef TPM_HANDLE TPMI_SH_POLICY;
-
-// Table 45 - TPMI_DH_CONTEXT Type
-typedef TPM_HANDLE TPMI_DH_CONTEXT;
-
-// Table 46 - TPMI_RH_HIERARCHY Type
-typedef TPM_HANDLE TPMI_RH_HIERARCHY;
-
-// Table 47 - TPMI_RH_HIERARCHY_AUTH Type
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
-// Table 48 - TPMI_RH_PLATFORM Type
-typedef TPM_HANDLE TPMI_RH_PLATFORM;
-
-// Table 49 - TPMI_RH_OWNER Type
-typedef TPM_HANDLE TPMI_RH_OWNER;
-
-// Table 50 - TPMI_RH_ENDORSEMENT Type
-typedef TPM_HANDLE TPMI_RH_ENDORSEMENT;
-
-// Table 51 - TPMI_RH_PROVISION Type
-typedef TPM_HANDLE TPMI_RH_PROVISION;
-
-// Table 52 - TPMI_RH_CLEAR Type
-typedef TPM_HANDLE TPMI_RH_CLEAR;
-
-// Table 53 - TPMI_RH_NV_AUTH Type
-typedef TPM_HANDLE TPMI_RH_NV_AUTH;
-
-// Table 54 - TPMI_RH_LOCKOUT Type
-typedef TPM_HANDLE TPMI_RH_LOCKOUT;
-
-// Table 55 - TPMI_RH_NV_INDEX Type
-typedef TPM_HANDLE TPMI_RH_NV_INDEX;
-
-// Table 56 - TPMI_ALG_HASH Type
-typedef TPM_ALG_ID TPMI_ALG_HASH;
-
-// Table 57 - TPMI_ALG_ASYM Type
-typedef TPM_ALG_ID TPMI_ALG_ASYM;
-
-// Table 58 - TPMI_ALG_SYM Type
-typedef TPM_ALG_ID TPMI_ALG_SYM;
-
-// Table 59 - TPMI_ALG_SYM_OBJECT Type
-typedef TPM_ALG_ID TPMI_ALG_SYM_OBJECT;
-
-// Table 60 - TPMI_ALG_SYM_MODE Type
-typedef TPM_ALG_ID TPMI_ALG_SYM_MODE;
-
-// Table 61 - TPMI_ALG_KDF Type
-typedef TPM_ALG_ID TPMI_ALG_KDF;
-
-// Table 62 - TPMI_ALG_SIG_SCHEME Type
-typedef TPM_ALG_ID TPMI_ALG_SIG_SCHEME;
-
-// Table 63 - TPMI_ECC_KEY_EXCHANGE Type
-typedef TPM_ALG_ID TPMI_ECC_KEY_EXCHANGE;
-
-// Table 64 - TPMI_ST_COMMAND_TAG Type
-typedef TPM_ST TPMI_ST_COMMAND_TAG;
-
-// 10 Structure Definitions
-
-// Table 65 - TPMS_ALGORITHM_DESCRIPTION Structure
-typedef struct {
- TPM_ALG_ID alg;
- TPMA_ALGORITHM attributes;
-} TPMS_ALGORITHM_DESCRIPTION;
-
-// Table 66 - TPMU_HA Union
-typedef union {
- BYTE sha1[SHA1_DIGEST_SIZE];
- BYTE sha256[SHA256_DIGEST_SIZE];
- BYTE sm3_256[SM3_256_DIGEST_SIZE];
- BYTE sha384[SHA384_DIGEST_SIZE];
- BYTE sha512[SHA512_DIGEST_SIZE];
-} TPMU_HA;
-
-// Table 67 - TPMT_HA Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
- TPMU_HA digest;
-} TPMT_HA;
-
-// Table 68 - TPM2B_DIGEST Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[sizeof(TPMU_HA)];
-} TPM2B_DIGEST;
-
-// Table 69 - TPM2B_DATA Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[sizeof(TPMT_HA)];
-} TPM2B_DATA;
-
-// Table 70 - TPM2B_NONCE Types
-typedef TPM2B_DIGEST TPM2B_NONCE;
-
-// Table 71 - TPM2B_AUTH Types
-typedef TPM2B_DIGEST TPM2B_AUTH;
-
-// Table 72 - TPM2B_OPERAND Types
-typedef TPM2B_DIGEST TPM2B_OPERAND;
-
-// Table 73 - TPM2B_EVENT Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[1024];
-} TPM2B_EVENT;
-
-// Table 74 - TPM2B_MAX_BUFFER Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_DIGEST_BUFFER];
-} TPM2B_MAX_BUFFER;
-
-// Table 75 - TPM2B_MAX_NV_BUFFER Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_NV_INDEX_SIZE];
-} TPM2B_MAX_NV_BUFFER;
-
-// Table 76 - TPM2B_TIMEOUT Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[sizeof(UINT64)];
-} TPM2B_TIMEOUT;
-
-// Table 77 -- TPM2B_IV Structure <I/O>
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_SYM_BLOCK_SIZE];
-} TPM2B_IV;
-
-// Table 78 - TPMU_NAME Union
-typedef union {
- TPMT_HA digest;
- TPM_HANDLE handle;
-} TPMU_NAME;
-
-// Table 79 - TPM2B_NAME Structure
-typedef struct {
- UINT16 size;
- BYTE name[sizeof(TPMU_NAME)];
-} TPM2B_NAME;
-
-// Table 80 - TPMS_PCR_SELECT Structure
-typedef struct {
- UINT8 sizeofSelect;
- BYTE pcrSelect[PCR_SELECT_MAX];
-} TPMS_PCR_SELECT;
-
-// Table 81 - TPMS_PCR_SELECTION Structure
-typedef struct {
- TPMI_ALG_HASH hash;
- UINT8 sizeofSelect;
- BYTE pcrSelect[PCR_SELECT_MAX];
-} TPMS_PCR_SELECTION;
-
-// Table 84 - TPMT_TK_CREATION Structure
-typedef struct {
- TPM_ST tag;
- TPMI_RH_HIERARCHY hierarchy;
- TPM2B_DIGEST digest;
-} TPMT_TK_CREATION;
-
-// Table 85 - TPMT_TK_VERIFIED Structure
-typedef struct {
- TPM_ST tag;
- TPMI_RH_HIERARCHY hierarchy;
- TPM2B_DIGEST digest;
-} TPMT_TK_VERIFIED;
-
-// Table 86 - TPMT_TK_AUTH Structure
-typedef struct {
- TPM_ST tag;
- TPMI_RH_HIERARCHY hierarchy;
- TPM2B_DIGEST digest;
-} TPMT_TK_AUTH;
-
-// Table 87 - TPMT_TK_HASHCHECK Structure
-typedef struct {
- TPM_ST tag;
- TPMI_RH_HIERARCHY hierarchy;
- TPM2B_DIGEST digest;
-} TPMT_TK_HASHCHECK;
-
-// Table 88 - TPMS_ALG_PROPERTY Structure
-typedef struct {
- TPM_ALG_ID alg;
- TPMA_ALGORITHM algProperties;
-} TPMS_ALG_PROPERTY;
-
-// Table 89 - TPMS_TAGGED_PROPERTY Structure
-typedef struct {
- TPM_PT property;
- UINT32 value;
-} TPMS_TAGGED_PROPERTY;
-
-// Table 90 - TPMS_TAGGED_PCR_SELECT Structure
-typedef struct {
- TPM_PT tag;
- UINT8 sizeofSelect;
- BYTE pcrSelect[PCR_SELECT_MAX];
-} TPMS_TAGGED_PCR_SELECT;
-
-// Table 91 - TPML_CC Structure
-typedef struct {
- UINT32 count;
- TPM_CC commandCodes[MAX_CAP_CC];
-} TPML_CC;
-
-// Table 92 - TPML_CCA Structure
-typedef struct {
- UINT32 count;
- TPMA_CC commandAttributes[MAX_CAP_CC];
-} TPML_CCA;
-
-// Table 93 - TPML_ALG Structure
-typedef struct {
- UINT32 count;
- TPM_ALG_ID algorithms[MAX_ALG_LIST_SIZE];
-} TPML_ALG;
-
-// Table 94 - TPML_HANDLE Structure
-typedef struct {
- UINT32 count;
- TPM_HANDLE handle[MAX_CAP_HANDLES];
-} TPML_HANDLE;
-
-// Table 95 - TPML_DIGEST Structure
-typedef struct {
- UINT32 count;
- TPM2B_DIGEST digests[8];
-} TPML_DIGEST;
-
-// Table 96 -- TPML_DIGEST_VALUES Structure <I/O>
-typedef struct {
- UINT32 count;
- TPMT_HA digests[HASH_COUNT];
-} TPML_DIGEST_VALUES;
-
-// Table 97 - TPM2B_DIGEST_VALUES Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[sizeof(TPML_DIGEST_VALUES)];
-} TPM2B_DIGEST_VALUES;
-
-// Table 98 - TPML_PCR_SELECTION Structure
-typedef struct {
- UINT32 count;
- TPMS_PCR_SELECTION pcrSelections[HASH_COUNT];
-} TPML_PCR_SELECTION;
-
-// Table 99 - TPML_ALG_PROPERTY Structure
-typedef struct {
- UINT32 count;
- TPMS_ALG_PROPERTY algProperties[MAX_CAP_ALGS];
-} TPML_ALG_PROPERTY;
-
-// Table 100 - TPML_TAGGED_TPM_PROPERTY Structure
-typedef struct {
- UINT32 count;
- TPMS_TAGGED_PROPERTY tpmProperty[MAX_TPM_PROPERTIES];
-} TPML_TAGGED_TPM_PROPERTY;
-
-// Table 101 - TPML_TAGGED_PCR_PROPERTY Structure
-typedef struct {
- UINT32 count;
- TPMS_TAGGED_PCR_SELECT pcrProperty[MAX_PCR_PROPERTIES];
-} TPML_TAGGED_PCR_PROPERTY;
-
-// Table 102 - TPML_ECC_CURVE Structure
-typedef struct {
- UINT32 count;
- TPM_ECC_CURVE eccCurves[MAX_ECC_CURVES];
-} TPML_ECC_CURVE;
-
-// Table 103 - TPMU_CAPABILITIES Union
-typedef union {
- TPML_ALG_PROPERTY algorithms;
- TPML_HANDLE handles;
- TPML_CCA command;
- TPML_CC ppCommands;
- TPML_CC auditCommands;
- TPML_PCR_SELECTION assignedPCR;
- TPML_TAGGED_TPM_PROPERTY tpmProperties;
- TPML_TAGGED_PCR_PROPERTY pcrProperties;
- TPML_ECC_CURVE eccCurves;
-} TPMU_CAPABILITIES;
-
-// Table 104 - TPMS_CAPABILITY_DATA Structure
-typedef struct {
- TPM_CAP capability;
- TPMU_CAPABILITIES data;
-} TPMS_CAPABILITY_DATA;
-
-// Table 105 - TPMS_CLOCK_INFO Structure
-typedef struct {
- UINT64 clock;
- UINT32 resetCount;
- UINT32 restartCount;
- TPMI_YES_NO safe;
-} TPMS_CLOCK_INFO;
-
-// Table 106 - TPMS_TIME_INFO Structure
-typedef struct {
- UINT64 time;
- TPMS_CLOCK_INFO clockInfo;
-} TPMS_TIME_INFO;
-
-// Table 107 - TPMS_TIME_ATTEST_INFO Structure
-typedef struct {
- TPMS_TIME_INFO time;
- UINT64 firmwareVersion;
-} TPMS_TIME_ATTEST_INFO;
-
-// Table 108 - TPMS_CERTIFY_INFO Structure
-typedef struct {
- TPM2B_NAME name;
- TPM2B_NAME qualifiedName;
-} TPMS_CERTIFY_INFO;
-
-// Table 109 - TPMS_QUOTE_INFO Structure
-typedef struct {
- TPML_PCR_SELECTION pcrSelect;
- TPM2B_DIGEST pcrDigest;
-} TPMS_QUOTE_INFO;
-
-// Table 110 - TPMS_COMMAND_AUDIT_INFO Structure
-typedef struct {
- UINT64 auditCounter;
- TPM_ALG_ID digestAlg;
- TPM2B_DIGEST auditDigest;
- TPM2B_DIGEST commandDigest;
-} TPMS_COMMAND_AUDIT_INFO;
-
-// Table 111 - TPMS_SESSION_AUDIT_INFO Structure
-typedef struct {
- TPMI_YES_NO exclusiveSession;
- TPM2B_DIGEST sessionDigest;
-} TPMS_SESSION_AUDIT_INFO;
-
-// Table 112 - TPMS_CREATION_INFO Structure
-typedef struct {
- TPM2B_NAME objectName;
- TPM2B_DIGEST creationHash;
-} TPMS_CREATION_INFO;
-
-// Table 113 - TPMS_NV_CERTIFY_INFO Structure
-typedef struct {
- TPM2B_NAME indexName;
- UINT16 offset;
- TPM2B_MAX_NV_BUFFER nvContents;
-} TPMS_NV_CERTIFY_INFO;
-
-// Table 114 - TPMI_ST_ATTEST Type
-typedef TPM_ST TPMI_ST_ATTEST;
-
-// Table 115 - TPMU_ATTEST Union
-typedef union {
- TPMS_CERTIFY_INFO certify;
- TPMS_CREATION_INFO creation;
- TPMS_QUOTE_INFO quote;
- TPMS_COMMAND_AUDIT_INFO commandAudit;
- TPMS_SESSION_AUDIT_INFO sessionAudit;
- TPMS_TIME_ATTEST_INFO time;
- TPMS_NV_CERTIFY_INFO nv;
-} TPMU_ATTEST;
-
-// Table 116 - TPMS_ATTEST Structure
-typedef struct {
- TPM_GENERATED magic;
- TPMI_ST_ATTEST type;
- TPM2B_NAME qualifiedSigner;
- TPM2B_DATA extraData;
- TPMS_CLOCK_INFO clockInfo;
- UINT64 firmwareVersion;
- TPMU_ATTEST attested;
-} TPMS_ATTEST;
-
-// Table 117 - TPM2B_ATTEST Structure
-typedef struct {
- UINT16 size;
- BYTE attestationData[sizeof(TPMS_ATTEST)];
-} TPM2B_ATTEST;
-
-// Table 118 - TPMS_AUTH_COMMAND Structure
-typedef struct {
- TPMI_SH_AUTH_SESSION sessionHandle;
- TPM2B_NONCE nonce;
- TPMA_SESSION sessionAttributes;
- TPM2B_AUTH hmac;
-} TPMS_AUTH_COMMAND;
-
-// Table 119 - TPMS_AUTH_RESPONSE Structure
-typedef struct {
- TPM2B_NONCE nonce;
- TPMA_SESSION sessionAttributes;
- TPM2B_AUTH hmac;
-} TPMS_AUTH_RESPONSE;
-
-// 11 Algorithm Parameters and Structures
-
-// Table 120 - TPMI_AES_KEY_BITS Type
-typedef TPM_KEY_BITS TPMI_AES_KEY_BITS;
-
-// Table 121 - TPMI_SM4_KEY_BITS Type
-typedef TPM_KEY_BITS TPMI_SM4_KEY_BITS;
-
-// Table 122 - TPMU_SYM_KEY_BITS Union
-typedef union {
- TPMI_AES_KEY_BITS aes;
- TPMI_SM4_KEY_BITS SM4;
- TPM_KEY_BITS sym;
- TPMI_ALG_HASH xor;
-} TPMU_SYM_KEY_BITS;
-
-// Table 123 - TPMU_SYM_MODE Union
-typedef union {
- TPMI_ALG_SYM_MODE aes;
- TPMI_ALG_SYM_MODE SM4;
- TPMI_ALG_SYM_MODE sym;
-} TPMU_SYM_MODE;
-
-// Table 125 - TPMT_SYM_DEF Structure
-typedef struct {
- TPMI_ALG_SYM algorithm;
- TPMU_SYM_KEY_BITS keyBits;
- TPMU_SYM_MODE mode;
-} TPMT_SYM_DEF;
-
-// Table 126 - TPMT_SYM_DEF_OBJECT Structure
-typedef struct {
- TPMI_ALG_SYM_OBJECT algorithm;
- TPMU_SYM_KEY_BITS keyBits;
- TPMU_SYM_MODE mode;
-} TPMT_SYM_DEF_OBJECT;
-
-// Table 127 - TPM2B_SYM_KEY Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_SYM_KEY_BYTES];
-} TPM2B_SYM_KEY;
-
-// Table 128 - TPMS_SYMCIPHER_PARMS Structure
-typedef struct {
- TPMT_SYM_DEF_OBJECT sym;
-} TPMS_SYMCIPHER_PARMS;
-
-// Table 129 - TPM2B_SENSITIVE_DATA Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_SYM_DATA];
-} TPM2B_SENSITIVE_DATA;
-
-// Table 130 - TPMS_SENSITIVE_CREATE Structure
-typedef struct {
- TPM2B_AUTH userAuth;
- TPM2B_SENSITIVE_DATA data;
-} TPMS_SENSITIVE_CREATE;
-
-// Table 131 - TPM2B_SENSITIVE_CREATE Structure
-typedef struct {
- UINT16 size;
- TPMS_SENSITIVE_CREATE sensitive;
-} TPM2B_SENSITIVE_CREATE;
-
-// Table 132 - TPMS_SCHEME_SIGHASH Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_SIGHASH;
-
-// Table 133 - TPMI_ALG_KEYEDHASH_SCHEME Type
-typedef TPM_ALG_ID TPMI_ALG_KEYEDHASH_SCHEME;
-
-// Table 134 - HMAC_SIG_SCHEME Types
-typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_HMAC;
-
-// Table 135 - TPMS_SCHEME_XOR Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
- TPMI_ALG_KDF kdf;
-} TPMS_SCHEME_XOR;
-
-// Table 136 - TPMU_SCHEME_KEYEDHASH Union
-typedef union {
- TPMS_SCHEME_HMAC hmac;
- TPMS_SCHEME_XOR xor;
-} TPMU_SCHEME_KEYEDHASH;
-
-// Table 137 - TPMT_KEYEDHASH_SCHEME Structure
-typedef struct {
- TPMI_ALG_KEYEDHASH_SCHEME scheme;
- TPMU_SCHEME_KEYEDHASH details;
-} TPMT_KEYEDHASH_SCHEME;
-
-// Table 138 - RSA_SIG_SCHEMES Types
-typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSASSA;
-typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSAPSS;
-
-// Table 139 - ECC_SIG_SCHEMES Types
-typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECDSA;
-typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_SM2;
-typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECSCHNORR;
-
-// Table 140 - TPMS_SCHEME_ECDAA Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
- UINT16 count;
-} TPMS_SCHEME_ECDAA;
-
-// Table 141 - TPMU_SIG_SCHEME Union
-typedef union {
- TPMS_SCHEME_RSASSA rsassa;
- TPMS_SCHEME_RSAPSS rsapss;
- TPMS_SCHEME_ECDSA ecdsa;
- TPMS_SCHEME_ECDAA ecdaa;
- TPMS_SCHEME_ECSCHNORR ecSchnorr;
- TPMS_SCHEME_HMAC hmac;
- TPMS_SCHEME_SIGHASH any;
-} TPMU_SIG_SCHEME;
-
-// Table 142 - TPMT_SIG_SCHEME Structure
-typedef struct {
- TPMI_ALG_SIG_SCHEME scheme;
- TPMU_SIG_SCHEME details;
-} TPMT_SIG_SCHEME;
-
-// Table 143 - TPMS_SCHEME_OAEP Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_OAEP;
-
-// Table 144 - TPMS_SCHEME_ECDH Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_ECDH;
-
-// Table 145 - TPMS_SCHEME_MGF1 Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_MGF1;
-
-// Table 146 - TPMS_SCHEME_KDF1_SP800_56a Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_KDF1_SP800_56a;
-
-// Table 147 - TPMS_SCHEME_KDF2 Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_KDF2;
-
-// Table 148 - TPMS_SCHEME_KDF1_SP800_108 Structure
-typedef struct {
- TPMI_ALG_HASH hashAlg;
-} TPMS_SCHEME_KDF1_SP800_108;
-
-// Table 149 - TPMU_KDF_SCHEME Union
-typedef union {
- TPMS_SCHEME_MGF1 mgf1;
- TPMS_SCHEME_KDF1_SP800_56a kdf1_SP800_56a;
- TPMS_SCHEME_KDF2 kdf2;
- TPMS_SCHEME_KDF1_SP800_108 kdf1_sp800_108;
-} TPMU_KDF_SCHEME;
-
-// Table 150 - TPMT_KDF_SCHEME Structure
-typedef struct {
- TPMI_ALG_KDF scheme;
- TPMU_KDF_SCHEME details;
-} TPMT_KDF_SCHEME;
-
-// Table 151 - TPMI_ALG_ASYM_SCHEME Type
-typedef TPM_ALG_ID TPMI_ALG_ASYM_SCHEME;
-
-// Table 152 - TPMU_ASYM_SCHEME Union
-typedef union {
- TPMS_SCHEME_RSASSA rsassa;
- TPMS_SCHEME_RSAPSS rsapss;
- TPMS_SCHEME_OAEP oaep;
- TPMS_SCHEME_ECDSA ecdsa;
- TPMS_SCHEME_ECDAA ecdaa;
- TPMS_SCHEME_ECSCHNORR ecSchnorr;
- TPMS_SCHEME_SIGHASH anySig;
-} TPMU_ASYM_SCHEME;
-
-// Table 153 - TPMT_ASYM_SCHEME Structure
-typedef struct {
- TPMI_ALG_ASYM_SCHEME scheme;
- TPMU_ASYM_SCHEME details;
-} TPMT_ASYM_SCHEME;
-
-// Table 154 - TPMI_ALG_RSA_SCHEME Type
-typedef TPM_ALG_ID TPMI_ALG_RSA_SCHEME;
-
-// Table 155 - TPMT_RSA_SCHEME Structure
-typedef struct {
- TPMI_ALG_RSA_SCHEME scheme;
- TPMU_ASYM_SCHEME details;
-} TPMT_RSA_SCHEME;
-
-// Table 156 - TPMI_ALG_RSA_DECRYPT Type
-typedef TPM_ALG_ID TPMI_ALG_RSA_DECRYPT;
-
-// Table 157 - TPMT_RSA_DECRYPT Structure
-typedef struct {
- TPMI_ALG_RSA_DECRYPT scheme;
- TPMU_ASYM_SCHEME details;
-} TPMT_RSA_DECRYPT;
-
-// Table 158 - TPM2B_PUBLIC_KEY_RSA Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_RSA_KEY_BYTES];
-} TPM2B_PUBLIC_KEY_RSA;
-
-// Table 159 - TPMI_RSA_KEY_BITS Type
-typedef TPM_KEY_BITS TPMI_RSA_KEY_BITS;
-
-// Table 160 - TPM2B_PRIVATE_KEY_RSA Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_RSA_KEY_BYTES/2];
-} TPM2B_PRIVATE_KEY_RSA;
-
-// Table 161 - TPM2B_ECC_PARAMETER Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_ECC_KEY_BYTES];
-} TPM2B_ECC_PARAMETER;
-
-// Table 162 - TPMS_ECC_POINT Structure
-typedef struct {
- TPM2B_ECC_PARAMETER x;
- TPM2B_ECC_PARAMETER y;
-} TPMS_ECC_POINT;
-
-// Table 163 -- TPM2B_ECC_POINT Structure <I/O>
-typedef struct {
- UINT16 size;
- TPMS_ECC_POINT point;
-} TPM2B_ECC_POINT;
-
-// Table 164 - TPMI_ALG_ECC_SCHEME Type
-typedef TPM_ALG_ID TPMI_ALG_ECC_SCHEME;
-
-// Table 165 - TPMI_ECC_CURVE Type
-typedef TPM_ECC_CURVE TPMI_ECC_CURVE;
-
-// Table 166 - TPMT_ECC_SCHEME Structure
-typedef struct {
- TPMI_ALG_ECC_SCHEME scheme;
- TPMU_SIG_SCHEME details;
-} TPMT_ECC_SCHEME;
-
-// Table 167 - TPMS_ALGORITHM_DETAIL_ECC Structure
-typedef struct {
- TPM_ECC_CURVE curveID;
- UINT16 keySize;
- TPMT_KDF_SCHEME kdf;
- TPMT_ECC_SCHEME sign;
- TPM2B_ECC_PARAMETER p;
- TPM2B_ECC_PARAMETER a;
- TPM2B_ECC_PARAMETER b;
- TPM2B_ECC_PARAMETER gX;
- TPM2B_ECC_PARAMETER gY;
- TPM2B_ECC_PARAMETER n;
- TPM2B_ECC_PARAMETER h;
-} TPMS_ALGORITHM_DETAIL_ECC;
-
-// Table 168 - TPMS_SIGNATURE_RSASSA Structure
-typedef struct {
- TPMI_ALG_HASH hash;
- TPM2B_PUBLIC_KEY_RSA sig;
-} TPMS_SIGNATURE_RSASSA;
-
-// Table 169 - TPMS_SIGNATURE_RSAPSS Structure
-typedef struct {
- TPMI_ALG_HASH hash;
- TPM2B_PUBLIC_KEY_RSA sig;
-} TPMS_SIGNATURE_RSAPSS;
-
-// Table 170 - TPMS_SIGNATURE_ECDSA Structure
-typedef struct {
- TPMI_ALG_HASH hash;
- TPM2B_ECC_PARAMETER signatureR;
- TPM2B_ECC_PARAMETER signatureS;
-} TPMS_SIGNATURE_ECDSA;
-
-// Table 171 - TPMU_SIGNATURE Union
-typedef union {
- TPMS_SIGNATURE_RSASSA rsassa;
- TPMS_SIGNATURE_RSAPSS rsapss;
- TPMS_SIGNATURE_ECDSA ecdsa;
- TPMS_SIGNATURE_ECDSA sm2;
- TPMS_SIGNATURE_ECDSA ecdaa;
- TPMS_SIGNATURE_ECDSA ecschnorr;
- TPMT_HA hmac;
- TPMS_SCHEME_SIGHASH any;
-} TPMU_SIGNATURE;
-
-// Table 172 - TPMT_SIGNATURE Structure
-typedef struct {
- TPMI_ALG_SIG_SCHEME sigAlg;
- TPMU_SIGNATURE signature;
-} TPMT_SIGNATURE;
-
-// Table 173 - TPMU_ENCRYPTED_SECRET Union
-typedef union {
- BYTE ecc[sizeof(TPMS_ECC_POINT)];
- BYTE rsa[MAX_RSA_KEY_BYTES];
- BYTE symmetric[sizeof(TPM2B_DIGEST)];
- BYTE keyedHash[sizeof(TPM2B_DIGEST)];
-} TPMU_ENCRYPTED_SECRET;
-
-// Table 174 - TPM2B_ENCRYPTED_SECRET Structure
-typedef struct {
- UINT16 size;
- BYTE secret[sizeof(TPMU_ENCRYPTED_SECRET)];
-} TPM2B_ENCRYPTED_SECRET;
-
-// 12 Key/Object Complex
-
-// Table 175 - TPMI_ALG_PUBLIC Type
-typedef TPM_ALG_ID TPMI_ALG_PUBLIC;
-
-// Table 176 - TPMU_PUBLIC_ID Union
-typedef union {
- TPM2B_DIGEST keyedHash;
- TPM2B_DIGEST sym;
- TPM2B_PUBLIC_KEY_RSA rsa;
- TPMS_ECC_POINT ecc;
-} TPMU_PUBLIC_ID;
-
-// Table 177 - TPMS_KEYEDHASH_PARMS Structure
-typedef struct {
- TPMT_KEYEDHASH_SCHEME scheme;
-} TPMS_KEYEDHASH_PARMS;
-
-// Table 178 - TPMS_ASYM_PARMS Structure
-typedef struct {
- TPMT_SYM_DEF_OBJECT symmetric;
- TPMT_ASYM_SCHEME scheme;
-} TPMS_ASYM_PARMS;
-
-// Table 179 - TPMS_RSA_PARMS Structure
-typedef struct {
- TPMT_SYM_DEF_OBJECT symmetric;
- TPMT_RSA_SCHEME scheme;
- TPMI_RSA_KEY_BITS keyBits;
- UINT32 exponent;
-} TPMS_RSA_PARMS;
-
-// Table 180 - TPMS_ECC_PARMS Structure
-typedef struct {
- TPMT_SYM_DEF_OBJECT symmetric;
- TPMT_ECC_SCHEME scheme;
- TPMI_ECC_CURVE curveID;
- TPMT_KDF_SCHEME kdf;
-} TPMS_ECC_PARMS;
-
-// Table 181 - TPMU_PUBLIC_PARMS Union
-typedef union {
- TPMS_KEYEDHASH_PARMS keyedHashDetail;
- TPMT_SYM_DEF_OBJECT symDetail;
- TPMS_RSA_PARMS rsaDetail;
- TPMS_ECC_PARMS eccDetail;
- TPMS_ASYM_PARMS asymDetail;
-} TPMU_PUBLIC_PARMS;
-
-// Table 182 - TPMT_PUBLIC_PARMS Structure
-typedef struct {
- TPMI_ALG_PUBLIC type;
- TPMU_PUBLIC_PARMS parameters;
-} TPMT_PUBLIC_PARMS;
-
-// Table 183 - TPMT_PUBLIC Structure
-typedef struct {
- TPMI_ALG_PUBLIC type;
- TPMI_ALG_HASH nameAlg;
- TPMA_OBJECT objectAttributes;
- TPM2B_DIGEST authPolicy;
- TPMU_PUBLIC_PARMS parameters;
- TPMU_PUBLIC_ID unique;
-} TPMT_PUBLIC;
-
-// Table 184 - TPM2B_PUBLIC Structure
-typedef struct {
- UINT16 size;
- TPMT_PUBLIC publicArea;
-} TPM2B_PUBLIC;
-
-// Table 185 - TPM2B_PRIVATE_VENDOR_SPECIFIC Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[PRIVATE_VENDOR_SPECIFIC_BYTES];
-} TPM2B_PRIVATE_VENDOR_SPECIFIC;
-
-// Table 186 - TPMU_SENSITIVE_COMPOSITE Union
-typedef union {
- TPM2B_PRIVATE_KEY_RSA rsa;
- TPM2B_ECC_PARAMETER ecc;
- TPM2B_SENSITIVE_DATA bits;
- TPM2B_SYM_KEY sym;
- TPM2B_PRIVATE_VENDOR_SPECIFIC any;
-} TPMU_SENSITIVE_COMPOSITE;
-
-// Table 187 - TPMT_SENSITIVE Structure
-typedef struct {
- TPMI_ALG_PUBLIC sensitiveType;
- TPM2B_AUTH authValue;
- TPM2B_DIGEST seedValue;
- TPMU_SENSITIVE_COMPOSITE sensitive;
-} TPMT_SENSITIVE;
-
-// Table 188 - TPM2B_SENSITIVE Structure
-typedef struct {
- UINT16 size;
- TPMT_SENSITIVE sensitiveArea;
-} TPM2B_SENSITIVE;
-
-// Table 189 - _PRIVATE Structure
-typedef struct {
- TPM2B_DIGEST integrityOuter;
- TPM2B_DIGEST integrityInner;
- TPMT_SENSITIVE sensitive;
-} _PRIVATE;
-
-// Table 190 - TPM2B_PRIVATE Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[sizeof(_PRIVATE)];
-} TPM2B_PRIVATE;
-
-// Table 191 - _ID_OBJECT Structure
-typedef struct {
- TPM2B_DIGEST integrityHMAC;
- TPM2B_DIGEST encIdentity;
-} _ID_OBJECT;
-
-// Table 192 - TPM2B_ID_OBJECT Structure
-typedef struct {
- UINT16 size;
- BYTE credential[sizeof(_ID_OBJECT)];
-} TPM2B_ID_OBJECT;
-
-// 13 NV Storage Structures
-
-// Table 193 - TPM_NV_INDEX Bits
-//
-// NOTE: Comment here to resolve conflict
-//
-//typedef struct {
-// UINT32 index : 22;
-// UINT32 space : 2;
-// UINT32 RH_NV : 8;
-//} TPM_NV_INDEX;
-
-// Table 195 - TPMA_NV Bits
-typedef struct {
- UINT32 TPMA_NV_PPWRITE : 1;
- UINT32 TPMA_NV_OWNERWRITE : 1;
- UINT32 TPMA_NV_AUTHWRITE : 1;
- UINT32 TPMA_NV_POLICYWRITE : 1;
- UINT32 TPMA_NV_COUNTER : 1;
- UINT32 TPMA_NV_BITS : 1;
- UINT32 TPMA_NV_EXTEND : 1;
- UINT32 reserved7_9 : 3;
- UINT32 TPMA_NV_POLICY_DELETE : 1;
- UINT32 TPMA_NV_WRITELOCKED : 1;
- UINT32 TPMA_NV_WRITEALL : 1;
- UINT32 TPMA_NV_WRITEDEFINE : 1;
- UINT32 TPMA_NV_WRITE_STCLEAR : 1;
- UINT32 TPMA_NV_GLOBALLOCK : 1;
- UINT32 TPMA_NV_PPREAD : 1;
- UINT32 TPMA_NV_OWNERREAD : 1;
- UINT32 TPMA_NV_AUTHREAD : 1;
- UINT32 TPMA_NV_POLICYREAD : 1;
- UINT32 reserved20_24 : 5;
- UINT32 TPMA_NV_NO_DA : 1;
- UINT32 TPMA_NV_ORDERLY : 1;
- UINT32 TPMA_NV_CLEAR_STCLEAR : 1;
- UINT32 TPMA_NV_READLOCKED : 1;
- UINT32 TPMA_NV_WRITTEN : 1;
- UINT32 TPMA_NV_PLATFORMCREATE : 1;
- UINT32 TPMA_NV_READ_STCLEAR : 1;
-} TPMA_NV;
-
-// Table 196 - TPMS_NV_PUBLIC Structure
-typedef struct {
- TPMI_RH_NV_INDEX nvIndex;
- TPMI_ALG_HASH nameAlg;
- TPMA_NV attributes;
- TPM2B_DIGEST authPolicy;
- UINT16 dataSize;
-} TPMS_NV_PUBLIC;
-
-// Table 197 - TPM2B_NV_PUBLIC Structure
-typedef struct {
- UINT16 size;
- TPMS_NV_PUBLIC nvPublic;
-} TPM2B_NV_PUBLIC;
-
-// 14 Context Data
-
-// Table 198 - TPM2B_CONTEXT_SENSITIVE Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[MAX_CONTEXT_SIZE];
-} TPM2B_CONTEXT_SENSITIVE;
-
-// Table 199 - TPMS_CONTEXT_DATA Structure
-typedef struct {
- TPM2B_DIGEST integrity;
- TPM2B_CONTEXT_SENSITIVE encrypted;
-} TPMS_CONTEXT_DATA;
-
-// Table 200 - TPM2B_CONTEXT_DATA Structure
-typedef struct {
- UINT16 size;
- BYTE buffer[sizeof(TPMS_CONTEXT_DATA)];
-} TPM2B_CONTEXT_DATA;
-
-// Table 201 - TPMS_CONTEXT Structure
-typedef struct {
- UINT64 sequence;
- TPMI_DH_CONTEXT savedHandle;
- TPMI_RH_HIERARCHY hierarchy;
- TPM2B_CONTEXT_DATA contextBlob;
-} TPMS_CONTEXT;
-
-// 15 Creation Data
-
-// Table 203 - TPMS_CREATION_DATA Structure
-typedef struct {
- TPML_PCR_SELECTION pcrSelect;
- TPM2B_DIGEST pcrDigest;
- TPMA_LOCALITY locality;
- TPM_ALG_ID parentNameAlg;
- TPM2B_NAME parentName;
- TPM2B_NAME parentQualifiedName;
- TPM2B_DATA outsideInfo;
-} TPMS_CREATION_DATA;
-
-// Table 204 - TPM2B_CREATION_DATA Structure
-typedef struct {
- UINT16 size;
- TPMS_CREATION_DATA creationData;
-} TPM2B_CREATION_DATA;
-
-
-//
-// Command Header
-//
-typedef struct {
- TPM_ST tag;
- UINT32 paramSize;
- TPM_CC commandCode;
-} TPM2_COMMAND_HEADER;
-
-typedef struct {
- TPM_ST tag;
- UINT32 paramSize;
- TPM_RC responseCode;
-} TPM2_RESPONSE_HEADER;
-
-#pragma pack ()
-
-//
-// TCG Algorithm Registry
-//
-#define HASH_ALG_SHA1 0x00000001
-#define HASH_ALG_SHA256 0x00000002
-#define HASH_ALG_SHA384 0x00000004
-#define HASH_ALG_SHA512 0x00000008
-#define HASH_ALG_SM3_256 0x00000010
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h
index df65be914..8bb7ea389 100644
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h
+++ b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/UefiTcgPlatform.h
@@ -1,7 +1,7 @@
/** @file
TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -18,14 +18,12 @@
FILE_LICENCE ( BSD3 );
#include <ipxe/efi/IndustryStandard/Tpm12.h>
-#include <ipxe/efi/IndustryStandard/Tpm20.h>
#include <ipxe/efi/Uefi.h>
//
// Standard event types
//
#define EV_POST_CODE ((TCG_EVENTTYPE) 0x00000001)
-#define EV_NO_ACTION ((TCG_EVENTTYPE) 0x00000003)
#define EV_SEPARATOR ((TCG_EVENTTYPE) 0x00000004)
#define EV_S_CRTM_CONTENTS ((TCG_EVENTTYPE) 0x00000007)
#define EV_S_CRTM_VERSION ((TCG_EVENTTYPE) 0x00000008)
@@ -45,7 +43,6 @@ FILE_LICENCE ( BSD3 );
#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7)
#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8)
#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9)
-#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0)
#define EFI_CALLING_EFI_APPLICATION \
"Calling EFI Application from Boot Option"
@@ -77,9 +74,6 @@ FILE_LICENCE ( BSD3 );
#define EV_POSTCODE_INFO_OPROM "Embedded Option ROM"
#define OPROM_LEN (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
-#define FIRMWARE_DEBUGGER_EVENT_STRING "UEFI Debug Mode"
-#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)
-
//
// Set structure alignment to 1-byte
//
@@ -162,17 +156,6 @@ typedef struct tdEFI_VARIABLE_DATA {
INT8 VariableData[1]; ///< Driver or platform-specific data
} EFI_VARIABLE_DATA;
-//
-// For TrEE1.0 compatibility
-//
-typedef struct {
- EFI_GUID VariableName;
- UINT64 UnicodeNameLength; // The TCG Definition used UINTN
- UINT64 VariableDataLength; // The TCG Definition used UINTN
- CHAR16 UnicodeName[1];
- INT8 VariableData[1];
-} EFI_VARIABLE_DATA_TREE;
-
typedef struct tdEFI_GPT_DATA {
EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;
UINTN NumberOfPartitions;
@@ -180,97 +163,6 @@ typedef struct tdEFI_GPT_DATA {
} EFI_GPT_DATA;
//
-// Crypto Agile Log Entry Format
-//
-typedef struct tdTCG_PCR_EVENT2 {
- TCG_PCRINDEX PCRIndex;
- TCG_EVENTTYPE EventType;
- TPML_DIGEST_VALUES Digest;
- UINT32 EventSize;
- UINT8 Event[1];
-} TCG_PCR_EVENT2;
-
-//
-// Log Header Entry Data
-//
-typedef struct {
- //
- // TCG defined hashing algorithm ID.
- //
- UINT16 algorithmId;
- //
- // The size of the digest for the respective hashing algorithm.
- //
- UINT16 digestSize;
-} TCG_EfiSpecIdEventAlgorithmSize;
-
-#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02"
-#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03"
-
-#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12 1
-#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12 2
-#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12 2
-
-#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2 2
-#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2 0
-#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2 0
-
-typedef struct {
- UINT8 signature[16];
- //
- // The value for the Platform Class.
- // The enumeration is defined in the TCG ACPI Specification Client Common Header.
- //
- UINT32 platformClass;
- //
- // The TCG EFI Platform Specification minor version number this BIOS supports.
- // Any BIOS supporting version (1.22) MUST set this value to 02h.
- // Any BIOS supporting version (2.0) SHALL set this value to 0x00.
- //
- UINT8 specVersionMinor;
- //
- // The TCG EFI Platform Specification major version number this BIOS supports.
- // Any BIOS supporting version (1.22) MUST set this value to 01h.
- // Any BIOS supporting version (2.0) SHALL set this value to 0x02.
- //
- UINT8 specVersionMajor;
- //
- // The TCG EFI Platform Specification errata for this specification this BIOS supports.
- // Any BIOS supporting version and errata (1.22) MUST set this value to 02h.
- // Any BIOS supporting version and errata (2.0) SHALL set this value to 0x00.
- //
- UINT8 specErrata;
- //
- // Specifies the size of the UINTN fields used in various data structures used in this specification.
- // 0x01 indicates UINT32 and 0x02 indicates UINT64.
- //
- UINT8 uintnSize;
- //
- // This field is added in "Spec ID Event03".
- // The number of hashing algorithms used in this event log (except the first event).
- // All events in this event log use all hashing algorithms defined here.
- //
-//UINT32 numberOfAlgorithms;
- //
- // This field is added in "Spec ID Event03".
- // An array of size numberOfAlgorithms of value pairs.
- //
-//TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms];
- //
- // Size in bytes of the VendorInfo field.
- // Maximum value SHALL be FFh bytes.
- //
-//UINT8 vendorInfoSize;
- //
- // Provided for use by the BIOS implementer.
- // The value might be used, for example, to provide more detailed information about the specific BIOS such as BIOS revision numbers, etc.
- // The values within this field are not standardized and are implementer-specific.
- // Platform-specific or -unique information SHALL NOT be provided in this field.
- //
-//UINT8 vendorInfo[vendorInfoSize];
-} TCG_EfiSpecIDEventStruct;
-
-//
// Restore original structure alignment
//
#pragma pack ()
diff --git a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Usb.h b/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Usb.h
deleted file mode 100644
index 7eb1a8d95..000000000
--- a/roms/ipxe/src/include/ipxe/efi/IndustryStandard/Usb.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/** @file
- Support for USB 2.0 standard.
-
- Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __USB_H__
-#define __USB_H__
-
-FILE_LICENCE ( BSD3 );
-
-//
-// Subset of Class and Subclass definitions from USB Specs
-//
-
-//
-// Usb mass storage class code
-//
-#define USB_MASS_STORE_CLASS 0x08
-
-//
-// Usb mass storage subclass code, specify the command set used.
-//
-#define USB_MASS_STORE_RBC 0x01 ///< Reduced Block Commands
-#define USB_MASS_STORE_8020I 0x02 ///< SFF-8020i, typically a CD/DVD device
-#define USB_MASS_STORE_QIC 0x03 ///< Typically a tape device
-#define USB_MASS_STORE_UFI 0x04 ///< Typically a floppy disk driver device
-#define USB_MASS_STORE_8070I 0x05 ///< SFF-8070i, typically a floppy disk driver device.
-#define USB_MASS_STORE_SCSI 0x06 ///< SCSI transparent command set
-
-//
-// Usb mass storage protocol code, specify the transport protocol
-//
-#define USB_MASS_STORE_CBI0 0x00 ///< CBI protocol with command completion interrupt
-#define USB_MASS_STORE_CBI1 0x01 ///< CBI protocol without command completion interrupt
-#define USB_MASS_STORE_BOT 0x50 ///< Bulk-Only Transport
-
-//
-// Standard device request and request type
-// USB 2.0 spec, Section 9.4
-//
-#define USB_DEV_GET_STATUS 0x00
-#define USB_DEV_GET_STATUS_REQ_TYPE_D 0x80 // Receiver : Device
-#define USB_DEV_GET_STATUS_REQ_TYPE_I 0x81 // Receiver : Interface
-#define USB_DEV_GET_STATUS_REQ_TYPE_E 0x82 // Receiver : Endpoint
-
-#define USB_DEV_CLEAR_FEATURE 0x01
-#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device
-#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface
-#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint
-
-#define USB_DEV_SET_FEATURE 0x03
-#define USB_DEV_SET_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device
-#define USB_DEV_SET_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface
-#define USB_DEV_SET_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint
-
-#define USB_DEV_SET_ADDRESS 0x05
-#define USB_DEV_SET_ADDRESS_REQ_TYPE 0x00
-
-#define USB_DEV_GET_DESCRIPTOR 0x06
-#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE 0x80
-
-#define USB_DEV_SET_DESCRIPTOR 0x07
-#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE 0x00
-
-#define USB_DEV_GET_CONFIGURATION 0x08
-#define USB_DEV_GET_CONFIGURATION_REQ_TYPE 0x80
-
-#define USB_DEV_SET_CONFIGURATION 0x09
-#define USB_DEV_SET_CONFIGURATION_REQ_TYPE 0x00
-
-#define USB_DEV_GET_INTERFACE 0x0A
-#define USB_DEV_GET_INTERFACE_REQ_TYPE 0x81
-
-#define USB_DEV_SET_INTERFACE 0x0B
-#define USB_DEV_SET_INTERFACE_REQ_TYPE 0x01
-
-#define USB_DEV_SYNCH_FRAME 0x0C
-#define USB_DEV_SYNCH_FRAME_REQ_TYPE 0x82
-
-
-//
-// USB standard descriptors and reqeust
-//
-#pragma pack(1)
-
-///
-/// Format of Setup Data for USB Device Requests
-/// USB 2.0 spec, Section 9.3
-///
-typedef struct {
- UINT8 RequestType;
- UINT8 Request;
- UINT16 Value;
- UINT16 Index;
- UINT16 Length;
-} USB_DEVICE_REQUEST;
-
-///
-/// Standard Device Descriptor
-/// USB 2.0 spec, Section 9.6.1
-///
-typedef struct {
- UINT8 Length;
- UINT8 DescriptorType;
- UINT16 BcdUSB;
- UINT8 DeviceClass;
- UINT8 DeviceSubClass;
- UINT8 DeviceProtocol;
- UINT8 MaxPacketSize0;
- UINT16 IdVendor;
- UINT16 IdProduct;
- UINT16 BcdDevice;
- UINT8 StrManufacturer;
- UINT8 StrProduct;
- UINT8 StrSerialNumber;
- UINT8 NumConfigurations;
-} USB_DEVICE_DESCRIPTOR;
-
-///
-/// Standard Configuration Descriptor
-/// USB 2.0 spec, Section 9.6.3
-///
-typedef struct {
- UINT8 Length;
- UINT8 DescriptorType;
- UINT16 TotalLength;
- UINT8 NumInterfaces;
- UINT8 ConfigurationValue;
- UINT8 Configuration;
- UINT8 Attributes;
- UINT8 MaxPower;
-} USB_CONFIG_DESCRIPTOR;
-
-///
-/// Standard Interface Descriptor
-/// USB 2.0 spec, Section 9.6.5
-///
-typedef struct {
- UINT8 Length;
- UINT8 DescriptorType;
- UINT8 InterfaceNumber;
- UINT8 AlternateSetting;
- UINT8 NumEndpoints;
- UINT8 InterfaceClass;
- UINT8 InterfaceSubClass;
- UINT8 InterfaceProtocol;
- UINT8 Interface;
-} USB_INTERFACE_DESCRIPTOR;
-
-///
-/// Standard Endpoint Descriptor
-/// USB 2.0 spec, Section 9.6.6
-///
-typedef struct {
- UINT8 Length;
- UINT8 DescriptorType;
- UINT8 EndpointAddress;
- UINT8 Attributes;
- UINT16 MaxPacketSize;
- UINT8 Interval;
-} USB_ENDPOINT_DESCRIPTOR;
-
-///
-/// UNICODE String Descriptor
-/// USB 2.0 spec, Section 9.6.7
-///
-typedef struct {
- UINT8 Length;
- UINT8 DescriptorType;
- CHAR16 String[1];
-} EFI_USB_STRING_DESCRIPTOR;
-
-#pragma pack()
-
-
-typedef enum {
- //
- // USB request type
- //
- USB_REQ_TYPE_STANDARD = (0x00 << 5),
- USB_REQ_TYPE_CLASS = (0x01 << 5),
- USB_REQ_TYPE_VENDOR = (0x02 << 5),
-
- //
- // Standard control transfer request type, or the value
- // to fill in EFI_USB_DEVICE_REQUEST.Request
- //
- USB_REQ_GET_STATUS = 0x00,
- USB_REQ_CLEAR_FEATURE = 0x01,
- USB_REQ_SET_FEATURE = 0x03,
- USB_REQ_SET_ADDRESS = 0x05,
- USB_REQ_GET_DESCRIPTOR = 0x06,
- USB_REQ_SET_DESCRIPTOR = 0x07,
- USB_REQ_GET_CONFIG = 0x08,
- USB_REQ_SET_CONFIG = 0x09,
- USB_REQ_GET_INTERFACE = 0x0A,
- USB_REQ_SET_INTERFACE = 0x0B,
- USB_REQ_SYNCH_FRAME = 0x0C,
-
- //
- // Usb control transfer target
- //
- USB_TARGET_DEVICE = 0,
- USB_TARGET_INTERFACE = 0x01,
- USB_TARGET_ENDPOINT = 0x02,
- USB_TARGET_OTHER = 0x03,
-
- //
- // USB Descriptor types
- //
- USB_DESC_TYPE_DEVICE = 0x01,
- USB_DESC_TYPE_CONFIG = 0x02,
- USB_DESC_TYPE_STRING = 0x03,
- USB_DESC_TYPE_INTERFACE = 0x04,
- USB_DESC_TYPE_ENDPOINT = 0x05,
- USB_DESC_TYPE_HID = 0x21,
- USB_DESC_TYPE_REPORT = 0x22,
-
- //
- // Features to be cleared by CLEAR_FEATURE requests
- //
- USB_FEATURE_ENDPOINT_HALT = 0,
-
- //
- // USB endpoint types: 00: control, 01: isochronous, 10: bulk, 11: interrupt
- //
- USB_ENDPOINT_CONTROL = 0x00,
- USB_ENDPOINT_ISO = 0x01,
- USB_ENDPOINT_BULK = 0x02,
- USB_ENDPOINT_INTERRUPT = 0x03,
-
- USB_ENDPOINT_TYPE_MASK = 0x03,
- USB_ENDPOINT_DIR_IN = 0x80,
-
- //
- //Use 200 ms to increase the error handling response time
- //
- EFI_USB_INTERRUPT_DELAY = 2000000
-} USB_TYPES_DEFINITION;
-
-
-//
-// HID constants definition, see Device Class Definition
-// for Human Interface Devices (HID) rev1.11
-//
-
-//
-// HID standard GET_DESCRIPTOR request.
-//
-#define USB_HID_GET_DESCRIPTOR_REQ_TYPE 0x81
-
-//
-// HID specific requests.
-//
-#define USB_HID_CLASS_GET_REQ_TYPE 0xa1
-#define USB_HID_CLASS_SET_REQ_TYPE 0x21
-
-//
-// HID report item format
-//
-#define HID_ITEM_FORMAT_SHORT 0
-#define HID_ITEM_FORMAT_LONG 1
-
-//
-// Special tag indicating long items
-//
-#define HID_ITEM_TAG_LONG 15
-
-//
-// HID report descriptor item type (prefix bit 2,3)
-//
-#define HID_ITEM_TYPE_MAIN 0
-#define HID_ITEM_TYPE_GLOBAL 1
-#define HID_ITEM_TYPE_LOCAL 2
-#define HID_ITEM_TYPE_RESERVED 3
-
-//
-// HID report descriptor main item tags
-//
-#define HID_MAIN_ITEM_TAG_INPUT 8
-#define HID_MAIN_ITEM_TAG_OUTPUT 9
-#define HID_MAIN_ITEM_TAG_FEATURE 11
-#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
-#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
-
-//
-// HID report descriptor main item contents
-//
-#define HID_MAIN_ITEM_CONSTANT 0x001
-#define HID_MAIN_ITEM_VARIABLE 0x002
-#define HID_MAIN_ITEM_RELATIVE 0x004
-#define HID_MAIN_ITEM_WRAP 0x008
-#define HID_MAIN_ITEM_NONLINEAR 0x010
-#define HID_MAIN_ITEM_NO_PREFERRED 0x020
-#define HID_MAIN_ITEM_NULL_STATE 0x040
-#define HID_MAIN_ITEM_VOLATILE 0x080
-#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
-
-//
-// HID report descriptor collection item types
-//
-#define HID_COLLECTION_PHYSICAL 0
-#define HID_COLLECTION_APPLICATION 1
-#define HID_COLLECTION_LOGICAL 2
-
-//
-// HID report descriptor global item tags
-//
-#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
-#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1
-#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2
-#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3
-#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4
-#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5
-#define HID_GLOBAL_ITEM_TAG_UNIT 6
-#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7
-#define HID_GLOBAL_ITEM_TAG_REPORT_ID 8
-#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9
-#define HID_GLOBAL_ITEM_TAG_PUSH 10
-#define HID_GLOBAL_ITEM_TAG_POP 11
-
-//
-// HID report descriptor local item tags
-//
-#define HID_LOCAL_ITEM_TAG_USAGE 0
-#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1
-#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2
-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3
-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
-#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7
-#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8
-#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9
-#define HID_LOCAL_ITEM_TAG_DELIMITER 10
-
-//
-// HID report types
-//
-#define HID_INPUT_REPORT 1
-#define HID_OUTPUT_REPORT 2
-#define HID_FEATURE_REPORT 3
-
-//
-// HID class protocol request
-//
-#define EFI_USB_GET_REPORT_REQUEST 0x01
-#define EFI_USB_GET_IDLE_REQUEST 0x02
-#define EFI_USB_GET_PROTOCOL_REQUEST 0x03
-#define EFI_USB_SET_REPORT_REQUEST 0x09
-#define EFI_USB_SET_IDLE_REQUEST 0x0a
-#define EFI_USB_SET_PROTOCOL_REQUEST 0x0b
-
-#pragma pack(1)
-///
-/// Descriptor header for Report/Physical Descriptors
-/// HID 1.1, section 6.2.1
-///
-typedef struct hid_class_descriptor {
- UINT8 DescriptorType;
- UINT16 DescriptorLength;
-} EFI_USB_HID_CLASS_DESCRIPTOR;
-
-///
-/// The HID descriptor identifies the length and type
-/// of subordinate descriptors for a device.
-/// HID 1.1, section 6.2.1
-///
-typedef struct hid_descriptor {
- UINT8 Length;
- UINT8 DescriptorType;
- UINT16 BcdHID;
- UINT8 CountryCode;
- UINT8 NumDescriptors;
- EFI_USB_HID_CLASS_DESCRIPTOR HidClassDesc[1];
-} EFI_USB_HID_DESCRIPTOR;
-
-#pragma pack()
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Library/BaseLib.h b/roms/ipxe/src/include/ipxe/efi/Library/BaseLib.h
index a45a20d70..e9c31d130 100644
--- a/roms/ipxe/src/include/ipxe/efi/Library/BaseLib.h
+++ b/roms/ipxe/src/include/ipxe/efi/Library/BaseLib.h
@@ -1,8 +1,8 @@
/** @file
Provides string functions, linked list functions, math functions, synchronization
- functions, file path functions, and CPU architecture-specific functions.
+ functions, and CPU architecture-specific functions.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -185,321 +185,7 @@ typedef struct {
// String Services
//
-
/**
- Returns the length of a Null-terminated Unicode string.
-
- If String is not aligned on a 16-bit boundary, then ASSERT().
-
- @param String A pointer to a Null-terminated Unicode string.
- @param MaxSize The maximum number of Destination Unicode
- char, including terminating null char.
-
- @retval 0 If String is NULL.
- @retval MaxSize If there is no null character in the first MaxSize characters of String.
- @return The number of characters that percede the terminating null character.
-
-**/
-UINTN
-EFIAPI
-StrnLenS (
- IN CONST CHAR16 *String,
- IN UINTN MaxSize
- );
-
-/**
- Copies the string pointed to by Source (including the terminating null char)
- to the array pointed to by Destination.
-
- If Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Source is not aligned on a 16-bit boundary, then ASSERT().
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Unicode string.
- @param DestMax The maximum number of Destination Unicode
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Unicode string.
-
- @retval RETURN_SUCCESS String is copied.
- @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than StrLen(Source).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumUnicodeStringLength is not zero,
- and DestMax is greater than
- PcdMaximumUnicodeStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-StrCpyS (
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source
- );
-
-/**
- Copies not more than Length successive char from the string pointed to by
- Source to the array pointed to by Destination. If no null char is copied from
- Source, then Destination[Length] is always set to null.
-
- If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Unicode string.
- @param DestMax The maximum number of Destination Unicode
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Unicode string.
- @param Length The maximum number of Unicode characters to copy.
-
- @retval RETURN_SUCCESS String is copied.
- @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than
- MIN(StrLen(Source), Length).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumUnicodeStringLength is not zero,
- and DestMax is greater than
- PcdMaximumUnicodeStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-StrnCpyS (
- OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source,
- IN UINTN Length
- );
-
-/**
- Appends a copy of the string pointed to by Source (including the terminating
- null char) to the end of the string pointed to by Destination.
-
- If Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Source is not aligned on a 16-bit boundary, then ASSERT().
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Unicode string.
- @param DestMax The maximum number of Destination Unicode
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Unicode string.
-
- @retval RETURN_SUCCESS String is appended.
- @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than
- StrLen(Destination).
- @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
- greater than StrLen(Source).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumUnicodeStringLength is not zero,
- and DestMax is greater than
- PcdMaximumUnicodeStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-StrCatS (
- IN OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source
- );
-
-/**
- Appends not more than Length successive char from the string pointed to by
- Source to the end of the string pointed to by Destination. If no null char is
- copied from Source, then Destination[StrLen(Destination) + Length] is always
- set to null.
-
- If Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Source is not aligned on a 16-bit boundary, then ASSERT().
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Unicode string.
- @param DestMax The maximum number of Destination Unicode
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Unicode string.
- @param Length The maximum number of Unicode characters to copy.
-
- @retval RETURN_SUCCESS String is appended.
- @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than
- StrLen(Destination).
- @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
- greater than MIN(StrLen(Source), Length).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumUnicodeStringLength is not zero,
- and DestMax is greater than
- PcdMaximumUnicodeStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-StrnCatS (
- IN OUT CHAR16 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR16 *Source,
- IN UINTN Length
- );
-
-/**
- Returns the length of a Null-terminated Ascii string.
-
- @param String A pointer to a Null-terminated Ascii string.
- @param MaxSize The maximum number of Destination Ascii
- char, including terminating null char.
-
- @retval 0 If String is NULL.
- @retval MaxSize If there is no null character in the first MaxSize characters of String.
- @return The number of characters that percede the terminating null character.
-
-**/
-UINTN
-EFIAPI
-AsciiStrnLenS (
- IN CONST CHAR8 *String,
- IN UINTN MaxSize
- );
-
-/**
- Copies the string pointed to by Source (including the terminating null char)
- to the array pointed to by Destination.
-
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Ascii string.
- @param DestMax The maximum number of Destination Ascii
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Ascii string.
-
- @retval RETURN_SUCCESS String is copied.
- @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than StrLen(Source).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumAsciiStringLength is not zero,
- and DestMax is greater than
- PcdMaximumAsciiStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-AsciiStrCpyS (
- OUT CHAR8 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR8 *Source
- );
-
-/**
- Copies not more than Length successive char from the string pointed to by
- Source to the array pointed to by Destination. If no null char is copied from
- Source, then Destination[Length] is always set to null.
-
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Ascii string.
- @param DestMax The maximum number of Destination Ascii
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Ascii string.
- @param Length The maximum number of Ascii characters to copy.
-
- @retval RETURN_SUCCESS String is copied.
- @retval RETURN_BUFFER_TOO_SMALL If DestMax is NOT greater than
- MIN(StrLen(Source), Length).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumAsciiStringLength is not zero,
- and DestMax is greater than
- PcdMaximumAsciiStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-AsciiStrnCpyS (
- OUT CHAR8 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- );
-
-/**
- Appends a copy of the string pointed to by Source (including the terminating
- null char) to the end of the string pointed to by Destination.
-
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Ascii string.
- @param DestMax The maximum number of Destination Ascii
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Ascii string.
-
- @retval RETURN_SUCCESS String is appended.
- @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than
- StrLen(Destination).
- @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
- greater than StrLen(Source).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumAsciiStringLength is not zero,
- and DestMax is greater than
- PcdMaximumAsciiStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-AsciiStrCatS (
- IN OUT CHAR8 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR8 *Source
- );
-
-/**
- Appends not more than Length successive char from the string pointed to by
- Source to the end of the string pointed to by Destination. If no null char is
- copied from Source, then Destination[StrLen(Destination) + Length] is always
- set to null.
-
- If an error would be returned, then the function will also ASSERT().
-
- @param Destination A pointer to a Null-terminated Ascii string.
- @param DestMax The maximum number of Destination Ascii
- char, including terminating null char.
- @param Source A pointer to a Null-terminated Ascii string.
- @param Length The maximum number of Ascii characters to copy.
-
- @retval RETURN_SUCCESS String is appended.
- @retval RETURN_BAD_BUFFER_SIZE If DestMax is NOT greater than
- StrLen(Destination).
- @retval RETURN_BUFFER_TOO_SMALL If (DestMax - StrLen(Destination)) is NOT
- greater than MIN(StrLen(Source), Length).
- @retval RETURN_INVALID_PARAMETER If Destination is NULL.
- If Source is NULL.
- If PcdMaximumAsciiStringLength is not zero,
- and DestMax is greater than
- PcdMaximumAsciiStringLength.
- If DestMax is 0.
- @retval RETURN_ACCESS_DENIED If Source and Destination overlap.
-**/
-RETURN_STATUS
-EFIAPI
-AsciiStrnCatS (
- IN OUT CHAR8 *Destination,
- IN UINTN DestMax,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- );
-
-
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
Copies one Null-terminated Unicode string to another Null-terminated Unicode
string and returns the new Unicode string.
@@ -531,8 +217,6 @@ StrCpy (
/**
- [ATTENTION] This function is deprecated for security reason.
-
Copies up to a specified length from one Null-terminated Unicode string to
another Null-terminated Unicode string and returns the new Unicode string.
@@ -569,7 +253,7 @@ StrnCpy (
IN CONST CHAR16 *Source,
IN UINTN Length
);
-#endif
+
/**
Returns the length of a Null-terminated Unicode string.
@@ -697,11 +381,7 @@ StrnCmp (
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
/**
- [ATTENTION] This function is deprecated for security reason.
-
Concatenates one Null-terminated Unicode string to another Null-terminated
Unicode string, and returns the concatenated Unicode string.
@@ -742,8 +422,6 @@ StrCat (
/**
- [ATTENTION] This function is deprecated for security reason.
-
Concatenates up to a specified length one Null-terminated Unicode to the end
of another Null-terminated Unicode string, and returns the concatenated
Unicode string.
@@ -788,7 +466,6 @@ StrnCat (
IN CONST CHAR16 *Source,
IN UINTN Length
);
-#endif
/**
Returns the first occurrence of a Null-terminated Unicode sub-string
@@ -1027,11 +704,7 @@ UnicodeStrToAsciiStr (
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
/**
- [ATTENTION] This function is deprecated for security reason.
-
Copies one Null-terminated ASCII string to another Null-terminated ASCII
string and returns the new ASCII string.
@@ -1061,8 +734,6 @@ AsciiStrCpy (
/**
- [ATTENTION] This function is deprecated for security reason.
-
Copies up to a specified length one Null-terminated ASCII string to another
Null-terminated ASCII string and returns the new ASCII string.
@@ -1096,7 +767,7 @@ AsciiStrnCpy (
IN CONST CHAR8 *Source,
IN UINTN Length
);
-#endif
+
/**
Returns the length of a Null-terminated ASCII string.
@@ -1256,11 +927,7 @@ AsciiStrnCmp (
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
/**
- [ATTENTION] This function is deprecated for security reason.
-
Concatenates one Null-terminated ASCII string to another Null-terminated
ASCII string, and returns the concatenated ASCII string.
@@ -1296,8 +963,6 @@ AsciiStrCat (
/**
- [ATTENTION] This function is deprecated for security reason.
-
Concatenates up to a specified length one Null-terminated ASCII string to
the end of another Null-terminated ASCII string, and returns the
concatenated ASCII string.
@@ -1340,7 +1005,7 @@ AsciiStrnCat (
IN CONST CHAR8 *Source,
IN UINTN Length
);
-#endif
+
/**
Returns the first occurrence of a Null-terminated ASCII sub-string
@@ -1605,43 +1270,6 @@ BcdToDecimal8 (
IN UINT8 Value
);
-//
-// File Path Manipulation Functions
-//
-
-/**
- Removes the last directory or file entry in a path by changing the last
- L'\' to a CHAR_NULL.
-
- @param[in, out] Path The pointer to the path to modify.
-
- @retval FALSE Nothing was found to remove.
- @retval TRUE A directory or file was removed.
-**/
-BOOLEAN
-EFIAPI
-PathRemoveLastItem(
- IN OUT CHAR16 *Path
- );
-
-/**
- Function to clean up paths.
- - Single periods in the path are removed.
- - Double periods in the path are removed along with a single parent directory.
- - Forward slashes L'/' are converted to backward slashes L'\'.
-
- This will be done inline and the existing buffer may be larger than required
- upon completion.
-
- @param[in] Path The pointer to the string containing the path.
-
- @return Returns Path, otherwise returns NULL to indicate that an error has occured.
-**/
-CHAR16*
-EFIAPI
-PathCleanUpDirectories(
- IN CHAR16 *Path
- );
//
// Linked List Functions and Macros
@@ -7649,57 +7277,6 @@ AsmPrepareAndThunk16 (
IN OUT THUNK_CONTEXT *ThunkContext
);
-/**
- Generates a 16-bit random number through RDRAND instruction.
-
- if Rand is NULL, then ASSERT().
-
- @param[out] Rand Buffer pointer to store the random result.
-
- @retval TRUE RDRAND call was successful.
- @retval FALSE Failed attempts to call RDRAND.
-
- **/
-BOOLEAN
-EFIAPI
-AsmRdRand16 (
- OUT UINT16 *Rand
- );
-
-/**
- Generates a 32-bit random number through RDRAND instruction.
-
- if Rand is NULL, then ASSERT().
-
- @param[out] Rand Buffer pointer to store the random result.
-
- @retval TRUE RDRAND call was successful.
- @retval FALSE Failed attempts to call RDRAND.
-
-**/
-BOOLEAN
-EFIAPI
-AsmRdRand32 (
- OUT UINT32 *Rand
- );
-
-/**
- Generates a 64-bit random number through RDRAND instruction.
-
- if Rand is NULL, then ASSERT().
-
- @param[out] Rand Buffer pointer to store the random result.
-
- @retval TRUE RDRAND call was successful.
- @retval FALSE Failed attempts to call RDRAND.
-
-**/
-BOOLEAN
-EFIAPI
-AsmRdRand64 (
- OUT UINT64 *Rand
- );
-
#endif
#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Pi/PiDxeCis.h b/roms/ipxe/src/include/ipxe/efi/Pi/PiDxeCis.h
index 047c077c4..50d25f23f 100644
--- a/roms/ipxe/src/include/ipxe/efi/Pi/PiDxeCis.h
+++ b/roms/ipxe/src/include/ipxe/efi/Pi/PiDxeCis.h
@@ -1,7 +1,7 @@
/** @file
Include file matches things in PI.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -11,7 +11,7 @@ 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:
- PI Version 1.4
+ PI Version 1.2
**/
@@ -50,16 +50,6 @@ typedef enum {
/// access I/O devices in the platform.
///
EfiGcdMemoryTypeMemoryMappedIo,
- ///
- /// A memory region that is visible to the boot processor.
- /// This memory supports byte-addressable non-volatility.
- ///
- EfiGcdMemoryTypePersistentMemory,
- ///
- /// A memory region that provides higher reliability relative to other memory in the
- /// system. If all memory has the same reliability, then this bit is not used.
- ///
- EfiGcdMemoryTypeMoreReliable,
EfiGcdMemoryTypeMaximum
} EFI_GCD_MEMORY_TYPE;
@@ -377,7 +367,7 @@ EFI_STATUS
resource range specified by BaseAddress and Length.
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
range specified by BaseAddress and Length.
- @retval EFI_ACCESS_DENIED The attributes for the memory resource range specified by
+ @retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by
BaseAddress and Length cannot be modified.
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
the memory resource range.
@@ -393,31 +383,6 @@ EFI_STATUS
);
/**
- Modifies the capabilities for a memory region in the global coherency domain of the
- processor.
-
- @param BaseAddress The physical address that is the start address of a memory region.
- @param Length The size in bytes of the memory region.
- @param Capabilities The bit mask of capabilities that the memory region supports.
-
- @retval EFI_SUCCESS The capabilities were set for the memory region.
- @retval EFI_INVALID_PARAMETER Length is zero.
- @retval EFI_UNSUPPORTED The capabilities specified by Capabilities do not include the
- memory region attributes currently in use.
- @retval EFI_ACCESS_DENIED The capabilities for the memory resource range specified by
- BaseAddress and Length cannot be modified.
- @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the capabilities
- of the memory resource range.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES) (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length,
- IN UINT64 Capabilities
- );
-
-/**
Returns a map of the memory resources in the global coherency domain of the
processor.
@@ -694,7 +659,7 @@ EFI_STATUS
//
#define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL
#define DXE_SPECIFICATION_MAJOR_REVISION 1
-#define DXE_SPECIFICATION_MINOR_REVISION 40
+#define DXE_SPECIFICATION_MINOR_REVISION 30
#define DXE_SERVICES_REVISION ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))
typedef struct {
@@ -731,12 +696,23 @@ typedef struct {
// Service to process a single firmware volume found in a capsule
//
EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;
- //
- // Extensions to Global Coherency Domain Services
- //
- EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities;
} DXE_SERVICES;
typedef DXE_SERVICES EFI_DXE_SERVICES;
+
+/**
+ The function prototype for invoking a function on an Application Processor.
+
+ This definition is used by the UEFI MP Serices Protocol, and the
+ PI SMM System Table.
+
+ @param[in,out] Buffer The pointer to private data buffer.
+**/
+typedef
+VOID
+(EFIAPI *EFI_AP_PROCEDURE)(
+ IN OUT VOID *Buffer
+ );
+
#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Pi/PiFirmwareFile.h b/roms/ipxe/src/include/ipxe/efi/Pi/PiFirmwareFile.h
index 9bd22a544..f6cf9574d 100644
--- a/roms/ipxe/src/include/ipxe/efi/Pi/PiFirmwareFile.h
+++ b/roms/ipxe/src/include/ipxe/efi/Pi/PiFirmwareFile.h
@@ -1,7 +1,7 @@
/** @file
The firmware file related definitions in PI.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -11,7 +11,7 @@ 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:
- PI Version 1.4.
+ PI Version 1.2.
**/
@@ -175,7 +175,7 @@ typedef struct {
/// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.
/// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.
///
- UINT64 ExtendedSize;
+ UINT32 ExtendedSize;
} EFI_FFS_FILE_HEADER2;
#define IS_FFS_FILE2(FfsFileHeaderPtr) \
@@ -185,7 +185,7 @@ typedef struct {
((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))
#define FFS_FILE2_SIZE(FfsFileHeaderPtr) \
- ((UINT32) (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize))
+ (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize)
typedef UINT8 EFI_SECTION_TYPE;
diff --git a/roms/ipxe/src/include/ipxe/efi/Pi/PiHob.h b/roms/ipxe/src/include/ipxe/efi/Pi/PiHob.h
index 121748dec..c68ea3002 100644
--- a/roms/ipxe/src/include/ipxe/efi/Pi/PiHob.h
+++ b/roms/ipxe/src/include/ipxe/efi/Pi/PiHob.h
@@ -1,7 +1,7 @@
/** @file
HOB related definitions in PI.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -11,7 +11,7 @@ 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:
- PI Version 1.4
+ PI Version 1.0
**/
@@ -257,16 +257,8 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
-//
-// This is typically used as memory cacheability attribute today.
-// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED
-// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED
-// means Memory cacheability attribute: The memory supports being programmed with
-// a writeprotected cacheable attribute.
-//
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
-#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000
//
// The rest of the attributes are used to describe capabilities
//
@@ -283,27 +275,8 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE 0x00100000
-//
-// This is typically used as memory cacheability attribute today.
-// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE
-// as Memory capability attribute: The memory supports being protected from processor
-// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:
-// The memory supports being programmed with a writeprotected cacheable attribute.
-//
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000
-#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000
-
-#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED 0x00040000
-#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE 0x00800000
-
-//
-// Physical memory relative reliability attribute. This
-// memory provides higher reliability relative to other
-// memory in the system. If all memory has the same
-// reliability, then this bit is not used.
-//
-#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000
///
/// Describes the resource properties of all fixed,
diff --git a/roms/ipxe/src/include/ipxe/efi/Pi/PiMultiPhase.h b/roms/ipxe/src/include/ipxe/efi/Pi/PiMultiPhase.h
index f35bb14cf..daf6591f5 100644
--- a/roms/ipxe/src/include/ipxe/efi/Pi/PiMultiPhase.h
+++ b/roms/ipxe/src/include/ipxe/efi/Pi/PiMultiPhase.h
@@ -1,7 +1,7 @@
/** @file
Include file matches things in PI for multiple module types.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -164,18 +164,4 @@ typedef struct {
CHAR8 *PcdName;
} EFI_PCD_INFO;
-/**
- The function prototype for invoking a function on an Application Processor.
-
- This definition is used by the UEFI MP Serices Protocol, and the
- PI SMM System Table.
-
- @param[in,out] Buffer The pointer to private data buffer.
-**/
-typedef
-VOID
-(EFIAPI *EFI_AP_PROCEDURE)(
- IN OUT VOID *Buffer
- );
-
#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/ProcessorBind.h b/roms/ipxe/src/include/ipxe/efi/ProcessorBind.h
index ff1517f33..7466814fa 100644
--- a/roms/ipxe/src/include/ipxe/efi/ProcessorBind.h
+++ b/roms/ipxe/src/include/ipxe/efi/ProcessorBind.h
@@ -18,12 +18,4 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/efi/X64/ProcessorBind.h>
#endif
-#if __arm__
-#include <ipxe/efi/Arm/ProcessorBind.h>
-#endif
-
-#if __aarch64__
-#include <ipxe/efi/AArch64/ProcessorBind.h>
-#endif
-
#endif /* _IPXE_EFI_PROCESSOR_BIND_H */
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/AbsolutePointer.h b/roms/ipxe/src/include/ipxe/efi/Protocol/AbsolutePointer.h
deleted file mode 100644
index b20ca0574..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/AbsolutePointer.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/** @file
- The file provides services that allow information about an
- absolute pointer device to be retrieved.
-
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- 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 __ABSOLUTE_POINTER_H__
-#define __ABSOLUTE_POINTER_H__
-
-FILE_LICENCE ( BSD3 );
-
-
-#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
- { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
-
-
-typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;
-
-
-//*******************************************************
-// EFI_ABSOLUTE_POINTER_MODE
-//*******************************************************
-
-
-/**
- The following data values in the EFI_ABSOLUTE_POINTER_MODE
- interface are read-only and are changed by using the appropriate
- interface functions.
-**/
-typedef struct {
- UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis
- UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.
- UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis
- UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the
- ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis
- UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the
- ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.
- UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the
- ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis
- UINT32 Attributes; ///< The following bits are set as needed (or'd together) to indicate the
- ///< capabilities of the device supported. The remaining bits are undefined
- ///< and should be 0
-} EFI_ABSOLUTE_POINTER_MODE;
-
-///
-/// If set, indicates this device supports an alternate button input.
-///
-#define EFI_ABSP_SupportsAltActive 0x00000001
-
-///
-/// If set, indicates this device returns pressure data in parameter CurrentZ.
-///
-#define EFI_ABSP_SupportsPressureAsZ 0x00000002
-
-
-/**
- This function resets the pointer device hardware. As part of
- initialization process, the firmware/device will make a quick
- but reasonable attempt to verify that the device is
- functioning. If the ExtendedVerification flag is TRUE the
- firmware may take an extended amount of time to verify the
- device is operating on reset. Otherwise the reset operation is
- to occur as quickly as possible. The hardware verification
- process is not defined by this specification and is left up to
- the platform firmware or driver to implement.
-
- @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
- instance.
-
- @param ExtendedVerification Indicates that the driver may
- perform a more exhaustive
- verification operation of the
- device during reset.
-
- @retval EFI_SUCCESS The device was reset.
-
- @retval EFI_DEVICE_ERROR The device is not functioning
- correctly and could not be reset.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(
- IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
-);
-
-///
-/// This bit is set if the touch sensor is active.
-///
-#define EFI_ABSP_TouchActive 0x00000001
-
-///
-/// This bit is set if the alt sensor, such as pen-side button, is active
-///
-#define EFI_ABS_AltActive 0x00000002
-
-
-/**
- Definition of EFI_ABSOLUTE_POINTER_STATE.
-**/
-typedef struct {
- ///
- /// The unsigned position of the activation on the x axis. If the AboluteMinX
- /// and the AboluteMaxX fields of the EFI_ABSOLUTE_POINTER_MODE structure are
- /// both 0, then this pointer device does not support an x-axis, and this field
- /// must be ignored.
- ///
- UINT64 CurrentX;
-
- ///
- /// The unsigned position of the activation on the y axis. If the AboluteMinY
- /// and the AboluteMaxY fields of the EFI_ABSOLUTE_POINTER_MODE structure are
- /// both 0, then this pointer device does not support an y-axis, and this field
- /// must be ignored.
- ///
- UINT64 CurrentY;
-
- ///
- /// The unsigned position of the activation on the z axis, or the pressure
- /// measurement. If the AboluteMinZ and the AboluteMaxZ fields of the
- /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device
- /// does not support an z-axis, and this field must be ignored.
- ///
- UINT64 CurrentZ;
-
- ///
- /// Bits are set to 1 in this structure item to indicate that device buttons are
- /// active.
- ///
- UINT32 ActiveButtons;
-} EFI_ABSOLUTE_POINTER_STATE;
-
-/**
- The GetState() function retrieves the current state of a pointer
- device. This includes information on the active state associated
- with the pointer device and the current position of the axes
- associated with the pointer device. If the state of the pointer
- device has not changed since the last call to GetState(), then
- EFI_NOT_READY is returned. If the state of the pointer device
- has changed since the last call to GetState(), then the state
- information is placed in State, and EFI_SUCCESS is returned. If
- a device error occurs while attempting to retrieve the state
- information, then EFI_DEVICE_ERROR is returned.
-
-
- @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
- instance.
-
- @param State A pointer to the state information on the
- pointer device.
-
- @retval EFI_SUCCESS The state of the pointer device was
- returned in State.
-
- @retval EFI_NOT_READY The state of the pointer device has not
- changed since the last call to GetState().
-
- @retval EFI_DEVICE_ERROR A device error occurred while
- attempting to retrieve the pointer
- device's current state.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(
- IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
- IN OUT EFI_ABSOLUTE_POINTER_STATE *State
-);
-
-
-///
-/// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services
-/// for a pointer device that can be used as an input device from an
-/// application written to this specification. The services include
-/// the ability to: reset the pointer device, retrieve the state of
-/// the pointer device, and retrieve the capabilities of the pointer
-/// device. The service also provides certain data items describing the device.
-///
-struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
- EFI_ABSOLUTE_POINTER_RESET Reset;
- EFI_ABSOLUTE_POINTER_GET_STATE GetState;
- ///
- /// Event to use with WaitForEvent() to wait for input from the pointer device.
- ///
- EFI_EVENT WaitForInput;
- ///
- /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.
- ///
- EFI_ABSOLUTE_POINTER_MODE *Mode;
-};
-
-
-extern EFI_GUID gEfiAbsolutePointerProtocolGuid;
-
-
-#endif
-
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/AppleNetBoot.h b/roms/ipxe/src/include/ipxe/efi/Protocol/AppleNetBoot.h
deleted file mode 100644
index 144beff1c..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/AppleNetBoot.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef __EFI_APPLE_NET_BOOT_PROTOCOL_H__
-#define __EFI_APPLE_NET_BOOT_PROTOCOL_H__
-
-/** @file
- *
- * Apple Net Boot Protocol
- *
- */
-
-FILE_LICENCE ( BSD3 );
-
-#define EFI_APPLE_NET_BOOT_PROTOCOL_GUID \
- { 0x78ee99fb, 0x6a5e, 0x4186, \
- { 0x97, 0xde, 0xcd, 0x0a, 0xba, 0x34, 0x5a, 0x74 } }
-
-typedef struct _EFI_APPLE_NET_BOOT_PROTOCOL EFI_APPLE_NET_BOOT_PROTOCOL;
-
-/**
- Get a DHCP packet obtained by the firmware during NetBoot.
-
- @param This A pointer to the APPLE_NET_BOOT_PROTOCOL instance.
- @param BufferSize A pointer to the size of the buffer in bytes.
- @param DataBuffer The memory buffer to copy the packet to. If it is
- NULL, then the size of the packet is returned
- in BufferSize.
- @retval EFI_SUCCESS The packet was copied.
- @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the
- current packet. BufferSize has been
- updated with the size needed to
- complete the request.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *GET_DHCP_RESPONSE) (
- IN EFI_APPLE_NET_BOOT_PROTOCOL *This,
- IN OUT UINTN *BufferSize,
- OUT VOID *DataBuffer
- );
-
-struct _EFI_APPLE_NET_BOOT_PROTOCOL
-{
- GET_DHCP_RESPONSE GetDhcpResponse;
- GET_DHCP_RESPONSE GetBsdpResponse;
-};
-
-#endif /*__EFI_APPLE_NET_BOOT_PROTOCOL_H__ */
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h b/roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h
new file mode 100644
index 000000000..665924e88
--- /dev/null
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h
@@ -0,0 +1,302 @@
+/** @file
+ CPU Architectural Protocol as defined in PI spec Volume 2 DXE
+
+ This code abstracts the DXE core from processor implementation details.
+
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __ARCH_PROTOCOL_CPU_H__
+#define __ARCH_PROTOCOL_CPU_H__
+
+FILE_LICENCE ( BSD3 );
+
+#include <ipxe/efi/Protocol/DebugSupport.h>
+
+#define EFI_CPU_ARCH_PROTOCOL_GUID \
+ { 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
+
+typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL;
+
+///
+/// The type of flush operation
+///
+typedef enum {
+ EfiCpuFlushTypeWriteBackInvalidate,
+ EfiCpuFlushTypeWriteBack,
+ EfiCpuFlushTypeInvalidate,
+ EfiCpuMaxFlushType
+} EFI_CPU_FLUSH_TYPE;
+
+///
+/// The type of processor INIT.
+///
+typedef enum {
+ EfiCpuInit,
+ EfiCpuMaxInitType
+} EFI_CPU_INIT_TYPE;
+
+/**
+ EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs.
+
+ @param InterruptType Defines the type of interrupt or exception that
+ occurred on the processor.This parameter is processor architecture specific.
+ @param SystemContext A pointer to the processor context when
+ the interrupt occurred on the processor.
+
+ @return None
+
+**/
+typedef
+VOID
+(EFIAPI *EFI_CPU_INTERRUPT_HANDLER)(
+ IN CONST EFI_EXCEPTION_TYPE InterruptType,
+ IN CONST EFI_SYSTEM_CONTEXT SystemContext
+ );
+
+/**
+ This function flushes the range of addresses from Start to Start+Length
+ from the processor's data cache. If Start is not aligned to a cache line
+ boundary, then the bytes before Start to the preceding cache line boundary
+ are also flushed. If Start+Length is not aligned to a cache line boundary,
+ then the bytes past Start+Length to the end of the next cache line boundary
+ are also flushed. The FlushType of EfiCpuFlushTypeWriteBackInvalidate must be
+ supported. If the data cache is fully coherent with all DMA operations, then
+ this function can just return EFI_SUCCESS. If the processor does not support
+ flushing a range of the data cache, then the entire data cache can be flushed.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+ @param Start The beginning physical address to flush from the processor's data
+ cache.
+ @param Length The number of bytes to flush from the processor's data cache. This
+ function may flush more bytes than Length specifies depending upon
+ the granularity of the flush operation that the processor supports.
+ @param FlushType Specifies the type of flush operation to perform.
+
+ @retval EFI_SUCCESS The address range from Start to Start+Length was flushed from
+ the processor's data cache.
+ @retval EFI_UNSUPPORTEDT The processor does not support the cache flush type specified
+ by FlushType.
+ @retval EFI_DEVICE_ERROR The address range from Start to Start+Length could not be flushed
+ from the processor's data cache.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_FLUSH_DATA_CACHE)(
+ IN EFI_CPU_ARCH_PROTOCOL *This,
+ IN EFI_PHYSICAL_ADDRESS Start,
+ IN UINT64 Length,
+ IN EFI_CPU_FLUSH_TYPE FlushType
+ );
+
+
+/**
+ This function enables interrupt processing by the processor.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+
+ @retval EFI_SUCCESS Interrupts are enabled on the processor.
+ @retval EFI_DEVICE_ERROR Interrupts could not be enabled on the processor.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_ENABLE_INTERRUPT)(
+ IN EFI_CPU_ARCH_PROTOCOL *This
+ );
+
+
+/**
+ This function disables interrupt processing by the processor.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+
+ @retval EFI_SUCCESS Interrupts are disabled on the processor.
+ @retval EFI_DEVICE_ERROR Interrupts could not be disabled on the processor.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_DISABLE_INTERRUPT)(
+ IN EFI_CPU_ARCH_PROTOCOL *This
+ );
+
+
+/**
+ This function retrieves the processor's current interrupt state a returns it in
+ State. If interrupts are currently enabled, then TRUE is returned. If interrupts
+ are currently disabled, then FALSE is returned.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+ @param State A pointer to the processor's current interrupt state. Set to TRUE if
+ interrupts are enabled and FALSE if interrupts are disabled.
+
+ @retval EFI_SUCCESS The processor's current interrupt state was returned in State.
+ @retval EFI_INVALID_PARAMETER State is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_GET_INTERRUPT_STATE)(
+ IN EFI_CPU_ARCH_PROTOCOL *This,
+ OUT BOOLEAN *State
+ );
+
+
+/**
+ This function generates an INIT on the processor. If this function succeeds, then the
+ processor will be reset, and control will not be returned to the caller. If InitType is
+ not supported by this processor, or the processor cannot programmatically generate an
+ INIT without help from external hardware, then EFI_UNSUPPORTED is returned. If an error
+ occurs attempting to generate an INIT, then EFI_DEVICE_ERROR is returned.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+ @param InitType The type of processor INIT to perform.
+
+ @retval EFI_SUCCESS The processor INIT was performed. This return code should never be seen.
+ @retval EFI_UNSUPPORTED The processor INIT operation specified by InitType is not supported
+ by this processor.
+ @retval EFI_DEVICE_ERROR The processor INIT failed.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_INIT)(
+ IN EFI_CPU_ARCH_PROTOCOL *This,
+ IN EFI_CPU_INIT_TYPE InitType
+ );
+
+
+/**
+ This function registers and enables the handler specified by InterruptHandler for a processor
+ interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the
+ handler for the processor interrupt or exception type specified by InterruptType is uninstalled.
+ The installed handler is called once for each processor interrupt or exception.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+ @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts
+ are enabled and FALSE if interrupts are disabled.
+ @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called
+ when a processor interrupt occurs. If this parameter is NULL, then the handler
+ will be uninstalled.
+
+ @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled.
+ @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was
+ previously installed.
+ @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not
+ previously installed.
+ @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_REGISTER_INTERRUPT_HANDLER)(
+ IN EFI_CPU_ARCH_PROTOCOL *This,
+ IN EFI_EXCEPTION_TYPE InterruptType,
+ IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
+ );
+
+
+/**
+ This function reads the processor timer specified by TimerIndex and returns it in TimerValue.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+ @param TimerIndex Specifies which processor timer is to be returned in TimerValue. This parameter
+ 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. 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.
+ @retval EFI_INVALID_PARAMETER TimerValue is NULL or TimerIndex is not valid.
+ @retval EFI_UNSUPPORTED The processor does not have any readable timers.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_GET_TIMER_VALUE)(
+ IN EFI_CPU_ARCH_PROTOCOL *This,
+ IN UINT32 TimerIndex,
+ OUT UINT64 *TimerValue,
+ OUT UINT64 *TimerPeriod OPTIONAL
+ );
+
+
+/**
+ This function modifies the attributes for the memory region specified by BaseAddress and
+ Length from their current attributes to the attributes specified by Attributes.
+
+ @param This The EFI_CPU_ARCH_PROTOCOL instance.
+ @param BaseAddress The physical address that is the start address of a memory region.
+ @param Length The size in bytes of the memory region.
+ @param Attributes The bit mask of attributes to set for the memory region.
+
+ @retval EFI_SUCCESS The attributes were set for the memory region.
+ @retval EFI_ACCESS_DENIED The attributes for the memory resource range specified by
+ BaseAddress and Length cannot be modified.
+ @retval EFI_INVALID_PARAMETER Length is zero.
+ Attributes specified an illegal combination of attributes that
+ cannot be set together.
+ @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
+ the memory resource range.
+ @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
+ resource range specified by BaseAddress and Length.
+ The bit mask of attributes is not support for the memory resource
+ range specified by BaseAddress and Length.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_CPU_SET_MEMORY_ATTRIBUTES)(
+ IN EFI_CPU_ARCH_PROTOCOL *This,
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Attributes
+ );
+
+
+///
+/// The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE
+/// Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt
+/// vectors and exception vectors, reading internal processor timers, resetting the processor, and
+/// determining the processor frequency.
+///
+struct _EFI_CPU_ARCH_PROTOCOL {
+ EFI_CPU_FLUSH_DATA_CACHE FlushDataCache;
+ EFI_CPU_ENABLE_INTERRUPT EnableInterrupt;
+ EFI_CPU_DISABLE_INTERRUPT DisableInterrupt;
+ EFI_CPU_GET_INTERRUPT_STATE GetInterruptState;
+ EFI_CPU_INIT Init;
+ EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler;
+ EFI_CPU_GET_TIMER_VALUE GetTimerValue;
+ EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes;
+ ///
+ /// The number of timers that are available in a processor. The value in this
+ /// field is a constant that must not be modified after the CPU Architectural
+ /// Protocol is installed. All consumers must treat this as a read-only field.
+ ///
+ UINT32 NumberOfTimers;
+ ///
+ /// The size, in bytes, of the alignment required for DMA buffer allocations.
+ /// This is typically the size of the largest data cache line in the platform.
+ /// The value in this field is a constant that must not be modified after the
+ /// CPU Architectural Protocol is installed. All consumers must treat this as
+ /// a read-only field.
+ ///
+ UINT32 DmaBufferAlignment;
+};
+
+extern EFI_GUID gEfiCpuArchProtocolGuid;
+
+#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h b/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h
index d35b65fa9..a305df575 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h
@@ -5,7 +5,7 @@
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 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -22,8 +22,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
FILE_LICENCE ( BSD3 );
#include <ipxe/efi/Guid/PcAnsi.h>
-#include <ipxe/efi/IndustryStandard/Bluetooth.h>
-#include <ipxe/efi/IndustryStandard/Acpi60.h>
///
/// Device Path protocol.
@@ -174,26 +172,6 @@ typedef struct {
} CONTROLLER_DEVICE_PATH;
///
-/// BMC Device Path SubType.
-///
-#define HW_BMC_DP 0x06
-
-///
-/// BMC Device Path.
-///
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- ///
- /// Interface Type.
- ///
- UINT8 InterfaceType;
- ///
- /// Base Address.
- ///
- UINT8 BaseAddress[8];
-} BMC_DEVICE_PATH;
-
-///
/// ACPI Device Paths.
///
#define ACPI_DEVICE_PATH 0x02
@@ -297,14 +275,14 @@ typedef struct {
#define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4
#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
- ((UINT32)( ((UINT32)((_DeviceIdScheme) & 0x1) << 31) | \
- (((_HeadId) & 0x7) << 18) | \
- (((_NonVgaOutput) & 0x1) << 17) | \
- (((_BiosCanDetect) & 0x1) << 16) | \
- (((_VendorInfo) & 0xf) << 12) | \
- (((_Type) & 0xf) << 8) | \
- (((_Port) & 0xf) << 4) | \
- ((_Index) & 0xf) ))
+ ((UINT32)( (((_DeviceIdScheme) & 0x1) << 31) | \
+ (((_HeadId) & 0x7) << 18) | \
+ (((_NonVgaOutput) & 0x1) << 17) | \
+ (((_BiosCanDetect) & 0x1) << 16) | \
+ (((_VendorInfo) & 0xf) << 12) | \
+ (((_Type) & 0xf) << 8) | \
+ (((_Port) & 0xf) << 4) | \
+ ((_Index) & 0xf) ))
///
/// Messaging Device Paths.
@@ -820,43 +798,6 @@ typedef struct {
} NVME_NAMESPACE_DEVICE_PATH;
///
-/// Uniform Resource Identifiers (URI) Device Path SubType
-///
-#define MSG_URI_DP 0x18
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- ///
- /// Instance of the URI pursuant to RFC 3986.
- ///
- CHAR8 Uri[];
-} URI_DEVICE_PATH;
-
-///
-/// Universal Flash Storage (UFS) Device Path SubType.
-///
-#define MSG_UFS_DP 0x19
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- ///
- /// Target ID on the UFS bus (PUN).
- ///
- UINT8 Pun;
- ///
- /// Logical Unit Number (LUN).
- ///
- UINT8 Lun;
-} UFS_DEVICE_PATH;
-
-///
-/// SD (Secure Digital) Device Path SubType.
-///
-#define MSG_SD_DP 0x1A
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- UINT8 SlotNumber;
-} SD_DEVICE_PATH;
-
-///
/// iSCSI Device Path SubType
///
#define MSG_ISCSI_DP 0x13
@@ -907,30 +848,6 @@ typedef struct {
UINT16 VlanId;
} VLAN_DEVICE_PATH;
-///
-/// Bluetooth Device Path SubType.
-///
-#define MSG_BLUETOOTH_DP 0x1b
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- ///
- /// 48bit Bluetooth device address.
- ///
- BLUETOOTH_ADDRESS BD_ADDR;
-} BLUETOOTH_DEVICE_PATH;
-
-///
-/// Wi-Fi Device Path SubType.
-///
-#define MSG_WIFI_DP 0x1C
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- ///
- /// Service set identifier. A 32-byte octets string.
- ///
- UINT8 SSId[32];
-} WIFI_DEVICE_PATH;
-
//
// Media Device Path
//
@@ -1100,62 +1017,6 @@ typedef struct {
} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
///
-/// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
-///
-#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
-
-extern EFI_GUID gEfiVirtualDiskGuid;
-
-///
-/// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
-///
-#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
-
-extern EFI_GUID gEfiVirtualCdGuid;
-
-///
-/// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
-///
-#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
-
-extern EFI_GUID gEfiPersistentVirtualDiskGuid;
-
-///
-/// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
-///
-#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
-
-extern EFI_GUID gEfiPersistentVirtualCdGuid;
-
-///
-/// Media ram disk device path.
-///
-#define MEDIA_RAM_DISK_DP 0x09
-
-///
-/// Used to describe the ram disk device path.
-///
-typedef struct {
- EFI_DEVICE_PATH_PROTOCOL Header;
- ///
- /// Starting Memory Address.
- ///
- UINT32 StartingAddr[2];
- ///
- /// Ending Memory Address.
- ///
- UINT32 EndingAddr[2];
- ///
- /// GUID that defines the type of the RAM Disk.
- ///
- EFI_GUID TypeGuid;
- ///
- /// RAM Diskinstance number, if supported. The default value is zero.
- ///
- UINT16 Instance;
-} MEDIA_RAM_DISK_DEVICE_PATH;
-
-///
/// BIOS Boot Specification Device Path.
///
#define BBS_DEVICE_PATH 0x05
@@ -1208,7 +1069,6 @@ typedef union {
VENDOR_DEVICE_PATH Vendor;
CONTROLLER_DEVICE_PATH Controller;
- BMC_DEVICE_PATH Bmc;
ACPI_HID_DEVICE_PATH Acpi;
ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi;
ACPI_ADR_DEVICE_PATH AcpiAdr;
@@ -1236,11 +1096,6 @@ typedef union {
SAS_DEVICE_PATH Sas;
SASEX_DEVICE_PATH SasEx;
NVME_NAMESPACE_DEVICE_PATH NvmeNamespace;
- URI_DEVICE_PATH Uri;
- BLUETOOTH_DEVICE_PATH Bluetooth;
- WIFI_DEVICE_PATH WiFi;
- UFS_DEVICE_PATH Ufs;
- SD_DEVICE_PATH Sd;
HARDDRIVE_DEVICE_PATH HardDrive;
CDROM_DEVICE_PATH CD;
@@ -1250,7 +1105,7 @@ typedef union {
MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume;
MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile;
MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;
- MEDIA_RAM_DISK_DEVICE_PATH RamDisk;
+
BBS_BBS_DEVICE_PATH Bbs;
} EFI_DEV_PATH;
@@ -1264,7 +1119,6 @@ typedef union {
VENDOR_DEVICE_PATH *Vendor;
CONTROLLER_DEVICE_PATH *Controller;
- BMC_DEVICE_PATH *Bmc;
ACPI_HID_DEVICE_PATH *Acpi;
ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
ACPI_ADR_DEVICE_PATH *AcpiAdr;
@@ -1292,11 +1146,6 @@ typedef union {
SAS_DEVICE_PATH *Sas;
SASEX_DEVICE_PATH *SasEx;
NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace;
- URI_DEVICE_PATH *Uri;
- BLUETOOTH_DEVICE_PATH *Bluetooth;
- WIFI_DEVICE_PATH *WiFi;
- UFS_DEVICE_PATH *Ufs;
- SD_DEVICE_PATH *Sd;
HARDDRIVE_DEVICE_PATH *HardDrive;
CDROM_DEVICE_PATH *CD;
@@ -1306,7 +1155,7 @@ typedef union {
MEDIA_FW_VOL_DEVICE_PATH *FirmwareVolume;
MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FirmwareFile;
MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;
- MEDIA_RAM_DISK_DEVICE_PATH *RamDisk;
+
BBS_BBS_DEVICE_PATH *Bbs;
UINT8 *Raw;
} EFI_DEV_PATH_PTR;
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h b/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h
index 8033a11d3..0c0f56d73 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h
@@ -4,7 +4,7 @@
The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
leverage the EFI configuration driver interface.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -65,7 +65,6 @@ typedef UINTN EFI_BROWSER_ACTION_REQUEST;
#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5
#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6
#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7
-#define EFI_BROWSER_ACTION_REQUEST_RECONNECT 8
/**
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h b/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h
index df9080591..17ce3fdcc 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h
@@ -5,7 +5,7 @@
This protocol is published by drivers providing and requesting
configuration data from HII. It may only be invoked by HII.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -36,7 +36,6 @@ typedef UINTN EFI_BROWSER_ACTION;
#define EFI_BROWSER_ACTION_RETRIEVE 2
#define EFI_BROWSER_ACTION_FORM_OPEN 3
#define EFI_BROWSER_ACTION_FORM_CLOSE 4
-#define EFI_BROWSER_ACTION_SUBMITTED 5
#define EFI_BROWSER_ACTION_DEFAULT_STANDARD 0x1000
#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001
#define EFI_BROWSER_ACTION_DEFAULT_SAFE 0x1002
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/HiiFont.h b/roms/ipxe/src/include/ipxe/efi/Protocol/HiiFont.h
deleted file mode 100644
index f2b72dc11..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/HiiFont.h
+++ /dev/null
@@ -1,474 +0,0 @@
-/** @file
- The file provides services to retrieve font information.
-
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-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 __HII_FONT_H__
-#define __HII_FONT_H__
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/Protocol/GraphicsOutput.h>
-#include <ipxe/efi/Protocol/HiiImage.h>
-
-#define EFI_HII_FONT_PROTOCOL_GUID \
-{ 0xe9ca4775, 0x8657, 0x47fc, { 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 } }
-
-typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL;
-
-typedef VOID *EFI_FONT_HANDLE;
-
-///
-/// EFI_HII_OUT_FLAGS.
-///
-typedef UINT32 EFI_HII_OUT_FLAGS;
-
-#define EFI_HII_OUT_FLAG_CLIP 0x00000001
-#define EFI_HII_OUT_FLAG_WRAP 0x00000002
-#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004
-#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008
-#define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010
-#define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020
-#define EFI_HII_IGNORE_LINE_BREAK 0x00000040
-#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
-
-/**
- Definition of EFI_HII_ROW_INFO.
-**/
-typedef struct _EFI_HII_ROW_INFO {
- ///
- /// The index of the first character in the string which is displayed on the line.
- ///
- UINTN StartIndex;
- ///
- /// The index of the last character in the string which is displayed on the line.
- /// If this is the same as StartIndex, then no characters are displayed.
- ///
- UINTN EndIndex;
- UINTN LineHeight; ///< The height of the line, in pixels.
- UINTN LineWidth; ///< The width of the text on the line, in pixels.
-
- ///
- /// The font baseline offset in pixels from the bottom of the row, or 0 if none.
- ///
- UINTN BaselineOffset;
-} EFI_HII_ROW_INFO;
-
-///
-/// Font info flag. All flags (FONT, SIZE, STYLE, and COLOR) are defined.
-/// They are defined as EFI_FONT_INFO_***
-///
-typedef UINT32 EFI_FONT_INFO_MASK;
-
-#define EFI_FONT_INFO_SYS_FONT 0x00000001
-#define EFI_FONT_INFO_SYS_SIZE 0x00000002
-#define EFI_FONT_INFO_SYS_STYLE 0x00000004
-#define EFI_FONT_INFO_SYS_FORE_COLOR 0x00000010
-#define EFI_FONT_INFO_SYS_BACK_COLOR 0x00000020
-#define EFI_FONT_INFO_RESIZE 0x00001000
-#define EFI_FONT_INFO_RESTYLE 0x00002000
-#define EFI_FONT_INFO_ANY_FONT 0x00010000
-#define EFI_FONT_INFO_ANY_SIZE 0x00020000
-#define EFI_FONT_INFO_ANY_STYLE 0x00040000
-
-//
-// EFI_FONT_INFO
-//
-typedef struct {
- EFI_HII_FONT_STYLE FontStyle;
- UINT16 FontSize; ///< character cell height in pixels
- CHAR16 FontName[1];
-} EFI_FONT_INFO;
-
-/**
- Describes font output-related information.
-
- This structure is used for describing the way in which a string
- should be rendered in a particular font. FontInfo specifies the
- basic font information and ForegroundColor and BackgroundColor
- specify the color in which they should be displayed. The flags
- in FontInfoMask describe where the system default should be
- supplied instead of the specified information. The flags also
- describe what options can be used to make a match between the
- font requested and the font available.
-**/
-typedef struct _EFI_FONT_DISPLAY_INFO {
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;
- EFI_FONT_INFO_MASK FontInfoMask;
- EFI_FONT_INFO FontInfo;
-} EFI_FONT_DISPLAY_INFO;
-
-/**
-
- This function renders a string to a bitmap or the screen using
- the specified font, color and options. It either draws the
- string and glyphs on an existing bitmap, allocates a new bitmap,
- or uses the screen. The strings can be clipped or wrapped.
- Optionally, the function also returns the information about each
- row and the character position on that row. If
- EFI_HII_OUT_FLAG_CLIP is set, then text will be formatted only
- based on explicit line breaks and all pixels which would lie
- outside the bounding box specified by Width and Height are
- ignored. The information in the RowInfoArray only describes
- characters which are at least partially displayed. For the final
- row, the LineHeight and BaseLine may describe pixels that are
- outside the limit specified by Height (unless
- EFI_HII_OUT_FLAG_CLIP_CLEAN_Y is specified) even though those
- pixels were not drawn. The LineWidth may describe pixels which
- are outside the limit specified by Width (unless
- EFI_HII_OUT_FLAG_CLIP_CLEAN_X is specified) even though those
- pixels were not drawn. If EFI_HII_OUT_FLAG_CLIP_CLEAN_X is set,
- then it modifies the behavior of EFI_HII_OUT_FLAG_CLIP so that
- if a character's right-most on pixel cannot fit, then it will
- not be drawn at all. This flag requires that
- EFI_HII_OUT_FLAG_CLIP be set. If EFI_HII_OUT_FLAG_CLIP_CLEAN_Y
- is set, then it modifies the behavior of EFI_HII_OUT_FLAG_CLIP
- so that if a row's bottom-most pixel cannot fit, then it will
- not be drawn at all. This flag requires that
- EFI_HII_OUT_FLAG_CLIP be set. If EFI_HII_OUT_FLAG_WRAP is set,
- then text will be wrapped at the right-most line-break
- opportunity prior to a character whose right-most extent would
- exceed Width. If no line-break opportunity can be found, then
- the text will behave as if EFI_HII_OUT_FLAG_CLIP_CLEAN_X is set.
- This flag cannot be used with EFI_HII_OUT_FLAG_CLIP_CLEAN_X. If
- EFI_HII_OUT_FLAG_TRANSPARENT is set, then BackgroundColor is
- ignored and all 'off' pixels in the character's drawn
- will use the pixel value from Blt. This flag cannot be used if
- Blt is NULL upon entry. If EFI_HII_IGNORE_IF_NO_GLYPH is set,
- then characters which have no glyphs are not drawn. Otherwise,
- they are replaced with Unicode character code 0xFFFD (REPLACEMENT
- CHARACTER). If EFI_HII_IGNORE_LINE_BREAK is set, then explicit
- line break characters will be ignored. If
- EFI_HII_DIRECT_TO_SCREEN is set, then the string will be written
- directly to the output device specified by Screen. Otherwise the
- string will be rendered to the bitmap specified by Bitmap.
-
- @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
-
- @param Flags Describes how the string is to be drawn.
-
- @param String Points to the null-terminated string to be
-
- @param StringInfo Points to the string output information,
- including the color and font. If NULL, then
- the string will be output in the default
- system font and color.
-
- @param Blt If this points to a non-NULL on entry, this points
- to the image, which is Width pixels wide and
- Height pixels high. The string will be drawn onto
- this image and EFI_HII_OUT_FLAG_CLIP is implied.
- If this points to a NULL on entry, then a buffer
- will be allocated to hold the generated image and
- the pointer updated on exit. It is the caller's
- responsibility to free this buffer.
-
- @param BltX, BltY Specifies the offset from the left and top
- edge of the image of the first character
- cell in the image.
-
- @param RowInfoArray If this is non-NULL on entry, then on
- exit, this will point to an allocated buffer
- containing row information and
- RowInfoArraySize will be updated to contain
- the number of elements. This array describes
- the characters that were at least partially
- drawn and the heights of the rows. It is the
- caller's responsibility to free this buffer.
-
- @param RowInfoArraySize If this is non-NULL on entry, then on
- exit it contains the number of
- elements in RowInfoArray.
-
- @param ColumnInfoArray If this is non-NULL, then on return it
- will be filled with the horizontal
- offset for each character in the
- string on the row where it is
- displayed. Non-printing characters
- will have the offset ~0. The caller is
- responsible for allocating a buffer large
- enough so that there is one entry for
- each character in the string, not
- including the null-terminator. It is
- possible when character display is
- normalized that some character cells
- overlap.
-
- @retval EFI_SUCCESS The string was successfully updated.
-
- @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for RowInfoArray or Blt.
-
- @retval EFI_INVALID_PARAMETER The String or Blt was NULL.
-
- @retval EFI_INVALID_PARAMETER Flags were invalid combination.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_STRING_TO_IMAGE)(
- IN CONST EFI_HII_FONT_PROTOCOL *This,
- IN EFI_HII_OUT_FLAGS Flags,
- IN CONST EFI_STRING String,
- IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
- IN OUT EFI_IMAGE_OUTPUT **Blt,
- IN UINTN BltX,
- IN UINTN BltY,
- OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
- OUT UINTN *RowInfoArraySize OPTIONAL,
- OUT UINTN *ColumnInfoArray OPTIONAL
-);
-
-
-
-/**
-
- This function renders a string as a bitmap or to the screen
- and can clip or wrap the string. The bitmap is either supplied
- by the caller or allocated by the function. The
- strings are drawn with the font, size and style specified and
- can be drawn transparently or opaquely. The function can also
- return information about each row and each character's
- position on the row. If EFI_HII_OUT_FLAG_CLIP is set, then
- text will be formatted based only on explicit line breaks, and
- all pixels that would lie outside the bounding box specified
- by Width and Height are ignored. The information in the
- RowInfoArray only describes characters which are at least
- partially displayed. For the final row, the LineHeight and
- BaseLine may describe pixels which are outside the limit
- specified by Height (unless EFI_HII_OUT_FLAG_CLIP_CLEAN_Y is
- specified) even though those pixels were not drawn. If
- EFI_HII_OUT_FLAG_CLIP_CLEAN_X is set, then it modifies the
- behavior of EFI_HII_OUT_FLAG_CLIP so that if a character's
- right-most on pixel cannot fit, then it will not be drawn at
- all. This flag requires that EFI_HII_OUT_FLAG_CLIP be set. If
- EFI_HII_OUT_FLAG_CLIP_CLEAN_Y is set, then it modifies the
- behavior of EFI_HII_OUT_FLAG_CLIP so that if a row's bottom
- most pixel cannot fit, then it will not be drawn at all. This
- flag requires that EFI_HII_OUT_FLAG_CLIP be set. If
- EFI_HII_OUT_FLAG_WRAP is set, then text will be wrapped at the
- right-most line-break opportunity prior to a character whose
- right-most extent would exceed Width. If no line-break
- opportunity can be found, then the text will behave as if
- EFI_HII_OUT_FLAG_CLIP_CLEAN_X is set. This flag cannot be used
- with EFI_HII_OUT_FLAG_CLIP_CLEAN_X. If
- EFI_HII_OUT_FLAG_TRANSPARENT is set, then BackgroundColor is
- ignored and all off" pixels in the character's glyph will
- use the pixel value from Blt. This flag cannot be used if Blt
- is NULL upon entry. If EFI_HII_IGNORE_IF_NO_GLYPH is set, then
- characters which have no glyphs are not drawn. Otherwise, they
- are replaced with Unicode character code 0xFFFD (REPLACEMENT
- CHARACTER). If EFI_HII_IGNORE_LINE_BREAK is set, then explicit
- line break characters will be ignored. If
- EFI_HII_DIRECT_TO_SCREEN is set, then the string will be
- written directly to the output device specified by Screen.
- Otherwise the string will be rendered to the bitmap specified
- by Bitmap.
-
-
- @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
-
- @param Flags Describes how the string is to be drawn.
-
- @param PackageList
- The package list in the HII database to
- search for the specified string.
-
- @param StringId The string's id, which is unique within
- PackageList.
-
- @param Language Points to the language for the retrieved
- string. If NULL, then the current system
- language is used.
-
- @param StringInfo Points to the string output information,
- including the color and font. If NULL, then
- the string will be output in the default
- system font and color.
-
- @param Blt If this points to a non-NULL on entry, this points
- to the image, which is Width pixels wide and
- Height pixels high. The string will be drawn onto
- this image and EFI_HII_OUT_FLAG_CLIP is implied.
- If this points to a NULL on entry, then a buffer
- will be allocated to hold the generated image and
- the pointer updated on exit. It is the caller's
- responsibility to free this buffer.
-
- @param BltX, BltY Specifies the offset from the left and top
- edge of the output image of the first
- character cell in the image.
-
- @param RowInfoArray If this is non-NULL on entry, then on
- exit, this will point to an allocated
- buffer containing row information and
- RowInfoArraySize will be updated to
- contain the number of elements. This array
- describes the characters which were at
- least partially drawn and the heights of
- the rows. It is the caller's
- responsibility to free this buffer.
-
- @param RowInfoArraySize If this is non-NULL on entry, then on
- exit it contains the number of
- elements in RowInfoArray.
-
- @param ColumnInfoArray If non-NULL, on return it is filled
- with the horizontal offset for each
- character in the string on the row
- where it is displayed. Non-printing
- characters will have the offset ~0.
- The caller is responsible to allocate
- a buffer large enough so that there is
- one entry for each character in the
- string, not including the
- null-terminator. It is possible when
- character display is normalized that
- some character cells overlap.
-
-
- @retval EFI_SUCCESS The string was successfully updated.
-
- @retval EFI_OUT_OF_RESOURCES Unable to allocate an output
- buffer for RowInfoArray or Blt.
-
- @retval EFI_INVALID_PARAMETER The String, or Blt, or Height, or
- Width was NULL.
- @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
- @retval EFI_INVALID_PARAMETER Flags were invalid combination.
- @retval EFI_NOT_FOUND The specified PackageList is not in the Database,
- or the stringid is not in the specified PackageList.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE)(
- IN CONST EFI_HII_FONT_PROTOCOL *This,
- IN EFI_HII_OUT_FLAGS Flags,
- IN EFI_HII_HANDLE PackageList,
- IN EFI_STRING_ID StringId,
- IN CONST CHAR8 *Language,
- IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
- IN OUT EFI_IMAGE_OUTPUT **Blt,
- IN UINTN BltX,
- IN UINTN BltY,
- OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
- OUT UINTN *RowInfoArraySize OPTIONAL,
- OUT UINTN *ColumnInfoArray OPTIONAL
-);
-
-
-/**
-
- Convert the glyph for a single character into a bitmap.
-
- @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
-
- @param Char The character to retrieve.
-
- @param StringInfo Points to the string font and color
- information or NULL if the string should use
- the default system font and color.
-
- @param Blt This must point to a NULL on entry. A buffer will
- be allocated to hold the output and the pointer
- updated on exit. It is the caller's responsibility
- to free this buffer.
-
- @param Baseline The number of pixels from the bottom of the bitmap
- to the baseline.
-
-
- @retval EFI_SUCCESS The glyph bitmap created.
-
- @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
-
- @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was
- replaced with the glyph for
- Unicode character code 0xFFFD.
-
- @retval EFI_INVALID_PARAMETER Blt is NULL, or Width is NULL, or
- Height is NULL
-
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_GET_GLYPH)(
- IN CONST EFI_HII_FONT_PROTOCOL *This,
- IN CONST CHAR16 Char,
- IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
- OUT EFI_IMAGE_OUTPUT **Blt,
- OUT UINTN *Baseline OPTIONAL
-);
-
-/**
-
- This function iterates through fonts which match the specified
- font, using the specified criteria. If String is non-NULL, then
- all of the characters in the string must exist in order for a
- candidate font to be returned.
-
- @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
-
- @param FontHandle On entry, points to the font handle returned
- by a previous call to GetFontInfo() or NULL
- to start with the first font. On return,
- points to the returned font handle or points
- to NULL if there are no more matching fonts.
-
- @param StringInfoIn Upon entry, points to the font to return
- information about. If NULL, then the information
- about the system default font will be returned.
-
- @param StringInfoOut Upon return, contains the matching font's information.
- If NULL, then no information is returned. This buffer
- is allocated with a call to the Boot Service AllocatePool().
- It is the caller's responsibility to call the Boot
- Service FreePool() when the caller no longer requires
- the contents of StringInfoOut.
-
- @param String Points to the string which will be tested to
- determine if all characters are available. If
- NULL, then any font is acceptable.
-
- @retval EFI_SUCCESS Matching font returned successfully.
-
- @retval EFI_NOT_FOUND No matching font was found.
-
- @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the request.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_GET_FONT_INFO)(
- IN CONST EFI_HII_FONT_PROTOCOL *This,
- IN OUT EFI_FONT_HANDLE *FontHandle,
- IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
- OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
- IN CONST EFI_STRING String OPTIONAL
-);
-
-///
-/// The protocol provides the service to retrieve the font informations.
-///
-struct _EFI_HII_FONT_PROTOCOL {
- EFI_HII_STRING_TO_IMAGE StringToImage;
- EFI_HII_STRING_ID_TO_IMAGE StringIdToImage;
- EFI_HII_GET_GLYPH GetGlyph;
- EFI_HII_GET_FONT_INFO GetFontInfo;
-};
-
-extern EFI_GUID gEfiHiiFontProtocolGuid;
-
-
-#endif
-
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/HiiImage.h b/roms/ipxe/src/include/ipxe/efi/Protocol/HiiImage.h
deleted file mode 100644
index b18d51a61..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/HiiImage.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/** @file
- The file provides services to access to images in the images database.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __HII_IMAGE_H__
-#define __HII_IMAGE_H__
-
-FILE_LICENCE ( BSD3 );
-
-#define EFI_HII_IMAGE_PROTOCOL_GUID \
- { 0x31a6406a, 0x6bdf, 0x4e46, { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } }
-
-typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL;
-
-
-///
-/// Flags in EFI_IMAGE_INPUT
-///
-#define EFI_IMAGE_TRANSPARENT 0x00000001
-
-/**
-
- Definition of EFI_IMAGE_INPUT.
-
- @param Flags Describe image characteristics. If
- EFI_IMAGE_TRANSPARENT is set, then the image was
- designed for transparent display.
-
- @param Width Image width, in pixels.
-
- @param Height Image height, in pixels.
-
- @param Bitmap A pointer to the actual bitmap, organized left-to-right,
- top-to-bottom. The size of the bitmap is
- Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL).
-
-
-**/
-typedef struct _EFI_IMAGE_INPUT {
- UINT32 Flags;
- UINT16 Width;
- UINT16 Height;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap;
-} EFI_IMAGE_INPUT;
-
-
-/**
-
- This function adds the image Image to the group of images
- owned by PackageList, and returns a new image identifier
- (ImageId).
-
- @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
-
- @param PackageList Handle of the package list where this image will be added.
-
- @param ImageId On return, contains the new image id, which is
- unique within PackageList.
-
- @param Image Points to the image.
-
- @retval EFI_SUCCESS The new image was added
- successfully
-
- @retval EFI_OUT_OF_RESOURCES Could not add the image.
-
- @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is
- NULL.
-
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_NEW_IMAGE)(
- IN CONST EFI_HII_IMAGE_PROTOCOL *This,
- IN EFI_HII_HANDLE PackageList,
- OUT EFI_IMAGE_ID *ImageId,
- IN CONST EFI_IMAGE_INPUT *Image
-);
-
-/**
-
- This function retrieves the image specified by ImageId which
- is associated with the specified PackageList and copies it
- into the buffer specified by Image. If the image specified by
- ImageId is not present in the specified PackageList, then
- EFI_NOT_FOUND is returned. If the buffer specified by
- ImageSize is too small to hold the image, then
- EFI_BUFFER_TOO_SMALL will be returned. ImageSize will be
- updated to the size of buffer actually required to hold the
- image.
-
- @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
-
- @param PackageList The package list in the HII database to
- search for the specified image.
-
- @param ImageId The image's id, which is unique within
- PackageList.
-
- @param Image Points to the new image.
-
- @retval EFI_SUCCESS The image was returned successfully.
-
- @retval EFI_NOT_FOUND The image specified by ImageId is not
- available. Or The specified PackageList is not in the database.
-
- @retval EFI_INVALID_PARAMETER The Image or Langugae was NULL.
- @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
- enough memory.
-
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_GET_IMAGE)(
- IN CONST EFI_HII_IMAGE_PROTOCOL *This,
- IN EFI_HII_HANDLE PackageList,
- IN EFI_IMAGE_ID ImageId,
- OUT EFI_IMAGE_INPUT *Image
-);
-
-/**
-
- This function updates the image specified by ImageId in the
- specified PackageListHandle to the image specified by Image.
-
-
- @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
-
- @param PackageList The package list containing the images.
-
- @param ImageId The image id, which is unique within PackageList.
-
- @param Image Points to the image.
-
- @retval EFI_SUCCESS The image was successfully updated.
-
- @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
- The specified PackageList is not in the database.
-
- @retval EFI_INVALID_PARAMETER The Image or Language was NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_SET_IMAGE)(
- IN CONST EFI_HII_IMAGE_PROTOCOL *This,
- IN EFI_HII_HANDLE PackageList,
- IN EFI_IMAGE_ID ImageId,
- IN CONST EFI_IMAGE_INPUT *Image
-);
-
-
-///
-/// EFI_HII_DRAW_FLAGS describes how the image is to be drawn.
-/// These flags are defined as EFI_HII_DRAW_FLAG_***
-///
-typedef UINT32 EFI_HII_DRAW_FLAGS;
-
-#define EFI_HII_DRAW_FLAG_CLIP 0x00000001
-#define EFI_HII_DRAW_FLAG_TRANSPARENT 0x00000030
-#define EFI_HII_DRAW_FLAG_DEFAULT 0x00000000
-#define EFI_HII_DRAW_FLAG_FORCE_TRANS 0x00000010
-#define EFI_HII_DRAW_FLAG_FORCE_OPAQUE 0x00000020
-#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
-
-/**
-
- Definition of EFI_IMAGE_OUTPUT.
-
- @param Width Width of the output image.
-
- @param Height Height of the output image.
-
- @param Bitmap Points to the output bitmap.
-
- @param Screen Points to the EFI_GRAPHICS_OUTPUT_PROTOCOL which
- describes the screen on which to draw the
- specified image.
-
-**/
-typedef struct _EFI_IMAGE_OUTPUT {
- UINT16 Width;
- UINT16 Height;
- union {
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap;
- EFI_GRAPHICS_OUTPUT_PROTOCOL *Screen;
- } Image;
-} EFI_IMAGE_OUTPUT;
-
-
-/**
-
- This function renders an image to a bitmap or the screen using
- the specified color and options. It draws the image on an
- existing bitmap, allocates a new bitmap or uses the screen. The
- images can be clipped. If EFI_HII_DRAW_FLAG_CLIP is set, then
- all pixels drawn outside the bounding box specified by Width and
- Height are ignored. If EFI_HII_DRAW_FLAG_TRANSPARENT is set,
- then all 'off' pixels in the images drawn will use the
- pixel value from Blt. This flag cannot be used if Blt is NULL
- upon entry. If EFI_HII_DIRECT_TO_SCREEN is set, then the image
- will be written directly to the output device specified by
- Screen. Otherwise the image will be rendered to the bitmap
- specified by Bitmap.
-
-
- @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
-
- @param Flags Describes how the image is to be drawn.
- EFI_HII_DRAW_FLAGS is defined in Related
- Definitions, below.
-
- @param Image Points to the image to be displayed.
-
- @param Blt If this points to a non-NULL on entry, this points
- to the image, which is Width pixels wide and
- Height pixels high. The image will be drawn onto
- this image and EFI_HII_DRAW_FLAG_CLIP is implied.
- If this points to a NULL on entry, then a buffer
- will be allocated to hold the generated image and
- the pointer updated on exit. It is the caller's
- responsibility to free this buffer.
-
- @param BltX, BltY Specifies the offset from the left and top
- edge of the image of the first pixel in
- the image.
-
- @retval EFI_SUCCESS The image was successfully updated.
-
- @retval EFI_OUT_OF_RESOURCES Unable to allocate an output
- buffer for RowInfoArray or Blt.
-
- @retval EFI_INVALID_PARAMETER The Image or Blt or Height or
- Width was NULL.
-
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_DRAW_IMAGE)(
- IN CONST EFI_HII_IMAGE_PROTOCOL *This,
- IN EFI_HII_DRAW_FLAGS Flags,
- IN CONST EFI_IMAGE_INPUT *Image,
- IN OUT EFI_IMAGE_OUTPUT **Blt,
- IN UINTN BltX,
- IN UINTN BltY
-);
-
-/**
-
- This function renders an image as a bitmap or to the screen and
- can clip the image. The bitmap is either supplied by the caller
- or else is allocated by the function. The images can be drawn
- transparently or opaquely. If EFI_HII_DRAW_FLAG_CLIP is set,
- then all pixels drawn outside the bounding box specified by
- Width and Height are ignored. If EFI_HII_DRAW_FLAG_TRANSPARENT
- is set, then all "off" pixels in the character's glyph will
- use the pixel value from Blt. This flag cannot be used if Blt
- is NULL upon entry. If EFI_HII_DIRECT_TO_SCREEN is set, then
- the image will be written directly to the output device
- specified by Screen. Otherwise the image will be rendered to
- the bitmap specified by Bitmap.
- This function renders an image to a bitmap or the screen using
- the specified color and options. It draws the image on an
- existing bitmap, allocates a new bitmap or uses the screen. The
- images can be clipped. If EFI_HII_DRAW_FLAG_CLIP is set, then
- all pixels drawn outside the bounding box specified by Width and
- Height are ignored. The EFI_HII_DRAW_FLAG_TRANSPARENT flag
- determines whether the image will be drawn transparent or
- opaque. If EFI_HII_DRAW_FLAG_FORCE_TRANS is set, then the image
- will be drawn so that all 'off' pixels in the image will
- be drawn using the pixel value from Blt and all other pixels
- will be copied. If EFI_HII_DRAW_FLAG_FORCE_OPAQUE is set, then
- the image's pixels will be copied directly to the
- destination. If EFI_HII_DRAW_FLAG_DEFAULT is set, then the image
- will be drawn transparently or opaque, depending on the
- image's transparency setting (see EFI_IMAGE_TRANSPARENT).
- Images cannot be drawn transparently if Blt is NULL. If
- EFI_HII_DIRECT_TO_SCREEN is set, then the image will be written
- directly to the output device specified by Screen. Otherwise the
- image will be rendered to the bitmap specified by Bitmap.
-
- @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
-
- @param Flags Describes how the image is to be drawn.
-
- @param PackageList The package list in the HII database to
- search for the specified image.
-
- @param ImageId The image's id, which is unique within PackageList.
-
- @param Blt If this points to a non-NULL on entry, this points
- to the image, which is Width pixels wide and
- Height pixels high. The image will be drawn onto
- this image and EFI_HII_DRAW_FLAG_CLIP is implied.
- If this points to a NULL on entry, then a buffer
- will be allocated to hold the generated image and
- the pointer updated on exit. It is the caller's
- responsibility to free this buffer.
-
- @param BltX, BltY Specifies the offset from the left and top
- edge of the output image of the first
- pixel in the image.
-
- @retval EFI_SUCCESS The image was successfully updated.
-
- @retval EFI_OUT_OF_RESOURCES Unable to allocate an output
- buffer for RowInfoArray or Blt.
-
- @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
- Or The specified PackageList is not in the database.
-
- @retval EFI_INVALID_PARAMETER The Blt was NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_DRAW_IMAGE_ID)(
-IN CONST EFI_HII_IMAGE_PROTOCOL *This,
-IN EFI_HII_DRAW_FLAGS Flags,
-IN EFI_HII_HANDLE PackageList,
-IN EFI_IMAGE_ID ImageId,
-IN OUT EFI_IMAGE_OUTPUT **Blt,
-IN UINTN BltX,
-IN UINTN BltY
-);
-
-
-///
-/// Services to access to images in the images database.
-///
-struct _EFI_HII_IMAGE_PROTOCOL {
- EFI_HII_NEW_IMAGE NewImage;
- EFI_HII_GET_IMAGE GetImage;
- EFI_HII_SET_IMAGE SetImage;
- EFI_HII_DRAW_IMAGE DrawImage;
- EFI_HII_DRAW_IMAGE_ID DrawImageId;
-};
-
-extern EFI_GUID gEfiHiiImageProtocolGuid;
-
-#endif
-
-
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h b/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h
index ba80fdc16..99387e89f 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h
@@ -7,7 +7,7 @@
UEFI 2.0 can boot from any device that produces a LoadFile protocol.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+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
@@ -66,7 +66,7 @@ typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE;
@retval EFI_NO_RESPONSE The remote system did not respond.
@retval EFI_NOT_FOUND The file was not found.
@retval EFI_ABORTED The file load process was manually cancelled.
- @retval EFI_WARN_FILE_SYSTEM The resulting Buffer contains UEFI-compliant file system.
+
**/
typedef
EFI_STATUS
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/SerialIo.h b/roms/ipxe/src/include/ipxe/efi/Protocol/SerialIo.h
deleted file mode 100644
index 130a6ecdc..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/SerialIo.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/** @file
- Serial IO protocol as defined in the UEFI 2.0 specification.
-
- Abstraction of a basic serial device. Targeted at 16550 UART, but
- could be much more generic.
-
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __SERIAL_IO_PROTOCOL_H__
-#define __SERIAL_IO_PROTOCOL_H__
-
-FILE_LICENCE ( BSD3 );
-
-#define EFI_SERIAL_IO_PROTOCOL_GUID \
- { \
- 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \
- }
-
-///
-/// Protocol GUID defined in EFI1.1.
-///
-#define SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL_GUID
-
-typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL;
-
-
-///
-/// Backward-compatible with EFI1.1.
-///
-typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE;
-
-///
-/// Parity type that is computed or checked as each character is transmitted or received. If the
-/// device does not support parity, the value is the default parity value.
-///
-typedef enum {
- DefaultParity,
- NoParity,
- EvenParity,
- OddParity,
- MarkParity,
- SpaceParity
-} EFI_PARITY_TYPE;
-
-///
-/// Stop bits type
-///
-typedef enum {
- DefaultStopBits,
- OneStopBit,
- OneFiveStopBits,
- TwoStopBits
-} EFI_STOP_BITS_TYPE;
-
-//
-// define for Control bits, grouped by read only, write only, and read write
-//
-//
-// Read Only
-//
-#define EFI_SERIAL_CLEAR_TO_SEND 0x00000010
-#define EFI_SERIAL_DATA_SET_READY 0x00000020
-#define EFI_SERIAL_RING_INDICATE 0x00000040
-#define EFI_SERIAL_CARRIER_DETECT 0x00000080
-#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x00000100
-#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x00000200
-
-//
-// Write Only
-//
-#define EFI_SERIAL_REQUEST_TO_SEND 0x00000002
-#define EFI_SERIAL_DATA_TERMINAL_READY 0x00000001
-
-//
-// Read Write
-//
-#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x00001000
-#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x00002000
-#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000
-
-//
-// Serial IO Member Functions
-//
-/**
- Reset the serial device.
-
- @param This Protocol instance pointer.
-
- @retval EFI_SUCCESS The device was reset.
- @retval EFI_DEVICE_ERROR The serial device could not be reset.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_RESET)(
- IN EFI_SERIAL_IO_PROTOCOL *This
- );
-
-/**
- Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
- data bits, and stop bits on a serial device.
-
- @param This Protocol instance pointer.
- @param BaudRate The requested baud rate. A BaudRate value of 0 will use the
- device's default interface speed.
- @param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the
- serial interface. A ReceiveFifoDepth value of 0 will use
- the device's default FIFO depth.
- @param Timeout The requested time out for a single character in microseconds.
- This timeout applies to both the transmit and receive side of the
- interface. A Timeout value of 0 will use the device's default time
- out value.
- @param Parity The type of parity to use on this serial device. A Parity value of
- DefaultParity will use the device's default parity value.
- @param DataBits The number of data bits to use on the serial device. A DataBits
- vaule of 0 will use the device's default data bit setting.
- @param StopBits The number of stop bits to use on this serial device. A StopBits
- value of DefaultStopBits will use the device's default number of
- stop bits.
-
- @retval EFI_SUCCESS The device was reset.
- @retval EFI_DEVICE_ERROR The serial device could not be reset.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES)(
- IN EFI_SERIAL_IO_PROTOCOL *This,
- IN UINT64 BaudRate,
- IN UINT32 ReceiveFifoDepth,
- IN UINT32 Timeout,
- IN EFI_PARITY_TYPE Parity,
- IN UINT8 DataBits,
- IN EFI_STOP_BITS_TYPE StopBits
- );
-
-/**
- Set the control bits on a serial device
-
- @param This Protocol instance pointer.
- @param Control Set the bits of Control that are settable.
-
- @retval EFI_SUCCESS The new control bits were set on the serial device.
- @retval EFI_UNSUPPORTED The serial device does not support this operation.
- @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS)(
- IN EFI_SERIAL_IO_PROTOCOL *This,
- IN UINT32 Control
- );
-
-/**
- Retrieves the status of thecontrol bits on a serial device
-
- @param This Protocol instance pointer.
- @param Control A pointer to return the current Control signals from the serial device.
-
- @retval EFI_SUCCESS The control bits were read from the serial device.
- @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS)(
- IN EFI_SERIAL_IO_PROTOCOL *This,
- OUT UINT32 *Control
- );
-
-/**
- Writes data to a serial device.
-
- @param This Protocol instance pointer.
- @param BufferSize On input, the size of the Buffer. On output, the amount of
- data actually written.
- @param Buffer The buffer of data to write
-
- @retval EFI_SUCCESS The data was written.
- @retval EFI_DEVICE_ERROR The device reported an error.
- @retval EFI_TIMEOUT The data write was stopped due to a timeout.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_WRITE)(
- IN EFI_SERIAL_IO_PROTOCOL *This,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
- );
-
-/**
- Writes data to a serial device.
-
- @param This Protocol instance pointer.
- @param BufferSize On input, the size of the Buffer. On output, the amount of
- data returned in Buffer.
- @param Buffer The buffer to return the data into.
-
- @retval EFI_SUCCESS The data was read.
- @retval EFI_DEVICE_ERROR The device reported an error.
- @retval EFI_TIMEOUT The data write was stopped due to a timeout.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_READ)(
- IN EFI_SERIAL_IO_PROTOCOL *This,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-/**
- @par Data Structure Description:
- The data values in SERIAL_IO_MODE are read-only and are updated by the code
- that produces the SERIAL_IO_PROTOCOL member functions.
-
- @param ControlMask
- A mask for the Control bits that the device supports. The device
- must always support the Input Buffer Empty control bit.
-
- @param TimeOut
- If applicable, the number of microseconds to wait before timing out
- a Read or Write operation.
-
- @param BaudRate
- If applicable, the current baud rate setting of the device; otherwise,
- baud rate has the value of zero to indicate that device runs at the
- device's designed speed.
-
- @param ReceiveFifoDepth
- The number of characters the device will buffer on input
-
- @param DataBits
- The number of characters the device will buffer on input
-
- @param Parity
- If applicable, this is the EFI_PARITY_TYPE that is computed or
- checked as each character is transmitted or reveived. If the device
- does not support parity the value is the default parity value.
-
- @param StopBits
- If applicable, the EFI_STOP_BITS_TYPE number of stop bits per
- character. If the device does not support stop bits the value is
- the default stop bit values.
-
-**/
-typedef struct {
- UINT32 ControlMask;
-
- //
- // current Attributes
- //
- UINT32 Timeout;
- UINT64 BaudRate;
- UINT32 ReceiveFifoDepth;
- UINT32 DataBits;
- UINT32 Parity;
- UINT32 StopBits;
-} EFI_SERIAL_IO_MODE;
-
-#define EFI_SERIAL_IO_PROTOCOL_REVISION 0x00010000
-#define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION
-
-///
-/// The Serial I/O protocol is used to communicate with UART-style serial devices.
-/// These can be standard UART serial ports in PC-AT systems, serial ports attached
-/// to a USB interface, or potentially any character-based I/O device.
-///
-struct _EFI_SERIAL_IO_PROTOCOL {
- ///
- /// The revision to which the EFI_SERIAL_IO_PROTOCOL adheres. All future revisions
- /// must be backwards compatible. If a future version is not backwards compatible,
- /// it is not the same GUID.
- ///
- UINT32 Revision;
- EFI_SERIAL_RESET Reset;
- EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
- EFI_SERIAL_SET_CONTROL_BITS SetControl;
- EFI_SERIAL_GET_CONTROL_BITS GetControl;
- EFI_SERIAL_WRITE Write;
- EFI_SERIAL_READ Read;
- ///
- /// Pointer to SERIAL_IO_MODE data.
- ///
- EFI_SERIAL_IO_MODE *Mode;
-};
-
-extern EFI_GUID gEfiSerialIoProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h b/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h
index 2faa668f3..2b521a9de 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h
@@ -9,7 +9,7 @@
MCast - MultiCast
...
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+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
@@ -123,25 +123,6 @@ typedef struct {
///
UINT64 UnsupportedProtocol;
- ///
- /// Number of valid frames received that were duplicated.
- ///
- UINT64 RxDuplicatedFrames;
-
- ///
- /// Number of encrypted frames received that failed to decrypt.
- ///
- UINT64 RxDecryptErrorFrames;
-
- ///
- /// Number of frames that failed to transmit after exceeding the retry limit.
- ///
- UINT64 TxErrorFrames;
-
- ///
- /// Number of frames transmitted successfully after more than one attempt.
- ///
- UINT64 TxRetryFrames;
} EFI_NETWORK_STATISTICS;
///
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/SimplePointer.h b/roms/ipxe/src/include/ipxe/efi/Protocol/SimplePointer.h
deleted file mode 100644
index 3b1e3057b..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/SimplePointer.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/** @file
- Simple Pointer protocol from the UEFI 2.0 specification.
-
- Abstraction of a very simple pointer device like a mouse or trackball.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __SIMPLE_POINTER_H__
-#define __SIMPLE_POINTER_H__
-
-FILE_LICENCE ( BSD3 );
-
-#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
- { \
- 0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
- }
-
-typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL;
-
-//
-// Data structures
-//
-typedef struct {
- ///
- /// The signed distance in counts that the pointer device has been moved along the x-axis.
- ///
- INT32 RelativeMovementX;
- ///
- /// The signed distance in counts that the pointer device has been moved along the y-axis.
- ///
- INT32 RelativeMovementY;
- ///
- /// The signed distance in counts that the pointer device has been moved along the z-axis.
- ///
- INT32 RelativeMovementZ;
- ///
- /// If TRUE, then the left button of the pointer device is being
- /// pressed. If FALSE, then the left button of the pointer device is not being pressed.
- ///
- BOOLEAN LeftButton;
- ///
- /// If TRUE, then the right button of the pointer device is being
- /// pressed. If FALSE, then the right button of the pointer device is not being pressed.
- ///
- BOOLEAN RightButton;
-} EFI_SIMPLE_POINTER_STATE;
-
-typedef struct {
- ///
- /// The resolution of the pointer device on the x-axis in counts/mm.
- /// If 0, then the pointer device does not support an x-axis.
- ///
- UINT64 ResolutionX;
- ///
- /// The resolution of the pointer device on the y-axis in counts/mm.
- /// If 0, then the pointer device does not support an x-axis.
- ///
- UINT64 ResolutionY;
- ///
- /// The resolution of the pointer device on the z-axis in counts/mm.
- /// If 0, then the pointer device does not support an x-axis.
- ///
- UINT64 ResolutionZ;
- ///
- /// TRUE if a left button is present on the pointer device. Otherwise FALSE.
- ///
- BOOLEAN LeftButton;
- ///
- /// TRUE if a right button is present on the pointer device. Otherwise FALSE.
- ///
- BOOLEAN RightButton;
-} EFI_SIMPLE_POINTER_MODE;
-
-/**
- Resets the pointer device hardware.
-
- @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
- instance.
- @param ExtendedVerification Indicates that the driver may perform a more exhaustive
- verification operation of the device during reset.
-
- @retval EFI_SUCCESS The device was reset.
- @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_POINTER_RESET)(
- IN EFI_SIMPLE_POINTER_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- );
-
-/**
- Retrieves the current state of a pointer device.
-
- @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL
- instance.
- @param State A pointer to the state information on the pointer device.
-
- @retval EFI_SUCCESS The state of the pointer device was returned in State.
- @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to
- GetState().
- @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's
- current state.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)(
- IN EFI_SIMPLE_POINTER_PROTOCOL *This,
- IN OUT EFI_SIMPLE_POINTER_STATE *State
- );
-
-///
-/// The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer
-/// device that can use used as an input device from an application written
-/// to this specification. The services include the ability to reset the
-/// pointer device, retrieve get the state of the pointer device, and
-/// retrieve the capabilities of the pointer device.
-///
-struct _EFI_SIMPLE_POINTER_PROTOCOL {
- EFI_SIMPLE_POINTER_RESET Reset;
- EFI_SIMPLE_POINTER_GET_STATE GetState;
- ///
- /// Event to use with WaitForEvent() to wait for input from the pointer device.
- ///
- EFI_EVENT WaitForInput;
- ///
- /// Pointer to EFI_SIMPLE_POINTER_MODE data.
- ///
- EFI_SIMPLE_POINTER_MODE *Mode;
-};
-
-extern EFI_GUID gEfiSimplePointerProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h b/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h
index 8aa36c35a..a79cf431c 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h
@@ -6,7 +6,7 @@
a single hardware device or a virtual device that is an aggregation
of multiple physical devices.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+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
@@ -117,7 +117,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
#define EFI_BROWN (EFI_GREEN | EFI_RED)
#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
#define EFI_BRIGHT 0x08
-#define EFI_DARKGRAY (EFI_BLACK | EFI_BRIGHT)
+#define EFI_DARKGRAY (EFI_BRIGHT)
#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
@@ -126,18 +126,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE;
#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
-//
-// Macro to accept color values in their raw form to create
-// a value that represents both a foreground and background
-// color in a single byte.
-// For Foreground, and EFI_* value is valid from EFI_BLACK(0x00) to
-// EFI_WHITE (0x0F).
-// For Background, only EFI_BLACK, EFI_BLUE, EFI_GREEN, EFI_CYAN,
-// EFI_RED, EFI_MAGENTA, EFI_BROWN, and EFI_LIGHTGRAY are acceptable
-//
-// Do not use EFI_BACKGROUND_xxx values with this macro.
-//
-#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4))
+#define EFI_TEXT_ATTR(f, b) ((f) | ((b) << 4))
#define EFI_BACKGROUND_BLACK 0x00
#define EFI_BACKGROUND_BLUE 0x10
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h b/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h
index 86c69a84e..1068448f0 100644
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h
+++ b/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h
@@ -1,8 +1,8 @@
/** @file
- TCG Service Protocol as defined in TCG_EFI_Protocol_1_22_Final
+ TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final
See http://trustedcomputinggroup.org for the latest specification
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+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
@@ -44,6 +44,12 @@ typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY {
typedef UINT32 TCG_ALGORITHM_ID;
+///
+/// Note:
+/// Status codes returned for functions of EFI_TCG_PROTOCOL do not exactly match
+/// those defined in the TCG EFI Protocol 1.20 Final Specification.
+///
+
/**
This service provides EFI protocol capability information, state information
about the TPM, and Event Log state information.
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/UgaDraw.h b/roms/ipxe/src/include/ipxe/efi/Protocol/UgaDraw.h
deleted file mode 100644
index 565020688..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/UgaDraw.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/** @file
- UGA Draw protocol from the EFI 1.10 specification.
-
- Abstraction of a very simple graphics device.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __UGA_DRAW_H__
-#define __UGA_DRAW_H__
-
-FILE_LICENCE ( BSD3 );
-
-
-#define EFI_UGA_DRAW_PROTOCOL_GUID \
- { \
- 0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \
- }
-
-typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
-
-/**
- Return the current video mode information.
-
- @param This The EFI_UGA_DRAW_PROTOCOL instance.
- @param HorizontalResolution The size of video screen in pixels in the X dimension.
- @param VerticalResolution The size of video screen in pixels in the Y dimension.
- @param ColorDepth Number of bits per pixel, currently defined to be 32.
- @param RefreshRate The refresh rate of the monitor in Hertz.
-
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE)(
- IN EFI_UGA_DRAW_PROTOCOL *This,
- OUT UINT32 *HorizontalResolution,
- OUT UINT32 *VerticalResolution,
- OUT UINT32 *ColorDepth,
- OUT UINT32 *RefreshRate
- );
-
-/**
- Set the current video mode information.
-
- @param This The EFI_UGA_DRAW_PROTOCOL instance.
- @param HorizontalResolution The size of video screen in pixels in the X dimension.
- @param VerticalResolution The size of video screen in pixels in the Y dimension.
- @param ColorDepth Number of bits per pixel, currently defined to be 32.
- @param RefreshRate The refresh rate of the monitor in Hertz.
-
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE)(
- IN EFI_UGA_DRAW_PROTOCOL *This,
- IN UINT32 HorizontalResolution,
- IN UINT32 VerticalResolution,
- IN UINT32 ColorDepth,
- IN UINT32 RefreshRate
- );
-
-typedef struct {
- UINT8 Blue;
- UINT8 Green;
- UINT8 Red;
- UINT8 Reserved;
-} EFI_UGA_PIXEL;
-
-typedef union {
- EFI_UGA_PIXEL Pixel;
- UINT32 Raw;
-} EFI_UGA_PIXEL_UNION;
-
-///
-/// Enumration value for actions of Blt operations.
-///
-typedef enum {
- EfiUgaVideoFill, ///< 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.
-
- EfiUgaVideoToBltBuffer, ///< 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.
-
- EfiUgaBltBufferToVideo, ///< 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.
-
- EfiUgaVideoToVideo, ///< Copy from the video display rectangle (SourceX, SourceY)
- ///< (SourceX + Width, SourceY + Height) .to the video display rectangle
- ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
- ///< The BltBuffer and Delta are not used in this mode.
-
- EfiUgaBltMax ///< Maxmimum value for enumration value of Blt operation. If a Blt operation
- ///< larger or equal to this enumration value, it is invalid.
-} EFI_UGA_BLT_OPERATION;
-
-/**
- Blt a rectangle of pixels on the graphics screen.
-
- @param[in] This - Protocol instance pointer.
- @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.
- @param[in] SourceY - Y coordinate of source for the BltBuffer.
- @param[in] DestinationX - X coordinate of destination for the BltBuffer.
- @param[in] DestinationY - Y coordinate of destination for the BltBuffer.
- @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 occured writting to the video buffer.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)(
- IN EFI_UGA_DRAW_PROTOCOL * This,
- IN EFI_UGA_PIXEL * BltBuffer, OPTIONAL
- IN EFI_UGA_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta OPTIONAL
- );
-
-///
-/// This protocol provides a basic abstraction to set video modes and
-/// copy pixels to and from the graphics controller's frame buffer.
-///
-struct _EFI_UGA_DRAW_PROTOCOL {
- EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode;
- EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode;
- EFI_UGA_DRAW_PROTOCOL_BLT Blt;
-};
-
-extern EFI_GUID gEfiUgaDrawProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/UnicodeCollation.h b/roms/ipxe/src/include/ipxe/efi/Protocol/UnicodeCollation.h
deleted file mode 100644
index 870428c2b..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/UnicodeCollation.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/** @file
- Unicode Collation protocol that follows the UEFI 2.0 specification.
- This protocol is used to allow code running in the boot services environment
- to perform lexical comparison functions on Unicode strings for given languages.
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
-The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __UNICODE_COLLATION_H__
-#define __UNICODE_COLLATION_H__
-
-FILE_LICENCE ( BSD3 );
-
-#define EFI_UNICODE_COLLATION_PROTOCOL_GUID \
- { \
- 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
- }
-
-#define EFI_UNICODE_COLLATION_PROTOCOL2_GUID \
- { \
- 0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 } \
- }
-
-typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL;
-
-
-///
-/// Protocol GUID name defined in EFI1.1.
-///
-#define UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL_GUID
-
-///
-/// Protocol defined in EFI1.1.
-///
-typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE;
-
-///
-/// Protocol data structures and defines
-///
-#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff)
-
-//
-// Protocol member functions
-//
-/**
- Performs a case-insensitive comparison of two Null-terminated strings.
-
- @param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
- @param Str1 A pointer to a Null-terminated string.
- @param Str2 A pointer to a Null-terminated string.
-
- @retval 0 Str1 is equivalent to Str2.
- @retval >0 Str1 is lexically greater than Str2.
- @retval <0 Str1 is lexically less than Str2.
-
-**/
-typedef
-INTN
-(EFIAPI *EFI_UNICODE_COLLATION_STRICOLL)(
- IN EFI_UNICODE_COLLATION_PROTOCOL *This,
- IN CHAR16 *Str1,
- IN CHAR16 *Str2
- );
-
-/**
- Performs a case-insensitive comparison of a Null-terminated
- pattern string and a Null-terminated string.
-
- @param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
- @param String A pointer to a Null-terminated string.
- @param Pattern A pointer to a Null-terminated pattern string.
-
- @retval TRUE Pattern was found in String.
- @retval FALSE Pattern was not found in String.
-
-**/
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_COLLATION_METAIMATCH)(
- IN EFI_UNICODE_COLLATION_PROTOCOL *This,
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- );
-
-/**
- Converts all the characters in a Null-terminated string to
- lower case characters.
-
- @param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
- @param String A pointer to a Null-terminated string.
-
-**/
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_COLLATION_STRLWR)(
- IN EFI_UNICODE_COLLATION_PROTOCOL *This,
- IN OUT CHAR16 *Str
- );
-
-/**
- Converts all the characters in a Null-terminated string to upper
- case characters.
-
- @param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
- @param String A pointer to a Null-terminated string.
-
-**/
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_COLLATION_STRUPR)(
- IN EFI_UNICODE_COLLATION_PROTOCOL *This,
- IN OUT CHAR16 *Str
- );
-
-/**
- Converts an 8.3 FAT file name in an OEM character set to a Null-terminated
- string.
-
- @param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
- @param FatSize The size of the string Fat in bytes.
- @param Fat A pointer to a Null-terminated string that contains an 8.3 file
- name using an 8-bit OEM character set.
- @param String A pointer to a Null-terminated string. The string must
- be allocated in advance to hold FatSize characters.
-
-**/
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_COLLATION_FATTOSTR)(
- IN EFI_UNICODE_COLLATION_PROTOCOL *This,
- IN UINTN FatSize,
- IN CHAR8 *Fat,
- OUT CHAR16 *String
- );
-
-/**
- Converts a Null-terminated string to legal characters in a FAT
- filename using an OEM character set.
-
- @param This A pointer to the EFI_UNICODE_COLLATION_PROTOCOL instance.
- @param String A pointer to a Null-terminated string.
- @param FatSize The size of the string Fat in bytes.
- @param Fat A pointer to a string that contains the converted version of
- String using legal FAT characters from an OEM character set.
-
- @retval TRUE One or more conversions failed and were substituted with '_'
- @retval FALSE None of the conversions failed.
-
-**/
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_COLLATION_STRTOFAT)(
- IN EFI_UNICODE_COLLATION_PROTOCOL *This,
- IN CHAR16 *String,
- IN UINTN FatSize,
- OUT CHAR8 *Fat
- );
-
-///
-/// The EFI_UNICODE_COLLATION_PROTOCOL is used to perform case-insensitive
-/// comparisons of strings.
-///
-struct _EFI_UNICODE_COLLATION_PROTOCOL {
- EFI_UNICODE_COLLATION_STRICOLL StriColl;
- EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch;
- EFI_UNICODE_COLLATION_STRLWR StrLwr;
- EFI_UNICODE_COLLATION_STRUPR StrUpr;
-
- //
- // for supporting fat volumes
- //
- EFI_UNICODE_COLLATION_FATTOSTR FatToStr;
- EFI_UNICODE_COLLATION_STRTOFAT StrToFat;
-
- ///
- /// A Null-terminated ASCII string array that contains one or more language codes.
- /// When this field is used for UnicodeCollation2, it is specified in RFC 4646 format.
- /// When it is used for UnicodeCollation, it is specified in ISO 639-2 format.
- ///
- CHAR8 *SupportedLanguages;
-};
-
-extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
-extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/Usb2HostController.h b/roms/ipxe/src/include/ipxe/efi/Protocol/Usb2HostController.h
deleted file mode 100644
index 8308e8f1b..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/Usb2HostController.h
+++ /dev/null
@@ -1,666 +0,0 @@
-/** @file
- EFI_USB2_HC_PROTOCOL as defined in UEFI 2.0.
- The USB Host Controller Protocol is used by code, typically USB bus drivers,
- running in the EFI boot services environment, to perform data transactions over
- a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.
-
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _USB2_HOSTCONTROLLER_H_
-#define _USB2_HOSTCONTROLLER_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/Protocol/UsbIo.h>
-
-#define EFI_USB2_HC_PROTOCOL_GUID \
- { \
- 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \
- }
-
-///
-/// Forward reference for pure ANSI compatability
-///
-typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL;
-
-
-typedef struct {
- UINT16 PortStatus; ///< Contains current port status bitmap.
- UINT16 PortChangeStatus; ///< Contains current port status change bitmap.
-} EFI_USB_PORT_STATUS;
-
-///
-/// EFI_USB_PORT_STATUS.PortStatus bit definition
-///
-#define USB_PORT_STAT_CONNECTION 0x0001
-#define USB_PORT_STAT_ENABLE 0x0002
-#define USB_PORT_STAT_SUSPEND 0x0004
-#define USB_PORT_STAT_OVERCURRENT 0x0008
-#define USB_PORT_STAT_RESET 0x0010
-#define USB_PORT_STAT_POWER 0x0100
-#define USB_PORT_STAT_LOW_SPEED 0x0200
-#define USB_PORT_STAT_HIGH_SPEED 0x0400
-#define USB_PORT_STAT_SUPER_SPEED 0x0800
-#define USB_PORT_STAT_OWNER 0x2000
-
-///
-/// EFI_USB_PORT_STATUS.PortChangeStatus bit definition
-///
-#define USB_PORT_STAT_C_CONNECTION 0x0001
-#define USB_PORT_STAT_C_ENABLE 0x0002
-#define USB_PORT_STAT_C_SUSPEND 0x0004
-#define USB_PORT_STAT_C_OVERCURRENT 0x0008
-#define USB_PORT_STAT_C_RESET 0x0010
-
-
-///
-/// Usb port features value
-/// Each value indicates its bit index in the port status and status change bitmaps,
-/// if combines these two bitmaps into a 32-bit bitmap.
-///
-typedef enum {
- EfiUsbPortEnable = 1,
- EfiUsbPortSuspend = 2,
- EfiUsbPortReset = 4,
- EfiUsbPortPower = 8,
- EfiUsbPortOwner = 13,
- EfiUsbPortConnectChange = 16,
- EfiUsbPortEnableChange = 17,
- EfiUsbPortSuspendChange = 18,
- EfiUsbPortOverCurrentChange = 19,
- EfiUsbPortResetChange = 20
-} EFI_USB_PORT_FEATURE;
-
-#define EFI_USB_SPEED_FULL 0x0000 ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC.
-#define EFI_USB_SPEED_LOW 0x0001 ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC.
-#define EFI_USB_SPEED_HIGH 0x0002 ///< 480 Mb/s, USB 2.0 EHCI HC.
-#define EFI_USB_SPEED_SUPER 0x0003 ///< 4.8 Gb/s, USB 3.0 XHCI HC.
-
-typedef struct {
- UINT8 TranslatorHubAddress; ///< device address
- UINT8 TranslatorPortNumber; ///< the port number of the hub that device is connected to.
-} EFI_USB2_HC_TRANSACTION_TRANSLATOR;
-
-//
-// Protocol definitions
-//
-
-/**
- Retrieves the Host Controller capabilities.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param MaxSpeed Host controller data transfer speed.
- @param PortNumber Number of the root hub ports.
- @param Is64BitCapable TRUE if controller supports 64-bit memory addressing,
- FALSE otherwise.
-
- @retval EFI_SUCCESS The host controller capabilities were retrieved successfully.
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
- @retval EFI_DEVICE_ERROR An error was encountered while attempting to
- retrieve the capabilities.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_CAPABILITY)(
- IN EFI_USB2_HC_PROTOCOL *This,
- OUT UINT8 *MaxSpeed,
- OUT UINT8 *PortNumber,
- OUT UINT8 *Is64BitCapable
- );
-
-#define EFI_USB_HC_RESET_GLOBAL 0x0001
-#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
-#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
-#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
-/**
- Provides software reset for the USB host controller.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param Attributes A bit mask of the reset operation to perform.
-
- @retval EFI_SUCCESS The reset operation succeeded.
- @retval EFI_INVALID_PARAMETER Attributes is not valid.
- @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently
- supported by the host controller hardware.
- @retval EFI_ACCESS_DENIED Reset operation is rejected due to the debug port being configured
- and active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or
- EFI_USB_HC_RESET_HOST_WITH_DEBUG reset Attributes can be used to
- perform reset operation for this host controller.
- @retval EFI_DEVICE_ERROR An error was encountered while attempting to
- retrieve the capabilities.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_RESET)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT16 Attributes
- );
-
-/**
- Enumration value for status of USB HC.
-**/
-typedef enum {
- EfiUsbHcStateHalt, ///< The host controller is in halt
- ///< state. No USB transactions can occur
- ///< while in this state. The host
- ///< controller can enter this state for
- ///< three reasons: 1) After host
- ///< controller hardware reset. 2)
- ///< Explicitly set by software. 3)
- ///< Triggered by a fatal error such as
- ///< consistency check failure.
-
- EfiUsbHcStateOperational, ///< The host controller is in an
- ///< operational state. When in
- ///< this state, the host
- ///< controller can execute bus
- ///< traffic. This state must be
- ///< explicitly set to enable the
- ///< USB bus traffic.
-
- EfiUsbHcStateSuspend, ///< The host controller is in the
- ///< suspend state. No USB
- ///< transactions can occur while in
- ///< this state. The host controller
- ///< enters this state for the
- ///< following reasons: 1) Explicitly
- ///< set by software. 2) Triggered
- ///< when there is no bus traffic for
- ///< 3 microseconds.
-
- EfiUsbHcStateMaximum ///< Maximum value for enumration value of HC status.
-} EFI_USB_HC_STATE;
-
-/**
- Retrieves current state of the USB host controller.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param State A pointer to the EFI_USB_HC_STATE data structure that
- indicates current state of the USB host controller.
-
- @retval EFI_SUCCESS The state information of the host controller was returned in State.
- @retval EFI_INVALID_PARAMETER State is NULL.
- @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the
- host controller's current state.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE)(
- IN EFI_USB2_HC_PROTOCOL *This,
- OUT EFI_USB_HC_STATE *State
-);
-
-/**
- Sets the USB host controller to a specific state.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param State Indicates the state of the host controller that will be set.
-
- @retval EFI_SUCCESS The USB host controller was successfully placed in the state
- specified by State.
- @retval EFI_INVALID_PARAMETER State is not valid.
- @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_SET_STATE)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN EFI_USB_HC_STATE State
- );
-
-/**
- Submits control transfer to a target USB device.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB.
- @param DeviceSpeed Indicates device speed.
- @param MaximumPacketLength Indicates the maximum packet size that the default control transfer
- endpoint is capable of sending or receiving.
- @param Request A pointer to the USB device request that will be sent to the USB device.
- @param TransferDirection Specifies the data direction for the transfer. There are three values
- available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.
- @param Data A pointer to the buffer of data that will be transmitted to USB device or
- received from USB device.
- @param DataLength On input, indicates the size, in bytes, of the data buffer specified by Data.
- On output, indicates the amount of data actually transferred.
- @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is
- allowed to complete.
- @param Translator A pointer to the transaction translator data.
- @param TransferResult A pointer to the detailed result information generated by this control
- transfer.
-
- @retval EFI_SUCCESS The control transfer was completed successfully.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.
- @retval EFI_TIMEOUT The control transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error.
- Caller should check TransferResult for detailed error information.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 DeviceSpeed,
- IN UINTN MaximumPacketLength,
- IN EFI_USB_DEVICE_REQUEST *Request,
- IN EFI_USB_DATA_DIRECTION TransferDirection,
- IN OUT VOID *Data OPTIONAL,
- IN OUT UINTN *DataLength OPTIONAL,
- IN UINTN TimeOut,
- IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
- OUT UINT32 *TransferResult
- );
-
-#define EFI_USB_MAX_BULK_BUFFER_NUM 10
-
-/**
- Submits bulk transfer to a bulk endpoint of a USB device.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB.
- @param EndPointAddress The combination of an endpoint number and an endpoint direction of the
- target USB device.
- @param DeviceSpeed Indicates device speed.
- @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of
- sending or receiving.
- @param DataBuffersNumber Number of data buffers prepared for the transfer.
- @param Data Array of pointers to the buffers of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength When input, indicates the size, in bytes, of the data buffers specified by
- Data. When output, indicates the actually transferred data size.
- @param DataToggle A pointer to the data toggle value.
- @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is
- allowed to complete.
- @param Translator A pointer to the transaction translator data.
- @param TransferResult A pointer to the detailed result information of the bulk transfer.
-
- @retval EFI_SUCCESS The bulk transfer was completed successfully.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be submitted due to a lack of resources.
- @retval EFI_TIMEOUT The bulk transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.
- Caller should check TransferResult for detailed error information.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_BULK_TRANSFER)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 DeviceSpeed,
- IN UINTN MaximumPacketLength,
- IN UINT8 DataBuffersNumber,
- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
- IN OUT UINTN *DataLength,
- IN OUT UINT8 *DataToggle,
- IN UINTN TimeOut,
- IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
- OUT UINT32 *TransferResult
- );
-
-/**
- Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
- Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB.
- @param EndPointAddress The combination of an endpoint number and an endpoint direction of the
- target USB device.
- @param DeviceSpeed Indicates device speed.
- @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of
- sending or receiving.
- @param IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between the host and the
- target interrupt endpoint. If FALSE, the specified asynchronous interrupt
- pipe is canceled. If TRUE, and an interrupt transfer exists for the target
- end point, then EFI_INVALID_PARAMETER is returned.
- @param DataToggle A pointer to the data toggle value.
- @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous interrupt
- transfer is polled.
- @param DataLength Indicates the length of data to be received at the rate specified by
- PollingInterval from the target asynchronous interrupt endpoint.
- @param Translator A pointr to the transaction translator data.
- @param CallBackFunction The Callback function. This function is called at the rate specified by
- PollingInterval.
- @param Context The context that is passed to the CallBackFunction. This is an
- optional parameter and may be NULL.
-
- @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully
- submitted or canceled.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 DeviceSpeed,
- IN UINTN MaxiumPacketLength,
- IN BOOLEAN IsNewTransfer,
- IN OUT UINT8 *DataToggle,
- IN UINTN PollingInterval OPTIONAL,
- IN UINTN DataLength OPTIONAL,
- IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator OPTIONAL,
- IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,
- IN VOID *Context OPTIONAL
- );
-
-/**
- Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.
- Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB.
- @param EndPointAddress The combination of an endpoint number and an endpoint direction of the
- target USB device.
- @param DeviceSpeed Indicates device speed.
- @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of
- sending or receiving.
- @param Data A pointer to the buffer of data that will be transmitted to USB device or
- received from USB device.
- @param DataLength On input, the size, in bytes, of the data buffer specified by Data. On
- output, the number of bytes transferred.
- @param DataToggle A pointer to the data toggle value.
- @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is
- allowed to complete.
- @param Translator A pointr to the transaction translator data.
- @param TransferResult A pointer to the detailed result information from the synchronous
- interrupt transfer.
-
- @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The synchronous interrupt transfer could not be submitted due to a lack of resources.
- @retval EFI_TIMEOUT The synchronous interrupt transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The synchronous interrupt transfer failed due to host controller or device error.
- Caller should check TransferResult for detailed error information.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 DeviceSpeed,
- IN UINTN MaximumPacketLength,
- IN OUT VOID *Data,
- IN OUT UINTN *DataLength,
- IN OUT UINT8 *DataToggle,
- IN UINTN TimeOut,
- IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
- OUT UINT32 *TransferResult
- );
-
-#define EFI_USB_MAX_ISO_BUFFER_NUM 7
-#define EFI_USB_MAX_ISO_BUFFER_NUM1 2
-
-/**
- Submits isochronous transfer to an isochronous endpoint of a USB device.
-
- This function is used to submit isochronous transfer to a target endpoint of a USB device.
- The target endpoint is specified by DeviceAddressand EndpointAddress. Isochronous transfers are
- used when working with isochronous date. It provides periodic, continuous communication between
- the host and a device. Isochronous transfers can beused only by full-speed, high-speed, and
- super-speed devices.
-
- High-speed isochronous transfers can be performed using multiple data buffers. The number of
- buffers that are actually prepared for the transfer is specified by DataBuffersNumber. For
- full-speed isochronous transfers this value is ignored.
-
- Data represents a list of pointers to the data buffers. For full-speed isochronous transfers
- only the data pointed by Data[0]shall be used. For high-speed isochronous transfers and for
- the split transactions depending on DataLengththere several data buffers canbe used. For the
- high-speed isochronous transfers the total number of buffers must not exceed EFI_USB_MAX_ISO_BUFFER_NUM.
-
- For split transactions performed on full-speed device by high-speed host controller the total
- number of buffers is limited to EFI_USB_MAX_ISO_BUFFER_NUM1.
- If the isochronous transfer is successful, then EFI_SUCCESSis returned. The isochronous transfer
- is designed to be completed within one USB frame time, if it cannot be completed, EFI_TIMEOUT
- is returned. If an error other than timeout occurs during the USB transfer, then EFI_DEVICE_ERROR
- is returned and the detailed status code will be returned in TransferResult.
-
- EFI_INVALID_PARAMETERis returned if one of the following conditionsis satisfied:
- - Data is NULL.
- - DataLength is 0.
- - DeviceSpeed is not one of the supported values listed above.
- - MaximumPacketLength is invalid. MaximumPacketLength must be 1023 or less for full-speed devices,
- and 1024 or less for high-speed and super-speed devices.
- - TransferResult is NULL.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB.
- @param EndPointAddress The combination of an endpoint number and an endpoint direction of the
- target USB device.
- @param DeviceSpeed Indicates device speed. The supported values are EFI_USB_SPEED_FULL,
- EFI_USB_SPEED_HIGH, or EFI_USB_SPEED_SUPER.
- @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of
- sending or receiving.
- @param DataBuffersNumber Number of data buffers prepared for the transfer.
- @param Data Array of pointers to the buffers of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength Specifies the length, in bytes, of the data to be sent to or received from
- the USB device.
- @param Translator A pointer to the transaction translator data.
- @param TransferResult A pointer to the detailed result information of the isochronous transfer.
-
- @retval EFI_SUCCESS The isochronous transfer was completed successfully.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The isochronous transfer could not be submitted due to a lack of resources.
- @retval EFI_TIMEOUT The isochronous transfer cannot be completed within the one USB frame time.
- @retval EFI_DEVICE_ERROR The isochronous transfer failed due to host controller or device error.
- Caller should check TransferResult for detailed error information.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 DeviceSpeed,
- IN UINTN MaximumPacketLength,
- IN UINT8 DataBuffersNumber,
- IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
- IN UINTN DataLength,
- IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
- OUT UINT32 *TransferResult
- );
-
-/**
- Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.
-
- This is an asynchronous type of USB isochronous transfer. If the caller submits a USB
- isochronous transfer request through this function, this function will return immediately.
-
- When the isochronous transfer completes, the IsochronousCallbackfunction will be triggered,
- the caller can know the transfer results. If the transfer is successful, the caller can get
- the data received or sent in this callback function.
-
- The target endpoint is specified by DeviceAddressand EndpointAddress. Isochronous transfers
- are used when working with isochronous date. It provides periodic, continuous communication
- between the host and a device. Isochronous transfers can be used only by full-speed, high-speed,
- and super-speed devices.
-
- High-speed isochronous transfers can be performed using multiple data buffers. The number of
- buffers that are actually prepared for the transfer is specified by DataBuffersNumber. For
- full-speed isochronous transfers this value is ignored.
-
- Data represents a list of pointers to the data buffers. For full-speed isochronous transfers
- only the data pointed by Data[0] shall be used. For high-speed isochronous transfers and for
- the split transactions depending on DataLength there several data buffers can be used. For
- the high-speed isochronous transfers the total number of buffers must not exceed EFI_USB_MAX_ISO_BUFFER_NUM.
-
- For split transactions performed on full-speed device by high-speed host controller the total
- number of buffers is limited to EFI_USB_MAX_ISO_BUFFER_NUM1.
-
- EFI_INVALID_PARAMETER is returned if one of the following conditionsis satisfied:
- - Data is NULL.
- - DataLength is 0.
- - DeviceSpeed is not one of the supported values listed above.
- - MaximumPacketLength is invalid. MaximumPacketLength must be 1023 or less for full-speed
- devices and 1024 or less for high-speed and super-speed devices.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB.
- @param EndPointAddress The combination of an endpoint number and an endpoint direction of the
- target USB device.
- @param DeviceSpeed Indicates device speed. The supported values are EFI_USB_SPEED_FULL,
- EFI_USB_SPEED_HIGH, or EFI_USB_SPEED_SUPER.
- @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of
- sending or receiving.
- @param DataBuffersNumber Number of data buffers prepared for the transfer.
- @param Data Array of pointers to the buffers of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength Specifies the length, in bytes, of the data to be sent to or received from
- the USB device.
- @param Translator A pointer to the transaction translator data.
- @param IsochronousCallback The Callback function. This function is called if the requested
- isochronous transfer is completed.
- @param Context Data passed to the IsochronousCallback function. This is an
- optional parameter and may be NULL.
-
- @retval EFI_SUCCESS The asynchronous isochronous transfer request has been successfully
- submitted or canceled.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous transfer could not be submitted due to
- a lack of resources.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 DeviceSpeed,
- IN UINTN MaximumPacketLength,
- IN UINT8 DataBuffersNumber,
- IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
- IN UINTN DataLength,
- IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
- IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
- IN VOID *Context OPTIONAL
- );
-
-/**
- Retrieves the current status of a USB root hub port.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param PortNumber Specifies the root hub port from which the status is to be retrieved.
- This value is zero based.
- @param PortStatus A pointer to the current port status bits and port status change bits.
-
- @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber
- was returned in PortStatus.
- @retval EFI_INVALID_PARAMETER PortNumber is invalid.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 PortNumber,
- OUT EFI_USB_PORT_STATUS *PortStatus
- );
-
-/**
- Sets a feature for the specified root hub port.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param PortNumber Specifies the root hub port whose feature is requested to be set. This
- value is zero based.
- @param PortFeature Indicates the feature selector associated with the feature set request.
-
- @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB
- root hub port specified by PortNumber.
- @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 PortNumber,
- IN EFI_USB_PORT_FEATURE PortFeature
- );
-
-/**
- Clears a feature for the specified root hub port.
-
- @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.
- @param PortNumber Specifies the root hub port whose feature is requested to be cleared. This
- value is zero based.
- @param PortFeature Indicates the feature selector associated with the feature clear request.
-
- @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB
- root hub port specified by PortNumber.
- @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(
- IN EFI_USB2_HC_PROTOCOL *This,
- IN UINT8 PortNumber,
- IN EFI_USB_PORT_FEATURE PortFeature
- );
-
-///
-/// The EFI_USB2_HC_PROTOCOL provides USB host controller management, basic
-/// data transactions over a USB bus, and USB root hub access. A device driver
-/// that wishes to manage a USB bus in a system retrieves the EFI_USB2_HC_PROTOCOL
-/// instance that is associated with the USB bus to be managed. A device handle
-/// for a USB host controller will minimally contain an EFI_DEVICE_PATH_PROTOCOL
-/// instance, and an EFI_USB2_HC_PROTOCOL instance.
-///
-struct _EFI_USB2_HC_PROTOCOL {
- EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability;
- EFI_USB2_HC_PROTOCOL_RESET Reset;
- EFI_USB2_HC_PROTOCOL_GET_STATE GetState;
- EFI_USB2_HC_PROTOCOL_SET_STATE SetState;
- EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;
- EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;
- EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;
- EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;
- EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;
- EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;
- EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;
- EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;
- EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;
-
- ///
- /// The major revision number of the USB host controller. The revision information
- /// indicates the release of the Universal Serial Bus Specification with which the
- /// host controller is compliant.
- ///
- UINT16 MajorRevision;
-
- ///
- /// The minor revision number of the USB host controller. The revision information
- /// indicates the release of the Universal Serial Bus Specification with which the
- /// host controller is compliant.
- ///
- UINT16 MinorRevision;
-};
-
-extern EFI_GUID gEfiUsb2HcProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/UsbHostController.h b/roms/ipxe/src/include/ipxe/efi/Protocol/UsbHostController.h
deleted file mode 100644
index a29088c6f..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/UsbHostController.h
+++ /dev/null
@@ -1,510 +0,0 @@
-/** @file
- EFI_USB_HC_PROTOCOL as defined in EFI 1.10.
-
- The USB Host Controller Protocol is used by code, typically USB bus drivers,
- running in the EFI boot services environment, to perform data transactions
- over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _USB_HOSTCONTROLLER_H_
-#define _USB_HOSTCONTROLLER_H_
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/Protocol/Usb2HostController.h>
-
-#define EFI_USB_HC_PROTOCOL_GUID \
- { \
- 0xf5089266, 0x1aa0, 0x4953, {0x97, 0xd8, 0x56, 0x2f, 0x8a, 0x73, 0xb5, 0x19 } \
- }
-
-///
-/// Forward reference for pure ANSI compatability
-///
-typedef struct _EFI_USB_HC_PROTOCOL EFI_USB_HC_PROTOCOL;
-
-//
-// Protocol definitions
-//
-
-/**
- Provides software reset for the USB host controller.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param Attributes A bit mask of the reset operation to perform.
-
- @retval EFI_SUCCESS The reset operation succeeded.
- @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently supported
- by the host controller hardware.
- @retval EFI_INVALID_PARAMETER Attributes is not valid.
- @retval EFI_DEVICE_ERROR An error was encountered while attempting to perform the reset operation.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_RESET)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT16 Attributes
- );
-
-/**
- Retrieves current state of the USB host controller.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param State A pointer to the EFI_USB_HC_STATE data structure that
- indicates current state of the USB host controller.
-
- @retval EFI_SUCCESS The state information of the host controller was returned in State.
- @retval EFI_INVALID_PARAMETER State is NULL.
- @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the host controller's
- current state.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_GET_STATE)(
- IN EFI_USB_HC_PROTOCOL *This,
- OUT EFI_USB_HC_STATE *State
- );
-
-/**
- Sets the USB host controller to a specific state.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param State Indicates the state of the host controller that will be set.
-
- @retval EFI_SUCCESS The USB host controller was successfully placed in the state specified by
- State.
- @retval EFI_INVALID_PARAMETER State is NULL.
- @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_SET_STATE)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN EFI_USB_HC_STATE State
- );
-
-/**
- Submits control transfer to a target USB device.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB, which is
- assigned during USB enumeration.
- @param IsSlowDevice Indicates whether the target device is slow device or full-speed
- device.
- @param MaximumPacketLength Indicates the maximum packet size that the default control
- transfer endpoint is capable of sending or receiving.
- @param Request A pointer to the USB device request that will be sent to the USB
- device.
- @param TransferDirection Specifies the data direction for the transfer. There are three
- values available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength On input, indicates the size, in bytes, of the data buffer specified
- by Data. On output, indicates the amount of data actually
- transferred.
- @param TimeOut Indicates the maximum time, in milliseconds, which the transfer
- is allowed to complete.
- @param TransferResult A pointer to the detailed result information generated by this
- control transfer.
-
- @retval EFI_SUCCESS The control transfer was completed successfully.
- @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_TIMEOUT The control transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN BOOLEAN IsSlowDevice,
- IN UINT8 MaximumPacketLength,
- IN EFI_USB_DEVICE_REQUEST *Request,
- IN EFI_USB_DATA_DIRECTION TransferDirection,
- IN OUT VOID *Data OPTIONAL,
- IN OUT UINTN *DataLength OPTIONAL,
- IN UINTN TimeOut,
- OUT UINT32 *TransferResult
- );
-
-/**
- Submits bulk transfer to a bulk endpoint of a USB device.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB, which is
- assigned during USB enumeration.
- @param EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the control
- endpoint (whose default endpoint address is 0). It is the
- caller's responsibility to make sure that the EndPointAddress
- represents a bulk endpoint.
- @param MaximumPacketLength Indicates the maximum packet size that the default control
- transfer endpoint is capable of sending or receiving.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength On input, indicates the size, in bytes, of the data buffer specified
- by Data. On output, indicates the amount of data actually
- transferred.
- @param DataToggle A pointer to the data toggle value.
- @param TimeOut Indicates the maximum time, in milliseconds, which the transfer
- is allowed to complete.
- @param TransferResult A pointer to the detailed result information of the bulk transfer.
-
- @retval EFI_SUCCESS The bulk transfer was completed successfully.
- @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be completed due to a lack of resources.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_TIMEOUT The bulk transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_BULK_TRANSFER)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 MaximumPacketLength,
- IN OUT VOID *Data,
- IN OUT UINTN *DataLength,
- IN OUT UINT8 *DataToggle,
- IN UINTN TimeOut,
- OUT UINT32 *TransferResult
- );
-
-/**
- Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB, which is
- assigned during USB enumeration.
- @param EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the control
- endpoint (whose default endpoint address is zero). It is the
- caller's responsibility to make sure that the
- EndPointAddress represents an interrupt endpoint.
- @param IsSlowDevice Indicates whether the target device is slow device or full-speed
- device.
- @param MaximumPacketLength Indicates the maximum packet size that the default control
- transfer endpoint is capable of sending or receiving.
- @param IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between the host
- and the target interrupt endpoint. If FALSE, the specified asynchronous
- interrupt pipe is canceled. If TRUE, and an interrupt transfer exists
- for the target end point, then EFI_INVALID_PARAMETER is returned.
- @param DataToggle A pointer to the data toggle value. On input, it is valid when
- IsNewTransfer is TRUE, and it indicates the initial data toggle
- value the asynchronous interrupt transfer should adopt. On output,
- it is valid when IsNewTransfer is FALSE, and it is updated to indicate
- the data toggle value of the subsequent asynchronous interrupt transfer.
- @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous
- interrupt transfer is polled.
- @param DataLength Indicates the length of data to be received at the rate specified by
- PollingInterval from the target asynchronous interrupt
- endpoint. This parameter is only required when IsNewTransfer is TRUE.
- @param CallBackFunction The Callback function. This function is called at the rate specified by
- PollingInterval. This parameter is only required when IsNewTransfer is TRUE.
- @param Context The context that is passed to the CallBackFunction.
-
- @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully
- submitted or canceled.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_TIMEOUT The bulk transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN BOOLEAN IsSlowDevice,
- IN UINT8 MaxiumPacketLength,
- IN BOOLEAN IsNewTransfer,
- IN OUT UINT8 *DataToggle,
- IN UINTN PollingInterval OPTIONAL,
- IN UINTN DataLength OPTIONAL,
- IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,
- IN VOID *Context OPTIONAL
- );
-
-/**
- Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB, which is
- assigned during USB enumeration.
- @param EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the control
- endpoint (whose default endpoint address is zero). It is the
- caller's responsibility to make sure that the
- EndPointAddress represents an interrupt endpoint.
- @param IsSlowDevice Indicates whether the target device is slow device or full-speed
- device.
- @param MaximumPacketLength Indicates the maximum packet size that the default control
- transfer endpoint is capable of sending or receiving.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device. asynchronous interrupt pipe is canceled.
- @param DataLength On input, the size, in bytes, of the data buffer specified by Data.
- On output, the number of bytes transferred.
- @param DataToggle A pointer to the data toggle value. On input, it indicates the initial
- data toggle value the synchronous interrupt transfer should adopt;
- on output, it is updated to indicate the data toggle value of the
- subsequent synchronous interrupt transfer.
- @param TimeOut Indicates the maximum time, in milliseconds, which the transfer
- is allowed to complete.
- @param TransferResult A pointer to the detailed result information from the synchronous
- interrupt transfer.
-
- @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_TIMEOUT The synchronous interrupt transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The synchronous interrupt transfer failed due to host controller or device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN BOOLEAN IsSlowDevice,
- IN UINT8 MaximumPacketLength,
- IN OUT VOID *Data,
- IN OUT UINTN *DataLength,
- IN OUT UINT8 *DataToggle,
- IN UINTN TimeOut,
- OUT UINT32 *TransferResult
- );
-
-/**
- Submits isochronous transfer to an isochronous endpoint of a USB device.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB, which is
- assigned during USB enumeration.
- @param EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the control
- endpoint (whose default endpoint address is 0). It is the caller's
- responsibility to make sure that the EndPointAddress
- represents an isochronous endpoint.
- @param MaximumPacketLength Indicates the maximum packet size that the default control
- transfer endpoint is capable of sending or receiving.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device. asynchronous interrupt pipe is canceled.
- @param DataLength Specifies the length, in bytes, of the data to be sent to or received
- from the USB device.
- @param TransferResult A pointer to the detailed result information from the isochronous
- transfer.
-
- @retval EFI_SUCCESS The isochronous transfer was completed successfully.
- @retval EFI_OUT_OF_RESOURCES The isochronous could not be completed due to a lack of resources.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
- @retval EFI_TIMEOUT The isochronous transfer failed due to timeout.
- @retval EFI_DEVICE_ERROR The isochronous transfer failed due to host controller or device error.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 MaximumPacketLength,
- IN OUT VOID *Data,
- IN UINTN DataLength,
- OUT UINT32 *TransferResult
- );
-
-/**
- Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param DeviceAddress Represents the address of the target device on the USB, which is
- assigned during USB enumeration.
- @param EndPointAddress The combination of an endpoint number and an endpoint
- direction of the target USB device. Each endpoint address
- supports data transfer in one direction except the control
- endpoint (whose default endpoint address is zero). It is the
- caller's responsibility to make sure that the
- EndPointAddress represents an isochronous endpoint.
- @param MaximumPacketLength Indicates the maximum packet size that the default control
- transfer endpoint is capable of sending or receiving. For isochronous
- endpoints, this value is used to reserve the bus time in the schedule,
- required for the perframe data payloads. The pipe may, on an ongoing basis,
- actually use less bandwidth than that reserved.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device. asynchronous interrupt pipe is canceled.
- @param DataLength Specifies the length, in bytes, of the data to be sent to or received
- from the USB device.
- @param IsochronousCallback The Callback function.This function is called if the requested
- isochronous transfer is completed.
- @param Context Data passed to the IsochronousCallback function. This is
- an optional parameter and may be NULL.
-
- @retval EFI_SUCCESS The asynchronous isochronous transfer was completed successfully.
- @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous could not be completed due to a lack of resources.
- @retval EFI_INVALID_PARAMETER Some parameters are invalid.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 DeviceAddress,
- IN UINT8 EndPointAddress,
- IN UINT8 MaximumPacketLength,
- IN OUT VOID *Data,
- IN UINTN DataLength,
- IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
- IN VOID *Context OPTIONAL
- );
-
-/**
- Retrieves the number of root hub ports.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param PortNumber A pointer to the number of the root hub ports.
-
- @retval EFI_SUCCESS The port number was retrieved successfully.
- @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the port number.
- @retval EFI_INVALID_PARAMETER PortNumber is NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER)(
- IN EFI_USB_HC_PROTOCOL *This,
- OUT UINT8 *PortNumber
- );
-
-/**
- Retrieves the current status of a USB root hub port.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param PortNumber Specifies the root hub port from which the status is to be retrieved.
- This value is zero based. For example, if a root hub has two ports,
- then the first port is numbered 0, and the second port is
- numbered 1.
- @param PortStatus A pointer to the current port status bits and port status change bits.
-
- @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber
- was returned in PortStatus.
- @retval EFI_INVALID_PARAMETER PortNumber is invalid.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 PortNumber,
- OUT EFI_USB_PORT_STATUS *PortStatus
- );
-
-/**
- Sets a feature for the specified root hub port.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param PortNumber Specifies the root hub port from which the status is to be retrieved.
- This value is zero based. For example, if a root hub has two ports,
- then the first port is numbered 0, and the second port is
- numbered 1.
- @param PortFeature Indicates the feature selector associated with the feature set
- request.
-
- @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB
- root hub port specified by PortNumber.
- @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 PortNumber,
- IN EFI_USB_PORT_FEATURE PortFeature
- );
-
-/**
- Clears a feature for the specified root hub port.
-
- @param This A pointer to the EFI_USB_HC_PROTOCOL instance.
- @param PortNumber Specifies the root hub port from which the status is to be retrieved.
- This value is zero based. For example, if a root hub has two ports,
- then the first port is numbered 0, and the second port is
- numbered 1.
- @param PortFeature Indicates the feature selector associated with the feature clear
- request.
-
- @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB
- root hub port specified by PortNumber.
- @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(
- IN EFI_USB_HC_PROTOCOL *This,
- IN UINT8 PortNumber,
- IN EFI_USB_PORT_FEATURE PortFeature
- );
-
-
-///
-/// The EFI_USB_HC_PROTOCOL provides USB host controller management, basic data transactions
-/// over a USB bus, and USB root hub access. A device driver that wishes to manage a USB bus in a
-/// system retrieves the EFI_USB_HC_PROTOCOL instance that is associated with the USB bus to be
-/// managed. A device handle for a USB host controller will minimally contain an
-/// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance.
-///
-struct _EFI_USB_HC_PROTOCOL {
- EFI_USB_HC_PROTOCOL_RESET Reset;
- EFI_USB_HC_PROTOCOL_GET_STATE GetState;
- EFI_USB_HC_PROTOCOL_SET_STATE SetState;
- EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;
- EFI_USB_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;
- EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;
- EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;
- EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;
- EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;
- EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER GetRootHubPortNumber;
- EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;
- EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;
- EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;
- ///
- /// The major revision number of the USB host controller. The revision information
- /// indicates the release of the Universal Serial Bus Specification with which the
- /// host controller is compliant.
- ///
- UINT16 MajorRevision;
- ///
- /// The minor revision number of the USB host controller. The revision information
- /// indicates the release of the Universal Serial Bus Specification with which the
- /// host controller is compliant.
- ///
- UINT16 MinorRevision;
-};
-
-extern EFI_GUID gEfiUsbHcProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Protocol/UsbIo.h b/roms/ipxe/src/include/ipxe/efi/Protocol/UsbIo.h
deleted file mode 100644
index b8d33ee0c..000000000
--- a/roms/ipxe/src/include/ipxe/efi/Protocol/UsbIo.h
+++ /dev/null
@@ -1,514 +0,0 @@
-/** @file
- EFI Usb I/O Protocol as defined in UEFI specification.
- This protocol is used by code, typically drivers, running in the EFI
- boot services environment to access USB devices like USB keyboards,
- mice and mass storage devices. In particular, functions for managing devices
- on USB buses are defined here.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef __USB_IO_H__
-#define __USB_IO_H__
-
-FILE_LICENCE ( BSD3 );
-
-#include <ipxe/efi/IndustryStandard/Usb.h>
-
-//
-// Global ID for the USB I/O Protocol
-//
-#define EFI_USB_IO_PROTOCOL_GUID \
- { \
- 0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \
- }
-
-typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL;
-
-//
-// Related Definition for EFI USB I/O protocol
-//
-
-//
-// USB standard descriptors and reqeust
-//
-typedef USB_DEVICE_REQUEST EFI_USB_DEVICE_REQUEST;
-typedef USB_DEVICE_DESCRIPTOR EFI_USB_DEVICE_DESCRIPTOR;
-typedef USB_CONFIG_DESCRIPTOR EFI_USB_CONFIG_DESCRIPTOR;
-typedef USB_INTERFACE_DESCRIPTOR EFI_USB_INTERFACE_DESCRIPTOR;
-typedef USB_ENDPOINT_DESCRIPTOR EFI_USB_ENDPOINT_DESCRIPTOR;
-
-///
-/// USB data transfer direction
-///
-typedef enum {
- EfiUsbDataIn,
- EfiUsbDataOut,
- EfiUsbNoData
-} EFI_USB_DATA_DIRECTION;
-
-//
-// USB Transfer Results
-//
-#define EFI_USB_NOERROR 0x00
-#define EFI_USB_ERR_NOTEXECUTE 0x01
-#define EFI_USB_ERR_STALL 0x02
-#define EFI_USB_ERR_BUFFER 0x04
-#define EFI_USB_ERR_BABBLE 0x08
-#define EFI_USB_ERR_NAK 0x10
-#define EFI_USB_ERR_CRC 0x20
-#define EFI_USB_ERR_TIMEOUT 0x40
-#define EFI_USB_ERR_BITSTUFF 0x80
-#define EFI_USB_ERR_SYSTEM 0x100
-
-/**
- Async USB transfer callback routine.
-
- @param Data Data received or sent via the USB Asynchronous Transfer, if the
- transfer completed successfully.
- @param DataLength The length of Data received or sent via the Asynchronous
- Transfer, if transfer successfully completes.
- @param Context Data passed from UsbAsyncInterruptTransfer() request.
- @param Status Indicates the result of the asynchronous transfer.
-
- @retval EFI_SUCCESS The asynchronous USB transfer request has been successfully executed.
- @retval EFI_DEVICE_ERROR The asynchronous USB transfer request failed.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ASYNC_USB_TRANSFER_CALLBACK)(
- IN VOID *Data,
- IN UINTN DataLength,
- IN VOID *Context,
- IN UINT32 Status
- );
-
-//
-// Prototype for EFI USB I/O protocol
-//
-
-
-/**
- This function is used to manage a USB device with a control transfer pipe. A control transfer is
- typically used to perform device initialization and configuration.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param Request A pointer to the USB device request that will be sent to the USB
- device.
- @param Direction Indicates the data direction.
- @param Timeout Indicating the transfer should be completed within this time frame.
- The units are in milliseconds.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength The size, in bytes, of the data buffer specified by Data.
- @param Status A pointer to the result of the USB transfer.
-
- @retval EFI_SUCCESS The control transfer has been successfully executed.
- @retval EFI_DEVICE_ERROR The transfer failed. The transfer status is returned in Status.
- @retval EFI_INVALID_PARAMETE One or more parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
- @retval EFI_TIMEOUT The control transfer fails due to timeout.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_CONTROL_TRANSFER)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN EFI_USB_DEVICE_REQUEST *Request,
- IN EFI_USB_DATA_DIRECTION Direction,
- IN UINT32 Timeout,
- IN OUT VOID *Data OPTIONAL,
- IN UINTN DataLength OPTIONAL,
- OUT UINT32 *Status
- );
-
-/**
- This function is used to manage a USB device with the bulk transfer pipe. Bulk Transfers are
- typically used to transfer large amounts of data to/from USB devices.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param DeviceEndpoint The destination USB device endpoint to which the
- device request is being sent. DeviceEndpoint must
- be between 0x01 and 0x0F or between 0x81 and 0x8F,
- otherwise EFI_INVALID_PARAMETER is returned. If
- the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
- is returned. The MSB of this parameter indicates
- the endpoint direction. The number "1" stands for
- an IN endpoint, and "0" stands for an OUT endpoint.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength The size, in bytes, of the data buffer specified by Data.
- On input, the size, in bytes, of the data buffer specified by Data.
- On output, the number of bytes that were actually transferred.
- @param Timeout Indicating the transfer should be completed within this time frame.
- The units are in milliseconds. If Timeout is 0, then the
- caller must wait for the function to be completed until
- EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
- @param Status This parameter indicates the USB transfer status.
-
- @retval EFI_SUCCESS The bulk transfer has been successfully executed.
- @retval EFI_DEVICE_ERROR The transfer failed. The transfer status is returned in Status.
- @retval EFI_INVALID_PARAMETE One or more parameters are invalid.
- @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.
- @retval EFI_TIMEOUT The control transfer fails due to timeout.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_BULK_TRANSFER)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT8 DeviceEndpoint,
- IN OUT VOID *Data,
- IN OUT UINTN *DataLength,
- IN UINTN Timeout,
- OUT UINT32 *Status
- );
-
-/**
- This function is used to manage a USB device with an interrupt transfer pipe. An Asynchronous
- Interrupt Transfer is typically used to query a device's status at a fixed rate. For example,
- keyboard, mouse, and hub devices use this type of transfer to query their interrupt endpoints at
- a fixed rate.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param DeviceEndpoint The destination USB device endpoint to which the
- device request is being sent. DeviceEndpoint must
- be between 0x01 and 0x0F or between 0x81 and 0x8F,
- otherwise EFI_INVALID_PARAMETER is returned. If
- the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
- is returned. The MSB of this parameter indicates
- the endpoint direction. The number "1" stands for
- an IN endpoint, and "0" stands for an OUT endpoint.
- @param IsNewTransfer If TRUE, a new transfer will be submitted to USB controller. If
- FALSE, the interrupt transfer is deleted from the device's interrupt
- transfer queue.
- @param PollingInterval Indicates the periodic rate, in milliseconds, that the transfer is to be
- executed.This parameter is required when IsNewTransfer is TRUE. The
- value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned.
- The units are in milliseconds.
- @param DataLength Specifies the length, in bytes, of the data to be received from the
- USB device. This parameter is only required when IsNewTransfer is TRUE.
- @param InterruptCallback The Callback function. This function is called if the asynchronous
- interrupt transfer is completed. This parameter is required
- when IsNewTransfer is TRUE.
- @param Context Data passed to the InterruptCallback function. This is an optional
- parameter and may be NULL.
-
- @retval EFI_SUCCESS The asynchronous USB transfer request transfer has been successfully executed.
- @retval EFI_DEVICE_ERROR The asynchronous USB transfer request failed.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT8 DeviceEndpoint,
- IN BOOLEAN IsNewTransfer,
- IN UINTN PollingInterval OPTIONAL,
- IN UINTN DataLength OPTIONAL,
- IN EFI_ASYNC_USB_TRANSFER_CALLBACK InterruptCallBack OPTIONAL,
- IN VOID *Context OPTIONAL
- );
-
-/**
- This function is used to manage a USB device with an interrupt transfer pipe.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param DeviceEndpoint The destination USB device endpoint to which the
- device request is being sent. DeviceEndpoint must
- be between 0x01 and 0x0F or between 0x81 and 0x8F,
- otherwise EFI_INVALID_PARAMETER is returned. If
- the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
- is returned. The MSB of this parameter indicates
- the endpoint direction. The number "1" stands for
- an IN endpoint, and "0" stands for an OUT endpoint.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength On input, then size, in bytes, of the buffer Data. On output, the
- amount of data actually transferred.
- @param Timeout The time out, in seconds, for this transfer. If Timeout is 0,
- then the caller must wait for the function to be completed
- until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. If the
- transfer is not completed in this time frame, then EFI_TIMEOUT is returned.
- @param Status This parameter indicates the USB transfer status.
-
- @retval EFI_SUCCESS The sync interrupt transfer has been successfully executed.
- @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
- @retval EFI_DEVICE_ERROR The sync interrupt transfer request failed.
- @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.
- @retval EFI_TIMEOUT The transfer fails due to timeout.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_SYNC_INTERRUPT_TRANSFER)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT8 DeviceEndpoint,
- IN OUT VOID *Data,
- IN OUT UINTN *DataLength,
- IN UINTN Timeout,
- OUT UINT32 *Status
- );
-
-/**
- This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous
- transfer is typically used to transfer streaming data.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param DeviceEndpoint The destination USB device endpoint to which the
- device request is being sent. DeviceEndpoint must
- be between 0x01 and 0x0F or between 0x81 and 0x8F,
- otherwise EFI_INVALID_PARAMETER is returned. If
- the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
- is returned. The MSB of this parameter indicates
- the endpoint direction. The number "1" stands for
- an IN endpoint, and "0" stands for an OUT endpoint.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength The size, in bytes, of the data buffer specified by Data.
- @param Status This parameter indicates the USB transfer status.
-
- @retval EFI_SUCCESS The isochronous transfer has been successfully executed.
- @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.
- @retval EFI_DEVICE_ERROR The transfer failed due to the reason other than timeout, The error status
- is returned in Status.
- @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.
- @retval EFI_TIMEOUT The transfer fails due to timeout.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_ISOCHRONOUS_TRANSFER)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT8 DeviceEndpoint,
- IN OUT VOID *Data,
- IN UINTN DataLength,
- OUT UINT32 *Status
- );
-
-/**
- This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous
- transfer is typically used to transfer streaming data.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param DeviceEndpoint The destination USB device endpoint to which the
- device request is being sent. DeviceEndpoint must
- be between 0x01 and 0x0F or between 0x81 and 0x8F,
- otherwise EFI_INVALID_PARAMETER is returned. If
- the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
- is returned. The MSB of this parameter indicates
- the endpoint direction. The number "1" stands for
- an IN endpoint, and "0" stands for an OUT endpoint.
- @param Data A pointer to the buffer of data that will be transmitted to USB
- device or received from USB device.
- @param DataLength The size, in bytes, of the data buffer specified by Data.
- This is an optional parameter and may be NULL.
- @param IsochronousCallback The IsochronousCallback() function.This function is
- called if the requested isochronous transfer is completed.
- @param Context Data passed to the IsochronousCallback() function.
-
- @retval EFI_SUCCESS The asynchronous isochronous transfer has been successfully submitted
- to the system.
- @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.
- @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT8 DeviceEndpoint,
- IN OUT VOID *Data,
- IN UINTN DataLength,
- IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
- IN VOID *Context OPTIONAL
- );
-
-/**
- Resets and reconfigures the USB controller. This function will work for all USB devices except
- USB Hub Controllers.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
-
- @retval EFI_SUCCESS The USB controller was reset.
- @retval EFI_INVALID_PARAMETER If the controller specified by This is a USB hub.
- @retval EFI_DEVICE_ERROR An error occurred during the reconfiguration process.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_PORT_RESET)(
- IN EFI_USB_IO_PROTOCOL *This
- );
-
-/**
- Retrieves the USB Device Descriptor.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param DeviceDescriptor A pointer to the caller allocated USB Device Descriptor.
-
- @retval EFI_SUCCESS The device descriptor was retrieved successfully.
- @retval EFI_INVALID_PARAMETER DeviceDescriptor is NULL.
- @retval EFI_NOT_FOUND The device descriptor was not found. The device may not be configured.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_GET_DEVICE_DESCRIPTOR)(
- IN EFI_USB_IO_PROTOCOL *This,
- OUT EFI_USB_DEVICE_DESCRIPTOR *DeviceDescriptor
- );
-
-/**
- Retrieves the USB Device Descriptor.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param ConfigurationDescriptor A pointer to the caller allocated USB Active Configuration
- Descriptor.
- @retval EFI_SUCCESS The active configuration descriptor was retrieved successfully.
- @retval EFI_INVALID_PARAMETER ConfigurationDescriptor is NULL.
- @retval EFI_NOT_FOUND An active configuration descriptor cannot be found. The device may not
- be configured.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_GET_CONFIG_DESCRIPTOR)(
- IN EFI_USB_IO_PROTOCOL *This,
- OUT EFI_USB_CONFIG_DESCRIPTOR *ConfigurationDescriptor
- );
-
-/**
- Retrieves the Interface Descriptor for a USB Device Controller. As stated earlier, an interface
- within a USB device is equivalently to a USB Controller within the current configuration.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param InterfaceDescriptor A pointer to the caller allocated USB Interface Descriptor within
- the configuration setting.
- @retval EFI_SUCCESS The interface descriptor retrieved successfully.
- @retval EFI_INVALID_PARAMETER InterfaceDescriptor is NULL.
- @retval EFI_NOT_FOUND The interface descriptor cannot be found. The device may not be
- correctly configured.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_GET_INTERFACE_DESCRIPTOR)(
- IN EFI_USB_IO_PROTOCOL *This,
- OUT EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor
- );
-
-/**
- Retrieves an Endpoint Descriptor within a USB Controller.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param EndpointIndex Indicates which endpoint descriptor to retrieve.
- @param EndpointDescriptor A pointer to the caller allocated USB Endpoint Descriptor of
- a USB controller.
-
- @retval EFI_SUCCESS The endpoint descriptor was retrieved successfully.
- @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
- @retval EFI_NOT_FOUND The endpoint descriptor cannot be found. The device may not be
- correctly configured.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT8 EndpointIndex,
- OUT EFI_USB_ENDPOINT_DESCRIPTOR *EndpointDescriptor
- );
-
-/**
- Retrieves a string stored in a USB Device.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param LangID The Language ID for the string being retrieved.
- @param StringID The ID of the string being retrieved.
- @param String A pointer to a buffer allocated by this function with
- AllocatePool() to store the string.If this function
- returns EFI_SUCCESS, it stores the string the caller
- wants to get. The caller should release the string
- buffer with FreePool() after the string is not used any more.
-
- @retval EFI_SUCCESS The string was retrieved successfully.
- @retval EFI_NOT_FOUND The string specified by LangID and StringID was not found.
- @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate the return buffer String.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_GET_STRING_DESCRIPTOR)(
- IN EFI_USB_IO_PROTOCOL *This,
- IN UINT16 LangID,
- IN UINT8 StringID,
- OUT CHAR16 **String
- );
-
-/**
- Retrieves all the language ID codes that the USB device supports.
-
- @param This A pointer to the EFI_USB_IO_PROTOCOL instance.
- @param LangIDTable Language ID for the string the caller wants to get.
- This is a 16-bit ID defined by Microsoft. This
- buffer pointer is allocated and maintained by
- the USB Bus Driver, the caller should not modify
- its contents.
- @param TableSize The size, in bytes, of the table LangIDTable.
-
- @retval EFI_SUCCESS The support languages were retrieved successfully.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_USB_IO_GET_SUPPORTED_LANGUAGE)(
- IN EFI_USB_IO_PROTOCOL *This,
- OUT UINT16 **LangIDTable,
- OUT UINT16 *TableSize
- );
-
-///
-/// The EFI_USB_IO_PROTOCOL provides four basic transfers types described
-/// in the USB 1.1 Specification. These include control transfer, interrupt
-/// transfer, bulk transfer and isochronous transfer. The EFI_USB_IO_PROTOCOL
-/// also provides some basic USB device/controller management and configuration
-/// interfaces. A USB device driver uses the services of this protocol to manage USB devices.
-///
-struct _EFI_USB_IO_PROTOCOL {
- //
- // IO transfer
- //
- EFI_USB_IO_CONTROL_TRANSFER UsbControlTransfer;
- EFI_USB_IO_BULK_TRANSFER UsbBulkTransfer;
- EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER UsbAsyncInterruptTransfer;
- EFI_USB_IO_SYNC_INTERRUPT_TRANSFER UsbSyncInterruptTransfer;
- EFI_USB_IO_ISOCHRONOUS_TRANSFER UsbIsochronousTransfer;
- EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;
-
- //
- // Common device request
- //
- EFI_USB_IO_GET_DEVICE_DESCRIPTOR UsbGetDeviceDescriptor;
- EFI_USB_IO_GET_CONFIG_DESCRIPTOR UsbGetConfigDescriptor;
- EFI_USB_IO_GET_INTERFACE_DESCRIPTOR UsbGetInterfaceDescriptor;
- EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR UsbGetEndpointDescriptor;
- EFI_USB_IO_GET_STRING_DESCRIPTOR UsbGetStringDescriptor;
- EFI_USB_IO_GET_SUPPORTED_LANGUAGE UsbGetSupportedLanguages;
-
- //
- // Reset controller's parent port
- //
- EFI_USB_IO_PORT_RESET UsbPortReset;
-};
-
-extern EFI_GUID gEfiUsbIoProtocolGuid;
-
-#endif
diff --git a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiBaseType.h b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiBaseType.h
index ef0ea671a..371dae649 100644
--- a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiBaseType.h
+++ b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiBaseType.h
@@ -1,8 +1,8 @@
/** @file
Defines data types and constants introduced in UEFI.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
-Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
@@ -153,14 +153,12 @@ typedef union {
#define EFI_END_OF_FILE RETURN_END_OF_FILE
#define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE
#define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA
-#define EFI_HTTP_ERROR RETURN_HTTP_ERROR
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA
-#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM
///@}
///
diff --git a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h
index 49ea24ff9..19121dea7 100644
--- a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h
+++ b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -782,7 +782,6 @@ typedef union {
#define EFI_IFR_MODAL_TAG_OP 0x61
#define EFI_IFR_REFRESH_ID_OP 0x62
#define EFI_IFR_WARNING_IF_OP 0x63
-#define EFI_IFR_MATCH2_OP 0x64
//
// Definitions of IFR Standard Headers
@@ -814,11 +813,10 @@ typedef struct _EFI_IFR_QUESTION_HEADER {
//
// Flag values of EFI_IFR_QUESTION_HEADER
//
-#define EFI_IFR_FLAG_READ_ONLY 0x01
-#define EFI_IFR_FLAG_CALLBACK 0x04
-#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
-#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
-#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
+#define EFI_IFR_FLAG_READ_ONLY 0x01
+#define EFI_IFR_FLAG_CALLBACK 0x04
+#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
+#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
//
// Definition for Opcode Reference
@@ -1403,11 +1401,6 @@ typedef struct _EFI_IFR_MATCH {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_MATCH;
-typedef struct _EFI_IFR_MATCH2 {
- EFI_IFR_OP_HEADER Header;
- EFI_GUID SyntaxType;
-} EFI_IFR_MATCH2;
-
typedef struct _EFI_IFR_MULTIPLY {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_MULTIPLY;
diff --git a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiMultiPhase.h b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiMultiPhase.h
index 38ec09f3d..678f3ebd6 100644
--- a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiMultiPhase.h
+++ b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiMultiPhase.h
@@ -1,7 +1,7 @@
/** @file
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -84,48 +84,10 @@ typedef enum {
/// Address space reserved by the firmware for code that is part of the processor.
///
EfiPalCode,
- ///
- /// A memory region that operates as EfiConventionalMemory,
- /// however it happens to also support byte-addressable non-volatility.
- ///
- EfiPersistentMemory,
EfiMaxMemoryType
} EFI_MEMORY_TYPE;
///
-/// Enumeration of reset types.
-///
-typedef enum {
- ///
- /// Used to induce a system-wide reset. This sets all circuitry within the
- /// system to its initial state. This type of reset is asynchronous to system
- /// operation and operates withgout regard to cycle boundaries. EfiColdReset
- /// is tantamount to a system power cycle.
- ///
- EfiResetCold,
- ///
- /// Used to induce a system-wide initialization. The processors are set to their
- /// initial state, and pending cycles are not corrupted. If the system does
- /// not support this reset type, then an EfiResetCold must be performed.
- ///
- EfiResetWarm,
- ///
- /// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3
- /// state. If the system does not support this reset type, then when the system
- /// is rebooted, it should exhibit the EfiResetCold attributes.
- ///
- EfiResetShutdown,
- ///
- /// Used to induce a system-wide reset. The exact type of the reset is defined by
- /// the EFI_GUID that follows the Null-terminated Unicode string passed into
- /// ResetData. If the platform does not recognize the EFI_GUID in ResetData the
- /// platform must pick a supported reset type to perform. The platform may
- /// optionally log the parameters from any non-normal reset that occurs.
- ///
- EfiResetPlatformSpecific
-} EFI_RESET_TYPE;
-
-///
/// Data structure that precedes all of the standard EFI table types.
///
typedef struct {
diff --git a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiPxe.h b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiPxe.h
index 13be21aae..5c0b2038f 100644
--- a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiPxe.h
+++ b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiPxe.h
@@ -3,7 +3,7 @@
structure prototypes, global variables and constants that
are needed for porting PXE to EFI.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -1460,26 +1460,6 @@ typedef struct s_pxe_db_statistics {
///
#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15
-///
-/// Number of valid frames received that were duplicated.
-///
-#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16
-
-///
-/// Number of encrypted frames received that failed to decrypt.
-///
-#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17
-
-///
-/// Number of frames that failed to transmit after exceeding the retry limit.
-///
-#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18
-
-///
-/// Number of frames transmitted successfully after more than one attempt.
-///
-#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19
-
typedef struct s_pxe_cpb_mcast_ip_to_mac {
///
/// Multicast IP address to be converted to multicast MAC address.
diff --git a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiSpec.h b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiSpec.h
index 98ac8765f..422b2f30e 100644
--- a/roms/ipxe/src/include/ipxe/efi/Uefi/UefiSpec.h
+++ b/roms/ipxe/src/include/ipxe/efi/Uefi/UefiSpec.h
@@ -1,11 +1,11 @@
/** @file
Include file that supports UEFI.
- This include file must contain things defined in the UEFI 2.6 specification.
- If a code construct is defined in the UEFI 2.6 specification it must be included
+ This include file must contain things defined in the UEFI 2.4 specification.
+ If a code construct is defined in the UEFI 2.4 specification it must be included
by this include file.
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -65,35 +65,21 @@ typedef enum {
//
// Memory cacheability attributes
//
-#define EFI_MEMORY_UC 0x0000000000000001ULL
-#define EFI_MEMORY_WC 0x0000000000000002ULL
-#define EFI_MEMORY_WT 0x0000000000000004ULL
-#define EFI_MEMORY_WB 0x0000000000000008ULL
-#define EFI_MEMORY_UCE 0x0000000000000010ULL
+#define EFI_MEMORY_UC 0x0000000000000001ULL
+#define EFI_MEMORY_WC 0x0000000000000002ULL
+#define EFI_MEMORY_WT 0x0000000000000004ULL
+#define EFI_MEMORY_WB 0x0000000000000008ULL
+#define EFI_MEMORY_UCE 0x0000000000000010ULL
//
// Physical memory protection attributes
//
-// Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory
-// protection attribute. Also, EFI_MEMORY_WP means cacheability attribute.
-//
-#define EFI_MEMORY_WP 0x0000000000001000ULL
-#define EFI_MEMORY_RP 0x0000000000002000ULL
-#define EFI_MEMORY_XP 0x0000000000004000ULL
-#define EFI_MEMORY_RO 0x0000000000020000ULL
-//
-// Physical memory persistence attribute.
-// The memory region supports byte-addressable non-volatility.
-//
-#define EFI_MEMORY_NV 0x0000000000008000ULL
-//
-// The memory region provides higher reliability relative to other memory in the system.
-// If all memory has the same reliability, then this bit is not used.
-//
-#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL
+#define EFI_MEMORY_WP 0x0000000000001000ULL
+#define EFI_MEMORY_RP 0x0000000000002000ULL
+#define EFI_MEMORY_XP 0x0000000000004000ULL
//
// Runtime memory attribute
//
-#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
+#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
///
/// Memory descriptor version number.
@@ -133,23 +119,18 @@ typedef struct {
/**
Allocates memory pages from the system.
- @param[in] Type The type of allocation to perform.
- @param[in] MemoryType The type of memory to allocate.
- MemoryType values in the range 0x70000000..0x7FFFFFFF
- are reserved for OEM use. MemoryType values in the range
- 0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders
- that are provided by operating system vendors.
- @param[in] Pages The number of contiguous 4 KB pages to allocate.
- @param[in, out] Memory The pointer to a physical address. On input, the way in which the address is
- used depends on the value of Type.
+ @param Type The type of allocation to perform.
+ @param MemoryType The type of memory to allocate.
+ @param Pages The number of contiguous 4 KB pages to allocate.
+ @param Memory The pointer to a physical address. On input, the way in which the address is
+ used depends on the value of Type.
@retval EFI_SUCCESS The requested pages were allocated.
@retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or
AllocateMaxAddress or AllocateAddress.
2) MemoryType is in the range
- EfiMaxMemoryType..0x6FFFFFFF.
3) Memory is NULL.
- 4) MemoryType is EfiPersistentMemory.
+ EfiMaxMemoryType..0x7FFFFFFF.
@retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
@retval EFI_NOT_FOUND The requested pages could not be found.
@@ -166,8 +147,8 @@ EFI_STATUS
/**
Frees memory pages.
- @param[in] Memory The base physical address of the pages to be freed.
- @param[in] Pages The number of contiguous 4 KB pages to free.
+ @param Memory The base physical address of the pages to be freed.
+ @param Pages The number of contiguous 4 KB pages to free.
@retval EFI_SUCCESS The requested pages were freed.
@retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.
@@ -185,19 +166,19 @@ EFI_STATUS
/**
Returns the current memory map.
- @param[in, out] MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.
- On input, this is the size of the buffer allocated by the caller.
- On output, it is the size of the buffer returned by the firmware if
- the buffer was large enough, or the size of the buffer needed to contain
- the map if the buffer was too small.
- @param[in, out] MemoryMap A pointer to the buffer in which firmware places the current memory
- map.
- @param[out] MapKey A pointer to the location in which firmware returns the key for the
- current memory map.
- @param[out] DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of
- an individual EFI_MEMORY_DESCRIPTOR.
- @param[out] DescriptorVersion A pointer to the location in which firmware returns the version number
- associated with the EFI_MEMORY_DESCRIPTOR.
+ @param MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.
+ On input, this is the size of the buffer allocated by the caller.
+ On output, it is the size of the buffer returned by the firmware if
+ the buffer was large enough, or the size of the buffer needed to contain
+ the map if the buffer was too small.
+ @param MemoryMap A pointer to the buffer in which firmware places the current memory
+ map.
+ @param MapKey A pointer to the location in which firmware returns the key for the
+ current memory map.
+ @param DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of
+ an individual EFI_MEMORY_DESCRIPTOR.
+ @param DescriptorVersion A pointer to the location in which firmware returns the version number
+ associated with the EFI_MEMORY_DESCRIPTOR.
@retval EFI_SUCCESS The memory map was returned in the MemoryMap buffer.
@retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current buffer size
@@ -220,20 +201,14 @@ EFI_STATUS
/**
Allocates pool memory.
- @param[in] PoolType The type of pool to allocate.
- MemoryType values in the range 0x70000000..0x7FFFFFFF
- are reserved for OEM use. MemoryType values in the range
- 0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders
- that are provided by operating system vendors.
- @param[in] Size The number of bytes to allocate from the pool.
- @param[out] Buffer A pointer to a pointer to the allocated buffer if the call succeeds;
+ @param PoolType The type of pool to allocate.
+ @param Size The number of bytes to allocate from the pool.
+ @param Buffer A pointer to a pointer to the allocated buffer if the call succeeds;
undefined otherwise.
@retval EFI_SUCCESS The requested number of bytes was allocated.
@retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
- @retval EFI_INVALID_PARAMETER Buffer is NULL.
- PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF.
- PoolType is EfiPersistentMemory.
+ @retval EFI_INVALID_PARAMETER PoolType was invalid or Buffer is NULL.
**/
typedef
@@ -247,7 +222,7 @@ EFI_STATUS
/**
Returns pool memory to the system.
- @param[in] Buffer The pointer to the buffer to free.
+ @param Buffer The pointer to the buffer to free.
@retval EFI_SUCCESS The memory was returned to the system.
@retval EFI_INVALID_PARAMETER Buffer was invalid.
@@ -262,10 +237,10 @@ EFI_STATUS
/**
Changes the runtime addressing mode of EFI firmware from physical to virtual.
- @param[in] MemoryMapSize The size in bytes of VirtualMap.
- @param[in] DescriptorSize The size in bytes of an entry in the VirtualMap.
- @param[in] DescriptorVersion The version of the structure entries in VirtualMap.
- @param[in] VirtualMap An array of memory descriptors which contain new virtual
+ @param MemoryMapSize The size in bytes of VirtualMap.
+ @param DescriptorSize The size in bytes of an entry in the VirtualMap.
+ @param DescriptorVersion The version of the structure entries in VirtualMap.
+ @param VirtualMap An array of memory descriptors which contain new virtual
address mapping information for all runtime ranges.
@retval EFI_SUCCESS The virtual address map has been applied.
@@ -290,15 +265,15 @@ EFI_STATUS
/**
Connects one or more drivers to a controller.
- @param[in] ControllerHandle The handle of the controller to which driver(s) are to be connected.
- @param[in] DriverImageHandle A pointer to an ordered list handles that support the
- EFI_DRIVER_BINDING_PROTOCOL.
- @param[in] RemainingDevicePath A pointer to the device path that specifies a child of the
- controller specified by ControllerHandle.
- @param[in] Recursive If TRUE, then ConnectController() is called recursively
- until the entire tree of controllers below the controller specified
- by ControllerHandle have been created. If FALSE, then
- the tree of controllers is only expanded one level.
+ @param ControllerHandle The handle of the controller to which driver(s) are to be connected.
+ @param DriverImageHandle A pointer to an ordered list handles that support the
+ EFI_DRIVER_BINDING_PROTOCOL.
+ @param RemainingDevicePath A pointer to the device path that specifies a child of the
+ controller specified by ControllerHandle.
+ @param Recursive If TRUE, then ConnectController() is called recursively
+ until the entire tree of controllers below the controller specified
+ by ControllerHandle have been created. If FALSE, then
+ the tree of controllers is only expanded one level.
@retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle.
2) No drivers were connected to ControllerHandle, but
@@ -324,13 +299,13 @@ EFI_STATUS
/**
Disconnects one or more drivers from a controller.
- @param[in] ControllerHandle The handle of the controller from which driver(s) are to be disconnected.
- @param[in] DriverImageHandle The driver to disconnect from ControllerHandle.
- If DriverImageHandle is NULL, then all the drivers currently managing
- ControllerHandle are disconnected from ControllerHandle.
- @param[in] ChildHandle The handle of the child to destroy.
- If ChildHandle is NULL, then all the children of ControllerHandle are
- destroyed before the drivers are disconnected from ControllerHandle.
+ @param ControllerHandle The handle of the controller from which driver(s) are to be disconnected.
+ @param DriverImageHandle The driver to disconnect from ControllerHandle.
+ If DriverImageHandle is NULL, then all the drivers currently managing
+ ControllerHandle are disconnected from ControllerHandle.
+ @param ChildHandle The handle of the child to destroy.
+ If ChildHandle is NULL, then all the children of ControllerHandle are
+ destroyed before the drivers are disconnected from ControllerHandle.
@retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller.
2) On entry, no drivers are managing ControllerHandle.
@@ -363,9 +338,9 @@ EFI_STATUS
/**
Determines the new virtual address that is to be used on subsequent memory accesses.
- @param[in] DebugDisposition Supplies type information for the pointer being converted.
- @param[in, out] Address A pointer to a pointer that is to be fixed to be the value needed
- for the new virtual address mappings being applied.
+ @param DebugDisposition Supplies type information for the pointer being converted.
+ @param Address A pointer to a pointer that is to be fixed to be the value needed
+ for the new virtual address mappings being applied.
@retval EFI_SUCCESS The pointer pointed to by Address was modified.
@retval EFI_INVALID_PARAMETER 1) Address is NULL.
@@ -407,9 +382,9 @@ EFI_STATUS
/**
Invoke a notification event
- @param[in] Event Event whose notification function is being invoked.
- @param[in] Context The pointer to the notification function's context,
- which is implementation-dependent.
+ @param Event Event whose notification function is being invoked.
+ @param Context The pointer to the notification function's context,
+ which is implementation-dependent.
**/
typedef
@@ -422,12 +397,12 @@ VOID
/**
Creates an event.
- @param[in] Type The type of event to create and its mode and attributes.
- @param[in] NotifyTpl The task priority level of event notifications, if needed.
- @param[in] NotifyFunction The pointer to the event's notification function, if any.
- @param[in] NotifyContext The pointer to the notification function's context; corresponds to parameter
+ @param Type The type of event to create and its mode and attributes.
+ @param NotifyTpl The task priority level of event notifications, if needed.
+ @param NotifyFunction The pointer to the event's notification function, if any.
+ @param NotifyContext The pointer to the notification function's context; corresponds to parameter
Context in the notification function.
- @param[out] Event The pointer to the newly created event if the call succeeds; undefined
+ @param Event The pointer to the newly created event if the call succeeds; undefined
otherwise.
@retval EFI_SUCCESS The event structure was created.
@@ -448,15 +423,15 @@ EFI_STATUS
/**
Creates an event in a group.
- @param[in] Type The type of event to create and its mode and attributes.
- @param[in] NotifyTpl The task priority level of event notifications,if needed.
- @param[in] NotifyFunction The pointer to the event's notification function, if any.
- @param[in] NotifyContext The pointer to the notification function's context; corresponds to parameter
+ @param Type The type of event to create and its mode and attributes.
+ @param NotifyTpl The task priority level of event notifications,if needed.
+ @param NotifyFunction The pointer to the event's notification function, if any.
+ @param NotifyContext The pointer to the notification function's context; corresponds to parameter
Context in the notification function.
- @param[in] EventGroup The pointer to the unique identifier of the group to which this event belongs.
+ @param EventGroup The pointer to the unique identifier of the group to which this event belongs.
If this is NULL, then the function behaves as if the parameters were passed
to CreateEvent.
- @param[out] Event The pointer to the newly created event if the call succeeds; undefined
+ @param Event The pointer to the newly created event if the call succeeds; undefined
otherwise.
@retval EFI_SUCCESS The event structure was created.
@@ -496,9 +471,9 @@ typedef enum {
/**
Sets the type of timer and the trigger time for a timer event.
- @param[in] Event The timer event that is to be signaled at the specified time.
- @param[in] Type The type of time that is specified in TriggerTime.
- @param[in] TriggerTime The number of 100ns units until the timer expires.
+ @param Event The timer event that is to be signaled at the specified time.
+ @param Type The type of time that is specified in TriggerTime.
+ @param TriggerTime The number of 100ns units until the timer expires.
A TriggerTime of 0 is legal.
If Type is TimerRelative and TriggerTime is 0, then the timer
event will be signaled on the next timer tick.
@@ -520,7 +495,7 @@ EFI_STATUS
/**
Signals an event.
- @param[in] Event The event to signal.
+ @param Event The event to signal.
@retval EFI_SUCCESS The event has been signaled.
@@ -534,9 +509,9 @@ EFI_STATUS
/**
Stops execution until an event is signaled.
- @param[in] NumberOfEvents The number of events in the Event array.
- @param[in] Event An array of EFI_EVENT.
- @param[out] Index The pointer to the index of the event which satisfied the wait condition.
+ @param NumberOfEvents The number of events in the Event array.
+ @param Event An array of EFI_EVENT.
+ @param Index The pointer to the index of the event which satisfied the wait condition.
@retval EFI_SUCCESS The event indicated by Index was signaled.
@retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0.
@@ -556,7 +531,7 @@ EFI_STATUS
/**
Closes an event.
- @param[in] Event The event to close.
+ @param Event The event to close.
@retval EFI_SUCCESS The event has been closed.
@@ -570,7 +545,7 @@ EFI_STATUS
/**
Checks whether an event is in the signaled state.
- @param[in] Event The event to check.
+ @param Event The event to check.
@retval EFI_SUCCESS The event is in the signaled state.
@retval EFI_NOT_READY The event is not in the signaled state.
@@ -596,7 +571,7 @@ EFI_STATUS
/**
Raises a task's priority level and returns its previous level.
- @param[in] NewTpl The new task priority level.
+ @param NewTpl The new task priority level.
@return Previous task priority level
@@ -610,7 +585,7 @@ EFI_TPL
/**
Restores a task's priority level to its previous value.
- @param[in] OldTpl The previous task priority level to restore.
+ @param OldTpl The previous task priority level to restore.
**/
typedef
@@ -622,15 +597,14 @@ VOID
/**
Returns the value of a variable.
- @param[in] VariableName A Null-terminated string that is the name of the vendor's
- variable.
- @param[in] VendorGuid A unique identifier for the vendor.
- @param[out] Attributes If not NULL, a pointer to the memory location to return the
- attributes bitmask for the variable.
- @param[in, out] DataSize On input, the size in bytes of the return Data buffer.
- On output the size of data returned in Data.
- @param[out] Data The buffer to return the contents of the variable. May be NULL
- with a zero DataSize in order to determine the size buffer needed.
+ @param VariableName A Null-terminated string that is the name of the vendor's
+ variable.
+ @param VendorGuid A unique identifier for the vendor.
+ @param Attributes If not NULL, a pointer to the memory location to return the
+ attributes bitmask for the variable.
+ @param DataSize On input, the size in bytes of the return Data buffer.
+ On output the size of data returned in Data.
+ @param Data The buffer to return the contents of the variable.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The variable was not found.
@@ -650,19 +624,19 @@ EFI_STATUS
IN EFI_GUID *VendorGuid,
OUT UINT32 *Attributes, OPTIONAL
IN OUT UINTN *DataSize,
- OUT VOID *Data OPTIONAL
+ OUT VOID *Data
);
/**
Enumerates the current variable names.
- @param[in, out] VariableNameSize The size of the VariableName buffer.
- @param[in, out] VariableName On input, supplies the last VariableName that was returned
- by GetNextVariableName(). On output, returns the Nullterminated
- string of the current variable.
- @param[in, out] VendorGuid On input, supplies the last VendorGuid that was returned by
- GetNextVariableName(). On output, returns the
- VendorGuid of the current variable.
+ @param VariableNameSize The size of the VariableName buffer.
+ @param VariableName On input, supplies the last VariableName that was returned
+ by GetNextVariableName(). On output, returns the Nullterminated
+ string of the current variable.
+ @param VendorGuid On input, supplies the last VendorGuid that was returned by
+ GetNextVariableName(). On output, returns the
+ VendorGuid of the current variable.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The next variable was not found.
@@ -684,13 +658,13 @@ EFI_STATUS
/**
Sets the value of a variable.
- @param[in] VariableName A Null-terminated string that is the name of the vendor's variable.
+ @param VariableName A Null-terminated string that is the name of the vendor's variable.
Each VariableName is unique for each VendorGuid. VariableName must
contain 1 or more characters. If VariableName is an empty string,
then EFI_INVALID_PARAMETER is returned.
- @param[in] VendorGuid A unique identifier for the vendor.
- @param[in] Attributes Attributes bitmask to set for the variable.
- @param[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
+ @param VendorGuid A unique identifier for the vendor.
+ @param Attributes Attributes bitmask to set for the variable.
+ @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero
causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is
@@ -699,7 +673,7 @@ EFI_STATUS
even if no new data value is provided,see the description of the
EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not
be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).
- @param[in] Data The contents for the variable.
+ @param Data The contents for the variable.
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
defined by the Attributes.
@@ -761,8 +735,8 @@ typedef struct {
Returns the current time and date information, and the time-keeping capabilities
of the hardware platform.
- @param[out] Time A pointer to storage to receive a snapshot of the current time.
- @param[out] Capabilities An optional pointer to a buffer to receive the real time clock
+ @param Time A pointer to storage to receive a snapshot of the current time.
+ @param Capabilities An optional pointer to a buffer to receive the real time clock
device's capabilities.
@retval EFI_SUCCESS The operation completed successfully.
@@ -780,7 +754,7 @@ EFI_STATUS
/**
Sets the current local time and date information.
- @param[in] Time A pointer to the current time.
+ @param Time A pointer to the current time.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_INVALID_PARAMETER A time field is out of range.
@@ -796,9 +770,9 @@ EFI_STATUS
/**
Returns the current wakeup alarm clock setting.
- @param[out] Enabled Indicates if the alarm is currently enabled or disabled.
- @param[out] Pending Indicates if the alarm signal is pending and requires acknowledgement.
- @param[out] Time The current alarm setting.
+ @param Enabled Indicates if the alarm is currently enabled or disabled.
+ @param Pending Indicates if the alarm signal is pending and requires acknowledgement.
+ @param Time The current alarm setting.
@retval EFI_SUCCESS The alarm settings were returned.
@retval EFI_INVALID_PARAMETER Enabled is NULL.
@@ -819,8 +793,8 @@ EFI_STATUS
/**
Sets the system wakeup alarm clock time.
- @param[in] Enable Enable or disable the wakeup alarm.
- @param[in] Time If Enable is TRUE, the time to set the wakeup alarm for.
+ @param Enabled Enable or disable the wakeup alarm.
+ @param Time If Enable is TRUE, the time to set the wakeup alarm for.
If Enable is FALSE, then this parameter is optional, and may be NULL.
@retval EFI_SUCCESS If Enable is TRUE, then the wakeup alarm was enabled. If
@@ -840,32 +814,32 @@ EFI_STATUS
/**
Loads an EFI image into memory.
- @param[in] BootPolicy If TRUE, indicates that the request originates from the boot
- manager, and that the boot manager is attempting to load
- FilePath as a boot selection. Ignored if SourceBuffer is
- not NULL.
- @param[in] ParentImageHandle The caller's image handle.
- @param[in] DevicePath The DeviceHandle specific file path from which the image is
- loaded.
- @param[in] SourceBuffer If not NULL, a pointer to the memory location containing a copy
- of the image to be loaded.
- @param[in] SourceSize The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.
- @param[out] ImageHandle The pointer to the returned image handle that is created when the
- image is successfully loaded.
-
- @retval EFI_SUCCESS Image was loaded into memory correctly.
- @retval EFI_NOT_FOUND Both SourceBuffer and DevicePath are NULL.
- @retval EFI_INVALID_PARAMETER One or more parametes are invalid.
- @retval EFI_UNSUPPORTED The image type is not supported.
- @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
- @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
- understood.
- @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
- @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
- image from being loaded. NULL is returned in *ImageHandle.
+ @param BootPolicy If TRUE, indicates that the request originates from the boot
+ manager, and that the boot manager is attempting to load
+ FilePath as a boot selection. Ignored if SourceBuffer is
+ not NULL.
+ @param ParentImageHandle The caller's image handle.
+ @param DevicePath The DeviceHandle specific file path from which the image is
+ loaded.
+ @param SourceBuffer If not NULL, a pointer to the memory location containing a copy
+ of the image to be loaded.
+ @param SourceSize The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.
+ @param ImageHandle The pointer to the returned image handle that is created when the
+ image is successfully loaded.
+
+ @retval EFI_SUCCESS Image was loaded into memory correctly.
+ @retval EFI_NOT_FOUND Both SourceBuffer and DevicePath are NULL.
+ @retval EFI_INVALID_PARAMETER One or more parametes are invalid.
+ @retval EFI_UNSUPPORTED The image type is not supported.
+ @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
+ @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
+ understood.
+ @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
+ @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
+ image from being loaded. NULL is returned in *ImageHandle.
@retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
- valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
- platform policy specifies that the image should not be started.
+ valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
+ platform policy specifies that the image should not be started.
**/
typedef
EFI_STATUS
@@ -881,10 +855,10 @@ EFI_STATUS
/**
Transfers control to a loaded image's entry point.
- @param[in] ImageHandle Handle of image to be started.
- @param[out] ExitDataSize The pointer to the size, in bytes, of ExitData.
- @param[out] ExitData The pointer to a pointer to a data buffer that includes a Null-terminated
- string, optionally followed by additional binary data.
+ @param ImageHandle Handle of image to be started.
+ @param ExitDataSize The pointer to the size, in bytes, of ExitData.
+ @param ExitData The pointer to a pointer to a data buffer that includes a Null-terminated
+ string, optionally followed by additional binary data.
@retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image
has already been initialized with StartImage.
@@ -903,11 +877,11 @@ EFI_STATUS
/**
Terminates a loaded EFI image and returns control to boot services.
- @param[in] ImageHandle Handle that identifies the image. This parameter is passed to the
+ @param ImageHandle Handle that identifies the image. This parameter is passed to the
image on entry.
- @param[in] ExitStatus The image's exit code.
- @param[in] ExitDataSize The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS.
- @param[in] ExitData The pointer to a data buffer that includes a Null-terminated string,
+ @param ExitStatus The image's exit code.
+ @param ExitDataSize The size, in bytes, of ExitData. Ignored if ExitStatus is EFI_SUCCESS.
+ @param ExitData The pointer to a data buffer that includes a Null-terminated string,
optionally followed by additional binary data. The string is a
description that the caller may use to further indicate the reason
for the image's exit. ExitData is only valid if ExitStatus
@@ -932,7 +906,7 @@ EFI_STATUS
/**
Unloads an image.
- @param[in] ImageHandle Handle that identifies the image to be unloaded.
+ @param ImageHandle Handle that identifies the image to be unloaded.
@retval EFI_SUCCESS The image has been unloaded.
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
@@ -947,8 +921,8 @@ EFI_STATUS
/**
Terminates all boot services.
- @param[in] ImageHandle Handle that identifies the exiting image.
- @param[in] MapKey Key to the latest memory map.
+ @param ImageHandle Handle that identifies the exiting image.
+ @param MapKey Key to the latest memory map.
@retval EFI_SUCCESS Boot services have been terminated.
@retval EFI_INVALID_PARAMETER MapKey is incorrect.
@@ -964,7 +938,7 @@ EFI_STATUS
/**
Induces a fine-grained stall.
- @param[in] Microseconds The number of microseconds to stall execution.
+ @param Microseconds The number of microseconds to stall execution.
@retval EFI_SUCCESS Execution was stalled at least the requested number of
Microseconds.
@@ -979,10 +953,10 @@ EFI_STATUS
/**
Sets the system's watchdog timer.
- @param[in] Timeout The number of seconds to set the watchdog timer to.
- @param[in] WatchdogCode The numeric code to log on a watchdog timer timeout event.
- @param[in] DataSize The size, in bytes, of WatchdogData.
- @param[in] WatchdogData A data buffer that includes a Null-terminated string, optionally
+ @param Timeout The number of seconds to set the watchdog timer to.
+ @param WatchdogCode The numeric code to log on a watchdog timer timeout event.
+ @param DataSize The size, in bytes, of WatchdogData.
+ @param WatchdogData A data buffer that includes a Null-terminated string, optionally
followed by additional binary data.
@retval EFI_SUCCESS The timeout has been set.
@@ -1001,13 +975,46 @@ EFI_STATUS
IN CHAR16 *WatchdogData OPTIONAL
);
+///
+/// Enumeration of reset types.
+///
+typedef enum {
+ ///
+ /// Used to induce a system-wide reset. This sets all circuitry within the
+ /// system to its initial state. This type of reset is asynchronous to system
+ /// operation and operates withgout regard to cycle boundaries. EfiColdReset
+ /// is tantamount to a system power cycle.
+ ///
+ EfiResetCold,
+ ///
+ /// Used to induce a system-wide initialization. The processors are set to their
+ /// initial state, and pending cycles are not corrupted. If the system does
+ /// not support this reset type, then an EfiResetCold must be performed.
+ ///
+ EfiResetWarm,
+ ///
+ /// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3
+ /// state. If the system does not support this reset type, then when the system
+ /// is rebooted, it should exhibit the EfiResetCold attributes.
+ ///
+ EfiResetShutdown,
+ ///
+ /// Used to induce a system-wide reset. The exact type of the reset is defined by
+ /// the EFI_GUID that follows the Null-terminated Unicode string passed into
+ /// ResetData. If the platform does not recognize the EFI_GUID in ResetData the
+ /// platform must pick a supported reset type to perform. The platform may
+ /// optionally log the parameters from any non-normal reset that occurs.
+ ///
+ EfiResetPlatformSpecific
+} EFI_RESET_TYPE;
+
/**
Resets the entire platform.
- @param[in] ResetType The type of reset to perform.
- @param[in] ResetStatus The status code for the reset.
- @param[in] DataSize The size, in bytes, of WatchdogData.
- @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
+ @param ResetType The type of reset to perform.
+ @param ResetStatus The status code for the reset.
+ @param DataSize The size, in bytes, of WatchdogData.
+ @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
EfiResetShutdown the data buffer starts with a Null-terminated
string, optionally followed by additional binary data.
@@ -1024,7 +1031,7 @@ VOID
/**
Returns a monotonically increasing count for the platform.
- @param[out] Count The pointer to returned value.
+ @param Count The pointer to returned value.
@retval EFI_SUCCESS The next monotonic count was returned.
@retval EFI_INVALID_PARAMETER Count is NULL.
@@ -1040,7 +1047,7 @@ EFI_STATUS
/**
Returns the next high 32 bits of the platform's monotonic counter.
- @param[out] HighCount The pointer to returned value.
+ @param HighCount The pointer to returned value.
@retval EFI_SUCCESS The next high monotonic count was returned.
@retval EFI_INVALID_PARAMETER HighCount is NULL.
@@ -1056,9 +1063,9 @@ EFI_STATUS
/**
Computes and returns a 32-bit CRC for a data buffer.
- @param[in] Data A pointer to the buffer on which the 32-bit CRC is to be computed.
- @param[in] DataSize The number of bytes in the buffer Data.
- @param[out] Crc32 The 32-bit CRC that was computed for the data buffer specified by Data
+ @param Data A pointer to the buffer on which the 32-bit CRC is to be computed.
+ @param DataSize The number of bytes in the buffer Data.
+ @param Crc32 The 32-bit CRC that was computed for the data buffer specified by Data
and DataSize.
@retval EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in
@@ -1079,9 +1086,9 @@ EFI_STATUS
/**
Copies the contents of one buffer to another buffer.
- @param[in] Destination The pointer to the destination buffer of the memory copy.
- @param[in] Source The pointer to the source buffer of the memory copy.
- @param[in] Length Number of bytes to copy from Source to Destination.
+ @param Destination The pointer to the destination buffer of the memory copy.
+ @param Source The pointer to the source buffer of the memory copy.
+ @param Length Number of bytes to copy from Source to Destination.
**/
typedef
@@ -1095,9 +1102,9 @@ VOID
/**
The SetMem() function fills a buffer with a specified value.
- @param[in] Buffer The pointer to the buffer to fill.
- @param[in] Size Number of bytes in Buffer to fill.
- @param[in] Value Value to fill Buffer with.
+ @param Buffer The pointer to the buffer to fill.
+ @param Size Number of bytes in Buffer to fill.
+ @param Value Value to fill Buffer with.
**/
typedef
@@ -1125,10 +1132,10 @@ typedef enum {
InstallMultipleProtocolInterfaces() be used in place of
InstallProtocolInterface()
- @param[in, out] Handle A pointer to the EFI_HANDLE on which the interface is to be installed.
- @param[in] Protocol The numeric ID of the protocol interface.
- @param[in] InterfaceType Indicates whether Interface is supplied in native form.
- @param[in] Interface A pointer to the protocol interface.
+ @param Handle A pointer to the EFI_HANDLE on which the interface is to be installed.
+ @param Protocol The numeric ID of the protocol interface.
+ @param InterfaceType Indicates whether Interface is supplied in native form.
+ @param Interface A pointer to the protocol interface.
@retval EFI_SUCCESS The protocol interface was installed.
@retval EFI_OUT_OF_RESOURCES Space for a new handle could not be allocated.
@@ -1150,7 +1157,7 @@ EFI_STATUS
/**
Installs one or more protocol interfaces into the boot services environment.
- @param[in, out] Handle The pointer to a handle to install the new protocol interfaces on,
+ @param Handle The pointer to a handle to install the new protocol interfaces on,
or a pointer to NULL if a new handle is to be allocated.
@param ... A variable argument list containing pairs of protocol GUIDs and protocol
interfaces.
@@ -1173,11 +1180,11 @@ EFI_STATUS
/**
Reinstalls a protocol interface on a device handle.
- @param[in] Handle Handle on which the interface is to be reinstalled.
- @param[in] Protocol The numeric ID of the interface.
- @param[in] OldInterface A pointer to the old interface. NULL can be used if a structure is not
+ @param Handle Handle on which the interface is to be reinstalled.
+ @param Protocol The numeric ID of the interface.
+ @param OldInterface A pointer to the old interface. NULL can be used if a structure is not
associated with Protocol.
- @param[in] NewInterface A pointer to the new interface.
+ @param NewInterface A pointer to the new interface.
@retval EFI_SUCCESS The protocol interface was reinstalled.
@retval EFI_NOT_FOUND The OldInterface on the handle was not found.
@@ -1202,9 +1209,9 @@ EFI_STATUS
UninstallMultipleProtocolInterfaces() be used in place of
UninstallProtocolInterface().
- @param[in] Handle The handle on which the interface was installed.
- @param[in] Protocol The numeric ID of the interface.
- @param[in] Interface A pointer to the interface.
+ @param Handle The handle on which the interface was installed.
+ @param Protocol The numeric ID of the interface.
+ @param Interface A pointer to the interface.
@retval EFI_SUCCESS The interface was removed.
@retval EFI_NOT_FOUND The interface was not found.
@@ -1225,7 +1232,7 @@ EFI_STATUS
/**
Removes one or more protocol interfaces into the boot services environment.
- @param[in] Handle The handle to remove the protocol interfaces from.
+ @param Handle The handle to remove the protocol interfaces from.
@param ... A variable argument list containing pairs of protocol GUIDs and
protocol interfaces.
@@ -1243,9 +1250,9 @@ EFI_STATUS
/**
Queries a handle to determine if it supports a specified protocol.
- @param[in] Handle The handle being queried.
- @param[in] Protocol The published unique identifier of the protocol.
- @param[out] Interface Supplies the address where a pointer to the corresponding Protocol
+ @param Handle The handle being queried.
+ @param Protocol The published unique identifier of the protocol.
+ @param Interface Supplies the address where a pointer to the corresponding Protocol
Interface is returned.
@retval EFI_SUCCESS The interface information for the specified protocol was returned.
@@ -1274,18 +1281,18 @@ EFI_STATUS
Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the
handle, it opens the protocol on behalf of the calling agent.
- @param[in] Handle The handle for the protocol interface that is being opened.
- @param[in] Protocol The published unique identifier of the protocol.
- @param[out] Interface Supplies the address where a pointer to the corresponding Protocol
+ @param Handle The handle for the protocol interface that is being opened.
+ @param Protocol The published unique identifier of the protocol.
+ @param Interface Supplies the address where a pointer to the corresponding Protocol
Interface is returned.
- @param[in] AgentHandle The handle of the agent that is opening the protocol interface
+ @param AgentHandle The handle of the agent that is opening the protocol interface
specified by Protocol and Interface.
- @param[in] ControllerHandle If the agent that is opening a protocol is a driver that follows the
+ @param ControllerHandle If the agent that is opening a protocol is a driver that follows the
UEFI Driver Model, then this parameter is the controller handle
that requires the protocol interface. If the agent does not follow
the UEFI Driver Model, then this parameter is optional and may
be NULL.
- @param[in] Attributes The open mode of the protocol interface specified by Handle
+ @param Attributes The open mode of the protocol interface specified by Handle
and Protocol.
@retval EFI_SUCCESS An item was added to the open list for the protocol interface, and the
@@ -1312,11 +1319,11 @@ EFI_STATUS
/**
Closes a protocol on a handle that was opened using OpenProtocol().
- @param[in] Handle The handle for the protocol interface that was previously opened
+ @param Handle The handle for the protocol interface that was previously opened
with OpenProtocol(), and is now being closed.
- @param[in] Protocol The published unique identifier of the protocol.
- @param[in] AgentHandle The handle of the agent that is closing the protocol interface.
- @param[in] ControllerHandle If the agent that opened a protocol is a driver that follows the
+ @param Protocol The published unique identifier of the protocol.
+ @param AgentHandle The handle of the agent that is closing the protocol interface.
+ @param ControllerHandle If the agent that opened a protocol is a driver that follows the
UEFI Driver Model, then this parameter is the controller handle
that required the protocol interface.
@@ -1352,11 +1359,11 @@ typedef struct {
/**
Retrieves the list of agents that currently have a protocol interface opened.
- @param[in] Handle The handle for the protocol interface that is being queried.
- @param[in] Protocol The published unique identifier of the protocol.
- @param[out] EntryBuffer A pointer to a buffer of open protocol information in the form of
+ @param Handle The handle for the protocol interface that is being queried.
+ @param Protocol The published unique identifier of the protocol.
+ @param EntryBuffer A pointer to a buffer of open protocol information in the form of
EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
- @param[out] EntryCount A pointer to the number of entries in EntryBuffer.
+ @param EntryCount A pointer to the number of entries in EntryBuffer.
@retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, and the
number of entries was returned EntryCount.
@@ -1377,12 +1384,12 @@ EFI_STATUS
Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
from pool.
- @param[in] Handle The handle from which to retrieve the list of protocol interface
- GUIDs.
- @param[out] ProtocolBuffer A pointer to the list of protocol interface GUID pointers that are
- installed on Handle.
- @param[out] ProtocolBufferCount A pointer to the number of GUID pointers present in
- ProtocolBuffer.
+ @param Handle The handle from which to retrieve the list of protocol interface
+ GUIDs.
+ @param ProtocolBuffer A pointer to the list of protocol interface GUID pointers that are
+ installed on Handle.
+ @param ProtocolBufferCount A pointer to the number of GUID pointers present in
+ ProtocolBuffer.
@retval EFI_SUCCESS The list of protocol interface GUIDs installed on Handle was returned in
ProtocolBuffer. The number of protocol interface GUIDs was
@@ -1405,10 +1412,10 @@ EFI_STATUS
/**
Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
- @param[in] Protocol The numeric ID of the protocol for which the event is to be registered.
- @param[in] Event Event that is to be signaled whenever a protocol interface is registered
+ @param Protocol The numeric ID of the protocol for which the event is to be registered.
+ @param Event Event that is to be signaled whenever a protocol interface is registered
for Protocol.
- @param[out] Registration A pointer to a memory location to receive the registration value.
+ @param Registration A pointer to a memory location to receive the registration value.
@retval EFI_SUCCESS The notification event has been registered.
@retval EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated.
@@ -1447,14 +1454,14 @@ typedef enum {
/**
Returns an array of handles that support a specified protocol.
- @param[in] SearchType Specifies which handle(s) are to be returned.
- @param[in] Protocol Specifies the protocol to search by.
- @param[in] SearchKey Specifies the search key.
- @param[in, out] BufferSize On input, the size in bytes of Buffer. On output, the size in bytes of
+ @param SearchType Specifies which handle(s) are to be returned.
+ @param Protocol Specifies the protocol to search by.
+ @param SearchKey Specifies the search key.
+ @param BufferSize On input, the size in bytes of Buffer. On output, the size in bytes of
the array returned in Buffer (if the buffer was large enough) or the
size, in bytes, of the buffer needed to obtain the array (if the buffer was
not large enough).
- @param[out] Buffer The buffer in which the array is returned.
+ @param Buffer The buffer in which the array is returned.
@retval EFI_SUCCESS The array of handles was returned.
@retval EFI_NOT_FOUND No handles match the search.
@@ -1479,11 +1486,11 @@ EFI_STATUS
/**
Locates the handle to a device on the device path that supports the specified protocol.
- @param[in] Protocol Specifies the protocol to search for.
- @param[in, out] DevicePath On input, a pointer to a pointer to the device path. On output, the device
+ @param Protocol Specifies the protocol to search for.
+ @param DevicePath On input, a pointer to a pointer to the device path. On output, the device
path pointer is modified to point to the remaining part of the device
path.
- @param[out] Device A pointer to the returned device handle.
+ @param Device A pointer to the returned device handle.
@retval EFI_SUCCESS The resulting handle was returned.
@retval EFI_NOT_FOUND No handles match the search.
@@ -1503,8 +1510,8 @@ EFI_STATUS
/**
Adds, updates, or removes a configuration table entry from the EFI System Table.
- @param[in] Guid A pointer to the GUID for the entry to add, update, or remove.
- @param[in] Table A pointer to the configuration table for the entry to add, update, or
+ @param Guid A pointer to the GUID for the entry to add, update, or remove.
+ @param Table A pointer to the configuration table for the entry to add, update, or
remove. May be NULL.
@retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
@@ -1523,12 +1530,12 @@ EFI_STATUS
/**
Returns an array of handles that support the requested protocol in a buffer allocated from pool.
- @param[in] SearchType Specifies which handle(s) are to be returned.
- @param[in] Protocol Provides the protocol to search by.
+ @param SearchType Specifies which handle(s) are to be returned.
+ @param Protocol Provides the protocol to search by.
This parameter is only valid for a SearchType of ByProtocol.
- @param[in] SearchKey Supplies the search key depending on the SearchType.
- @param[in, out] NoHandles The number of handles returned in Buffer.
- @param[out] Buffer A pointer to the buffer to return the requested array of handles that
+ @param SearchKey Supplies the search key depending on the SearchType.
+ @param NoHandles The number of handles returned in Buffer.
+ @param Buffer A pointer to the buffer to return the requested array of handles that
support Protocol.
@retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of
@@ -1552,10 +1559,10 @@ EFI_STATUS
/**
Returns the first protocol instance that matches the given protocol.
- @param[in] Protocol Provides the protocol to search for.
- @param[in] Registration Optional registration key returned from
+ @param Protocol Provides the protocol to search for.
+ @param Registration Optional registration key returned from
RegisterProtocolNotify().
- @param[out] Interface On return, a pointer to the first interface that matches Protocol and
+ @param Interface On return, a pointer to the first interface that matches Protocol and
Registration.
@retval EFI_SUCCESS A protocol instance matching Protocol was found and returned in
@@ -1650,13 +1657,13 @@ typedef struct {
be passed into ResetSystem() and will cause the capsule to be processed by the firmware as
part of the reset process.
- @param[in] CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
- being passed into update capsule.
- @param[in] CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
- CaspuleHeaderArray.
- @param[in] ScatterGatherList Physical pointer to a set of
- EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the
- location in physical memory of a set of capsules.
+ @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
+ being passed into update capsule.
+ @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
+ CaspuleHeaderArray.
+ @param ScatterGatherList Physical pointer to a set of
+ EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the
+ location in physical memory of a set of capsules.
@retval EFI_SUCCESS Valid capsule was passed. If
CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the
@@ -1684,14 +1691,14 @@ EFI_STATUS
/**
Returns if the capsule can be supported via UpdateCapsule().
- @param[in] CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
- being passed into update capsule.
- @param[in] CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
- CaspuleHeaderArray.
- @param[out] MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can
- support as an argument to UpdateCapsule() via
- CapsuleHeaderArray and ScatterGatherList.
- @param[out] ResetType Returns the type of reset required for the capsule update.
+ @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
+ being passed into update capsule.
+ @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
+ CaspuleHeaderArray.
+ @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can
+ support as an argument to UpdateCapsule() via
+ CapsuleHeaderArray and ScatterGatherList.
+ @param ResetType Returns the type of reset required for the capsule update.
@retval EFI_SUCCESS Valid answer returned.
@retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and
@@ -1716,16 +1723,16 @@ EFI_STATUS
/**
Returns information about the EFI variables.
- @param[in] Attributes Attributes bitmask to specify the type of variables on
- which to return information.
- @param[out] MaximumVariableStorageSize On output the maximum size of the storage space
- available for the EFI variables associated with the
- attributes specified.
- @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space
- available for the EFI variables associated with the
- attributes specified.
- @param[out] MaximumVariableSize Returns the maximum size of the individual EFI
- variables associated with the attributes specified.
+ @param Attributes Attributes bitmask to specify the type of variables on
+ which to return information.
+ @param MaximumVariableStorageSize On output the maximum size of the storage space
+ available for the EFI variables associated with the
+ attributes specified.
+ @param RemainingVariableStorageSize Returns the remaining size of the storage space
+ available for the EFI variables associated with the
+ attributes specified.
+ @param MaximumVariableSize Returns the maximum size of the individual EFI
+ variables associated with the attributes specified.
@retval EFI_SUCCESS Valid answer returned.
@retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied
@@ -1752,14 +1759,11 @@ EFI_STATUS
#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED 0x0000000000000004
#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED 0x0000000000000008
#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED 0x0000000000000010
-#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY 0x0000000000000040
//
// EFI Runtime Services Table
//
#define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
-#define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60))
-#define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50))
#define EFI_2_40_SYSTEM_TABLE_REVISION ((2 << 16) | (40))
#define EFI_2_31_SYSTEM_TABLE_REVISION ((2 << 16) | (31))
#define EFI_2_30_SYSTEM_TABLE_REVISION ((2 << 16) | (30))
@@ -1768,7 +1772,7 @@ EFI_STATUS
#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00))
#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10))
#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02))
-#define EFI_SYSTEM_TABLE_REVISION EFI_2_60_SYSTEM_TABLE_REVISION
+#define EFI_SYSTEM_TABLE_REVISION EFI_2_40_SYSTEM_TABLE_REVISION
#define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION
#define EFI_RUNTIME_SERVICES_SIGNATURE SIGNATURE_64 ('R','U','N','T','S','E','R','V')
@@ -2010,8 +2014,8 @@ typedef struct {
the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
both device drivers and bus drivers.
- @param[in] ImageHandle The firmware allocated handle for the UEFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
+ @param ImageHandle The firmware allocated handle for the UEFI image.
+ @param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The operation completed successfully.
@retval Others An unexpected error occurred.
@@ -2024,69 +2028,19 @@ EFI_STATUS
);
//
-// EFI Load Option. This data structure describes format of UEFI boot option variables.
-//
-// NOTE: EFI Load Option is a byte packed buffer of variable length fields.
-// The first two fields have fixed length. They are declared as members of the
-// EFI_LOAD_OPTION structure. All the other fields are variable length fields.
-// They are listed in the comment block below for reference purposes.
-//
-#pragma pack(1)
-typedef struct _EFI_LOAD_OPTION {
- ///
- /// The attributes for this load option entry. All unused bits must be zero
- /// and are reserved by the UEFI specification for future growth.
- ///
- UINT32 Attributes;
- ///
- /// Length in bytes of the FilePathList. OptionalData starts at offset
- /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength
- /// of the EFI_LOAD_OPTION descriptor.
- ///
- UINT16 FilePathListLength;
- ///
- /// The user readable description for the load option.
- /// This field ends with a Null character.
- ///
- // CHAR16 Description[];
- ///
- /// A packed array of UEFI device paths. The first element of the array is a
- /// device path that describes the device and location of the Image for this
- /// load option. The FilePathList[0] is specific to the device type. Other
- /// device paths may optionally exist in the FilePathList, but their usage is
- /// OSV specific. Each element in the array is variable length, and ends at
- /// the device path end structure. Because the size of Description is
- /// arbitrary, this data structure is not guaranteed to be aligned on a
- /// natural boundary. This data structure may have to be copied to an aligned
- /// natural boundary before it is used.
- ///
- // EFI_DEVICE_PATH_PROTOCOL FilePathList[];
- ///
- /// The remaining bytes in the load option descriptor are a binary data buffer
- /// that is passed to the loaded image. If the field is zero bytes long, a
- /// NULL pointer is passed to the loaded image. The number of bytes in
- /// OptionalData can be computed by subtracting the starting offset of
- /// OptionalData from total size in bytes of the EFI_LOAD_OPTION.
- ///
- // UINT8 OptionalData[];
-} EFI_LOAD_OPTION;
-#pragma pack()
-
-//
// EFI Load Options Attributes
//
-#define LOAD_OPTION_ACTIVE 0x00000001
-#define LOAD_OPTION_FORCE_RECONNECT 0x00000002
-#define LOAD_OPTION_HIDDEN 0x00000008
-#define LOAD_OPTION_CATEGORY 0x00001F00
-
-#define LOAD_OPTION_CATEGORY_BOOT 0x00000000
-#define LOAD_OPTION_CATEGORY_APP 0x00000100
-
-#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
-#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
-#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010
-#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300
+#define LOAD_OPTION_ACTIVE 0x00000001
+#define LOAD_OPTION_FORCE_RECONNECT 0x00000002
+#define LOAD_OPTION_HIDDEN 0x00000008
+#define LOAD_OPTION_CATEGORY 0x00001F00
+
+#define LOAD_OPTION_CATEGORY_BOOT 0x00000000
+#define LOAD_OPTION_CATEGORY_APP 0x00000100
+
+#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001
+#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002
+#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300
///
/// EFI Boot Key Data
diff --git a/roms/ipxe/src/include/ipxe/efi/X64/ProcessorBind.h b/roms/ipxe/src/include/ipxe/efi/X64/ProcessorBind.h
index b64c25c0f..4f21bb8de 100644
--- a/roms/ipxe/src/include/ipxe/efi/X64/ProcessorBind.h
+++ b/roms/ipxe/src/include/ipxe/efi/X64/ProcessorBind.h
@@ -1,7 +1,7 @@
/** @file
Processor or Compiler specific defines and types x64 (Intel 64, AMD64).
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -96,26 +96,6 @@ FILE_LICENCE ( BSD3 );
//
#pragma warning ( disable : 4206 )
-#if _MSC_VER == 1800 || _MSC_VER == 1900
-
-//
-// Disable these warnings for VS2013.
-//
-
-//
-// This warning is for potentially uninitialized local variable, and it may cause false
-// positive issues in VS2013 and VS2015 build
-//
-#pragma warning ( disable : 4701 )
-
-//
-// This warning is for potentially uninitialized local pointer variable, and it may cause
-// false positive issues in VS2013 and VS2015 build
-//
-#pragma warning ( disable : 4703 )
-
-#endif
-
#endif
@@ -271,12 +251,12 @@ typedef INT64 INTN;
///
#elif defined(_MSC_EXTENSIONS)
///
- /// Microsoft* compiler specific method for EFIAPI calling convention.
+ /// Microsoft* compiler specific method for EFIAPI calling convension
///
#define EFIAPI __cdecl
#elif defined(__GNUC__)
///
- /// Define the standard calling convention regardless of optimization level.
+ /// Define the standard calling convention reguardless of optimization level.
/// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI
/// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64)
/// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for
diff --git a/roms/ipxe/src/include/ipxe/efi/efi.h b/roms/ipxe/src/include/ipxe/efi/efi.h
index db9943a42..ab52dd9e0 100644
--- a/roms/ipxe/src/include/ipxe/efi/efi.h
+++ b/roms/ipxe/src/include/ipxe/efi/efi.h
@@ -153,15 +153,12 @@ struct efi_config_table {
*/
#define EEFI( efirc ) EPLATFORM ( EINFO_EPLATFORM, efirc )
-extern EFI_GUID efi_absolute_pointer_protocol_guid;
-extern EFI_GUID efi_apple_net_boot_protocol_guid;
extern EFI_GUID efi_arp_protocol_guid;
extern EFI_GUID efi_arp_service_binding_protocol_guid;
extern EFI_GUID efi_block_io_protocol_guid;
extern EFI_GUID efi_bus_specific_driver_override_protocol_guid;
extern EFI_GUID efi_component_name_protocol_guid;
extern EFI_GUID efi_component_name2_protocol_guid;
-extern EFI_GUID efi_console_control_protocol_guid;
extern EFI_GUID efi_device_path_protocol_guid;
extern EFI_GUID efi_dhcp4_protocol_guid;
extern EFI_GUID efi_dhcp4_service_binding_protocol_guid;
@@ -169,7 +166,6 @@ extern EFI_GUID efi_disk_io_protocol_guid;
extern EFI_GUID efi_driver_binding_protocol_guid;
extern EFI_GUID efi_graphics_output_protocol_guid;
extern EFI_GUID efi_hii_config_access_protocol_guid;
-extern EFI_GUID efi_hii_font_protocol_guid;
extern EFI_GUID efi_ip4_protocol_guid;
extern EFI_GUID efi_ip4_config_protocol_guid;
extern EFI_GUID efi_ip4_service_binding_protocol_guid;
@@ -186,43 +182,23 @@ extern EFI_GUID efi_nii31_protocol_guid;
extern EFI_GUID efi_pci_io_protocol_guid;
extern EFI_GUID efi_pci_root_bridge_io_protocol_guid;
extern EFI_GUID efi_pxe_base_code_protocol_guid;
-extern EFI_GUID efi_serial_io_protocol_guid;
extern EFI_GUID efi_simple_file_system_protocol_guid;
extern EFI_GUID efi_simple_network_protocol_guid;
-extern EFI_GUID efi_simple_pointer_protocol_guid;
-extern EFI_GUID efi_simple_text_input_protocol_guid;
-extern EFI_GUID efi_simple_text_input_ex_protocol_guid;
-extern EFI_GUID efi_simple_text_output_protocol_guid;
extern EFI_GUID efi_tcg_protocol_guid;
extern EFI_GUID efi_tcp4_protocol_guid;
extern EFI_GUID efi_tcp4_service_binding_protocol_guid;
-extern EFI_GUID efi_tree_protocol_guid;
extern EFI_GUID efi_udp4_protocol_guid;
extern EFI_GUID efi_udp4_service_binding_protocol_guid;
-extern EFI_GUID efi_uga_draw_protocol_guid;
-extern EFI_GUID efi_unicode_collation_protocol_guid;
-extern EFI_GUID efi_usb_hc_protocol_guid;
-extern EFI_GUID efi_usb2_hc_protocol_guid;
-extern EFI_GUID efi_usb_io_protocol_guid;
extern EFI_GUID efi_vlan_config_protocol_guid;
-extern EFI_GUID efi_file_info_id;
-extern EFI_GUID efi_file_system_info_id;
-
extern EFI_HANDLE efi_image_handle;
extern EFI_LOADED_IMAGE_PROTOCOL *efi_loaded_image;
extern EFI_DEVICE_PATH_PROTOCOL *efi_loaded_image_path;
extern EFI_SYSTEM_TABLE *efi_systab;
-extern const __attribute__ (( pure )) char * efi_guid_ntoa ( EFI_GUID *guid );
-extern const __attribute__ (( pure )) char *
-efi_locate_search_type_name ( EFI_LOCATE_SEARCH_TYPE search_type );
-extern const __attribute__ (( pure )) char *
-efi_open_attributes_name ( unsigned int attributes );
-extern const __attribute__ (( pure )) char *
-efi_devpath_text ( EFI_DEVICE_PATH_PROTOCOL *path );
-extern const __attribute__ (( pure )) char *
-efi_handle_name ( EFI_HANDLE handle );
+extern const char * efi_guid_ntoa ( EFI_GUID *guid );
+extern const char * efi_devpath_text ( EFI_DEVICE_PATH_PROTOCOL *path );
+extern const char * efi_handle_name ( EFI_HANDLE handle );
extern void dbg_efi_openers ( EFI_HANDLE handle, EFI_GUID *protocol );
extern void dbg_efi_protocols ( EFI_HANDLE handle );
diff --git a/roms/ipxe/src/include/ipxe/efi/efi_driver.h b/roms/ipxe/src/include/ipxe/efi/efi_driver.h
index 74ece90db..f497df3e3 100644
--- a/roms/ipxe/src/include/ipxe/efi/efi_driver.h
+++ b/roms/ipxe/src/include/ipxe/efi/efi_driver.h
@@ -19,8 +19,6 @@ struct efi_device {
struct device dev;
/** EFI device handle */
EFI_HANDLE device;
- /** EFI device path copy */
- EFI_DEVICE_PATH_PROTOCOL *path;
/** Driver for this device */
struct efi_driver *driver;
/** Driver-private data */
diff --git a/roms/ipxe/src/include/ipxe/efi/efi_pxe.h b/roms/ipxe/src/include/ipxe/efi/efi_pxe.h
deleted file mode 100644
index b356f3789..000000000
--- a/roms/ipxe/src/include/ipxe/efi/efi_pxe.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _IPXE_EFI_PXE_H
-#define _IPXE_EFI_PXE_H
-
-/** @file
- *
- * EFI PXE base code protocol
- */
-
-#include <ipxe/efi/efi.h>
-#include <ipxe/netdevice.h>
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-extern int efi_pxe_install ( EFI_HANDLE handle, struct net_device *netdev );
-extern void efi_pxe_uninstall ( EFI_HANDLE handle );
-
-#endif /* _IPXE_EFI_PXE_H */
diff --git a/roms/ipxe/src/include/ipxe/efi/efi_snp.h b/roms/ipxe/src/include/ipxe/efi/efi_snp.h
index 4c5461ec4..1e5c66626 100644
--- a/roms/ipxe/src/include/ipxe/efi/efi_snp.h
+++ b/roms/ipxe/src/include/ipxe/efi/efi_snp.h
@@ -73,14 +73,14 @@ extern int efi_snp_hii_install ( struct efi_snp_device *snpdev );
extern void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev );
extern struct efi_snp_device * find_snpdev ( EFI_HANDLE handle );
extern struct efi_snp_device * last_opened_snpdev ( void );
-extern void efi_snp_add_claim ( int delta );
+extern void efi_snp_set_claimed ( int claimed );
/**
* Claim network devices for use by iPXE
*
*/
static inline void efi_snp_claim ( void ) {
- efi_snp_add_claim ( +1 );
+ efi_snp_set_claimed ( 1 );
}
/**
@@ -88,7 +88,7 @@ static inline void efi_snp_claim ( void ) {
*
*/
static inline void efi_snp_release ( void ) {
- efi_snp_add_claim ( -1 );
+ efi_snp_set_claimed ( 0 );
}
#endif /* _IPXE_EFI_SNP_H */
diff --git a/roms/ipxe/src/include/ipxe/efi/efi_timer.h b/roms/ipxe/src/include/ipxe/efi/efi_timer.h
index c49875988..c03765393 100644
--- a/roms/ipxe/src/include/ipxe/efi/efi_timer.h
+++ b/roms/ipxe/src/include/ipxe/efi/efi_timer.h
@@ -15,22 +15,4 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define TIMER_PREFIX_efi __efi_
#endif
-/**
- * Number of ticks per second
- *
- * This is a policy decision.
- */
-#define EFI_TICKS_PER_SEC 20
-
-/**
- * Get number of ticks per second
- *
- * @ret ticks_per_sec Number of ticks per second
- */
-static inline __attribute__ (( always_inline )) unsigned long
-TIMER_INLINE ( efi, ticks_per_sec ) ( void ) {
-
- return EFI_TICKS_PER_SEC;
-}
-
#endif /* _IPXE_EFI_TIMER_H */
diff --git a/roms/ipxe/src/include/ipxe/efi/efi_usb.h b/roms/ipxe/src/include/ipxe/efi/efi_usb.h
deleted file mode 100644
index 05b4fad00..000000000
--- a/roms/ipxe/src/include/ipxe/efi/efi_usb.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef _IPXE_EFI_USB_H
-#define _IPXE_EFI_USB_H
-
-/** @file
- *
- * USB I/O protocol
- *
- */
-
-#include <ipxe/list.h>
-#include <ipxe/efi/efi.h>
-#include <ipxe/efi/efi_driver.h>
-#include <ipxe/efi/Protocol/UsbIo.h>
-#include <ipxe/usb.h>
-
-/** An EFI USB device */
-struct efi_usb_device {
- /** Name */
- const char *name;
- /** The underlying USB device */
- struct usb_device *usb;
- /** The underlying EFI device */
- struct efi_device *efidev;
- /** Configuration descriptor */
- struct usb_configuration_descriptor *config;
- /** Supported languages */
- struct usb_descriptor_header *languages;
- /** List of interfaces */
- struct list_head interfaces;
-};
-
-/** An EFI USB device interface */
-struct efi_usb_interface {
- /** Name */
- char name[32];
- /** Containing USB device */
- struct efi_usb_device *usbdev;
- /** List of interfaces */
- struct list_head list;
-
- /** Interface number */
- unsigned int interface;
- /** Alternate setting */
- unsigned int alternate;
- /** EFI handle */
- EFI_HANDLE handle;
- /** USB I/O protocol */
- EFI_USB_IO_PROTOCOL usbio;
- /** Device path */
- EFI_DEVICE_PATH_PROTOCOL *path;
-
- /** Opened endpoints */
- struct efi_usb_endpoint *endpoint[32];
-};
-
-/** An EFI USB device endpoint */
-struct efi_usb_endpoint {
- /** EFI USB device interface */
- struct efi_usb_interface *usbintf;
- /** USB endpoint */
- struct usb_endpoint ep;
-
- /** Most recent synchronous completion status */
- int rc;
-
- /** Asynchronous timer event */
- EFI_EVENT event;
- /** Asynchronous callback handler */
- EFI_ASYNC_USB_TRANSFER_CALLBACK callback;
- /** Asynchronous callback context */
- void *context;
-};
-
-/** Asynchronous transfer fill level
- *
- * This is a policy decision.
- */
-#define EFI_USB_ASYNC_FILL 2
-
-#endif /* _IPXE_EFI_USB_H */
diff --git a/roms/ipxe/src/include/ipxe/efi/efi_utils.h b/roms/ipxe/src/include/ipxe/efi/efi_utils.h
index 67acba17e..57268daf7 100644
--- a/roms/ipxe/src/include/ipxe/efi/efi_utils.h
+++ b/roms/ipxe/src/include/ipxe/efi/efi_utils.h
@@ -15,7 +15,6 @@ struct device;
extern EFI_DEVICE_PATH_PROTOCOL *
efi_devpath_end ( EFI_DEVICE_PATH_PROTOCOL *path );
-extern size_t efi_devpath_len ( EFI_DEVICE_PATH_PROTOCOL *path );
extern int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol,
EFI_HANDLE *parent );
extern int efi_child_add ( EFI_HANDLE parent, EFI_HANDLE child );
diff --git a/roms/ipxe/src/include/ipxe/eoib.h b/roms/ipxe/src/include/ipxe/eoib.h
deleted file mode 100644
index 93f496c36..000000000
--- a/roms/ipxe/src/include/ipxe/eoib.h
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef _IPXE_EOIB_H
-#define _IPXE_EOIB_H
-
-/** @file
- *
- * Ethernet over Infiniband
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <stdint.h>
-#include <byteswap.h>
-#include <ipxe/netdevice.h>
-#include <ipxe/infiniband.h>
-#include <ipxe/ib_mcast.h>
-
-/** An EoIB header */
-struct eoib_header {
- /** Signature */
- uint16_t magic;
- /** Reserved */
- uint16_t reserved;
-} __attribute__ (( packed ));
-
-/** EoIB magic signature */
-#define EOIB_MAGIC 0x8919
-
-/** An EoIB device */
-struct eoib_device {
- /** Name */
- const char *name;
- /** Network device */
- struct net_device *netdev;
- /** Underlying Infiniband device */
- struct ib_device *ibdev;
- /** List of EoIB devices */
- struct list_head list;
- /** Broadcast address */
- struct ib_address_vector broadcast;
-
- /** Completion queue */
- struct ib_completion_queue *cq;
- /** Queue pair */
- struct ib_queue_pair *qp;
- /** Broadcast group membership */
- struct ib_mc_membership membership;
-
- /** Peer cache */
- struct list_head peers;
-
- /** Send duplicate packet to gateway (or NULL)
- *
- * @v eoib EoIB device
- * @v original Original I/O buffer
- */
- void ( * duplicate ) ( struct eoib_device *eoib,
- struct io_buffer *original );
- /** Gateway (if any) */
- struct ib_address_vector gateway;
- /** Multicast group additional component mask */
- unsigned int mask;
-};
-
-/**
- * Check if EoIB device uses a gateway
- *
- * @v eoib EoIB device
- * @v has_gw EoIB device uses a gateway
- */
-static inline int eoib_has_gateway ( struct eoib_device *eoib ) {
-
- return ( eoib->duplicate != NULL );
-}
-
-/**
- * Force creation of multicast group
- *
- * @v eoib EoIB device
- */
-static inline void eoib_force_group_creation ( struct eoib_device *eoib ) {
-
- /* Some dubious EoIB implementations require each endpoint to
- * force the creation of the multicast group. Yes, this makes
- * it impossible for the group parameters (e.g. SL) to ever be
- * modified without breaking backwards compatiblity with every
- * existing driver.
- */
- eoib->mask = ( IB_SA_MCMEMBER_REC_PKEY | IB_SA_MCMEMBER_REC_QKEY |
- IB_SA_MCMEMBER_REC_SL | IB_SA_MCMEMBER_REC_FLOW_LABEL |
- IB_SA_MCMEMBER_REC_TRAFFIC_CLASS );
-}
-
-extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr,
- struct ib_address_vector *broadcast,
- const char *name );
-extern struct eoib_device * eoib_find ( struct ib_device *ibdev,
- const uint8_t *hw_addr );
-extern void eoib_destroy ( struct eoib_device *eoib );
-extern void eoib_set_gateway ( struct eoib_device *eoib,
- struct ib_address_vector *av );
-
-#endif /* _IPXE_EOIB_H */
diff --git a/roms/ipxe/src/include/ipxe/errfile.h b/roms/ipxe/src/include/ipxe/errfile.h
index f743dae6f..e21c95938 100644
--- a/roms/ipxe/src/include/ipxe/errfile.h
+++ b/roms/ipxe/src/include/ipxe/errfile.h
@@ -85,7 +85,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_uhci ( ERRFILE_DRIVER | 0x000b0000 )
#define ERRFILE_usbhid ( ERRFILE_DRIVER | 0x000c0000 )
#define ERRFILE_usbkbd ( ERRFILE_DRIVER | 0x000d0000 )
-#define ERRFILE_usbio ( ERRFILE_DRIVER | 0x000e0000 )
#define ERRFILE_nvs ( ERRFILE_DRIVER | 0x00100000 )
#define ERRFILE_spi ( ERRFILE_DRIVER | 0x00110000 )
@@ -183,15 +182,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_smsc75xx ( ERRFILE_DRIVER | 0x00770000 )
#define ERRFILE_intelvf ( ERRFILE_DRIVER | 0x00780000 )
#define ERRFILE_intelxvf ( ERRFILE_DRIVER | 0x00790000 )
-#define ERRFILE_smsc95xx ( ERRFILE_DRIVER | 0x007a0000 )
-#define ERRFILE_acm ( ERRFILE_DRIVER | 0x007b0000 )
-#define ERRFILE_eoib ( ERRFILE_DRIVER | 0x007c0000 )
-#define ERRFILE_golan ( ERRFILE_DRIVER | 0x007d0000 )
-#define ERRFILE_flexboot_nodnic ( ERRFILE_DRIVER | 0x007e0000 )
-#define ERRFILE_virtio_pci ( ERRFILE_DRIVER | 0x007f0000 )
-#define ERRFILE_pciea ( ERRFILE_DRIVER | 0x00c00000 )
-#define ERRFILE_axge ( ERRFILE_DRIVER | 0x00c10000 )
-#define ERRFILE_thunderx ( ERRFILE_DRIVER | 0x00c20000 )
#define ERRFILE_aoe ( ERRFILE_NET | 0x00000000 )
#define ERRFILE_arp ( ERRFILE_NET | 0x00010000 )
@@ -265,8 +255,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_peerdisc ( ERRFILE_NET | 0x00450000 )
#define ERRFILE_peerblk ( ERRFILE_NET | 0x00460000 )
#define ERRFILE_peermux ( ERRFILE_NET | 0x00470000 )
-#define ERRFILE_xsigo ( ERRFILE_NET | 0x00480000 )
-#define ERRFILE_ntp ( ERRFILE_NET | 0x00490000 )
#define ERRFILE_image ( ERRFILE_IMAGE | 0x00000000 )
#define ERRFILE_elf ( ERRFILE_IMAGE | 0x00010000 )
@@ -351,11 +339,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_vmbus ( ERRFILE_OTHER | 0x00470000 )
#define ERRFILE_efi_time ( ERRFILE_OTHER | 0x00480000 )
#define ERRFILE_efi_watchdog ( ERRFILE_OTHER | 0x00490000 )
-#define ERRFILE_efi_pxe ( ERRFILE_OTHER | 0x004a0000 )
-#define ERRFILE_efi_usb ( ERRFILE_OTHER | 0x004b0000 )
-#define ERRFILE_efi_fbcon ( ERRFILE_OTHER | 0x004c0000 )
-#define ERRFILE_efi_local ( ERRFILE_OTHER | 0x004d0000 )
-#define ERRFILE_efi_entropy ( ERRFILE_OTHER | 0x004e0000 )
/** @} */
diff --git a/roms/ipxe/src/include/ipxe/fbcon.h b/roms/ipxe/src/include/ipxe/fbcon.h
index 42ffca3d7..d442bb918 100644
--- a/roms/ipxe/src/include/ipxe/fbcon.h
+++ b/roms/ipxe/src/include/ipxe/fbcon.h
@@ -12,11 +12,15 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
#include <ipxe/ansiesc.h>
#include <ipxe/uaccess.h>
-#include <ipxe/console.h>
+
+struct pixel_buffer;
/** Character width, in pixels */
#define FBCON_CHAR_WIDTH 9
+/** Character height, in pixels */
+#define FBCON_CHAR_HEIGHT 16
+
/** Bold colour modifier (RGB value) */
#define FBCON_BOLD 0x555555
@@ -26,21 +30,14 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** A font glyph */
struct fbcon_font_glyph {
/** Row bitmask */
- uint8_t bitmask[0];
-};
+ uint8_t bitmask[FBCON_CHAR_HEIGHT];
+} __attribute__ (( packed ));
/** A font definition */
struct fbcon_font {
- /** Character height (in pixels) */
- unsigned int height;
- /**
- * Get character glyph
- *
- * @v character Character
- * @v glyph Character glyph to fill in
- */
- void ( * glyph ) ( unsigned int character, uint8_t *glyph );
-};
+ /** Character glyphs */
+ userptr_t start;
+} __attribute__ (( packed ));
/** A frame buffer geometry
*
@@ -148,9 +145,10 @@ struct fbcon {
extern int fbcon_init ( struct fbcon *fbcon, userptr_t start,
struct fbcon_geometry *pixel,
+ struct fbcon_margin *margin,
struct fbcon_colour_map *map,
struct fbcon_font *font,
- struct console_configuration *config );
+ struct pixel_buffer *pixbuf );
extern void fbcon_fini ( struct fbcon *fbcon );
extern void fbcon_putchar ( struct fbcon *fbcon, int character );
diff --git a/roms/ipxe/src/include/ipxe/ib_cmrc.h b/roms/ipxe/src/include/ipxe/ib_cmrc.h
index f3276e6ef..47ad27fa6 100644
--- a/roms/ipxe/src/include/ipxe/ib_cmrc.h
+++ b/roms/ipxe/src/include/ipxe/ib_cmrc.h
@@ -12,8 +12,9 @@ FILE_LICENCE ( BSD2 );
#include <ipxe/infiniband.h>
#include <ipxe/xfer.h>
-extern int ib_cmrc_open ( struct interface *xfer, struct ib_device *ibdev,
- union ib_gid *dgid, union ib_guid *service_id,
- const char *name );
+extern int ib_cmrc_open ( struct interface *xfer,
+ struct ib_device *ibdev,
+ union ib_gid *dgid,
+ union ib_guid *service_id );
#endif /* _IPXE_IB_CMRC_H */
diff --git a/roms/ipxe/src/include/ipxe/ib_mad.h b/roms/ipxe/src/include/ipxe/ib_mad.h
index 134274026..ae1eea7e4 100644
--- a/roms/ipxe/src/include/ipxe/ib_mad.h
+++ b/roms/ipxe/src/include/ipxe/ib_mad.h
@@ -144,9 +144,6 @@ struct ib_port_info {
#define IB_LINK_SPEED_SDR 0x01
#define IB_LINK_SPEED_DDR 0x02
#define IB_LINK_SPEED_QDR 0x04
-#define IB_LINK_SPEED_FDR10 0x08
-#define IB_LINK_SPEED_FDR 0x10
-#define IB_LINK_SPEED_EDR 0x20
#define IB_PORT_STATE_DOWN 0x01
#define IB_PORT_STATE_INIT 0x02
@@ -219,25 +216,8 @@ struct ib_sa_hdr {
uint32_t comp_mask[2];
} __attribute__ (( packed ));
-#define IB_SA_ATTR_SERVICE_REC 0x31
-#define IB_SA_ATTR_PATH_REC 0x35
#define IB_SA_ATTR_MC_MEMBER_REC 0x38
-
-struct ib_service_record {
- uint64_t id;
- union ib_gid gid;
- uint16_t pkey;
- uint16_t reserved;
- uint32_t lease;
- uint8_t key[16];
- char name[64];
- uint8_t data8[16];
- uint16_t data16[8];
- uint32_t data32[4];
- uint64_t data64[2];
-} __attribute__ (( packed ));
-
-#define IB_SA_SERVICE_REC_NAME (1<<6)
+#define IB_SA_ATTR_PATH_REC 0x35
struct ib_path_record {
uint32_t reserved0[2];
@@ -295,7 +275,6 @@ struct ib_mc_member_record {
#define IB_SA_MCMEMBER_REC_PROXY_JOIN (1<<17)
union ib_sa_data {
- struct ib_service_record service_record;
struct ib_path_record path_record;
struct ib_mc_member_record mc_member_record;
} __attribute__ (( packed ));
@@ -525,12 +504,6 @@ union ib_mad_class_specific {
struct ib_smp_class_specific smp;
} __attribute__ (( packed ));
-/** A management datagram transaction identifier */
-struct ib_mad_tid {
- uint32_t high;
- uint32_t low;
-} __attribute__ (( packed ));
-
/** A management datagram common header
*
* Defined in section 13.4.2 of the IBA.
@@ -542,7 +515,7 @@ struct ib_mad_hdr {
uint8_t method;
uint16_t status;
union ib_mad_class_specific class_specific;
- struct ib_mad_tid tid;
+ uint32_t tid[2];
uint16_t attr_id;
uint8_t reserved[2];
uint32_t attr_mod;
diff --git a/roms/ipxe/src/include/ipxe/ib_mcast.h b/roms/ipxe/src/include/ipxe/ib_mcast.h
index df348bd9b..564066975 100644
--- a/roms/ipxe/src/include/ipxe/ib_mcast.h
+++ b/roms/ipxe/src/include/ipxe/ib_mcast.h
@@ -17,25 +17,30 @@ struct ib_mad_transaction;
struct ib_mc_membership {
/** Queue pair */
struct ib_queue_pair *qp;
- /** Address vector */
- struct ib_address_vector *av;
- /** Attached to multicast GID */
- int attached;
+ /** Multicast GID */
+ union ib_gid gid;
/** Multicast group join transaction */
struct ib_mad_transaction *madx;
/** Handle join success/failure
*
+ * @v ibdev Infiniband device
+ * @v qp Queue pair
* @v membership Multicast group membership
* @v rc Status code
+ * @v mad Response MAD (or NULL on error)
*/
- void ( * complete ) ( struct ib_mc_membership *membership, int rc );
+ void ( * complete ) ( struct ib_device *ibdev, struct ib_queue_pair *qp,
+ struct ib_mc_membership *membership, int rc,
+ union ib_mad *mad );
};
extern int ib_mcast_join ( struct ib_device *ibdev, struct ib_queue_pair *qp,
struct ib_mc_membership *membership,
- struct ib_address_vector *av, unsigned int mask,
- void ( * joined ) ( struct ib_mc_membership *memb,
- int rc ) );
+ union ib_gid *gid,
+ void ( * joined ) ( struct ib_device *ibdev,
+ struct ib_queue_pair *qp,
+ struct ib_mc_membership *memb,
+ int rc, union ib_mad *mad ) );
extern void ib_mcast_leave ( struct ib_device *ibdev, struct ib_queue_pair *qp,
struct ib_mc_membership *membership );
diff --git a/roms/ipxe/src/include/ipxe/ib_packet.h b/roms/ipxe/src/include/ipxe/ib_packet.h
index 747f96399..f275fcb09 100644
--- a/roms/ipxe/src/include/ipxe/ib_packet.h
+++ b/roms/ipxe/src/include/ipxe/ib_packet.h
@@ -19,7 +19,6 @@ union ib_guid {
uint8_t bytes[8];
uint16_t words[4];
uint32_t dwords[2];
- uint64_t qword;
};
/** Infiniband Globally Unique Identifier debug message format */
@@ -34,7 +33,6 @@ union ib_gid {
uint8_t bytes[16];
uint16_t words[8];
uint32_t dwords[4];
- uint64_t qwords[2];
struct {
union ib_guid prefix;
union ib_guid guid;
@@ -48,9 +46,6 @@ union ib_gid {
#define IB_GID_ARGS( gid ) \
IB_GUID_ARGS ( &(gid)->s.prefix ), IB_GUID_ARGS ( &(gid)->s.guid )
-/** Test for multicast GID */
-#define IB_GID_MULTICAST( gid ) ( (gid)->bytes[0] == 0xff )
-
/** An Infiniband Local Route Header */
struct ib_local_route_header {
/** Virtual lane and link version */
diff --git a/roms/ipxe/src/include/ipxe/ib_service.h b/roms/ipxe/src/include/ipxe/ib_service.h
deleted file mode 100644
index 88afe4e65..000000000
--- a/roms/ipxe/src/include/ipxe/ib_service.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _IPXE_IB_SERVICE_H
-#define _IPXE_IB_SERVICE_H
-
-/** @file
- *
- * Infiniband service records
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <ipxe/infiniband.h>
-#include <ipxe/ib_mi.h>
-
-extern struct ib_mad_transaction *
-ib_create_service_madx ( struct ib_device *ibdev,
- struct ib_mad_interface *mi, const char *name,
- struct ib_mad_transaction_operations *op );
-
-#endif /* _IPXE_IB_SERVICE_H */
diff --git a/roms/ipxe/src/include/ipxe/if_arp.h b/roms/ipxe/src/include/ipxe/if_arp.h
index 9d7b03fe8..4eb1f80b7 100644
--- a/roms/ipxe/src/include/ipxe/if_arp.h
+++ b/roms/ipxe/src/include/ipxe/if_arp.h
@@ -99,14 +99,4 @@ static inline void * arp_target_pa ( struct arphdr *arphdr ) {
return ( arp_target_ha ( arphdr ) + arphdr->ar_hln );
}
-/** ARP packet length
- *
- * @v arphdr ARP header
- * @ret len Length (including header)
- */
-static inline size_t arp_len ( struct arphdr *arphdr ) {
- return ( sizeof ( *arphdr ) +
- ( 2 * ( arphdr->ar_hln + arphdr->ar_pln ) ) );
-}
-
#endif /* _IPXE_IF_ARP_H */
diff --git a/roms/ipxe/src/include/ipxe/image.h b/roms/ipxe/src/include/ipxe/image.h
index f33feddad..6abd7a2d2 100644
--- a/roms/ipxe/src/include/ipxe/image.h
+++ b/roms/ipxe/src/include/ipxe/image.h
@@ -158,7 +158,6 @@ static inline struct image * first_image ( void ) {
}
extern struct image * alloc_image ( struct uri *uri );
-extern int image_set_uri ( struct image *image, struct uri *uri );
extern int image_set_name ( struct image *image, const char *name );
extern int image_set_cmdline ( struct image *image, const char *cmdline );
extern int register_image ( struct image *image );
diff --git a/roms/ipxe/src/include/ipxe/infiniband.h b/roms/ipxe/src/include/ipxe/infiniband.h
index d7ecd1623..87cfe5082 100644
--- a/roms/ipxe/src/include/ipxe/infiniband.h
+++ b/roms/ipxe/src/include/ipxe/infiniband.h
@@ -15,7 +15,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/tables.h>
#include <ipxe/ib_packet.h>
#include <ipxe/ib_mad.h>
-#include <ipxe/if_ether.h>
/** Subnet management interface QPN */
#define IB_QPN_SMI 0
@@ -159,8 +158,6 @@ struct ib_queue_pair {
struct ib_device *ibdev;
/** List of queue pairs on this Infiniband device */
struct list_head list;
- /** Queue pair name */
- const char *name;
/** Queue pair number */
unsigned long qpn;
/** Externally-visible queue pair number
@@ -391,9 +388,6 @@ struct ib_device_operations {
union ib_mad *mad );
};
-/** Maximum length of an Infiniband device name */
-#define IBDEV_NAME_LEN 8
-
/** An Infiniband device */
struct ib_device {
/** Reference counter */
@@ -402,10 +396,6 @@ struct ib_device {
struct list_head list;
/** List of open Infiniband devices */
struct list_head open_list;
- /** Index of this Infiniband device */
- unsigned int index;
- /** Name of this Infiniband device */
- char name[IBDEV_NAME_LEN];
/** Underlying device */
struct device *dev;
/** List of completion queues */
@@ -458,11 +448,10 @@ struct ib_device {
/** General services interface */
struct ib_mad_interface *gsi;
- /** IPoIB LEMAC (if non-default) */
- uint8_t lemac[ETH_ALEN];
-
/** Driver private data */
void *drv_priv;
+ /** Owner private data */
+ void *owner_priv;
};
/** An Infiniband upper-layer driver */
@@ -504,7 +493,7 @@ extern struct ib_queue_pair *
ib_create_qp ( struct ib_device *ibdev, enum ib_queue_pair_type type,
unsigned int num_send_wqes, struct ib_completion_queue *send_cq,
unsigned int num_recv_wqes, struct ib_completion_queue *recv_cq,
- struct ib_queue_pair_operations *op, const char *name );
+ struct ib_queue_pair_operations *op );
extern int ib_modify_qp ( struct ib_device *ibdev, struct ib_queue_pair *qp );
extern void ib_destroy_qp ( struct ib_device *ibdev,
struct ib_queue_pair *qp );
@@ -706,4 +695,26 @@ ib_get_drvdata ( struct ib_device *ibdev ) {
return ibdev->drv_priv;
}
+/**
+ * Set Infiniband device owner-private data
+ *
+ * @v ibdev Infiniband device
+ * @v priv Private data
+ */
+static inline __always_inline void
+ib_set_ownerdata ( struct ib_device *ibdev, void *priv ) {
+ ibdev->owner_priv = priv;
+}
+
+/**
+ * Get Infiniband device owner-private data
+ *
+ * @v ibdev Infiniband device
+ * @ret priv Private data
+ */
+static inline __always_inline void *
+ib_get_ownerdata ( struct ib_device *ibdev ) {
+ return ibdev->owner_priv;
+}
+
#endif /* _IPXE_INFINIBAND_H */
diff --git a/roms/ipxe/src/include/ipxe/io.h b/roms/ipxe/src/include/ipxe/io.h
index fe1388191..af767915d 100644
--- a/roms/ipxe/src/include/ipxe/io.h
+++ b/roms/ipxe/src/include/ipxe/io.h
@@ -20,8 +20,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
#include <ipxe/api.h>
-#include <ipxe/iomap.h>
#include <config/ioapi.h>
+#include <ipxe/uaccess.h>
/** Page size */
#define PAGE_SIZE ( 1 << PAGE_SHIFT )
@@ -197,6 +197,30 @@ static inline __always_inline void * bus_to_virt ( unsigned long bus_addr ) {
}
/**
+ * Map bus address as an I/O address
+ *
+ * @v bus_addr Bus address
+ * @v len Length of region
+ * @ret io_addr I/O address
+ */
+void * ioremap ( unsigned long bus_addr, size_t len );
+
+/**
+ * Unmap I/O address
+ *
+ * @v io_addr I/O address
+ */
+void iounmap ( volatile const void *io_addr );
+
+/**
+ * Convert I/O address to bus address (for debug only)
+ *
+ * @v io_addr I/O address
+ * @ret bus_addr Bus address
+ */
+unsigned long io_to_bus ( volatile const void *io_addr );
+
+/**
* Read byte from memory-mapped device
*
* @v io_addr I/O address
diff --git a/roms/ipxe/src/include/ipxe/iomap.h b/roms/ipxe/src/include/ipxe/iomap.h
deleted file mode 100644
index b8ded38ef..000000000
--- a/roms/ipxe/src/include/ipxe/iomap.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _IPXE_IOMAP_H
-#define _IPXE_IOMAP_H
-
-/** @file
- *
- * iPXE I/O mapping API
- *
- * The I/O mapping API provides methods for mapping and unmapping I/O
- * devices.
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <stdint.h>
-#include <ipxe/api.h>
-#include <config/ioapi.h>
-#include <ipxe/uaccess.h>
-
-/**
- * Calculate static inline I/O mapping API function name
- *
- * @v _prefix Subsystem prefix
- * @v _api_func API function
- * @ret _subsys_func Subsystem API function
- */
-#define IOMAP_INLINE( _subsys, _api_func ) \
- SINGLE_API_INLINE ( IOMAP_PREFIX_ ## _subsys, _api_func )
-
-/**
- * Provide an I/O mapping API implementation
- *
- * @v _prefix Subsystem prefix
- * @v _api_func API function
- * @v _func Implementing function
- */
-#define PROVIDE_IOMAP( _subsys, _api_func, _func ) \
- PROVIDE_SINGLE_API ( IOMAP_PREFIX_ ## _subsys, _api_func, _func )
-
-/**
- * Provide a static inline I/O mapping API implementation
- *
- * @v _prefix Subsystem prefix
- * @v _api_func API function
- */
-#define PROVIDE_IOMAP_INLINE( _subsys, _api_func ) \
- PROVIDE_SINGLE_API_INLINE ( IOMAP_PREFIX_ ## _subsys, _api_func )
-
-/* Include all architecture-independent I/O API headers */
-#include <ipxe/iomap_virt.h>
-
-/* Include all architecture-dependent I/O API headers */
-#include <bits/iomap.h>
-
-/**
- * Map bus address as an I/O address
- *
- * @v bus_addr Bus address
- * @v len Length of region
- * @ret io_addr I/O address
- */
-void * ioremap ( unsigned long bus_addr, size_t len );
-
-/**
- * Unmap I/O address
- *
- * @v io_addr I/O address
- */
-void iounmap ( volatile const void *io_addr );
-
-/**
- * Convert I/O address to bus address (for debug only)
- *
- * @v io_addr I/O address
- * @ret bus_addr Bus address
- */
-unsigned long io_to_bus ( volatile const void *io_addr );
-
-#endif /* _IPXE_IOMAP_H */
diff --git a/roms/ipxe/src/include/ipxe/iomap_virt.h b/roms/ipxe/src/include/ipxe/iomap_virt.h
deleted file mode 100644
index 4962b7c37..000000000
--- a/roms/ipxe/src/include/ipxe/iomap_virt.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _IPXE_IOMAP_VIRT_H
-#define _IPXE_IOMAP_VIRT_H
-
-/** @file
- *
- * iPXE I/O mapping API using phys_to_virt()
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#ifdef IOMAP_VIRT
-#define IOMAP_PREFIX_virt
-#else
-#define IOMAP_PREFIX_virt __virt_
-#endif
-
-static inline __always_inline void *
-IOMAP_INLINE ( virt, ioremap ) ( unsigned long bus_addr, size_t len __unused ) {
- return ( bus_addr ? phys_to_virt ( bus_addr ) : NULL );
-}
-
-static inline __always_inline void
-IOMAP_INLINE ( virt, iounmap ) ( volatile const void *io_addr __unused ) {
- /* Nothing to do */
-}
-
-static inline __always_inline unsigned long
-IOMAP_INLINE ( virt, io_to_bus ) ( volatile const void *io_addr ) {
- return virt_to_phys ( io_addr );
-}
-
-#endif /* _IPXE_IOMAP_VIRT_H */
diff --git a/roms/ipxe/src/include/ipxe/ipoib.h b/roms/ipxe/src/include/ipxe/ipoib.h
index 065eeabb7..b34dd32d0 100644
--- a/roms/ipxe/src/include/ipxe/ipoib.h
+++ b/roms/ipxe/src/include/ipxe/ipoib.h
@@ -62,6 +62,5 @@ struct ipoib_remac {
extern const char * ipoib_ntoa ( const void *ll_addr );
extern struct net_device * alloc_ipoibdev ( size_t priv_size );
-extern struct net_device * ipoib_netdev ( struct ib_device *ibdev );
#endif /* _IPXE_IPOIB_H */
diff --git a/roms/ipxe/src/include/ipxe/linux_compat.h b/roms/ipxe/src/include/ipxe/linux_compat.h
new file mode 100644
index 000000000..4704c4817
--- /dev/null
+++ b/roms/ipxe/src/include/ipxe/linux_compat.h
@@ -0,0 +1,27 @@
+#ifndef _IPXE_LINUX_COMPAT_H
+#define _IPXE_LINUX_COMPAT_H
+
+/** @file
+ *
+ * Linux code compatibility
+ *
+ * This file exists to ease the building of Linux source code within
+ * iPXE. This is intended to facilitate quick testing; it is not
+ * intended to be a substitute for proper porting.
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <stdint.h>
+#include <errno.h>
+#include <stdio.h>
+#include <byteswap.h>
+#include <ipxe/bitops.h>
+
+#define __init
+#define __exit
+#define __initdata
+#define __exitdata
+#define printk printf
+
+#endif /* _IPXE_LINUX_COMPAT_H */
diff --git a/roms/ipxe/src/include/ipxe/ntp.h b/roms/ipxe/src/include/ipxe/ntp.h
deleted file mode 100644
index f5b3d2326..000000000
--- a/roms/ipxe/src/include/ipxe/ntp.h
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef _IPXE_NTP_H
-#define _IPXE_NTP_H
-
-/** @file
- *
- * Network Time Protocol
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <stdint.h>
-#include <ipxe/in.h>
-#include <ipxe/interface.h>
-
-/** NTP port */
-#define NTP_PORT 123
-
-/** An NTP short-format timestamp */
-struct ntp_short {
- /** Seconds */
- uint16_t seconds;
- /** Fraction of a second */
- uint16_t fraction;
-} __attribute__ (( packed ));
-
-/** An NTP timestamp */
-struct ntp_timestamp {
- /** Seconds */
- uint32_t seconds;
- /** Fraction of a second */
- uint32_t fraction;
-} __attribute__ (( packed ));
-
-/** An NTP reference identifier */
-union ntp_id {
- /** Textual identifier */
- char text[4];
- /** IPv4 address */
- struct in_addr in;
- /** Opaque integer */
- uint32_t opaque;
-};
-
-/** An NTP header */
-struct ntp_header {
- /** Flags */
- uint8_t flags;
- /** Stratum */
- uint8_t stratum;
- /** Polling rate */
- int8_t poll;
- /** Precision */
- int8_t precision;
- /** Root delay */
- struct ntp_short delay;
- /** Root dispersion */
- struct ntp_short dispersion;
- /** Reference clock identifier */
- union ntp_id id;
- /** Reference timestamp */
- struct ntp_timestamp reference;
- /** Originate timestamp */
- struct ntp_timestamp originate;
- /** Receive timestamp */
- struct ntp_timestamp receive;
- /** Transmit timestamp */
- struct ntp_timestamp transmit;
-} __attribute__ (( packed ));
-
-/** Leap second indicator: unknown */
-#define NTP_FL_LI_UNKNOWN 0xc0
-
-/** NTP version: 1 */
-#define NTP_FL_VN_1 0x20
-
-/** NTP mode: client */
-#define NTP_FL_MODE_CLIENT 0x03
-
-/** NTP mode: server */
-#define NTP_FL_MODE_SERVER 0x04
-
-/** NTP mode mask */
-#define NTP_FL_MODE_MASK 0x07
-
-/** NTP timestamp for start of Unix epoch */
-#define NTP_EPOCH 2208988800UL
-
-/** NTP fraction of a second magic value
- *
- * This is a policy decision.
- */
-#define NTP_FRACTION_MAGIC 0x69505845UL
-
-/** NTP minimum retransmission timeout
- *
- * This is a policy decision.
- */
-#define NTP_MIN_TIMEOUT ( 1 * TICKS_PER_SEC )
-
-/** NTP maximum retransmission timeout
- *
- * This is a policy decision.
- */
-#define NTP_MAX_TIMEOUT ( 10 * TICKS_PER_SEC )
-
-extern int start_ntp ( struct interface *job, const char *hostname );
-
-#endif /* _IPXE_NTP_H */
diff --git a/roms/ipxe/src/include/ipxe/pci.h b/roms/ipxe/src/include/ipxe/pci.h
index ddd8c8d1e..a841e00ff 100644
--- a/roms/ipxe/src/include/ipxe/pci.h
+++ b/roms/ipxe/src/include/ipxe/pci.h
@@ -94,7 +94,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define PCI_CAP_ID_VPD 0x03 /**< Vital product data */
#define PCI_CAP_ID_VNDR 0x09 /**< Vendor-specific */
#define PCI_CAP_ID_EXP 0x10 /**< PCI Express */
-#define PCI_CAP_ID_EA 0x14 /**< Enhanced Allocation */
/** Next capability */
#define PCI_CAP_NEXT 0x01
@@ -105,10 +104,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define PCI_PM_CTRL_PME_ENABLE 0x0100 /**< PME pin enable */
#define PCI_PM_CTRL_PME_STATUS 0x8000 /**< PME pin status */
-/** PCI Express */
-#define PCI_EXP_DEVCTL 0x08
-#define PCI_EXP_DEVCTL_FLR 0x8000 /**< Function level reset */
-
/** Uncorrectable error status */
#define PCI_ERR_UNCOR_STATUS 0x04
@@ -133,9 +128,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
( ( ( (base) & 0xff ) << 16 ) | ( ( (sub) & 0xff ) << 8 ) | \
( ( (progif) & 0xff) << 0 ) )
-/** PCI Express function level reset delay (in ms) */
-#define PCI_EXP_FLR_DELAY_MS 100
-
/** A PCI device ID list entry */
struct pci_device_id {
/** Name */
@@ -195,8 +187,8 @@ struct pci_device {
uint32_t class;
/** Interrupt number */
uint8_t irq;
- /** Segment, bus, device, and function (bus:dev.fn) number */
- uint32_t busdevfn;
+ /** Bus, device, and function (bus:dev.fn) number */
+ uint16_t busdevfn;
/** Driver for this device */
struct pci_driver *driver;
/** Driver-private data
@@ -241,13 +233,11 @@ struct pci_driver {
/** Declare a fallback PCI driver */
#define __pci_driver_fallback __table_entry ( PCI_DRIVERS, 02 )
-#define PCI_SEG( busdevfn ) ( ( (busdevfn) >> 16 ) & 0xffff )
#define PCI_BUS( busdevfn ) ( ( (busdevfn) >> 8 ) & 0xff )
#define PCI_SLOT( busdevfn ) ( ( (busdevfn) >> 3 ) & 0x1f )
#define PCI_FUNC( busdevfn ) ( ( (busdevfn) >> 0 ) & 0x07 )
-#define PCI_BUSDEVFN( segment, bus, slot, func ) \
- ( ( (segment) << 16 ) | ( (bus) << 8 ) | \
- ( (slot) << 3 ) | ( (func) << 0 ) )
+#define PCI_BUSDEVFN( bus, slot, func ) \
+ ( ( (bus) << 8 ) | ( (slot) << 3 ) | ( (func) << 0 ) )
#define PCI_FIRST_FUNC( busdevfn ) ( (busdevfn) & ~0x07 )
#define PCI_LAST_FUNC( busdevfn ) ( (busdevfn) | 0x07 )
@@ -273,12 +263,12 @@ struct pci_driver {
PCI_ID( _vendor, _device, _name, _description, _data )
/** PCI device debug message format */
-#define PCI_FMT "%04x:%02x:%02x.%x"
+#define PCI_FMT "PCI %02x:%02x.%x"
/** PCI device debug message arguments */
#define PCI_ARGS( pci ) \
- PCI_SEG ( (pci)->busdevfn ), PCI_BUS ( (pci)->busdevfn ), \
- PCI_SLOT ( (pci)->busdevfn ), PCI_FUNC ( (pci)->busdevfn )
+ PCI_BUS ( (pci)->busdevfn ), PCI_SLOT ( (pci)->busdevfn ), \
+ PCI_FUNC ( (pci)->busdevfn )
extern void adjust_pci_device ( struct pci_device *pci );
extern unsigned long pci_bar_start ( struct pci_device *pci,
@@ -289,8 +279,6 @@ extern int pci_find_driver ( struct pci_device *pci );
extern int pci_probe ( struct pci_device *pci );
extern void pci_remove ( struct pci_device *pci );
extern int pci_find_capability ( struct pci_device *pci, int capability );
-extern int pci_find_next_capability ( struct pci_device *pci,
- int pos, int capability );
extern unsigned long pci_bar_size ( struct pci_device *pci, unsigned int reg );
/**
diff --git a/roms/ipxe/src/include/ipxe/pciea.h b/roms/ipxe/src/include/ipxe/pciea.h
deleted file mode 100644
index 941c94ed5..000000000
--- a/roms/ipxe/src/include/ipxe/pciea.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef _IPXE_PCIEA_H
-#define _IPXE_PCIEA_H
-
-/** @file
- *
- * PCI Enhanced Allocation
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <ipxe/pci.h>
-
-/** Number of entries */
-#define PCIEA_ENTRIES 2
-#define PCIEA_ENTRIES_MASK 0x3f
-
-/** First entry */
-#define PCIEA_FIRST 4
-
-/** Entry descriptor */
-#define PCIEA_DESC 0
-
-/** Entry size */
-#define PCIEA_DESC_SIZE(desc) ( ( (desc) >> 0 ) & 0x7 )
-
-/** BAR equivalent indicator */
-#define PCIEA_DESC_BEI(desc) ( ( (desc) >> 4 ) & 0xf )
-
-/** BAR equivalent indicators */
-enum pciea_bei {
- PCIEA_BEI_BAR_0 = 0, /**< Standard BAR 0 */
- PCIEA_BEI_BAR_1 = 1, /**< Standard BAR 1 */
- PCIEA_BEI_BAR_2 = 2, /**< Standard BAR 2 */
- PCIEA_BEI_BAR_3 = 3, /**< Standard BAR 3 */
- PCIEA_BEI_BAR_4 = 4, /**< Standard BAR 4 */
- PCIEA_BEI_BAR_5 = 5, /**< Standard BAR 5 */
- PCIEA_BEI_ROM = 8, /**< Expansion ROM BAR */
- PCIEA_BEI_VF_BAR_0 = 9, /**< Virtual function BAR 0 */
- PCIEA_BEI_VF_BAR_1 = 10, /**< Virtual function BAR 1 */
- PCIEA_BEI_VF_BAR_2 = 11, /**< Virtual function BAR 2 */
- PCIEA_BEI_VF_BAR_3 = 12, /**< Virtual function BAR 3 */
- PCIEA_BEI_VF_BAR_4 = 13, /**< Virtual function BAR 4 */
- PCIEA_BEI_VF_BAR_5 = 14, /**< Virtual function BAR 5 */
-};
-
-/** Entry is enabled */
-#define PCIEA_DESC_ENABLED 0x80000000UL
-
-/** Base address low dword */
-#define PCIEA_LOW_BASE 4
-
-/** Limit low dword */
-#define PCIEA_LOW_LIMIT 8
-
-/** BAR is 64-bit */
-#define PCIEA_LOW_ATTR_64BIT 0x00000002UL
-
-/** Low dword attribute bit mask */
-#define PCIEA_LOW_ATTR_MASK 0x00000003UL
-
-/** Offset to high dwords */
-#define PCIEA_LOW_HIGH 8
-
-extern unsigned long pciea_bar_start ( struct pci_device *pci,
- unsigned int bei );
-extern unsigned long pciea_bar_size ( struct pci_device *pci,
- unsigned int bei );
-
-#endif /* _IPXE_PCIEA_H */
diff --git a/roms/ipxe/src/include/ipxe/pool.h b/roms/ipxe/src/include/ipxe/pool.h
index 81ff57d75..27066e9b3 100644
--- a/roms/ipxe/src/include/ipxe/pool.h
+++ b/roms/ipxe/src/include/ipxe/pool.h
@@ -112,7 +112,7 @@ pool_is_reopenable ( struct pooled_connection *pool ) {
/* A connection is reopenable if it has been recycled but is
* not yet known to be alive.
*/
- return ( ( pool->flags & POOL_RECYCLED ) &&
+ return ( ( pool->flags & POOL_RECYCLED ) &
( ! ( pool->flags & POOL_ALIVE ) ) );
}
diff --git a/roms/ipxe/src/include/ipxe/pseudobit.h b/roms/ipxe/src/include/ipxe/pseudobit.h
deleted file mode 100644
index 431b106fa..000000000
--- a/roms/ipxe/src/include/ipxe/pseudobit.h
+++ /dev/null
@@ -1,249 +0,0 @@
-#ifndef _IPXE_PSEUDOBIT_H
-#define _IPXE_PSEUDOBIT_H
-
-/*
- * Copyright (C) 2008 Michael Brown <mbrown@fensystems.co.uk>.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * You can also choose to distribute this program under the terms of
- * the Unmodified Binary Distribution Licence (as given in the file
- * COPYING.UBDL), provided that you have satisfied its requirements.
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-/**
- * @file
- *
- * Pseudo-bit structures
- *
- */
-
-#include <stdint.h>
-#include <byteswap.h>
-
-/* Endianness selection.
- *
- * This is a property of the device, not a property of the host CPU.
- */
-#ifdef PSEUDOBIT_LITTLE_ENDIAN
-#define cpu_to_BIT64 cpu_to_le64
-#define cpu_to_BIT32 cpu_to_le32
-#define BIT64_to_cpu le64_to_cpu
-#define BIT32_to_cpu le32_to_cpu
-#define QWORD_SHIFT( offset, width ) (offset)
-#endif
-#ifdef PSEUDOBIT_BIG_ENDIAN
-#define cpu_to_BIT64 cpu_to_be64
-#define cpu_to_BIT32 cpu_to_be32
-#define BIT64_to_cpu be64_to_cpu
-#define BIT32_to_cpu be32_to_cpu
-#define QWORD_SHIFT( offset, width ) ( 64 - (offset) - (width) )
-#endif
-
-/** Datatype used to represent a bit in the pseudo-structures */
-typedef unsigned char pseudo_bit_t;
-
-/**
- * Wrapper structure for pseudo_bit_t structures
- *
- * This structure provides a wrapper around pseudo_bit_t structures.
- * It has the correct size, and also encapsulates type information
- * about the underlying pseudo_bit_t-based structure, which allows the
- * BIT_FILL() etc. macros to work without requiring explicit type
- * information.
- */
-#define PSEUDO_BIT_STRUCT( _structure ) \
- union { \
- uint8_t bytes[ sizeof ( _structure ) / 8 ]; \
- uint32_t dwords[ sizeof ( _structure ) / 32 ]; \
- uint64_t qwords[ sizeof ( _structure ) / 64 ]; \
- _structure *dummy[0]; \
- } __attribute__ (( packed )) u
-
-/** Get pseudo_bit_t structure type from wrapper structure pointer */
-#define PSEUDO_BIT_STRUCT_TYPE( _ptr ) \
- typeof ( *((_ptr)->u.dummy[0]) )
-
-/** Bit offset of a field within a pseudo_bit_t structure */
-#define BIT_OFFSET( _ptr, _field ) \
- offsetof ( PSEUDO_BIT_STRUCT_TYPE ( _ptr ), _field )
-
-/** Bit width of a field within a pseudo_bit_t structure */
-#define BIT_WIDTH( _ptr, _field ) \
- sizeof ( ( ( PSEUDO_BIT_STRUCT_TYPE ( _ptr ) * ) NULL )->_field )
-
-/** Qword offset of a field within a pseudo_bit_t structure */
-#define QWORD_OFFSET( _ptr, _field ) \
- ( BIT_OFFSET ( _ptr, _field ) / 64 )
-
-/** Qword bit offset of a field within a pseudo_bit_t structure */
-#define QWORD_BIT_OFFSET( _ptr, _index, _field ) \
- ( BIT_OFFSET ( _ptr, _field ) - ( 64 * (_index) ) )
-
-/** Qword bit shift for a field within a pseudo_bit_t structure */
-#define QWORD_BIT_SHIFT( _ptr, _index, _field ) \
- QWORD_SHIFT ( QWORD_BIT_OFFSET ( _ptr, _index, _field ), \
- BIT_WIDTH ( _ptr, _field ) )
-
-/** Bit mask for a field within a pseudo_bit_t structure */
-#define BIT_MASK( _ptr, _field ) \
- ( ( ~( ( uint64_t ) 0 ) ) >> \
- ( 64 - BIT_WIDTH ( _ptr, _field ) ) )
-
-/*
- * Assemble native-endian qword from named fields and values
- *
- */
-
-#define BIT_ASSEMBLE_1( _ptr, _index, _field, _value ) \
- ( ( ( uint64_t) (_value) ) << \
- QWORD_BIT_SHIFT ( _ptr, _index, _field ) )
-
-#define BIT_ASSEMBLE_2( _ptr, _index, _field, _value, ... ) \
- ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
- BIT_ASSEMBLE_1 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_ASSEMBLE_3( _ptr, _index, _field, _value, ... ) \
- ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
- BIT_ASSEMBLE_2 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_ASSEMBLE_4( _ptr, _index, _field, _value, ... ) \
- ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
- BIT_ASSEMBLE_3 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_ASSEMBLE_5( _ptr, _index, _field, _value, ... ) \
- ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
- BIT_ASSEMBLE_4 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_ASSEMBLE_6( _ptr, _index, _field, _value, ... ) \
- ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
- BIT_ASSEMBLE_5 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_ASSEMBLE_7( _ptr, _index, _field, _value, ... ) \
- ( BIT_ASSEMBLE_1 ( _ptr, _index, _field, _value ) | \
- BIT_ASSEMBLE_6 ( _ptr, _index, __VA_ARGS__ ) )
-
-/*
- * Build native-endian (positive) qword bitmasks from named fields
- *
- */
-
-#define BIT_MASK_1( _ptr, _index, _field ) \
- ( BIT_MASK ( _ptr, _field ) << \
- QWORD_BIT_SHIFT ( _ptr, _index, _field ) )
-
-#define BIT_MASK_2( _ptr, _index, _field, ... ) \
- ( BIT_MASK_1 ( _ptr, _index, _field ) | \
- BIT_MASK_1 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_MASK_3( _ptr, _index, _field, ... ) \
- ( BIT_MASK_1 ( _ptr, _index, _field ) | \
- BIT_MASK_2 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_MASK_4( _ptr, _index, _field, ... ) \
- ( BIT_MASK_1 ( _ptr, _index, _field ) | \
- BIT_MASK_3 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_MASK_5( _ptr, _index, _field, ... ) \
- ( BIT_MASK_1 ( _ptr, _index, _field ) | \
- BIT_MASK_4 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_MASK_6( _ptr, _index, _field, ... ) \
- ( BIT_MASK_1 ( _ptr, _index, _field ) | \
- BIT_MASK_5 ( _ptr, _index, __VA_ARGS__ ) )
-
-#define BIT_MASK_7( _ptr, _index, _field, ... ) \
- ( BIT_MASK_1 ( _ptr, _index, _field ) | \
- BIT_MASK_6 ( _ptr, _index, __VA_ARGS__ ) )
-
-/*
- * Populate device-endian qwords from named fields and values
- *
- */
-
-#define BIT_FILL( _ptr, _index, _assembled ) do { \
- uint64_t *__ptr = &(_ptr)->u.qwords[(_index)]; \
- uint64_t __assembled = (_assembled); \
- *__ptr = cpu_to_BIT64 ( __assembled ); \
- } while ( 0 )
-
-#define BIT_FILL_1( _ptr, _field1, ... ) \
- BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- BIT_ASSEMBLE_1 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- _field1, __VA_ARGS__ ) )
-
-#define BIT_FILL_2( _ptr, _field1, ... ) \
- BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- BIT_ASSEMBLE_2 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- _field1, __VA_ARGS__ ) )
-
-#define BIT_FILL_3( _ptr, _field1, ... ) \
- BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- BIT_ASSEMBLE_3 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- _field1, __VA_ARGS__ ) )
-
-#define BIT_FILL_4( _ptr, _field1, ... ) \
- BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- BIT_ASSEMBLE_4 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- _field1, __VA_ARGS__ ) )
-
-#define BIT_FILL_5( _ptr, _field1, ... ) \
- BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- BIT_ASSEMBLE_5 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- _field1, __VA_ARGS__ ) )
-
-#define BIT_FILL_6( _ptr, _field1, ... ) \
- BIT_FILL ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- BIT_ASSEMBLE_6 ( _ptr, QWORD_OFFSET ( _ptr, _field1 ), \
- _field1, __VA_ARGS__ ) )
-
-#define BIT_QWORD_PTR( _ptr, _field ) \
- ( { \
- unsigned int __index = QWORD_OFFSET ( _ptr, _field ); \
- uint64_t *__ptr = &(_ptr)->u.qwords[__index]; \
- __ptr; \
- } )
-
-/** Extract value of named field */
-#define BIT_GET64( _ptr, _field ) \
- ( { \
- unsigned int __index = QWORD_OFFSET ( _ptr, _field ); \
- uint64_t *__ptr = &(_ptr)->u.qwords[__index]; \
- uint64_t __value = BIT64_to_cpu ( *__ptr ); \
- __value >>= \
- QWORD_BIT_SHIFT ( _ptr, __index, _field ); \
- __value &= BIT_MASK ( _ptr, _field ); \
- __value; \
- } )
-
-/** Extract value of named field (for fields up to the size of a long) */
-#define BIT_GET( _ptr, _field ) \
- ( ( unsigned long ) BIT_GET64 ( _ptr, _field ) )
-
-#define BIT_SET( _ptr, _field, _value ) do { \
- unsigned int __index = QWORD_OFFSET ( _ptr, _field ); \
- uint64_t *__ptr = &(_ptr)->u.qwords[__index]; \
- unsigned int __shift = \
- QWORD_BIT_SHIFT ( _ptr, __index, _field ); \
- uint64_t __value = (_value); \
- *__ptr &= cpu_to_BIT64 ( ~( BIT_MASK ( _ptr, _field ) << \
- __shift ) ); \
- *__ptr |= cpu_to_BIT64 ( __value << __shift ); \
- } while ( 0 )
-
-#endif /* _IPXE_PSEUDOBIT_H */
diff --git a/roms/ipxe/src/include/ipxe/sanboot.h b/roms/ipxe/src/include/ipxe/sanboot.h
index 041e18935..57025f2c6 100644
--- a/roms/ipxe/src/include/ipxe/sanboot.h
+++ b/roms/ipxe/src/include/ipxe/sanboot.h
@@ -70,7 +70,7 @@ unsigned int san_default_drive ( void );
*
* @v uri URI
* @v drive Drive number
- * @ret drive Drive number, or negative error
+ * @ret rc Return status code
*/
int san_hook ( struct uri *uri, unsigned int drive );
diff --git a/roms/ipxe/src/include/ipxe/settings.h b/roms/ipxe/src/include/ipxe/settings.h
index 6534c25b6..95a553cc8 100644
--- a/roms/ipxe/src/include/ipxe/settings.h
+++ b/roms/ipxe/src/include/ipxe/settings.h
@@ -40,7 +40,7 @@ struct setting {
* (such as a DHCP option number, or an SMBIOS structure and
* field number).
*/
- unsigned long tag;
+ unsigned int tag;
/** Setting scope (or NULL)
*
* For historic reasons, a NULL scope with a non-zero tag
@@ -452,18 +452,6 @@ extern const struct setting
busid_setting __setting ( SETTING_NETDEV, busid );
extern const struct setting
user_class_setting __setting ( SETTING_HOST_EXTRA, user-class );
-extern const struct setting
-manufacturer_setting __setting ( SETTING_HOST_EXTRA, manufacturer );
-extern const struct setting
-product_setting __setting ( SETTING_HOST_EXTRA, product );
-extern const struct setting
-serial_setting __setting ( SETTING_HOST_EXTRA, serial );
-extern const struct setting
-asset_setting __setting ( SETTING_HOST_EXTRA, asset );
-extern const struct setting
-board_serial_setting __setting ( SETTING_HOST_EXTRA, board-serial );
-extern const struct setting dhcp_server_setting __setting ( SETTING_MISC,
- dhcp-server );
/**
* Initialise a settings block
diff --git a/roms/ipxe/src/include/ipxe/smbios.h b/roms/ipxe/src/include/ipxe/smbios.h
index c1d8fea3e..24b05ed62 100644
--- a/roms/ipxe/src/include/ipxe/smbios.h
+++ b/roms/ipxe/src/include/ipxe/smbios.h
@@ -152,9 +152,6 @@ struct smbios_enclosure_information {
/** SMBIOS enclosure information structure type */
#define SMBIOS_TYPE_ENCLOSURE_INFORMATION 3
-/** SMBIOS OEM strings structure type */
-#define SMBIOS_TYPE_OEM_STRINGS 11
-
/**
* SMBIOS entry point descriptor
*
diff --git a/roms/ipxe/src/include/ipxe/tcp.h b/roms/ipxe/src/include/ipxe/tcp.h
index 21be3ca8a..063ebaa4b 100644
--- a/roms/ipxe/src/include/ipxe/tcp.h
+++ b/roms/ipxe/src/include/ipxe/tcp.h
@@ -140,6 +140,8 @@ struct tcp_timestamp_padded_option {
/** Parsed TCP options */
struct tcp_options {
+ /** MSS option, if present */
+ const struct tcp_mss_option *mssopt;
/** Window scale option, if present */
const struct tcp_window_scale_option *wsopt;
/** SACK permitted option, if present */
@@ -379,14 +381,6 @@ struct tcp_options {
#define TCP_MSL ( 2 * 60 * TICKS_PER_SEC )
/**
- * TCP keepalive period
- *
- * We send keepalive ACKs after this period of inactivity has elapsed
- * on an established connection.
- */
-#define TCP_KEEPALIVE_DELAY ( 15 * TICKS_PER_SEC )
-
-/**
* TCP maximum header length
*
*/
diff --git a/roms/ipxe/src/include/ipxe/tcpip.h b/roms/ipxe/src/include/ipxe/tcpip.h
index 414daad53..3cfc8e3ac 100644
--- a/roms/ipxe/src/include/ipxe/tcpip.h
+++ b/roms/ipxe/src/include/ipxe/tcpip.h
@@ -13,48 +13,17 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/socket.h>
#include <ipxe/in.h>
#include <ipxe/tables.h>
-
-extern uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
- const void *data, size_t len );
-
#include <bits/tcpip.h>
struct io_buffer;
struct net_device;
struct ip_statistics;
-/** Positive zero checksum value */
-#define TCPIP_POSITIVE_ZERO_CSUM 0x0000
-
-/** Negative zero checksum value */
-#define TCPIP_NEGATIVE_ZERO_CSUM 0xffff
-
/** Empty checksum value
*
- * All of our TCP/IP checksum algorithms will return only the positive
- * representation of zero (0x0000) for a zero checksum over non-zero
- * input data. This property arises since the end-around carry used
- * to mimic one's complement addition using unsigned arithmetic
- * prevents the running total from ever returning to 0x0000. The
- * running total will therefore use only the negative representation
- * of zero (0xffff). Since the return value is the one's complement
- * negation of the running total (calculated by simply bit-inverting
- * the running total), the return value will therefore use only the
- * positive representation of zero (0x0000).
- *
- * It is a very common misconception (found in many places such as
- * RFC1624) that this is a property guaranteed by the underlying
- * mathematics. It is not; the choice of which zero representation is
- * used is merely an artifact of the software implementation of the
- * checksum algorithm.
- *
- * For consistency, we choose to use the positive representation of
- * zero (0x0000) for the checksum of a zero-length block of data.
- * This ensures that all of our TCP/IP checksum algorithms will return
- * only the positive representation of zero (0x0000) for a zero
- * checksum (regardless of the input data).
+ * This is the TCP/IP checksum over a zero-length block of data.
*/
-#define TCPIP_EMPTY_CSUM TCPIP_POSITIVE_ZERO_CSUM
+#define TCPIP_EMPTY_CSUM 0xffff
/** TCP/IP address flags */
enum tcpip_st_flags {
@@ -119,13 +88,6 @@ struct tcpip_protocol {
int ( * rx ) ( struct io_buffer *iobuf, struct net_device *netdev,
struct sockaddr_tcpip *st_src,
struct sockaddr_tcpip *st_dest, uint16_t pshdr_csum );
- /** Preferred zero checksum value
- *
- * The checksum is a one's complement value: zero may be
- * represented by either positive zero (0x0000) or negative
- * zero (0xffff).
- */
- uint16_t zero_csum;
/**
* Transport-layer protocol number
*
@@ -144,8 +106,6 @@ struct tcpip_net_protocol {
sa_family_t sa_family;
/** Fixed header length */
size_t header_len;
- /** Network-layer protocol */
- struct net_protocol *net_protocol;
/**
* Transmit packet
*
@@ -196,11 +156,19 @@ extern int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip,
struct sockaddr_tcpip *st_dest,
struct net_device *netdev,
uint16_t *trans_csum );
-extern struct tcpip_net_protocol * tcpip_net_protocol ( sa_family_t sa_family );
extern struct net_device * tcpip_netdev ( struct sockaddr_tcpip *st_dest );
extern size_t tcpip_mtu ( struct sockaddr_tcpip *st_dest );
+extern uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
+ const void *data, size_t len );
extern uint16_t tcpip_chksum ( const void *data, size_t len );
extern int tcpip_bind ( struct sockaddr_tcpip *st_local,
int ( * available ) ( int port ) );
+/* Use generic_tcpip_continue_chksum() if no architecture-specific
+ * version is available
+ */
+#ifndef tcpip_continue_chksum
+#define tcpip_continue_chksum generic_tcpip_continue_chksum
+#endif
+
#endif /* _IPXE_TCPIP_H */
diff --git a/roms/ipxe/src/include/ipxe/time.h b/roms/ipxe/src/include/ipxe/time.h
index 89bf90e03..4c5bb2a00 100644
--- a/roms/ipxe/src/include/ipxe/time.h
+++ b/roms/ipxe/src/include/ipxe/time.h
@@ -50,24 +50,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/* Include all architecture-dependent time API headers */
#include <bits/time.h>
-extern signed long time_offset;
-
/**
- * Get current time in seconds (ignoring system clock offset)
+ * Get current time in seconds
*
* @ret time Time, in seconds
*/
time_t time_now ( void );
-/**
- * Adjust system clock
- *
- * @v delta Clock adjustment, in seconds
- */
-static inline __attribute__ (( always_inline )) void
-time_adjust ( signed long delta ) {
-
- time_offset += delta;
-}
-
#endif /* _IPXE_TIME_H */
diff --git a/roms/ipxe/src/include/ipxe/uri.h b/roms/ipxe/src/include/ipxe/uri.h
index 3879a0e73..00e5a24c4 100644
--- a/roms/ipxe/src/include/ipxe/uri.h
+++ b/roms/ipxe/src/include/ipxe/uri.h
@@ -191,11 +191,8 @@ uri_put ( struct uri *uri ) {
extern struct uri *cwuri;
-extern size_t uri_decode ( const char *encoded, void *buf, size_t len );
-extern size_t uri_encode ( unsigned int field, const void *raw, size_t raw_len,
+extern size_t uri_encode ( const char *string, unsigned int field,
char *buf, ssize_t len );
-extern size_t uri_encode_string ( unsigned int field, const char *string,
- char *buf, ssize_t len );
extern struct uri * parse_uri ( const char *uri_string );
extern size_t format_uri ( const struct uri *uri, char *buf, size_t len );
extern char * format_uri_alloc ( const struct uri *uri );
@@ -206,8 +203,8 @@ extern char * resolve_path ( const char *base_path,
const char *relative_path );
extern struct uri * resolve_uri ( const struct uri *base_uri,
struct uri *relative_uri );
-extern struct uri * pxe_uri ( struct sockaddr *sa_server,
- const char *filename );
+extern struct uri * tftp_uri ( struct in_addr next_server, unsigned int port,
+ const char *filename );
extern void churi ( struct uri *uri );
#endif /* _IPXE_URI_H */
diff --git a/roms/ipxe/src/include/ipxe/usb.h b/roms/ipxe/src/include/ipxe/usb.h
index e7909d300..ab060b8f4 100644
--- a/roms/ipxe/src/include/ipxe/usb.h
+++ b/roms/ipxe/src/include/ipxe/usb.h
@@ -68,7 +68,7 @@ enum usb_pid {
struct usb_setup_packet {
/** Request */
uint16_t request;
- /** Value parameter */
+ /** Value paramer */
uint16_t value;
/** Index parameter */
uint16_t index;
@@ -91,9 +91,6 @@ struct usb_setup_packet {
/** Vendor-specific request type */
#define USB_TYPE_VENDOR ( 2 << 5 )
-/** Request recipient mask */
-#define USB_RECIP_MASK ( 0x1f << 0 )
-
/** Request recipient is the device */
#define USB_RECIP_DEVICE ( 0 << 0 )
@@ -414,9 +411,7 @@ struct usb_endpoint {
/** Recycled I/O buffer list */
struct list_head recycled;
- /** Refill buffer reserved header length */
- size_t reserve;
- /** Refill buffer payload length */
+ /** Refill buffer length */
size_t len;
/** Maximum fill level */
unsigned int max;
@@ -460,11 +455,11 @@ struct usb_endpoint_host_operations {
*
* @v ep USB endpoint
* @v iobuf I/O buffer
- * @v zlp Append a zero-length packet
+ * @v terminate Terminate using a short packet
* @ret rc Return status code
*/
int ( * stream ) ( struct usb_endpoint *ep, struct io_buffer *iobuf,
- int zlp );
+ int terminate );
};
/** USB endpoint driver operations */
@@ -590,16 +585,13 @@ extern void usb_complete_err ( struct usb_endpoint *ep,
* Initialise USB endpoint refill
*
* @v ep USB endpoint
- * @v reserve Refill buffer reserved header length
- * @v len Refill buffer payload length (zero for endpoint's MTU)
+ * @v len Refill buffer length (or zero to use endpoint's MTU)
* @v max Maximum fill level
*/
static inline __attribute__ (( always_inline )) void
-usb_refill_init ( struct usb_endpoint *ep, size_t reserve, size_t len,
- unsigned int max ) {
+usb_refill_init ( struct usb_endpoint *ep, size_t len, unsigned int max ) {
INIT_LIST_HEAD ( &ep->recycled );
- ep->reserve = reserve;
ep->len = len;
ep->max = max;
}
@@ -620,31 +612,6 @@ extern int usb_prefill ( struct usb_endpoint *ep );
extern int usb_refill ( struct usb_endpoint *ep );
extern void usb_flush ( struct usb_endpoint *ep );
-/** A USB class descriptor */
-union usb_class_descriptor {
- /** Class */
- struct usb_class class;
- /** Scalar value */
- uint32_t scalar;
-};
-
-/**
- * A USB function descriptor
- *
- * This is an internal descriptor used to represent an association of
- * interfaces within a USB device.
- */
-struct usb_function_descriptor {
- /** Vendor ID */
- uint16_t vendor;
- /** Product ID */
- uint16_t product;
- /** Class */
- union usb_class_descriptor class;
- /** Number of interfaces */
- unsigned int count;
-};
-
/**
* A USB function
*
@@ -656,8 +623,10 @@ struct usb_function {
const char *name;
/** USB device */
struct usb_device *usb;
- /** Function descriptor */
- struct usb_function_descriptor desc;
+ /** Class */
+ struct usb_class class;
+ /** Number of interfaces */
+ unsigned int count;
/** Generic device */
struct device dev;
/** List of functions within this USB device */
@@ -667,8 +636,6 @@ struct usb_function {
struct usb_driver *driver;
/** Driver private data */
void *priv;
- /** Driver device ID */
- struct usb_device_id *id;
/** List of interface numbers
*
@@ -705,8 +672,6 @@ struct usb_device {
char name[32];
/** USB port */
struct usb_port *port;
- /** Device speed */
- unsigned int speed;
/** List of devices on this bus */
struct list_head list;
/** Device address, if assigned */
@@ -1193,7 +1158,7 @@ usb_get_device_descriptor ( struct usb_device *usb,
* @v data Configuration descriptor to fill in
* @ret rc Return status code
*/
-static inline __attribute__ (( always_inline )) int
+static inline __attribute (( always_inline )) int
usb_get_config_descriptor ( struct usb_device *usb, unsigned int index,
struct usb_configuration_descriptor *data,
size_t len ) {
@@ -1315,58 +1280,19 @@ struct usb_device_id {
uint16_t vendor;
/** Product ID */
uint16_t product;
- /** Arbitrary driver data */
- unsigned long driver_data;
+ /** Class */
+ struct usb_class class;
};
/** Match-anything ID */
#define USB_ANY_ID 0xffff
-/** A USB class ID */
-struct usb_class_id {
- /** Class */
- union usb_class_descriptor class;
- /** Class mask */
- union usb_class_descriptor mask;
-};
-
-/** Construct USB class ID
- *
- * @v base Base class code (or USB_ANY_ID)
- * @v subclass Subclass code (or USB_ANY_ID)
- * @v protocol Protocol code (or USB_ANY_ID)
- */
-#define USB_CLASS_ID( base, subclass, protocol ) { \
- .class = { \
- .class = { \
- ( (base) & 0xff ), \
- ( (subclass) & 0xff ), \
- ( (protocol) & 0xff ), \
- }, \
- }, \
- .mask = { \
- .class = { \
- ( ( (base) == USB_ANY_ID ) ? 0x00 : 0xff ), \
- ( ( (subclass) == USB_ANY_ID ) ? 0x00 : 0xff ), \
- ( ( (protocol) == USB_ANY_ID ) ? 0x00 : 0xff ), \
- }, \
- }, \
- }
-
/** A USB driver */
struct usb_driver {
/** USB ID table */
struct usb_device_id *ids;
/** Number of entries in ID table */
unsigned int id_count;
- /** Class ID */
- struct usb_class_id class;
- /** Driver score
- *
- * This is used to determine the preferred configuration for a
- * USB device.
- */
- unsigned int score;
/**
* Probe device
*
@@ -1390,18 +1316,4 @@ struct usb_driver {
/** Declare a USB driver */
#define __usb_driver __table_entry ( USB_DRIVERS, 01 )
-/** USB driver scores */
-enum usb_driver_score {
- /** Fallback driver (has no effect on overall score) */
- USB_SCORE_FALLBACK = 0,
- /** Deprecated driver */
- USB_SCORE_DEPRECATED = 1,
- /** Normal driver */
- USB_SCORE_NORMAL = 2,
-};
-
-extern struct usb_driver *
-usb_find_driver ( struct usb_function_descriptor *desc,
- struct usb_device_id **id );
-
#endif /* _IPXE_USB_H */
diff --git a/roms/ipxe/src/include/ipxe/usbhid.h b/roms/ipxe/src/include/ipxe/usbhid.h
index 233534e0f..fe9d84455 100644
--- a/roms/ipxe/src/include/ipxe/usbhid.h
+++ b/roms/ipxe/src/include/ipxe/usbhid.h
@@ -33,20 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
USB_REQUEST_TYPE ( 0x0a ) )
-/** Set report */
-#define USBHID_SET_REPORT \
- ( USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
- USB_REQUEST_TYPE ( 0x09 ) )
-
-/** Input report type */
-#define USBHID_REPORT_INPUT 0x01
-
-/** Output report type */
-#define USBHID_REPORT_OUTPUT 0x02
-
-/** Feature report type */
-#define USBHID_REPORT_FEATURE 0x03
-
/** A USB human interface device */
struct usb_hid {
/** USB function */
@@ -111,26 +97,6 @@ usbhid_set_idle ( struct usb_device *usb, unsigned int interface,
interface, NULL, 0 );
}
-/**
- * Set report
- *
- * @v usb USB device
- * @v interface Interface number
- * @v type Report type
- * @v report Report ID
- * @v data Report data
- * @v len Length of report data
- * @ret rc Return status code
- */
-static inline __attribute__ (( always_inline )) int
-usbhid_set_report ( struct usb_device *usb, unsigned int interface,
- unsigned int type, unsigned int report, void *data,
- size_t len ) {
-
- return usb_control ( usb, USBHID_SET_REPORT, ( ( type << 8 ) | report ),
- interface, data, len );
-}
-
extern int usbhid_open ( struct usb_hid *hid );
extern void usbhid_close ( struct usb_hid *hid );
extern int usbhid_refill ( struct usb_hid *hid );
diff --git a/roms/ipxe/src/include/ipxe/virtio-pci.h b/roms/ipxe/src/include/ipxe/virtio-pci.h
index f3c9b17ca..a09c46316 100644
--- a/roms/ipxe/src/include/ipxe/virtio-pci.h
+++ b/roms/ipxe/src/include/ipxe/virtio-pci.h
@@ -37,104 +37,6 @@
/* Virtio ABI version, this must match exactly */
#define VIRTIO_PCI_ABI_VERSION 0
-/* PCI capability types: */
-#define VIRTIO_PCI_CAP_COMMON_CFG 1 /* Common configuration */
-#define VIRTIO_PCI_CAP_NOTIFY_CFG 2 /* Notifications */
-#define VIRTIO_PCI_CAP_ISR_CFG 3 /* ISR access */
-#define VIRTIO_PCI_CAP_DEVICE_CFG 4 /* Device specific configuration */
-#define VIRTIO_PCI_CAP_PCI_CFG 5 /* PCI configuration access */
-
-#define __u8 uint8_t
-#define __le16 uint16_t
-#define __le32 uint32_t
-#define __le64 uint64_t
-
-/* This is the PCI capability header: */
-struct virtio_pci_cap {
- __u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */
- __u8 cap_next; /* Generic PCI field: next ptr. */
- __u8 cap_len; /* Generic PCI field: capability length */
- __u8 cfg_type; /* Identifies the structure. */
- __u8 bar; /* Where to find it. */
- __u8 padding[3]; /* Pad to full dword. */
- __le32 offset; /* Offset within bar. */
- __le32 length; /* Length of the structure, in bytes. */
-};
-
-struct virtio_pci_notify_cap {
- struct virtio_pci_cap cap;
- __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */
-};
-
-struct virtio_pci_cfg_cap {
- struct virtio_pci_cap cap;
- __u8 pci_cfg_data[4]; /* Data for BAR access. */
-};
-
-/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */
-struct virtio_pci_common_cfg {
- /* About the whole device. */
- __le32 device_feature_select; /* read-write */
- __le32 device_feature; /* read-only */
- __le32 guest_feature_select; /* read-write */
- __le32 guest_feature; /* read-write */
- __le16 msix_config; /* read-write */
- __le16 num_queues; /* read-only */
- __u8 device_status; /* read-write */
- __u8 config_generation; /* read-only */
-
- /* About a specific virtqueue. */
- __le16 queue_select; /* read-write */
- __le16 queue_size; /* read-write, power of 2. */
- __le16 queue_msix_vector; /* read-write */
- __le16 queue_enable; /* read-write */
- __le16 queue_notify_off; /* read-only */
- __le32 queue_desc_lo; /* read-write */
- __le32 queue_desc_hi; /* read-write */
- __le32 queue_avail_lo; /* read-write */
- __le32 queue_avail_hi; /* read-write */
- __le32 queue_used_lo; /* read-write */
- __le32 queue_used_hi; /* read-write */
-};
-
-/* Virtio 1.0 PCI region descriptor. We support memory mapped I/O, port I/O,
- * and PCI config space access via the cfg PCI capability as a fallback. */
-struct virtio_pci_region {
- void *base;
- size_t length;
- u8 bar;
-
-/* How to interpret the base field */
-#define VIRTIO_PCI_REGION_TYPE_MASK 0x00000003
-/* The base field is a memory address */
-#define VIRTIO_PCI_REGION_MEMORY 0x00000001
-/* The base field is a port address */
-#define VIRTIO_PCI_REGION_PORT 0x00000002
-/* The base field is an offset within the PCI bar */
-#define VIRTIO_PCI_REGION_PCI_CONFIG 0x00000003
- unsigned flags;
-};
-
-/* Virtio 1.0 device state */
-struct virtio_pci_modern_device {
- struct pci_device *pci;
-
- /* VIRTIO_PCI_CAP_PCI_CFG position */
- int cfg_cap_pos;
-
- /* VIRTIO_PCI_CAP_COMMON_CFG data */
- struct virtio_pci_region common;
-
- /* VIRTIO_PCI_CAP_DEVICE_CFG data */
- struct virtio_pci_region device;
-
- /* VIRTIO_PCI_CAP_ISR_CFG data */
- struct virtio_pci_region isr;
-
- /* VIRTIO_PCI_CAP_NOTIFY_CFG data */
- int notify_cap_pos;
-};
-
static inline u32 vp_get_features(unsigned int ioaddr)
{
return inl(ioaddr + VIRTIO_PCI_HOST_FEATURES);
@@ -194,115 +96,6 @@ static inline void vp_del_vq(unsigned int ioaddr, int queue_index)
outl(0, ioaddr + VIRTIO_PCI_QUEUE_PFN);
}
-struct vring_virtqueue;
-
int vp_find_vq(unsigned int ioaddr, int queue_index,
struct vring_virtqueue *vq);
-
-/* Virtio 1.0 I/O routines abstract away the three possible HW access
- * mechanisms - memory, port I/O, and PCI cfg space access. Also built-in
- * are endianness conversions - to LE on write and from LE on read. */
-
-void vpm_iowrite8(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region, u8 data, size_t offset);
-
-void vpm_iowrite16(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region, u16 data, size_t offset);
-
-void vpm_iowrite32(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region, u32 data, size_t offset);
-
-static inline void vpm_iowrite64(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region,
- u64 data, size_t offset_lo, size_t offset_hi)
-{
- vpm_iowrite32(vdev, region, (u32)data, offset_lo);
- vpm_iowrite32(vdev, region, data >> 32, offset_hi);
-}
-
-u8 vpm_ioread8(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region, size_t offset);
-
-u16 vpm_ioread16(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region, size_t offset);
-
-u32 vpm_ioread32(struct virtio_pci_modern_device *vdev,
- struct virtio_pci_region *region, size_t offset);
-
-/* Virtio 1.0 device manipulation routines */
-
-#define COMMON_OFFSET(field) offsetof(struct virtio_pci_common_cfg, field)
-
-static inline void vpm_reset(struct virtio_pci_modern_device *vdev)
-{
- vpm_iowrite8(vdev, &vdev->common, 0, COMMON_OFFSET(device_status));
- while (vpm_ioread8(vdev, &vdev->common, COMMON_OFFSET(device_status)))
- mdelay(1);
-}
-
-static inline u8 vpm_get_status(struct virtio_pci_modern_device *vdev)
-{
- return vpm_ioread8(vdev, &vdev->common, COMMON_OFFSET(device_status));
-}
-
-static inline void vpm_add_status(struct virtio_pci_modern_device *vdev,
- u8 status)
-{
- u8 curr_status = vpm_ioread8(vdev, &vdev->common, COMMON_OFFSET(device_status));
- vpm_iowrite8(vdev, &vdev->common,
- curr_status | status, COMMON_OFFSET(device_status));
-}
-
-static inline u64 vpm_get_features(struct virtio_pci_modern_device *vdev)
-{
- u32 features_lo, features_hi;
-
- vpm_iowrite32(vdev, &vdev->common, 0, COMMON_OFFSET(device_feature_select));
- features_lo = vpm_ioread32(vdev, &vdev->common, COMMON_OFFSET(device_feature));
- vpm_iowrite32(vdev, &vdev->common, 1, COMMON_OFFSET(device_feature_select));
- features_hi = vpm_ioread32(vdev, &vdev->common, COMMON_OFFSET(device_feature));
-
- return ((u64)features_hi << 32) | features_lo;
-}
-
-static inline void vpm_set_features(struct virtio_pci_modern_device *vdev,
- u64 features)
-{
- u32 features_lo = (u32)features;
- u32 features_hi = features >> 32;
-
- vpm_iowrite32(vdev, &vdev->common, 0, COMMON_OFFSET(guest_feature_select));
- vpm_iowrite32(vdev, &vdev->common, features_lo, COMMON_OFFSET(guest_feature));
- vpm_iowrite32(vdev, &vdev->common, 1, COMMON_OFFSET(guest_feature_select));
- vpm_iowrite32(vdev, &vdev->common, features_hi, COMMON_OFFSET(guest_feature));
-}
-
-static inline void vpm_get(struct virtio_pci_modern_device *vdev,
- unsigned offset, void *buf, unsigned len)
-{
- u8 *ptr = buf;
- unsigned i;
-
- for (i = 0; i < len; i++)
- ptr[i] = vpm_ioread8(vdev, &vdev->device, offset + i);
-}
-
-static inline u8 vpm_get_isr(struct virtio_pci_modern_device *vdev)
-{
- return vpm_ioread8(vdev, &vdev->isr, 0);
-}
-
-void vpm_notify(struct virtio_pci_modern_device *vdev,
- struct vring_virtqueue *vq);
-
-int vpm_find_vqs(struct virtio_pci_modern_device *vdev,
- unsigned nvqs, struct vring_virtqueue *vqs);
-
-int virtio_pci_find_capability(struct pci_device *pci, uint8_t cfg_type);
-
-int virtio_pci_map_capability(struct pci_device *pci, int cap, size_t minlen,
- u32 align, u32 start, u32 size,
- struct virtio_pci_region *region);
-
-void virtio_pci_unmap_capability(struct virtio_pci_region *region);
#endif /* _VIRTIO_PCI_H_ */
diff --git a/roms/ipxe/src/include/ipxe/virtio-ring.h b/roms/ipxe/src/include/ipxe/virtio-ring.h
index 6ba550b5a..c687acab7 100644
--- a/roms/ipxe/src/include/ipxe/virtio-ring.h
+++ b/roms/ipxe/src/include/ipxe/virtio-ring.h
@@ -1,8 +1,6 @@
#ifndef _VIRTIO_RING_H_
# define _VIRTIO_RING_H_
-#include <ipxe/virtio-pci.h>
-
/* Status byte for guest to report progress, and synchronize features. */
/* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */
#define VIRTIO_CONFIG_S_ACKNOWLEDGE 1
@@ -10,17 +8,9 @@
#define VIRTIO_CONFIG_S_DRIVER 2
/* Driver has used its parts of the config, and is happy */
#define VIRTIO_CONFIG_S_DRIVER_OK 4
-/* Driver has finished configuring features */
-#define VIRTIO_CONFIG_S_FEATURES_OK 8
/* We've given up on this device. */
#define VIRTIO_CONFIG_S_FAILED 0x80
-/* Virtio feature flags used to negotiate device and driver features. */
-/* Can the device handle any descriptor layout? */
-#define VIRTIO_F_ANY_LAYOUT 27
-/* v1.0 compliant. */
-#define VIRTIO_F_VERSION_1 32
-
#define MAX_QUEUE_NUM (256)
#define VRING_DESC_F_NEXT 1
@@ -81,7 +71,6 @@ struct vring_virtqueue {
void *vdata[MAX_QUEUE_NUM];
/* PCI */
int queue_index;
- struct virtio_pci_region notification;
};
struct vring_list {
@@ -145,7 +134,6 @@ void *vring_get_buf(struct vring_virtqueue *vq, unsigned int *len);
void vring_add_buf(struct vring_virtqueue *vq, struct vring_list list[],
unsigned int out, unsigned int in,
void *index, int num_added);
-void vring_kick(struct virtio_pci_modern_device *vdev, unsigned int ioaddr,
- struct vring_virtqueue *vq, int num_added);
+void vring_kick(unsigned int ioaddr, struct vring_virtqueue *vq, int num_added);
#endif /* _VIRTIO_RING_H_ */
diff --git a/roms/ipxe/src/include/ipxe/xen.h b/roms/ipxe/src/include/ipxe/xen.h
index 0fb8b7625..eac1145ad 100644
--- a/roms/ipxe/src/include/ipxe/xen.h
+++ b/roms/ipxe/src/include/ipxe/xen.h
@@ -13,7 +13,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define __XEN_INTERFACE_VERSION__ 0x00040400
#include <stdint.h>
-#include <ipxe/bitops.h>
#include <ipxe/uaccess.h>
#include <xen/xen.h>
#include <xen/event_channel.h>
@@ -59,19 +58,6 @@ struct xen_hypervisor {
struct xen_store store;
};
-/**
- * Test and clear pending event
- *
- * @v xen Xen hypervisor
- * @v port Event channel port
- * @ret pending Event was pending
- */
-static inline __attribute__ (( always_inline )) int
-xenevent_pending ( struct xen_hypervisor *xen, evtchn_port_t port ) {
-
- return test_and_clear_bit ( port, xen->shared->evtchn_pending );
-}
-
#include <bits/xen.h>
/**
diff --git a/roms/ipxe/src/include/ipxe/xsigo.h b/roms/ipxe/src/include/ipxe/xsigo.h
deleted file mode 100644
index f4f14c487..000000000
--- a/roms/ipxe/src/include/ipxe/xsigo.h
+++ /dev/null
@@ -1,406 +0,0 @@
-#ifndef _IPXE_XSIGO_H
-#define _IPXE_XSIGO_H
-
-/** @file
- *
- * Xsigo virtual Ethernet devices
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <stdint.h>
-#include <ipxe/infiniband.h>
-#include <ipxe/eoib.h>
-
-/** Xsigo directory service record name */
-#define XDS_SERVICE_NAME "XSIGOXDS"
-
-/** Xsigo configuration manager service ID */
-#define XCM_SERVICE_ID { 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x97, 0x01 }
-
-/** Xsigo management class */
-#define XSIGO_MGMT_CLASS 0x0b
-
-/** Xsigo management class version */
-#define XSIGO_MGMT_CLASS_VERSION 2
-
-/** Xsigo configuration manager request MAD */
-#define XSIGO_ATTR_XCM_REQUEST 0xb002
-
-/** Generic operating system type */
-#define XSIGO_OS_TYPE_GENERIC 0x40
-
-/** Xsigo virtual Ethernet broadcast GID prefix */
-#define XVE_PREFIX 0xff15101cUL
-
-/** Xsigo resource types */
-enum xsigo_resource_type {
- /** Virtual Ethernet resource type */
- XSIGO_RESOURCE_XVE = ( 1 << 6 ),
- /** Absence-of-high-availability "resource" type */
- XSIGO_RESOURCE_NO_HA = ( 1 << 4 ),
-};
-
-/** A Xsigo server identifier */
-struct xsigo_server_id {
- /** Virtual machine ID */
- uint32_t vm;
- /** Port GUID */
- union ib_guid guid;
-} __attribute__ (( packed ));
-
-/** A Xsigo configuration manager identifier */
-struct xsigo_manager_id {
- /** Port GUID */
- union ib_guid guid;
- /** LID */
- uint16_t lid;
- /** Reserved */
- uint8_t reserved[10];
-} __attribute__ (( packed ));
-
-/** A Xsigo configuration manager request MAD */
-struct xsigo_managers_request {
- /** MAD header */
- struct ib_mad_hdr mad_hdr;
- /** Reserved */
- uint8_t reserved0[32];
- /** Server ID */
- struct xsigo_server_id server;
- /** Hostname */
- char hostname[ 65 /* Seriously, guys? */ ];
- /** OS version */
- char os_version[32];
- /** CPU architecture */
- char arch[16];
- /** OS type */
- uint8_t os_type;
- /** Reserved */
- uint8_t reserved1[3];
- /** Firmware version */
- uint64_t firmware_version;
- /** Hardware version */
- uint32_t hardware_version;
- /** Driver version */
- uint32_t driver_version;
- /** System ID */
- union ib_gid system_id;
- /** Resource types */
- uint16_t resources;
- /** Reserved */
- uint8_t reserved2[2];
- /** Build version */
- char build[16];
- /** Reserved */
- uint8_t reserved3[19];
-} __attribute__ (( packed ));
-
-/** Resource types are present */
-#define XSIGO_RESOURCES_PRESENT 0x8000
-
-/** A Xsigo configuration manager reply MAD */
-struct xsigo_managers_reply {
- /** MAD header */
- struct ib_mad_hdr mad_hdr;
- /** Reserved */
- uint8_t reserved0[32];
- /** Server ID */
- struct xsigo_server_id server;
- /** Number of XCM records */
- uint8_t count;
- /** Version */
- uint8_t version;
- /** Reserved */
- uint8_t reserved1[2];
- /** Managers */
- struct xsigo_manager_id manager[8];
- /** Reserved */
- uint8_t reserved2[24];
-} __attribute__ (( packed ));
-
-/** A Xsigo MAD */
-union xsigo_mad {
- /** Generic MAD */
- union ib_mad mad;
- /** Configuration manager request */
- struct xsigo_managers_request request;
- /** Configuration manager reply */
- struct xsigo_managers_reply reply;
-} __attribute__ (( packed ));
-
-/** An XSMP node identifier */
-struct xsmp_node_id {
- /** Auxiliary ID (never used) */
- uint32_t aux;
- /** Port GUID */
- union ib_guid guid;
-} __attribute__ (( packed ));
-
-/** An XSMP message header */
-struct xsmp_message_header {
- /** Message type */
- uint8_t type;
- /** Reason code */
- uint8_t code;
- /** Length */
- uint16_t len;
- /** Sequence number */
- uint32_t seq;
- /** Source node ID */
- struct xsmp_node_id src;
- /** Destination node ID */
- struct xsmp_node_id dst;
-} __attribute__ (( packed ));
-
-/** XSMP message types */
-enum xsmp_message_type {
- /** Session message type */
- XSMP_TYPE_SESSION = 1,
- /** Virtual Ethernet message type */
- XSMP_TYPE_XVE = 6,
-};
-
-/** An XSMP session message */
-struct xsmp_session_message {
- /** Message header */
- struct xsmp_message_header hdr;
- /** Message type */
- uint8_t type;
- /** Reason code */
- uint8_t code;
- /** Length (excluding message header) */
- uint16_t len;
- /** Operating system type */
- uint8_t os_type;
- /** Reserved */
- uint8_t reserved0;
- /** Resource types */
- uint16_t resources;
- /** Driver version */
- uint32_t driver_version;
- /** Required chassis version */
- uint32_t chassis_version;
- /** Boot flags */
- uint32_t boot;
- /** Firmware version */
- uint64_t firmware_version;
- /** Hardware version */
- uint32_t hardware_version;
- /** Vendor part ID */
- uint32_t vendor;
- /** Protocol version */
- uint32_t xsmp_version;
- /** Chassis name */
- char chassis[32];
- /** Session name */
- char session[32];
- /** Reserved */
- uint8_t reserved1[120];
-} __attribute__ (( packed ));
-
-/** XSMP session message types */
-enum xsmp_session_type {
- /** Keepalive message */
- XSMP_SESSION_TYPE_HELLO = 1,
- /** Initial registration message */
- XSMP_SESSION_TYPE_REGISTER = 2,
- /** Registration confirmation message */
- XSMP_SESSION_TYPE_CONFIRM = 3,
- /** Registration rejection message */
- XSMP_SESSION_TYPE_REJECT = 4,
- /** Shutdown message */
- XSMP_SESSION_TYPE_SHUTDOWN = 5,
-};
-
-/** XSMP boot flags */
-enum xsmp_session_boot {
- /** PXE boot */
- XSMP_BOOT_PXE = ( 1 << 0 ),
-};
-
-/** XSMP virtual Ethernet channel adapter parameters */
-struct xsmp_xve_ca {
- /** Subnet prefix (little-endian) */
- union ib_guid prefix_le;
- /** Control queue pair number */
- uint32_t ctrl;
- /** Data queue pair number */
- uint32_t data;
- /** Partition key */
- uint16_t pkey;
- /** Queue key */
- uint16_t qkey;
-} __attribute__ (( packed ));
-
-/** XSMP virtual Ethernet MAC address */
-struct xsmp_xve_mac {
- /** High 16 bits */
- uint16_t high;
- /** Low 32 bits */
- uint32_t low;
-} __attribute__ (( packed ));
-
-/** An XSMP virtual Ethernet message */
-struct xsmp_xve_message {
- /** Message header */
- struct xsmp_message_header hdr;
- /** Message type */
- uint8_t type;
- /** Reason code */
- uint8_t code;
- /** Length (excluding message header) */
- uint16_t len;
- /** Update bitmask */
- uint32_t update;
- /** Resource identifier */
- union ib_guid resource;
- /** TCA GUID (little-endian) */
- union ib_guid guid_le;
- /** TCA LID */
- uint16_t lid;
- /** MAC address (little-endian) */
- struct xsmp_xve_mac mac_le;
- /** Rate */
- uint16_t rate;
- /** Administrative state (non-zero = "up") */
- uint16_t state;
- /** Encapsulation (apparently obsolete and unused) */
- uint16_t encap;
- /** MTU */
- uint16_t mtu;
- /** Installation flags (apparently obsolete and unused) */
- uint32_t install;
- /** Interface name */
- char name[16];
- /** Service level */
- uint16_t sl;
- /** Flow control enabled (apparently obsolete and unused) */
- uint16_t flow;
- /** Committed rate (in Mbps) */
- uint16_t committed_mbps;
- /** Peak rate (in Mbps) */
- uint16_t peak_mbps;
- /** Committed burst size (in bytes) */
- uint32_t committed_burst;
- /** Peak burst size (in bytes) */
- uint32_t peak_burst;
- /** VMware index */
- uint8_t vmware;
- /** Reserved */
- uint8_t reserved0;
- /** Multipath flags */
- uint16_t multipath;
- /** Multipath group name */
- char group[48];
- /** Link aggregation flag */
- uint8_t agg;
- /** Link aggregation policy */
- uint8_t policy;
- /** Network ID */
- uint32_t network;
- /** Mode */
- uint8_t mode;
- /** Uplink type */
- uint8_t uplink;
- /** Target channel adapter parameters */
- struct xsmp_xve_ca tca;
- /** Host channel adapter parameters */
- struct xsmp_xve_ca hca;
- /** Reserved */
- uint8_t reserved1[336];
-} __attribute__ (( packed ));
-
-/** XSMP virtual Ethernet message types */
-enum xsmp_xve_type {
- /** Install virtual NIC */
- XSMP_XVE_TYPE_INSTALL = 1,
- /** Delete virtual NIC */
- XSMP_XVE_TYPE_DELETE = 2,
- /** Update virtual NIC */
- XSMP_XVE_TYPE_UPDATE = 3,
- /** Set operational state up */
- XSMP_XVE_TYPE_OPER_UP = 6,
- /** Set operational state down */
- XSMP_XVE_TYPE_OPER_DOWN = 7,
- /** Get operational state */
- XSMP_XVE_TYPE_OPER_REQ = 15,
- /** Virtual NIC is ready */
- XSMP_XVE_TYPE_READY = 20,
-};
-
-/** XSMP virtual Ethernet message codes */
-enum xsmp_xve_code {
- /* Something went wrong */
- XSMP_XVE_CODE_ERROR = 0x84,
-};
-
-/** XSMP virtual Ethernet update bitmask */
-enum xsmp_xve_update {
- /** Update MTU */
- XSMP_XVE_UPDATE_MTU = ( 1 << 2 ),
- /** Update administrative state */
- XSMP_XVE_UPDATE_STATE = ( 1 << 6 ),
- /** Update gateway to mark as down */
- XSMP_XVE_UPDATE_GW_DOWN = ( 1 << 30 ),
- /** Update gateway information */
- XSMP_XVE_UPDATE_GW_CHANGE = ( 1 << 31 ),
-};
-
-/** XSMP virtual Ethernet modes */
-enum xsmp_xve_mode {
- /** Reliable Connected */
- XSMP_XVE_MODE_RC = 1,
- /** Unreliable Datagram */
- XSMP_XVE_MODE_UD = 2,
-};
-
-/** XSMP virtual Ethernet uplink types */
-enum xsmp_xve_uplink {
- /** No uplink */
- XSMP_XVE_NO_UPLINK = 1,
- /** Has uplink */
- XSMP_XVE_UPLINK = 2,
-};
-
-/** An XSMP message */
-union xsmp_message {
- /** Message header */
- struct xsmp_message_header hdr;
- /** Session message */
- struct xsmp_session_message sess;
- /** Virtual Ethernet message */
- struct xsmp_xve_message xve;
-};
-
-/** Delay between attempts to open the Infiniband device
- *
- * This is a policy decision.
- */
-#define XSIGO_OPEN_RETRY_DELAY ( 2 * TICKS_PER_SEC )
-
-/** Delay between unsuccessful discovery attempts
- *
- * This is a policy decision.
- */
-#define XSIGO_DISCOVERY_FAILURE_DELAY ( 10 * TICKS_PER_SEC )
-
-/** Delay between successful discovery attempts
- *
- * This is a policy decision.
- */
-#define XSIGO_DISCOVERY_SUCCESS_DELAY ( 20 * TICKS_PER_SEC )
-
-/** Delay between keepalive requests
- *
- * This is a policy decision.
- */
-#define XSIGO_KEEPALIVE_INTERVAL ( 10 * TICKS_PER_SEC )
-
-/** Maximum time to wait for a keepalive response
- *
- * This is a policy decision.
- */
-#define XSIGO_KEEPALIVE_MAX_WAIT ( 2 * TICKS_PER_SEC )
-
-#endif /* _IPXE_XSIGO_H */