diff options
Diffstat (limited to 'src/include/ipxe/efi/Protocol')
48 files changed, 2542 insertions, 2712 deletions
diff --git a/src/include/ipxe/efi/Protocol/AbsolutePointer.h b/src/include/ipxe/efi/Protocol/AbsolutePointer.h index b20ca0574..48810f90c 100644 --- a/src/include/ipxe/efi/Protocol/AbsolutePointer.h +++ b/src/include/ipxe/efi/Protocol/AbsolutePointer.h @@ -2,34 +2,27 @@ 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 + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.3. **/ #ifndef __ABSOLUTE_POINTER_H__ #define __ABSOLUTE_POINTER_H__ -FILE_LICENCE ( BSD3 ); - +FILE_LICENCE ( BSD2_PATENT ); #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 @@ -37,31 +30,30 @@ typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL; 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 + 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 +#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 @@ -92,7 +84,7 @@ 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. @@ -102,8 +94,7 @@ EFI_STATUS /// /// This bit is set if the alt sensor, such as pen-side button, is active /// -#define EFI_ABS_AltActive 0x00000002 - +#define EFI_ABS_AltActive 0x00000002 /** Definition of EFI_ABSOLUTE_POINTER_STATE. @@ -115,7 +106,7 @@ typedef struct { /// both 0, then this pointer device does not support an x-axis, and this field /// must be ignored. /// - UINT64 CurrentX; + UINT64 CurrentX; /// /// The unsigned position of the activation on the y axis. If the AboluteMinY @@ -123,7 +114,7 @@ typedef struct { /// both 0, then this pointer device does not support an y-axis, and this field /// must be ignored. /// - UINT64 CurrentY; + UINT64 CurrentY; /// /// The unsigned position of the activation on the z axis, or the pressure @@ -131,13 +122,13 @@ typedef struct { /// 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; + UINT64 CurrentZ; /// /// Bits are set to 1 in this structure item to indicate that device buttons are /// active. /// - UINT32 ActiveButtons; + UINT32 ActiveButtons; } EFI_ABSOLUTE_POINTER_STATE; /** @@ -174,9 +165,8 @@ typedef EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, - IN OUT EFI_ABSOLUTE_POINTER_STATE *State -); - + OUT EFI_ABSOLUTE_POINTER_STATE *State + ); /// /// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services @@ -187,21 +177,18 @@ EFI_STATUS /// 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; + 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; + EFI_EVENT WaitForInput; /// /// Pointer to EFI_ABSOLUTE_POINTER_MODE data. /// - EFI_ABSOLUTE_POINTER_MODE *Mode; + EFI_ABSOLUTE_POINTER_MODE *Mode; }; - -extern EFI_GUID gEfiAbsolutePointerProtocolGuid; - +extern EFI_GUID gEfiAbsolutePointerProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/AcpiTable.h b/src/include/ipxe/efi/Protocol/AcpiTable.h index 798b13dc3..27a9873c3 100644 --- a/src/include/ipxe/efi/Protocol/AcpiTable.h +++ b/src/include/ipxe/efi/Protocol/AcpiTable.h @@ -2,26 +2,22 @@ The file provides the protocol to install or remove an ACPI table from a platform. - 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 + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.3. **/ #ifndef __ACPI_TABLE_H___ #define __ACPI_TABLE_H___ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_ACPI_TABLE_PROTOCOL_GUID \ { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }} - typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL; /** @@ -80,8 +76,7 @@ EFI_STATUS IN VOID *AcpiTableBuffer, IN UINTN AcpiTableBufferSize, OUT UINTN *TableKey -); - + ); /** @@ -112,18 +107,17 @@ EFI_STATUS (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)( IN EFI_ACPI_TABLE_PROTOCOL *This, IN UINTN TableKey -); + ); /// /// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component /// to install and uninstall ACPI tables from a platform. /// struct _EFI_ACPI_TABLE_PROTOCOL { - EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable; - EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable; + EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable; + EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable; }; -extern EFI_GUID gEfiAcpiTableProtocolGuid; +extern EFI_GUID gEfiAcpiTableProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/Arp.h b/src/include/ipxe/efi/Protocol/Arp.h index 80921f9a0..0f60e3c4f 100644 --- a/src/include/ipxe/efi/Protocol/Arp.h +++ b/src/include/ipxe/efi/Protocol/Arp.h @@ -7,14 +7,8 @@ The EFI ARP Protocol provides services to map IP network address to hardware address used by a data link protocol. -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol was introduced in UEFI Specification 2.0. @@ -24,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_ARP_PROTOCOL_H__ #define __EFI_ARP_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \ { \ @@ -42,51 +36,51 @@ typedef struct { /// /// Length in bytes of this entry. /// - UINT32 Size; + UINT32 Size; /// /// Set to TRUE if this entry is a "deny" entry. /// Set to FALSE if this entry is a "normal" entry. /// - BOOLEAN DenyFlag; + BOOLEAN DenyFlag; /// /// Set to TRUE if this entry will not time out. /// Set to FALSE if this entry will time out. /// - BOOLEAN StaticFlag; + BOOLEAN StaticFlag; /// /// 16-bit ARP hardware identifier number. /// - UINT16 HwAddressType; + UINT16 HwAddressType; /// /// 16-bit protocol type number. /// - UINT16 SwAddressType; + UINT16 SwAddressType; /// /// The length of the hardware address. /// - UINT8 HwAddressLength; + UINT8 HwAddressLength; /// /// The length of the protocol address. /// - UINT8 SwAddressLength; + UINT8 SwAddressLength; } EFI_ARP_FIND_DATA; typedef struct { /// /// 16-bit protocol type number in host byte order. /// - UINT16 SwAddressType; + UINT16 SwAddressType; /// /// The length in bytes of the station's protocol address to register. /// - UINT8 SwAddressLength; + UINT8 SwAddressLength; /// /// The pointer to the first byte of the protocol address to register. For @@ -94,30 +88,29 @@ typedef struct { /// StationAddress points to the first byte of this station's IP /// address stored in network byte order. /// - VOID *StationAddress; + VOID *StationAddress; /// /// The timeout value in 100-ns units that is associated with each /// new dynamic ARP cache entry. If it is set to zero, the value is /// implementation-specific. /// - UINT32 EntryTimeOut; + UINT32 EntryTimeOut; /// /// The number of retries before a MAC address is resolved. If it is /// set to zero, the value is implementation-specific. /// - UINT32 RetryCount; + UINT32 RetryCount; /// /// The timeout value in 100-ns units that is used to wait for the ARP /// reply packet or the timeout value between two retries. Set to zero /// to use implementation-specific value. /// - UINT32 RetryTimeOut; + UINT32 RetryTimeOut; } EFI_ARP_CONFIG_DATA; - /** This function is used to assign a station address to the ARP cache for this instance of the ARP driver. @@ -255,7 +248,6 @@ EFI_STATUS IN BOOLEAN Refresh ); - /** This function removes specified ARP cache entries. @@ -371,17 +363,16 @@ EFI_STATUS /// network hardware addresses. /// struct _EFI_ARP_PROTOCOL { - EFI_ARP_CONFIGURE Configure; - EFI_ARP_ADD Add; - EFI_ARP_FIND Find; - EFI_ARP_DELETE Delete; - EFI_ARP_FLUSH Flush; - EFI_ARP_REQUEST Request; - EFI_ARP_CANCEL Cancel; + EFI_ARP_CONFIGURE Configure; + EFI_ARP_ADD Add; + EFI_ARP_FIND Find; + EFI_ARP_DELETE Delete; + EFI_ARP_FLUSH Flush; + EFI_ARP_REQUEST Request; + EFI_ARP_CANCEL Cancel; }; - -extern EFI_GUID gEfiArpServiceBindingProtocolGuid; -extern EFI_GUID gEfiArpProtocolGuid; +extern EFI_GUID gEfiArpServiceBindingProtocolGuid; +extern EFI_GUID gEfiArpProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/BlockIo.h b/src/include/ipxe/efi/Protocol/BlockIo.h index f45154bb1..5efaf6e90 100644 --- a/src/include/ipxe/efi/Protocol/BlockIo.h +++ b/src/include/ipxe/efi/Protocol/BlockIo.h @@ -4,38 +4,32 @@ The Block IO protocol is used to abstract block devices like hard drives, DVD-ROMs and floppy drives. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __BLOCK_IO_H__ #define __BLOCK_IO_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_BLOCK_IO_PROTOCOL_GUID \ { \ 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL; +typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL; /// /// Protocol GUID name defined in EFI1.1. /// -#define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID +#define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID /// /// Protocol defined in EFI1.1. /// -typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO; +typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO; /** Reset the Block Device. @@ -137,84 +131,84 @@ typedef struct { /// /// The curent media Id. If the media changes, this value is changed. /// - UINT32 MediaId; + UINT32 MediaId; /// /// TRUE if the media is removable; otherwise, FALSE. /// - BOOLEAN RemovableMedia; + BOOLEAN RemovableMedia; /// /// TRUE if there is a media currently present in the device; /// othersise, FALSE. THis field shows the media present status /// as of the most recent ReadBlocks() or WriteBlocks() call. /// - BOOLEAN MediaPresent; + BOOLEAN MediaPresent; /// /// TRUE if LBA 0 is the first block of a partition; otherwise /// FALSE. For media with only one partition this would be TRUE. /// - BOOLEAN LogicalPartition; + BOOLEAN LogicalPartition; /// /// TRUE if the media is marked read-only otherwise, FALSE. /// This field shows the read-only status as of the most recent WriteBlocks () call. /// - BOOLEAN ReadOnly; + BOOLEAN ReadOnly; /// /// TRUE if the WriteBlock () function caches write data. /// - BOOLEAN WriteCaching; + BOOLEAN WriteCaching; /// /// The intrinsic block size of the device. If the media changes, then /// this field is updated. /// - UINT32 BlockSize; + UINT32 BlockSize; /// /// Supplies the alignment requirement for any buffer to read or write block(s). /// - UINT32 IoAlign; + UINT32 IoAlign; /// /// The last logical block address on the device. /// If the media changes, then this field is updated. /// - EFI_LBA LastBlock; + EFI_LBA LastBlock; /// /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the first LBA is aligned to /// a physical block boundary. /// - EFI_LBA LowestAlignedLba; + EFI_LBA LowestAlignedLba; /// /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the number of logical blocks /// per physical block. /// - UINT32 LogicalBlocksPerPhysicalBlock; + UINT32 LogicalBlocksPerPhysicalBlock; /// /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to /// EFI_BLOCK_IO_PROTOCOL_REVISION3. Returns the optimal transfer length /// granularity as a number of logical blocks. /// - UINT32 OptimalTransferLengthGranularity; + UINT32 OptimalTransferLengthGranularity; } EFI_BLOCK_IO_MEDIA; -#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000 -#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001 -#define EFI_BLOCK_IO_PROTOCOL_REVISION3 0x00020031 +#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000 +#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001 +#define EFI_BLOCK_IO_PROTOCOL_REVISION3 0x0002001F /// /// Revision defined in EFI1.1. /// -#define EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION +#define EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION /// /// This protocol provides control over block devices. @@ -225,19 +219,18 @@ struct _EFI_BLOCK_IO_PROTOCOL { /// revisions must be backwards compatible. If a future version is not /// back wards compatible, it is not the same GUID. /// - UINT64 Revision; + UINT64 Revision; /// /// Pointer to the EFI_BLOCK_IO_MEDIA data for this device. /// - EFI_BLOCK_IO_MEDIA *Media; - - EFI_BLOCK_RESET Reset; - EFI_BLOCK_READ ReadBlocks; - EFI_BLOCK_WRITE WriteBlocks; - EFI_BLOCK_FLUSH FlushBlocks; + EFI_BLOCK_IO_MEDIA *Media; + EFI_BLOCK_RESET Reset; + EFI_BLOCK_READ ReadBlocks; + EFI_BLOCK_WRITE WriteBlocks; + EFI_BLOCK_FLUSH FlushBlocks; }; -extern EFI_GUID gEfiBlockIoProtocolGuid; +extern EFI_GUID gEfiBlockIoProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/BlockIo2.h b/src/include/ipxe/efi/Protocol/BlockIo2.h index 0b9cf8eb1..abc2f8a9b 100644 --- a/src/include/ipxe/efi/Protocol/BlockIo2.h +++ b/src/include/ipxe/efi/Protocol/BlockIo2.h @@ -5,21 +5,15 @@ enables the ability to read and write data at a block level in a non-blocking manner. - Copyright (c) 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. + Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __BLOCK_IO2_H__ #define __BLOCK_IO2_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/BlockIo.h> @@ -28,27 +22,25 @@ FILE_LICENCE ( BSD3 ); 0xa77b2472, 0xe282, 0x4e9f, {0xa2, 0x45, 0xc2, 0xc0, 0xe2, 0x7b, 0xbc, 0xc1} \ } -typedef struct _EFI_BLOCK_IO2_PROTOCOL EFI_BLOCK_IO2_PROTOCOL; +typedef struct _EFI_BLOCK_IO2_PROTOCOL EFI_BLOCK_IO2_PROTOCOL; /** The struct of Block IO2 Token. **/ typedef struct { - /// /// If Event is NULL, then blocking I/O is performed.If Event is not NULL and /// non-blocking I/O is supported, then non-blocking I/O is performed, and /// Event will be signaled when the read request is completed. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Defines whether or not the signaled event encountered an error. /// - EFI_STATUS TransactionStatus; + EFI_STATUS TransactionStatus; } EFI_BLOCK_IO2_TOKEN; - /** Reset the block device hardware. @@ -64,7 +56,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_RESET_EX) ( +(EFIAPI *EFI_BLOCK_RESET_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN BOOLEAN ExtendedVerification ); @@ -82,7 +74,7 @@ EFI_STATUS @param[in] MediaId Id of the media, changes every time the media is replaced. @param[in] Lba The starting Logical Block Address to read from. - @param[in, out] Token A pointer to the token associated with the transaction. + @param[in, out] Token A pointer to the token associated with the transaction. @param[in] BufferSize Size of Buffer, must be a multiple of device block size. @param[out] Buffer A pointer to the destination buffer for the data. The caller is responsible for either having implicit or @@ -104,13 +96,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_READ_EX) ( +(EFIAPI *EFI_BLOCK_READ_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, IN OUT EFI_BLOCK_IO2_TOKEN *Token, IN UINTN BufferSize, - OUT VOID *Buffer + OUT VOID *Buffer ); /** @@ -146,7 +138,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_WRITE_EX) ( +(EFIAPI *EFI_BLOCK_WRITE_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, @@ -179,7 +171,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_FLUSH_EX) ( +(EFIAPI *EFI_BLOCK_FLUSH_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN OUT EFI_BLOCK_IO2_TOKEN *Token ); @@ -194,15 +186,14 @@ struct _EFI_BLOCK_IO2_PROTOCOL { /// A pointer to the EFI_BLOCK_IO_MEDIA data for this device. /// Type EFI_BLOCK_IO_MEDIA is defined in BlockIo.h. /// - EFI_BLOCK_IO_MEDIA *Media; + EFI_BLOCK_IO_MEDIA *Media; - EFI_BLOCK_RESET_EX Reset; - EFI_BLOCK_READ_EX ReadBlocksEx; - EFI_BLOCK_WRITE_EX WriteBlocksEx; - EFI_BLOCK_FLUSH_EX FlushBlocksEx; + EFI_BLOCK_RESET_EX Reset; + EFI_BLOCK_READ_EX ReadBlocksEx; + EFI_BLOCK_WRITE_EX WriteBlocksEx; + EFI_BLOCK_FLUSH_EX FlushBlocksEx; }; -extern EFI_GUID gEfiBlockIo2ProtocolGuid; +extern EFI_GUID gEfiBlockIo2ProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h b/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h index be92323fc..69d9b1dcf 100644 --- a/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h +++ b/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h @@ -6,21 +6,15 @@ instance of this protocol for every PCI controller that has a PCI option ROM that contains one or more UEFI drivers. The protocol instance is attached to the handle of the PCI controller. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_ #define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// Global ID for the Bus Specific Driver Override Protocol @@ -30,7 +24,7 @@ FILE_LICENCE ( BSD3 ); 0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65 } \ } -typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL; +typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL; // // Prototypes for the Bus Specific Driver Override Protocol @@ -66,9 +60,9 @@ EFI_STATUS /// drivers to controllers. /// struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL { - EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver; + EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver; }; -extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid; +extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/ComponentName.h b/src/include/ipxe/efi/Protocol/ComponentName.h index 87b6d61a0..cd7f4d0e3 100644 --- a/src/include/ipxe/efi/Protocol/ComponentName.h +++ b/src/include/ipxe/efi/Protocol/ComponentName.h @@ -3,21 +3,15 @@ This protocol is used to retrieve user readable names of EFI Drivers and controllers managed by EFI Drivers. -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_COMPONENT_NAME_H__ #define __EFI_COMPONENT_NAME_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// The global ID for the Component Name Protocol. @@ -27,8 +21,7 @@ FILE_LICENCE ( BSD3 ); 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; - +typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; /** Retrieves a Unicode string that is the user-readable name of the EFI Driver. @@ -60,7 +53,6 @@ EFI_STATUS OUT CHAR16 **DriverName ); - /** Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. @@ -116,16 +108,16 @@ EFI_STATUS /// and controllers managed by UEFI Drivers. /// struct _EFI_COMPONENT_NAME_PROTOCOL { - EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; - EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; + EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; + EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; /// /// A Null-terminated ASCII string that contains one or more /// ISO 639-2 language codes. This is the list of language codes /// that this protocol supports. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiComponentNameProtocolGuid; +extern EFI_GUID gEfiComponentNameProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/ComponentName2.h b/src/include/ipxe/efi/Protocol/ComponentName2.h index 82d8b2561..886c9eb52 100644 --- a/src/include/ipxe/efi/Protocol/ComponentName2.h +++ b/src/include/ipxe/efi/Protocol/ComponentName2.h @@ -3,21 +3,15 @@ This protocol is used to retrieve user readable names of drivers and controllers managed by UEFI Drivers. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_COMPONENT_NAME2_H__ #define __EFI_COMPONENT_NAME2_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// Global ID for the Component Name Protocol @@ -25,8 +19,7 @@ FILE_LICENCE ( BSD3 ); #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \ {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } } -typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL; - +typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL; /** Retrieves a string that is the user readable name of @@ -72,7 +65,6 @@ EFI_STATUS OUT CHAR16 **DriverName ); - /** Retrieves a string that is the user readable name of the controller that is being managed by an EFI Driver. @@ -156,8 +148,8 @@ EFI_STATUS /// and controllers managed by UEFI Drivers. /// struct _EFI_COMPONENT_NAME2_PROTOCOL { - EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName; - EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName; + EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName; + EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName; /// /// A Null-terminated ASCII string array that contains one or more @@ -166,9 +158,9 @@ struct _EFI_COMPONENT_NAME2_PROTOCOL { /// driver is up to the driver writer. SupportedLanguages is /// specified in RFC 4646 format. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiComponentName2ProtocolGuid; +extern EFI_GUID gEfiComponentName2ProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/DebugSupport.h b/src/include/ipxe/efi/Protocol/DebugSupport.h index e2b4b203a..1b28b0ed2 100644 --- a/src/include/ipxe/efi/Protocol/DebugSupport.h +++ b/src/include/ipxe/efi/Protocol/DebugSupport.h @@ -5,23 +5,18 @@ The DebugSupport protocol is used by source level debuggers to abstract the processor and handle context save and restore operations. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> +Copyright (c) 2020, Hewlett Packard Enterprise Development LP. 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. +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __DEBUG_SUPPORT_H__ #define __DEBUG_SUPPORT_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/IndustryStandard/PeImage.h> @@ -39,221 +34,221 @@ typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL; /// Processor exception to be hooked. /// All exception types for IA32, X64, Itanium and EBC processors are defined. /// -typedef INTN EFI_EXCEPTION_TYPE; +typedef INTN EFI_EXCEPTION_TYPE; /// /// IA-32 processor exception types. /// -#define EXCEPT_IA32_DIVIDE_ERROR 0 -#define EXCEPT_IA32_DEBUG 1 -#define EXCEPT_IA32_NMI 2 -#define EXCEPT_IA32_BREAKPOINT 3 -#define EXCEPT_IA32_OVERFLOW 4 -#define EXCEPT_IA32_BOUND 5 -#define EXCEPT_IA32_INVALID_OPCODE 6 -#define EXCEPT_IA32_DOUBLE_FAULT 8 -#define EXCEPT_IA32_INVALID_TSS 10 -#define EXCEPT_IA32_SEG_NOT_PRESENT 11 -#define EXCEPT_IA32_STACK_FAULT 12 -#define EXCEPT_IA32_GP_FAULT 13 -#define EXCEPT_IA32_PAGE_FAULT 14 -#define EXCEPT_IA32_FP_ERROR 16 -#define EXCEPT_IA32_ALIGNMENT_CHECK 17 -#define EXCEPT_IA32_MACHINE_CHECK 18 -#define EXCEPT_IA32_SIMD 19 +#define EXCEPT_IA32_DIVIDE_ERROR 0 +#define EXCEPT_IA32_DEBUG 1 +#define EXCEPT_IA32_NMI 2 +#define EXCEPT_IA32_BREAKPOINT 3 +#define EXCEPT_IA32_OVERFLOW 4 +#define EXCEPT_IA32_BOUND 5 +#define EXCEPT_IA32_INVALID_OPCODE 6 +#define EXCEPT_IA32_DOUBLE_FAULT 8 +#define EXCEPT_IA32_INVALID_TSS 10 +#define EXCEPT_IA32_SEG_NOT_PRESENT 11 +#define EXCEPT_IA32_STACK_FAULT 12 +#define EXCEPT_IA32_GP_FAULT 13 +#define EXCEPT_IA32_PAGE_FAULT 14 +#define EXCEPT_IA32_FP_ERROR 16 +#define EXCEPT_IA32_ALIGNMENT_CHECK 17 +#define EXCEPT_IA32_MACHINE_CHECK 18 +#define EXCEPT_IA32_SIMD 19 /// /// FXSAVE_STATE. /// FP / MMX / XMM registers (see fxrstor instruction definition). /// typedef struct { - UINT16 Fcw; - UINT16 Fsw; - UINT16 Ftw; - UINT16 Opcode; - UINT32 Eip; - UINT16 Cs; - UINT16 Reserved1; - UINT32 DataOffset; - UINT16 Ds; - UINT8 Reserved2[10]; - UINT8 St0Mm0[10], Reserved3[6]; - UINT8 St1Mm1[10], Reserved4[6]; - UINT8 St2Mm2[10], Reserved5[6]; - UINT8 St3Mm3[10], Reserved6[6]; - UINT8 St4Mm4[10], Reserved7[6]; - UINT8 St5Mm5[10], Reserved8[6]; - UINT8 St6Mm6[10], Reserved9[6]; - UINT8 St7Mm7[10], Reserved10[6]; - UINT8 Xmm0[16]; - UINT8 Xmm1[16]; - UINT8 Xmm2[16]; - UINT8 Xmm3[16]; - UINT8 Xmm4[16]; - UINT8 Xmm5[16]; - UINT8 Xmm6[16]; - UINT8 Xmm7[16]; - UINT8 Reserved11[14 * 16]; + UINT16 Fcw; + UINT16 Fsw; + UINT16 Ftw; + UINT16 Opcode; + UINT32 Eip; + UINT16 Cs; + UINT16 Reserved1; + UINT32 DataOffset; + UINT16 Ds; + UINT8 Reserved2[10]; + UINT8 St0Mm0[10], Reserved3[6]; + UINT8 St1Mm1[10], Reserved4[6]; + UINT8 St2Mm2[10], Reserved5[6]; + UINT8 St3Mm3[10], Reserved6[6]; + UINT8 St4Mm4[10], Reserved7[6]; + UINT8 St5Mm5[10], Reserved8[6]; + UINT8 St6Mm6[10], Reserved9[6]; + UINT8 St7Mm7[10], Reserved10[6]; + UINT8 Xmm0[16]; + UINT8 Xmm1[16]; + UINT8 Xmm2[16]; + UINT8 Xmm3[16]; + UINT8 Xmm4[16]; + UINT8 Xmm5[16]; + UINT8 Xmm6[16]; + UINT8 Xmm7[16]; + UINT8 Reserved11[14 * 16]; } EFI_FX_SAVE_STATE_IA32; /// /// IA-32 processor context definition. /// typedef struct { - UINT32 ExceptionData; - EFI_FX_SAVE_STATE_IA32 FxSaveState; - UINT32 Dr0; - UINT32 Dr1; - UINT32 Dr2; - UINT32 Dr3; - UINT32 Dr6; - UINT32 Dr7; - UINT32 Cr0; - UINT32 Cr1; /* Reserved */ - UINT32 Cr2; - UINT32 Cr3; - UINT32 Cr4; - UINT32 Eflags; - UINT32 Ldtr; - UINT32 Tr; - UINT32 Gdtr[2]; - UINT32 Idtr[2]; - UINT32 Eip; - UINT32 Gs; - UINT32 Fs; - UINT32 Es; - UINT32 Ds; - UINT32 Cs; - UINT32 Ss; - UINT32 Edi; - UINT32 Esi; - UINT32 Ebp; - UINT32 Esp; - UINT32 Ebx; - UINT32 Edx; - UINT32 Ecx; - UINT32 Eax; + UINT32 ExceptionData; + EFI_FX_SAVE_STATE_IA32 FxSaveState; + UINT32 Dr0; + UINT32 Dr1; + UINT32 Dr2; + UINT32 Dr3; + UINT32 Dr6; + UINT32 Dr7; + UINT32 Cr0; + UINT32 Cr1; /* Reserved */ + UINT32 Cr2; + UINT32 Cr3; + UINT32 Cr4; + UINT32 Eflags; + UINT32 Ldtr; + UINT32 Tr; + UINT32 Gdtr[2]; + UINT32 Idtr[2]; + UINT32 Eip; + UINT32 Gs; + UINT32 Fs; + UINT32 Es; + UINT32 Ds; + UINT32 Cs; + UINT32 Ss; + UINT32 Edi; + UINT32 Esi; + UINT32 Ebp; + UINT32 Esp; + UINT32 Ebx; + UINT32 Edx; + UINT32 Ecx; + UINT32 Eax; } EFI_SYSTEM_CONTEXT_IA32; /// /// x64 processor exception types. /// -#define EXCEPT_X64_DIVIDE_ERROR 0 -#define EXCEPT_X64_DEBUG 1 -#define EXCEPT_X64_NMI 2 -#define EXCEPT_X64_BREAKPOINT 3 -#define EXCEPT_X64_OVERFLOW 4 -#define EXCEPT_X64_BOUND 5 -#define EXCEPT_X64_INVALID_OPCODE 6 -#define EXCEPT_X64_DOUBLE_FAULT 8 -#define EXCEPT_X64_INVALID_TSS 10 -#define EXCEPT_X64_SEG_NOT_PRESENT 11 -#define EXCEPT_X64_STACK_FAULT 12 -#define EXCEPT_X64_GP_FAULT 13 -#define EXCEPT_X64_PAGE_FAULT 14 -#define EXCEPT_X64_FP_ERROR 16 -#define EXCEPT_X64_ALIGNMENT_CHECK 17 -#define EXCEPT_X64_MACHINE_CHECK 18 -#define EXCEPT_X64_SIMD 19 +#define EXCEPT_X64_DIVIDE_ERROR 0 +#define EXCEPT_X64_DEBUG 1 +#define EXCEPT_X64_NMI 2 +#define EXCEPT_X64_BREAKPOINT 3 +#define EXCEPT_X64_OVERFLOW 4 +#define EXCEPT_X64_BOUND 5 +#define EXCEPT_X64_INVALID_OPCODE 6 +#define EXCEPT_X64_DOUBLE_FAULT 8 +#define EXCEPT_X64_INVALID_TSS 10 +#define EXCEPT_X64_SEG_NOT_PRESENT 11 +#define EXCEPT_X64_STACK_FAULT 12 +#define EXCEPT_X64_GP_FAULT 13 +#define EXCEPT_X64_PAGE_FAULT 14 +#define EXCEPT_X64_FP_ERROR 16 +#define EXCEPT_X64_ALIGNMENT_CHECK 17 +#define EXCEPT_X64_MACHINE_CHECK 18 +#define EXCEPT_X64_SIMD 19 /// /// FXSAVE_STATE. /// FP / MMX / XMM registers (see fxrstor instruction definition). /// typedef struct { - UINT16 Fcw; - UINT16 Fsw; - UINT16 Ftw; - UINT16 Opcode; - UINT64 Rip; - UINT64 DataOffset; - UINT8 Reserved1[8]; - UINT8 St0Mm0[10], Reserved2[6]; - UINT8 St1Mm1[10], Reserved3[6]; - UINT8 St2Mm2[10], Reserved4[6]; - UINT8 St3Mm3[10], Reserved5[6]; - UINT8 St4Mm4[10], Reserved6[6]; - UINT8 St5Mm5[10], Reserved7[6]; - UINT8 St6Mm6[10], Reserved8[6]; - UINT8 St7Mm7[10], Reserved9[6]; - UINT8 Xmm0[16]; - UINT8 Xmm1[16]; - UINT8 Xmm2[16]; - UINT8 Xmm3[16]; - UINT8 Xmm4[16]; - UINT8 Xmm5[16]; - UINT8 Xmm6[16]; - UINT8 Xmm7[16]; + UINT16 Fcw; + UINT16 Fsw; + UINT16 Ftw; + UINT16 Opcode; + UINT64 Rip; + UINT64 DataOffset; + UINT8 Reserved1[8]; + UINT8 St0Mm0[10], Reserved2[6]; + UINT8 St1Mm1[10], Reserved3[6]; + UINT8 St2Mm2[10], Reserved4[6]; + UINT8 St3Mm3[10], Reserved5[6]; + UINT8 St4Mm4[10], Reserved6[6]; + UINT8 St5Mm5[10], Reserved7[6]; + UINT8 St6Mm6[10], Reserved8[6]; + UINT8 St7Mm7[10], Reserved9[6]; + UINT8 Xmm0[16]; + UINT8 Xmm1[16]; + UINT8 Xmm2[16]; + UINT8 Xmm3[16]; + UINT8 Xmm4[16]; + UINT8 Xmm5[16]; + UINT8 Xmm6[16]; + UINT8 Xmm7[16]; // // NOTE: UEFI 2.0 spec definition as follows. // - UINT8 Reserved11[14 * 16]; + UINT8 Reserved11[14 * 16]; } EFI_FX_SAVE_STATE_X64; /// /// x64 processor context definition. /// typedef struct { - UINT64 ExceptionData; - EFI_FX_SAVE_STATE_X64 FxSaveState; - UINT64 Dr0; - UINT64 Dr1; - UINT64 Dr2; - UINT64 Dr3; - UINT64 Dr6; - UINT64 Dr7; - UINT64 Cr0; - UINT64 Cr1; /* Reserved */ - UINT64 Cr2; - UINT64 Cr3; - UINT64 Cr4; - UINT64 Cr8; - UINT64 Rflags; - UINT64 Ldtr; - UINT64 Tr; - UINT64 Gdtr[2]; - UINT64 Idtr[2]; - UINT64 Rip; - UINT64 Gs; - UINT64 Fs; - UINT64 Es; - UINT64 Ds; - UINT64 Cs; - UINT64 Ss; - UINT64 Rdi; - UINT64 Rsi; - UINT64 Rbp; - UINT64 Rsp; - UINT64 Rbx; - UINT64 Rdx; - UINT64 Rcx; - UINT64 Rax; - UINT64 R8; - UINT64 R9; - UINT64 R10; - UINT64 R11; - UINT64 R12; - UINT64 R13; - UINT64 R14; - UINT64 R15; + UINT64 ExceptionData; + EFI_FX_SAVE_STATE_X64 FxSaveState; + UINT64 Dr0; + UINT64 Dr1; + UINT64 Dr2; + UINT64 Dr3; + UINT64 Dr6; + UINT64 Dr7; + UINT64 Cr0; + UINT64 Cr1; /* Reserved */ + UINT64 Cr2; + UINT64 Cr3; + UINT64 Cr4; + UINT64 Cr8; + UINT64 Rflags; + UINT64 Ldtr; + UINT64 Tr; + UINT64 Gdtr[2]; + UINT64 Idtr[2]; + UINT64 Rip; + UINT64 Gs; + UINT64 Fs; + UINT64 Es; + UINT64 Ds; + UINT64 Cs; + UINT64 Ss; + UINT64 Rdi; + UINT64 Rsi; + UINT64 Rbp; + UINT64 Rsp; + UINT64 Rbx; + UINT64 Rdx; + UINT64 Rcx; + UINT64 Rax; + UINT64 R8; + UINT64 R9; + UINT64 R10; + UINT64 R11; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; } EFI_SYSTEM_CONTEXT_X64; /// /// Itanium Processor Family Exception types. /// -#define EXCEPT_IPF_VHTP_TRANSLATION 0 -#define EXCEPT_IPF_INSTRUCTION_TLB 1 -#define EXCEPT_IPF_DATA_TLB 2 -#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3 -#define EXCEPT_IPF_ALT_DATA_TLB 4 -#define EXCEPT_IPF_DATA_NESTED_TLB 5 -#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6 -#define EXCEPT_IPF_DATA_KEY_MISSED 7 -#define EXCEPT_IPF_DIRTY_BIT 8 -#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9 -#define EXCEPT_IPF_DATA_ACCESS_BIT 10 -#define EXCEPT_IPF_BREAKPOINT 11 -#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12 +#define EXCEPT_IPF_VHTP_TRANSLATION 0 +#define EXCEPT_IPF_INSTRUCTION_TLB 1 +#define EXCEPT_IPF_DATA_TLB 2 +#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3 +#define EXCEPT_IPF_ALT_DATA_TLB 4 +#define EXCEPT_IPF_DATA_NESTED_TLB 5 +#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6 +#define EXCEPT_IPF_DATA_KEY_MISSED 7 +#define EXCEPT_IPF_DIRTY_BIT 8 +#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9 +#define EXCEPT_IPF_DATA_ACCESS_BIT 10 +#define EXCEPT_IPF_BREAKPOINT 11 +#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12 // // 13 - 19 reserved // @@ -279,9 +274,9 @@ typedef struct { // // 37 - 44 reserved // -#define EXCEPT_IPF_IA32_EXCEPTION 45 -#define EXCEPT_IPF_IA32_INTERCEPT 46 -#define EXCEPT_IPF_IA32_INTERRUPT 47 +#define EXCEPT_IPF_IA32_EXCEPTION 45 +#define EXCEPT_IPF_IA32_INTERCEPT 46 +#define EXCEPT_IPF_IA32_INTERRUPT 47 /// /// IPF processor context definition. @@ -291,337 +286,480 @@ typedef struct { // The first reserved field is necessary to preserve alignment for the correct // bits in UNAT and to insure F2 is 16 byte aligned. // - UINT64 Reserved; - UINT64 R1; - UINT64 R2; - UINT64 R3; - UINT64 R4; - UINT64 R5; - UINT64 R6; - UINT64 R7; - UINT64 R8; - UINT64 R9; - UINT64 R10; - UINT64 R11; - UINT64 R12; - UINT64 R13; - UINT64 R14; - UINT64 R15; - UINT64 R16; - UINT64 R17; - UINT64 R18; - UINT64 R19; - UINT64 R20; - UINT64 R21; - UINT64 R22; - UINT64 R23; - UINT64 R24; - UINT64 R25; - UINT64 R26; - UINT64 R27; - UINT64 R28; - UINT64 R29; - UINT64 R30; - UINT64 R31; - - UINT64 F2[2]; - UINT64 F3[2]; - UINT64 F4[2]; - UINT64 F5[2]; - UINT64 F6[2]; - UINT64 F7[2]; - UINT64 F8[2]; - UINT64 F9[2]; - UINT64 F10[2]; - UINT64 F11[2]; - UINT64 F12[2]; - UINT64 F13[2]; - UINT64 F14[2]; - UINT64 F15[2]; - UINT64 F16[2]; - UINT64 F17[2]; - UINT64 F18[2]; - UINT64 F19[2]; - UINT64 F20[2]; - UINT64 F21[2]; - UINT64 F22[2]; - UINT64 F23[2]; - UINT64 F24[2]; - UINT64 F25[2]; - UINT64 F26[2]; - UINT64 F27[2]; - UINT64 F28[2]; - UINT64 F29[2]; - UINT64 F30[2]; - UINT64 F31[2]; - - UINT64 Pr; - - UINT64 B0; - UINT64 B1; - UINT64 B2; - UINT64 B3; - UINT64 B4; - UINT64 B5; - UINT64 B6; - UINT64 B7; + UINT64 Reserved; + UINT64 R1; + UINT64 R2; + UINT64 R3; + UINT64 R4; + UINT64 R5; + UINT64 R6; + UINT64 R7; + UINT64 R8; + UINT64 R9; + UINT64 R10; + UINT64 R11; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; + UINT64 R16; + UINT64 R17; + UINT64 R18; + UINT64 R19; + UINT64 R20; + UINT64 R21; + UINT64 R22; + UINT64 R23; + UINT64 R24; + UINT64 R25; + UINT64 R26; + UINT64 R27; + UINT64 R28; + UINT64 R29; + UINT64 R30; + UINT64 R31; + + UINT64 F2[2]; + UINT64 F3[2]; + UINT64 F4[2]; + UINT64 F5[2]; + UINT64 F6[2]; + UINT64 F7[2]; + UINT64 F8[2]; + UINT64 F9[2]; + UINT64 F10[2]; + UINT64 F11[2]; + UINT64 F12[2]; + UINT64 F13[2]; + UINT64 F14[2]; + UINT64 F15[2]; + UINT64 F16[2]; + UINT64 F17[2]; + UINT64 F18[2]; + UINT64 F19[2]; + UINT64 F20[2]; + UINT64 F21[2]; + UINT64 F22[2]; + UINT64 F23[2]; + UINT64 F24[2]; + UINT64 F25[2]; + UINT64 F26[2]; + UINT64 F27[2]; + UINT64 F28[2]; + UINT64 F29[2]; + UINT64 F30[2]; + UINT64 F31[2]; + + UINT64 Pr; + + UINT64 B0; + UINT64 B1; + UINT64 B2; + UINT64 B3; + UINT64 B4; + UINT64 B5; + UINT64 B6; + UINT64 B7; // // application registers // - UINT64 ArRsc; - UINT64 ArBsp; - UINT64 ArBspstore; - UINT64 ArRnat; + UINT64 ArRsc; + UINT64 ArBsp; + UINT64 ArBspstore; + UINT64 ArRnat; - UINT64 ArFcr; + UINT64 ArFcr; - UINT64 ArEflag; - UINT64 ArCsd; - UINT64 ArSsd; - UINT64 ArCflg; - UINT64 ArFsr; - UINT64 ArFir; - UINT64 ArFdr; + UINT64 ArEflag; + UINT64 ArCsd; + UINT64 ArSsd; + UINT64 ArCflg; + UINT64 ArFsr; + UINT64 ArFir; + UINT64 ArFdr; - UINT64 ArCcv; + UINT64 ArCcv; - UINT64 ArUnat; + UINT64 ArUnat; - UINT64 ArFpsr; + UINT64 ArFpsr; - UINT64 ArPfs; - UINT64 ArLc; - UINT64 ArEc; + UINT64 ArPfs; + UINT64 ArLc; + UINT64 ArEc; // // control registers // - UINT64 CrDcr; - UINT64 CrItm; - UINT64 CrIva; - UINT64 CrPta; - UINT64 CrIpsr; - UINT64 CrIsr; - UINT64 CrIip; - UINT64 CrIfa; - UINT64 CrItir; - UINT64 CrIipa; - UINT64 CrIfs; - UINT64 CrIim; - UINT64 CrIha; + UINT64 CrDcr; + UINT64 CrItm; + UINT64 CrIva; + UINT64 CrPta; + UINT64 CrIpsr; + UINT64 CrIsr; + UINT64 CrIip; + UINT64 CrIfa; + UINT64 CrItir; + UINT64 CrIipa; + UINT64 CrIfs; + UINT64 CrIim; + UINT64 CrIha; // // debug registers // - UINT64 Dbr0; - UINT64 Dbr1; - UINT64 Dbr2; - UINT64 Dbr3; - UINT64 Dbr4; - UINT64 Dbr5; - UINT64 Dbr6; - UINT64 Dbr7; - - UINT64 Ibr0; - UINT64 Ibr1; - UINT64 Ibr2; - UINT64 Ibr3; - UINT64 Ibr4; - UINT64 Ibr5; - UINT64 Ibr6; - UINT64 Ibr7; + UINT64 Dbr0; + UINT64 Dbr1; + UINT64 Dbr2; + UINT64 Dbr3; + UINT64 Dbr4; + UINT64 Dbr5; + UINT64 Dbr6; + UINT64 Dbr7; + + UINT64 Ibr0; + UINT64 Ibr1; + UINT64 Ibr2; + UINT64 Ibr3; + UINT64 Ibr4; + UINT64 Ibr5; + UINT64 Ibr6; + UINT64 Ibr7; // // virtual registers - nat bits for R1-R31 // - UINT64 IntNat; - + UINT64 IntNat; } EFI_SYSTEM_CONTEXT_IPF; /// /// EBC processor exception types. /// -#define EXCEPT_EBC_UNDEFINED 0 -#define EXCEPT_EBC_DIVIDE_ERROR 1 -#define EXCEPT_EBC_DEBUG 2 -#define EXCEPT_EBC_BREAKPOINT 3 -#define EXCEPT_EBC_OVERFLOW 4 -#define EXCEPT_EBC_INVALID_OPCODE 5 ///< Opcode out of range. -#define EXCEPT_EBC_STACK_FAULT 6 -#define EXCEPT_EBC_ALIGNMENT_CHECK 7 -#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 ///< Malformed instruction. -#define EXCEPT_EBC_BAD_BREAK 9 ///< BREAK 0 or undefined BREAK. -#define EXCEPT_EBC_STEP 10 ///< To support debug stepping. +#define EXCEPT_EBC_UNDEFINED 0 +#define EXCEPT_EBC_DIVIDE_ERROR 1 +#define EXCEPT_EBC_DEBUG 2 +#define EXCEPT_EBC_BREAKPOINT 3 +#define EXCEPT_EBC_OVERFLOW 4 +#define EXCEPT_EBC_INVALID_OPCODE 5 ///< Opcode out of range. +#define EXCEPT_EBC_STACK_FAULT 6 +#define EXCEPT_EBC_ALIGNMENT_CHECK 7 +#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 ///< Malformed instruction. +#define EXCEPT_EBC_BAD_BREAK 9 ///< BREAK 0 or undefined BREAK. +#define EXCEPT_EBC_STEP 10 ///< To support debug stepping. /// /// For coding convenience, define the maximum valid EBC exception. /// -#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP +#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP /// /// EBC processor context definition. /// typedef struct { - UINT64 R0; - UINT64 R1; - UINT64 R2; - UINT64 R3; - UINT64 R4; - UINT64 R5; - UINT64 R6; - UINT64 R7; - UINT64 Flags; - UINT64 ControlFlags; - UINT64 Ip; + UINT64 R0; + UINT64 R1; + UINT64 R2; + UINT64 R3; + UINT64 R4; + UINT64 R5; + UINT64 R6; + UINT64 R7; + UINT64 Flags; + UINT64 ControlFlags; + UINT64 Ip; } EFI_SYSTEM_CONTEXT_EBC; - - /// /// ARM processor exception types. /// -#define EXCEPT_ARM_RESET 0 -#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1 -#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2 -#define EXCEPT_ARM_PREFETCH_ABORT 3 -#define EXCEPT_ARM_DATA_ABORT 4 -#define EXCEPT_ARM_RESERVED 5 -#define EXCEPT_ARM_IRQ 6 -#define EXCEPT_ARM_FIQ 7 +#define EXCEPT_ARM_RESET 0 +#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1 +#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2 +#define EXCEPT_ARM_PREFETCH_ABORT 3 +#define EXCEPT_ARM_DATA_ABORT 4 +#define EXCEPT_ARM_RESERVED 5 +#define EXCEPT_ARM_IRQ 6 +#define EXCEPT_ARM_FIQ 7 /// /// For coding convenience, define the maximum valid ARM exception. /// -#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ +#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ /// /// ARM processor context definition. /// typedef struct { - UINT32 R0; - UINT32 R1; - UINT32 R2; - UINT32 R3; - UINT32 R4; - UINT32 R5; - UINT32 R6; - UINT32 R7; - UINT32 R8; - UINT32 R9; - UINT32 R10; - UINT32 R11; - UINT32 R12; - UINT32 SP; - UINT32 LR; - UINT32 PC; - UINT32 CPSR; - UINT32 DFSR; - UINT32 DFAR; - UINT32 IFSR; - UINT32 IFAR; + UINT32 R0; + UINT32 R1; + UINT32 R2; + UINT32 R3; + UINT32 R4; + UINT32 R5; + UINT32 R6; + UINT32 R7; + UINT32 R8; + UINT32 R9; + UINT32 R10; + UINT32 R11; + UINT32 R12; + UINT32 SP; + UINT32 LR; + UINT32 PC; + UINT32 CPSR; + UINT32 DFSR; + UINT32 DFAR; + UINT32 IFSR; + UINT32 IFAR; } EFI_SYSTEM_CONTEXT_ARM; - /// /// AARCH64 processor exception types. /// -#define EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS 0 -#define EXCEPT_AARCH64_IRQ 1 -#define EXCEPT_AARCH64_FIQ 2 -#define EXCEPT_AARCH64_SERROR 3 +#define EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS 0 +#define EXCEPT_AARCH64_IRQ 1 +#define EXCEPT_AARCH64_FIQ 2 +#define EXCEPT_AARCH64_SERROR 3 /// /// For coding convenience, define the maximum valid ARM exception. /// -#define MAX_AARCH64_EXCEPTION EXCEPT_AARCH64_SERROR +#define MAX_AARCH64_EXCEPTION EXCEPT_AARCH64_SERROR typedef struct { // General Purpose Registers - UINT64 X0; - UINT64 X1; - UINT64 X2; - UINT64 X3; - UINT64 X4; - UINT64 X5; - UINT64 X6; - UINT64 X7; - UINT64 X8; - UINT64 X9; - UINT64 X10; - UINT64 X11; - UINT64 X12; - UINT64 X13; - UINT64 X14; - UINT64 X15; - UINT64 X16; - UINT64 X17; - UINT64 X18; - UINT64 X19; - UINT64 X20; - UINT64 X21; - UINT64 X22; - UINT64 X23; - UINT64 X24; - UINT64 X25; - UINT64 X26; - UINT64 X27; - UINT64 X28; - UINT64 FP; // x29 - Frame pointer - UINT64 LR; // x30 - Link Register - UINT64 SP; // x31 - Stack pointer + UINT64 X0; + UINT64 X1; + UINT64 X2; + UINT64 X3; + UINT64 X4; + UINT64 X5; + UINT64 X6; + UINT64 X7; + UINT64 X8; + UINT64 X9; + UINT64 X10; + UINT64 X11; + UINT64 X12; + UINT64 X13; + UINT64 X14; + UINT64 X15; + UINT64 X16; + UINT64 X17; + UINT64 X18; + UINT64 X19; + UINT64 X20; + UINT64 X21; + UINT64 X22; + UINT64 X23; + UINT64 X24; + UINT64 X25; + UINT64 X26; + UINT64 X27; + UINT64 X28; + UINT64 FP; // x29 - Frame pointer + UINT64 LR; // x30 - Link Register + UINT64 SP; // x31 - Stack pointer // FP/SIMD Registers - UINT64 V0[2]; - UINT64 V1[2]; - UINT64 V2[2]; - UINT64 V3[2]; - UINT64 V4[2]; - UINT64 V5[2]; - UINT64 V6[2]; - UINT64 V7[2]; - UINT64 V8[2]; - UINT64 V9[2]; - UINT64 V10[2]; - UINT64 V11[2]; - UINT64 V12[2]; - UINT64 V13[2]; - UINT64 V14[2]; - UINT64 V15[2]; - UINT64 V16[2]; - UINT64 V17[2]; - UINT64 V18[2]; - UINT64 V19[2]; - UINT64 V20[2]; - UINT64 V21[2]; - UINT64 V22[2]; - UINT64 V23[2]; - UINT64 V24[2]; - UINT64 V25[2]; - UINT64 V26[2]; - UINT64 V27[2]; - UINT64 V28[2]; - UINT64 V29[2]; - UINT64 V30[2]; - UINT64 V31[2]; - - UINT64 ELR; // Exception Link Register - UINT64 SPSR; // Saved Processor Status Register - UINT64 FPSR; // Floating Point Status Register - UINT64 ESR; // Exception syndrome register - UINT64 FAR; // Fault Address Register + UINT64 V0[2]; + UINT64 V1[2]; + UINT64 V2[2]; + UINT64 V3[2]; + UINT64 V4[2]; + UINT64 V5[2]; + UINT64 V6[2]; + UINT64 V7[2]; + UINT64 V8[2]; + UINT64 V9[2]; + UINT64 V10[2]; + UINT64 V11[2]; + UINT64 V12[2]; + UINT64 V13[2]; + UINT64 V14[2]; + UINT64 V15[2]; + UINT64 V16[2]; + UINT64 V17[2]; + UINT64 V18[2]; + UINT64 V19[2]; + UINT64 V20[2]; + UINT64 V21[2]; + UINT64 V22[2]; + UINT64 V23[2]; + UINT64 V24[2]; + UINT64 V25[2]; + UINT64 V26[2]; + UINT64 V27[2]; + UINT64 V28[2]; + UINT64 V29[2]; + UINT64 V30[2]; + UINT64 V31[2]; + + UINT64 ELR; // Exception Link Register + UINT64 SPSR; // Saved Processor Status Register + UINT64 FPSR; // Floating Point Status Register + UINT64 ESR; // Exception syndrome register + UINT64 FAR; // Fault Address Register } EFI_SYSTEM_CONTEXT_AARCH64; +/// +/// RISC-V processor exception types. +/// +#define EXCEPT_RISCV_INST_MISALIGNED 0 +#define EXCEPT_RISCV_INST_ACCESS_FAULT 1 +#define EXCEPT_RISCV_ILLEGAL_INST 2 +#define EXCEPT_RISCV_BREAKPOINT 3 +#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED 4 +#define EXCEPT_RISCV_LOAD_ACCESS_FAULT 5 +#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6 +#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT 7 +#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE 8 +#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE 9 +#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE 10 +#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE 11 + +#define EXCEPT_RISCV_SOFTWARE_INT 0x0 +#define EXCEPT_RISCV_TIMER_INT 0x1 + +typedef struct { + UINT64 X0; + UINT64 X1; + UINT64 X2; + UINT64 X3; + UINT64 X4; + UINT64 X5; + UINT64 X6; + UINT64 X7; + UINT64 X8; + UINT64 X9; + UINT64 X10; + UINT64 X11; + UINT64 X12; + UINT64 X13; + UINT64 X14; + UINT64 X15; + UINT64 X16; + UINT64 X17; + UINT64 X18; + UINT64 X19; + UINT64 X20; + UINT64 X21; + UINT64 X22; + UINT64 X23; + UINT64 X24; + UINT64 X25; + UINT64 X26; + UINT64 X27; + UINT64 X28; + UINT64 X29; + UINT64 X30; + UINT64 X31; +} EFI_SYSTEM_CONTEXT_RISCV64; + +// +// LoongArch processor exception types. +// +#define EXCEPT_LOONGARCH_INT 0 +#define EXCEPT_LOONGARCH_PIL 1 +#define EXCEPT_LOONGARCH_PIS 2 +#define EXCEPT_LOONGARCH_PIF 3 +#define EXCEPT_LOONGARCH_PME 4 +#define EXCEPT_LOONGARCH_PNR 5 +#define EXCEPT_LOONGARCH_PNX 6 +#define EXCEPT_LOONGARCH_PPI 7 +#define EXCEPT_LOONGARCH_ADE 8 +#define EXCEPT_LOONGARCH_ALE 9 +#define EXCEPT_LOONGARCH_BCE 10 +#define EXCEPT_LOONGARCH_SYS 11 +#define EXCEPT_LOONGARCH_BRK 12 +#define EXCEPT_LOONGARCH_INE 13 +#define EXCEPT_LOONGARCH_IPE 14 +#define EXCEPT_LOONGARCH_FPD 15 +#define EXCEPT_LOONGARCH_SXD 16 +#define EXCEPT_LOONGARCH_ASXD 17 +#define EXCEPT_LOONGARCH_FPE 18 +#define EXCEPT_LOONGARCH_TBR 64 // For code only, there is no such type in the ISA spec, the TLB refill is defined for an independent exception. + +// +// LoongArch processor Interrupt types. +// +#define EXCEPT_LOONGARCH_INT_SIP0 0 +#define EXCEPT_LOONGARCH_INT_SIP1 1 +#define EXCEPT_LOONGARCH_INT_IP0 2 +#define EXCEPT_LOONGARCH_INT_IP1 3 +#define EXCEPT_LOONGARCH_INT_IP2 4 +#define EXCEPT_LOONGARCH_INT_IP3 5 +#define EXCEPT_LOONGARCH_INT_IP4 6 +#define EXCEPT_LOONGARCH_INT_IP5 7 +#define EXCEPT_LOONGARCH_INT_IP6 8 +#define EXCEPT_LOONGARCH_INT_IP7 9 +#define EXCEPT_LOONGARCH_INT_PMC 10 +#define EXCEPT_LOONGARCH_INT_TIMER 11 +#define EXCEPT_LOONGARCH_INT_IPI 12 + +// +// For coding convenience, define the maximum valid +// LoongArch interrupt. +// +#define MAX_LOONGARCH_INTERRUPT 14 + +typedef struct { + UINT64 R0; + UINT64 R1; + UINT64 R2; + UINT64 R3; + UINT64 R4; + UINT64 R5; + UINT64 R6; + UINT64 R7; + UINT64 R8; + UINT64 R9; + UINT64 R10; + UINT64 R11; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; + UINT64 R16; + UINT64 R17; + UINT64 R18; + UINT64 R19; + UINT64 R20; + UINT64 R21; + UINT64 R22; + UINT64 R23; + UINT64 R24; + UINT64 R25; + UINT64 R26; + UINT64 R27; + UINT64 R28; + UINT64 R29; + UINT64 R30; + UINT64 R31; + + UINT64 CRMD; // CuRrent MoDe information + UINT64 PRMD; // PRe-exception MoDe information + UINT64 EUEN; // Extended component Unit ENable + UINT64 MISC; // MISCellaneous controller + UINT64 ECFG; // Exception ConFiGuration + UINT64 ESTAT; // Exception STATus + UINT64 ERA; // Exception Return Address + UINT64 BADV; // BAD Virtual address + UINT64 BADI; // BAD Instruction +} EFI_SYSTEM_CONTEXT_LOONGARCH64; /// /// Universal EFI_SYSTEM_CONTEXT definition. /// typedef union { - EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc; - EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32; - EFI_SYSTEM_CONTEXT_X64 *SystemContextX64; - EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; - EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; - EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; + EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc; + EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32; + EFI_SYSTEM_CONTEXT_X64 *SystemContextX64; + EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; + EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; + EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; + EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64; + EFI_SYSTEM_CONTEXT_LOONGARCH64 *SystemContextLoongArch64; } EFI_SYSTEM_CONTEXT; // @@ -658,15 +796,14 @@ VOID /// Machine type definition /// typedef enum { - IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C - IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664 - IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200 - IsaEbc = IMAGE_FILE_MACHINE_EBC, ///< 0x0EBC - IsaArm = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED, ///< 0x01c2 - IsaAArch64 = IMAGE_FILE_MACHINE_ARM64 ///< 0xAA64 + IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C + IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664 + IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200 + IsaEbc = IMAGE_FILE_MACHINE_EBC, ///< 0x0EBC + IsaArm = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED, ///< 0x01c2 + IsaAArch64 = IMAGE_FILE_MACHINE_ARM64 ///< 0xAA64 } EFI_INSTRUCTION_SET_ARCHITECTURE; - // // DebugSupport member function definitions // @@ -768,13 +905,13 @@ struct _EFI_DEBUG_SUPPORT_PROTOCOL { /// /// Declares the processor architecture for this instance of the EFI Debug Support protocol. /// - EFI_INSTRUCTION_SET_ARCHITECTURE Isa; - EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex; - EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback; - EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback; - EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache; + EFI_INSTRUCTION_SET_ARCHITECTURE Isa; + EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex; + EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback; + EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback; + EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache; }; -extern EFI_GUID gEfiDebugSupportProtocolGuid; +extern EFI_GUID gEfiDebugSupportProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/DevicePath.h b/src/include/ipxe/efi/Protocol/DevicePath.h index d406b2868..3256d5594 100644 --- a/src/include/ipxe/efi/Protocol/DevicePath.h +++ b/src/include/ipxe/efi/Protocol/DevicePath.h @@ -5,21 +5,15 @@ 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 - 2016, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__ #define __EFI_DEVICE_PATH_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Guid/PcAnsi.h> #include <ipxe/efi/IndustryStandard/Bluetooth.h> @@ -49,97 +43,96 @@ FILE_LICENCE ( BSD3 ); that make up the Device Path. **/ typedef struct { - UINT8 Type; ///< 0x01 Hardware Device Path. + UINT8 Type; ///< 0x01 Hardware Device Path. ///< 0x02 ACPI Device Path. ///< 0x03 Messaging Device Path. ///< 0x04 Media Device Path. ///< 0x05 BIOS Boot Specification Device Path. ///< 0x7F End of Hardware Device Path. - UINT8 SubType; ///< Varies by Type + UINT8 SubType; ///< Varies by Type ///< 0xFF End Entire Device Path, or ///< 0x01 End This Instance of a Device Path and start a new ///< Device Path. - UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define - ///< type of data. Size of data is included in Length. - + UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define + ///< type of data. Size of data is included in Length. } EFI_DEVICE_PATH_PROTOCOL; /// /// Device Path protocol definition for backward-compatible with EFI1.1. /// -typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH; +typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH; /// /// Hardware Device Paths. /// -#define HARDWARE_DEVICE_PATH 0x01 +#define HARDWARE_DEVICE_PATH 0x01 /// /// PCI Device Path SubType. /// -#define HW_PCI_DP 0x01 +#define HW_PCI_DP 0x01 /// /// PCI Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// PCI Function Number. /// - UINT8 Function; + UINT8 Function; /// /// PCI Device Number. /// - UINT8 Device; + UINT8 Device; } PCI_DEVICE_PATH; /// /// PCCARD Device Path SubType. /// -#define HW_PCCARD_DP 0x02 +#define HW_PCCARD_DP 0x02 /// /// PCCARD Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Function Number (0 = First Function). /// - UINT8 FunctionNumber; + UINT8 FunctionNumber; } PCCARD_DEVICE_PATH; /// /// Memory Mapped Device Path SubType. /// -#define HW_MEMMAP_DP 0x03 +#define HW_MEMMAP_DP 0x03 /// /// Memory Mapped Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// EFI_MEMORY_TYPE /// - UINT32 MemoryType; + UINT32 MemoryType; /// /// Starting Memory Address. /// - EFI_PHYSICAL_ADDRESS StartingAddress; + EFI_PHYSICAL_ADDRESS StartingAddress; /// /// Ending Memory Address. /// - EFI_PHYSICAL_ADDRESS EndingAddress; + EFI_PHYSICAL_ADDRESS EndingAddress; } MEMMAP_DEVICE_PATH; /// /// Hardware Vendor Device Path SubType. /// -#define HW_VENDOR_DP 0x04 +#define HW_VENDOR_DP 0x04 /// /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must @@ -147,11 +140,11 @@ typedef struct { /// contents on the n bytes that follow in the Vendor Device Path node. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Vendor-assigned GUID that defines the data that follows. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Vendor-defined variable size data. /// @@ -160,56 +153,56 @@ typedef struct { /// /// Controller Device Path SubType. /// -#define HW_CONTROLLER_DP 0x05 +#define HW_CONTROLLER_DP 0x05 /// /// Controller Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Controller number. /// - UINT32 ControllerNumber; + UINT32 ControllerNumber; } CONTROLLER_DEVICE_PATH; /// /// BMC Device Path SubType. /// -#define HW_BMC_DP 0x06 +#define HW_BMC_DP 0x06 /// /// BMC Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Interface Type. /// - UINT8 InterfaceType; + UINT8 InterfaceType; /// /// Base Address. /// - UINT8 BaseAddress[8]; + UINT8 BaseAddress[8]; } BMC_DEVICE_PATH; /// /// ACPI Device Paths. /// -#define ACPI_DEVICE_PATH 0x02 +#define ACPI_DEVICE_PATH 0x02 /// /// ACPI Device Path SubType. /// -#define ACPI_DP 0x01 +#define ACPI_DP 0x01 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Device's PnP hardware ID stored in a numeric 32-bit /// compressed EISA-type ID. This value must match the /// corresponding _HID in the ACPI name space. /// - UINT32 HID; + UINT32 HID; /// /// Unique ID that is required by ACPI if two devices have the /// same _HID. This value must also match the corresponding @@ -217,34 +210,34 @@ typedef struct { /// numeric value type of _UID is supported. Thus, strings must /// not be used for the _UID in the ACPI name space. /// - UINT32 UID; + UINT32 UID; } ACPI_HID_DEVICE_PATH; /// /// Expanded ACPI Device Path SubType. /// -#define ACPI_EXTENDED_DP 0x02 +#define ACPI_EXTENDED_DP 0x02 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Device's PnP hardware ID stored in a numeric 32-bit /// compressed EISA-type ID. This value must match the /// corresponding _HID in the ACPI name space. /// - UINT32 HID; + UINT32 HID; /// /// Unique ID that is required by ACPI if two devices have the /// same _HID. This value must also match the corresponding /// _UID/_HID pair in the ACPI name space. /// - UINT32 UID; + UINT32 UID; /// /// Device's compatible PnP hardware ID stored in a numeric /// 32-bit compressed EISA-type ID. This value must match at /// least one of the compatible device IDs returned by the /// corresponding _CID in the ACPI name space. /// - UINT32 CID; + UINT32 CID; /// /// Optional variable length _HIDSTR. /// Optional variable length _UIDSTR. @@ -259,18 +252,18 @@ typedef struct { // bits[31:16] - binary number // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z' // -#define PNP_EISA_ID_CONST 0x41d0 -#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16)) -#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) -#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) +#define PNP_EISA_ID_CONST 0x41d0 +#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16)) +#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) +#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) -#define PNP_EISA_ID_MASK 0xffff -#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16) +#define PNP_EISA_ID_MASK 0xffff +#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16) /// /// ACPI _ADR Device Path SubType. /// -#define ACPI_ADR_DP 0x03 +#define ACPI_ADR_DP 0x03 /// /// The _ADR device path is used to contain video output device attributes to support the Graphics @@ -278,18 +271,33 @@ typedef struct { /// devices are displaying the same output. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// _ADR value. For video output devices the value of this /// field comes from Table B-2 of the ACPI 3.0 specification. At /// least one _ADR value is required. /// - UINT32 ADR; + UINT32 ADR; // // This device path may optionally contain more than one _ADR entry. // } ACPI_ADR_DEVICE_PATH; +/// +/// ACPI NVDIMM Device Path SubType. +/// +#define ACPI_NVDIMM_DP 0x04 +/// +/// +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + /// + /// NFIT Device Handle, the _ADR of the NVDIMM device. + /// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification. + /// + UINT32 NFITDeviceHandle; +} ACPI_NVDIMM_DEVICE_PATH; + #define ACPI_ADR_DISPLAY_TYPE_OTHER 0 #define ACPI_ADR_DISPLAY_TYPE_VGA 1 #define ACPI_ADR_DISPLAY_TYPE_TV 2 @@ -312,171 +320,171 @@ typedef struct { /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract /// information like networking protocol IP addresses. /// -#define MESSAGING_DEVICE_PATH 0x03 +#define MESSAGING_DEVICE_PATH 0x03 /// /// ATAPI Device Path SubType /// -#define MSG_ATAPI_DP 0x01 +#define MSG_ATAPI_DP 0x01 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Set to zero for primary, or one for secondary. /// - UINT8 PrimarySecondary; + UINT8 PrimarySecondary; /// /// Set to zero for master, or one for slave mode. /// - UINT8 SlaveMaster; + UINT8 SlaveMaster; /// /// Logical Unit Number. /// - UINT16 Lun; + UINT16 Lun; } ATAPI_DEVICE_PATH; /// /// SCSI Device Path SubType. /// -#define MSG_SCSI_DP 0x02 +#define MSG_SCSI_DP 0x02 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Target ID on the SCSI bus (PUN). /// - UINT16 Pun; + UINT16 Pun; /// /// Logical Unit Number (LUN). /// - UINT16 Lun; + UINT16 Lun; } SCSI_DEVICE_PATH; /// /// Fibre Channel SubType. /// -#define MSG_FIBRECHANNEL_DP 0x03 +#define MSG_FIBRECHANNEL_DP 0x03 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved for the future. /// - UINT32 Reserved; + UINT32 Reserved; /// /// Fibre Channel World Wide Number. /// - UINT64 WWN; + UINT64 WWN; /// /// Fibre Channel Logical Unit Number. /// - UINT64 Lun; + UINT64 Lun; } FIBRECHANNEL_DEVICE_PATH; /// /// Fibre Channel Ex SubType. /// -#define MSG_FIBRECHANNELEX_DP 0x15 +#define MSG_FIBRECHANNELEX_DP 0x15 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved for the future. /// - UINT32 Reserved; + UINT32 Reserved; /// /// 8 byte array containing Fibre Channel End Device Port Name. /// - UINT8 WWN[8]; + UINT8 WWN[8]; /// /// 8 byte array containing Fibre Channel Logical Unit Number. /// - UINT8 Lun[8]; + UINT8 Lun[8]; } FIBRECHANNELEX_DEVICE_PATH; /// /// 1394 Device Path SubType /// -#define MSG_1394_DP 0x04 +#define MSG_1394_DP 0x04 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved for the future. /// - UINT32 Reserved; + UINT32 Reserved; /// /// 1394 Global Unique ID (GUID). /// - UINT64 Guid; + UINT64 Guid; } F1394_DEVICE_PATH; /// /// USB Device Path SubType. /// -#define MSG_USB_DP 0x05 +#define MSG_USB_DP 0x05 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// USB Parent Port Number. /// - UINT8 ParentPortNumber; + UINT8 ParentPortNumber; /// /// USB Interface Number. /// - UINT8 InterfaceNumber; + UINT8 InterfaceNumber; } USB_DEVICE_PATH; /// /// USB Class Device Path SubType. /// -#define MSG_USB_CLASS_DP 0x0f +#define MSG_USB_CLASS_DP 0x0f typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Vendor ID assigned by USB-IF. A value of 0xFFFF will /// match any Vendor ID. /// - UINT16 VendorId; + UINT16 VendorId; /// /// Product ID assigned by USB-IF. A value of 0xFFFF will /// match any Product ID. /// - UINT16 ProductId; + UINT16 ProductId; /// /// The class code assigned by the USB-IF. A value of 0xFF /// will match any class code. /// - UINT8 DeviceClass; + UINT8 DeviceClass; /// /// The subclass code assigned by the USB-IF. A value of /// 0xFF will match any subclass code. /// - UINT8 DeviceSubClass; + UINT8 DeviceSubClass; /// /// The protocol code assigned by the USB-IF. A value of /// 0xFF will match any protocol code. /// - UINT8 DeviceProtocol; + UINT8 DeviceProtocol; } USB_CLASS_DEVICE_PATH; /// /// USB WWID Device Path SubType. /// -#define MSG_USB_WWID_DP 0x10 +#define MSG_USB_WWID_DP 0x10 /// /// This device path describes a USB device using its serial number. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// USB interface number. /// - UINT16 InterfaceNumber; + UINT16 InterfaceNumber; /// /// USB vendor id of the device. /// - UINT16 VendorId; + UINT16 VendorId; /// /// USB product id of the device. /// - UINT16 ProductId; + UINT16 ProductId; /// /// Last 64-or-fewer UTF-16 characters of the USB /// serial number. The length of the string is @@ -491,136 +499,136 @@ typedef struct { /// #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Logical Unit Number for the interface. /// - UINT8 Lun; + UINT8 Lun; } DEVICE_LOGICAL_UNIT_DEVICE_PATH; /// /// SATA Device Path SubType. /// -#define MSG_SATA_DP 0x12 +#define MSG_SATA_DP 0x12 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The HBA port number that facilitates the connection to the /// device or a port multiplier. The value 0xFFFF is reserved. /// - UINT16 HBAPortNumber; + UINT16 HBAPortNumber; /// /// The Port multiplier port number that facilitates the connection /// to the device. Must be set to 0xFFFF if the device is directly /// connected to the HBA. /// - UINT16 PortMultiplierPortNumber; + UINT16 PortMultiplierPortNumber; /// /// Logical Unit Number. /// - UINT16 Lun; + UINT16 Lun; } SATA_DEVICE_PATH; /// /// Flag for if the device is directly connected to the HBA. /// -#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000 +#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000 /// /// I2O Device Path SubType. /// -#define MSG_I2O_DP 0x06 +#define MSG_I2O_DP 0x06 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Target ID (TID) for a device. /// - UINT32 Tid; + UINT32 Tid; } I2O_DEVICE_PATH; /// /// MAC Address Device Path SubType. /// -#define MSG_MAC_ADDR_DP 0x0b +#define MSG_MAC_ADDR_DP 0x0b typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The MAC address for a network interface padded with 0s. /// - EFI_MAC_ADDRESS MacAddress; + EFI_MAC_ADDRESS MacAddress; /// /// Network interface type(i.e. 802.3, FDDI). /// - UINT8 IfType; + UINT8 IfType; } MAC_ADDR_DEVICE_PATH; /// /// IPv4 Device Path SubType /// -#define MSG_IPv4_DP 0x0c +#define MSG_IPv4_DP 0x0c typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The local IPv4 address. /// - EFI_IPv4_ADDRESS LocalIpAddress; + EFI_IPv4_ADDRESS LocalIpAddress; /// /// The remote IPv4 address. /// - EFI_IPv4_ADDRESS RemoteIpAddress; + EFI_IPv4_ADDRESS RemoteIpAddress; /// /// The local port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// The remote port number. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// The network protocol(i.e. UDP, TCP). /// - UINT16 Protocol; + UINT16 Protocol; /// /// 0x00 - The Source IP Address was assigned though DHCP. /// 0x01 - The Source IP Address is statically bound. /// - BOOLEAN StaticIpAddress; + BOOLEAN StaticIpAddress; /// /// The gateway IP address /// - EFI_IPv4_ADDRESS GatewayIpAddress; + EFI_IPv4_ADDRESS GatewayIpAddress; /// /// The subnet mask /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; } IPv4_DEVICE_PATH; /// /// IPv6 Device Path SubType. /// -#define MSG_IPv6_DP 0x0d +#define MSG_IPv6_DP 0x0d typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The local IPv6 address. /// - EFI_IPv6_ADDRESS LocalIpAddress; + EFI_IPv6_ADDRESS LocalIpAddress; /// /// The remote IPv6 address. /// - EFI_IPv6_ADDRESS RemoteIpAddress; + EFI_IPv6_ADDRESS RemoteIpAddress; /// /// The local port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// The remote port number. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// The network protocol(i.e. UDP, TCP). /// - UINT16 Protocol; + UINT16 Protocol; /// /// 0x00 - The Local IP Address was manually configured. /// 0x01 - The Local IP Address is assigned through IPv6 @@ -628,23 +636,23 @@ typedef struct { /// 0x02 - The Local IP Address is assigned through IPv6 /// stateful configuration. /// - UINT8 IpAddressOrigin; + UINT8 IpAddressOrigin; /// /// The prefix length /// - UINT8 PrefixLength; + UINT8 PrefixLength; /// /// The gateway IP address /// - EFI_IPv6_ADDRESS GatewayIpAddress; + EFI_IPv6_ADDRESS GatewayIpAddress; } IPv6_DEVICE_PATH; /// /// InfiniBand Device Path SubType. /// -#define MSG_INFINIBAND_DP 0x09 +#define MSG_INFINIBAND_DP 0x09 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Flags to help identify/manage InfiniBand device path elements: /// Bit 0 - IOC/Service (0b = IOC, 1b = Service). @@ -654,24 +662,24 @@ typedef struct { /// Bit 4 - Network Protocol. /// All other bits are reserved. /// - UINT32 ResourceFlags; + UINT32 ResourceFlags; /// /// 128-bit Global Identifier for remote fabric port. /// - UINT8 PortGid[16]; + UINT8 PortGid[16]; /// /// 64-bit unique identifier to remote IOC or server process. /// Interpretation of field specified by Resource Flags (bit 0). /// - UINT64 ServiceId; + UINT64 ServiceId; /// /// 64-bit persistent ID of remote IOC port. /// - UINT64 TargetPortId; + UINT64 TargetPortId; /// /// 64-bit persistent ID of remote device. /// - UINT64 DeviceId; + UINT64 DeviceId; } INFINIBAND_DEVICE_PATH; #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01 @@ -683,23 +691,23 @@ typedef struct { /// /// UART Device Path SubType. /// -#define MSG_UART_DP 0x0e +#define MSG_UART_DP 0x0e typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved. /// - UINT32 Reserved; + UINT32 Reserved; /// /// The baud rate setting for the UART style device. A value of 0 /// means that the device's default baud rate will be used. /// - UINT64 BaudRate; + UINT64 BaudRate; /// /// The number of data bits for the UART style device. A value /// of 0 means that the device's default number of data bits will be used. /// - UINT8 DataBits; + UINT8 DataBits; /// /// The parity setting for the UART style device. /// Parity 0x00 - Default Parity. @@ -709,7 +717,7 @@ typedef struct { /// Parity 0x04 - Mark Parity. /// Parity 0x05 - Space Parity. /// - UINT8 Parity; + UINT8 Parity; /// /// The number of stop bits for the UART style device. /// Stop Bits 0x00 - Default Stop Bits. @@ -717,177 +725,205 @@ typedef struct { /// Stop Bits 0x02 - 1.5 Stop Bits. /// Stop Bits 0x03 - 2 Stop Bits. /// - UINT8 StopBits; + UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -#define MSG_VENDOR_DP 0x0a -typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH; +#define MSG_VENDOR_DP 0x0a +typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH; -#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID -#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID -#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID -#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID +#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID +#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID +#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID +#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID /// /// A new device path node is defined to declare flow control characteristics. /// UART Flow Control Messaging Device Path /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Bitmap of supported flow control types. /// Bit 0 set indicates hardware flow control. /// Bit 1 set indicates Xon/Xoff flow control. /// All other bits are reserved and are clear. /// - UINT32 FlowControlMap; + UINT32 FlowControlMap; } UART_FLOW_CONTROL_DEVICE_PATH; -#define UART_FLOW_CONTROL_HARDWARE 0x00000001 -#define UART_FLOW_CONTROL_XON_XOFF 0x00000010 +#define UART_FLOW_CONTROL_HARDWARE 0x00000001 +#define UART_FLOW_CONTROL_XON_XOFF 0x00000010 -#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID +#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID /// /// Serial Attached SCSI (SAS) Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// DEVICE_PATH_MESSAGING_SAS GUID. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Reserved for future use. /// - UINT32 Reserved; + UINT32 Reserved; /// /// SAS Address for Serial Attached SCSI Target. /// - UINT64 SasAddress; + UINT64 SasAddress; /// /// SAS Logical Unit Number. /// - UINT64 Lun; + UINT64 Lun; /// /// More Information about the device and its interconnect. /// - UINT16 DeviceTopology; + UINT16 DeviceTopology; /// /// Relative Target Port (RTP). /// - UINT16 RelativeTargetPort; + UINT16 RelativeTargetPort; } SAS_DEVICE_PATH; /// /// Serial Attached SCSI (SAS) Ex Device Path SubType /// -#define MSG_SASEX_DP 0x16 +#define MSG_SASEX_DP 0x16 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port. /// - UINT8 SasAddress[8]; + UINT8 SasAddress[8]; /// /// 8-byte array of the SAS Logical Unit Number. /// - UINT8 Lun[8]; + UINT8 Lun[8]; /// /// More Information about the device and its interconnect. /// - UINT16 DeviceTopology; + UINT16 DeviceTopology; /// /// Relative Target Port (RTP). /// - UINT16 RelativeTargetPort; + UINT16 RelativeTargetPort; } SASEX_DEVICE_PATH; /// /// NvmExpress Namespace Device Path SubType. /// -#define MSG_NVME_NAMESPACE_DP 0x17 +#define MSG_NVME_NAMESPACE_DP 0x17 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 NamespaceId; - UINT64 NamespaceUuid; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT32 NamespaceId; + UINT64 NamespaceUuid; } NVME_NAMESPACE_DEVICE_PATH; /// +/// DNS Device Path SubType +/// +#define MSG_DNS_DP 0x1F +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + /// + /// Indicates the DNS server address is IPv4 or IPv6 address. + /// + UINT8 IsIPv6; + /// + /// Instance of the DNS server address. + /// + EFI_IP_ADDRESS DnsServerIp[]; +} DNS_DEVICE_PATH; + +/// /// Uniform Resource Identifiers (URI) Device Path SubType /// -#define MSG_URI_DP 0x18 +#define MSG_URI_DP 0x18 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Instance of the URI pursuant to RFC 3986. /// - CHAR8 Uri[]; + CHAR8 Uri[]; } URI_DEVICE_PATH; /// /// Universal Flash Storage (UFS) Device Path SubType. /// -#define MSG_UFS_DP 0x19 +#define MSG_UFS_DP 0x19 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Target ID on the UFS bus (PUN). /// - UINT8 Pun; + UINT8 Pun; /// /// Logical Unit Number (LUN). /// - UINT8 Lun; + UINT8 Lun; } UFS_DEVICE_PATH; /// /// SD (Secure Digital) Device Path SubType. /// -#define MSG_SD_DP 0x1A +#define MSG_SD_DP 0x1A typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT8 SlotNumber; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT8 SlotNumber; } SD_DEVICE_PATH; /// /// EMMC (Embedded MMC) Device Path SubType. /// -#define MSG_EMMC_DP 0x1D +#define MSG_EMMC_DP 0x1D typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT8 SlotNumber; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT8 SlotNumber; } EMMC_DEVICE_PATH; /// /// iSCSI Device Path SubType /// -#define MSG_ISCSI_DP 0x13 +#define MSG_ISCSI_DP 0x13 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Network Protocol (0 = TCP, 1+ = reserved). /// - UINT16 NetworkProtocol; + UINT16 NetworkProtocol; /// /// iSCSI Login Options. /// - UINT16 LoginOption; + UINT16 LoginOption; /// /// iSCSI Logical Unit Number. /// - UINT64 Lun; + UINT64 Lun; /// /// iSCSI Target Portal group tag the initiator intends /// to establish a session with. /// - UINT16 TargetPortalGroupTag; + UINT16 TargetPortalGroupTag; /// /// iSCSI NodeTarget Name. The length of the name /// is determined by subtracting the offset of this field from Length. @@ -895,81 +931,90 @@ typedef struct { /// CHAR8 iSCSI Target Name. } ISCSI_DEVICE_PATH; -#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000 -#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002 -#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000 -#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008 -#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000 -#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000 -#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000 -#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000 +#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000 +#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002 +#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000 +#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008 +#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000 +#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000 +#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000 +#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000 /// /// VLAN Device Path SubType. /// -#define MSG_VLAN_DP 0x14 +#define MSG_VLAN_DP 0x14 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// VLAN identifier (0-4094). /// - UINT16 VlanId; + UINT16 VlanId; } VLAN_DEVICE_PATH; /// /// Bluetooth Device Path SubType. /// -#define MSG_BLUETOOTH_DP 0x1b +#define MSG_BLUETOOTH_DP 0x1b typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// 48bit Bluetooth device address. /// - BLUETOOTH_ADDRESS BD_ADDR; + BLUETOOTH_ADDRESS BD_ADDR; } BLUETOOTH_DEVICE_PATH; /// /// Wi-Fi Device Path SubType. /// -#define MSG_WIFI_DP 0x1C +#define MSG_WIFI_DP 0x1C typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Service set identifier. A 32-byte octets string. /// - UINT8 SSId[32]; + UINT8 SSId[32]; } WIFI_DEVICE_PATH; +/// +/// Bluetooth LE Device Path SubType. +/// +#define MSG_BLUETOOTH_LE_DP 0x1E +typedef struct { + EFI_DEVICE_PATH_PROTOCOL Header; + BLUETOOTH_LE_ADDRESS Address; +} BLUETOOTH_LE_DEVICE_PATH; + // // Media Device Path // -#define MEDIA_DEVICE_PATH 0x04 +#define MEDIA_DEVICE_PATH 0x04 /// /// Hard Drive Media Device Path SubType. /// -#define MEDIA_HARDDRIVE_DP 0x01 +#define MEDIA_HARDDRIVE_DP 0x01 /// /// The Hard Drive Media Device Path is used to represent a partition on a hard drive. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Describes the entry in a partition table, starting with entry 1. /// Partition number zero represents the entire device. Valid /// partition numbers for a MBR partition are [1, 4]. Valid /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries]. /// - UINT32 PartitionNumber; + UINT32 PartitionNumber; /// /// Starting LBA of the partition on the hard drive. /// - UINT64 PartitionStart; + UINT64 PartitionStart; /// /// Size of the partition in units of Logical Blocks. /// - UINT64 PartitionSize; + UINT64 PartitionSize; /// /// Signature unique to this partition: /// If SignatureType is 0, this field has to be initialized with 16 zeros. @@ -977,68 +1022,68 @@ typedef struct { /// The other 12 bytes are initialized with zeros. /// If SignatureType is 2, this field contains a 16 byte signature. /// - UINT8 Signature[16]; + UINT8 Signature[16]; /// /// Partition Format: (Unused values reserved). /// 0x01 - PC-AT compatible legacy MBR. /// 0x02 - GUID Partition Table. /// - UINT8 MBRType; + UINT8 MBRType; /// /// Type of Disk Signature: (Unused values reserved). /// 0x00 - No Disk Signature. /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR. /// 0x02 - GUID signature. /// - UINT8 SignatureType; + UINT8 SignatureType; } HARDDRIVE_DEVICE_PATH; -#define MBR_TYPE_PCAT 0x01 -#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02 +#define MBR_TYPE_PCAT 0x01 +#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02 -#define NO_DISK_SIGNATURE 0x00 -#define SIGNATURE_TYPE_MBR 0x01 -#define SIGNATURE_TYPE_GUID 0x02 +#define NO_DISK_SIGNATURE 0x00 +#define SIGNATURE_TYPE_MBR 0x01 +#define SIGNATURE_TYPE_GUID 0x02 /// /// CD-ROM Media Device Path SubType. /// -#define MEDIA_CDROM_DP 0x02 +#define MEDIA_CDROM_DP 0x02 /// /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero. /// - UINT32 BootEntry; + UINT32 BootEntry; /// /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing. /// - UINT64 PartitionStart; + UINT64 PartitionStart; /// /// Size of the partition in units of Blocks, also called Sectors. /// - UINT64 PartitionSize; + UINT64 PartitionSize; } CDROM_DEVICE_PATH; // // Use VENDOR_DEVICE_PATH struct // -#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype. +#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype. /// /// File Path Media Device Path SubType /// -#define MEDIA_FILEPATH_DP 0x04 +#define MEDIA_FILEPATH_DP 0x04 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// A NULL-terminated Path string including directory and file names. /// - CHAR16 PathName[1]; + CHAR16 PathName[1]; } FILEPATH_DEVICE_PATH; #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName) @@ -1046,7 +1091,7 @@ typedef struct { /// /// Media Protocol Device Path SubType. /// -#define MEDIA_PROTOCOL_DP 0x05 +#define MEDIA_PROTOCOL_DP 0x05 /// /// The Media Protocol Device Path is used to denote the protocol that is being @@ -1054,157 +1099,156 @@ typedef struct { /// Many protocols are inherent to the style of device path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The ID of the protocol. /// - EFI_GUID Protocol; + EFI_GUID Protocol; } MEDIA_PROTOCOL_DEVICE_PATH; /// /// PIWG Firmware File SubType. /// -#define MEDIA_PIWG_FW_FILE_DP 0x06 +#define MEDIA_PIWG_FW_FILE_DP 0x06 /// /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Firmware file name /// - EFI_GUID FvFileName; + EFI_GUID FvFileName; } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH; /// /// PIWG Firmware Volume Device Path SubType. /// -#define MEDIA_PIWG_FW_VOL_DP 0x07 +#define MEDIA_PIWG_FW_VOL_DP 0x07 /// /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Firmware volume name. /// - EFI_GUID FvName; + EFI_GUID FvName; } MEDIA_FW_VOL_DEVICE_PATH; /// /// Media relative offset range device path. /// -#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08 +#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08 /// /// Used to describe the offset range of media relative. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 Reserved; - UINT64 StartingOffset; - UINT64 EndingOffset; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT32 Reserved; + UINT64 StartingOffset; + UINT64 EndingOffset; } 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 +#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE -extern EFI_GUID gEfiVirtualDiskGuid; +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 +#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE -extern EFI_GUID gEfiVirtualCdGuid; +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 +#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT -extern EFI_GUID gEfiPersistentVirtualDiskGuid; +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 +#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT -extern EFI_GUID gEfiPersistentVirtualCdGuid; +extern EFI_GUID gEfiPersistentVirtualCdGuid; /// /// Media ram disk device path. /// -#define MEDIA_RAM_DISK_DP 0x09 +#define MEDIA_RAM_DISK_DP 0x09 /// /// Used to describe the ram disk device path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Starting Memory Address. /// - UINT32 StartingAddr[2]; + UINT32 StartingAddr[2]; /// /// Ending Memory Address. /// - UINT32 EndingAddr[2]; + UINT32 EndingAddr[2]; /// /// GUID that defines the type of the RAM Disk. /// - EFI_GUID TypeGuid; + EFI_GUID TypeGuid; /// /// RAM Diskinstance number, if supported. The default value is zero. /// - UINT16 Instance; + UINT16 Instance; } MEDIA_RAM_DISK_DEVICE_PATH; /// /// BIOS Boot Specification Device Path. /// -#define BBS_DEVICE_PATH 0x05 +#define BBS_DEVICE_PATH 0x05 /// /// BIOS Boot Specification Device Path SubType. /// -#define BBS_BBS_DP 0x01 +#define BBS_BBS_DP 0x01 /// /// This Device Path is used to describe the booting of non-EFI-aware operating systems. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Device Type as defined by the BIOS Boot Specification. /// - UINT16 DeviceType; + UINT16 DeviceType; /// /// Status Flags as defined by the BIOS Boot Specification. /// - UINT16 StatusFlag; + UINT16 StatusFlag; /// /// Null-terminated ASCII string that describes the boot device to a user. /// - CHAR8 String[1]; + CHAR8 String[1]; } BBS_BBS_DEVICE_PATH; // // DeviceType definitions - from BBS specification // -#define BBS_TYPE_FLOPPY 0x01 -#define BBS_TYPE_HARDDRIVE 0x02 -#define BBS_TYPE_CDROM 0x03 -#define BBS_TYPE_PCMCIA 0x04 -#define BBS_TYPE_USB 0x05 -#define BBS_TYPE_EMBEDDED_NETWORK 0x06 -#define BBS_TYPE_BEV 0x80 -#define BBS_TYPE_UNKNOWN 0xFF - +#define BBS_TYPE_FLOPPY 0x01 +#define BBS_TYPE_HARDDRIVE 0x02 +#define BBS_TYPE_CDROM 0x03 +#define BBS_TYPE_PCMCIA 0x04 +#define BBS_TYPE_USB 0x05 +#define BBS_TYPE_EMBEDDED_NETWORK 0x06 +#define BBS_TYPE_BEV 0x80 +#define BBS_TYPE_UNKNOWN 0xFF /// /// Union of all possible Device Paths and pointers to Device Paths. @@ -1245,6 +1289,7 @@ typedef union { SAS_DEVICE_PATH Sas; SASEX_DEVICE_PATH SasEx; NVME_NAMESPACE_DEVICE_PATH NvmeNamespace; + DNS_DEVICE_PATH Dns; URI_DEVICE_PATH Uri; BLUETOOTH_DEVICE_PATH Bluetooth; WIFI_DEVICE_PATH WiFi; @@ -1264,8 +1309,6 @@ typedef union { BBS_BBS_DEVICE_PATH Bbs; } EFI_DEV_PATH; - - typedef union { EFI_DEVICE_PATH_PROTOCOL *DevPath; PCI_DEVICE_PATH *Pci; @@ -1302,6 +1345,7 @@ typedef union { SAS_DEVICE_PATH *Sas; SASEX_DEVICE_PATH *SasEx; NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace; + DNS_DEVICE_PATH *Dns; URI_DEVICE_PATH *Uri; BLUETOOTH_DEVICE_PATH *Bluetooth; WIFI_DEVICE_PATH *WiFi; @@ -1324,10 +1368,10 @@ typedef union { #pragma pack() -#define END_DEVICE_PATH_TYPE 0x7f -#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF -#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01 +#define END_DEVICE_PATH_TYPE 0x7f +#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF +#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01 -extern EFI_GUID gEfiDevicePathProtocolGuid; +extern EFI_GUID gEfiDevicePathProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/DevicePathToText.h b/src/include/ipxe/efi/Protocol/DevicePathToText.h index edca965bc..2f591b9a2 100644 --- a/src/include/ipxe/efi/Protocol/DevicePathToText.h +++ b/src/include/ipxe/efi/Protocol/DevicePathToText.h @@ -2,21 +2,15 @@ EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0. This protocol provides service to convert device nodes and paths to text. - Copyright (c) 2006 - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// Device Path To Text protocol @@ -42,7 +36,7 @@ FILE_LICENCE ( BSD3 ); **/ typedef -CHAR16* +CHAR16 * (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, IN BOOLEAN DisplayOnly, @@ -65,7 +59,7 @@ CHAR16* **/ typedef -CHAR16* +CHAR16 * (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, @@ -76,12 +70,10 @@ CHAR16* /// This protocol converts device paths and device nodes to text. /// typedef struct { - EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; - EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; + EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; + EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; -extern EFI_GUID gEfiDevicePathToTextProtocolGuid; +extern EFI_GUID gEfiDevicePathToTextProtocolGuid; #endif - - diff --git a/src/include/ipxe/efi/Protocol/Dhcp4.h b/src/include/ipxe/efi/Protocol/Dhcp4.h index 560ee3224..1e7e27b11 100644 --- a/src/include/ipxe/efi/Protocol/Dhcp4.h +++ b/src/include/ipxe/efi/Protocol/Dhcp4.h @@ -4,14 +4,8 @@ These protocols are used to collect configuration information for the EFI IPv4 Protocol drivers and to provide DHCPv4 server and PXE boot server discovery services. -Copyright (c) 2006 - 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol was introduced in UEFI Specification 2.0. @@ -21,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_DHCP4_PROTOCOL_H__ #define __EFI_DHCP4_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_DHCP4_PROTOCOL_GUID \ { \ @@ -35,151 +29,146 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL; - #pragma pack(1) typedef struct { /// /// DHCP option code. /// - UINT8 OpCode; + UINT8 OpCode; /// /// Length of the DHCP option data. Not present if OpCode is 0 or 255. /// - UINT8 Length; + UINT8 Length; /// /// Start of the DHCP option data. Not present if OpCode is 0 or 255 or if Length is zero. /// - UINT8 Data[1]; + UINT8 Data[1]; } EFI_DHCP4_PACKET_OPTION; #pragma pack() - #pragma pack(1) /// /// EFI_DHCP4_PACKET defines the format of DHCPv4 packets. See RFC 2131 for more information. /// typedef struct { - UINT8 OpCode; - UINT8 HwType; - UINT8 HwAddrLen; - UINT8 Hops; - UINT32 Xid; - UINT16 Seconds; - UINT16 Reserved; - EFI_IPv4_ADDRESS ClientAddr; ///< Client IP address from client. - EFI_IPv4_ADDRESS YourAddr; ///< Client IP address from server. - EFI_IPv4_ADDRESS ServerAddr; ///< IP address of next server in bootstrap. - EFI_IPv4_ADDRESS GatewayAddr; ///< Relay agent IP address. - UINT8 ClientHwAddr[16]; ///< Client hardware address. - CHAR8 ServerName[64]; - CHAR8 BootFileName[128]; -}EFI_DHCP4_HEADER; + UINT8 OpCode; + UINT8 HwType; + UINT8 HwAddrLen; + UINT8 Hops; + UINT32 Xid; + UINT16 Seconds; + UINT16 Reserved; + EFI_IPv4_ADDRESS ClientAddr; ///< Client IP address from client. + EFI_IPv4_ADDRESS YourAddr; ///< Client IP address from server. + EFI_IPv4_ADDRESS ServerAddr; ///< IP address of next server in bootstrap. + EFI_IPv4_ADDRESS GatewayAddr; ///< Relay agent IP address. + UINT8 ClientHwAddr[16]; ///< Client hardware address. + CHAR8 ServerName[64]; + CHAR8 BootFileName[128]; +} EFI_DHCP4_HEADER; #pragma pack() - #pragma pack(1) typedef struct { /// /// Size of the EFI_DHCP4_PACKET buffer. /// - UINT32 Size; + UINT32 Size; /// /// Length of the EFI_DHCP4_PACKET from the first byte of the Header field /// to the last byte of the Option[] field. /// - UINT32 Length; + UINT32 Length; struct { /// /// DHCP packet header. /// - EFI_DHCP4_HEADER Header; + EFI_DHCP4_HEADER Header; /// /// DHCP magik cookie in network byte order. /// - UINT32 Magik; + UINT32 Magik; /// /// Start of the DHCP packed option data. /// - UINT8 Option[1]; + UINT8 Option[1]; } Dhcp4; } EFI_DHCP4_PACKET; #pragma pack() - typedef enum { /// /// The EFI DHCPv4 Protocol driver is stopped. /// - Dhcp4Stopped = 0x0, + Dhcp4Stopped = 0x0, /// /// The EFI DHCPv4 Protocol driver is inactive. /// - Dhcp4Init = 0x1, + Dhcp4Init = 0x1, /// /// The EFI DHCPv4 Protocol driver is collecting DHCP offer packets from DHCP servers. /// - Dhcp4Selecting = 0x2, + Dhcp4Selecting = 0x2, /// /// The EFI DHCPv4 Protocol driver has sent the request to the DHCP server and is waiting for a response. /// - Dhcp4Requesting = 0x3, + Dhcp4Requesting = 0x3, /// /// The DHCP configuration has completed. /// - Dhcp4Bound = 0x4, + Dhcp4Bound = 0x4, /// /// The DHCP configuration is being renewed and another request has /// been sent out, but it has not received a response from the server yet. /// - Dhcp4Renewing = 0x5, + Dhcp4Renewing = 0x5, /// /// The DHCP configuration has timed out and the EFI DHCPv4 /// Protocol driver is trying to extend the lease time. /// - Dhcp4Rebinding = 0x6, + Dhcp4Rebinding = 0x6, /// /// The EFI DHCPv4 Protocol driver was initialized with a previously /// allocated or known IP address. /// - Dhcp4InitReboot = 0x7, + Dhcp4InitReboot = 0x7, /// /// The EFI DHCPv4 Protocol driver is seeking to reuse the previously /// allocated IP address by sending a request to the DHCP server. /// - Dhcp4Rebooting = 0x8 + Dhcp4Rebooting = 0x8 } EFI_DHCP4_STATE; - -typedef enum{ +typedef enum { /// /// The packet to start the configuration sequence is about to be sent. /// - Dhcp4SendDiscover = 0x01, + Dhcp4SendDiscover = 0x01, /// /// A reply packet was just received. /// - Dhcp4RcvdOffer = 0x02, + Dhcp4RcvdOffer = 0x02, /// /// It is time for Dhcp4Callback to select an offer. /// - Dhcp4SelectOffer = 0x03, + Dhcp4SelectOffer = 0x03, /// /// A request packet is about to be sent. /// - Dhcp4SendRequest = 0x04, + Dhcp4SendRequest = 0x04, /// /// A DHCPACK packet was received and will be passed to Dhcp4Callback. /// - Dhcp4RcvdAck = 0x05, + Dhcp4RcvdAck = 0x05, /// /// A DHCPNAK packet was received and will be passed to Dhcp4Callback. /// - Dhcp4RcvdNak = 0x06, + Dhcp4RcvdNak = 0x06, /// /// A decline packet is about to be sent. /// - Dhcp4SendDecline = 0x07, + Dhcp4SendDecline = 0x07, /// /// The DHCP configuration process has completed. No packet is associated with this event. /// @@ -188,7 +177,7 @@ typedef enum{ /// It is time to enter the Dhcp4Renewing state and to contact the server /// that originally issued the network address. No packet is associated with this event. /// - Dhcp4EnterRenewing = 0x09, + Dhcp4EnterRenewing = 0x09, /// /// It is time to enter the Dhcp4Rebinding state and to contact any server. /// No packet is associated with this event. @@ -199,13 +188,13 @@ typedef enum{ /// the user released the configuration, or a DHCPNAK packet was received in /// the Dhcp4Renewing or Dhcp4Rebinding state. No packet is associated with this event. /// - Dhcp4AddressLost = 0x0b, + Dhcp4AddressLost = 0x0b, /// /// The DHCP process failed because a DHCPNAK packet was received or the user /// aborted the DHCP process at a time when the configuration was not available yet. /// No packet is associated with this event. /// - Dhcp4Fail = 0x0c + Dhcp4Fail = 0x0c } EFI_DHCP4_EVENT; /** @@ -257,25 +246,25 @@ typedef struct { /// event and waiting for a response during the Dhcp4RcvdOffer event. /// Set to zero to use the default try counts and timeout values. /// - UINT32 DiscoverTryCount; + UINT32 DiscoverTryCount; /// /// The maximum amount of time (in seconds) to wait for returned packets in each /// of the retries. Timeout values of zero will default to a timeout value /// of one second. Set to NULL to use default timeout values. /// - UINT32 *DiscoverTimeout; + UINT32 *DiscoverTimeout; /// /// The number of times to try sending a packet during the Dhcp4SendRequest event /// and waiting for a response during the Dhcp4RcvdAck event before accepting /// failure. Set to zero to use the default try counts and timeout values. /// - UINT32 RequestTryCount; + UINT32 RequestTryCount; /// /// The maximum amount of time (in seconds) to wait for return packets in each of the retries. /// Timeout values of zero will default to a timeout value of one second. /// Set to NULL to use default timeout values. /// - UINT32 *RequestTimeout; + UINT32 *RequestTimeout; /// /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP /// address will cause the EFI DHCPv4 Protocol driver to enter the Dhcp4InitReboot state. @@ -283,20 +272,20 @@ typedef struct { /// For a DHCPINFORM this parameter should be set to the client network address /// which was assigned to the client during a DHCPDISCOVER. /// - EFI_IPv4_ADDRESS ClientAddress; + EFI_IPv4_ADDRESS ClientAddress; /// /// The callback function to intercept various events that occurred in /// the DHCP configuration process. Set to NULL to ignore all those events. /// - EFI_DHCP4_CALLBACK Dhcp4Callback; + EFI_DHCP4_CALLBACK Dhcp4Callback; /// /// The pointer to the context that will be passed to Dhcp4Callback when it is called. /// - VOID *CallbackContext; + VOID *CallbackContext; /// /// Number of DHCP options in the OptionList. /// - UINT32 OptionCount; + UINT32 OptionCount; /// /// List of DHCP options to be included in every packet that is sent during the /// Dhcp4SendDiscover event. Pad options are appended automatically by DHCP driver @@ -304,122 +293,118 @@ typedef struct { /// ignored by the driver. OptionList can be freed after EFI_DHCP4_PROTOCOL.Configure() /// returns. Ignored if OptionCount is zero. /// - EFI_DHCP4_PACKET_OPTION **OptionList; + EFI_DHCP4_PACKET_OPTION **OptionList; } EFI_DHCP4_CONFIG_DATA; - typedef struct { /// /// The EFI DHCPv4 Protocol driver operating state. /// - EFI_DHCP4_STATE State; + EFI_DHCP4_STATE State; /// /// The configuration data of the current EFI DHCPv4 Protocol driver instance. /// - EFI_DHCP4_CONFIG_DATA ConfigData; + EFI_DHCP4_CONFIG_DATA ConfigData; /// /// The client IP address that was acquired from the DHCP server. If it is zero, /// the DHCP acquisition has not completed yet and the following fields in this structure are undefined. /// - EFI_IPv4_ADDRESS ClientAddress; + EFI_IPv4_ADDRESS ClientAddress; /// /// The local hardware address. /// - EFI_MAC_ADDRESS ClientMacAddress; + EFI_MAC_ADDRESS ClientMacAddress; /// /// The server IP address that is providing the DHCP service to this client. /// - EFI_IPv4_ADDRESS ServerAddress; + EFI_IPv4_ADDRESS ServerAddress; /// /// The router IP address that was acquired from the DHCP server. /// May be zero if the server does not offer this address. /// - EFI_IPv4_ADDRESS RouterAddress; + EFI_IPv4_ADDRESS RouterAddress; /// /// The subnet mask of the connected network that was acquired from the DHCP server. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// The lease time (in 1-second units) of the configured IP address. /// The value 0xFFFFFFFF means that the lease time is infinite. /// A default lease of 7 days is used if the DHCP server does not provide a value. /// - UINT32 LeaseTime; + UINT32 LeaseTime; /// /// The cached latest DHCPACK or DHCPNAK or BOOTP REPLY packet. May be NULL if no packet is cached. /// - EFI_DHCP4_PACKET *ReplyPacket; + EFI_DHCP4_PACKET *ReplyPacket; } EFI_DHCP4_MODE_DATA; - typedef struct { /// /// Alternate listening address. It can be a unicast, multicast, or broadcast address. /// - EFI_IPv4_ADDRESS ListenAddress; + EFI_IPv4_ADDRESS ListenAddress; /// /// The subnet mask of above listening unicast/broadcast IP address. /// Ignored if ListenAddress is a multicast address. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// Alternate station source (or listening) port number. /// If zero, then the default station port number (68) will be used. /// - UINT16 ListenPort; + UINT16 ListenPort; } EFI_DHCP4_LISTEN_POINT; - typedef struct { /// /// The completion status of transmitting and receiving. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// If not NULL, the event that will be signaled when the collection process /// completes. If NULL, this function will busy-wait until the collection process competes. /// - EFI_EVENT CompletionEvent; + EFI_EVENT CompletionEvent; /// /// The pointer to the server IP address. This address may be a unicast, multicast, or broadcast address. /// - EFI_IPv4_ADDRESS RemoteAddress; + EFI_IPv4_ADDRESS RemoteAddress; /// /// The server listening port number. If zero, the default server listening port number (67) will be used. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// The pointer to the gateway address to override the existing setting. /// - EFI_IPv4_ADDRESS GatewayAddress; + EFI_IPv4_ADDRESS GatewayAddress; /// /// The number of entries in ListenPoints. If zero, the default station address and port number 68 are used. /// - UINT32 ListenPointCount; + UINT32 ListenPointCount; /// /// An array of station address and port number pairs that are used as receiving filters. /// The first entry is also used as the source address and source port of the outgoing packet. /// - EFI_DHCP4_LISTEN_POINT *ListenPoints; + EFI_DHCP4_LISTEN_POINT *ListenPoints; /// /// The number of seconds to collect responses. Zero is invalid. /// - UINT32 TimeoutValue; + UINT32 TimeoutValue; /// /// The pointer to the packet to be transmitted. /// - EFI_DHCP4_PACKET *Packet; + EFI_DHCP4_PACKET *Packet; /// /// Number of received packets. /// - UINT32 ResponseCount; + UINT32 ResponseCount; /// /// The pointer to the allocated list of received packets. /// - EFI_DHCP4_PACKET *ResponseList; + EFI_DHCP4_PACKET *ResponseList; } EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN; - /** Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver. @@ -495,7 +480,6 @@ EFI_STATUS IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL ); - /** Starts the DHCP configuration process. @@ -685,7 +669,6 @@ EFI_STATUS OUT EFI_DHCP4_PACKET **NewPacket ); - /** Transmits a DHCP formatted packet and optionally waits for responses. @@ -718,7 +701,6 @@ EFI_STATUS IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token ); - /** Parses the packed DHCP option data. @@ -765,18 +747,18 @@ EFI_STATUS /// and to provide DHCPv4 server and PXE boot server discovery services. /// struct _EFI_DHCP4_PROTOCOL { - EFI_DHCP4_GET_MODE_DATA GetModeData; - EFI_DHCP4_CONFIGURE Configure; - EFI_DHCP4_START Start; - EFI_DHCP4_RENEW_REBIND RenewRebind; - EFI_DHCP4_RELEASE Release; - EFI_DHCP4_STOP Stop; - EFI_DHCP4_BUILD Build; - EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive; - EFI_DHCP4_PARSE Parse; + EFI_DHCP4_GET_MODE_DATA GetModeData; + EFI_DHCP4_CONFIGURE Configure; + EFI_DHCP4_START Start; + EFI_DHCP4_RENEW_REBIND RenewRebind; + EFI_DHCP4_RELEASE Release; + EFI_DHCP4_STOP Stop; + EFI_DHCP4_BUILD Build; + EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive; + EFI_DHCP4_PARSE Parse; }; -extern EFI_GUID gEfiDhcp4ProtocolGuid; -extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiDhcp4ProtocolGuid; +extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/DiskIo.h b/src/include/ipxe/efi/Protocol/DiskIo.h index 1b47ce520..c5ce5d339 100644 --- a/src/include/ipxe/efi/Protocol/DiskIo.h +++ b/src/include/ipxe/efi/Protocol/DiskIo.h @@ -5,21 +5,15 @@ oriented devices. The Disk IO protocol is intended to layer on top of the Block IO protocol. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __DISK_IO_H__ #define __DISK_IO_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_DISK_IO_PROTOCOL_GUID \ { \ @@ -36,7 +30,7 @@ typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO; +typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO; /** Read BufferSize bytes from Offset into Buffer. @@ -93,7 +87,7 @@ EFI_STATUS IN VOID *Buffer ); -#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000 +#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000 /// /// Revision defined in EFI1.1 @@ -109,11 +103,11 @@ struct _EFI_DISK_IO_PROTOCOL { /// revisions must be backwards compatible. If a future version is not /// backwards compatible, it is not the same GUID. /// - UINT64 Revision; - EFI_DISK_READ ReadDisk; - EFI_DISK_WRITE WriteDisk; + UINT64 Revision; + EFI_DISK_READ ReadDisk; + EFI_DISK_WRITE WriteDisk; }; -extern EFI_GUID gEfiDiskIoProtocolGuid; +extern EFI_GUID gEfiDiskIoProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/DriverBinding.h b/src/include/ipxe/efi/Protocol/DriverBinding.h index 1f464a730..3c2027506 100644 --- a/src/include/ipxe/efi/Protocol/DriverBinding.h +++ b/src/include/ipxe/efi/Protocol/DriverBinding.h @@ -4,21 +4,15 @@ This protocol is produced by every driver that follows the UEFI Driver Model, and it is the central component that allows drivers and controllers to be managed. -Copyright (c) 2006 - 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_DRIVER_BINDING_H__ #define __EFI_DRIVER_BINDING_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// The global ID for the ControllerHandle Driver Protocol. @@ -28,7 +22,7 @@ FILE_LICENCE ( BSD3 ); 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \ } -typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL; +typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL; /** Tests to see if this driver supports a given controller. If a child device is provided, @@ -163,9 +157,9 @@ EFI_STATUS /// If a controller is supported, then it also provides routines to start and stop the controller. /// struct _EFI_DRIVER_BINDING_PROTOCOL { - EFI_DRIVER_BINDING_SUPPORTED Supported; - EFI_DRIVER_BINDING_START Start; - EFI_DRIVER_BINDING_STOP Stop; + EFI_DRIVER_BINDING_SUPPORTED Supported; + EFI_DRIVER_BINDING_START Start; + EFI_DRIVER_BINDING_STOP Stop; /// /// The version number of the UEFI driver that produced the @@ -179,13 +173,13 @@ struct _EFI_DRIVER_BINDING_PROTOCOL { /// platform/OEM specific drivers. The Version values of 0x10- /// 0xffffffef are reserved for IHV-developed drivers. /// - UINT32 Version; + UINT32 Version; /// /// The image handle of the UEFI driver that produced this instance /// of the EFI_DRIVER_BINDING_PROTOCOL. /// - EFI_HANDLE ImageHandle; + EFI_HANDLE ImageHandle; /// /// The handle on which this instance of the @@ -195,9 +189,9 @@ struct _EFI_DRIVER_BINDING_PROTOCOL { /// EFI_DRIVER_BINDING_PROTOCOL, this value may not be /// the same as ImageHandle. /// - EFI_HANDLE DriverBindingHandle; + EFI_HANDLE DriverBindingHandle; }; -extern EFI_GUID gEfiDriverBindingProtocolGuid; +extern EFI_GUID gEfiDriverBindingProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/FormBrowser2.h b/src/include/ipxe/efi/Protocol/FormBrowser2.h index 8033a11d3..b1c0d200b 100644 --- a/src/include/ipxe/efi/Protocol/FormBrowser2.h +++ b/src/include/ipxe/efi/Protocol/FormBrowser2.h @@ -4,31 +4,22 @@ 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> -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_FORM_BROWSER2_H__ #define __EFI_FORM_BROWSER2_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Guid/HiiPlatformSetupFormset.h> #define EFI_FORM_BROWSER2_PROTOCOL_GUID \ {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }} - -typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; - - +typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; /** @@ -49,24 +40,23 @@ typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; window will end. **/ typedef struct { - UINTN LeftColumn; - UINTN RightColumn; - UINTN TopRow; - UINTN BottomRow; + UINTN LeftColumn; + UINTN RightColumn; + UINTN TopRow; + UINTN BottomRow; } EFI_SCREEN_DESCRIPTOR; typedef UINTN EFI_BROWSER_ACTION_REQUEST; -#define EFI_BROWSER_ACTION_REQUEST_NONE 0 -#define EFI_BROWSER_ACTION_REQUEST_RESET 1 -#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2 -#define EFI_BROWSER_ACTION_REQUEST_EXIT 3 -#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4 -#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 - +#define EFI_BROWSER_ACTION_REQUEST_NONE 0 +#define EFI_BROWSER_ACTION_REQUEST_RESET 1 +#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2 +#define EFI_BROWSER_ACTION_REQUEST_EXIT 3 +#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4 +#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 /** Initialize the browser to display the specified configuration forms. @@ -110,12 +100,11 @@ EFI_STATUS IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN EFI_HII_HANDLE *Handle, IN UINTN HandleCount, - IN EFI_GUID *FormSetGuid, OPTIONAL - IN EFI_FORM_ID FormId, OPTIONAL - IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL + IN EFI_GUID *FormSetGuid OPTIONAL, + IN EFI_FORM_ID FormId OPTIONAL, + IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL -); - + ); /** This function is called by a callback handler to retrieve uncommitted state data from the browser. @@ -163,20 +152,19 @@ EFI_STATUS IN OUT UINTN *ResultsDataSize, IN OUT EFI_STRING ResultsData, IN CONST BOOLEAN RetrieveData, - IN CONST EFI_GUID *VariableGuid, OPTIONAL + IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL -); + ); /// /// This interface will allow the caller to direct the configuration /// driver to use either the HII database or use the passed-in packet of data. /// struct _EFI_FORM_BROWSER2_PROTOCOL { - EFI_SEND_FORM2 SendForm; - EFI_BROWSER_CALLBACK2 BrowserCallback; -} ; + EFI_SEND_FORM2 SendForm; + EFI_BROWSER_CALLBACK2 BrowserCallback; +}; -extern EFI_GUID gEfiFormBrowser2ProtocolGuid; +extern EFI_GUID gEfiFormBrowser2ProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/GraphicsOutput.h b/src/include/ipxe/efi/Protocol/GraphicsOutput.h index 98ca8c9c0..b89315c7d 100644 --- a/src/include/ipxe/efi/Protocol/GraphicsOutput.h +++ b/src/include/ipxe/efi/Protocol/GraphicsOutput.h @@ -3,21 +3,15 @@ Abstraction of a very simple graphics device. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GRAPHICS_OUTPUT_H__ #define __GRAPHICS_OUTPUT_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ { \ @@ -27,10 +21,10 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL; typedef struct { - UINT32 RedMask; - UINT32 GreenMask; - UINT32 BlueMask; - UINT32 ReservedMask; + UINT32 RedMask; + UINT32 GreenMask; + UINT32 BlueMask; + UINT32 ReservedMask; } EFI_PIXEL_BITMASK; typedef enum { @@ -69,29 +63,29 @@ typedef struct { /// The version of this data structure. A value of zero represents the /// EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure as defined in this specification. /// - UINT32 Version; + UINT32 Version; /// /// The size of video screen in pixels in the X dimension. /// - UINT32 HorizontalResolution; + UINT32 HorizontalResolution; /// /// The size of video screen in pixels in the Y dimension. /// - UINT32 VerticalResolution; + UINT32 VerticalResolution; /// /// Enumeration that defines the physical format of the pixel. A value of PixelBltOnly /// implies that a linear frame buffer is not available for this mode. /// - EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; + EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; /// /// This bit-mask is only valid if PixelFormat is set to PixelPixelBitMask. /// A bit being set defines what bits are used for what purpose such as Red, Green, Blue, or Reserved. /// - EFI_PIXEL_BITMASK PixelInformation; + EFI_PIXEL_BITMASK PixelInformation; /// /// Defines the number of pixel elements per video memory line. /// - UINT32 PixelsPerScanLine; + UINT32 PixelsPerScanLine; } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION; /** @@ -137,15 +131,15 @@ EFI_STATUS ); typedef struct { - UINT8 Blue; - UINT8 Green; - UINT8 Red; - UINT8 Reserved; + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; } EFI_GRAPHICS_OUTPUT_BLT_PIXEL; typedef union { - EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; - UINT32 Raw; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; + UINT32 Raw; } EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION; /// @@ -218,7 +212,7 @@ typedef EFI_STATUS (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT)( IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, @@ -233,29 +227,29 @@ typedef struct { /// /// The number of modes supported by QueryMode() and SetMode(). /// - UINT32 MaxMode; + UINT32 MaxMode; /// /// Current Mode of the graphics device. Valid mode numbers are 0 to MaxMode -1. /// - UINT32 Mode; + UINT32 Mode; /// /// Pointer to read-only EFI_GRAPHICS_OUTPUT_MODE_INFORMATION data. /// - EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; /// /// Size of Info structure in bytes. /// - UINTN SizeOfInfo; + UINTN SizeOfInfo; /// /// Base address of graphics linear frame buffer. /// Offset zero in FrameBufferBase represents the upper left pixel of the display. /// - EFI_PHYSICAL_ADDRESS FrameBufferBase; + EFI_PHYSICAL_ADDRESS FrameBufferBase; /// /// Amount of frame buffer needed to support the active mode as defined by /// PixelsPerScanLine xVerticalResolution x PixelElementSize. /// - UINTN FrameBufferSize; + UINTN FrameBufferSize; } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE; /// @@ -264,15 +258,15 @@ typedef struct { /// frame buffer is also exposed so software can write directly to the video hardware. /// struct _EFI_GRAPHICS_OUTPUT_PROTOCOL { - EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; - EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; - EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; + EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; /// /// Pointer to EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE data. /// - EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; }; -extern EFI_GUID gEfiGraphicsOutputProtocolGuid; +extern EFI_GUID gEfiGraphicsOutputProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/HiiConfigAccess.h b/src/include/ipxe/efi/Protocol/HiiConfigAccess.h index df9080591..beae08203 100644 --- a/src/include/ipxe/efi/Protocol/HiiConfigAccess.h +++ b/src/include/ipxe/efi/Protocol/HiiConfigAccess.h @@ -5,44 +5,40 @@ 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> -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.1. **/ - #ifndef __EFI_HII_CONFIG_ACCESS_H__ #define __EFI_HII_CONFIG_ACCESS_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/FormBrowser2.h> #define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \ { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } } -typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; +typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; typedef UINTN EFI_BROWSER_ACTION; -#define EFI_BROWSER_ACTION_CHANGING 0 -#define EFI_BROWSER_ACTION_CHANGED 1 -#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 -#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000 -#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000 -#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000 +#define EFI_BROWSER_ACTION_CHANGING 0 +#define EFI_BROWSER_ACTION_CHANGED 1 +#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 +#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000 +#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000 +#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000 /** @@ -114,13 +110,12 @@ typedef UINTN EFI_BROWSER_ACTION; **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)( +(EFIAPI *EFI_HII_ACCESS_EXTRACT_CONFIG)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results -); - + ); /** @@ -164,11 +159,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)( +(EFIAPI *EFI_HII_ACCESS_ROUTE_CONFIG)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress -); + ); /** @@ -205,7 +200,7 @@ EFI_STATUS IN OUT EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) - ; +; /// /// This protocol provides a callable interface between the HII and @@ -213,13 +208,11 @@ EFI_STATUS /// to publish this protocol. /// struct _EFI_HII_CONFIG_ACCESS_PROTOCOL { - EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig; - EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig; - EFI_HII_ACCESS_FORM_CALLBACK Callback; -} ; + EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig; + EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig; + EFI_HII_ACCESS_FORM_CALLBACK Callback; +}; -extern EFI_GUID gEfiHiiConfigAccessProtocolGuid; +extern EFI_GUID gEfiHiiConfigAccessProtocolGuid; #endif - - diff --git a/src/include/ipxe/efi/Protocol/HiiDatabase.h b/src/include/ipxe/efi/Protocol/HiiDatabase.h index e070d29de..d077b1167 100644 --- a/src/include/ipxe/efi/Protocol/HiiDatabase.h +++ b/src/include/ipxe/efi/Protocol/HiiDatabase.h @@ -2,38 +2,34 @@ The file provides Database manager for HII-related data structures. -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.1. **/ #ifndef __HII_DATABASE_H__ #define __HII_DATABASE_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_HII_DATABASE_PROTOCOL_GUID \ { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } } - typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL; - /// /// EFI_HII_DATABASE_NOTIFY_TYPE. /// -typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE; +typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE; + +#define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001 +#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002 +#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004 +#define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008 -#define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001 -#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002 -#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004 -#define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008 /** Functions which are registered to receive notification of @@ -68,7 +64,7 @@ EFI_STATUS IN CONST EFI_HII_PACKAGE_HEADER *Package, IN EFI_HII_HANDLE Handle, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType -); + ); /** @@ -108,10 +104,9 @@ EFI_STATUS (EFIAPI *EFI_HII_DATABASE_NEW_PACK)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, - IN EFI_HANDLE DriverHandle, OPTIONAL + IN EFI_HANDLE DriverHandle OPTIONAL, OUT EFI_HII_HANDLE *Handle -); - + ); /** @@ -137,8 +132,7 @@ EFI_STATUS (EFIAPI *EFI_HII_DATABASE_REMOVE_PACK)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle -); - + ); /** @@ -186,8 +180,7 @@ EFI_STATUS IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList -); - + ); /** @@ -240,7 +233,7 @@ EFI_STATUS IN CONST EFI_GUID *PackageGuid, IN OUT UINTN *HandleBufferLength, OUT EFI_HII_HANDLE *Handle -); + ); /** @@ -290,8 +283,7 @@ EFI_STATUS IN EFI_HII_HANDLE Handle, IN OUT UINTN *BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer -); - + ); /** @@ -353,8 +345,7 @@ EFI_STATUS IN EFI_HII_DATABASE_NOTIFY PackageNotifyFn, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, OUT EFI_HANDLE *NotifyHandle -); - + ); /** @@ -376,8 +367,7 @@ EFI_STATUS (EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HANDLE NotificationHandle -); - + ); /** @@ -417,8 +407,7 @@ EFI_STATUS IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN OUT UINT16 *KeyGuidBufferLength, OUT EFI_GUID *KeyGuidBuffer -); - + ); /** @@ -453,7 +442,7 @@ EFI_STATUS IN CONST EFI_GUID *KeyGuid, IN OUT UINT16 *KeyboardLayoutLength, OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout -); + ); /** @@ -480,7 +469,7 @@ EFI_STATUS (EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid -); + ); /** @@ -507,27 +496,25 @@ EFI_STATUS IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE PackageListHandle, OUT EFI_HANDLE *DriverHandle -); + ); /// /// Database manager for HII-related data structures. /// struct _EFI_HII_DATABASE_PROTOCOL { - EFI_HII_DATABASE_NEW_PACK NewPackageList; - EFI_HII_DATABASE_REMOVE_PACK RemovePackageList; - EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList; - EFI_HII_DATABASE_LIST_PACKS ListPackageLists; - EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists; - EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify; - EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify; - EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts; - EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout; - EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout; - EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle; + EFI_HII_DATABASE_NEW_PACK NewPackageList; + EFI_HII_DATABASE_REMOVE_PACK RemovePackageList; + EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList; + EFI_HII_DATABASE_LIST_PACKS ListPackageLists; + EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists; + EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify; + EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify; + EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts; + EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout; + EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout; + EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle; }; -extern EFI_GUID gEfiHiiDatabaseProtocolGuid; +extern EFI_GUID gEfiHiiDatabaseProtocolGuid; #endif - - diff --git a/src/include/ipxe/efi/Protocol/HiiFont.h b/src/include/ipxe/efi/Protocol/HiiFont.h index f2b72dc11..248f13ea5 100644 --- a/src/include/ipxe/efi/Protocol/HiiFont.h +++ b/src/include/ipxe/efi/Protocol/HiiFont.h @@ -1,21 +1,18 @@ /** @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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.1. **/ #ifndef __HII_FONT_H__ #define __HII_FONT_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/GraphicsOutput.h> #include <ipxe/efi/Protocol/HiiImage.h> @@ -25,21 +22,21 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL; -typedef VOID *EFI_FONT_HANDLE; +typedef VOID *EFI_FONT_HANDLE; /// /// EFI_HII_OUT_FLAGS. /// -typedef UINT32 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 +#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. @@ -48,26 +45,26 @@ typedef struct _EFI_HII_ROW_INFO { /// /// The index of the first character in the string which is displayed on the line. /// - UINTN StartIndex; + 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. + 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; + 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; +typedef UINT32 EFI_FONT_INFO_MASK; #define EFI_FONT_INFO_SYS_FONT 0x00000001 #define EFI_FONT_INFO_SYS_SIZE 0x00000002 @@ -84,9 +81,9 @@ typedef UINT32 EFI_FONT_INFO_MASK; // EFI_FONT_INFO // typedef struct { - EFI_HII_FONT_STYLE FontStyle; - UINT16 FontSize; ///< character cell height in pixels - CHAR16 FontName[1]; + EFI_HII_FONT_STYLE FontStyle; + UINT16 FontSize; ///< character cell height in pixels + CHAR16 FontName[1]; } EFI_FONT_INFO; /** @@ -102,10 +99,10 @@ typedef struct { 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_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor; + EFI_FONT_INFO_MASK FontInfoMask; + EFI_FONT_INFO FontInfo; } EFI_FONT_DISPLAY_INFO; /** @@ -225,9 +222,7 @@ EFI_STATUS OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL -); - - + ); /** @@ -363,8 +358,7 @@ EFI_STATUS OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL -); - + ); /** @@ -408,7 +402,7 @@ EFI_STATUS IN CONST EFI_FONT_DISPLAY_INFO *StringInfo, OUT EFI_IMAGE_OUTPUT **Blt, OUT UINTN *Baseline OPTIONAL -); + ); /** @@ -452,23 +446,21 @@ 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 + 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; + 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; - +extern EFI_GUID gEfiHiiFontProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/HiiImage.h b/src/include/ipxe/efi/Protocol/HiiImage.h index ba934a9f9..20fd72578 100644 --- a/src/include/ipxe/efi/Protocol/HiiImage.h +++ b/src/include/ipxe/efi/Protocol/HiiImage.h @@ -1,21 +1,18 @@ /** @file The file provides services to access to images in the images database. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + This Protocol was introduced in UEFI Specification 2.1. **/ #ifndef __HII_IMAGE_H__ #define __HII_IMAGE_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/GraphicsOutput.h> @@ -24,11 +21,10 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL; - /// /// Flags in EFI_IMAGE_INPUT /// -#define EFI_IMAGE_TRANSPARENT 0x00000001 +#define EFI_IMAGE_TRANSPARENT 0x00000001 /** @@ -49,13 +45,12 @@ typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL; **/ typedef struct _EFI_IMAGE_INPUT { - UINT32 Flags; - UINT16 Width; - UINT16 Height; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap; + 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 @@ -88,7 +83,7 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, OUT EFI_IMAGE_ID *ImageId, IN CONST EFI_IMAGE_INPUT *Image -); + ); /** @@ -130,7 +125,7 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, OUT EFI_IMAGE_INPUT *Image -); + ); /** @@ -161,14 +156,13 @@ EFI_STATUS 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; +typedef UINT32 EFI_HII_DRAW_FLAGS; #define EFI_HII_DRAW_FLAG_CLIP 0x00000001 #define EFI_HII_DRAW_FLAG_TRANSPARENT 0x00000030 @@ -193,15 +187,14 @@ typedef UINT32 EFI_HII_DRAW_FLAGS; **/ typedef struct _EFI_IMAGE_OUTPUT { - UINT16 Width; - UINT16 Height; + UINT16 Width; + UINT16 Height; union { - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap; - EFI_GRAPHICS_OUTPUT_PROTOCOL *Screen; + 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 @@ -258,7 +251,7 @@ EFI_STATUS IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY -); + ); /** @@ -330,29 +323,26 @@ EFI_STATUS 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 -); - + 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; + 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; +extern EFI_GUID gEfiHiiImageProtocolGuid; #endif - - diff --git a/src/include/ipxe/efi/Protocol/Ip4.h b/src/include/ipxe/efi/Protocol/Ip4.h index f174c0cfb..0455c7b2f 100644 --- a/src/include/ipxe/efi/Protocol/Ip4.h +++ b/src/include/ipxe/efi/Protocol/Ip4.h @@ -10,14 +10,8 @@ Protocol (ICMP) and may include support for the Internet Group Management Protocol (IGMP). -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 -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.0. @@ -27,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_IP4_PROTOCOL_H__ #define __EFI_IP4_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/ManagedNetwork.h> @@ -48,9 +42,9 @@ typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL; /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE InstanceHandle; - EFI_IPv4_ADDRESS Ip4Address; - EFI_IPv4_ADDRESS SubnetMask; + EFI_HANDLE InstanceHandle; + EFI_IPv4_ADDRESS Ip4Address; + EFI_IPv4_ADDRESS SubnetMask; } EFI_IP4_ADDRESS_PAIR; /// @@ -68,182 +62,178 @@ typedef struct { /// The default IPv4 protocol packets to send and receive. Ignored /// when AcceptPromiscuous is TRUE. /// - UINT8 DefaultProtocol; + UINT8 DefaultProtocol; /// /// Set to TRUE to receive all IPv4 packets that get through the receive filters. /// Set to FALSE to receive only the DefaultProtocol IPv4 /// packets that get through the receive filters. /// - BOOLEAN AcceptAnyProtocol; + BOOLEAN AcceptAnyProtocol; /// /// Set to TRUE to receive ICMP error report packets. Ignored when /// AcceptPromiscuous or AcceptAnyProtocol is TRUE. /// - BOOLEAN AcceptIcmpErrors; + BOOLEAN AcceptIcmpErrors; /// /// Set to TRUE to receive broadcast IPv4 packets. Ignored when /// AcceptPromiscuous is TRUE. /// Set to FALSE to stop receiving broadcast IPv4 packets. /// - BOOLEAN AcceptBroadcast; + BOOLEAN AcceptBroadcast; /// /// Set to TRUE to receive all IPv4 packets that are sent to any /// hardware address or any protocol address. /// Set to FALSE to stop receiving all promiscuous IPv4 packets /// - BOOLEAN AcceptPromiscuous; + BOOLEAN AcceptPromiscuous; /// /// Set to TRUE to use the default IPv4 address and default routing table. /// - BOOLEAN UseDefaultAddress; + BOOLEAN UseDefaultAddress; /// /// The station IPv4 address that will be assigned to this EFI IPv4Protocol instance. /// - EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS StationAddress; /// /// The subnet address mask that is associated with the station address. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// TypeOfService field in transmitted IPv4 packets. /// - UINT8 TypeOfService; + UINT8 TypeOfService; /// /// TimeToLive field in transmitted IPv4 packets. /// - UINT8 TimeToLive; + UINT8 TimeToLive; /// /// State of the DoNotFragment bit in transmitted IPv4 packets. /// - BOOLEAN DoNotFragment; + BOOLEAN DoNotFragment; /// /// Set to TRUE to send and receive unformatted packets. The other /// IPv4 receive filters are still applied. Fragmentation is disabled for RawData mode. /// - BOOLEAN RawData; + BOOLEAN RawData; /// /// The timer timeout value (number of microseconds) for the /// receive timeout event to be associated with each assembled /// packet. Zero means do not drop assembled packets. /// - UINT32 ReceiveTimeout; + UINT32 ReceiveTimeout; /// /// The timer timeout value (number of microseconds) for the /// transmit timeout event to be associated with each outgoing /// packet. Zero means do not drop outgoing packets. /// - UINT32 TransmitTimeout; + UINT32 TransmitTimeout; } EFI_IP4_CONFIG_DATA; - typedef struct { - EFI_IPv4_ADDRESS SubnetAddress; - EFI_IPv4_ADDRESS SubnetMask; - EFI_IPv4_ADDRESS GatewayAddress; + EFI_IPv4_ADDRESS SubnetAddress; + EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS GatewayAddress; } EFI_IP4_ROUTE_TABLE; typedef struct { - UINT8 Type; - UINT8 Code; + UINT8 Type; + UINT8 Code; } EFI_IP4_ICMP_TYPE; typedef struct { /// /// Set to TRUE after this EFI IPv4 Protocol instance has been successfully configured. /// - BOOLEAN IsStarted; + BOOLEAN IsStarted; /// /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed. /// - UINT32 MaxPacketSize; + UINT32 MaxPacketSize; /// /// Current configuration settings. /// - EFI_IP4_CONFIG_DATA ConfigData; + EFI_IP4_CONFIG_DATA ConfigData; /// /// Set to TRUE when the EFI IPv4 Protocol instance has a station address and subnet mask. /// - BOOLEAN IsConfigured; + BOOLEAN IsConfigured; /// /// Number of joined multicast groups. /// - UINT32 GroupCount; + UINT32 GroupCount; /// /// List of joined multicast group addresses. /// - EFI_IPv4_ADDRESS *GroupTable; + EFI_IPv4_ADDRESS *GroupTable; /// /// Number of entries in the routing table. /// - UINT32 RouteCount; + UINT32 RouteCount; /// /// Routing table entries. /// - EFI_IP4_ROUTE_TABLE *RouteTable; + EFI_IP4_ROUTE_TABLE *RouteTable; /// /// Number of entries in the supported ICMP types list. /// - UINT32 IcmpTypeCount; + UINT32 IcmpTypeCount; /// /// Array of ICMP types and codes that are supported by this EFI IPv4 Protocol driver /// - EFI_IP4_ICMP_TYPE *IcmpTypeList; + EFI_IP4_ICMP_TYPE *IcmpTypeList; } EFI_IP4_MODE_DATA; #pragma pack(1) typedef struct { - UINT8 HeaderLength:4; - UINT8 Version:4; - UINT8 TypeOfService; - UINT16 TotalLength; - UINT16 Identification; - UINT16 Fragmentation; - UINT8 TimeToLive; - UINT8 Protocol; - UINT16 Checksum; - EFI_IPv4_ADDRESS SourceAddress; - EFI_IPv4_ADDRESS DestinationAddress; + UINT8 HeaderLength : 4; + UINT8 Version : 4; + UINT8 TypeOfService; + UINT16 TotalLength; + UINT16 Identification; + UINT16 Fragmentation; + UINT8 TimeToLive; + UINT8 Protocol; + UINT16 Checksum; + EFI_IPv4_ADDRESS SourceAddress; + EFI_IPv4_ADDRESS DestinationAddress; } EFI_IP4_HEADER; #pragma pack() - typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_IP4_FRAGMENT_DATA; - typedef struct { - EFI_TIME TimeStamp; - EFI_EVENT RecycleSignal; - UINT32 HeaderLength; - EFI_IP4_HEADER *Header; - UINT32 OptionsLength; - VOID *Options; - UINT32 DataLength; - UINT32 FragmentCount; - EFI_IP4_FRAGMENT_DATA FragmentTable[1]; + EFI_TIME TimeStamp; + EFI_EVENT RecycleSignal; + UINT32 HeaderLength; + EFI_IP4_HEADER *Header; + UINT32 OptionsLength; + VOID *Options; + UINT32 DataLength; + UINT32 FragmentCount; + EFI_IP4_FRAGMENT_DATA FragmentTable[1]; } EFI_IP4_RECEIVE_DATA; - typedef struct { - EFI_IPv4_ADDRESS SourceAddress; - EFI_IPv4_ADDRESS GatewayAddress; - UINT8 Protocol; - UINT8 TypeOfService; - UINT8 TimeToLive; - BOOLEAN DoNotFragment; + EFI_IPv4_ADDRESS SourceAddress; + EFI_IPv4_ADDRESS GatewayAddress; + UINT8 Protocol; + UINT8 TypeOfService; + UINT8 TimeToLive; + BOOLEAN DoNotFragment; } EFI_IP4_OVERRIDE_DATA; typedef struct { - EFI_IPv4_ADDRESS DestinationAddress; - EFI_IP4_OVERRIDE_DATA *OverrideData; //OPTIONAL - UINT32 OptionsLength; //OPTIONAL - VOID *OptionsBuffer; //OPTIONAL - UINT32 TotalDataLength; - UINT32 FragmentCount; - EFI_IP4_FRAGMENT_DATA FragmentTable[1]; + EFI_IPv4_ADDRESS DestinationAddress; + EFI_IP4_OVERRIDE_DATA *OverrideData; // OPTIONAL + UINT32 OptionsLength; // OPTIONAL + VOID *OptionsBuffer; // OPTIONAL + UINT32 TotalDataLength; + UINT32 FragmentCount; + EFI_IP4_FRAGMENT_DATA FragmentTable[1]; } EFI_IP4_TRANSMIT_DATA; typedef struct { @@ -253,21 +243,21 @@ typedef struct { /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of /// Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// The status that is returned to the caller at the end of the operation /// to indicate whether this operation completed successfully. /// - EFI_STATUS Status; + EFI_STATUS Status; union { /// /// When this token is used for receiving, RxData is a pointer to the EFI_IP4_RECEIVE_DATA. /// - EFI_IP4_RECEIVE_DATA *RxData; + EFI_IP4_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to the EFI_IP4_TRANSMIT_DATA. /// - EFI_IP4_TRANSMIT_DATA *TxData; + EFI_IP4_TRANSMIT_DATA *TxData; } Packet; } EFI_IP4_COMPLETION_TOKEN; @@ -598,17 +588,17 @@ EFI_STATUS /// used by drivers, daemons, and applications to transmit and receive network packets. /// struct _EFI_IP4_PROTOCOL { - EFI_IP4_GET_MODE_DATA GetModeData; - EFI_IP4_CONFIGURE Configure; - EFI_IP4_GROUPS Groups; - EFI_IP4_ROUTES Routes; - EFI_IP4_TRANSMIT Transmit; - EFI_IP4_RECEIVE Receive; - EFI_IP4_CANCEL Cancel; - EFI_IP4_POLL Poll; + EFI_IP4_GET_MODE_DATA GetModeData; + EFI_IP4_CONFIGURE Configure; + EFI_IP4_GROUPS Groups; + EFI_IP4_ROUTES Routes; + EFI_IP4_TRANSMIT Transmit; + EFI_IP4_RECEIVE Receive; + EFI_IP4_CANCEL Cancel; + EFI_IP4_POLL Poll; }; -extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiIp4ProtocolGuid; +extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiIp4ProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/Ip4Config.h b/src/include/ipxe/efi/Protocol/Ip4Config.h index 227ae0399..ff47fd2b7 100644 --- a/src/include/ipxe/efi/Protocol/Ip4Config.h +++ b/src/include/ipxe/efi/Protocol/Ip4Config.h @@ -2,23 +2,18 @@ This file provides a definition of the EFI IPv4 Configuration Protocol. -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 -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.0. **/ + #ifndef __EFI_IP4CONFIG_PROTOCOL_H__ #define __EFI_IP4CONFIG_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/Ip4.h> @@ -44,23 +39,22 @@ typedef struct { /// /// Default station IP address, stored in network byte order. /// - EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS StationAddress; /// /// Default subnet mask, stored in network byte order. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// Number of entries in the following RouteTable. May be zero. /// - UINT32 RouteTableSize; + UINT32 RouteTableSize; /// /// Default routing table data (stored in network byte order). /// Ignored if RouteTableSize is zero. /// - EFI_IP4_ROUTE_TABLE *RouteTable; + EFI_IP4_ROUTE_TABLE *RouteTable; } EFI_IP4_IPCONFIG_DATA; - /** Starts running the configuration policy for the EFI IPv4 Protocol driver. @@ -174,11 +168,11 @@ EFI_STATUS /// configurations for the EFI IPv4 Protocol driver. /// struct _EFI_IP4_CONFIG_PROTOCOL { - EFI_IP4_CONFIG_START Start; - EFI_IP4_CONFIG_STOP Stop; - EFI_IP4_CONFIG_GET_DATA GetData; + EFI_IP4_CONFIG_START Start; + EFI_IP4_CONFIG_STOP Stop; + EFI_IP4_CONFIG_GET_DATA GetData; }; -extern EFI_GUID gEfiIp4ConfigProtocolGuid; +extern EFI_GUID gEfiIp4ConfigProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/LoadFile.h b/src/include/ipxe/efi/Protocol/LoadFile.h index ba80fdc16..034b22b55 100644 --- a/src/include/ipxe/efi/Protocol/LoadFile.h +++ b/src/include/ipxe/efi/Protocol/LoadFile.h @@ -7,21 +7,15 @@ UEFI 2.0 can boot from any device that produces a LoadFile protocol. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_LOAD_FILE_PROTOCOL_H__ #define __EFI_LOAD_FILE_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_LOAD_FILE_PROTOCOL_GUID \ { \ @@ -31,14 +25,14 @@ FILE_LICENCE ( BSD3 ); /// /// Protocol Guid defined by EFI1.1. /// -#define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID +#define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID typedef struct _EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL; /// /// Backward-compatible with EFI1.1 /// -typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE; +typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE; /** Causes the driver to load a specified file. @@ -82,9 +76,9 @@ EFI_STATUS /// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices. /// struct _EFI_LOAD_FILE_PROTOCOL { - EFI_LOAD_FILE LoadFile; + EFI_LOAD_FILE LoadFile; }; -extern EFI_GUID gEfiLoadFileProtocolGuid; +extern EFI_GUID gEfiLoadFileProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/LoadFile2.h b/src/include/ipxe/efi/Protocol/LoadFile2.h index 6cb26fff9..2cb155dda 100644 --- a/src/include/ipxe/efi/Protocol/LoadFile2.h +++ b/src/include/ipxe/efi/Protocol/LoadFile2.h @@ -7,21 +7,15 @@ UEFI 2.0 can boot from any device that produces a LoadFile protocol. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_LOAD_FILE2_PROTOCOL_H__ #define __EFI_LOAD_FILE2_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_LOAD_FILE2_PROTOCOL_GUID \ { \ @@ -31,11 +25,10 @@ FILE_LICENCE ( BSD3 ); /// /// Protocol Guid defined by UEFI2.1. /// -#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID +#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID typedef struct _EFI_LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL; - /** Causes the driver to load a specified file. @@ -79,9 +72,9 @@ EFI_STATUS /// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices. /// struct _EFI_LOAD_FILE2_PROTOCOL { - EFI_LOAD_FILE2 LoadFile; + EFI_LOAD_FILE2 LoadFile; }; -extern EFI_GUID gEfiLoadFile2ProtocolGuid; +extern EFI_GUID gEfiLoadFile2ProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/LoadedImage.h b/src/include/ipxe/efi/Protocol/LoadedImage.h index cbe4103c4..db331b88f 100755 --- a/src/include/ipxe/efi/Protocol/LoadedImage.h +++ b/src/include/ipxe/efi/Protocol/LoadedImage.h @@ -4,21 +4,15 @@ Every EFI driver and application is passed an image handle when it is loaded. This image handle will contain a Loaded Image Protocol. - Copyright (c) 2006 - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __LOADED_IMAGE_PROTOCOL_H__ #define __LOADED_IMAGE_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_LOADED_IMAGE_PROTOCOL_GUID \ { \ @@ -33,7 +27,7 @@ FILE_LICENCE ( BSD3 ); /// /// Protocol GUID defined in EFI1.1. /// -#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID +#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID /// /// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h @@ -43,40 +37,40 @@ FILE_LICENCE ( BSD3 ); /// /// Revision defined in EFI1.1. /// -#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION +#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION /// /// Can be used on any image handle to obtain information about the loaded image. /// typedef struct { - UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure. - ///< All future revisions will be backward compatible to the current revision. - EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from - ///< the firmware's boot manager. - EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer. + UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure. + ///< All future revisions will be backward compatible to the current revision. + EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from + ///< the firmware's boot manager. + EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer. // // Source location of image // - EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from. - EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle - ///< that the EFI Image was loaded from. - VOID *Reserved; ///< Reserved. DO NOT USE. + EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from. + EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle + ///< that the EFI Image was loaded from. + VOID *Reserved; ///< Reserved. DO NOT USE. // // Images load options // - UINT32 LoadOptionsSize;///< The size in bytes of LoadOptions. - VOID *LoadOptions; ///< A pointer to the image's binary load options. + UINT32 LoadOptionsSize; ///< The size in bytes of LoadOptions. + VOID *LoadOptions; ///< A pointer to the image's binary load options. // // Location of where image was loaded // - VOID *ImageBase; ///< The base address at which the image was loaded. - UINT64 ImageSize; ///< The size in bytes of the loaded image. - EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as. - EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as. - EFI_IMAGE_UNLOAD Unload; + VOID *ImageBase; ///< The base address at which the image was loaded. + UINT64 ImageSize; ///< The size in bytes of the loaded image. + EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as. + EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as. + EFI_IMAGE_UNLOAD Unload; } EFI_LOADED_IMAGE_PROTOCOL; // @@ -84,7 +78,7 @@ typedef struct { // typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE; -extern EFI_GUID gEfiLoadedImageProtocolGuid; -extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid; +extern EFI_GUID gEfiLoadedImageProtocolGuid; +extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/ManagedNetwork.h b/src/include/ipxe/efi/Protocol/ManagedNetwork.h index 2bd092269..44a27ed1f 100644 --- a/src/include/ipxe/efi/Protocol/ManagedNetwork.h +++ b/src/include/ipxe/efi/Protocol/ManagedNetwork.h @@ -2,14 +2,8 @@ EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0. EFI_MANAGED_NETWORK_PROTOCOL as defined in UEFI 2.0. -Copyright (c) 2006 - 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.0 @@ -19,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_MANAGED_NETWORK_PROTOCOL_H__ #define __EFI_MANAGED_NETWORK_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/SimpleNetwork.h> @@ -92,38 +86,37 @@ typedef struct { } EFI_MANAGED_NETWORK_CONFIG_DATA; typedef struct { - EFI_TIME Timestamp; - EFI_EVENT RecycleEvent; - UINT32 PacketLength; - UINT32 HeaderLength; - UINT32 AddressLength; - UINT32 DataLength; - BOOLEAN BroadcastFlag; - BOOLEAN MulticastFlag; - BOOLEAN PromiscuousFlag; - UINT16 ProtocolType; - VOID *DestinationAddress; - VOID *SourceAddress; - VOID *MediaHeader; - VOID *PacketData; + EFI_TIME Timestamp; + EFI_EVENT RecycleEvent; + UINT32 PacketLength; + UINT32 HeaderLength; + UINT32 AddressLength; + UINT32 DataLength; + BOOLEAN BroadcastFlag; + BOOLEAN MulticastFlag; + BOOLEAN PromiscuousFlag; + UINT16 ProtocolType; + VOID *DestinationAddress; + VOID *SourceAddress; + VOID *MediaHeader; + VOID *PacketData; } EFI_MANAGED_NETWORK_RECEIVE_DATA; typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_MANAGED_NETWORK_FRAGMENT_DATA; typedef struct { - EFI_MAC_ADDRESS *DestinationAddress; //OPTIONAL - EFI_MAC_ADDRESS *SourceAddress; //OPTIONAL - UINT16 ProtocolType; //OPTIONAL - UINT32 DataLength; - UINT16 HeaderLength; //OPTIONAL - UINT16 FragmentCount; - EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1]; + EFI_MAC_ADDRESS *DestinationAddress; // OPTIONAL + EFI_MAC_ADDRESS *SourceAddress; // OPTIONAL + UINT16 ProtocolType; // OPTIONAL + UINT32 DataLength; + UINT16 HeaderLength; // OPTIONAL + UINT16 FragmentCount; + EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1]; } EFI_MANAGED_NETWORK_TRANSMIT_DATA; - typedef struct { /// /// This Event will be signaled after the Status field is updated @@ -131,21 +124,21 @@ typedef struct { /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of /// Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// The status that is returned to the caller at the end of the operation /// to indicate whether this operation completed successfully. /// - EFI_STATUS Status; + EFI_STATUS Status; union { /// /// When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA. /// - EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData; + EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA. /// - EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData; + EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData; } Packet; } EFI_MANAGED_NETWORK_COMPLETION_TOKEN; @@ -306,7 +299,6 @@ EFI_STATUS IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token ); - /** Aborts an asynchronous transmit or receive request. @@ -358,17 +350,17 @@ EFI_STATUS /// perform raw (unformatted) asynchronous network packet I/O. /// struct _EFI_MANAGED_NETWORK_PROTOCOL { - EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData; - EFI_MANAGED_NETWORK_CONFIGURE Configure; - EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac; - EFI_MANAGED_NETWORK_GROUPS Groups; - EFI_MANAGED_NETWORK_TRANSMIT Transmit; - EFI_MANAGED_NETWORK_RECEIVE Receive; - EFI_MANAGED_NETWORK_CANCEL Cancel; - EFI_MANAGED_NETWORK_POLL Poll; + EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData; + EFI_MANAGED_NETWORK_CONFIGURE Configure; + EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac; + EFI_MANAGED_NETWORK_GROUPS Groups; + EFI_MANAGED_NETWORK_TRANSMIT Transmit; + EFI_MANAGED_NETWORK_RECEIVE Receive; + EFI_MANAGED_NETWORK_CANCEL Cancel; + EFI_MANAGED_NETWORK_POLL Poll; }; -extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid; -extern EFI_GUID gEfiManagedNetworkProtocolGuid; +extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid; +extern EFI_GUID gEfiManagedNetworkProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/Mtftp4.h b/src/include/ipxe/efi/Protocol/Mtftp4.h index bc0a8396d..4890c8ab2 100644 --- a/src/include/ipxe/efi/Protocol/Mtftp4.h +++ b/src/include/ipxe/efi/Protocol/Mtftp4.h @@ -1,14 +1,8 @@ /** @file EFI Multicast Trivial File Transfer Protocol Definition -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.0 @@ -18,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_MTFTP4_PROTOCOL_H__ #define __EFI_MTFTP4_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \ { \ @@ -30,21 +24,21 @@ FILE_LICENCE ( BSD3 ); 0x78247c57, 0x63db, 0x4708, {0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b } \ } -typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL; -typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN; +typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL; +typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN; // -//MTFTP4 packet opcode definition +// MTFTP4 packet opcode definition // -#define EFI_MTFTP4_OPCODE_RRQ 1 -#define EFI_MTFTP4_OPCODE_WRQ 2 -#define EFI_MTFTP4_OPCODE_DATA 3 -#define EFI_MTFTP4_OPCODE_ACK 4 -#define EFI_MTFTP4_OPCODE_ERROR 5 -#define EFI_MTFTP4_OPCODE_OACK 6 -#define EFI_MTFTP4_OPCODE_DIR 7 -#define EFI_MTFTP4_OPCODE_DATA8 8 -#define EFI_MTFTP4_OPCODE_ACK8 9 +#define EFI_MTFTP4_OPCODE_RRQ 1 +#define EFI_MTFTP4_OPCODE_WRQ 2 +#define EFI_MTFTP4_OPCODE_DATA 3 +#define EFI_MTFTP4_OPCODE_ACK 4 +#define EFI_MTFTP4_OPCODE_ERROR 5 +#define EFI_MTFTP4_OPCODE_OACK 6 +#define EFI_MTFTP4_OPCODE_DIR 7 +#define EFI_MTFTP4_OPCODE_DATA8 8 +#define EFI_MTFTP4_OPCODE_ACK8 9 // // MTFTP4 error code definition @@ -65,80 +59,80 @@ typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN; #pragma pack(1) typedef struct { - UINT16 OpCode; - UINT8 Filename[1]; + UINT16 OpCode; + UINT8 Filename[1]; } EFI_MTFTP4_REQ_HEADER; typedef struct { - UINT16 OpCode; - UINT8 Data[1]; + UINT16 OpCode; + UINT8 Data[1]; } EFI_MTFTP4_OACK_HEADER; typedef struct { - UINT16 OpCode; - UINT16 Block; - UINT8 Data[1]; + UINT16 OpCode; + UINT16 Block; + UINT8 Data[1]; } EFI_MTFTP4_DATA_HEADER; typedef struct { - UINT16 OpCode; - UINT16 Block[1]; + UINT16 OpCode; + UINT16 Block[1]; } EFI_MTFTP4_ACK_HEADER; typedef struct { - UINT16 OpCode; - UINT64 Block; - UINT8 Data[1]; + UINT16 OpCode; + UINT64 Block; + UINT8 Data[1]; } EFI_MTFTP4_DATA8_HEADER; typedef struct { - UINT16 OpCode; - UINT64 Block[1]; + UINT16 OpCode; + UINT64 Block[1]; } EFI_MTFTP4_ACK8_HEADER; typedef struct { - UINT16 OpCode; - UINT16 ErrorCode; - UINT8 ErrorMessage[1]; + UINT16 OpCode; + UINT16 ErrorCode; + UINT8 ErrorMessage[1]; } EFI_MTFTP4_ERROR_HEADER; typedef union { /// /// Type of packets as defined by the MTFTPv4 packet opcodes. /// - UINT16 OpCode; + UINT16 OpCode; /// /// Read request packet header. /// - EFI_MTFTP4_REQ_HEADER Rrq; + EFI_MTFTP4_REQ_HEADER Rrq; /// /// Write request packet header. /// - EFI_MTFTP4_REQ_HEADER Wrq; + EFI_MTFTP4_REQ_HEADER Wrq; /// /// Option acknowledge packet header. /// - EFI_MTFTP4_OACK_HEADER Oack; + EFI_MTFTP4_OACK_HEADER Oack; /// /// Data packet header. /// - EFI_MTFTP4_DATA_HEADER Data; + EFI_MTFTP4_DATA_HEADER Data; /// /// Acknowledgement packet header. /// - EFI_MTFTP4_ACK_HEADER Ack; + EFI_MTFTP4_ACK_HEADER Ack; /// /// Data packet header with big block number. /// - EFI_MTFTP4_DATA8_HEADER Data8; + EFI_MTFTP4_DATA8_HEADER Data8; /// /// Acknowledgement header with big block num. /// - EFI_MTFTP4_ACK8_HEADER Ack8; + EFI_MTFTP4_ACK8_HEADER Ack8; /// /// Error packet header. /// - EFI_MTFTP4_ERROR_HEADER Error; + EFI_MTFTP4_ERROR_HEADER Error; } EFI_MTFTP4_PACKET; #pragma pack() @@ -147,39 +141,36 @@ typedef union { /// MTFTP4 option definition. /// typedef struct { - UINT8 *OptionStr; - UINT8 *ValueStr; + UINT8 *OptionStr; + UINT8 *ValueStr; } EFI_MTFTP4_OPTION; - typedef struct { - BOOLEAN UseDefaultSetting; - EFI_IPv4_ADDRESS StationIp; - EFI_IPv4_ADDRESS SubnetMask; - UINT16 LocalPort; - EFI_IPv4_ADDRESS GatewayIp; - EFI_IPv4_ADDRESS ServerIp; - UINT16 InitialServerPort; - UINT16 TryCount; - UINT16 TimeoutValue; + BOOLEAN UseDefaultSetting; + EFI_IPv4_ADDRESS StationIp; + EFI_IPv4_ADDRESS SubnetMask; + UINT16 LocalPort; + EFI_IPv4_ADDRESS GatewayIp; + EFI_IPv4_ADDRESS ServerIp; + UINT16 InitialServerPort; + UINT16 TryCount; + UINT16 TimeoutValue; } EFI_MTFTP4_CONFIG_DATA; - typedef struct { - EFI_MTFTP4_CONFIG_DATA ConfigData; - UINT8 SupportedOptionCount; - UINT8 **SupportedOptoins; - UINT8 UnsupportedOptionCount; - UINT8 **UnsupportedOptoins; + EFI_MTFTP4_CONFIG_DATA ConfigData; + UINT8 SupportedOptionCount; + UINT8 **SupportedOptoins; + UINT8 UnsupportedOptionCount; + UINT8 **UnsupportedOptoins; } EFI_MTFTP4_MODE_DATA; - typedef struct { - EFI_IPv4_ADDRESS GatewayIp; - EFI_IPv4_ADDRESS ServerIp; - UINT16 ServerPort; - UINT16 TryCount; - UINT16 TimeoutValue; + EFI_IPv4_ADDRESS GatewayIp; + EFI_IPv4_ADDRESS ServerIp; + UINT16 ServerPort; + UINT16 TryCount; + UINT16 TimeoutValue; } EFI_MTFTP4_OVERRIDE_DATA; // @@ -258,7 +249,6 @@ EFI_STATUS OUT VOID **Buffer ); - /** Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device. @@ -277,7 +267,6 @@ EFI_STATUS OUT EFI_MTFTP4_MODE_DATA *ModeData ); - /** Initializes, changes, or resets the default operational setting for this EFI MTFTPv4 Protocol driver instance. @@ -307,7 +296,6 @@ EFI_STATUS IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL ); - /** Gets information about a file from an MTFTPv4 server. @@ -397,7 +385,6 @@ EFI_STATUS OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL ); - /** Downloads a file from an MTFTPv4 server. @@ -428,8 +415,6 @@ EFI_STATUS IN EFI_MTFTP4_TOKEN *Token ); - - /** Sends a file to an MTFTPv4 server. @@ -458,7 +443,6 @@ EFI_STATUS IN EFI_MTFTP4_TOKEN *Token ); - /** Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI implementations. @@ -530,7 +514,7 @@ struct _EFI_MTFTP4_TOKEN { /// The status that is returned to the caller at the end of the operation /// to indicate whether this operation completed successfully. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// The event that will be signaled when the operation completes. If /// set to NULL, the corresponding function will wait until the read or @@ -538,58 +522,57 @@ struct _EFI_MTFTP4_TOKEN { /// EVT_NOTIFY_SIGNAL. The Task Priority Level (TPL) of /// Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// If not NULL, the data that will be used to override the existing configure data. /// - EFI_MTFTP4_OVERRIDE_DATA *OverrideData; + EFI_MTFTP4_OVERRIDE_DATA *OverrideData; /// /// The pointer to the null-terminated ASCII file name string. /// - UINT8 *Filename; + UINT8 *Filename; /// /// The pointer to the null-terminated ASCII mode string. If NULL, "octet" is used. /// - UINT8 *ModeStr; + UINT8 *ModeStr; /// /// Number of option/value string pairs. /// - UINT32 OptionCount; + UINT32 OptionCount; /// /// The pointer to an array of option/value string pairs. Ignored if OptionCount is zero. /// - EFI_MTFTP4_OPTION *OptionList; + EFI_MTFTP4_OPTION *OptionList; /// /// The size of the data buffer. /// - UINT64 BufferSize; + UINT64 BufferSize; /// /// The pointer to the data buffer. Data that is downloaded from the /// MTFTPv4 server is stored here. Data that is uploaded to the /// MTFTPv4 server is read from here. Ignored if BufferSize is zero. /// - VOID *Buffer; + VOID *Buffer; /// /// The pointer to the context that will be used by CheckPacket, /// TimeoutCallback and PacketNeeded. /// - VOID *Context; + VOID *Context; /// /// The pointer to the callback function to check the contents of the received packet. /// - EFI_MTFTP4_CHECK_PACKET CheckPacket; + EFI_MTFTP4_CHECK_PACKET CheckPacket; /// /// The pointer to the function to be called when a timeout occurs. /// - EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback; + EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback; /// /// The pointer to the function to provide the needed packet contents. /// - EFI_MTFTP4_PACKET_NEEDED PacketNeeded; + EFI_MTFTP4_PACKET_NEEDED PacketNeeded; }; -extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiMtftp4ProtocolGuid; +extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiMtftp4ProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h b/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h index 5adedd8e9..1ce13f273 100644 --- a/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h +++ b/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h @@ -1,14 +1,8 @@ /** @file EFI Network Interface Identifier Protocol. -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 -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in EFI Specification 1.10. @@ -18,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__ #define __EFI_NETWORK_INTERFACE_IDENTIFER_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); // // GUID retired from UEFI Specification 2.1b @@ -39,53 +33,51 @@ FILE_LICENCE ( BSD3 ); // // Revision defined in UEFI Specification 2.4 // -#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00020000 - +#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00020000 /// /// Revision defined in EFI1.1. /// -#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION +#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION /// /// Forward reference for pure ANSI compatability. /// -typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL; +typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE; +typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE; /// /// An optional protocol that is used to describe details about the software /// layer that is used to produce the Simple Network Protocol. /// struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL { - UINT64 Revision; ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol. - UINT64 Id; ///< The address of the first byte of the identifying structure for this network - ///< interface. This is only valid when the network interface is started - ///< (see Start()). When the network interface is not started, this field is set to zero. - UINT64 ImageAddr; ///< The address of the first byte of the identifying structure for this - ///< network interface. This is set to zero if there is no structure. - UINT32 ImageSize; ///< The size of unrelocated network interface image. - CHAR8 StringId[4];///< A four-character ASCII string that is sent in the class identifier field of - ///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI. - UINT8 Type; ///< Network interface type. This will be set to one of the values - ///< in EFI_NETWORK_INTERFACE_TYPE. - UINT8 MajorVer; ///< Major version number. - UINT8 MinorVer; ///< Minor version number. - BOOLEAN Ipv6Supported; ///< TRUE if the network interface supports IPv6; otherwise FALSE. - UINT16 IfNum; ///< The network interface number that is being identified by this Network - ///< Interface Identifier Protocol. This field must be less than or - ///< equal to the (IFcnt | IFcntExt <<8 ) fields in the !PXE structure. - + UINT64 Revision; ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol. + UINT64 Id; ///< The address of the first byte of the identifying structure for this network + ///< interface. This is only valid when the network interface is started + ///< (see Start()). When the network interface is not started, this field is set to zero. + UINT64 ImageAddr; ///< The address of the first byte of the identifying structure for this + ///< network interface. This is set to zero if there is no structure. + UINT32 ImageSize; ///< The size of unrelocated network interface image. + CHAR8 StringId[4]; ///< A four-character ASCII string that is sent in the class identifier field of + ///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI. + UINT8 Type; ///< Network interface type. This will be set to one of the values + ///< in EFI_NETWORK_INTERFACE_TYPE. + UINT8 MajorVer; ///< Major version number. + UINT8 MinorVer; ///< Minor version number. + BOOLEAN Ipv6Supported; ///< TRUE if the network interface supports IPv6; otherwise FALSE. + UINT16 IfNum; ///< The network interface number that is being identified by this Network + ///< Interface Identifier Protocol. This field must be less than or + ///< equal to the (IFcnt | IFcntExt <<8 ) fields in the !PXE structure. }; /// -///******************************************************* +/// ******************************************************* /// EFI_NETWORK_INTERFACE_TYPE -///******************************************************* +/// ******************************************************* /// typedef enum { EfiNetworkInterfaceUndi = 1 @@ -94,27 +86,27 @@ typedef enum { /// /// Forward reference for pure ANSI compatability. /// -typedef struct undiconfig_table UNDI_CONFIG_TABLE; +typedef struct undiconfig_table UNDI_CONFIG_TABLE; /// /// The format of the configuration table for UNDI /// struct undiconfig_table { - UINT32 NumberOfInterfaces; ///< The number of NIC devices + UINT32 NumberOfInterfaces; ///< The number of NIC devices ///< that this UNDI controls. - UINT32 reserved; - UNDI_CONFIG_TABLE *nextlink; ///< A pointer to the next UNDI + UINT32 reserved; + UNDI_CONFIG_TABLE *nextlink; ///< A pointer to the next UNDI ///< configuration table. /// /// The length of this array is given in the NumberOfInterfaces field. /// struct { - VOID *NII_InterfacePointer; ///< Pointer to the NII interface structure. - VOID *DevicePathPointer; ///< Pointer to the device path for this NIC. + VOID *NII_InterfacePointer; ///< Pointer to the NII interface structure. + VOID *DevicePathPointer; ///< Pointer to the device path for this NIC. } NII_entry[1]; }; -extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; -extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31; +extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; +extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31; #endif diff --git a/src/include/ipxe/efi/Protocol/PciIo.h b/src/include/ipxe/efi/Protocol/PciIo.h index 97f65e1f8..c733925d5 100644 --- a/src/include/ipxe/efi/Protocol/PciIo.h +++ b/src/include/ipxe/efi/Protocol/PciIo.h @@ -2,21 +2,15 @@ EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration, and DMA interfaces that a driver uses to access its PCI controller. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __PCI_IO_H__ #define __PCI_IO_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// Global ID for the PCI I/O Protocol @@ -26,7 +20,7 @@ FILE_LICENCE ( BSD3 ); 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \ } -typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; +typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; /// /// ******************************************************* @@ -34,7 +28,7 @@ typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; /// ******************************************************* /// typedef enum { - EfiPciIoWidthUint8 = 0, + EfiPciIoWidthUint8 = 0, EfiPciIoWidthUint16, EfiPciIoWidthUint32, EfiPciIoWidthUint64, @@ -52,30 +46,30 @@ typedef enum { // // Complete PCI address generater // -#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff ///< Special BAR that passes a memory or I/O cycle through unchanged -#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f ///< All the following I/O and Memory cycles -#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 ///< I/O cycles 0x0000-0x00FF (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so writes are combined -#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header -#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header -#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header -#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 ///< Map a memory range so all r/w accesses are cached -#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range -#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 ///< Clear for an add-in PCI Device -#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 ///< Clear for a physical PCI Option ROM accessed through ROM BAR -#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 ///< Clear for PCI controllers that can not genrate a DAC -#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode) - -#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) -#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO) +#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff ///< Special BAR that passes a memory or I/O cycle through unchanged +#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f ///< All the following I/O and Memory cycles +#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 ///< I/O cycles 0x0000-0x00FF (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so writes are combined +#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header +#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header +#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header +#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 ///< Map a memory range so all r/w accesses are cached +#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range +#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 ///< Clear for an add-in PCI Device +#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 ///< Clear for a physical PCI Option ROM accessed through ROM BAR +#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 ///< Clear for PCI controllers that can not genrate a DAC +#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode) + +#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) +#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO) /// /// ******************************************************* @@ -198,11 +192,11 @@ typedef struct { /// /// Read PCI controller registers in the PCI memory or I/O space. /// - EFI_PCI_IO_PROTOCOL_IO_MEM Read; + EFI_PCI_IO_PROTOCOL_IO_MEM Read; /// /// Write PCI controller registers in the PCI memory or I/O space. /// - EFI_PCI_IO_PROTOCOL_IO_MEM Write; + EFI_PCI_IO_PROTOCOL_IO_MEM Write; } EFI_PCI_IO_PROTOCOL_ACCESS; /** @@ -237,11 +231,11 @@ typedef struct { /// /// Read PCI controller registers in PCI configuration space. /// - EFI_PCI_IO_PROTOCOL_CONFIG Read; + EFI_PCI_IO_PROTOCOL_CONFIG Read; /// /// Write PCI controller registers in PCI configuration space. /// - EFI_PCI_IO_PROTOCOL_CONFIG Write; + EFI_PCI_IO_PROTOCOL_CONFIG Write; } EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS; /** @@ -333,7 +327,7 @@ EFI_STATUS /** Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer - mapping. + or EfiPciOperationBusMasterCommonBuffer64 mapping. @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. @param Type This parameter is not used and must be ignored. @@ -346,7 +340,7 @@ EFI_STATUS @retval EFI_SUCCESS The requested memory pages were allocated. @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. + MEMORY_WRITE_COMBINE, MEMORY_CACHED and DUAL_ADDRESS_CYCLE. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. @@ -459,25 +453,24 @@ EFI_STATUS base address for resource range. The legal range for this field is 0..5. @param Supports A pointer to the mask of attributes that this PCI controller supports setting for this BAR with SetBarAttributes(). - @param Resources A pointer to the ACPI 2.0 resource descriptors that describe the current + @param Resources A pointer to the resource descriptors that describe the current configuration of this BAR of the PCI controller. @retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI controller supports are returned in Supports. If Resources - is not NULL, then the ACPI 2.0 resource descriptors that the PCI + is not NULL, then the resource descriptors that the PCI controller is currently using are returned in Resources. @retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL. @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate Resources. - **/ typedef EFI_STATUS (EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES)( IN EFI_PCI_IO_PROTOCOL *This, IN UINT8 BarIndex, - OUT UINT64 *Supports, OPTIONAL + OUT UINT64 *Supports OPTIONAL, OUT VOID **Resources OPTIONAL ); @@ -523,26 +516,26 @@ EFI_STATUS /// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller. /// struct _EFI_PCI_IO_PROTOCOL { - EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem; - EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo; - EFI_PCI_IO_PROTOCOL_ACCESS Mem; - EFI_PCI_IO_PROTOCOL_ACCESS Io; - EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci; - EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem; - EFI_PCI_IO_PROTOCOL_MAP Map; - EFI_PCI_IO_PROTOCOL_UNMAP Unmap; - EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; - EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer; - EFI_PCI_IO_PROTOCOL_FLUSH Flush; - EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation; - EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes; - EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes; - EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes; + EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem; + EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo; + EFI_PCI_IO_PROTOCOL_ACCESS Mem; + EFI_PCI_IO_PROTOCOL_ACCESS Io; + EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci; + EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem; + EFI_PCI_IO_PROTOCOL_MAP Map; + EFI_PCI_IO_PROTOCOL_UNMAP Unmap; + EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; + EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer; + EFI_PCI_IO_PROTOCOL_FLUSH Flush; + EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation; + EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes; + EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes; + EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes; /// /// The size, in bytes, of the ROM image. /// - UINT64 RomSize; + UINT64 RomSize; /// /// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible @@ -552,9 +545,9 @@ struct _EFI_PCI_IO_PROTOCOL { /// The Attributes() function can be used to determine from which of these two sources /// the RomImage buffer was initialized. /// - VOID *RomImage; + VOID *RomImage; }; -extern EFI_GUID gEfiPciIoProtocolGuid; +extern EFI_GUID gEfiPciIoProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h b/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h index b9c80f589..b6a478027 100644 --- a/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h +++ b/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h @@ -5,21 +5,15 @@ and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform defferent types of bus mastering DMA. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __PCI_ROOT_BRIDGE_IO_H__ #define __PCI_ROOT_BRIDGE_IO_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Library/BaseLib.h> @@ -28,7 +22,7 @@ FILE_LICENCE ( BSD3 ); 0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL; +typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL; /// /// ******************************************************* @@ -90,24 +84,24 @@ typedef enum { EfiPciOperationMaximum } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION; -#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 -#define EFI_PCI_ATTRIBUTE_ISA_IO 0x0002 -#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO 0x0004 -#define EFI_PCI_ATTRIBUTE_VGA_MEMORY 0x0008 -#define EFI_PCI_ATTRIBUTE_VGA_IO 0x0010 -#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 -#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 -#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 -#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED 0x0800 -#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE 0x1000 -#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 -#define EFI_PCI_ATTRIBUTE_ISA_IO_16 0x10000 -#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 -#define EFI_PCI_ATTRIBUTE_VGA_IO_16 0x40000 - -#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) - -#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER) +#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 +#define EFI_PCI_ATTRIBUTE_ISA_IO 0x0002 +#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO 0x0004 +#define EFI_PCI_ATTRIBUTE_VGA_MEMORY 0x0008 +#define EFI_PCI_ATTRIBUTE_VGA_IO 0x0010 +#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 +#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 +#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 +#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED 0x0800 +#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE 0x1000 +#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 +#define EFI_PCI_ATTRIBUTE_ISA_IO_16 0x10000 +#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 +#define EFI_PCI_ATTRIBUTE_VGA_IO_16 0x40000 + +#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) + +#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER) #define EFI_PCI_ADDRESS(bus, dev, func, reg) \ (UINT64) ( \ @@ -117,11 +111,11 @@ typedef enum { (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32)))) typedef struct { - UINT8 Register; - UINT8 Function; - UINT8 Device; - UINT8 Bus; - UINT32 ExtendedRegister; + UINT8 Register; + UINT8 Function; + UINT8 Device; + UINT8 Bus; + UINT32 ExtendedRegister; } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS; /** @@ -183,11 +177,11 @@ typedef struct { /// /// Read PCI controller registers in the PCI root bridge memory space. /// - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read; /// /// Write PCI controller registers in the PCI root bridge memory space. /// - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write; } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS; /** @@ -389,11 +383,11 @@ EFI_STATUS ); /** - Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0 + Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI resource descriptors. @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Resources A pointer to the ACPI 2.0 resource descriptors that describe the current + @param Resources A pointer to the resource descriptors that describe the current configuration of this PCI root bridge. @retval EFI_SUCCESS The current configuration of this PCI root bridge was returned in @@ -417,28 +411,28 @@ struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL { /// /// The EFI_HANDLE of the PCI Host Bridge of which this PCI Root Bridge is a member. /// - EFI_HANDLE ParentHandle; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollMem; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollIo; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Mem; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Io; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Pci; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM CopyMem; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP Map; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP Unmap; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER FreeBuffer; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH Flush; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES GetAttributes; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES SetAttributes; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION Configuration; + EFI_HANDLE ParentHandle; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollMem; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollIo; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Mem; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Io; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Pci; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM CopyMem; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP Map; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP Unmap; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER FreeBuffer; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH Flush; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES GetAttributes; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES SetAttributes; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION Configuration; /// /// The segment number that this PCI root bridge resides. /// - UINT32 SegmentNumber; + UINT32 SegmentNumber; }; -extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid; +extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/PxeBaseCode.h b/src/include/ipxe/efi/Protocol/PxeBaseCode.h index 26447987d..20efd7280 100644 --- a/src/include/ipxe/efi/Protocol/PxeBaseCode.h +++ b/src/include/ipxe/efi/Protocol/PxeBaseCode.h @@ -2,23 +2,21 @@ EFI PXE Base Code Protocol definitions, which is used to access PXE-compatible devices for network access and network booting. -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR> -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in EFI Specification 1.10. **/ + #ifndef __PXE_BASE_CODE_PROTOCOL_H__ #define __PXE_BASE_CODE_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// PXE Base Code protocol. @@ -28,94 +26,94 @@ FILE_LICENCE ( BSD3 ); 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL; +typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE; +typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE; /// /// Default IP TTL and ToS. /// -#define DEFAULT_TTL 16 -#define DEFAULT_ToS 0 +#define DEFAULT_TTL 16 +#define DEFAULT_ToS 0 /// /// ICMP error format. /// typedef struct { - UINT8 Type; - UINT8 Code; - UINT16 Checksum; + UINT8 Type; + UINT8 Code; + UINT16 Checksum; union { - UINT32 reserved; - UINT32 Mtu; - UINT32 Pointer; + UINT32 reserved; + UINT32 Mtu; + UINT32 Pointer; struct { - UINT16 Identifier; - UINT16 Sequence; + UINT16 Identifier; + UINT16 Sequence; } Echo; } u; - UINT8 Data[494]; + UINT8 Data[494]; } EFI_PXE_BASE_CODE_ICMP_ERROR; /// /// TFTP error format. /// typedef struct { - UINT8 ErrorCode; - CHAR8 ErrorString[127]; + UINT8 ErrorCode; + CHAR8 ErrorString[127]; } EFI_PXE_BASE_CODE_TFTP_ERROR; /// /// IP Receive Filter definitions. /// -#define EFI_PXE_BASE_CODE_MAX_IPCNT 8 +#define EFI_PXE_BASE_CODE_MAX_IPCNT 8 /// /// IP Receive Filter structure. /// typedef struct { - UINT8 Filters; - UINT8 IpCnt; - UINT16 reserved; - EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT]; + UINT8 Filters; + UINT8 IpCnt; + UINT16 reserved; + EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT]; } EFI_PXE_BASE_CODE_IP_FILTER; -#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001 -#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002 -#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004 -#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008 +#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001 +#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002 +#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004 +#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008 /// /// ARP cache entries. /// typedef struct { - EFI_IP_ADDRESS IpAddr; - EFI_MAC_ADDRESS MacAddr; + EFI_IP_ADDRESS IpAddr; + EFI_MAC_ADDRESS MacAddr; } EFI_PXE_BASE_CODE_ARP_ENTRY; /// /// ARP route table entries. /// typedef struct { - EFI_IP_ADDRESS IpAddr; - EFI_IP_ADDRESS SubnetMask; - EFI_IP_ADDRESS GwAddr; + EFI_IP_ADDRESS IpAddr; + EFI_IP_ADDRESS SubnetMask; + EFI_IP_ADDRESS GwAddr; } EFI_PXE_BASE_CODE_ROUTE_ENTRY; // // UDP definitions // -typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; +typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020 // // Discover() definitions @@ -142,7 +140,7 @@ typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; // 32768 through 65279 are for vendor use // 65280 through 65534 are reserved // -#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535 +#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535 #define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF #define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000 @@ -154,39 +152,40 @@ typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; // http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml // #if defined (MDE_CPU_IA32) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0006 -#elif defined (MDE_CPU_IPF) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0002 +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0006 #elif defined (MDE_CPU_X64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0007 +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0007 #elif defined (MDE_CPU_ARM) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000A +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000A #elif defined (MDE_CPU_AARCH64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B +#elif defined (MDE_CPU_RISCV64) +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x001B +#elif defined (MDE_CPU_LOONGARCH64) +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0027 #endif - /// /// Discover() server list structure. /// typedef struct { - UINT16 Type; - BOOLEAN AcceptAnyResponse; - UINT8 Reserved; - EFI_IP_ADDRESS IpAddr; + UINT16 Type; + BOOLEAN AcceptAnyResponse; + UINT8 Reserved; + EFI_IP_ADDRESS IpAddr; } EFI_PXE_BASE_CODE_SRVLIST; /// /// Discover() information override structure. /// typedef struct { - BOOLEAN UseMCast; - BOOLEAN UseBCast; - BOOLEAN UseUCast; - BOOLEAN MustUseList; - EFI_IP_ADDRESS ServerMCastIp; - UINT16 IpCnt; - EFI_PXE_BASE_CODE_SRVLIST SrvList[1]; + BOOLEAN UseMCast; + BOOLEAN UseBCast; + BOOLEAN UseUCast; + BOOLEAN MustUseList; + EFI_IP_ADDRESS ServerMCastIp; + UINT16 IpCnt; + EFI_PXE_BASE_CODE_SRVLIST SrvList[1]; } EFI_PXE_BASE_CODE_DISCOVER_INFO; /// @@ -210,58 +209,58 @@ typedef enum { /// perform the "get file size" and "read directory" operations of MTFTP. /// typedef struct { - EFI_IP_ADDRESS MCastIp; - EFI_PXE_BASE_CODE_UDP_PORT CPort; - EFI_PXE_BASE_CODE_UDP_PORT SPort; - UINT16 ListenTimeout; - UINT16 TransmitTimeout; + EFI_IP_ADDRESS MCastIp; + EFI_PXE_BASE_CODE_UDP_PORT CPort; + EFI_PXE_BASE_CODE_UDP_PORT SPort; + UINT16 ListenTimeout; + UINT16 TransmitTimeout; } EFI_PXE_BASE_CODE_MTFTP_INFO; /// /// DHCPV4 Packet structure. /// typedef struct { - UINT8 BootpOpcode; - UINT8 BootpHwType; - UINT8 BootpHwAddrLen; - UINT8 BootpGateHops; - UINT32 BootpIdent; - UINT16 BootpSeconds; - UINT16 BootpFlags; - UINT8 BootpCiAddr[4]; - UINT8 BootpYiAddr[4]; - UINT8 BootpSiAddr[4]; - UINT8 BootpGiAddr[4]; - UINT8 BootpHwAddr[16]; - UINT8 BootpSrvName[64]; - UINT8 BootpBootFile[128]; - UINT32 DhcpMagik; - UINT8 DhcpOptions[56]; + UINT8 BootpOpcode; + UINT8 BootpHwType; + UINT8 BootpHwAddrLen; + UINT8 BootpGateHops; + UINT32 BootpIdent; + UINT16 BootpSeconds; + UINT16 BootpFlags; + UINT8 BootpCiAddr[4]; + UINT8 BootpYiAddr[4]; + UINT8 BootpSiAddr[4]; + UINT8 BootpGiAddr[4]; + UINT8 BootpHwAddr[16]; + UINT8 BootpSrvName[64]; + UINT8 BootpBootFile[128]; + UINT32 DhcpMagik; + UINT8 DhcpOptions[56]; } EFI_PXE_BASE_CODE_DHCPV4_PACKET; /// /// DHCPV6 Packet structure. /// typedef struct { - UINT32 MessageType:8; - UINT32 TransactionId:24; - UINT8 DhcpOptions[1024]; + UINT32 MessageType : 8; + UINT32 TransactionId : 24; + UINT8 DhcpOptions[1024]; } EFI_PXE_BASE_CODE_DHCPV6_PACKET; /// /// Packet structure. /// typedef union { - UINT8 Raw[1472]; - EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4; - EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6; + UINT8 Raw[1472]; + EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4; + EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6; } EFI_PXE_BASE_CODE_PACKET; // // PXE Base Code Mode structure // -#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8 -#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8 +#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8 +#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8 /// /// EFI_PXE_BASE_CODE_MODE. @@ -270,40 +269,40 @@ typedef union { /// EFI_PXE_BASE_CODE_PROTOCOL functions. /// typedef struct { - BOOLEAN Started; - BOOLEAN Ipv6Available; - BOOLEAN Ipv6Supported; - BOOLEAN UsingIpv6; - BOOLEAN BisSupported; - BOOLEAN BisDetected; - BOOLEAN AutoArp; - BOOLEAN SendGUID; - BOOLEAN DhcpDiscoverValid; - BOOLEAN DhcpAckReceived; - BOOLEAN ProxyOfferReceived; - BOOLEAN PxeDiscoverValid; - BOOLEAN PxeReplyReceived; - BOOLEAN PxeBisReplyReceived; - BOOLEAN IcmpErrorReceived; - BOOLEAN TftpErrorReceived; - BOOLEAN MakeCallbacks; - UINT8 TTL; - UINT8 ToS; - EFI_IP_ADDRESS StationIp; - EFI_IP_ADDRESS SubnetMask; - EFI_PXE_BASE_CODE_PACKET DhcpDiscover; - EFI_PXE_BASE_CODE_PACKET DhcpAck; - EFI_PXE_BASE_CODE_PACKET ProxyOffer; - EFI_PXE_BASE_CODE_PACKET PxeDiscover; - EFI_PXE_BASE_CODE_PACKET PxeReply; - EFI_PXE_BASE_CODE_PACKET PxeBisReply; - EFI_PXE_BASE_CODE_IP_FILTER IpFilter; - UINT32 ArpCacheEntries; - EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES]; - UINT32 RouteTableEntries; - EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES]; - EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError; - EFI_PXE_BASE_CODE_TFTP_ERROR TftpError; + BOOLEAN Started; + BOOLEAN Ipv6Available; + BOOLEAN Ipv6Supported; + BOOLEAN UsingIpv6; + BOOLEAN BisSupported; + BOOLEAN BisDetected; + BOOLEAN AutoArp; + BOOLEAN SendGUID; + BOOLEAN DhcpDiscoverValid; + BOOLEAN DhcpAckReceived; + BOOLEAN ProxyOfferReceived; + BOOLEAN PxeDiscoverValid; + BOOLEAN PxeReplyReceived; + BOOLEAN PxeBisReplyReceived; + BOOLEAN IcmpErrorReceived; + BOOLEAN TftpErrorReceived; + BOOLEAN MakeCallbacks; + UINT8 TTL; + UINT8 ToS; + EFI_IP_ADDRESS StationIp; + EFI_IP_ADDRESS SubnetMask; + EFI_PXE_BASE_CODE_PACKET DhcpDiscover; + EFI_PXE_BASE_CODE_PACKET DhcpAck; + EFI_PXE_BASE_CODE_PACKET ProxyOffer; + EFI_PXE_BASE_CODE_PACKET PxeDiscover; + EFI_PXE_BASE_CODE_PACKET PxeReply; + EFI_PXE_BASE_CODE_PACKET PxeBisReply; + EFI_PXE_BASE_CODE_IP_FILTER IpFilter; + UINT32 ArpCacheEntries; + EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES]; + UINT32 RouteTableEntries; + EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES]; + EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError; + EFI_PXE_BASE_CODE_TFTP_ERROR TftpError; } EFI_PXE_BASE_CODE_MODE; // @@ -627,11 +626,11 @@ EFI_STATUS IN UINT16 OpFlags, IN EFI_IP_ADDRESS *DestIp, IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort, - IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL - IN EFI_IP_ADDRESS *SrcIp, OPTIONAL - IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL - IN UINTN *HeaderSize, OPTIONAL - IN VOID *HeaderPtr, OPTIONAL + IN EFI_IP_ADDRESS *GatewayIp OPTIONAL, + IN EFI_IP_ADDRESS *SrcIp OPTIONAL, + IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL, + IN UINTN *HeaderSize OPTIONAL, + IN VOID *HeaderPtr OPTIONAL, IN UINTN *BufferSize, IN VOID *BufferPtr ); @@ -679,12 +678,12 @@ EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_UDP_READ)( IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN UINT16 OpFlags, - IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL - IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort, OPTIONAL - IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL - IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL - IN UINTN *HeaderSize, OPTIONAL - IN VOID *HeaderPtr, OPTIONAL + IN OUT EFI_IP_ADDRESS *DestIp OPTIONAL, + IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort OPTIONAL, + IN OUT EFI_IP_ADDRESS *SrcIp OPTIONAL, + IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL, + IN UINTN *HeaderSize OPTIONAL, + IN VOID *HeaderPtr OPTIONAL, IN OUT UINTN *BufferSize, IN VOID *BufferPtr ); @@ -801,10 +800,10 @@ typedef EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS)( IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN BOOLEAN *NewAutoArp, OPTIONAL - IN BOOLEAN *NewSendGUID, OPTIONAL - IN UINT8 *NewTTL, OPTIONAL - IN UINT8 *NewToS, OPTIONAL + IN BOOLEAN *NewAutoArp OPTIONAL, + IN BOOLEAN *NewSendGUID OPTIONAL, + IN UINT8 *NewTTL OPTIONAL, + IN UINT8 *NewToS OPTIONAL, IN BOOLEAN *NewMakeCallback OPTIONAL ); @@ -835,7 +834,7 @@ typedef EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP)( IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL + IN EFI_IP_ADDRESS *NewStationIp OPTIONAL, IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL ); @@ -874,24 +873,24 @@ typedef EFI_STATUS (EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS)( IN EFI_PXE_BASE_CODE_PROTOCOL *This, - BOOLEAN *NewDhcpDiscoverValid, OPTIONAL - BOOLEAN *NewDhcpAckReceived, OPTIONAL - BOOLEAN *NewProxyOfferReceived, OPTIONAL - BOOLEAN *NewPxeDiscoverValid, OPTIONAL - BOOLEAN *NewPxeReplyReceived, OPTIONAL - BOOLEAN *NewPxeBisReplyReceived, OPTIONAL - IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover, OPTIONAL - IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck, OPTIONAL - IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer, OPTIONAL - IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover, OPTIONAL - IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply, OPTIONAL + BOOLEAN *NewDhcpDiscoverValid OPTIONAL, + BOOLEAN *NewDhcpAckReceived OPTIONAL, + BOOLEAN *NewProxyOfferReceived OPTIONAL, + BOOLEAN *NewPxeDiscoverValid OPTIONAL, + BOOLEAN *NewPxeReplyReceived OPTIONAL, + BOOLEAN *NewPxeBisReplyReceived OPTIONAL, + IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover OPTIONAL, + IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck OPTIONAL, + IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer OPTIONAL, + IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover OPTIONAL, + IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL ); // // PXE Base Code Protocol structure // -#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000 +#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000 // // Revision defined in EFI1.1 @@ -912,25 +911,25 @@ struct _EFI_PXE_BASE_CODE_PROTOCOL { /// be backwards compatible. If a future version is not backwards compatible /// it is not the same GUID. /// - UINT64 Revision; - EFI_PXE_BASE_CODE_START Start; - EFI_PXE_BASE_CODE_STOP Stop; - EFI_PXE_BASE_CODE_DHCP Dhcp; - EFI_PXE_BASE_CODE_DISCOVER Discover; - EFI_PXE_BASE_CODE_MTFTP Mtftp; - EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite; - EFI_PXE_BASE_CODE_UDP_READ UdpRead; - EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter; - EFI_PXE_BASE_CODE_ARP Arp; - EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters; - EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp; - EFI_PXE_BASE_CODE_SET_PACKETS SetPackets; + UINT64 Revision; + EFI_PXE_BASE_CODE_START Start; + EFI_PXE_BASE_CODE_STOP Stop; + EFI_PXE_BASE_CODE_DHCP Dhcp; + EFI_PXE_BASE_CODE_DISCOVER Discover; + EFI_PXE_BASE_CODE_MTFTP Mtftp; + EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite; + EFI_PXE_BASE_CODE_UDP_READ UdpRead; + EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter; + EFI_PXE_BASE_CODE_ARP Arp; + EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters; + EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp; + EFI_PXE_BASE_CODE_SET_PACKETS SetPackets; /// /// The pointer to the EFI_PXE_BASE_CODE_MODE data for this device. /// - EFI_PXE_BASE_CODE_MODE *Mode; + EFI_PXE_BASE_CODE_MODE *Mode; }; -extern EFI_GUID gEfiPxeBaseCodeProtocolGuid; +extern EFI_GUID gEfiPxeBaseCodeProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/Rng.h b/src/include/ipxe/efi/Protocol/Rng.h index f04efbb03..87c5c0edd 100644 --- a/src/include/ipxe/efi/Protocol/Rng.h +++ b/src/include/ipxe/efi/Protocol/Rng.h @@ -3,21 +3,15 @@ The UEFI Random Number Generator Protocol is used to provide random bits for use in applications, or entropy for seeding other random number generators. -Copyright (c) 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 -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. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __EFI_RNG_PROTOCOL_H__ #define __EFI_RNG_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// Global ID for the Random Number Generator Protocol @@ -101,7 +95,7 @@ typedef EFI_GUID EFI_RNG_ALGORITHM; **/ typedef EFI_STATUS -(EFIAPI *EFI_RNG_GET_INFO) ( +(EFIAPI *EFI_RNG_GET_INFO)( IN EFI_RNG_PROTOCOL *This, IN OUT UINTN *RNGAlgorithmListSize, OUT EFI_RNG_ALGORITHM *RNGAlgorithmList @@ -131,9 +125,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_RNG_GET_RNG) ( +(EFIAPI *EFI_RNG_GET_RNG)( IN EFI_RNG_PROTOCOL *This, - IN EFI_RNG_ALGORITHM *RNGAlgorithm, OPTIONAL + IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL, IN UINTN RNGValueLength, OUT UINT8 *RNGValue ); @@ -143,16 +137,16 @@ EFI_STATUS /// applications, or entropy for seeding other random number generators. /// struct _EFI_RNG_PROTOCOL { - EFI_RNG_GET_INFO GetInfo; - EFI_RNG_GET_RNG GetRNG; + EFI_RNG_GET_INFO GetInfo; + EFI_RNG_GET_RNG GetRNG; }; -extern EFI_GUID gEfiRngProtocolGuid; -extern EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid; -extern EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid; -extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid; -extern EFI_GUID gEfiRngAlgorithmX9313DesGuid; -extern EFI_GUID gEfiRngAlgorithmX931AesGuid; -extern EFI_GUID gEfiRngAlgorithmRaw; +extern EFI_GUID gEfiRngProtocolGuid; +extern EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid; +extern EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid; +extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid; +extern EFI_GUID gEfiRngAlgorithmX9313DesGuid; +extern EFI_GUID gEfiRngAlgorithmX931AesGuid; +extern EFI_GUID gEfiRngAlgorithmRaw; #endif diff --git a/src/include/ipxe/efi/Protocol/SerialIo.h b/src/include/ipxe/efi/Protocol/SerialIo.h index 130a6ecdc..1e44a21c4 100644 --- a/src/include/ipxe/efi/Protocol/SerialIo.h +++ b/src/include/ipxe/efi/Protocol/SerialIo.h @@ -4,27 +4,26 @@ 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SERIAL_IO_PROTOCOL_H__ #define __SERIAL_IO_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_SERIAL_IO_PROTOCOL_GUID \ { \ 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \ } +#define EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID \ + { \ + 0X6AD9A60F, 0X5815, 0X4C7C, { 0X8A, 0X10, 0X50, 0X53, 0XD2, 0XBF, 0X7A, 0X1B } \ + } + /// /// Protocol GUID defined in EFI1.1. /// @@ -32,11 +31,10 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL; - /// /// Backward-compatible with EFI1.1. /// -typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE; +typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE; /// /// Parity type that is computed or checked as each character is transmitted or received. If the @@ -83,13 +81,14 @@ typedef enum { // // Read Write // -#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x00001000 -#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x00002000 -#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000 +#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. @@ -127,8 +126,9 @@ EFI_STATUS 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. + @retval EFI_SUCCESS The device was reset. + @retval EFI_INVALID_PARAMETER One or more attributes has an unsupported value. + @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. **/ typedef @@ -256,21 +256,22 @@ EFI_STATUS **/ typedef struct { - UINT32 ControlMask; + UINT32 ControlMask; // // current Attributes // - UINT32 Timeout; - UINT64 BaudRate; - UINT32 ReceiveFifoDepth; - UINT32 DataBits; - UINT32 Parity; - UINT32 StopBits; + 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 +#define EFI_SERIAL_IO_PROTOCOL_REVISION 0x00010000 +#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001 +#define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// /// The Serial I/O protocol is used to communicate with UART-style serial devices. @@ -283,19 +284,28 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// 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; + 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; + EFI_SERIAL_IO_MODE *Mode; + /// + /// Pointer to a GUID identifying the device connected to the serial port. + /// This field is NULL when the protocol is installed by the serial port + /// driver and may be populated by a platform driver for a serial port + /// with a known device attached. The field will remain NULL if there is + /// no platform serial device identification information available. + /// + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; -extern EFI_GUID gEfiSerialIoProtocolGuid; +extern EFI_GUID gEfiSerialIoProtocolGuid; +extern EFI_GUID gEfiSerialTerminalDeviceTypeGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/SimpleFileSystem.h b/src/include/ipxe/efi/Protocol/SimpleFileSystem.h index b6bacfd9c..62edb2a88 100644 --- a/src/include/ipxe/efi/Protocol/SimpleFileSystem.h +++ b/src/include/ipxe/efi/Protocol/SimpleFileSystem.h @@ -7,42 +7,36 @@ UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem. -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 -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SIMPLE_FILE_SYSTEM_H__ #define __SIMPLE_FILE_SYSTEM_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ { \ 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL; +typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL; -typedef struct _EFI_FILE_PROTOCOL EFI_FILE_PROTOCOL; -typedef struct _EFI_FILE_PROTOCOL *EFI_FILE_HANDLE; +typedef struct _EFI_FILE_PROTOCOL EFI_FILE_PROTOCOL; +typedef struct _EFI_FILE_PROTOCOL *EFI_FILE_HANDLE; /// /// Protocol GUID name defined in EFI1.1. /// -#define SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID +#define SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID /// /// Protocol name defined in EFI1.1. /// -typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE; -typedef EFI_FILE_PROTOCOL EFI_FILE; +typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE; +typedef EFI_FILE_PROTOCOL EFI_FILE; /** Open the root directory on a volume. @@ -84,8 +78,8 @@ struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL { /// specified by this specification is 0x00010000. All future revisions /// must be backwards compatible. /// - UINT64 Revision; - EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume; + UINT64 Revision; + EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume; }; /** @@ -138,13 +132,13 @@ EFI_STATUS // // File attributes // -#define EFI_FILE_READ_ONLY 0x0000000000000001ULL -#define EFI_FILE_HIDDEN 0x0000000000000002ULL -#define EFI_FILE_SYSTEM 0x0000000000000004ULL -#define EFI_FILE_RESERVED 0x0000000000000008ULL -#define EFI_FILE_DIRECTORY 0x0000000000000010ULL -#define EFI_FILE_ARCHIVE 0x0000000000000020ULL -#define EFI_FILE_VALID_ATTR 0x0000000000000037ULL +#define EFI_FILE_READ_ONLY 0x0000000000000001ULL +#define EFI_FILE_HIDDEN 0x0000000000000002ULL +#define EFI_FILE_SYSTEM 0x0000000000000004ULL +#define EFI_FILE_RESERVED 0x0000000000000008ULL +#define EFI_FILE_DIRECTORY 0x0000000000000010ULL +#define EFI_FILE_ARCHIVE 0x0000000000000020ULL +#define EFI_FILE_VALID_ATTR 0x0000000000000037ULL /** Closes a specified file handle. @@ -373,12 +367,12 @@ typedef struct { // The caller must be prepared to handle the case where the callback associated with Event // occurs before the original asynchronous I/O request call returns. // - EFI_EVENT Event; + EFI_EVENT Event; // // Defines whether or not the signaled event encountered an error. // - EFI_STATUS Status; + EFI_STATUS Status; // // For OpenEx(): Not Used, ignored. @@ -388,7 +382,7 @@ typedef struct { // In both cases, the size is measured in bytes. // For FlushEx(): Not used, ignored. // - UINTN BufferSize; + UINTN BufferSize; // // For OpenEx(): Not Used, ignored. @@ -396,7 +390,7 @@ typedef struct { // For WriteEx(): The buffer of data to write. // For FlushEx(): Not Used, ignored. // - VOID *Buffer; + VOID *Buffer; } EFI_FILE_IO_TOKEN; /** @@ -442,7 +436,6 @@ EFI_STATUS IN OUT EFI_FILE_IO_TOKEN *Token ); - /** Reads data from a file. @@ -461,11 +454,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_FILE_READ_EX) ( +(EFIAPI *EFI_FILE_READ_EX)( IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token -); - + ); /** Writes data to a file. @@ -488,10 +480,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_FILE_WRITE_EX) ( +(EFIAPI *EFI_FILE_WRITE_EX)( IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token -); + ); /** Flushes all modified data associated with a file to a device. @@ -514,19 +506,19 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_FILE_FLUSH_EX) ( +(EFIAPI *EFI_FILE_FLUSH_EX)( IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token ); -#define EFI_FILE_PROTOCOL_REVISION 0x00010000 -#define EFI_FILE_PROTOCOL_REVISION2 0x00020000 -#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2 +#define EFI_FILE_PROTOCOL_REVISION 0x00010000 +#define EFI_FILE_PROTOCOL_REVISION2 0x00020000 +#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2 // // Revision defined in EFI1.1. // -#define EFI_FILE_REVISION EFI_FILE_PROTOCOL_REVISION +#define EFI_FILE_REVISION EFI_FILE_PROTOCOL_REVISION /// /// The EFI_FILE_PROTOCOL provides file IO access to supported file systems. @@ -541,24 +533,23 @@ struct _EFI_FILE_PROTOCOL { /// by this specification is EFI_FILE_PROTOCOL_LATEST_REVISION. /// Future versions are required to be backward compatible to version 1.0. /// - UINT64 Revision; - EFI_FILE_OPEN Open; - EFI_FILE_CLOSE Close; - EFI_FILE_DELETE Delete; - EFI_FILE_READ Read; - EFI_FILE_WRITE Write; - EFI_FILE_GET_POSITION GetPosition; - EFI_FILE_SET_POSITION SetPosition; - EFI_FILE_GET_INFO GetInfo; - EFI_FILE_SET_INFO SetInfo; - EFI_FILE_FLUSH Flush; - EFI_FILE_OPEN_EX OpenEx; - EFI_FILE_READ_EX ReadEx; - EFI_FILE_WRITE_EX WriteEx; - EFI_FILE_FLUSH_EX FlushEx; + UINT64 Revision; + EFI_FILE_OPEN Open; + EFI_FILE_CLOSE Close; + EFI_FILE_DELETE Delete; + EFI_FILE_READ Read; + EFI_FILE_WRITE Write; + EFI_FILE_GET_POSITION GetPosition; + EFI_FILE_SET_POSITION SetPosition; + EFI_FILE_GET_INFO GetInfo; + EFI_FILE_SET_INFO SetInfo; + EFI_FILE_FLUSH Flush; + EFI_FILE_OPEN_EX OpenEx; + EFI_FILE_READ_EX ReadEx; + EFI_FILE_WRITE_EX WriteEx; + EFI_FILE_FLUSH_EX FlushEx; }; - -extern EFI_GUID gEfiSimpleFileSystemProtocolGuid; +extern EFI_GUID gEfiSimpleFileSystemProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/SimpleNetwork.h b/src/include/ipxe/efi/Protocol/SimpleNetwork.h index 2faa668f3..141ab8856 100644 --- a/src/include/ipxe/efi/Protocol/SimpleNetwork.h +++ b/src/include/ipxe/efi/Protocol/SimpleNetwork.h @@ -9,14 +9,8 @@ MCast - MultiCast ... -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in EFI Specification 1.10. @@ -26,20 +20,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __SIMPLE_NETWORK_H__ #define __SIMPLE_NETWORK_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ { \ 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \ } -typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL; - +typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK; +typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK; /// /// Simple Network Protocol data structures. @@ -49,99 +42,99 @@ typedef struct { /// Total number of frames received. Includes frames with errors and /// dropped frames. /// - UINT64 RxTotalFrames; + UINT64 RxTotalFrames; /// /// Number of valid frames received and copied into receive buffers. /// - UINT64 RxGoodFrames; + UINT64 RxGoodFrames; /// /// Number of frames below the minimum length for the media. /// This would be <64 for ethernet. /// - UINT64 RxUndersizeFrames; + UINT64 RxUndersizeFrames; /// /// Number of frames longer than the maxminum length for the /// media. This would be >1500 for ethernet. /// - UINT64 RxOversizeFrames; + UINT64 RxOversizeFrames; /// /// Valid frames that were dropped because receive buffers were full. /// - UINT64 RxDroppedFrames; + UINT64 RxDroppedFrames; /// /// Number of valid unicast frames received and not dropped. /// - UINT64 RxUnicastFrames; + UINT64 RxUnicastFrames; /// /// Number of valid broadcast frames received and not dropped. /// - UINT64 RxBroadcastFrames; + UINT64 RxBroadcastFrames; /// /// Number of valid mutlicast frames received and not dropped. /// - UINT64 RxMulticastFrames; + UINT64 RxMulticastFrames; /// /// Number of frames w/ CRC or alignment errors. /// - UINT64 RxCrcErrorFrames; + UINT64 RxCrcErrorFrames; /// /// Total number of bytes received. Includes frames with errors /// and dropped frames. // - UINT64 RxTotalBytes; + UINT64 RxTotalBytes; /// /// Transmit statistics. /// - UINT64 TxTotalFrames; - UINT64 TxGoodFrames; - UINT64 TxUndersizeFrames; - UINT64 TxOversizeFrames; - UINT64 TxDroppedFrames; - UINT64 TxUnicastFrames; - UINT64 TxBroadcastFrames; - UINT64 TxMulticastFrames; - UINT64 TxCrcErrorFrames; - UINT64 TxTotalBytes; + UINT64 TxTotalFrames; + UINT64 TxGoodFrames; + UINT64 TxUndersizeFrames; + UINT64 TxOversizeFrames; + UINT64 TxDroppedFrames; + UINT64 TxUnicastFrames; + UINT64 TxBroadcastFrames; + UINT64 TxMulticastFrames; + UINT64 TxCrcErrorFrames; + UINT64 TxTotalBytes; /// /// Number of collisions detection on this subnet. /// - UINT64 Collisions; + UINT64 Collisions; /// /// Number of frames destined for unsupported protocol. /// - UINT64 UnsupportedProtocol; + UINT64 UnsupportedProtocol; /// /// Number of valid frames received that were duplicated. /// - UINT64 RxDuplicatedFrames; + UINT64 RxDuplicatedFrames; /// /// Number of encrypted frames received that failed to decrypt. /// - UINT64 RxDecryptErrorFrames; + UINT64 RxDecryptErrorFrames; /// /// Number of frames that failed to transmit after exceeding the retry limit. /// - UINT64 TxErrorFrames; + UINT64 TxErrorFrames; /// /// Number of frames transmitted successfully after more than one attempt. /// - UINT64 TxRetryFrames; + UINT64 TxRetryFrames; } EFI_NETWORK_STATISTICS; /// @@ -162,97 +155,98 @@ typedef enum { #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10 -#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 -#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 -#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 -#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 +#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 +#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 +#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 +#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 -#define MAX_MCAST_FILTER_CNT 16 +#define MAX_MCAST_FILTER_CNT 16 typedef struct { /// /// Reports the current state of the network interface. /// - UINT32 State; + UINT32 State; /// /// The size, in bytes, of the network interface's HW address. /// - UINT32 HwAddressSize; + UINT32 HwAddressSize; /// /// The size, in bytes, of the network interface's media header. /// - UINT32 MediaHeaderSize; + UINT32 MediaHeaderSize; /// /// The maximum size, in bytes, of the packets supported by the network interface. /// - UINT32 MaxPacketSize; + UINT32 MaxPacketSize; /// /// The size, in bytes, of the NVRAM device attached to the network interface. /// - UINT32 NvRamSize; + UINT32 NvRamSize; /// /// The size that must be used for all NVRAM reads and writes. The /// start address for NVRAM read and write operations and the total /// length of those operations, must be a multiple of this value. The /// legal values for this field are 0, 1, 2, 4, and 8. /// - UINT32 NvRamAccessSize; + UINT32 NvRamAccessSize; /// /// The multicast receive filter settings supported by the network interface. /// - UINT32 ReceiveFilterMask; + UINT32 ReceiveFilterMask; /// /// The current multicast receive filter settings. /// - UINT32 ReceiveFilterSetting; + UINT32 ReceiveFilterSetting; /// /// The maximum number of multicast address receive filters supported by the driver. /// - UINT32 MaxMCastFilterCount; + UINT32 MaxMCastFilterCount; /// /// The current number of multicast address receive filters. /// - UINT32 MCastFilterCount; + UINT32 MCastFilterCount; /// /// Array containing the addresses of the current multicast address receive filters. /// - EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]; + EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]; /// /// The current HW MAC address for the network interface. /// - EFI_MAC_ADDRESS CurrentAddress; + EFI_MAC_ADDRESS CurrentAddress; /// /// The current HW MAC address for broadcast packets. /// - EFI_MAC_ADDRESS BroadcastAddress; + EFI_MAC_ADDRESS BroadcastAddress; /// /// The permanent HW MAC address for the network interface. /// - EFI_MAC_ADDRESS PermanentAddress; + EFI_MAC_ADDRESS PermanentAddress; /// /// The interface type of the network interface. /// - UINT8 IfType; + UINT8 IfType; /// /// TRUE if the HW MAC address can be changed. /// - BOOLEAN MacAddressChangeable; + BOOLEAN MacAddressChangeable; /// /// TRUE if the network interface can transmit more than one packet at a time. /// - BOOLEAN MultipleTxSupported; + BOOLEAN MultipleTxSupported; /// /// TRUE if the presence of media can be determined; otherwise FALSE. /// - BOOLEAN MediaPresentSupported; + BOOLEAN MediaPresentSupported; /// /// TRUE if media are connected to the network interface; otherwise FALSE. /// - BOOLEAN MediaPresent; + BOOLEAN MediaPresent; } EFI_SIMPLE_NETWORK_MODE; // // Protocol Member Functions // + /** Changes the state of a network interface from "stopped" to "started". @@ -640,7 +634,7 @@ EFI_STATUS // // Revision defined in EFI1.1 // -#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION +#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION /// /// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access @@ -654,30 +648,30 @@ struct _EFI_SIMPLE_NETWORK_PROTOCOL { /// be backwards compatible. If a future version is not backwards compatible /// it is not the same GUID. /// - UINT64 Revision; - EFI_SIMPLE_NETWORK_START Start; - EFI_SIMPLE_NETWORK_STOP Stop; - EFI_SIMPLE_NETWORK_INITIALIZE Initialize; - EFI_SIMPLE_NETWORK_RESET Reset; - EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown; - EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters; - EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress; - EFI_SIMPLE_NETWORK_STATISTICS Statistics; - EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac; - EFI_SIMPLE_NETWORK_NVDATA NvData; - EFI_SIMPLE_NETWORK_GET_STATUS GetStatus; - EFI_SIMPLE_NETWORK_TRANSMIT Transmit; - EFI_SIMPLE_NETWORK_RECEIVE Receive; + UINT64 Revision; + EFI_SIMPLE_NETWORK_START Start; + EFI_SIMPLE_NETWORK_STOP Stop; + EFI_SIMPLE_NETWORK_INITIALIZE Initialize; + EFI_SIMPLE_NETWORK_RESET Reset; + EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown; + EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters; + EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress; + EFI_SIMPLE_NETWORK_STATISTICS Statistics; + EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac; + EFI_SIMPLE_NETWORK_NVDATA NvData; + EFI_SIMPLE_NETWORK_GET_STATUS GetStatus; + EFI_SIMPLE_NETWORK_TRANSMIT Transmit; + EFI_SIMPLE_NETWORK_RECEIVE Receive; /// /// Event used with WaitForEvent() to wait for a packet to be received. /// - EFI_EVENT WaitForPacket; + EFI_EVENT WaitForPacket; /// /// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device. /// - EFI_SIMPLE_NETWORK_MODE *Mode; + EFI_SIMPLE_NETWORK_MODE *Mode; }; -extern EFI_GUID gEfiSimpleNetworkProtocolGuid; +extern EFI_GUID gEfiSimpleNetworkProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/SimplePointer.h b/src/include/ipxe/efi/Protocol/SimplePointer.h index 3b1e3057b..45ddf8d5c 100644 --- a/src/include/ipxe/efi/Protocol/SimplePointer.h +++ b/src/include/ipxe/efi/Protocol/SimplePointer.h @@ -3,28 +3,22 @@ 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SIMPLE_POINTER_H__ #define __SIMPLE_POINTER_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #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; +typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL; // // Data structures @@ -33,25 +27,25 @@ typedef struct { /// /// The signed distance in counts that the pointer device has been moved along the x-axis. /// - INT32 RelativeMovementX; + INT32 RelativeMovementX; /// /// The signed distance in counts that the pointer device has been moved along the y-axis. /// - INT32 RelativeMovementY; + INT32 RelativeMovementY; /// /// The signed distance in counts that the pointer device has been moved along the z-axis. /// - INT32 RelativeMovementZ; + 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; + 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; + BOOLEAN RightButton; } EFI_SIMPLE_POINTER_STATE; typedef struct { @@ -59,25 +53,25 @@ 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; + 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; + 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; + UINT64 ResolutionZ; /// /// TRUE if a left button is present on the pointer device. Otherwise FALSE. /// - BOOLEAN LeftButton; + BOOLEAN LeftButton; /// /// TRUE if a right button is present on the pointer device. Otherwise FALSE. /// - BOOLEAN RightButton; + BOOLEAN RightButton; } EFI_SIMPLE_POINTER_MODE; /** @@ -117,7 +111,7 @@ typedef EFI_STATUS (EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)( IN EFI_SIMPLE_POINTER_PROTOCOL *This, - IN OUT EFI_SIMPLE_POINTER_STATE *State + OUT EFI_SIMPLE_POINTER_STATE *State ); /// @@ -128,18 +122,18 @@ EFI_STATUS /// retrieve the capabilities of the pointer device. /// struct _EFI_SIMPLE_POINTER_PROTOCOL { - EFI_SIMPLE_POINTER_RESET Reset; - EFI_SIMPLE_POINTER_GET_STATE GetState; + 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; + EFI_EVENT WaitForInput; /// /// Pointer to EFI_SIMPLE_POINTER_MODE data. /// - EFI_SIMPLE_POINTER_MODE *Mode; + EFI_SIMPLE_POINTER_MODE *Mode; }; -extern EFI_GUID gEfiSimplePointerProtocolGuid; +extern EFI_GUID gEfiSimplePointerProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/SimpleTextIn.h b/src/include/ipxe/efi/Protocol/SimpleTextIn.h index e6d0eb24d..11daeb5bc 100644 --- a/src/include/ipxe/efi/Protocol/SimpleTextIn.h +++ b/src/include/ipxe/efi/Protocol/SimpleTextIn.h @@ -5,44 +5,38 @@ terminal. 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__ #define __SIMPLE_TEXT_IN_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ { \ 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL; +typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL; /// /// Protocol GUID name defined in EFI1.1. /// -#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID +#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID /// /// Protocol name in EFI1.1 for backward-compatible. /// -typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE; +typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE; /// /// The keystroke information for the key that was pressed. /// typedef struct { - UINT16 ScanCode; - CHAR16 UnicodeChar; + UINT16 ScanCode; + CHAR16 UnicodeChar; } EFI_INPUT_KEY; // @@ -122,14 +116,14 @@ EFI_STATUS /// It is the minimum required protocol for ConsoleIn. /// struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL { - EFI_INPUT_RESET Reset; - EFI_INPUT_READ_KEY ReadKeyStroke; + EFI_INPUT_RESET Reset; + EFI_INPUT_READ_KEY ReadKeyStroke; /// /// Event to use with WaitForEvent() to wait for a key to be available /// - EFI_EVENT WaitForKey; + EFI_EVENT WaitForKey; }; -extern EFI_GUID gEfiSimpleTextInProtocolGuid; +extern EFI_GUID gEfiSimpleTextInProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/SimpleTextInEx.h b/src/include/ipxe/efi/Protocol/SimpleTextInEx.h index 9a9f5ab59..9a93da509 100644 --- a/src/include/ipxe/efi/Protocol/SimpleTextInEx.h +++ b/src/include/ipxe/efi/Protocol/SimpleTextInEx.h @@ -5,28 +5,21 @@ which exposes much more state and modifier information from the input device, also allows one to register a notification for a particular keystroke. - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SIMPLE_TEXT_IN_EX_H__ #define __SIMPLE_TEXT_IN_EX_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/SimpleTextIn.h> #define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \ {0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } } - typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL; /** @@ -59,8 +52,7 @@ EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN BOOLEAN ExtendedVerification -); - + ); /// /// EFI_KEY_TOGGLE_STATE. The toggle states are defined. @@ -76,25 +68,25 @@ typedef struct _EFI_KEY_STATE { /// returned value is valid only if the high /// order bit has been set. /// - UINT32 KeyShiftState; + UINT32 KeyShiftState; /// /// Reflects the current internal state of /// various toggled attributes. The returned /// value is valid only if the high order /// bit has been set. /// - EFI_KEY_TOGGLE_STATE KeyToggleState; + EFI_KEY_TOGGLE_STATE KeyToggleState; } EFI_KEY_STATE; typedef struct { /// /// The EFI scan code and Unicode value returned from the input device. /// - EFI_INPUT_KEY Key; + EFI_INPUT_KEY Key; /// /// The current state of various toggled attributes as well as input modifier values. /// - EFI_KEY_STATE KeyState; + EFI_KEY_STATE KeyState; } EFI_KEY_DATA; // @@ -103,55 +95,55 @@ typedef struct { // // Shift state // -#define EFI_SHIFT_STATE_VALID 0x80000000 -#define EFI_RIGHT_SHIFT_PRESSED 0x00000001 -#define EFI_LEFT_SHIFT_PRESSED 0x00000002 -#define EFI_RIGHT_CONTROL_PRESSED 0x00000004 -#define EFI_LEFT_CONTROL_PRESSED 0x00000008 -#define EFI_RIGHT_ALT_PRESSED 0x00000010 -#define EFI_LEFT_ALT_PRESSED 0x00000020 -#define EFI_RIGHT_LOGO_PRESSED 0x00000040 -#define EFI_LEFT_LOGO_PRESSED 0x00000080 -#define EFI_MENU_KEY_PRESSED 0x00000100 -#define EFI_SYS_REQ_PRESSED 0x00000200 +#define EFI_SHIFT_STATE_VALID 0x80000000 +#define EFI_RIGHT_SHIFT_PRESSED 0x00000001 +#define EFI_LEFT_SHIFT_PRESSED 0x00000002 +#define EFI_RIGHT_CONTROL_PRESSED 0x00000004 +#define EFI_LEFT_CONTROL_PRESSED 0x00000008 +#define EFI_RIGHT_ALT_PRESSED 0x00000010 +#define EFI_LEFT_ALT_PRESSED 0x00000020 +#define EFI_RIGHT_LOGO_PRESSED 0x00000040 +#define EFI_LEFT_LOGO_PRESSED 0x00000080 +#define EFI_MENU_KEY_PRESSED 0x00000100 +#define EFI_SYS_REQ_PRESSED 0x00000200 // // Toggle state // -#define EFI_TOGGLE_STATE_VALID 0x80 -#define EFI_KEY_STATE_EXPOSED 0x40 -#define EFI_SCROLL_LOCK_ACTIVE 0x01 -#define EFI_NUM_LOCK_ACTIVE 0x02 -#define EFI_CAPS_LOCK_ACTIVE 0x04 +#define EFI_TOGGLE_STATE_VALID 0x80 +#define EFI_KEY_STATE_EXPOSED 0x40 +#define EFI_SCROLL_LOCK_ACTIVE 0x01 +#define EFI_NUM_LOCK_ACTIVE 0x02 +#define EFI_CAPS_LOCK_ACTIVE 0x04 // // EFI Scan codes // -#define SCAN_F11 0x0015 -#define SCAN_F12 0x0016 -#define SCAN_PAUSE 0x0048 -#define SCAN_F13 0x0068 -#define SCAN_F14 0x0069 -#define SCAN_F15 0x006A -#define SCAN_F16 0x006B -#define SCAN_F17 0x006C -#define SCAN_F18 0x006D -#define SCAN_F19 0x006E -#define SCAN_F20 0x006F -#define SCAN_F21 0x0070 -#define SCAN_F22 0x0071 -#define SCAN_F23 0x0072 -#define SCAN_F24 0x0073 -#define SCAN_MUTE 0x007F -#define SCAN_VOLUME_UP 0x0080 -#define SCAN_VOLUME_DOWN 0x0081 -#define SCAN_BRIGHTNESS_UP 0x0100 -#define SCAN_BRIGHTNESS_DOWN 0x0101 -#define SCAN_SUSPEND 0x0102 -#define SCAN_HIBERNATE 0x0103 -#define SCAN_TOGGLE_DISPLAY 0x0104 -#define SCAN_RECOVERY 0x0105 -#define SCAN_EJECT 0x0106 +#define SCAN_F11 0x0015 +#define SCAN_F12 0x0016 +#define SCAN_PAUSE 0x0048 +#define SCAN_F13 0x0068 +#define SCAN_F14 0x0069 +#define SCAN_F15 0x006A +#define SCAN_F16 0x006B +#define SCAN_F17 0x006C +#define SCAN_F18 0x006D +#define SCAN_F19 0x006E +#define SCAN_F20 0x006F +#define SCAN_F21 0x0070 +#define SCAN_F22 0x0071 +#define SCAN_F23 0x0072 +#define SCAN_F24 0x0073 +#define SCAN_MUTE 0x007F +#define SCAN_VOLUME_UP 0x0080 +#define SCAN_VOLUME_DOWN 0x0081 +#define SCAN_BRIGHTNESS_UP 0x0100 +#define SCAN_BRIGHTNESS_DOWN 0x0101 +#define SCAN_SUSPEND 0x0102 +#define SCAN_HIBERNATE 0x0103 +#define SCAN_TOGGLE_DISPLAY 0x0104 +#define SCAN_RECOVERY 0x0105 +#define SCAN_EJECT 0x0106 /** The function reads the next keystroke from the input device. If @@ -192,13 +184,10 @@ typedef struct { pressed. - @retval EFI_SUCCESS The keystroke information was - returned. - - @retval EFI_NOT_READY There was no keystroke data available. - EFI_DEVICE_ERROR The keystroke - information was not returned due to - hardware errors. + @retval EFI_SUCCESS The keystroke information was returned. + @retval EFI_NOT_READY There was no keystroke data available. + @retval EFI_DEVICE_ERROR The keystroke information was not returned due to + hardware errors. **/ @@ -207,7 +196,7 @@ EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, OUT EFI_KEY_DATA *KeyData -); + ); /** The SetState() function allows the input device hardware to @@ -234,7 +223,7 @@ EFI_STATUS (EFIAPI *EFI_SET_STATE)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN EFI_KEY_TOGGLE_STATE *KeyToggleState -); + ); /// /// The function will be called when the key sequence is typed specified by KeyData. @@ -243,7 +232,7 @@ typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)( IN EFI_KEY_DATA *KeyData -); + ); /** The RegisterKeystrokeNotify() function registers a function @@ -253,18 +242,19 @@ EFI_STATUS @param KeyData A pointer to a buffer that is filled in with the keystroke information for the key that was - pressed. + pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState + and KeyData.KeyState.KeyShiftState are 0, then any incomplete + keystroke will trigger a notification of the KeyNotificationFunction. - @param KeyNotificationFunction Points to the function to be - called when the key sequence - is typed specified by KeyData. + @param KeyNotificationFunction Points to the function to be called when the key sequence + is typed specified by KeyData. This notification function + should be called at <=TPL_CALLBACK. @param NotifyHandle Points to the unique handle assigned to the registered notification. - @retval EFI_SUCCESS The device state was set - appropriately. + @retval EFI_SUCCESS Key notify was registered successfully. @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures. @@ -277,7 +267,7 @@ EFI_STATUS IN EFI_KEY_DATA *KeyData, IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, OUT VOID **NotifyHandle -); + ); /** The UnregisterKeystrokeNotify() function removes the @@ -288,7 +278,7 @@ EFI_STATUS @param NotificationHandle The handle of the notification function being unregistered. - @retval EFI_SUCCESS The device state was set appropriately. + @retval EFI_SUCCESS Key notify was unregistered successfully. @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid. @@ -299,8 +289,7 @@ EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN VOID *NotificationHandle -); - + ); /// /// The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL is used on the ConsoleIn @@ -308,20 +297,18 @@ EFI_STATUS /// which allows a variety of extended shift state information to be /// returned. /// -struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{ - EFI_INPUT_RESET_EX Reset; - EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx; +struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL { + EFI_INPUT_RESET_EX Reset; + EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx; /// /// Event to use with WaitForEvent() to wait for a key to be available. /// - EFI_EVENT WaitForKeyEx; - EFI_SET_STATE SetState; - EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify; - EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify; + EFI_EVENT WaitForKeyEx; + EFI_SET_STATE SetState; + EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify; + EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify; }; - -extern EFI_GUID gEfiSimpleTextInputExProtocolGuid; +extern EFI_GUID gEfiSimpleTextInputExProtocolGuid; #endif - diff --git a/src/include/ipxe/efi/Protocol/SimpleTextOut.h b/src/include/ipxe/efi/Protocol/SimpleTextOut.h index 54d38b393..824018822 100644 --- a/src/include/ipxe/efi/Protocol/SimpleTextOut.h +++ b/src/include/ipxe/efi/Protocol/SimpleTextOut.h @@ -6,21 +6,15 @@ 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> -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SIMPLE_TEXT_OUT_H__ #define __SIMPLE_TEXT_OUT_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \ { \ @@ -30,17 +24,17 @@ FILE_LICENCE ( BSD3 ); /// /// Protocol GUID defined in EFI1.1. /// -#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID +#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL; /// /// Backward-compatible with EFI1.1. /// -typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; +typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // -// Define's for required EFI Unicode Box Draw characters +// Defines for required EFI Unicode Box Draw characters // #define BOXDRAW_HORIZONTAL 0x2500 #define BOXDRAW_VERTICAL 0x2502 @@ -92,39 +86,39 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // // EFI Required Geometric Shapes Code Chart // -#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2 -#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba -#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc -#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4 +#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2 +#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba +#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc +#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4 // // EFI Required Arrow shapes // -#define ARROW_LEFT 0x2190 -#define ARROW_UP 0x2191 -#define ARROW_RIGHT 0x2192 -#define ARROW_DOWN 0x2193 +#define ARROW_LEFT 0x2190 +#define ARROW_UP 0x2191 +#define ARROW_RIGHT 0x2192 +#define ARROW_DOWN 0x2193 // // EFI Console Colours // -#define EFI_BLACK 0x00 -#define EFI_BLUE 0x01 -#define EFI_GREEN 0x02 -#define EFI_CYAN (EFI_BLUE | EFI_GREEN) -#define EFI_RED 0x04 -#define EFI_MAGENTA (EFI_BLUE | EFI_RED) -#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_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT) -#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT) -#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT) -#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT) -#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT) -#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT) -#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT) +#define EFI_BLACK 0x00 +#define EFI_BLUE 0x01 +#define EFI_GREEN 0x02 +#define EFI_CYAN (EFI_BLUE | EFI_GREEN) +#define EFI_RED 0x04 +#define EFI_MAGENTA (EFI_BLUE | EFI_RED) +#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_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT) +#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT) +#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT) +#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT) +#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT) +#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 @@ -137,7 +131,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // // Do not use EFI_BACKGROUND_xxx values with this macro. // -#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4)) +#define EFI_TEXT_ATTR(Foreground, Background) ((Foreground) | ((Background) << 4)) #define EFI_BACKGROUND_BLACK 0x00 #define EFI_BACKGROUND_BLUE 0x10 @@ -159,7 +153,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; #define EFI_WIDE_ATTRIBUTE 0x80 /** - Reset the text output device hardware and optionaly run diagnostics + Reset the text output device hardware and optionally run diagnostics @param This The protocol instance pointer. @param ExtendedVerification Driver may perform more exhaustive verification @@ -358,7 +352,7 @@ typedef struct { /// /// The number of modes supported by QueryMode () and SetMode (). /// - INT32 MaxMode; + INT32 MaxMode; // // current settings @@ -367,23 +361,23 @@ typedef struct { /// /// The text mode of the output device(s). /// - INT32 Mode; + INT32 Mode; /// /// The current character output attribute. /// - INT32 Attribute; + INT32 Attribute; /// /// The cursor's column. /// - INT32 CursorColumn; + INT32 CursorColumn; /// /// The cursor's row. /// - INT32 CursorRow; + INT32 CursorRow; /// - /// The cursor is currently visbile or not. + /// The cursor is currently visible or not. /// - BOOLEAN CursorVisible; + BOOLEAN CursorVisible; } EFI_SIMPLE_TEXT_OUTPUT_MODE; /// @@ -393,25 +387,25 @@ typedef struct { /// devices is at least 80 x 25 characters. /// struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL { - EFI_TEXT_RESET Reset; + EFI_TEXT_RESET Reset; - EFI_TEXT_STRING OutputString; - EFI_TEXT_TEST_STRING TestString; + EFI_TEXT_STRING OutputString; + EFI_TEXT_TEST_STRING TestString; - EFI_TEXT_QUERY_MODE QueryMode; - EFI_TEXT_SET_MODE SetMode; - EFI_TEXT_SET_ATTRIBUTE SetAttribute; + EFI_TEXT_QUERY_MODE QueryMode; + EFI_TEXT_SET_MODE SetMode; + EFI_TEXT_SET_ATTRIBUTE SetAttribute; - EFI_TEXT_CLEAR_SCREEN ClearScreen; - EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; - EFI_TEXT_ENABLE_CURSOR EnableCursor; + EFI_TEXT_CLEAR_SCREEN ClearScreen; + EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; + EFI_TEXT_ENABLE_CURSOR EnableCursor; /// /// Pointer to SIMPLE_TEXT_OUTPUT_MODE data. /// - EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode; + EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode; }; -extern EFI_GUID gEfiSimpleTextOutProtocolGuid; +extern EFI_GUID gEfiSimpleTextOutProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/TcgService.h b/src/include/ipxe/efi/Protocol/TcgService.h index 86c69a84e..d225ae884 100644 --- a/src/include/ipxe/efi/Protocol/TcgService.h +++ b/src/include/ipxe/efi/Protocol/TcgService.h @@ -2,21 +2,15 @@ TCG Service Protocol as defined in TCG_EFI_Protocol_1_22_Final See http://trustedcomputinggroup.org for the latest specification -Copyright (c) 2007 - 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 -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. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _TCG_SERVICE_PROTOCOL_H_ #define _TCG_SERVICE_PROTOCOL_H_ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/IndustryStandard/UefiTcgPlatform.h> @@ -26,10 +20,10 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL; typedef struct { - UINT8 Major; - UINT8 Minor; - UINT8 RevMajor; - UINT8 RevMinor; + UINT8 Major; + UINT8 Minor; + UINT8 RevMajor; + UINT8 RevMinor; } TCG_VERSION; typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY { @@ -42,7 +36,7 @@ typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY { BOOLEAN TPMDeactivatedFlag; /// 01h = TPM currently deactivated. } TCG_EFI_BOOT_SERVICE_CAPABILITY; -typedef UINT32 TCG_ALGORITHM_ID; +typedef UINT32 TCG_ALGORITHM_ID; /** This service provides EFI protocol capability information, state information @@ -70,7 +64,7 @@ EFI_STATUS (EFIAPI *EFI_TCG_STATUS_CHECK)( IN EFI_TCG_PROTOCOL *This, OUT TCG_EFI_BOOT_SERVICE_CAPABILITY - *ProtocolCapability, + *ProtocolCapability, OUT UINT32 *TCGFeatureFlags, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry @@ -184,20 +178,20 @@ EFI_STATUS IN TCG_ALGORITHM_ID AlgorithmId, IN OUT TCG_PCR_EVENT *TCGLogData, IN OUT UINT32 *EventNumber, - OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry + OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry ); /// /// The EFI_TCG Protocol abstracts TCG activity. /// struct _EFI_TCG_PROTOCOL { - EFI_TCG_STATUS_CHECK StatusCheck; - EFI_TCG_HASH_ALL HashAll; - EFI_TCG_LOG_EVENT LogEvent; - EFI_TCG_PASS_THROUGH_TO_TPM PassThroughToTpm; - EFI_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; + EFI_TCG_STATUS_CHECK StatusCheck; + EFI_TCG_HASH_ALL HashAll; + EFI_TCG_LOG_EVENT LogEvent; + EFI_TCG_PASS_THROUGH_TO_TPM PassThroughToTpm; + EFI_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; }; -extern EFI_GUID gEfiTcgProtocolGuid; +extern EFI_GUID gEfiTcgProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/Tcp4.h b/src/include/ipxe/efi/Protocol/Tcp4.h index 1771bc55f..249f1fe0c 100644 --- a/src/include/ipxe/efi/Protocol/Tcp4.h +++ b/src/include/ipxe/efi/Protocol/Tcp4.h @@ -4,14 +4,8 @@ and destroy child of the driver to communicate with other host using TCP protocol. The EFI TCPv4 Protocol provides services to send and receive data stream. -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 -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.0. @@ -21,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_TCP4_PROTOCOL_H__ #define __EFI_TCP4_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/Ip4.h> @@ -42,11 +36,11 @@ typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL; /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE InstanceHandle; - EFI_IPv4_ADDRESS LocalAddress; - UINT16 LocalPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; + EFI_HANDLE InstanceHandle; + EFI_IPv4_ADDRESS LocalAddress; + UINT16 LocalPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; } EFI_TCP4_SERVICE_POINT; /// @@ -54,77 +48,77 @@ typedef struct { /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE DriverHandle; - UINT32 ServiceCount; - EFI_TCP4_SERVICE_POINT Services[1]; + EFI_HANDLE DriverHandle; + UINT32 ServiceCount; + EFI_TCP4_SERVICE_POINT Services[1]; } EFI_TCP4_VARIABLE_DATA; typedef struct { - BOOLEAN UseDefaultAddress; - EFI_IPv4_ADDRESS StationAddress; - EFI_IPv4_ADDRESS SubnetMask; - UINT16 StationPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; - BOOLEAN ActiveFlag; + BOOLEAN UseDefaultAddress; + EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS SubnetMask; + UINT16 StationPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; + BOOLEAN ActiveFlag; } EFI_TCP4_ACCESS_POINT; typedef struct { - UINT32 ReceiveBufferSize; - UINT32 SendBufferSize; - UINT32 MaxSynBackLog; - UINT32 ConnectionTimeout; - UINT32 DataRetries; - UINT32 FinTimeout; - UINT32 TimeWaitTimeout; - UINT32 KeepAliveProbes; - UINT32 KeepAliveTime; - UINT32 KeepAliveInterval; - BOOLEAN EnableNagle; - BOOLEAN EnableTimeStamp; - BOOLEAN EnableWindowScaling; - BOOLEAN EnableSelectiveAck; - BOOLEAN EnablePathMtuDiscovery; + UINT32 ReceiveBufferSize; + UINT32 SendBufferSize; + UINT32 MaxSynBackLog; + UINT32 ConnectionTimeout; + UINT32 DataRetries; + UINT32 FinTimeout; + UINT32 TimeWaitTimeout; + UINT32 KeepAliveProbes; + UINT32 KeepAliveTime; + UINT32 KeepAliveInterval; + BOOLEAN EnableNagle; + BOOLEAN EnableTimeStamp; + BOOLEAN EnableWindowScaling; + BOOLEAN EnableSelectiveAck; + BOOLEAN EnablePathMtuDiscovery; } EFI_TCP4_OPTION; typedef struct { // // I/O parameters // - UINT8 TypeOfService; - UINT8 TimeToLive; + UINT8 TypeOfService; + UINT8 TimeToLive; // // Access Point // - EFI_TCP4_ACCESS_POINT AccessPoint; + EFI_TCP4_ACCESS_POINT AccessPoint; // // TCP Control Options // - EFI_TCP4_OPTION *ControlOption; + EFI_TCP4_OPTION *ControlOption; } EFI_TCP4_CONFIG_DATA; /// /// TCP4 connnection state /// typedef enum { - Tcp4StateClosed = 0, - Tcp4StateListen = 1, - Tcp4StateSynSent = 2, - Tcp4StateSynReceived = 3, - Tcp4StateEstablished = 4, - Tcp4StateFinWait1 = 5, - Tcp4StateFinWait2 = 6, - Tcp4StateClosing = 7, - Tcp4StateTimeWait = 8, - Tcp4StateCloseWait = 9, - Tcp4StateLastAck = 10 + Tcp4StateClosed = 0, + Tcp4StateListen = 1, + Tcp4StateSynSent = 2, + Tcp4StateSynReceived = 3, + Tcp4StateEstablished = 4, + Tcp4StateFinWait1 = 5, + Tcp4StateFinWait2 = 6, + Tcp4StateClosing = 7, + Tcp4StateTimeWait = 8, + Tcp4StateCloseWait = 9, + Tcp4StateLastAck = 10 } EFI_TCP4_CONNECTION_STATE; typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; + EFI_EVENT Event; + EFI_STATUS Status; } EFI_TCP4_COMPLETION_TOKEN; typedef struct { @@ -154,17 +148,17 @@ typedef struct { /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// EFI_NO_MEDIA: There was a media error. /// - EFI_TCP4_COMPLETION_TOKEN CompletionToken; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; } EFI_TCP4_CONNECTION_TOKEN; typedef struct { - EFI_TCP4_COMPLETION_TOKEN CompletionToken; - EFI_HANDLE NewChildHandle; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; + EFI_HANDLE NewChildHandle; } EFI_TCP4_LISTEN_TOKEN; typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_TCP4_FRAGMENT_DATA; typedef struct { @@ -210,22 +204,22 @@ typedef struct { /// EFI_DEVICE_ERROR: An unexpected system or network error occurs. /// EFI_NO_MEDIA: There was a media error. /// - EFI_TCP4_COMPLETION_TOKEN CompletionToken; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; union { /// /// When this token is used for receiving, RxData is a pointer to EFI_TCP4_RECEIVE_DATA. /// - EFI_TCP4_RECEIVE_DATA *RxData; + EFI_TCP4_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA. /// - EFI_TCP4_TRANSMIT_DATA *TxData; + EFI_TCP4_TRANSMIT_DATA *TxData; } Packet; } EFI_TCP4_IO_TOKEN; typedef struct { - EFI_TCP4_COMPLETION_TOKEN CompletionToken; - BOOLEAN AbortOnClose; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; + BOOLEAN AbortOnClose; } EFI_TCP4_CLOSE_TOKEN; // @@ -289,7 +283,6 @@ EFI_STATUS IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL ); - /** Add or delete a route entry to the route table @@ -361,7 +354,6 @@ EFI_STATUS IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken ); - /** Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation. @@ -428,7 +420,6 @@ EFI_STATUS IN EFI_TCP4_IO_TOKEN *Token ); - /** Places an asynchronous receive request into the receiving queue. @@ -533,7 +524,6 @@ EFI_STATUS IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL ); - /** Poll to receive incoming data and transmit outgoing segments. @@ -561,19 +551,19 @@ EFI_STATUS /// such as the routing table. /// struct _EFI_TCP4_PROTOCOL { - EFI_TCP4_GET_MODE_DATA GetModeData; - EFI_TCP4_CONFIGURE Configure; - EFI_TCP4_ROUTES Routes; - EFI_TCP4_CONNECT Connect; - EFI_TCP4_ACCEPT Accept; - EFI_TCP4_TRANSMIT Transmit; - EFI_TCP4_RECEIVE Receive; - EFI_TCP4_CLOSE Close; - EFI_TCP4_CANCEL Cancel; - EFI_TCP4_POLL Poll; + EFI_TCP4_GET_MODE_DATA GetModeData; + EFI_TCP4_CONFIGURE Configure; + EFI_TCP4_ROUTES Routes; + EFI_TCP4_CONNECT Connect; + EFI_TCP4_ACCEPT Accept; + EFI_TCP4_TRANSMIT Transmit; + EFI_TCP4_RECEIVE Receive; + EFI_TCP4_CLOSE Close; + EFI_TCP4_CANCEL Cancel; + EFI_TCP4_POLL Poll; }; -extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiTcp4ProtocolGuid; +extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiTcp4ProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/Udp4.h b/src/include/ipxe/efi/Protocol/Udp4.h index 3c61db8c2..dc0586d81 100644 --- a/src/include/ipxe/efi/Protocol/Udp4.h +++ b/src/include/ipxe/efi/Protocol/Udp4.h @@ -4,14 +4,8 @@ The EFI UDPv4 Protocol provides simple packet-oriented services to transmit and receive UDP packets. -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 -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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.0. @@ -21,11 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_UDP4_PROTOCOL_H__ #define __EFI_UDP4_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/Ip4.h> // -//GUID definitions +// GUID definitions // #define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \ { \ @@ -44,11 +38,11 @@ typedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL; /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE InstanceHandle; - EFI_IPv4_ADDRESS LocalAddress; - UINT16 LocalPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; + EFI_HANDLE InstanceHandle; + EFI_IPv4_ADDRESS LocalAddress; + UINT16 LocalPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; } EFI_UDP4_SERVICE_POINT; /// @@ -56,52 +50,52 @@ typedef struct { /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE DriverHandle; - UINT32 ServiceCount; - EFI_UDP4_SERVICE_POINT Services[1]; + EFI_HANDLE DriverHandle; + UINT32 ServiceCount; + EFI_UDP4_SERVICE_POINT Services[1]; } EFI_UDP4_VARIABLE_DATA; typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_UDP4_FRAGMENT_DATA; typedef struct { - EFI_IPv4_ADDRESS SourceAddress; - UINT16 SourcePort; - EFI_IPv4_ADDRESS DestinationAddress; - UINT16 DestinationPort; + EFI_IPv4_ADDRESS SourceAddress; + UINT16 SourcePort; + EFI_IPv4_ADDRESS DestinationAddress; + UINT16 DestinationPort; } EFI_UDP4_SESSION_DATA; typedef struct { // // Receiving Filters // - BOOLEAN AcceptBroadcast; - BOOLEAN AcceptPromiscuous; - BOOLEAN AcceptAnyPort; - BOOLEAN AllowDuplicatePort; + BOOLEAN AcceptBroadcast; + BOOLEAN AcceptPromiscuous; + BOOLEAN AcceptAnyPort; + BOOLEAN AllowDuplicatePort; // // I/O parameters // - UINT8 TypeOfService; - UINT8 TimeToLive; - BOOLEAN DoNotFragment; - UINT32 ReceiveTimeout; - UINT32 TransmitTimeout; + UINT8 TypeOfService; + UINT8 TimeToLive; + BOOLEAN DoNotFragment; + UINT32 ReceiveTimeout; + UINT32 TransmitTimeout; // // Access Point // - BOOLEAN UseDefaultAddress; - EFI_IPv4_ADDRESS StationAddress; - EFI_IPv4_ADDRESS SubnetMask; - UINT16 StationPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; + BOOLEAN UseDefaultAddress; + EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS SubnetMask; + UINT16 StationPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; } EFI_UDP4_CONFIG_DATA; typedef struct { - EFI_UDP4_SESSION_DATA *UdpSessionData; //OPTIONAL - EFI_IPv4_ADDRESS *GatewayAddress; //OPTIONAL + EFI_UDP4_SESSION_DATA *UdpSessionData; // OPTIONAL + EFI_IPv4_ADDRESS *GatewayAddress; // OPTIONAL UINT32 DataLength; UINT32 FragmentCount; EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; @@ -116,13 +110,12 @@ typedef struct { EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; } EFI_UDP4_RECEIVE_DATA; - typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; + EFI_EVENT Event; + EFI_STATUS Status; union { - EFI_UDP4_RECEIVE_DATA *RxData; - EFI_UDP4_TRANSMIT_DATA *TxData; + EFI_UDP4_RECEIVE_DATA *RxData; + EFI_UDP4_TRANSMIT_DATA *TxData; } Packet; } EFI_UDP4_COMPLETION_TOKEN; @@ -156,7 +149,6 @@ EFI_STATUS OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL ); - /** Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 Protocol. @@ -431,17 +423,17 @@ EFI_STATUS /// such as the routing table and group table, which are independent from each other. /// struct _EFI_UDP4_PROTOCOL { - EFI_UDP4_GET_MODE_DATA GetModeData; - EFI_UDP4_CONFIGURE Configure; - EFI_UDP4_GROUPS Groups; - EFI_UDP4_ROUTES Routes; - EFI_UDP4_TRANSMIT Transmit; - EFI_UDP4_RECEIVE Receive; - EFI_UDP4_CANCEL Cancel; - EFI_UDP4_POLL Poll; + EFI_UDP4_GET_MODE_DATA GetModeData; + EFI_UDP4_CONFIGURE Configure; + EFI_UDP4_GROUPS Groups; + EFI_UDP4_ROUTES Routes; + EFI_UDP4_TRANSMIT Transmit; + EFI_UDP4_RECEIVE Receive; + EFI_UDP4_CANCEL Cancel; + EFI_UDP4_POLL Poll; }; -extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiUdp4ProtocolGuid; +extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiUdp4ProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/UgaDraw.h b/src/include/ipxe/efi/Protocol/UgaDraw.h index 565020688..c268bd2d2 100644 --- a/src/include/ipxe/efi/Protocol/UgaDraw.h +++ b/src/include/ipxe/efi/Protocol/UgaDraw.h @@ -3,22 +3,15 @@ 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __UGA_DRAW_H__ #define __UGA_DRAW_H__ -FILE_LICENCE ( BSD3 ); - +FILE_LICENCE ( BSD2_PATENT ); #define EFI_UGA_DRAW_PROTOCOL_GUID \ { \ @@ -75,15 +68,15 @@ EFI_STATUS ); typedef struct { - UINT8 Blue; - UINT8 Green; - UINT8 Red; - UINT8 Reserved; + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; } EFI_UGA_PIXEL; typedef union { - EFI_UGA_PIXEL Pixel; - UINT32 Raw; + EFI_UGA_PIXEL Pixel; + UINT32 Raw; } EFI_UGA_PIXEL_UNION; /// @@ -135,14 +128,14 @@ typedef enum { @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. + @retval EFI_DEVICE_ERROR - A hardware error occurred 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_DRAW_PROTOCOL *This, + IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, IN EFI_UGA_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, @@ -158,11 +151,11 @@ EFI_STATUS /// 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; + EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode; + EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode; + EFI_UGA_DRAW_PROTOCOL_BLT Blt; }; -extern EFI_GUID gEfiUgaDrawProtocolGuid; +extern EFI_GUID gEfiUgaDrawProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/UnicodeCollation.h b/src/include/ipxe/efi/Protocol/UnicodeCollation.h index 870428c2b..f708624ee 100644 --- a/src/include/ipxe/efi/Protocol/UnicodeCollation.h +++ b/src/include/ipxe/efi/Protocol/UnicodeCollation.h @@ -3,21 +3,15 @@ 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. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __UNICODE_COLLATION_H__ #define __UNICODE_COLLATION_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #define EFI_UNICODE_COLLATION_PROTOCOL_GUID \ { \ @@ -29,27 +23,27 @@ FILE_LICENCE ( BSD3 ); 0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 } \ } -typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL; - +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 +#define UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL_GUID /// /// Protocol defined in EFI1.1. /// -typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE; +typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE; /// /// Protocol data structures and defines /// -#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff) +#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff) // // Protocol member functions // + /** Performs a case-insensitive comparison of two Null-terminated strings. @@ -169,26 +163,26 @@ BOOLEAN /// 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; + 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; + 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; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiUnicodeCollationProtocolGuid; -extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid; +extern EFI_GUID gEfiUnicodeCollationProtocolGuid; +extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/Usb2HostController.h b/src/include/ipxe/efi/Protocol/Usb2HostController.h index 8308e8f1b..657918d44 100644 --- a/src/include/ipxe/efi/Protocol/Usb2HostController.h +++ b/src/include/ipxe/efi/Protocol/Usb2HostController.h @@ -4,21 +4,15 @@ 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _USB2_HOSTCONTROLLER_H_ #define _USB2_HOSTCONTROLLER_H_ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/UsbIo.h> @@ -32,35 +26,33 @@ FILE_LICENCE ( BSD3 ); /// 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. + 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 +#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 - +#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 @@ -80,14 +72,14 @@ typedef enum { 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. +#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. + UINT8 TranslatorHubAddress; ///< device address + UINT8 TranslatorPortNumber; ///< the port number of the hub that device is connected to. } EFI_USB2_HC_TRANSACTION_TRANSLATOR; // @@ -122,6 +114,7 @@ EFI_STATUS #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. @@ -200,7 +193,7 @@ 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. @@ -266,7 +259,7 @@ EFI_STATUS OUT UINT32 *TransferResult ); -#define EFI_USB_MAX_BULK_BUFFER_NUM 10 +#define EFI_USB_MAX_BULK_BUFFER_NUM 10 /** Submits bulk transfer to a bulk endpoint of a USB device. @@ -409,8 +402,8 @@ EFI_STATUS OUT UINT32 *TransferResult ); -#define EFI_USB_MAX_ISO_BUFFER_NUM 7 -#define EFI_USB_MAX_ISO_BUFFER_NUM1 2 +#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. @@ -632,35 +625,35 @@ EFI_STATUS /// 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; + 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; + 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; + UINT16 MinorRevision; }; -extern EFI_GUID gEfiUsb2HcProtocolGuid; +extern EFI_GUID gEfiUsb2HcProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/UsbHostController.h b/src/include/ipxe/efi/Protocol/UsbHostController.h index a29088c6f..5336f00b3 100644 --- a/src/include/ipxe/efi/Protocol/UsbHostController.h +++ b/src/include/ipxe/efi/Protocol/UsbHostController.h @@ -5,21 +5,15 @@ 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _USB_HOSTCONTROLLER_H_ #define _USB_HOSTCONTROLLER_H_ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Protocol/Usb2HostController.h> @@ -469,7 +463,6 @@ EFI_STATUS 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 @@ -478,33 +471,33 @@ EFI_STATUS /// 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; + 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; + 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; + UINT16 MinorRevision; }; -extern EFI_GUID gEfiUsbHcProtocolGuid; +extern EFI_GUID gEfiUsbHcProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/UsbIo.h b/src/include/ipxe/efi/Protocol/UsbIo.h index b8d33ee0c..d5f02bb17 100644 --- a/src/include/ipxe/efi/Protocol/UsbIo.h +++ b/src/include/ipxe/efi/Protocol/UsbIo.h @@ -5,21 +5,15 @@ 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __USB_IO_H__ #define __USB_IO_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/IndustryStandard/Usb.h> @@ -31,7 +25,7 @@ FILE_LICENCE ( BSD3 ); 0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \ } -typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL; +typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL; // // Related Definition for EFI USB I/O protocol @@ -40,11 +34,11 @@ typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_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; +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 @@ -58,16 +52,16 @@ typedef enum { // // 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 +#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. @@ -96,7 +90,6 @@ EFI_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. @@ -114,7 +107,7 @@ EFI_STATUS @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_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval EFI_TIMEOUT The control transfer fails due to timeout. @@ -157,7 +150,7 @@ EFI_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_INVALID_PARAMETER 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. @@ -486,29 +479,29 @@ 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; + 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; + 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; + EFI_USB_IO_PORT_RESET UsbPortReset; }; -extern EFI_GUID gEfiUsbIoProtocolGuid; +extern EFI_GUID gEfiUsbIoProtocolGuid; #endif diff --git a/src/include/ipxe/efi/Protocol/VlanConfig.h b/src/include/ipxe/efi/Protocol/VlanConfig.h index 928faded2..79b6bc463 100644 --- a/src/include/ipxe/efi/Protocol/VlanConfig.h +++ b/src/include/ipxe/efi/Protocol/VlanConfig.h @@ -1,14 +1,8 @@ /** @file EFI VLAN Config protocol is to provide manageability interface for VLAN configuration. - Copyright (c) 2009, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: This Protocol is introduced in UEFI Specification 2.2 @@ -18,8 +12,7 @@ #ifndef __EFI_VLANCONFIG_PROTOCOL_H__ #define __EFI_VLANCONFIG_PROTOCOL_H__ -FILE_LICENCE ( BSD3 ); - +FILE_LICENCE ( BSD2_PATENT ); #define EFI_VLAN_CONFIG_PROTOCOL_GUID \ { \ @@ -28,16 +21,14 @@ FILE_LICENCE ( BSD3 ); typedef struct _EFI_VLAN_CONFIG_PROTOCOL EFI_VLAN_CONFIG_PROTOCOL; - /// /// EFI_VLAN_FIND_DATA /// typedef struct { - UINT16 VlanId; ///< Vlan Identifier. - UINT8 Priority; ///< Priority of this VLAN. + UINT16 VlanId; ///< Vlan Identifier. + UINT8 Priority; ///< Priority of this VLAN. } EFI_VLAN_FIND_DATA; - /** Create a VLAN device or modify the configuration parameter of an already-configured VLAN. @@ -135,11 +126,11 @@ EFI_STATUS /// VLAN tagging implementation is IEEE802.1Q. /// struct _EFI_VLAN_CONFIG_PROTOCOL { - EFI_VLAN_CONFIG_SET Set; - EFI_VLAN_CONFIG_FIND Find; - EFI_VLAN_CONFIG_REMOVE Remove; + EFI_VLAN_CONFIG_SET Set; + EFI_VLAN_CONFIG_FIND Find; + EFI_VLAN_CONFIG_REMOVE Remove; }; -extern EFI_GUID gEfiVlanConfigProtocolGuid; +extern EFI_GUID gEfiVlanConfigProtocolGuid; #endif |