diff options
Diffstat (limited to 'qemu/roms/ipxe/src/include/ipxe/efi/Protocol')
38 files changed, 0 insertions, 13522 deletions
diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Arp.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Arp.h deleted file mode 100644 index 80921f9a0..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Arp.h +++ /dev/null @@ -1,387 +0,0 @@ -/** @file - EFI ARP Protocol Definition - - The EFI ARP Service Binding Protocol is used to locate EFI - ARP Protocol drivers to create and destroy child of the - driver to communicate with other host using ARP protocol. - 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. - - @par Revision Reference: - This Protocol was introduced in UEFI Specification 2.0. - -**/ - -#ifndef __EFI_ARP_PROTOCOL_H__ -#define __EFI_ARP_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0xf44c00ee, 0x1f2c, 0x4a00, {0xaa, 0x9, 0x1c, 0x9f, 0x3e, 0x8, 0x0, 0xa3 } \ - } - -#define EFI_ARP_PROTOCOL_GUID \ - { \ - 0xf4b427bb, 0xba21, 0x4f16, {0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c } \ - } - -typedef struct _EFI_ARP_PROTOCOL EFI_ARP_PROTOCOL; - -typedef struct { - /// - /// Length in bytes of this entry. - /// - UINT32 Size; - - /// - /// Set to TRUE if this entry is a "deny" entry. - /// Set to FALSE if this entry is a "normal" entry. - /// - BOOLEAN DenyFlag; - - /// - /// Set to TRUE if this entry will not time out. - /// Set to FALSE if this entry will time out. - /// - BOOLEAN StaticFlag; - - /// - /// 16-bit ARP hardware identifier number. - /// - UINT16 HwAddressType; - - /// - /// 16-bit protocol type number. - /// - UINT16 SwAddressType; - - /// - /// The length of the hardware address. - /// - UINT8 HwAddressLength; - - /// - /// The length of the protocol address. - /// - UINT8 SwAddressLength; -} EFI_ARP_FIND_DATA; - -typedef struct { - /// - /// 16-bit protocol type number in host byte order. - /// - UINT16 SwAddressType; - - /// - /// The length in bytes of the station's protocol address to register. - /// - UINT8 SwAddressLength; - - /// - /// The pointer to the first byte of the protocol address to register. For - /// example, if SwAddressType is 0x0800 (IP), then - /// StationAddress points to the first byte of this station's IP - /// address stored in network byte order. - /// - 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; - - /// - /// The number of retries before a MAC address is resolved. If it is - /// set to zero, the value is implementation-specific. - /// - 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; -} EFI_ARP_CONFIG_DATA; - - -/** - This function is used to assign a station address to the ARP cache for this instance - of the ARP driver. - - Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will - respond to ARP requests that match this registered station address. A call to - this function with the ConfigData field set to NULL will reset this ARP instance. - - Once a protocol type and station address have been assigned to this ARP instance, - all the following ARP functions will use this information. Attempting to change - the protocol type or station address to a configured ARP instance will result in errors. - - @param This The pointer to the EFI_ARP_PROTOCOL instance. - @param ConfigData The pointer to the EFI_ARP_CONFIG_DATA structure. - - @retval EFI_SUCCESS The new station address was successfully - registered. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - * This is NULL. - * SwAddressLength is zero when ConfigData is not NULL. - * StationAddress is NULL when ConfigData is not NULL. - @retval EFI_ACCESS_DENIED The SwAddressType, SwAddressLength, or - StationAddress is different from the one that is - already registered. - @retval EFI_OUT_OF_RESOURCES Storage for the new StationAddress could not be - allocated. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_CONFIGURE)( - IN EFI_ARP_PROTOCOL *This, - IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL - ); - -/** - This function is used to insert entries into the ARP cache. - - ARP cache entries are typically inserted and updated by network protocol drivers - as network traffic is processed. Most ARP cache entries will time out and be - deleted if the network traffic stops. ARP cache entries that were inserted - by the Add() function may be static (will not time out) or dynamic (will time out). - Default ARP cache timeout values are not covered in most network protocol - specifications (although RFC 1122 comes pretty close) and will only be - discussed in general terms in this specification. The timeout values that are - used in the EFI Sample Implementation should be used only as a guideline. - Final product implementations of the EFI network stack should be tuned for - their expected network environments. - - @param This Pointer to the EFI_ARP_PROTOCOL instance. - @param DenyFlag Set to TRUE if this entry is a deny entry. Set to - FALSE if this entry is a normal entry. - @param TargetSwAddress Pointer to a protocol address to add (or deny). - May be set to NULL if DenyFlag is TRUE. - @param TargetHwAddress Pointer to a hardware address to add (or deny). - May be set to NULL if DenyFlag is TRUE. - @param TimeoutValue Time in 100-ns units that this entry will remain - in the ARP cache. A value of zero means that the - entry is permanent. A nonzero value will override - the one given by Configure() if the entry to be - added is a dynamic entry. - @param Overwrite If TRUE, the matching cache entry will be - overwritten with the supplied parameters. If - FALSE, EFI_ACCESS_DENIED is returned if the - corresponding cache entry already exists. - - @retval EFI_SUCCESS The entry has been added or updated. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - * This is NULL. - * DenyFlag is FALSE and TargetHwAddress is NULL. - * DenyFlag is FALSE and TargetSwAddress is NULL. - * TargetHwAddress is NULL and TargetSwAddress is NULL. - * Neither TargetSwAddress nor TargetHwAddress are NULL when DenyFlag is - TRUE. - @retval EFI_OUT_OF_RESOURCES The new ARP cache entry could not be allocated. - @retval EFI_ACCESS_DENIED The ARP cache entry already exists and Overwrite - is not true. - @retval EFI_NOT_STARTED The ARP driver instance has not been configured. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_ADD)( - IN EFI_ARP_PROTOCOL *This, - IN BOOLEAN DenyFlag, - IN VOID *TargetSwAddress OPTIONAL, - IN VOID *TargetHwAddress OPTIONAL, - IN UINT32 TimeoutValue, - IN BOOLEAN Overwrite - ); - -/** - This function searches the ARP cache for matching entries and allocates a buffer into - which those entries are copied. - - The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which - are protocol address pairs and hardware address pairs. - When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer - is not NULL), the ARP cache timeout for the found entry is reset if Refresh is - set to TRUE. If the found ARP cache entry is a permanent entry, it is not - affected by Refresh. - - @param This The pointer to the EFI_ARP_PROTOCOL instance. - @param BySwAddress Set to TRUE to look for matching software protocol - addresses. Set to FALSE to look for matching - hardware protocol addresses. - @param AddressBuffer The pointer to the address buffer. Set to NULL - to match all addresses. - @param EntryLength The size of an entry in the entries buffer. - @param EntryCount The number of ARP cache entries that are found by - the specified criteria. - @param Entries The pointer to the buffer that will receive the ARP - cache entries. - @param Refresh Set to TRUE to refresh the timeout value of the - matching ARP cache entry. - - @retval EFI_SUCCESS The requested ARP cache entries were copied into - the buffer. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. Both EntryCount and EntryLength are - NULL, when Refresh is FALSE. - @retval EFI_NOT_FOUND No matching entries were found. - @retval EFI_NOT_STARTED The ARP driver instance has not been configured. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_FIND)( - IN EFI_ARP_PROTOCOL *This, - IN BOOLEAN BySwAddress, - IN VOID *AddressBuffer OPTIONAL, - OUT UINT32 *EntryLength OPTIONAL, - OUT UINT32 *EntryCount OPTIONAL, - OUT EFI_ARP_FIND_DATA **Entries OPTIONAL, - IN BOOLEAN Refresh - ); - - -/** - This function removes specified ARP cache entries. - - @param This The pointer to the EFI_ARP_PROTOCOL instance. - @param BySwAddress Set to TRUE to delete matching protocol addresses. - Set to FALSE to delete matching hardware - addresses. - @param AddressBuffer The pointer to the address buffer that is used as a - key to look for the cache entry. Set to NULL to - delete all entries. - - @retval EFI_SUCCESS The entry was removed from the ARP cache. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_FOUND The specified deletion key was not found. - @retval EFI_NOT_STARTED The ARP driver instance has not been configured. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_DELETE)( - IN EFI_ARP_PROTOCOL *This, - IN BOOLEAN BySwAddress, - IN VOID *AddressBuffer OPTIONAL - ); - -/** - This function delete all dynamic entries from the ARP cache that match the specified - software protocol type. - - @param This The pointer to the EFI_ARP_PROTOCOL instance. - - @retval EFI_SUCCESS The cache has been flushed. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_FOUND There are no matching dynamic cache entries. - @retval EFI_NOT_STARTED The ARP driver instance has not been configured. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_FLUSH)( - IN EFI_ARP_PROTOCOL *This - ); - -/** - This function tries to resolve the TargetSwAddress and optionally returns a - TargetHwAddress if it already exists in the ARP cache. - - @param This The pointer to the EFI_ARP_PROTOCOL instance. - @param TargetSwAddress The pointer to the protocol address to resolve. - @param ResolvedEvent The pointer to the event that will be signaled when - the address is resolved or some error occurs. - @param TargetHwAddress The pointer to the buffer for the resolved hardware - address in network byte order. - - @retval EFI_SUCCESS The data is copied from the ARP cache into the - TargetHwAddress buffer. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. TargetHwAddress is NULL. - @retval EFI_ACCESS_DENIED The requested address is not present in the normal - ARP cache but is present in the deny address list. - Outgoing traffic to that address is forbidden. - @retval EFI_NOT_STARTED The ARP driver instance has not been configured. - @retval EFI_NOT_READY The request has been started and is not finished. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_REQUEST)( - IN EFI_ARP_PROTOCOL *This, - IN VOID *TargetSwAddress OPTIONAL, - IN EFI_EVENT ResolvedEvent OPTIONAL, - OUT VOID *TargetHwAddress - ); - -/** - This function aborts the previous ARP request (identified by This, TargetSwAddress - and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request(). - - If the request is in the internal ARP request queue, the request is aborted - immediately and its ResolvedEvent is signaled. Only an asynchronous address - request needs to be canceled. If TargeSwAddress and ResolveEvent are both - NULL, all the pending asynchronous requests that have been issued by This - instance will be cancelled and their corresponding events will be signaled. - - @param This The pointer to the EFI_ARP_PROTOCOL instance. - @param TargetSwAddress The pointer to the protocol address in previous - request session. - @param ResolvedEvent Pointer to the event that is used as the - notification event in previous request session. - - @retval EFI_SUCCESS The pending request session(s) is/are aborted and - corresponding event(s) is/are signaled. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. TargetSwAddress is not NULL and - ResolvedEvent is NULL. TargetSwAddress is NULL and - ResolvedEvent is not NULL. - @retval EFI_NOT_STARTED The ARP driver instance has not been configured. - @retval EFI_NOT_FOUND The request is not issued by - EFI_ARP_PROTOCOL.Request(). - - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_ARP_CANCEL)( - IN EFI_ARP_PROTOCOL *This, - IN VOID *TargetSwAddress OPTIONAL, - IN EFI_EVENT ResolvedEvent OPTIONAL - ); - -/// -/// ARP is used to resolve local network protocol addresses into -/// 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; -}; - - -extern EFI_GUID gEfiArpServiceBindingProtocolGuid; -extern EFI_GUID gEfiArpProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/BlockIo.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/BlockIo.h deleted file mode 100644 index f45154bb1..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/BlockIo.h +++ /dev/null @@ -1,243 +0,0 @@ -/** @file - Block IO protocol as defined in the UEFI 2.0 specification. - - 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. - -**/ - -#ifndef __BLOCK_IO_H__ -#define __BLOCK_IO_H__ - -FILE_LICENCE ( BSD3 ); - -#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; - -/// -/// Protocol GUID name defined in EFI1.1. -/// -#define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID - -/// -/// Protocol defined in EFI1.1. -/// -typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO; - -/** - Reset the Block Device. - - @param This Indicates a pointer to the calling context. - @param ExtendedVerification Driver may perform diagnostics on reset. - - @retval EFI_SUCCESS The device was reset. - @retval EFI_DEVICE_ERROR The device is not functioning properly and could - not be reset. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_BLOCK_RESET)( - IN EFI_BLOCK_IO_PROTOCOL *This, - IN BOOLEAN ExtendedVerification - ); - -/** - Read BufferSize bytes from Lba into Buffer. - - @param This Indicates a pointer to the calling context. - @param MediaId Id of the media, changes every time the media is replaced. - @param Lba The starting Logical Block Address to read from - @param BufferSize Size of Buffer, must be a multiple of device block size. - @param Buffer A pointer to the destination buffer for the data. The caller is - responsible for either having implicit or explicit ownership of the buffer. - - @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while performing the read. - @retval EFI_NO_MEDIA There is no media in the device. - @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. - @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, - or the buffer is not on proper alignment. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_BLOCK_READ)( - IN EFI_BLOCK_IO_PROTOCOL *This, - IN UINT32 MediaId, - IN EFI_LBA Lba, - IN UINTN BufferSize, - OUT VOID *Buffer - ); - -/** - Write BufferSize bytes from Lba into Buffer. - - @param This Indicates a pointer to the calling context. - @param MediaId The media ID that the write request is for. - @param Lba The starting logical block address to be written. The caller is - responsible for writing to only legitimate locations. - @param BufferSize Size of Buffer, must be a multiple of device block size. - @param Buffer A pointer to the source buffer for the data. - - @retval EFI_SUCCESS The data was written correctly to the device. - @retval EFI_WRITE_PROTECTED The device can not be written to. - @retval EFI_DEVICE_ERROR The device reported an error while performing the write. - @retval EFI_NO_MEDIA There is no media in the device. - @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. - @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. - @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, - or the buffer is not on proper alignment. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_BLOCK_WRITE)( - IN EFI_BLOCK_IO_PROTOCOL *This, - IN UINT32 MediaId, - IN EFI_LBA Lba, - IN UINTN BufferSize, - IN VOID *Buffer - ); - -/** - Flush the Block Device. - - @param This Indicates a pointer to the calling context. - - @retval EFI_SUCCESS All outstanding data was written to the device - @retval EFI_DEVICE_ERROR The device reported an error while writting back the data - @retval EFI_NO_MEDIA There is no media in the device. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_BLOCK_FLUSH)( - IN EFI_BLOCK_IO_PROTOCOL *This - ); - -/** - Block IO read only mode data and updated only via members of BlockIO -**/ -typedef struct { - /// - /// The curent media Id. If the media changes, this value is changed. - /// - UINT32 MediaId; - - /// - /// TRUE if the media is removable; otherwise, FALSE. - /// - 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; - - /// - /// 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; - - /// - /// 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; - - /// - /// TRUE if the WriteBlock () function caches write data. - /// - BOOLEAN WriteCaching; - - /// - /// The intrinsic block size of the device. If the media changes, then - /// this field is updated. - /// - UINT32 BlockSize; - - /// - /// Supplies the alignment requirement for any buffer to read or write block(s). - /// - UINT32 IoAlign; - - /// - /// The last logical block address on the device. - /// If the media changes, then this field is updated. - /// - 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; - - /// - /// 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; - - /// - /// 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; -} 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 - -/// -/// Revision defined in EFI1.1. -/// -#define EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION - -/// -/// This protocol provides control over block devices. -/// -struct _EFI_BLOCK_IO_PROTOCOL { - /// - /// The revision to which the block IO interface adheres. All future - /// revisions must be backwards compatible. If a future version is not - /// back wards compatible, it is not the same GUID. - /// - 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; - -}; - -extern EFI_GUID gEfiBlockIoProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h deleted file mode 100644 index be92323fc..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/BusSpecificDriverOverride.h +++ /dev/null @@ -1,74 +0,0 @@ -/** @file - Bus Specific Driver Override protocol as defined in the UEFI 2.0 specification. - - Bus drivers that have a bus specific algorithm for matching drivers to controllers are - required to produce this protocol for each controller. For example, a PCI Bus Driver will produce an - 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. - -**/ - -#ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_ -#define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_ - -FILE_LICENCE ( BSD3 ); - -/// -/// Global ID for the Bus Specific Driver Override Protocol -/// -#define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID \ - { \ - 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; - -// -// Prototypes for the Bus Specific Driver Override Protocol -// - -/** - Uses a bus specific algorithm to retrieve a driver image handle for a controller. - - @param This A pointer to the EFI_BUS_SPECIFIC_DRIVER_ - OVERRIDE_PROTOCOL instance. - @param DriverImageHandle On input, a pointer to the previous driver image handle returned - by GetDriver(). On output, a pointer to the next driver - image handle. Passing in a NULL, will return the first driver - image handle. - - @retval EFI_SUCCESS A bus specific override driver is returned in DriverImageHandle. - @retval EFI_NOT_FOUND The end of the list of override drivers was reached. - A bus specific override driver is not returned in DriverImageHandle. - @retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a - previous call to GetDriver(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER)( - IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This, - IN OUT EFI_HANDLE *DriverImageHandle - ); - -/// -/// This protocol matches one or more drivers to a controller. This protocol is produced by a bus driver, -/// and it is installed on the child handles of buses that require a bus specific algorithm for matching -/// drivers to controllers. -/// -struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL { - EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver; -}; - -extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName.h deleted file mode 100644 index 87b6d61a0..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName.h +++ /dev/null @@ -1,131 +0,0 @@ -/** @file - EFI Component Name Protocol as defined in the EFI 1.1 specification. - 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. - -**/ - -#ifndef __EFI_COMPONENT_NAME_H__ -#define __EFI_COMPONENT_NAME_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// The global ID for the Component Name Protocol. -/// -#define EFI_COMPONENT_NAME_PROTOCOL_GUID \ - { \ - 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ - } - -typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; - - -/** - Retrieves a Unicode string that is the user-readable name of the EFI Driver. - - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. - @param Language A pointer to a three-character ISO 639-2 language identifier. - This is the language of the driver name that that the caller - is requesting, and it must match one of the languages specified - in SupportedLanguages. The number of languages supported by a - driver is up to the driver writer. - @param DriverName A pointer to the Unicode string to return. This Unicode string - is the name of the driver specified by This in the language - specified by Language. - - @retval EFI_SUCCESS The Unicode string for the Driver specified by This - and the language specified by Language was returned - in DriverName. - @retval EFI_INVALID_PARAMETER Language is NULL. - @retval EFI_INVALID_PARAMETER DriverName is NULL. - @retval EFI_UNSUPPORTED The driver specified by This does not support the - language specified by Language. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)( - IN EFI_COMPONENT_NAME_PROTOCOL *This, - IN CHAR8 *Language, - OUT CHAR16 **DriverName - ); - - -/** - Retrieves a Unicode string that is the user readable name of the controller - that is being managed by an EFI Driver. - - @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. - @param ControllerHandle The handle of a controller that the driver specified by - This is managing. This handle specifies the controller - whose name is to be returned. - @param ChildHandle The handle of the child controller to retrieve the name - of. This is an optional parameter that may be NULL. It - will be NULL for device drivers. It will also be NULL - for a bus drivers that wish to retrieve the name of the - bus controller. It will not be NULL for a bus driver - that wishes to retrieve the name of a child controller. - @param Language A pointer to a three character ISO 639-2 language - identifier. This is the language of the controller name - that the caller is requesting, and it must match one - of the languages specified in SupportedLanguages. The - number of languages supported by a driver is up to the - driver writer. - @param ControllerName A pointer to the Unicode string to return. This Unicode - string is the name of the controller specified by - ControllerHandle and ChildHandle in the language specified - by Language, from the point of view of the driver specified - by This. - - @retval EFI_SUCCESS The Unicode string for the user-readable name in the - language specified by Language for the driver - specified by This was returned in DriverName. - @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. - @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. - @retval EFI_INVALID_PARAMETER Language is NULL. - @retval EFI_INVALID_PARAMETER ControllerName is NULL. - @retval EFI_UNSUPPORTED The driver specified by This is not currently managing - the controller specified by ControllerHandle and - ChildHandle. - @retval EFI_UNSUPPORTED The driver specified by This does not support the - language specified by Language. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)( - IN EFI_COMPONENT_NAME_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE ChildHandle OPTIONAL, - IN CHAR8 *Language, - OUT CHAR16 **ControllerName - ); - -/// -/// This protocol is used to retrieve user readable names of drivers -/// 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; - /// - /// 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; -}; - -extern EFI_GUID gEfiComponentNameProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName2.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName2.h deleted file mode 100644 index 82d8b2561..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ComponentName2.h +++ /dev/null @@ -1,174 +0,0 @@ -/** @file - UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification. - 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. - -**/ - -#ifndef __EFI_COMPONENT_NAME2_H__ -#define __EFI_COMPONENT_NAME2_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// Global ID for the Component Name Protocol -/// -#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; - - -/** - Retrieves a string that is the user readable name of - the EFI Driver. - - @param This A pointer to the - EFI_COMPONENT_NAME2_PROTOCOL instance. - - @param Language A pointer to a Null-terminated ASCII string - array indicating the language. This is the - language of the driver name that the caller - is requesting, and it must match one of the - languages specified in SupportedLanguages. - The number of languages supported by a - driver is up to the driver writer. Language - is specified in RFC 4646 language code - format. - - @param DriverName A pointer to the string to return. - This string is the name of the - driver specified by This in the language - specified by Language. - - @retval EFI_SUCCESS The string for the - Driver specified by This and the - language specified by Language - was returned in DriverName. - - @retval EFI_INVALID_PARAMETER Language is NULL. - - @retval EFI_INVALID_PARAMETER DriverName is NULL. - - @retval EFI_UNSUPPORTED The driver specified by This - does not support the language - specified by Language. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)( - IN EFI_COMPONENT_NAME2_PROTOCOL *This, - IN CHAR8 *Language, - OUT CHAR16 **DriverName - ); - - -/** - Retrieves a string that is the user readable name of - the controller that is being managed by an EFI Driver. - - @param This A pointer to the - EFI_COMPONENT_NAME2_PROTOCOL instance. - - @param ControllerHandle The handle of a controller that the - driver specified by This is managing. - This handle specifies the controller - whose name is to be returned. - - @param ChildHandle The handle of the child controller to - retrieve the name of. This is an - optional parameter that may be NULL. - It will be NULL for device drivers. - It will also be NULL for bus - drivers that wish to retrieve the - name of the bus controller. It will - not be NULL for a bus driver that - wishes to retrieve the name of a - child controller. - - @param Language A pointer to a Null-terminated ASCII - string array indicating the language. - This is the language of the driver - name that the caller is requesting, - and it must match one of the - languages specified in - SupportedLanguages. The number of - languages supported by a driver is up - to the driver writer. Language is - specified in RFC 4646 language code - format. - - @param ControllerName A pointer to the string to return. - This string is the name of the controller - specified by ControllerHandle and ChildHandle - in the language specified by Language - from the point of view of the driver - specified by This. - - @retval EFI_SUCCESS The string for the user - readable name in the language - specified by Language for the - driver specified by This was - returned in DriverName. - - @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. - - @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it - is not a valid EFI_HANDLE. - - @retval EFI_INVALID_PARAMETER Language is NULL. - - @retval EFI_INVALID_PARAMETER ControllerName is NULL. - - @retval EFI_UNSUPPORTED The driver specified by This is - not currently managing the - controller specified by - ControllerHandle and - ChildHandle. - - @retval EFI_UNSUPPORTED The driver specified by This - does not support the language - specified by Language. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)( - IN EFI_COMPONENT_NAME2_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE ChildHandle OPTIONAL, - IN CHAR8 *Language, - OUT CHAR16 **ControllerName - ); - -/// -/// This protocol is used to retrieve user readable names of drivers -/// 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; - - /// - /// A Null-terminated ASCII string array that contains one or more - /// supported language codes. This is the list of language codes that - /// this protocol supports. The number of languages supported by a - /// driver is up to the driver writer. SupportedLanguages is - /// specified in RFC 4646 format. - /// - CHAR8 *SupportedLanguages; -}; - -extern EFI_GUID gEfiComponentName2ProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ConsoleControl/ConsoleControl.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ConsoleControl/ConsoleControl.h deleted file mode 100644 index 0bf5799e6..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ConsoleControl/ConsoleControl.h +++ /dev/null @@ -1,124 +0,0 @@ -/*++ - -Copyright (c) 2004 - 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. - -Module Name: - - ConsoleControl.h - -Abstract: - - Abstraction of a Text mode or GOP/UGA screen - ---*/ - -#ifndef __CONSOLE_CONTROL_H__ -#define __CONSOLE_CONTROL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \ - { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} } - -typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL; - - -typedef enum { - EfiConsoleControlScreenText, - EfiConsoleControlScreenGraphics, - EfiConsoleControlScreenMaxValue -} EFI_CONSOLE_CONTROL_SCREEN_MODE; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode, - OUT BOOLEAN *GopUgaExists, OPTIONAL - OUT BOOLEAN *StdInLocked OPTIONAL - ) -/*++ - - Routine Description: - Return the current video mode information. Also returns info about existence - of Graphics Output devices or UGA Draw devices in system, and if the Std In - device is locked. All the arguments are optional and only returned if a non - NULL pointer is passed in. - - Arguments: - This - Protocol instance pointer. - Mode - Are we in text of grahics mode. - GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device - StdInLocked - TRUE if StdIn device is keyboard locked - - Returns: - EFI_SUCCESS - Mode information returned. - ---*/ -; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode - ) -/*++ - - Routine Description: - Set the current mode to either text or graphics. Graphics is - for Quiet Boot. - - Arguments: - This - Protocol instance pointer. - Mode - Mode to set the - - Returns: - EFI_SUCCESS - Mode information returned. - ---*/ -; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - IN CHAR16 *Password - ) -/*++ - - Routine Description: - Lock Std In devices until Password is typed. - - Arguments: - This - Protocol instance pointer. - Password - Password needed to unlock screen. NULL means unlock keyboard - - Returns: - EFI_SUCCESS - Mode information returned. - EFI_DEVICE_ERROR - Std In not locked - ---*/ -; - - - -struct _EFI_CONSOLE_CONTROL_PROTOCOL { - EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode; - EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode; - EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn; -}; - -extern EFI_GUID gEfiConsoleControlProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h deleted file mode 100644 index 665924e88..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Cpu.h +++ /dev/null @@ -1,302 +0,0 @@ -/** @file - CPU Architectural Protocol as defined in PI spec Volume 2 DXE - - This code abstracts the DXE core from processor implementation details. - - Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __ARCH_PROTOCOL_CPU_H__ -#define __ARCH_PROTOCOL_CPU_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Protocol/DebugSupport.h> - -#define EFI_CPU_ARCH_PROTOCOL_GUID \ - { 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } } - -typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL; - -/// -/// The type of flush operation -/// -typedef enum { - EfiCpuFlushTypeWriteBackInvalidate, - EfiCpuFlushTypeWriteBack, - EfiCpuFlushTypeInvalidate, - EfiCpuMaxFlushType -} EFI_CPU_FLUSH_TYPE; - -/// -/// The type of processor INIT. -/// -typedef enum { - EfiCpuInit, - EfiCpuMaxInitType -} EFI_CPU_INIT_TYPE; - -/** - EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs. - - @param InterruptType Defines the type of interrupt or exception that - occurred on the processor.This parameter is processor architecture specific. - @param SystemContext A pointer to the processor context when - the interrupt occurred on the processor. - - @return None - -**/ -typedef -VOID -(EFIAPI *EFI_CPU_INTERRUPT_HANDLER)( - IN CONST EFI_EXCEPTION_TYPE InterruptType, - IN CONST EFI_SYSTEM_CONTEXT SystemContext - ); - -/** - This function flushes the range of addresses from Start to Start+Length - from the processor's data cache. If Start is not aligned to a cache line - boundary, then the bytes before Start to the preceding cache line boundary - are also flushed. If Start+Length is not aligned to a cache line boundary, - then the bytes past Start+Length to the end of the next cache line boundary - are also flushed. The FlushType of EfiCpuFlushTypeWriteBackInvalidate must be - supported. If the data cache is fully coherent with all DMA operations, then - this function can just return EFI_SUCCESS. If the processor does not support - flushing a range of the data cache, then the entire data cache can be flushed. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - @param Start The beginning physical address to flush from the processor's data - cache. - @param Length The number of bytes to flush from the processor's data cache. This - function may flush more bytes than Length specifies depending upon - the granularity of the flush operation that the processor supports. - @param FlushType Specifies the type of flush operation to perform. - - @retval EFI_SUCCESS The address range from Start to Start+Length was flushed from - the processor's data cache. - @retval EFI_UNSUPPORTEDT The processor does not support the cache flush type specified - by FlushType. - @retval EFI_DEVICE_ERROR The address range from Start to Start+Length could not be flushed - from the processor's data cache. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_FLUSH_DATA_CACHE)( - IN EFI_CPU_ARCH_PROTOCOL *This, - IN EFI_PHYSICAL_ADDRESS Start, - IN UINT64 Length, - IN EFI_CPU_FLUSH_TYPE FlushType - ); - - -/** - This function enables interrupt processing by the processor. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - - @retval EFI_SUCCESS Interrupts are enabled on the processor. - @retval EFI_DEVICE_ERROR Interrupts could not be enabled on the processor. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_ENABLE_INTERRUPT)( - IN EFI_CPU_ARCH_PROTOCOL *This - ); - - -/** - This function disables interrupt processing by the processor. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - - @retval EFI_SUCCESS Interrupts are disabled on the processor. - @retval EFI_DEVICE_ERROR Interrupts could not be disabled on the processor. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_DISABLE_INTERRUPT)( - IN EFI_CPU_ARCH_PROTOCOL *This - ); - - -/** - This function retrieves the processor's current interrupt state a returns it in - State. If interrupts are currently enabled, then TRUE is returned. If interrupts - are currently disabled, then FALSE is returned. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - @param State A pointer to the processor's current interrupt state. Set to TRUE if - interrupts are enabled and FALSE if interrupts are disabled. - - @retval EFI_SUCCESS The processor's current interrupt state was returned in State. - @retval EFI_INVALID_PARAMETER State is NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_GET_INTERRUPT_STATE)( - IN EFI_CPU_ARCH_PROTOCOL *This, - OUT BOOLEAN *State - ); - - -/** - This function generates an INIT on the processor. If this function succeeds, then the - processor will be reset, and control will not be returned to the caller. If InitType is - not supported by this processor, or the processor cannot programmatically generate an - INIT without help from external hardware, then EFI_UNSUPPORTED is returned. If an error - occurs attempting to generate an INIT, then EFI_DEVICE_ERROR is returned. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - @param InitType The type of processor INIT to perform. - - @retval EFI_SUCCESS The processor INIT was performed. This return code should never be seen. - @retval EFI_UNSUPPORTED The processor INIT operation specified by InitType is not supported - by this processor. - @retval EFI_DEVICE_ERROR The processor INIT failed. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_INIT)( - IN EFI_CPU_ARCH_PROTOCOL *This, - IN EFI_CPU_INIT_TYPE InitType - ); - - -/** - This function registers and enables the handler specified by InterruptHandler for a processor - interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the - handler for the processor interrupt or exception type specified by InterruptType is uninstalled. - The installed handler is called once for each processor interrupt or exception. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - @param InterruptType A pointer to the processor's current interrupt state. Set to TRUE if interrupts - are enabled and FALSE if interrupts are disabled. - @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called - when a processor interrupt occurs. If this parameter is NULL, then the handler - will be uninstalled. - - @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled. - @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was - previously installed. - @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not - previously installed. - @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_REGISTER_INTERRUPT_HANDLER)( - IN EFI_CPU_ARCH_PROTOCOL *This, - IN EFI_EXCEPTION_TYPE InterruptType, - IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler - ); - - -/** - This function reads the processor timer specified by TimerIndex and returns it in TimerValue. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - @param TimerIndex Specifies which processor timer is to be returned in TimerValue. This parameter - must be between 0 and NumberOfTimers-1. - @param TimerValue Pointer to the returned timer value. - @param TimerPeriod A pointer to the amount of time that passes in femtoseconds for each increment - of TimerValue. If TimerValue does not increment at a predictable rate, then 0 is - returned. This parameter is optional and may be NULL. - - @retval EFI_SUCCESS The processor timer value specified by TimerIndex was returned in TimerValue. - @retval EFI_DEVICE_ERROR An error occurred attempting to read one of the processor's timers. - @retval EFI_INVALID_PARAMETER TimerValue is NULL or TimerIndex is not valid. - @retval EFI_UNSUPPORTED The processor does not have any readable timers. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_GET_TIMER_VALUE)( - IN EFI_CPU_ARCH_PROTOCOL *This, - IN UINT32 TimerIndex, - OUT UINT64 *TimerValue, - OUT UINT64 *TimerPeriod OPTIONAL - ); - - -/** - This function modifies the attributes for the memory region specified by BaseAddress and - Length from their current attributes to the attributes specified by Attributes. - - @param This The EFI_CPU_ARCH_PROTOCOL instance. - @param BaseAddress The physical address that is the start address of a memory region. - @param Length The size in bytes of the memory region. - @param Attributes The bit mask of attributes to set for the memory region. - - @retval EFI_SUCCESS The attributes were set for the memory region. - @retval EFI_ACCESS_DENIED The attributes for the memory resource range specified by - BaseAddress and Length cannot be modified. - @retval EFI_INVALID_PARAMETER Length is zero. - Attributes specified an illegal combination of attributes that - cannot be set together. - @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of - the memory resource range. - @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory - resource range specified by BaseAddress and Length. - The bit mask of attributes is not support for the memory resource - range specified by BaseAddress and Length. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_CPU_SET_MEMORY_ATTRIBUTES)( - IN EFI_CPU_ARCH_PROTOCOL *This, - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT64 Attributes - ); - - -/// -/// The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE -/// Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt -/// vectors and exception vectors, reading internal processor timers, resetting the processor, and -/// determining the processor frequency. -/// -struct _EFI_CPU_ARCH_PROTOCOL { - EFI_CPU_FLUSH_DATA_CACHE FlushDataCache; - EFI_CPU_ENABLE_INTERRUPT EnableInterrupt; - EFI_CPU_DISABLE_INTERRUPT DisableInterrupt; - EFI_CPU_GET_INTERRUPT_STATE GetInterruptState; - EFI_CPU_INIT Init; - EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler; - EFI_CPU_GET_TIMER_VALUE GetTimerValue; - EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes; - /// - /// The number of timers that are available in a processor. The value in this - /// field is a constant that must not be modified after the CPU Architectural - /// Protocol is installed. All consumers must treat this as a read-only field. - /// - UINT32 NumberOfTimers; - /// - /// The size, in bytes, of the alignment required for DMA buffer allocations. - /// This is typically the size of the largest data cache line in the platform. - /// The value in this field is a constant that must not be modified after the - /// CPU Architectural Protocol is installed. All consumers must treat this as - /// a read-only field. - /// - UINT32 DmaBufferAlignment; -}; - -extern EFI_GUID gEfiCpuArchProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DebugSupport.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DebugSupport.h deleted file mode 100644 index e2b4b203a..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DebugSupport.h +++ /dev/null @@ -1,780 +0,0 @@ -/** @file - DebugSupport protocol and supporting definitions as defined in the UEFI2.4 - specification. - - 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> -Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> - -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __DEBUG_SUPPORT_H__ -#define __DEBUG_SUPPORT_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/IndustryStandard/PeImage.h> - -typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL; - -/// -/// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}. -/// -#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \ - { \ - 0x2755590C, 0x6F3C, 0x42FA, {0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \ - } - -/// -/// Processor exception to be hooked. -/// All exception types for IA32, X64, Itanium and EBC processors are defined. -/// -typedef INTN EFI_EXCEPTION_TYPE; - -/// -/// IA-32 processor exception types. -/// -#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]; -} 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; -} 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 - -/// -/// 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]; - // - // NOTE: UEFI 2.0 spec definition as follows. - // - 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; -} 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 -// -// 13 - 19 reserved -// -#define EXCEPT_IPF_PAGE_NOT_PRESENT 20 -#define EXCEPT_IPF_KEY_PERMISSION 21 -#define EXCEPT_IPF_INSTRUCTION_ACCESS_RIGHTS 22 -#define EXCEPT_IPF_DATA_ACCESS_RIGHTS 23 -#define EXCEPT_IPF_GENERAL_EXCEPTION 24 -#define EXCEPT_IPF_DISABLED_FP_REGISTER 25 -#define EXCEPT_IPF_NAT_CONSUMPTION 26 -#define EXCEPT_IPF_SPECULATION 27 -// -// 28 reserved -// -#define EXCEPT_IPF_DEBUG 29 -#define EXCEPT_IPF_UNALIGNED_REFERENCE 30 -#define EXCEPT_IPF_UNSUPPORTED_DATA_REFERENCE 31 -#define EXCEPT_IPF_FP_FAULT 32 -#define EXCEPT_IPF_FP_TRAP 33 -#define EXCEPT_IPF_LOWER_PRIVILEGE_TRANSFER_TRAP 34 -#define EXCEPT_IPF_TAKEN_BRANCH 35 -#define EXCEPT_IPF_SINGLE_STEP 36 -// -// 37 - 44 reserved -// -#define EXCEPT_IPF_IA32_EXCEPTION 45 -#define EXCEPT_IPF_IA32_INTERCEPT 46 -#define EXCEPT_IPF_IA32_INTERRUPT 47 - -/// -/// IPF processor context definition. -/// -typedef struct { - // - // The first reserved field is necessary to preserve alignment for the correct - // bits in UNAT and to insure F2 is 16 byte aligned. - // - 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 ArFcr; - - UINT64 ArEflag; - UINT64 ArCsd; - UINT64 ArSsd; - UINT64 ArCflg; - UINT64 ArFsr; - UINT64 ArFir; - UINT64 ArFdr; - - UINT64 ArCcv; - - UINT64 ArUnat; - - UINT64 ArFpsr; - - 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; - - // - // 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; - - // - // virtual registers - nat bits for R1-R31 - // - 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. -/// -/// For coding convenience, define the maximum valid EBC exception. -/// -#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; -} EFI_SYSTEM_CONTEXT_EBC; - - - -/// -/// ARM processor exception types. -/// -#define EXCEPT_ARM_RESET 0 -#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1 -#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2 -#define EXCEPT_ARM_PREFETCH_ABORT 3 -#define EXCEPT_ARM_DATA_ABORT 4 -#define EXCEPT_ARM_RESERVED 5 -#define EXCEPT_ARM_IRQ 6 -#define EXCEPT_ARM_FIQ 7 - -/// -/// For coding convenience, define the maximum valid ARM exception. -/// -#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ - -/// -/// ARM processor context definition. -/// -typedef struct { - UINT32 R0; - UINT32 R1; - UINT32 R2; - UINT32 R3; - UINT32 R4; - UINT32 R5; - UINT32 R6; - UINT32 R7; - UINT32 R8; - UINT32 R9; - UINT32 R10; - UINT32 R11; - UINT32 R12; - UINT32 SP; - UINT32 LR; - UINT32 PC; - UINT32 CPSR; - UINT32 DFSR; - UINT32 DFAR; - UINT32 IFSR; - UINT32 IFAR; -} EFI_SYSTEM_CONTEXT_ARM; - - -/// -/// 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 - -/// -/// For coding convenience, define the maximum valid ARM exception. -/// -#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 - - // 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 -} EFI_SYSTEM_CONTEXT_AARCH64; - - -/// -/// 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; - -// -// DebugSupport callback function prototypes -// - -/** - Registers and enables an exception callback function for the specified exception. - - @param ExceptionType Exception types in EBC, IA-32, x64, or IPF. - @param SystemContext Exception content. - -**/ -typedef -VOID -(EFIAPI *EFI_EXCEPTION_CALLBACK)( - IN EFI_EXCEPTION_TYPE ExceptionType, - IN OUT EFI_SYSTEM_CONTEXT SystemContext - ); - -/** - Registers and enables the on-target debug agent's periodic entry point. - - @param SystemContext Exception content. - -**/ -typedef -VOID -(EFIAPI *EFI_PERIODIC_CALLBACK)( - IN OUT EFI_SYSTEM_CONTEXT SystemContext - ); - -/// -/// 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 -} EFI_INSTRUCTION_SET_ARCHITECTURE; - - -// -// DebugSupport member function definitions -// - -/** - Returns the maximum value that may be used for the ProcessorIndex parameter in - RegisterPeriodicCallback() and RegisterExceptionCallback(). - - @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. - @param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported - processor index is returned. - - @retval EFI_SUCCESS The function completed successfully. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_GET_MAXIMUM_PROCESSOR_INDEX)( - IN EFI_DEBUG_SUPPORT_PROTOCOL *This, - OUT UINTN *MaxProcessorIndex - ); - -/** - Registers a function to be called back periodically in interrupt context. - - @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. - @param ProcessorIndex Specifies which processor the callback function applies to. - @param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main - periodic entry point of the debug agent. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback - function was previously registered. - @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback - function. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_REGISTER_PERIODIC_CALLBACK)( - IN EFI_DEBUG_SUPPORT_PROTOCOL *This, - IN UINTN ProcessorIndex, - IN EFI_PERIODIC_CALLBACK PeriodicCallback - ); - -/** - Registers a function to be called when a given processor exception occurs. - - @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. - @param ProcessorIndex Specifies which processor the callback function applies to. - @param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called - when the processor exception specified by ExceptionType occurs. - @param ExceptionType Specifies which processor exception to hook. - - @retval EFI_SUCCESS The function completed successfully. - @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback - function was previously registered. - @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback - function. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_REGISTER_EXCEPTION_CALLBACK)( - IN EFI_DEBUG_SUPPORT_PROTOCOL *This, - IN UINTN ProcessorIndex, - IN EFI_EXCEPTION_CALLBACK ExceptionCallback, - IN EFI_EXCEPTION_TYPE ExceptionType - ); - -/** - Invalidates processor instruction cache for a memory range. Subsequent execution in this range - causes a fresh memory fetch to retrieve code to be executed. - - @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. - @param ProcessorIndex Specifies which processor's instruction cache is to be invalidated. - @param Start Specifies the physical base of the memory range to be invalidated. - @param Length Specifies the minimum number of bytes in the processor's instruction - cache to invalidate. - - @retval EFI_SUCCESS The function completed successfully. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_INVALIDATE_INSTRUCTION_CACHE)( - IN EFI_DEBUG_SUPPORT_PROTOCOL *This, - IN UINTN ProcessorIndex, - IN VOID *Start, - IN UINT64 Length - ); - -/// -/// This protocol provides the services to allow the debug agent to register -/// callback functions that are called either periodically or when specific -/// processor exceptions occur. -/// -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; -}; - -extern EFI_GUID gEfiDebugSupportProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h deleted file mode 100644 index a305df575..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePath.h +++ /dev/null @@ -1,1171 +0,0 @@ -/** @file - The device path protocol as defined in UEFI 2.0. - - The device path represents a programmatic path to a device, - from a software point of view. The path must persist from boot to boot, so - it can not contain things like PCI bus numbers that change from boot to boot. - -Copyright (c) 2006 - 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. - -**/ - -#ifndef __EFI_DEVICE_PATH_PROTOCOL_H__ -#define __EFI_DEVICE_PATH_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Guid/PcAnsi.h> - -/// -/// Device Path protocol. -/// -#define EFI_DEVICE_PATH_PROTOCOL_GUID \ - { \ - 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } - -/// -/// Device Path guid definition for backward-compatible with EFI1.1. -/// -#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID - -#pragma pack(1) - -/** - This protocol can be used on any device handle to obtain generic path/location - information concerning the physical device or logical device. If the handle does - not logically map to a physical device, the handle may not necessarily support - the device path protocol. The device path describes the location of the device - the handle is for. The size of the Device Path can be determined from the structures - that make up the Device Path. -**/ -typedef struct { - UINT8 Type; ///< 0x01 Hardware Device Path. - ///< 0x02 ACPI Device Path. - ///< 0x03 Messaging Device Path. - ///< 0x04 Media Device Path. - ///< 0x05 BIOS Boot Specification Device Path. - ///< 0x7F End of Hardware Device Path. - - UINT8 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. - -} EFI_DEVICE_PATH_PROTOCOL; - -/// -/// Device Path protocol definition for backward-compatible with EFI1.1. -/// -typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH; - -/// -/// Hardware Device Paths. -/// -#define HARDWARE_DEVICE_PATH 0x01 - -/// -/// PCI Device Path SubType. -/// -#define HW_PCI_DP 0x01 - -/// -/// PCI Device Path. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// PCI Function Number. - /// - UINT8 Function; - /// - /// PCI Device Number. - /// - UINT8 Device; -} PCI_DEVICE_PATH; - -/// -/// PCCARD Device Path SubType. -/// -#define HW_PCCARD_DP 0x02 - -/// -/// PCCARD Device Path. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Function Number (0 = First Function). - /// - UINT8 FunctionNumber; -} PCCARD_DEVICE_PATH; - -/// -/// Memory Mapped Device Path SubType. -/// -#define HW_MEMMAP_DP 0x03 - -/// -/// Memory Mapped Device Path. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// EFI_MEMORY_TYPE - /// - UINT32 MemoryType; - /// - /// Starting Memory Address. - /// - EFI_PHYSICAL_ADDRESS StartingAddress; - /// - /// Ending Memory Address. - /// - EFI_PHYSICAL_ADDRESS EndingAddress; -} MEMMAP_DEVICE_PATH; - -/// -/// Hardware Vendor Device Path SubType. -/// -#define HW_VENDOR_DP 0x04 - -/// -/// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must -/// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the -/// contents on the n bytes that follow in the Vendor Device Path node. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Vendor-assigned GUID that defines the data that follows. - /// - EFI_GUID Guid; - /// - /// Vendor-defined variable size data. - /// -} VENDOR_DEVICE_PATH; - -/// -/// Controller Device Path SubType. -/// -#define HW_CONTROLLER_DP 0x05 - -/// -/// Controller Device Path. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Controller number. - /// - UINT32 ControllerNumber; -} CONTROLLER_DEVICE_PATH; - -/// -/// ACPI Device Paths. -/// -#define ACPI_DEVICE_PATH 0x02 - -/// -/// ACPI Device Path SubType. -/// -#define ACPI_DP 0x01 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Device's PnP hardware ID stored in a numeric 32-bit - /// compressed EISA-type ID. This value must match the - /// corresponding _HID in the ACPI name space. - /// - UINT32 HID; - /// - /// Unique ID that is required by ACPI if two devices have the - /// same _HID. This value must also match the corresponding - /// _UID/_HID pair in the ACPI name space. Only the 32-bit - /// numeric value type of _UID is supported. Thus, strings must - /// not be used for the _UID in the ACPI name space. - /// - UINT32 UID; -} ACPI_HID_DEVICE_PATH; - -/// -/// Expanded ACPI Device Path SubType. -/// -#define ACPI_EXTENDED_DP 0x02 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Device's PnP hardware ID stored in a numeric 32-bit - /// compressed EISA-type ID. This value must match the - /// corresponding _HID in the ACPI name space. - /// - UINT32 HID; - /// - /// Unique ID that is required by ACPI if two devices have the - /// same _HID. This value must also match the corresponding - /// _UID/_HID pair in the ACPI name space. - /// - UINT32 UID; - /// - /// Device's compatible PnP hardware ID stored in a numeric - /// 32-bit compressed EISA-type ID. This value must match at - /// least one of the compatible device IDs returned by the - /// corresponding _CID in the ACPI name space. - /// - UINT32 CID; - /// - /// Optional variable length _HIDSTR. - /// Optional variable length _UIDSTR. - /// Optional variable length _CIDSTR. - /// -} ACPI_EXTENDED_HID_DEVICE_PATH; - -// -// EISA ID Macro -// EISA ID Definition 32-bits -// bits[15:0] - three character compressed ASCII EISA ID. -// 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_MASK 0xffff -#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16) - -/// -/// ACPI _ADR Device Path SubType. -/// -#define ACPI_ADR_DP 0x03 - -/// -/// The _ADR device path is used to contain video output device attributes to support the Graphics -/// Output Protocol. The device path can contain multiple _ADR entries if multiple video output -/// devices are displaying the same output. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// _ADR value. For video output devices the value of this - /// field comes from Table B-2 of the ACPI 3.0 specification. At - /// least one _ADR value is required. - /// - UINT32 ADR; - // - // This device path may optionally contain more than one _ADR entry. - // -} ACPI_ADR_DEVICE_PATH; - -#define ACPI_ADR_DISPLAY_TYPE_OTHER 0 -#define ACPI_ADR_DISPLAY_TYPE_VGA 1 -#define ACPI_ADR_DISPLAY_TYPE_TV 2 -#define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3 -#define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4 - -#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \ - ((UINT32)( (((_DeviceIdScheme) & 0x1) << 31) | \ - (((_HeadId) & 0x7) << 18) | \ - (((_NonVgaOutput) & 0x1) << 17) | \ - (((_BiosCanDetect) & 0x1) << 16) | \ - (((_VendorInfo) & 0xf) << 12) | \ - (((_Type) & 0xf) << 8) | \ - (((_Port) & 0xf) << 4) | \ - ((_Index) & 0xf) )) - -/// -/// Messaging Device Paths. -/// This Device Path is used to describe the connection of devices outside the resource domain of the -/// system. This Device Path can describe physical messaging information like SCSI ID, or abstract -/// information like networking protocol IP addresses. -/// -#define MESSAGING_DEVICE_PATH 0x03 - -/// -/// ATAPI Device Path SubType -/// -#define MSG_ATAPI_DP 0x01 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Set to zero for primary, or one for secondary. - /// - UINT8 PrimarySecondary; - /// - /// Set to zero for master, or one for slave mode. - /// - UINT8 SlaveMaster; - /// - /// Logical Unit Number. - /// - UINT16 Lun; -} ATAPI_DEVICE_PATH; - -/// -/// SCSI Device Path SubType. -/// -#define MSG_SCSI_DP 0x02 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Target ID on the SCSI bus (PUN). - /// - UINT16 Pun; - /// - /// Logical Unit Number (LUN). - /// - UINT16 Lun; -} SCSI_DEVICE_PATH; - -/// -/// Fibre Channel SubType. -/// -#define MSG_FIBRECHANNEL_DP 0x03 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Reserved for the future. - /// - UINT32 Reserved; - /// - /// Fibre Channel World Wide Number. - /// - UINT64 WWN; - /// - /// Fibre Channel Logical Unit Number. - /// - UINT64 Lun; -} FIBRECHANNEL_DEVICE_PATH; - -/// -/// Fibre Channel Ex SubType. -/// -#define MSG_FIBRECHANNELEX_DP 0x15 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Reserved for the future. - /// - UINT32 Reserved; - /// - /// 8 byte array containing Fibre Channel End Device Port Name. - /// - UINT8 WWN[8]; - /// - /// 8 byte array containing Fibre Channel Logical Unit Number. - /// - UINT8 Lun[8]; -} FIBRECHANNELEX_DEVICE_PATH; - -/// -/// 1394 Device Path SubType -/// -#define MSG_1394_DP 0x04 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Reserved for the future. - /// - UINT32 Reserved; - /// - /// 1394 Global Unique ID (GUID). - /// - UINT64 Guid; -} F1394_DEVICE_PATH; - -/// -/// USB Device Path SubType. -/// -#define MSG_USB_DP 0x05 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// USB Parent Port Number. - /// - UINT8 ParentPortNumber; - /// - /// USB Interface Number. - /// - UINT8 InterfaceNumber; -} USB_DEVICE_PATH; - -/// -/// USB Class Device Path SubType. -/// -#define MSG_USB_CLASS_DP 0x0f -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Vendor ID assigned by USB-IF. A value of 0xFFFF will - /// match any Vendor ID. - /// - UINT16 VendorId; - /// - /// Product ID assigned by USB-IF. A value of 0xFFFF will - /// match any Product ID. - /// - UINT16 ProductId; - /// - /// The class code assigned by the USB-IF. A value of 0xFF - /// will match any class code. - /// - UINT8 DeviceClass; - /// - /// The subclass code assigned by the USB-IF. A value of - /// 0xFF will match any subclass code. - /// - UINT8 DeviceSubClass; - /// - /// The protocol code assigned by the USB-IF. A value of - /// 0xFF will match any protocol code. - /// - UINT8 DeviceProtocol; -} USB_CLASS_DEVICE_PATH; - -/// -/// USB WWID Device Path SubType. -/// -#define MSG_USB_WWID_DP 0x10 - -/// -/// This device path describes a USB device using its serial number. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// USB interface number. - /// - UINT16 InterfaceNumber; - /// - /// USB vendor id of the device. - /// - UINT16 VendorId; - /// - /// USB product id of the device. - /// - UINT16 ProductId; - /// - /// Last 64-or-fewer UTF-16 characters of the USB - /// serial number. The length of the string is - /// determined by the Length field less the offset of the - /// Serial Number field (10) - /// - /// CHAR16 SerialNumber[...]; -} USB_WWID_DEVICE_PATH; - -/// -/// Device Logical Unit SubType. -/// -#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Logical Unit Number for the interface. - /// - UINT8 Lun; -} DEVICE_LOGICAL_UNIT_DEVICE_PATH; - -/// -/// SATA Device Path SubType. -/// -#define MSG_SATA_DP 0x12 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// The HBA port number that facilitates the connection to the - /// device or a port multiplier. The value 0xFFFF is reserved. - /// - UINT16 HBAPortNumber; - /// - /// The Port multiplier port number that facilitates the connection - /// to the device. Bit 15 should be set if the device is directly - /// connected to the HBA. - /// - UINT16 PortMultiplierPortNumber; - /// - /// Logical Unit Number. - /// - UINT16 Lun; -} SATA_DEVICE_PATH; - -/// -/// Flag for if the device is directly connected to the HBA. -/// -#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000 - -/// -/// I2O Device Path SubType. -/// -#define MSG_I2O_DP 0x06 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Target ID (TID) for a device. - /// - UINT32 Tid; -} I2O_DEVICE_PATH; - -/// -/// MAC Address Device Path SubType. -/// -#define MSG_MAC_ADDR_DP 0x0b -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// The MAC address for a network interface padded with 0s. - /// - EFI_MAC_ADDRESS MacAddress; - /// - /// Network interface type(i.e. 802.3, FDDI). - /// - UINT8 IfType; -} MAC_ADDR_DEVICE_PATH; - -/// -/// IPv4 Device Path SubType -/// -#define MSG_IPv4_DP 0x0c -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// The local IPv4 address. - /// - EFI_IPv4_ADDRESS LocalIpAddress; - /// - /// The remote IPv4 address. - /// - EFI_IPv4_ADDRESS RemoteIpAddress; - /// - /// The local port number. - /// - UINT16 LocalPort; - /// - /// The remote port number. - /// - UINT16 RemotePort; - /// - /// The network protocol(i.e. UDP, TCP). - /// - UINT16 Protocol; - /// - /// 0x00 - The Source IP Address was assigned though DHCP. - /// 0x01 - The Source IP Address is statically bound. - /// - BOOLEAN StaticIpAddress; - /// - /// The gateway IP address - /// - EFI_IPv4_ADDRESS GatewayIpAddress; - /// - /// The subnet mask - /// - EFI_IPv4_ADDRESS SubnetMask; -} IPv4_DEVICE_PATH; - -/// -/// IPv6 Device Path SubType. -/// -#define MSG_IPv6_DP 0x0d -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// The local IPv6 address. - /// - EFI_IPv6_ADDRESS LocalIpAddress; - /// - /// The remote IPv6 address. - /// - EFI_IPv6_ADDRESS RemoteIpAddress; - /// - /// The local port number. - /// - UINT16 LocalPort; - /// - /// The remote port number. - /// - UINT16 RemotePort; - /// - /// The network protocol(i.e. UDP, TCP). - /// - UINT16 Protocol; - /// - /// 0x00 - The Local IP Address was manually configured. - /// 0x01 - The Local IP Address is assigned through IPv6 - /// stateless auto-configuration. - /// 0x02 - The Local IP Address is assigned through IPv6 - /// stateful configuration. - /// - UINT8 IpAddressOrigin; - /// - /// The prefix length - /// - UINT8 PrefixLength; - /// - /// The gateway IP address - /// - EFI_IPv6_ADDRESS GatewayIpAddress; -} IPv6_DEVICE_PATH; - -/// -/// InfiniBand Device Path SubType. -/// -#define MSG_INFINIBAND_DP 0x09 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Flags to help identify/manage InfiniBand device path elements: - /// Bit 0 - IOC/Service (0b = IOC, 1b = Service). - /// Bit 1 - Extend Boot Environment. - /// Bit 2 - Console Protocol. - /// Bit 3 - Storage Protocol. - /// Bit 4 - Network Protocol. - /// All other bits are reserved. - /// - UINT32 ResourceFlags; - /// - /// 128-bit Global Identifier for remote fabric port. - /// - UINT8 PortGid[16]; - /// - /// 64-bit unique identifier to remote IOC or server process. - /// Interpretation of field specified by Resource Flags (bit 0). - /// - UINT64 ServiceId; - /// - /// 64-bit persistent ID of remote IOC port. - /// - UINT64 TargetPortId; - /// - /// 64-bit persistent ID of remote device. - /// - UINT64 DeviceId; -} INFINIBAND_DEVICE_PATH; - -#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01 -#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02 -#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04 -#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08 -#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10 - -/// -/// UART Device Path SubType. -/// -#define MSG_UART_DP 0x0e -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Reserved. - /// - UINT32 Reserved; - /// - /// The baud rate setting for the UART style device. A value of 0 - /// means that the device's default baud rate will be used. - /// - UINT64 BaudRate; - /// - /// The number of data bits for the UART style device. A value - /// of 0 means that the device's default number of data bits will be used. - /// - UINT8 DataBits; - /// - /// The parity setting for the UART style device. - /// Parity 0x00 - Default Parity. - /// Parity 0x01 - No Parity. - /// Parity 0x02 - Even Parity. - /// Parity 0x03 - Odd Parity. - /// Parity 0x04 - Mark Parity. - /// Parity 0x05 - Space Parity. - /// - UINT8 Parity; - /// - /// The number of stop bits for the UART style device. - /// Stop Bits 0x00 - Default Stop Bits. - /// Stop Bits 0x01 - 1 Stop Bit. - /// Stop Bits 0x02 - 1.5 Stop Bits. - /// Stop Bits 0x03 - 2 Stop Bits. - /// - UINT8 StopBits; -} UART_DEVICE_PATH; - -// -// Use VENDOR_DEVICE_PATH struct -// -#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 - -/// -/// A new device path node is defined to declare flow control characteristics. -/// UART Flow Control Messaging Device Path -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID. - /// - EFI_GUID Guid; - /// - /// Bitmap of supported flow control types. - /// Bit 0 set indicates hardware flow control. - /// Bit 1 set indicates Xon/Xoff flow control. - /// All other bits are reserved and are clear. - /// - UINT32 FlowControlMap; -} UART_FLOW_CONTROL_DEVICE_PATH; - -#define UART_FLOW_CONTROL_HARDWARE 0x00000001 -#define UART_FLOW_CONTROL_XON_XOFF 0x00000010 - -#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID -/// -/// Serial Attached SCSI (SAS) Device Path. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// DEVICE_PATH_MESSAGING_SAS GUID. - /// - EFI_GUID Guid; - /// - /// Reserved for future use. - /// - UINT32 Reserved; - /// - /// SAS Address for Serial Attached SCSI Target. - /// - UINT64 SasAddress; - /// - /// SAS Logical Unit Number. - /// - UINT64 Lun; - /// - /// More Information about the device and its interconnect. - /// - UINT16 DeviceTopology; - /// - /// Relative Target Port (RTP). - /// - UINT16 RelativeTargetPort; -} SAS_DEVICE_PATH; - -/// -/// Serial Attached SCSI (SAS) Ex Device Path SubType -/// -#define MSG_SASEX_DP 0x16 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port. - /// - UINT8 SasAddress[8]; - /// - /// 8-byte array of the SAS Logical Unit Number. - /// - UINT8 Lun[8]; - /// - /// More Information about the device and its interconnect. - /// - UINT16 DeviceTopology; - /// - /// Relative Target Port (RTP). - /// - UINT16 RelativeTargetPort; -} SASEX_DEVICE_PATH; - -/// -/// NvmExpress Namespace Device Path SubType. -/// -#define MSG_NVME_NAMESPACE_DP 0x17 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 NamespaceId; - UINT64 NamespaceUuid; -} NVME_NAMESPACE_DEVICE_PATH; - -/// -/// iSCSI Device Path SubType -/// -#define MSG_ISCSI_DP 0x13 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Network Protocol (0 = TCP, 1+ = reserved). - /// - UINT16 NetworkProtocol; - /// - /// iSCSI Login Options. - /// - UINT16 LoginOption; - /// - /// iSCSI Logical Unit Number. - /// - UINT64 Lun; - /// - /// iSCSI Target Portal group tag the initiator intends - /// to establish a session with. - /// - UINT16 TargetPortalGroupTag; - /// - /// iSCSI NodeTarget Name. The length of the name - /// is determined by subtracting the offset of this field from Length. - /// - /// CHAR8 iSCSI Target Name. -} ISCSI_DEVICE_PATH; - -#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000 -#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 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// VLAN identifier (0-4094). - /// - UINT16 VlanId; -} VLAN_DEVICE_PATH; - -// -// Media Device Path -// -#define MEDIA_DEVICE_PATH 0x04 - -/// -/// Hard Drive Media Device Path SubType. -/// -#define MEDIA_HARDDRIVE_DP 0x01 - -/// -/// The Hard Drive Media Device Path is used to represent a partition on a hard drive. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Describes the entry in a partition table, starting with entry 1. - /// Partition number zero represents the entire device. Valid - /// partition numbers for a MBR partition are [1, 4]. Valid - /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries]. - /// - UINT32 PartitionNumber; - /// - /// Starting LBA of the partition on the hard drive. - /// - UINT64 PartitionStart; - /// - /// Size of the partition in units of Logical Blocks. - /// - UINT64 PartitionSize; - /// - /// Signature unique to this partition: - /// If SignatureType is 0, this field has to be initialized with 16 zeros. - /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field. - /// The other 12 bytes are initialized with zeros. - /// If SignatureType is 2, this field contains a 16 byte signature. - /// - UINT8 Signature[16]; - /// - /// Partition Format: (Unused values reserved). - /// 0x01 - PC-AT compatible legacy MBR. - /// 0x02 - GUID Partition Table. - /// - UINT8 MBRType; - /// - /// Type of Disk Signature: (Unused values reserved). - /// 0x00 - No Disk Signature. - /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR. - /// 0x02 - GUID signature. - /// - UINT8 SignatureType; -} HARDDRIVE_DEVICE_PATH; - -#define MBR_TYPE_PCAT 0x01 -#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02 - -#define NO_DISK_SIGNATURE 0x00 -#define SIGNATURE_TYPE_MBR 0x01 -#define SIGNATURE_TYPE_GUID 0x02 - -/// -/// CD-ROM Media Device Path SubType. -/// -#define MEDIA_CDROM_DP 0x02 - -/// -/// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero. - /// - UINT32 BootEntry; - /// - /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing. - /// - UINT64 PartitionStart; - /// - /// Size of the partition in units of Blocks, also called Sectors. - /// - UINT64 PartitionSize; -} CDROM_DEVICE_PATH; - -// -// Use VENDOR_DEVICE_PATH struct -// -#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype. - -/// -/// File Path Media Device Path SubType -/// -#define MEDIA_FILEPATH_DP 0x04 -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// A NULL-terminated Path string including directory and file names. - /// - CHAR16 PathName[1]; -} FILEPATH_DEVICE_PATH; - -#define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName) - -/// -/// Media Protocol Device Path SubType. -/// -#define MEDIA_PROTOCOL_DP 0x05 - -/// -/// The Media Protocol Device Path is used to denote the protocol that is being -/// used in a device path at the location of the path specified. -/// Many protocols are inherent to the style of device path. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// The ID of the protocol. - /// - EFI_GUID Protocol; -} MEDIA_PROTOCOL_DEVICE_PATH; - -/// -/// PIWG Firmware File SubType. -/// -#define MEDIA_PIWG_FW_FILE_DP 0x06 - -/// -/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Firmware file name - /// - EFI_GUID FvFileName; -} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH; - -/// -/// PIWG Firmware Volume Device Path SubType. -/// -#define MEDIA_PIWG_FW_VOL_DP 0x07 - -/// -/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Firmware volume name. - /// - EFI_GUID FvName; -} MEDIA_FW_VOL_DEVICE_PATH; - -/// -/// Media relative offset range device path. -/// -#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08 - -/// -/// Used to describe the offset range of media relative. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 Reserved; - UINT64 StartingOffset; - UINT64 EndingOffset; -} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH; - -/// -/// BIOS Boot Specification Device Path. -/// -#define BBS_DEVICE_PATH 0x05 - -/// -/// BIOS Boot Specification Device Path SubType. -/// -#define BBS_BBS_DP 0x01 - -/// -/// This Device Path is used to describe the booting of non-EFI-aware operating systems. -/// -typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - /// - /// Device Type as defined by the BIOS Boot Specification. - /// - UINT16 DeviceType; - /// - /// Status Flags as defined by the BIOS Boot Specification. - /// - UINT16 StatusFlag; - /// - /// Null-terminated ASCII string that describes the boot device to a user. - /// - 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 - - -/// -/// Union of all possible Device Paths and pointers to Device Paths. -/// -typedef union { - EFI_DEVICE_PATH_PROTOCOL DevPath; - PCI_DEVICE_PATH Pci; - PCCARD_DEVICE_PATH PcCard; - MEMMAP_DEVICE_PATH MemMap; - VENDOR_DEVICE_PATH Vendor; - - CONTROLLER_DEVICE_PATH Controller; - ACPI_HID_DEVICE_PATH Acpi; - ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi; - ACPI_ADR_DEVICE_PATH AcpiAdr; - - ATAPI_DEVICE_PATH Atapi; - SCSI_DEVICE_PATH Scsi; - ISCSI_DEVICE_PATH Iscsi; - FIBRECHANNEL_DEVICE_PATH FibreChannel; - FIBRECHANNELEX_DEVICE_PATH FibreChannelEx; - - F1394_DEVICE_PATH F1394; - USB_DEVICE_PATH Usb; - SATA_DEVICE_PATH Sata; - USB_CLASS_DEVICE_PATH UsbClass; - USB_WWID_DEVICE_PATH UsbWwid; - DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit; - I2O_DEVICE_PATH I2O; - MAC_ADDR_DEVICE_PATH MacAddr; - IPv4_DEVICE_PATH Ipv4; - IPv6_DEVICE_PATH Ipv6; - VLAN_DEVICE_PATH Vlan; - INFINIBAND_DEVICE_PATH InfiniBand; - UART_DEVICE_PATH Uart; - UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl; - SAS_DEVICE_PATH Sas; - SASEX_DEVICE_PATH SasEx; - NVME_NAMESPACE_DEVICE_PATH NvmeNamespace; - HARDDRIVE_DEVICE_PATH HardDrive; - CDROM_DEVICE_PATH CD; - - FILEPATH_DEVICE_PATH FilePath; - MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol; - - MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume; - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile; - MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset; - - BBS_BBS_DEVICE_PATH Bbs; -} EFI_DEV_PATH; - - - -typedef union { - EFI_DEVICE_PATH_PROTOCOL *DevPath; - PCI_DEVICE_PATH *Pci; - PCCARD_DEVICE_PATH *PcCard; - MEMMAP_DEVICE_PATH *MemMap; - VENDOR_DEVICE_PATH *Vendor; - - CONTROLLER_DEVICE_PATH *Controller; - ACPI_HID_DEVICE_PATH *Acpi; - ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi; - ACPI_ADR_DEVICE_PATH *AcpiAdr; - - ATAPI_DEVICE_PATH *Atapi; - SCSI_DEVICE_PATH *Scsi; - ISCSI_DEVICE_PATH *Iscsi; - FIBRECHANNEL_DEVICE_PATH *FibreChannel; - FIBRECHANNELEX_DEVICE_PATH *FibreChannelEx; - - F1394_DEVICE_PATH *F1394; - USB_DEVICE_PATH *Usb; - SATA_DEVICE_PATH *Sata; - USB_CLASS_DEVICE_PATH *UsbClass; - USB_WWID_DEVICE_PATH *UsbWwid; - DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicUnit; - I2O_DEVICE_PATH *I2O; - MAC_ADDR_DEVICE_PATH *MacAddr; - IPv4_DEVICE_PATH *Ipv4; - IPv6_DEVICE_PATH *Ipv6; - VLAN_DEVICE_PATH *Vlan; - INFINIBAND_DEVICE_PATH *InfiniBand; - UART_DEVICE_PATH *Uart; - UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl; - SAS_DEVICE_PATH *Sas; - SASEX_DEVICE_PATH *SasEx; - NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace; - HARDDRIVE_DEVICE_PATH *HardDrive; - CDROM_DEVICE_PATH *CD; - - FILEPATH_DEVICE_PATH *FilePath; - MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol; - - MEDIA_FW_VOL_DEVICE_PATH *FirmwareVolume; - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FirmwareFile; - MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset; - - BBS_BBS_DEVICE_PATH *Bbs; - UINT8 *Raw; -} EFI_DEV_PATH_PTR; - -#pragma pack() - -#define END_DEVICE_PATH_TYPE 0x7f -#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF -#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01 - -extern EFI_GUID gEfiDevicePathProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePathToText.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePathToText.h deleted file mode 100644 index edca965bc..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DevicePathToText.h +++ /dev/null @@ -1,87 +0,0 @@ -/** @file - 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. - -**/ - -#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ -#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// Device Path To Text protocol -/// -#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ - { \ - 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \ - } - -/** - Convert a device node to its text representation. - - @param DeviceNode Points to the device node to be converted. - @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation - of the display node is used, where applicable. If DisplayOnly - is FALSE, then the longer text representation of the display node - is used. - @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text - representation for a device node can be used, where applicable. - - @retval a_pointer a pointer to the allocated text representation of the device node data - @retval NULL if DeviceNode is NULL or there was insufficient memory. - -**/ -typedef -CHAR16* -(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts - ); - -/** - Convert a device path to its text representation. - - @param DevicePath Points to the device path to be converted. - @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation - of the display node is used, where applicable. If DisplayOnly - is FALSE, then the longer text representation of the display node - is used. - @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of - text representation for a device node cannot be used. - - @retval a_pointer a pointer to the allocated text representation of the device node. - @retval NULL if DevicePath is NULL or there was insufficient memory. - -**/ -typedef -CHAR16* -(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts - ); - -/// -/// 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_PROTOCOL; - -extern EFI_GUID gEfiDevicePathToTextProtocolGuid; - -#endif - - diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Dhcp4.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Dhcp4.h deleted file mode 100644 index 560ee3224..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Dhcp4.h +++ /dev/null @@ -1,782 +0,0 @@ -/** @file - EFI_DHCP4_PROTOCOL as defined in UEFI 2.0. - EFI_DHCP4_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0. - 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. - - @par Revision Reference: - This Protocol was introduced in UEFI Specification 2.0. - -**/ - -#ifndef __EFI_DHCP4_PROTOCOL_H__ -#define __EFI_DHCP4_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_DHCP4_PROTOCOL_GUID \ - { \ - 0x8a219718, 0x4ef5, 0x4761, {0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56 } \ - } - -#define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0x9d9a39d8, 0xbd42, 0x4a73, {0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } \ - } - -typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL; - - -#pragma pack(1) -typedef struct { - /// - /// DHCP option code. - /// - UINT8 OpCode; - /// - /// Length of the DHCP option data. Not present if OpCode is 0 or 255. - /// - UINT8 Length; - /// - /// Start of the DHCP option data. Not present if OpCode is 0 or 255 or if Length is zero. - /// - 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; -#pragma pack() - - -#pragma pack(1) -typedef struct { - /// - /// Size of the EFI_DHCP4_PACKET buffer. - /// - 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; - - struct { - /// - /// DHCP packet header. - /// - EFI_DHCP4_HEADER Header; - /// - /// DHCP magik cookie in network byte order. - /// - UINT32 Magik; - /// - /// Start of the DHCP packed option data. - /// - UINT8 Option[1]; - } Dhcp4; -} EFI_DHCP4_PACKET; -#pragma pack() - - -typedef enum { - /// - /// The EFI DHCPv4 Protocol driver is stopped. - /// - Dhcp4Stopped = 0x0, - /// - /// The EFI DHCPv4 Protocol driver is inactive. - /// - Dhcp4Init = 0x1, - /// - /// The EFI DHCPv4 Protocol driver is collecting DHCP offer packets from DHCP servers. - /// - Dhcp4Selecting = 0x2, - /// - /// The EFI DHCPv4 Protocol driver has sent the request to the DHCP server and is waiting for a response. - /// - Dhcp4Requesting = 0x3, - /// - /// The DHCP configuration has completed. - /// - 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, - /// - /// The DHCP configuration has timed out and the EFI DHCPv4 - /// Protocol driver is trying to extend the lease time. - /// - Dhcp4Rebinding = 0x6, - /// - /// The EFI DHCPv4 Protocol driver was initialized with a previously - /// allocated or known IP address. - /// - 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 -} EFI_DHCP4_STATE; - - -typedef enum{ - /// - /// The packet to start the configuration sequence is about to be sent. - /// - Dhcp4SendDiscover = 0x01, - /// - /// A reply packet was just received. - /// - Dhcp4RcvdOffer = 0x02, - /// - /// It is time for Dhcp4Callback to select an offer. - /// - Dhcp4SelectOffer = 0x03, - /// - /// A request packet is about to be sent. - /// - Dhcp4SendRequest = 0x04, - /// - /// A DHCPACK packet was received and will be passed to Dhcp4Callback. - /// - Dhcp4RcvdAck = 0x05, - /// - /// A DHCPNAK packet was received and will be passed to Dhcp4Callback. - /// - Dhcp4RcvdNak = 0x06, - /// - /// A decline packet is about to be sent. - /// - Dhcp4SendDecline = 0x07, - /// - /// The DHCP configuration process has completed. No packet is associated with this event. - /// - Dhcp4BoundCompleted = 0x08, - /// - /// 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, - /// - /// It is time to enter the Dhcp4Rebinding state and to contact any server. - /// No packet is associated with this event. - /// - Dhcp4EnterRebinding = 0x0a, - /// - /// The configured IP address was lost either because the lease has expired, - /// 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, - /// - /// 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 -} EFI_DHCP4_EVENT; - -/** - Callback routine. - - EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver - to intercept events that occurred in the configuration process. This structure - provides advanced control of each state transition of the DHCP process. The - returned status code determines the behavior of the EFI DHCPv4 Protocol driver. - There are three possible returned values, which are described in the following - table. - - @param This The pointer to the EFI DHCPv4 Protocol instance that is used to - configure this callback function. - @param Context The pointer to the context that is initialized by - EFI_DHCP4_PROTOCOL.Configure(). - @param CurrentState The current operational state of the EFI DHCPv4 Protocol - driver. - @param Dhcp4Event The event that occurs in the current state, which usually means a - state transition. - @param Packet The DHCP packet that is going to be sent or already received. - @param NewPacket The packet that is used to replace the above Packet. - - @retval EFI_SUCCESS Tells the EFI DHCPv4 Protocol driver to continue the DHCP process. - When it is in the Dhcp4Selecting state, it tells the EFI DHCPv4 Protocol - driver to stop collecting additional packets. The driver will exit - the Dhcp4Selecting state and enter the Dhcp4Requesting state. - @retval EFI_NOT_READY Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol - driver will continue to wait for more packets until the retry - timeout expires. - @retval EFI_ABORTED Tells the EFI DHCPv4 Protocol driver to abort the current process and - return to the Dhcp4Init or Dhcp4InitReboot state. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_CALLBACK)( - IN EFI_DHCP4_PROTOCOL *This, - IN VOID *Context, - IN EFI_DHCP4_STATE CurrentState, - IN EFI_DHCP4_EVENT Dhcp4Event, - IN EFI_DHCP4_PACKET *Packet OPTIONAL, - OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL - ); - -typedef struct { - /// - /// The number of times to try sending a packet during the Dhcp4SendDiscover - /// event and waiting for a response during the Dhcp4RcvdOffer event. - /// Set to zero to use the default try counts and timeout values. - /// - 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; - /// - /// 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; - /// - /// 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; - /// - /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP - /// address will cause the EFI DHCPv4 Protocol driver to enter the Dhcp4InitReboot state. - /// And set this field to 0.0.0.0 to enter the Dhcp4Init state. - /// 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; - /// - /// 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; - /// - /// The pointer to the context that will be passed to Dhcp4Callback when it is called. - /// - VOID *CallbackContext; - /// - /// Number of DHCP options in the OptionList. - /// - 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 - /// in outgoing DHCP packets. If OptionList itself contains pad option, they are - /// 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_CONFIG_DATA; - - -typedef struct { - /// - /// The EFI DHCPv4 Protocol driver operating state. - /// - EFI_DHCP4_STATE State; - /// - /// The configuration data of the current EFI DHCPv4 Protocol driver instance. - /// - 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; - /// - /// The local hardware address. - /// - EFI_MAC_ADDRESS ClientMacAddress; - /// - /// The server IP address that is providing the DHCP service to this client. - /// - 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; - /// - /// The subnet mask of the connected network that was acquired from the DHCP server. - /// - 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; - /// - /// The cached latest DHCPACK or DHCPNAK or BOOTP REPLY packet. May be NULL if no packet is cached. - /// - 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; - /// - /// The subnet mask of above listening unicast/broadcast IP address. - /// Ignored if ListenAddress is a multicast address. - /// - 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; -} EFI_DHCP4_LISTEN_POINT; - - -typedef struct { - /// - /// The completion status of transmitting and receiving. - /// - 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; - /// - /// The pointer to the server IP address. This address may be a unicast, multicast, or broadcast address. - /// - EFI_IPv4_ADDRESS RemoteAddress; - /// - /// The server listening port number. If zero, the default server listening port number (67) will be used. - /// - UINT16 RemotePort; - /// - /// The pointer to the gateway address to override the existing setting. - /// - EFI_IPv4_ADDRESS GatewayAddress; - /// - /// The number of entries in ListenPoints. If zero, the default station address and port number 68 are used. - /// - 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; - /// - /// The number of seconds to collect responses. Zero is invalid. - /// - UINT32 TimeoutValue; - /// - /// The pointer to the packet to be transmitted. - /// - EFI_DHCP4_PACKET *Packet; - /// - /// Number of received packets. - /// - UINT32 ResponseCount; - /// - /// The pointer to the allocated list of received packets. - /// - EFI_DHCP4_PACKET *ResponseList; -} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN; - - -/** - Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver. - - The GetModeData() function returns the current operating mode and cached data - packet for the EFI DHCPv4 Protocol driver. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param Dhcp4ModeData The pointer to storage for the EFI_DHCP4_MODE_DATA structure. - - @retval EFI_SUCCESS The mode data was returned. - @retval EFI_INVALID_PARAMETER This is NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_GET_MODE_DATA)( - IN EFI_DHCP4_PROTOCOL *This, - OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData - ); - -/** - Initializes, changes, or resets the operational settings for the EFI DHCPv4 Protocol driver. - - The Configure() function is used to initialize, change, or reset the operational - settings of the EFI DHCPv4 Protocol driver for the communication device on which - the EFI DHCPv4 Service Binding Protocol is installed. This function can be - successfully called only if both of the following are true: - * This instance of the EFI DHCPv4 Protocol driver is in the Dhcp4Stopped, Dhcp4Init, - Dhcp4InitReboot, or Dhcp4Bound states. - * No other EFI DHCPv4 Protocol driver instance that is controlled by this EFI - DHCPv4 Service Binding Protocol driver instance has configured this EFI DHCPv4 - Protocol driver. - When this driver is in the Dhcp4Stopped state, it can transfer into one of the - following two possible initial states: - * Dhcp4Init - * Dhcp4InitReboot. - The driver can transfer into these states by calling Configure() with a non-NULL - Dhcp4CfgData. The driver will transfer into the appropriate state based on the - supplied client network address in the ClientAddress parameter and DHCP options - in the OptionList parameter as described in RFC 2131. - When Configure() is called successfully while Dhcp4CfgData is set to NULL, the - default configuring data will be reset in the EFI DHCPv4 Protocol driver and - the state of the EFI DHCPv4 Protocol driver will not be changed. If one instance - wants to make it possible for another instance to configure the EFI DHCPv4 Protocol - driver, it must call this function with Dhcp4CfgData set to NULL. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param Dhcp4CfgData The pointer to the EFI_DHCP4_CONFIG_DATA. - - @retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or - Dhcp4InitReboot state, if the original state of this driver - was Dhcp4Stopped, Dhcp4Init,Dhcp4InitReboot, or Dhcp4Bound - and the value of Dhcp4CfgData was not NULL. - Otherwise, the state was left unchanged. - @retval EFI_ACCESS_DENIED This instance of the EFI DHCPv4 Protocol driver was not in the - Dhcp4Stopped, Dhcp4Init, Dhcp4InitReboot, or Dhcp4Bound state; - Or onother instance of this EFI DHCPv4 Protocol driver is already - in a valid configured state. - @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE: - This is NULL. - DiscoverTryCount > 0 and DiscoverTimeout is NULL - RequestTryCount > 0 and RequestTimeout is NULL. - OptionCount >0 and OptionList is NULL. - ClientAddress is not a valid unicast address. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_CONFIGURE)( - IN EFI_DHCP4_PROTOCOL *This, - IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL - ); - - -/** - Starts the DHCP configuration process. - - The Start() function starts the DHCP configuration process. This function can - be called only when the EFI DHCPv4 Protocol driver is in the Dhcp4Init or - Dhcp4InitReboot state. - If the DHCP process completes successfully, the state of the EFI DHCPv4 Protocol - driver will be transferred through Dhcp4Selecting and Dhcp4Requesting to the - Dhcp4Bound state. The CompletionEvent will then be signaled if it is not NULL. - If the process aborts, either by the user or by some unexpected network error, - the state is restored to the Dhcp4Init state. The Start() function can be called - again to restart the process. - Refer to RFC 2131 for precise state transitions during this process. At the - time when each event occurs in this process, the callback function that was set - by EFI_DHCP4_PROTOCOL.Configure() will be called and the user can take this - opportunity to control the process. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param CompletionEvent If not NULL, it indicates the event that will be signaled when the - EFI DHCPv4 Protocol driver is transferred into the - Dhcp4Bound state or when the DHCP process is aborted. - EFI_DHCP4_PROTOCOL.GetModeData() can be called to - check the completion status. If NULL, - EFI_DHCP4_PROTOCOL.Start() will wait until the driver - is transferred into the Dhcp4Bound state or the process fails. - - @retval EFI_SUCCESS The DHCP configuration process has started, or it has completed - when CompletionEvent is NULL. - @retval EFI_NOT_STARTED The EFI DHCPv4 Protocol driver is in the Dhcp4Stopped - state. EFI_DHCP4_PROTOCOL. Configure() needs to be called. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_TIMEOUT The DHCP configuration process failed because no response was - received from the server within the specified timeout value. - @retval EFI_ABORTED The user aborted the DHCP process. - @retval EFI_ALREADY_STARTED Some other EFI DHCPv4 Protocol instance already started the - DHCP process. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_NO_MEDIA There was a media error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_START)( - IN EFI_DHCP4_PROTOCOL *This, - IN EFI_EVENT CompletionEvent OPTIONAL - ); - -/** - Extends the lease time by sending a request packet. - - The RenewRebind() function is used to manually extend the lease time when the - EFI DHCPv4 Protocol driver is in the Dhcp4Bound state, and the lease time has - not expired yet. This function will send a request packet to the previously - found server (or to any server when RebindRequest is TRUE) and transfer the - state into the Dhcp4Renewing state (or Dhcp4Rebinding when RebindingRequest is - TRUE). When a response is received, the state is returned to Dhcp4Bound. - If no response is received before the try count is exceeded (the RequestTryCount - field that is specified in EFI_DHCP4_CONFIG_DATA) but before the lease time that - was issued by the previous server expires, the driver will return to the Dhcp4Bound - state, and the previous configuration is restored. The outgoing and incoming packets - can be captured by the EFI_DHCP4_CALLBACK function. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param RebindRequest If TRUE, this function broadcasts the request packets and enters - the Dhcp4Rebinding state. Otherwise, it sends a unicast - request packet and enters the Dhcp4Renewing state. - @param CompletionEvent If not NULL, this event is signaled when the renew/rebind phase - completes or some error occurs. - EFI_DHCP4_PROTOCOL.GetModeData() can be called to - check the completion status. If NULL, - EFI_DHCP4_PROTOCOL.RenewRebind() will busy-wait - until the DHCP process finishes. - - @retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the - Dhcp4Renewing state or is back to the Dhcp4Bound state. - @retval EFI_NOT_STARTED The EFI DHCPv4 Protocol driver is in the Dhcp4Stopped - state. EFI_DHCP4_PROTOCOL.Configure() needs to - be called. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_TIMEOUT There was no response from the server when the try count was - exceeded. - @retval EFI_ACCESS_DENIED The driver is not in the Dhcp4Bound state. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_RENEW_REBIND)( - IN EFI_DHCP4_PROTOCOL *This, - IN BOOLEAN RebindRequest, - IN EFI_EVENT CompletionEvent OPTIONAL - ); - -/** - Releases the current address configuration. - - The Release() function releases the current configured IP address by doing either - of the following: - * Sending a DHCPRELEASE packet when the EFI DHCPv4 Protocol driver is in the - Dhcp4Bound state - * Setting the previously assigned IP address that was provided with the - EFI_DHCP4_PROTOCOL.Configure() function to 0.0.0.0 when the driver is in - Dhcp4InitReboot state - After a successful call to this function, the EFI DHCPv4 Protocol driver returns - to the Dhcp4Init state, and any subsequent incoming packets will be discarded silently. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - - @retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_ACCESS_DENIED The EFI DHCPv4 Protocol driver is not Dhcp4InitReboot state. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_RELEASE)( - IN EFI_DHCP4_PROTOCOL *This - ); - -/** - Stops the current address configuration. - - The Stop() function is used to stop the DHCP configuration process. After this - function is called successfully, the EFI DHCPv4 Protocol driver is transferred - into the Dhcp4Stopped state. EFI_DHCP4_PROTOCOL.Configure() needs to be called - before DHCP configuration process can be started again. This function can be - called when the EFI DHCPv4 Protocol driver is in any state. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - - @retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase. - @retval EFI_INVALID_PARAMETER This is NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_STOP)( - IN EFI_DHCP4_PROTOCOL *This - ); - -/** - Builds a DHCP packet, given the options to be appended or deleted or replaced. - - The Build() function is used to assemble a new packet from the original packet - by replacing or deleting existing options or appending new options. This function - does not change any state of the EFI DHCPv4 Protocol driver and can be used at - any time. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param SeedPacket Initial packet to be used as a base for building new packet. - @param DeleteCount Number of opcodes in the DeleteList. - @param DeleteList List of opcodes to be deleted from the seed packet. - Ignored if DeleteCount is zero. - @param AppendCount Number of entries in the OptionList. - @param AppendList The pointer to a DHCP option list to be appended to SeedPacket. - If SeedPacket also contains options in this list, they are - replaced by new options (except pad option). Ignored if - AppendCount is zero. Type EFI_DHCP4_PACKET_OPTION - @param NewPacket The pointer to storage for the pointer to the new allocated packet. - Use the EFI Boot Service FreePool() on the resulting pointer - when done with the packet. - - @retval EFI_SUCCESS The new packet was built. - @retval EFI_OUT_OF_RESOURCES Storage for the new packet could not be allocated. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - SeedPacket is NULL. - SeedPacket is not a well-formed DHCP packet. - AppendCount is not zero and AppendList is NULL. - DeleteCount is not zero and DeleteList is NULL. - NewPacket is NULL - Both DeleteCount and AppendCount are zero and - NewPacket is not NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_BUILD)( - IN EFI_DHCP4_PROTOCOL *This, - IN EFI_DHCP4_PACKET *SeedPacket, - IN UINT32 DeleteCount, - IN UINT8 *DeleteList OPTIONAL, - IN UINT32 AppendCount, - IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL, - OUT EFI_DHCP4_PACKET **NewPacket - ); - - -/** - Transmits a DHCP formatted packet and optionally waits for responses. - - The TransmitReceive() function is used to transmit a DHCP packet and optionally - wait for the response from servers. This function does not change the state of - the EFI DHCPv4 Protocol driver. It can be used at any time because of this. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param Token The pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure. - - @retval EFI_SUCCESS The packet was successfully queued for transmission. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - Token.RemoteAddress is zero. - Token.Packet is NULL. - Token.Packet is not a well-formed DHCP packet. - The transaction ID in Token.Packet is in use by another DHCP process. - @retval EFI_NOT_READY The previous call to this function has not finished yet. Try to call - this function after collection process completes. - @retval EFI_NO_MAPPING The default station address is not available yet. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_UNSUPPORTED The implementation doesn't support this function - @retval Others Some other unexpected error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE)( - IN EFI_DHCP4_PROTOCOL *This, - IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token - ); - - -/** - Parses the packed DHCP option data. - - The Parse() function is used to retrieve the option list from a DHCP packet. - If *OptionCount isn't zero, and there is enough space for all the DHCP options - in the Packet, each element of PacketOptionList is set to point to somewhere in - the Packet->Dhcp4.Option where a new DHCP option begins. If RFC3396 is supported, - the caller should reassemble the parsed DHCP options to get the final result. - If *OptionCount is zero or there isn't enough space for all of them, the number - of DHCP options in the Packet is returned in OptionCount. - - @param This The pointer to the EFI_DHCP4_PROTOCOL instance. - @param Packet The pointer to packet to be parsed. - @param OptionCount On input, the number of entries in the PacketOptionList. - On output, the number of entries that were written into the - PacketOptionList. - @param PacketOptionList A list of packet option entries to be filled in. End option or pad - options are not included. - - @retval EFI_SUCCESS The packet was successfully parsed. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - The packet is NULL. - The packet is not a well-formed DHCP packet. - OptionCount is NULL. - @retval EFI_BUFFER_TOO_SMALL One or more of the following conditions is TRUE: - 1) *OptionCount is smaller than the number of options that - were found in the Packet. - 2) PacketOptionList is NULL. - @retval EFI_OUT_OF_RESOURCE The packet failed to parse because of a resource shortage. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DHCP4_PARSE)( - IN EFI_DHCP4_PROTOCOL *This, - IN EFI_DHCP4_PACKET *Packet, - IN OUT UINT32 *OptionCount, - OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL - ); - -/// -/// This protocol is used to collect configuration information for the EFI IPv4 Protocol drivers -/// 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; -}; - -extern EFI_GUID gEfiDhcp4ProtocolGuid; -extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DiskIo.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DiskIo.h deleted file mode 100644 index 1b47ce520..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DiskIo.h +++ /dev/null @@ -1,119 +0,0 @@ -/** @file - Disk IO protocol as defined in the UEFI 2.0 specification. - - The Disk IO protocol is used to convert block oriented devices into byte - 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. - -**/ - -#ifndef __DISK_IO_H__ -#define __DISK_IO_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_DISK_IO_PROTOCOL_GUID \ - { \ - 0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } - -/// -/// Protocol GUID name defined in EFI1.1. -/// -#define DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL_GUID - -typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL; - -/// -/// Protocol defined in EFI1.1. -/// -typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO; - -/** - Read BufferSize bytes from Offset into Buffer. - - @param This Protocol instance pointer. - @param MediaId Id of the media, changes every time the media is replaced. - @param Offset The starting byte offset to read from - @param BufferSize Size of Buffer - @param Buffer Buffer containing read data - - @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while performing the read. - @retval EFI_NO_MEDIA There is no media in the device. - @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. - @retval EFI_INVALID_PARAMETER The read request contains device addresses that are not - valid for the device. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DISK_READ)( - IN EFI_DISK_IO_PROTOCOL *This, - IN UINT32 MediaId, - IN UINT64 Offset, - IN UINTN BufferSize, - OUT VOID *Buffer - ); - -/** - Writes a specified number of bytes to a device. - - @param This Indicates a pointer to the calling context. - @param MediaId ID of the medium to be written. - @param Offset The starting byte offset on the logical block I/O device to write. - @param BufferSize The size in bytes of Buffer. The number of bytes to write to the device. - @param Buffer A pointer to the buffer containing the data to be written. - - @retval EFI_SUCCESS The data was written correctly to the device. - @retval EFI_WRITE_PROTECTED The device can not be written to. - @retval EFI_DEVICE_ERROR The device reported an error while performing the write. - @retval EFI_NO_MEDIA There is no media in the device. - @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. - @retval EFI_INVALID_PARAMETER The write request contains device addresses that are not - valid for the device. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DISK_WRITE)( - IN EFI_DISK_IO_PROTOCOL *This, - IN UINT32 MediaId, - IN UINT64 Offset, - IN UINTN BufferSize, - IN VOID *Buffer - ); - -#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000 - -/// -/// Revision defined in EFI1.1 -/// -#define EFI_DISK_IO_INTERFACE_REVISION EFI_DISK_IO_PROTOCOL_REVISION - -/// -/// This protocol is used to abstract Block I/O interfaces. -/// -struct _EFI_DISK_IO_PROTOCOL { - /// - /// The revision to which the disk I/O interface adheres. All future - /// 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; -}; - -extern EFI_GUID gEfiDiskIoProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DriverBinding.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DriverBinding.h deleted file mode 100644 index 1f464a730..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/DriverBinding.h +++ /dev/null @@ -1,203 +0,0 @@ -/** @file - UEFI DriverBinding Protocol is defined in UEFI specification. - - 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. - -**/ - -#ifndef __EFI_DRIVER_BINDING_H__ -#define __EFI_DRIVER_BINDING_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// The global ID for the ControllerHandle Driver Protocol. -/// -#define EFI_DRIVER_BINDING_PROTOCOL_GUID \ - { \ - 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \ - } - -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, - it further tests to see if this driver supports creating a handle for the specified child device. - - This function checks to see if the driver specified by This supports the device specified by - ControllerHandle. Drivers will typically use the device path attached to - ControllerHandle and/or the services from the bus I/O abstraction attached to - ControllerHandle to determine if the driver supports ControllerHandle. This function - may be called many times during platform initialization. In order to reduce boot times, the tests - performed by this function must be very small, and take as little time as possible to execute. This - function must not change the state of any hardware devices, and this function must be aware that the - device specified by ControllerHandle may already be managed by the same driver or a - different driver. This function must match its calls to AllocatePages() with FreePages(), - AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). - Because ControllerHandle may have been previously started by the same driver, if a protocol is - already in the opened state, then it must not be closed with CloseProtocol(). This is required - to guarantee the state of ControllerHandle is not modified by this function. - - @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies - an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This - parameter is ignored by device drivers, and is optional for bus - drivers. For bus drivers, if this parameter is not NULL, then - the bus driver must determine if the bus controller specified - by ControllerHandle and the child controller specified - by RemainingDevicePath are both supported by this - bus driver. - - @retval EFI_SUCCESS The device specified by ControllerHandle and - RemainingDevicePath is supported by the driver specified by This. - @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by the driver - specified by This. - @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by a different - driver or an application that requires exclusive access. - Currently not implemented. - @retval EFI_UNSUPPORTED The device specified by ControllerHandle and - RemainingDevicePath is not supported by the driver specified by This. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED)( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL - ); - -/** - Starts a device controller or a bus controller. - - The Start() function is designed to be invoked from the EFI boot service ConnectController(). - As a result, much of the error checking on the parameters to Start() has been moved into this - common boot service. It is legal to call Start() from other locations, - but the following calling restrictions must be followed, or the system behavior will not be deterministic. - 1. ControllerHandle must be a valid EFI_HANDLE. - 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned - EFI_DEVICE_PATH_PROTOCOL. - 3. Prior to calling Start(), the Supported() function for the driver specified by This must - have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. - - @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies - an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This - parameter is ignored by device drivers, and is optional for bus - drivers. For a bus driver, if this parameter is NULL, then handles - for all the children of Controller are created by this driver. - If this parameter is not NULL and the first Device Path Node is - not the End of Device Path Node, then only the handle for the - child device specified by the first Device Path Node of - RemainingDevicePath is created by this driver. - If the first Device Path Node of RemainingDevicePath is - the End of Device Path Node, no child handle is created by this - driver. - - @retval EFI_SUCCESS The device was started. - @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval Others The driver failded to start the device. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DRIVER_BINDING_START)( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL - ); - -/** - Stops a device controller or a bus controller. - - The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). - As a result, much of the error checking on the parameters to Stop() has been moved - into this common boot service. It is legal to call Stop() from other locations, - but the following calling restrictions must be followed, or the system behavior will not be deterministic. - 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this - same driver's Start() function. - 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid - EFI_HANDLE. In addition, all of these handles must have been created in this driver's - Start() function, and the Start() function must have called OpenProtocol() on - ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - - @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver - to use to stop the device. - @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. - @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL - if NumberOfChildren is 0. - - @retval EFI_SUCCESS The device was stopped. - @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_DRIVER_BINDING_STOP)( - IN EFI_DRIVER_BINDING_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN UINTN NumberOfChildren, - IN EFI_HANDLE *ChildHandleBuffer OPTIONAL - ); - -/// -/// This protocol provides the services required to determine if a driver supports a given controller. -/// 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; - - /// - /// The version number of the UEFI driver that produced the - /// EFI_DRIVER_BINDING_PROTOCOL. This field is used by - /// the EFI boot service ConnectController() to determine - /// the order that driver's Supported() service will be used when - /// a controller needs to be started. EFI Driver Binding Protocol - /// instances with higher Version values will be used before ones - /// with lower Version values. The Version values of 0x0- - /// 0x0f and 0xfffffff0-0xffffffff are reserved for - /// platform/OEM specific drivers. The Version values of 0x10- - /// 0xffffffef are reserved for IHV-developed drivers. - /// - UINT32 Version; - - /// - /// The image handle of the UEFI driver that produced this instance - /// of the EFI_DRIVER_BINDING_PROTOCOL. - /// - EFI_HANDLE ImageHandle; - - /// - /// The handle on which this instance of the - /// EFI_DRIVER_BINDING_PROTOCOL is installed. In most - /// cases, this is the same handle as ImageHandle. However, for - /// UEFI drivers that produce more than one instance of the - /// EFI_DRIVER_BINDING_PROTOCOL, this value may not be - /// the same as ImageHandle. - /// - EFI_HANDLE DriverBindingHandle; -}; - -extern EFI_GUID gEfiDriverBindingProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h deleted file mode 100644 index 0c0f56d73..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/FormBrowser2.h +++ /dev/null @@ -1,181 +0,0 @@ -/** @file - This protocol is defined in UEFI spec. - - The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to - leverage the EFI configuration driver interface. - -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. - -**/ - -#ifndef __EFI_FORM_BROWSER2_H__ -#define __EFI_FORM_BROWSER2_H__ - -FILE_LICENCE ( BSD3 ); - -#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; - - - -/** - - @param LeftColumn The value that designates the text column - where the browser window will begin from - the left-hand side of the screen - - @param RightColumn The value that designates the text - column where the browser window will end - on the right-hand side of the screen. - - @param TopRow The value that designates the text row from the - top of the screen where the browser window - will start. - - @param BottomRow The value that designates the text row from the - bottom of the screen where the browser - window will end. -**/ -typedef struct { - 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 - - -/** - Initialize the browser to display the specified configuration forms. - - This function is the primary interface to the internal forms-based browser. - The forms browser will display forms associated with the specified Handles. - The browser will select all forms in packages which have the specified Type - and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid. - - @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance - - @param Handles A pointer to an array of Handles. This value should correspond - to the value of the HII form package that is required to be displayed. - - @param HandleCount The number of Handles specified in Handle. - - @param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the - elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If - FormsetGuid is NULL, then this function will display the form set class - EFI_HII_PLATFORM_SETUP_FORMSET_GUID. - - @param FormId This field specifies the identifier of the form within the form set to render as the first - displayable page. If this field has a value of 0x0000, then the Forms Browser will - render the first enabled form in the form set. - - @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in - characters. - - @param ActionRequest Points to the action recommended by the form. - - @retval EFI_SUCCESS The function completed successfully - - @retval EFI_NOT_FOUND The variable was not found. - - @retval EFI_INVALID_PARAMETER One of the parameters has an - invalid value. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SEND_FORM2)( - 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 - OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL -); - - -/** - This function is called by a callback handler to retrieve uncommitted state data from the browser. - - This routine is called by a routine which was called by the - browser. This routine called this service in the browser to - retrieve or set certain uncommitted state information. - - @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance. - - @param ResultsDataSize A pointer to the size of the buffer - associated with ResultsData. On input, the size in - bytes of ResultsData. On output, the size of data - returned in ResultsData. - - @param ResultsData A string returned from an IFR browser or - equivalent. The results string will have - no routing information in them. - - @param RetrieveData A BOOLEAN field which allows an agent to - retrieve (if RetrieveData = TRUE) data - from the uncommitted browser state - information or set (if RetrieveData = - FALSE) data in the uncommitted browser - state information. - - @param VariableGuid An optional field to indicate the target - variable GUID name to use. - - @param VariableName An optional field to indicate the target - human-readable variable name. - - @retval EFI_SUCCESS The results have been distributed or are - awaiting distribution. - - @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified - was too small to contain the - results data. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_BROWSER_CALLBACK2)( - IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, - IN OUT UINTN *ResultsDataSize, - IN OUT EFI_STRING ResultsData, - IN CONST BOOLEAN RetrieveData, - 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; -} ; - -extern EFI_GUID gEfiFormBrowser2ProtocolGuid; - -#endif - diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/GraphicsOutput.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/GraphicsOutput.h deleted file mode 100644 index 98ca8c9c0..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/GraphicsOutput.h +++ /dev/null @@ -1,278 +0,0 @@ -/** @file - Graphics Output Protocol from the UEFI 2.0 specification. - - 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. - -**/ - -#ifndef __GRAPHICS_OUTPUT_H__ -#define __GRAPHICS_OUTPUT_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ - { \ - 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \ - } - -typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL; - -typedef struct { - UINT32 RedMask; - UINT32 GreenMask; - UINT32 BlueMask; - UINT32 ReservedMask; -} EFI_PIXEL_BITMASK; - -typedef enum { - /// - /// A pixel is 32-bits and byte zero represents red, byte one represents green, - /// byte two represents blue, and byte three is reserved. This is the definition - /// for the physical frame buffer. The byte values for the red, green, and blue - /// components represent the color intensity. This color intensity value range - /// from a minimum intensity of 0 to maximum intensity of 255. - /// - PixelRedGreenBlueReserved8BitPerColor, - /// - /// A pixel is 32-bits and byte zero represents blue, byte one represents green, - /// byte two represents red, and byte three is reserved. This is the definition - /// for the physical frame buffer. The byte values for the red, green, and blue - /// components represent the color intensity. This color intensity value range - /// from a minimum intensity of 0 to maximum intensity of 255. - /// - PixelBlueGreenRedReserved8BitPerColor, - /// - /// The Pixel definition of the physical frame buffer. - /// - PixelBitMask, - /// - /// This mode does not support a physical frame buffer. - /// - PixelBltOnly, - /// - /// Valid EFI_GRAPHICS_PIXEL_FORMAT enum values are less than this value. - /// - PixelFormatMax -} EFI_GRAPHICS_PIXEL_FORMAT; - -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; - /// - /// The size of video screen in pixels in the X dimension. - /// - UINT32 HorizontalResolution; - /// - /// The size of video screen in pixels in the Y dimension. - /// - 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; - /// - /// 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; - /// - /// Defines the number of pixel elements per video memory line. - /// - UINT32 PixelsPerScanLine; -} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION; - -/** - Returns information for an available graphics mode that the graphics device - and the set of active video output devices supports. - - @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. - @param ModeNumber The mode number to return information on. - @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer. - @param Info A pointer to callee allocated buffer that returns information about ModeNumber. - - @retval EFI_SUCCESS Valid mode information was returned. - @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode. - @retval EFI_INVALID_PARAMETER ModeNumber is not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE)( - IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, - IN UINT32 ModeNumber, - OUT UINTN *SizeOfInfo, - OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info - ); - -/** - Set the video device into the specified mode and clears the visible portions of - the output display to black. - - @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. - @param ModeNumber Abstraction that defines the current video mode. - - @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED ModeNumber is not supported by this device. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE)( - IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, - IN UINT32 ModeNumber - ); - -typedef struct { - 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_UNION; - -/// -/// actions for BltOperations -/// -typedef enum { - /// - /// Write data from the BltBuffer pixel (0, 0) - /// directly to every pixel of the video display rectangle - /// (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). - /// Only one pixel will be used from the BltBuffer. Delta is NOT used. - /// - EfiBltVideoFill, - - /// - /// Read data from the video display rectangle - /// (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in - /// the BltBuffer rectangle (DestinationX, DestinationY ) - /// (DestinationX + Width, DestinationY + Height). If DestinationX or - /// DestinationY is not zero then Delta must be set to the length in bytes - /// of a row in the BltBuffer. - /// - EfiBltVideoToBltBuffer, - - /// - /// Write data from the BltBuffer rectangle - /// (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the - /// video display rectangle (DestinationX, DestinationY) - /// (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is - /// not zero then Delta must be set to the length in bytes of a row in the - /// BltBuffer. - /// - EfiBltBufferToVideo, - - /// - /// Copy from the video display rectangle (SourceX, SourceY) - /// (SourceX + Width, SourceY + Height) to the video display rectangle - /// (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). - /// The BltBuffer and Delta are not used in this mode. - /// - EfiBltVideoToVideo, - - EfiGraphicsOutputBltOperationMax -} EFI_GRAPHICS_OUTPUT_BLT_OPERATION; - -/** - Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer. - - @param This Protocol instance pointer. - @param BltBuffer The data to transfer to the graphics screen. - Size is at least Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL). - @param BltOperation The operation to perform when copying BltBuffer on to the graphics screen. - @param SourceX The X coordinate of source for the BltOperation. - @param SourceY The Y coordinate of source for the BltOperation. - @param DestinationX The X coordinate of destination for the BltOperation. - @param DestinationY The Y coordinate of destination for the BltOperation. - @param Width The width of a rectangle in the blt rectangle in pixels. - @param Height The height of a rectangle in the blt rectangle in pixels. - @param Delta Not used for EfiBltVideoFill or the EfiBltVideoToVideo operation. - If a Delta of zero is used, the entire BltBuffer is being operated on. - If a subrectangle of the BltBuffer is being used then Delta - represents the number of bytes in a row of the BltBuffer. - - @retval EFI_SUCCESS BltBuffer was drawn to the graphics screen. - @retval EFI_INVALID_PARAMETER BltOperation is not valid. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - -**/ -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_OPERATION BltOperation, - IN UINTN SourceX, - IN UINTN SourceY, - IN UINTN DestinationX, - IN UINTN DestinationY, - IN UINTN Width, - IN UINTN Height, - IN UINTN Delta OPTIONAL - ); - -typedef struct { - /// - /// The number of modes supported by QueryMode() and SetMode(). - /// - UINT32 MaxMode; - /// - /// Current Mode of the graphics device. Valid mode numbers are 0 to MaxMode -1. - /// - UINT32 Mode; - /// - /// Pointer to read-only EFI_GRAPHICS_OUTPUT_MODE_INFORMATION data. - /// - EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; - /// - /// Size of Info structure in bytes. - /// - 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; - /// - /// Amount of frame buffer needed to support the active mode as defined by - /// PixelsPerScanLine xVerticalResolution x PixelElementSize. - /// - UINTN FrameBufferSize; -} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE; - -/// -/// Provides a basic abstraction to set video modes and copy pixels to and from -/// the graphics controller's frame buffer. The linear address of the hardware -/// 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; - /// - /// Pointer to EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE data. - /// - EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; -}; - -extern EFI_GUID gEfiGraphicsOutputProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h deleted file mode 100644 index 17ce3fdcc..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/HiiConfigAccess.h +++ /dev/null @@ -1,224 +0,0 @@ -/** @file - - The EFI HII results processing protocol invokes this type of protocol - when it needs to forward results to a driver's configuration handler. - This protocol is published by drivers providing and requesting - configuration data from HII. It may only be invoked by HII. - -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. - -**/ - - -#ifndef __EFI_HII_CONFIG_ACCESS_H__ -#define __EFI_HII_CONFIG_ACCESS_H__ - -FILE_LICENCE ( BSD3 ); - -#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 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_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 - -/** - - This function allows the caller to request the current - configuration for one or more named elements. The resulting - string is in <ConfigAltResp> format. Any and all alternative - configuration strings shall also be appended to the end of the - current configuration string. If they are, they must appear - after the current configuration. They must contain the same - routing (GUID, NAME, PATH) as the current configuration string. - They must have an additional description indicating the type of - alternative configuration the string represents, - "ALTCFG=<StringToken>". That <StringToken> (when - converted from Hex UNICODE to binary) is a reference to a - string in the associated string pack. - - @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. - - @param Request A null-terminated Unicode string in - <ConfigRequest> format. Note that this - includes the routing information as well as - the configurable name / value pairs. It is - invalid for this string to be in - <MultiConfigRequest> format. - If a NULL is passed in for the Request field, - all of the settings being abstracted by this function - will be returned in the Results field. In addition, - if a ConfigHdr is passed in with no request elements, - all of the settings being abstracted for that particular - ConfigHdr reference will be returned in the Results Field. - - @param Progress On return, points to a character in the - Request string. Points to the string's null - terminator if request was successful. Points - to the most recent "&" before the first - failing name / value pair (or the beginning - of the string if the failure is in the first - name / value pair) if the request was not - successful. - - @param Results A null-terminated Unicode string in - <MultiConfigAltResp> format which has all values - filled in for the names in the Request string. - String to be allocated by the called function. - - @retval EFI_SUCCESS The Results string is filled with the - values corresponding to all requested - names. - - @retval EFI_OUT_OF_RESOURCES Not enough memory to store the - parts of the results that must be - stored awaiting possible future - protocols. - - @retval EFI_NOT_FOUND A configuration element matching - the routing data is not found. - Progress set to the first character - in the routing header. - - @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set - to most recent "&" before the - error or the beginning of the - string. - - @retval EFI_INVALID_PARAMETER Unknown name. Progress points - to the & before the name in - question. - -**/ -typedef -EFI_STATUS -(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 -); - - -/** - - This function applies changes in a driver's configuration. - Input is a Configuration, which has the routing data for this - driver followed by name / value configuration pairs. The driver - must apply those pairs to its configurable storage. If the - driver's configuration is stored in a linear block of data - and the driver's name / value pairs are in <BlockConfig> - format, it may use the ConfigToBlock helper function (above) to - simplify the job. - - @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. - - @param Configuration A null-terminated Unicode string in - <ConfigString> format. - - @param Progress A pointer to a string filled in with the - offset of the most recent '&' before the - first failing name / value pair (or the - beginn ing of the string if the failure - is in the first name / value pair) or - the terminating NULL if all was - successful. - - @retval EFI_SUCCESS The results have been distributed or are - awaiting distribution. - - @retval EFI_OUT_OF_RESOURCES Not enough memory to store the - parts of the results that must be - stored awaiting possible future - protocols. - - @retval EFI_INVALID_PARAMETERS Passing in a NULL for the - Results parameter would result - in this type of error. - - @retval EFI_NOT_FOUND Target for the specified routing data - was not found - -**/ -typedef -EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)( - IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, - IN CONST EFI_STRING Configuration, - OUT EFI_STRING *Progress -); - -/** - - This function is called to provide results data to the driver. - This data consists of a unique key that is used to identify - which data is either being passed back or being asked for. - - @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. - @param Action Specifies the type of action taken by the browser. - @param QuestionId A unique value which is sent to the original - exporting driver so that it can identify the type - of data to expect. The format of the data tends to - vary based on the opcode that generated the callback. - @param Type The type of value for the question. - @param Value A pointer to the data being sent to the original - exporting driver. - @param ActionRequest On return, points to the action requested by the - callback function. - - @retval EFI_SUCCESS The callback successfully handled the action. - @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the - variable and its data. - @retval EFI_DEVICE_ERROR The variable could not be saved. - @retval EFI_UNSUPPORTED The specified Action is not supported by the - callback. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK)( - IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, - IN EFI_BROWSER_ACTION Action, - IN EFI_QUESTION_ID QuestionId, - IN UINT8 Type, - IN OUT EFI_IFR_TYPE_VALUE *Value, - OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest - ) - ; - -/// -/// This protocol provides a callable interface between the HII and -/// drivers. Only drivers which provide IFR data to HII are required -/// 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; -} ; - -extern EFI_GUID gEfiHiiConfigAccessProtocolGuid; - -#endif - - diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/HiiDatabase.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/HiiDatabase.h deleted file mode 100644 index cbc0108b0..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/HiiDatabase.h +++ /dev/null @@ -1,533 +0,0 @@ -/** @file - 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. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __HII_DATABASE_H__ -#define __HII_DATABASE_H__ - -FILE_LICENCE ( BSD3 ); - -#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; - -#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 - database events have this prototype. The actual event is encoded - in NotifyType. The following table describes how PackageType, - PackageGuid, Handle, and Package are used for each of the - notification types. - - @param PackageType Package type of the notification. - - @param PackageGuid If PackageType is - EFI_HII_PACKAGE_TYPE_GUID, then this is - the pointer to the GUID from the Guid - field of EFI_HII_PACKAGE_GUID_HEADER. - Otherwise, it must be NULL. - - @param Package Points to the package referred to by the notification. - - @param Handle The handle of the package - list which contains the specified package. - - @param NotifyType The type of change concerning the - database. See - EFI_HII_DATABASE_NOTIFY_TYPE. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_NOTIFY)( - IN UINT8 PackageType, - IN CONST EFI_GUID *PackageGuid, - IN CONST EFI_HII_PACKAGE_HEADER *Package, - IN EFI_HII_HANDLE Handle, - IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType -); - -/** - - This function adds the packages in the package list to the - database and returns a handle. If there is a - EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then - this function will create a package of type - EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list. For - each package in the package list, registered functions with the - notification type NEW_PACK and having the same package type will - be called. For each call to NewPackageList(), there should be a - corresponding call to - EFI_HII_DATABASE_PROTOCOL.RemovePackageList(). - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER structure. - - @param DriverHandle Associate the package list with this EFI handle. - If a NULL is specified, this data will not be associate - with any drivers and cannot have a callback induced. - - @param Handle A pointer to the EFI_HII_HANDLE instance. - - @retval EFI_SUCCESS The package list associated with the - Handle was added to the HII database. - - @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary - resources for the new database - contents. - - @retval EFI_INVALID_PARAMETER PackageList is NULL, or Handle is NULL. - -**/ -typedef -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 - OUT EFI_HII_HANDLE *Handle -); - - -/** - - This function removes the package list that is associated with a - handle Handle from the HII database. Before removing the - package, any registered functions with the notification type - REMOVE_PACK and the same package type will be called. For each - call to EFI_HII_DATABASE_PROTOCOL.NewPackageList(), there should - be a corresponding call to RemovePackageList. - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - @param Handle The handle that was registered to the data - that is requested for removal. - - @retval EFI_SUCCESS The data associated with the Handle was - removed from the HII database. - @retval EFI_NOT_FOUND The specified Handle is not in database. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_REMOVE_PACK)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN EFI_HII_HANDLE Handle -); - - -/** - - This function updates the existing package list (which has the - specified Handle) in the HII databases, using the new package - list specified by PackageList. The update process has the - following steps: Collect all the package types in the package - list specified by PackageList. A package type consists of the - Type field of EFI_HII_PACKAGE_HEADER and, if the Type is - EFI_HII_PACKAGE_TYPE_GUID, the Guid field, as defined in - EFI_HII_PACKAGE_GUID_HEADER. Iterate through the packages within - the existing package list in the HII database specified by - Handle. If a package's type matches one of the collected types collected - in step 1, then perform the following steps: - - Call any functions registered with the notification type - REMOVE_PACK. - - Remove the package from the package list and the HII - database. - Add all of the packages within the new package list specified - by PackageList, using the following steps: - - Add the package to the package list and the HII database. - - Call any functions registered with the notification type - ADD_PACK. - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - @param Handle The handle that was registered to the data - that is requested for removal. - - @param PackageList A pointer to an EFI_HII_PACKAGE_LIST - package. - - @retval EFI_SUCCESS The HII database was successfully updated. - - @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory - for the updated database. - - @retval EFI_INVALID_PARAMETER PackageList was NULL. - @retval EFI_NOT_FOUND The specified Handle is not in database. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_UPDATE_PACK)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN EFI_HII_HANDLE Handle, - IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList -); - - -/** - - This function returns a list of the package handles of the - specified type that are currently active in the database. The - pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package - handles to be listed. - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - @param PackageType Specifies the package type of the packages - to list or EFI_HII_PACKAGE_TYPE_ALL for - all packages to be listed. - - @param PackageGuid If PackageType is - EFI_HII_PACKAGE_TYPE_GUID, then this is - the pointer to the GUID which must match - the Guid field of - EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it - must be NULL. - - @param HandleBufferLength On input, a pointer to the length - of the handle buffer. On output, - the length of the handle buffer - that is required for the handles found. - - @param Handle An array of EFI_HII_HANDLE instances returned. - - @retval EFI_SUCCESS The matching handles are outputed successfully. - HandleBufferLength is updated with the actual length. - @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter - indicates that Handle is too - small to support the number of - handles. HandleBufferLength is - updated with a value that will - enable the data to fit. - @retval EFI_NOT_FOUND No matching handle could be found in database. - @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL. - @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not - zero and Handle was NULL. - @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but - PackageGuid is not NULL, PackageType is a EFI_HII_ - PACKAGE_TYPE_GUID but PackageGuid is NULL. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_LIST_PACKS)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN UINT8 PackageType, - IN CONST EFI_GUID *PackageGuid, - IN OUT UINTN *HandleBufferLength, - OUT EFI_HII_HANDLE *Handle -); - -/** - - This function will export one or all package lists in the - database to a buffer. For each package list exported, this - function will call functions registered with EXPORT_PACK and - then copy the package list to the buffer. The registered - functions may call EFI_HII_DATABASE_PROTOCOL.UpdatePackageList() - to modify the package list before it is copied to the buffer. If - the specified BufferSize is too small, then the status - EFI_OUT_OF_RESOURCES will be returned and the actual package - size will be returned in BufferSize. - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - - @param Handle An EFI_HII_HANDLE that corresponds to the - desired package list in the HII database to - export or NULL to indicate all package lists - should be exported. - - @param BufferSize On input, a pointer to the length of the - buffer. On output, the length of the - buffer that is required for the exported - data. - - @param Buffer A pointer to a buffer that will contain the - results of the export function. - - - @retval EFI_SUCCESS Package exported. - - @retval EFI_OUT_OF_RESOURCES BufferSize is too small to hold the package. - - @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the - current database. - - @retval EFI_INVALID_PARAMETER BufferSize was NULL. - - @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero - and Buffer was NULL. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_EXPORT_PACKS)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN EFI_HII_HANDLE Handle, - IN OUT UINTN *BufferSize, - OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer -); - - -/** - - - This function registers a function which will be called when - specified actions related to packages of the specified type - occur in the HII database. By registering a function, other - HII-related drivers are notified when specific package types - are added, removed or updated in the HII database. Each driver - or application which registers a notification should use - EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before - exiting. - - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - @param PackageType The package type. See - EFI_HII_PACKAGE_TYPE_x in EFI_HII_PACKAGE_HEADER. - - @param PackageGuid If PackageType is - EFI_HII_PACKAGE_TYPE_GUID, then this is - the pointer to the GUID which must match - the Guid field of - EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it - must be NULL. - - @param PackageNotifyFn Points to the function to be called - when the event specified by - NotificationType occurs. See - EFI_HII_DATABASE_NOTIFY. - - @param NotifyType Describes the types of notification which - this function will be receiving. See - EFI_HII_DATABASE_NOTIFY_TYPE for a - list of types. - - @param NotifyHandle Points to the unique handle assigned to - the registered notification. Can be used - in EFI_HII_DATABASE_PROTOCOL.UnregisterPack - to stop notifications. - - - @retval EFI_SUCCESS Notification registered successfully. - - @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary - data structures. - - @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when - PackageType is not - EFI_HII_PACKAGE_TYPE_GUID. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_REGISTER_NOTIFY)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN UINT8 PackageType, - IN CONST EFI_GUID *PackageGuid, - IN EFI_HII_DATABASE_NOTIFY PackageNotifyFn, - IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, - OUT EFI_HANDLE *NotifyHandle -); - - -/** - - Removes the specified HII database package-related notification. - - @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - - @param NotificationHandle The handle of the notification - function being unregistered. - - @retval EFI_SUCCESS Successsfully unregistered the notification. - - @retval EFI_NOT_FOUND The incoming notification handle does not exist - in the current hii database. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN EFI_HANDLE NotificationHandle -); - - -/** - - This routine retrieves an array of GUID values for each keyboard - layout that was previously registered in the system. - - @param This A pointer to the EFI_HII_PROTOCOL instance. - - @param KeyGuidBufferLength On input, a pointer to the length - of the keyboard GUID buffer. On - output, the length of the handle - buffer that is required for the - handles found. - - @param KeyGuidBuffer An array of keyboard layout GUID - instances returned. - - @retval EFI_SUCCESS KeyGuidBuffer was updated successfully. - - @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength - parameter indicates that - KeyGuidBuffer is too small to - support the number of GUIDs. - KeyGuidBufferLength is updated - with a value that will enable - the data to fit. - @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL. - @retval EFI_INVALID_PARAMETER The value referenced by - KeyGuidBufferLength is not - zero and KeyGuidBuffer is NULL. - @retval EFI_NOT_FOUND There was no keyboard layout. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_FIND_KEYBOARD_LAYOUTS)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN OUT UINT16 *KeyGuidBufferLength, - OUT EFI_GUID *KeyGuidBuffer -); - - -/** - - This routine retrieves the requested keyboard layout. The layout - is a physical description of the keys on a keyboard, and the - character(s) that are associated with a particular set of key - strokes. - - @param This A pointer to the EFI_HII_PROTOCOL instance. - - @param KeyGuid A pointer to the unique ID associated with a - given keyboard layout. If KeyGuid is NULL then - the current layout will be retrieved. - - @param KeyboardLayoutLength On input, a pointer to the length of the - KeyboardLayout buffer. On output, the length of - the data placed into KeyboardLayout. - - @param KeyboardLayout A pointer to a buffer containing the - retrieved keyboard layout. - - @retval EFI_SUCCESS The keyboard layout was retrieved - successfully. - - @retval EFI_NOT_FOUND The requested keyboard layout was not found. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN CONST EFI_GUID *KeyGuid, - IN OUT UINT16 *KeyboardLayoutLength, - OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout -); - -/** - - This routine sets the default keyboard layout to the one - referenced by KeyGuid. When this routine is called, an event - will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID - group type. This is so that agents which are sensitive to the - current keyboard layout being changed can be notified of this - change. - - @param This A pointer to the EFI_HII_PROTOCOL instance. - - @param KeyGuid A pointer to the unique ID associated with a - given keyboard layout. - - @retval EFI_SUCCESS The current keyboard layout was successfully set. - - @retval EFI_NOT_FOUND The referenced keyboard layout was not - found, so action was taken. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT)( - IN CONST EFI_HII_DATABASE_PROTOCOL *This, - IN CONST EFI_GUID *KeyGuid -); - -/** - - Return the EFI handle associated with a package list. - - @param This A pointer to the EFI_HII_PROTOCOL instance. - - @param PackageListHandle An EFI_HII_HANDLE that corresponds - to the desired package list in the - HIIdatabase. - - @param DriverHandle On return, contains the EFI_HANDLE which - was registered with the package list in - NewPackageList(). - - @retval EFI_SUCCESS The DriverHandle was returned successfully. - - @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_HII_DATABASE_GET_PACK_HANDLE)( - 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; -}; - -extern EFI_GUID gEfiHiiDatabaseProtocolGuid; - -#endif - - diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Ip4.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Ip4.h deleted file mode 100644 index f174c0cfb..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Ip4.h +++ /dev/null @@ -1,614 +0,0 @@ -/** @file - This file defines the EFI IPv4 (Internet Protocol version 4) - Protocol interface. It is split into the following three main - sections: - - EFI IPv4 Service Binding Protocol - - EFI IPv4 Variable (deprecated in UEFI 2.4B) - - EFI IPv4 Protocol. - The EFI IPv4 Protocol provides basic network IPv4 packet I/O services, - which includes support foR a subset of the Internet Control Message - 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. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.0. - -**/ - -#ifndef __EFI_IP4_PROTOCOL_H__ -#define __EFI_IP4_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Protocol/ManagedNetwork.h> - -#define EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0xc51711e7, 0xb4bf, 0x404a, {0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } \ - } - -#define EFI_IP4_PROTOCOL_GUID \ - { \ - 0x41d94cd2, 0x35b6, 0x455a, {0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } \ - } - -typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL; - -/// -/// EFI_IP4_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more. -/// 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_IP4_ADDRESS_PAIR; - -/// -/// EFI_IP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more. -/// The definition in here is only present to provide backwards compatability. -/// -typedef struct { - EFI_HANDLE DriverHandle; - UINT32 AddressCount; - EFI_IP4_ADDRESS_PAIR AddressPairs[1]; -} EFI_IP4_VARIABLE_DATA; - -typedef struct { - /// - /// The default IPv4 protocol packets to send and receive. Ignored - /// when AcceptPromiscuous is TRUE. - /// - 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; - /// - /// Set to TRUE to receive ICMP error report packets. Ignored when - /// AcceptPromiscuous or AcceptAnyProtocol is TRUE. - /// - 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; - /// - /// 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; - /// - /// Set to TRUE to use the default IPv4 address and default routing table. - /// - BOOLEAN UseDefaultAddress; - /// - /// The station IPv4 address that will be assigned to this EFI IPv4Protocol instance. - /// - EFI_IPv4_ADDRESS StationAddress; - /// - /// The subnet address mask that is associated with the station address. - /// - EFI_IPv4_ADDRESS SubnetMask; - /// - /// TypeOfService field in transmitted IPv4 packets. - /// - UINT8 TypeOfService; - /// - /// TimeToLive field in transmitted IPv4 packets. - /// - UINT8 TimeToLive; - /// - /// State of the DoNotFragment bit in transmitted IPv4 packets. - /// - 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; - /// - /// 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; - /// - /// 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; -} EFI_IP4_CONFIG_DATA; - - -typedef struct { - EFI_IPv4_ADDRESS SubnetAddress; - EFI_IPv4_ADDRESS SubnetMask; - EFI_IPv4_ADDRESS GatewayAddress; -} EFI_IP4_ROUTE_TABLE; - -typedef struct { - 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; - /// - /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed. - /// - UINT32 MaxPacketSize; - /// - /// Current configuration settings. - /// - EFI_IP4_CONFIG_DATA ConfigData; - /// - /// Set to TRUE when the EFI IPv4 Protocol instance has a station address and subnet mask. - /// - BOOLEAN IsConfigured; - /// - /// Number of joined multicast groups. - /// - UINT32 GroupCount; - /// - /// List of joined multicast group addresses. - /// - EFI_IPv4_ADDRESS *GroupTable; - /// - /// Number of entries in the routing table. - /// - UINT32 RouteCount; - /// - /// Routing table entries. - /// - EFI_IP4_ROUTE_TABLE *RouteTable; - /// - /// Number of entries in the supported ICMP types list. - /// - UINT32 IcmpTypeCount; - /// - /// Array of ICMP types and codes that are supported by this EFI IPv4 Protocol driver - /// - 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; -} EFI_IP4_HEADER; -#pragma pack() - - -typedef struct { - 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_IP4_RECEIVE_DATA; - - -typedef struct { - 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_IP4_TRANSMIT_DATA; - -typedef struct { - /// - /// This Event will be signaled after the Status field is updated - /// by the EFI IPv4 Protocol driver. The type of Event must be - /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of - /// Event must be lower than or equal to TPL_CALLBACK. - /// - 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; - union { - /// - /// When this token is used for receiving, RxData is a pointer to the EFI_IP4_RECEIVE_DATA. - /// - 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; - } Packet; -} EFI_IP4_COMPLETION_TOKEN; - -/** - Gets the current operational settings for this instance of the EFI IPv4 Protocol driver. - - The GetModeData() function returns the current operational mode data for this - driver instance. The data fields in EFI_IP4_MODE_DATA are read only. This - function is used optionally to retrieve the operational mode data of underlying - networks or drivers. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param Ip4ModeData The pointer to the EFI IPv4 Protocol mode data structure. - @param MnpConfigData The pointer to the managed network configuration data structure. - @param SnpModeData The pointer to the simple network mode data structure. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_GET_MODE_DATA)( - IN CONST EFI_IP4_PROTOCOL *This, - OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, - OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, - OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL - ); - -/** - Assigns an IPv4 address and subnet mask to this EFI IPv4 Protocol driver instance. - - The Configure() function is used to set, change, or reset the operational - parameters and filter settings for this EFI IPv4 Protocol instance. Until these - parameters have been set, no network traffic can be sent or received by this - instance. Once the parameters have been reset (by calling this function with - IpConfigData set to NULL), no more traffic can be sent or received until these - parameters have been set again. Each EFI IPv4 Protocol instance can be started - and stopped independently of each other by enabling or disabling their receive - filter settings with the Configure() function. - - When IpConfigData.UseDefaultAddress is set to FALSE, the new station address will - be appended as an alias address into the addresses list in the EFI IPv4 Protocol - driver. While set to TRUE, Configure() will trigger the EFI_IP4_CONFIG_PROTOCOL - to retrieve the default IPv4 address if it is not available yet. Clients could - frequently call GetModeData() to check the status to ensure that the default IPv4 - address is ready. - - If operational parameters are reset or changed, any pending transmit and receive - requests will be cancelled. Their completion token status will be set to EFI_ABORTED - and their events will be signaled. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param IpConfigData The pointer to the EFI IPv4 Protocol configuration data structure. - - @retval EFI_SUCCESS The driver instance was successfully opened. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - This is NULL. - IpConfigData.StationAddress is not a unicast IPv4 address. - IpConfigData.SubnetMask is not a valid IPv4 subnet - @retval EFI_UNSUPPORTED One or more of the following conditions is TRUE: - A configuration protocol (DHCP, BOOTP, RARP, etc.) could - not be located when clients choose to use the default IPv4 - address. This EFI IPv4 Protocol implementation does not - support this requested filter or timeout setting. - @retval EFI_OUT_OF_RESOURCES The EFI IPv4 Protocol driver instance data could not be allocated. - @retval EFI_ALREADY_STARTED The interface is already open and must be stopped before the - IPv4 address or subnet mask can be changed. The interface must - also be stopped when switching to/from raw packet mode. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI IPv4 - Protocol driver instance is not opened. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_CONFIGURE)( - IN EFI_IP4_PROTOCOL *This, - IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL - ); - -/** - Joins and leaves multicast groups. - - The Groups() function is used to join and leave multicast group sessions. Joining - a group will enable reception of matching multicast packets. Leaving a group will - disable the multicast packet reception. - - If JoinFlag is FALSE and GroupAddress is NULL, all joined groups will be left. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param JoinFlag Set to TRUE to join the multicast group session and FALSE to leave. - @param GroupAddress The pointer to the IPv4 multicast address. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER One or more of the following is TRUE: - - This is NULL. - - JoinFlag is TRUE and GroupAddress is NULL. - - GroupAddress is not NULL and *GroupAddress is - not a multicast IPv4 address. - @retval EFI_NOT_STARTED This instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_OUT_OF_RESOURCES System resources could not be allocated. - @retval EFI_UNSUPPORTED This EFI IPv4 Protocol implementation does not support multicast groups. - @retval EFI_ALREADY_STARTED The group address is already in the group table (when - JoinFlag is TRUE). - @retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is FALSE). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_GROUPS)( - IN EFI_IP4_PROTOCOL *This, - IN BOOLEAN JoinFlag, - IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL - ); - -/** - Adds and deletes routing table entries. - - The Routes() function adds a route to or deletes a route from the routing table. - - Routes are determined by comparing the SubnetAddress with the destination IPv4 - address arithmetically AND-ed with the SubnetMask. The gateway address must be - on the same subnet as the configured station address. - - The default route is added with SubnetAddress and SubnetMask both set to 0.0.0.0. - The default route matches all destination IPv4 addresses that do not match any - other routes. - - A GatewayAddress that is zero is a nonroute. Packets are sent to the destination - IP address if it can be found in the ARP cache or on the local subnet. One automatic - nonroute entry will be inserted into the routing table for outgoing packets that - are addressed to a local subnet (gateway address of 0.0.0.0). - - Each EFI IPv4 Protocol instance has its own independent routing table. Those EFI - IPv4 Protocol instances that use the default IPv4 address will also have copies - of the routing table that was provided by the EFI_IP4_CONFIG_PROTOCOL, and these - copies will be updated whenever the EIF IPv4 Protocol driver reconfigures its - instances. As a result, client modification to the routing table will be lost. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param DeleteRoute Set to TRUE to delete this route from the routing table. Set to - FALSE to add this route to the routing table. SubnetAddress - and SubnetMask are used as the key to each route entry. - @param SubnetAddress The address of the subnet that needs to be routed. - @param SubnetMask The subnet mask of SubnetAddress. - @param GatewayAddress The unicast gateway IPv4 address for this route. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_NOT_STARTED The driver instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - SubnetAddress is NULL. - - SubnetMask is NULL. - - GatewayAddress is NULL. - - *SubnetAddress is not a valid subnet address. - - *SubnetMask is not a valid subnet mask. - - *GatewayAddress is not a valid unicast IPv4 address. - @retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table. - @retval EFI_NOT_FOUND This route is not in the routing table (when DeleteRoute is TRUE). - @retval EFI_ACCESS_DENIED The route is already defined in the routing table (when - DeleteRoute is FALSE). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_ROUTES)( - IN EFI_IP4_PROTOCOL *This, - IN BOOLEAN DeleteRoute, - IN EFI_IPv4_ADDRESS *SubnetAddress, - IN EFI_IPv4_ADDRESS *SubnetMask, - IN EFI_IPv4_ADDRESS *GatewayAddress - ); - -/** - Places outgoing data packets into the transmit queue. - - The Transmit() function places a sending request in the transmit queue of this - EFI IPv4 Protocol instance. Whenever the packet in the token is sent out or some - errors occur, the event in the token will be signaled and the status is updated. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param Token The pointer to the transmit token. - - @retval EFI_SUCCESS The data has been queued for transmission. - @retval EFI_NOT_STARTED This instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more pameters are invalid. - @retval EFI_ACCESS_DENIED The transmit completion token with the same Token.Event - was already in the transmit queue. - @retval EFI_NOT_READY The completion token could not be queued because the transmit - queue is full. - @retval EFI_NOT_FOUND Not route is found to destination address. - @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data. - @retval EFI_BUFFER_TOO_SMALL Token.Packet.TxData.TotalDataLength is too - short to transmit. - @retval EFI_BAD_BUFFER_SIZE The length of the IPv4 header + option length + total data length is - greater than MTU (or greater than the maximum packet size if - Token.Packet.TxData.OverrideData. - DoNotFragment is TRUE.) - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_TRANSMIT)( - IN EFI_IP4_PROTOCOL *This, - IN EFI_IP4_COMPLETION_TOKEN *Token - ); - -/** - Places a receiving request into the receiving queue. - - The Receive() function places a completion token into the receive packet queue. - This function is always asynchronous. - - The Token.Event field in the completion token must be filled in by the caller - and cannot be NULL. When the receive operation completes, the EFI IPv4 Protocol - driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event - is signaled. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param Token The pointer to a token that is associated with the receive data descriptor. - - @retval EFI_SUCCESS The receive completion token was cached. - @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, RARP, etc.) - is not finished yet. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - Token is NULL. - - Token.Event is NULL. - @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system - resources (usually memory). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - The EFI IPv4 Protocol instance has been reset to startup defaults. - @retval EFI_ACCESS_DENIED The receive completion token with the same Token.Event was already - in the receive queue. - @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full. - @retval EFI_ICMP_ERROR An ICMP error packet was received. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_RECEIVE)( - IN EFI_IP4_PROTOCOL *This, - IN EFI_IP4_COMPLETION_TOKEN *Token - ); - -/** - Abort an asynchronous transmit or receive request. - - The Cancel() function is used to abort a pending transmit or receive request. - If the token is in the transmit or receive request queues, after calling this - function, Token->Status will be set to EFI_ABORTED and then Token->Event will - be signaled. If the token is not in one of the queues, which usually means the - asynchronous operation has completed, this function will not signal the token - and EFI_NOT_FOUND is returned. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - @param Token The pointer to a token that has been issued by - EFI_IP4_PROTOCOL.Transmit() or - EFI_IP4_PROTOCOL.Receive(). If NULL, all pending - tokens are aborted. Type EFI_IP4_COMPLETION_TOKEN is - defined in EFI_IP4_PROTOCOL.Transmit(). - - @retval EFI_SUCCESS The asynchronous I/O request was aborted and - Token->Event was signaled. When Token is NULL, all - pending requests were aborted and their events were signaled. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED This instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was - not found in the transmit or receive queue. It has either completed - or was not issued by Transmit() and Receive(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_CANCEL)( - IN EFI_IP4_PROTOCOL *This, - IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL - ); - -/** - Polls for incoming data packets and processes outgoing data packets. - - The Poll() function polls for incoming data packets and processes outgoing data - packets. Network drivers and applications can call the EFI_IP4_PROTOCOL.Poll() - function to increase the rate that data packets are moved between the communications - device and the transmit and receive queues. - - In some systems the periodic timer event may not poll the underlying communications - device fast enough to transmit and/or receive all data packets without missing - incoming packets or dropping outgoing packets. Drivers and applications that are - experiencing packet loss should try calling the EFI_IP4_PROTOCOL.Poll() function - more often. - - @param This The pointer to the EFI_IP4_PROTOCOL instance. - - @retval EFI_SUCCESS Incoming or outgoing data was processed. - @retval EFI_NOT_STARTED This EFI IPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_NOT_READY No incoming or outgoing data is processed. - @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. - Consider increasing the polling rate. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_POLL)( - IN EFI_IP4_PROTOCOL *This - ); - -/// -/// The EFI IPv4 Protocol implements a simple packet-oriented interface that can be -/// 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; -}; - -extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiIp4ProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Ip4Config.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Ip4Config.h deleted file mode 100644 index 227ae0399..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Ip4Config.h +++ /dev/null @@ -1,184 +0,0 @@ -/** @file - 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. - - @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 ); - -#include <ipxe/efi/Protocol/Ip4.h> - -#define EFI_IP4_CONFIG_PROTOCOL_GUID \ - { \ - 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } \ - } - -typedef struct _EFI_IP4_CONFIG_PROTOCOL EFI_IP4_CONFIG_PROTOCOL; - -#define IP4_CONFIG_VARIABLE_ATTRIBUTES \ - (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS) - -/// -/// EFI_IP4_IPCONFIG_DATA contains the minimum IPv4 configuration data -/// that is needed to start basic network communication. The StationAddress -/// and SubnetMask must be a valid unicast IP address and subnet mask. -/// If RouteTableSize is not zero, then RouteTable contains a properly -/// formatted routing table for the StationAddress/SubnetMask, with the -/// last entry in the table being the default route. -/// -typedef struct { - /// - /// Default station IP address, stored in network byte order. - /// - EFI_IPv4_ADDRESS StationAddress; - /// - /// Default subnet mask, stored in network byte order. - /// - EFI_IPv4_ADDRESS SubnetMask; - /// - /// Number of entries in the following RouteTable. May be zero. - /// - UINT32 RouteTableSize; - /// - /// Default routing table data (stored in network byte order). - /// Ignored if RouteTableSize is zero. - /// - EFI_IP4_ROUTE_TABLE *RouteTable; -} EFI_IP4_IPCONFIG_DATA; - - -/** - Starts running the configuration policy for the EFI IPv4 Protocol driver. - - The Start() function is called to determine and to begin the platform - configuration policy by the EFI IPv4 Protocol driver. This determination may - be as simple as returning EFI_UNSUPPORTED if there is no EFI IPv4 Protocol - driver configuration policy. It may be as involved as loading some defaults - from nonvolatile storage, downloading dynamic data from a DHCP server, and - checking permissions with a site policy server. - Starting the configuration policy is just the beginning. It may finish almost - instantly or it may take several minutes before it fails to retrieve configuration - information from one or more servers. Once the policy is started, drivers - should use the DoneEvent parameter to determine when the configuration policy - has completed. EFI_IP4_CONFIG_PROTOCOL.GetData() must then be called to - determine if the configuration succeeded or failed. - Until the configuration completes successfully, EFI IPv4 Protocol driver instances - that are attempting to use default configurations must return EFI_NO_MAPPING. - Once the configuration is complete, the EFI IPv4 Configuration Protocol driver - signals DoneEvent. The configuration may need to be updated in the future. - Note that in this case the EFI IPv4 Configuration Protocol driver must signal - ReconfigEvent, and all EFI IPv4 Protocol driver instances that are using default - configurations must return EFI_NO_MAPPING until the configuration policy has - been rerun. - - @param This The pointer to the EFI_IP4_CONFIG_PROTOCOL instance. - @param DoneEvent Event that will be signaled when the EFI IPv4 - Protocol driver configuration policy completes - execution. This event must be of type EVT_NOTIFY_SIGNAL. - @param ReconfigEvent Event that will be signaled when the EFI IPv4 - Protocol driver configuration needs to be updated. - This event must be of type EVT_NOTIFY_SIGNAL. - - @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol - driver is now running. - @retval EFI_INVALID_PARAMETER One or more of the following parameters is NULL: - This - DoneEvent - ReconfigEvent - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol - driver was already started. - @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred. - @retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol - driver configuration. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG_START)( - IN EFI_IP4_CONFIG_PROTOCOL *This, - IN EFI_EVENT DoneEvent, - IN EFI_EVENT ReconfigEvent - ); - -/** - Stops running the configuration policy for the EFI IPv4 Protocol driver. - - The Stop() function stops the configuration policy for the EFI IPv4 Protocol driver. - All configuration data will be lost after calling Stop(). - - @param This The pointer to the EFI_IP4_CONFIG_PROTOCOL instance. - - @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol - driver has been stopped. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol - driver was not started. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG_STOP)( - IN EFI_IP4_CONFIG_PROTOCOL *This - ); - -/** - Returns the default configuration data (if any) for the EFI IPv4 Protocol driver. - - The GetData() function returns the current configuration data for the EFI IPv4 - Protocol driver after the configuration policy has completed. - - @param This The pointer to the EFI_IP4_CONFIG_PROTOCOL instance. - @param IpConfigDataSize On input, the size of the IpConfigData buffer. - On output, the count of bytes that were written - into the IpConfigData buffer. - @param IpConfigData The pointer to the EFI IPv4 Configuration Protocol - driver configuration data structure. - Type EFI_IP4_IPCONFIG_DATA is defined in - "Related Definitions" below. - - @retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol - driver is not running. - @retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running. - @retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete. - @retval EFI_BUFFER_TOO_SMALL *IpConfigDataSize is smaller than the configuration - data buffer or IpConfigData is NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG_GET_DATA)( - IN EFI_IP4_CONFIG_PROTOCOL *This, - IN OUT UINTN *IpConfigDataSize, - OUT EFI_IP4_IPCONFIG_DATA *IpConfigData OPTIONAL - ); - -/// -/// The EFI_IP4_CONFIG_PROTOCOL driver performs platform-dependent and policy-dependent -/// 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; -}; - -extern EFI_GUID gEfiIp4ConfigProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h deleted file mode 100644 index 99387e89f..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile.h +++ /dev/null @@ -1,90 +0,0 @@ -/** @file - Load File protocol as defined in the UEFI 2.0 specification. - - The load file protocol exists to supports the addition of new boot devices, - and to support booting from devices that do not map well to file system. - Network boot is done via a LoadFile protocol. - - UEFI 2.0 can boot from any device that produces a LoadFile 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. - -**/ - -#ifndef __EFI_LOAD_FILE_PROTOCOL_H__ -#define __EFI_LOAD_FILE_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_LOAD_FILE_PROTOCOL_GUID \ - { \ - 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \ - } - -/// -/// Protocol Guid defined by EFI1.1. -/// -#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; - -/** - Causes the driver to load a specified file. - - @param This Protocol instance pointer. - @param FilePath The device specific path of the file to load. - @param BootPolicy If TRUE, indicates that the request originates from the - boot manager is attempting to load FilePath as a boot - selection. If FALSE, then FilePath must match as exact file - to be loaded. - @param BufferSize On input the size of Buffer in bytes. On output with a return - code of EFI_SUCCESS, the amount of data transferred to - Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, - the size of Buffer required to retrieve the requested file. - @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL, - then the size of the requested file is returned in - BufferSize. - - @retval EFI_SUCCESS The file was loaded. - @retval EFI_UNSUPPORTED The device does not support the provided BootPolicy - @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or - BufferSize is NULL. - @retval EFI_NO_MEDIA No medium was present to load the file. - @retval EFI_DEVICE_ERROR The file was not loaded due to a device error. - @retval EFI_NO_RESPONSE The remote system did not respond. - @retval EFI_NOT_FOUND The file was not found. - @retval EFI_ABORTED The file load process was manually cancelled. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LOAD_FILE)( - IN EFI_LOAD_FILE_PROTOCOL *This, - IN EFI_DEVICE_PATH_PROTOCOL *FilePath, - IN BOOLEAN BootPolicy, - IN OUT UINTN *BufferSize, - IN VOID *Buffer OPTIONAL - ); - -/// -/// 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; -}; - -extern EFI_GUID gEfiLoadFileProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile2.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile2.h deleted file mode 100644 index 6cb26fff9..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadFile2.h +++ /dev/null @@ -1,87 +0,0 @@ -/** @file - Load File protocol as defined in the UEFI 2.0 specification. - - Load file protocol exists to supports the addition of new boot devices, - and to support booting from devices that do not map well to file system. - Network boot is done via a LoadFile protocol. - - 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. - -**/ - -#ifndef __EFI_LOAD_FILE2_PROTOCOL_H__ -#define __EFI_LOAD_FILE2_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_LOAD_FILE2_PROTOCOL_GUID \ - { \ - 0x4006c0c1, 0xfcb3, 0x403e, {0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d } \ - } - -/// -/// Protocol Guid defined by UEFI2.1. -/// -#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. - - @param This Protocol instance pointer. - @param FilePath The device specific path of the file to load. - @param BootPolicy Should always be FALSE. - @param BufferSize On input the size of Buffer in bytes. On output with a return - code of EFI_SUCCESS, the amount of data transferred to - Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, - the size of Buffer required to retrieve the requested file. - @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL, - then no the size of the requested file is returned in - BufferSize. - - @retval EFI_SUCCESS The file was loaded. - @retval EFI_UNSUPPORTED BootPolicy is TRUE. - @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or - BufferSize is NULL. - @retval EFI_NO_MEDIA No medium was present to load the file. - @retval EFI_DEVICE_ERROR The file was not loaded due to a device error. - @retval EFI_NO_RESPONSE The remote system did not respond. - @retval EFI_NOT_FOUND The file was not found - @retval EFI_ABORTED The file load process was manually canceled. - @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current - directory entry. BufferSize has been updated with - the size needed to complete the request. - - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LOAD_FILE2)( - IN EFI_LOAD_FILE2_PROTOCOL *This, - IN EFI_DEVICE_PATH_PROTOCOL *FilePath, - IN BOOLEAN BootPolicy, - IN OUT UINTN *BufferSize, - IN VOID *Buffer OPTIONAL - ); - -/// -/// 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; -}; - -extern EFI_GUID gEfiLoadFile2ProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadedImage.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadedImage.h deleted file mode 100755 index cbe4103c4..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/LoadedImage.h +++ /dev/null @@ -1,90 +0,0 @@ -/** @file - UEFI 2.0 Loaded image protocol definition. - - 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. - -**/ - -#ifndef __LOADED_IMAGE_PROTOCOL_H__ -#define __LOADED_IMAGE_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_LOADED_IMAGE_PROTOCOL_GUID \ - { \ - 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \ - } - -#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ - { \ - 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \ - } - -/// -/// Protocol GUID defined in EFI1.1. -/// -#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID - -/// -/// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h -/// -#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000 - -/// -/// Revision defined in EFI1.1. -/// -#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. - - // - // 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. - - // - // Images 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; -} EFI_LOADED_IMAGE_PROTOCOL; - -// -// For backward-compatible with EFI1.1. -// -typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE; - -extern EFI_GUID gEfiLoadedImageProtocolGuid; -extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ManagedNetwork.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ManagedNetwork.h deleted file mode 100644 index 2bd092269..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/ManagedNetwork.h +++ /dev/null @@ -1,374 +0,0 @@ -/** @file - 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. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.0 - -**/ - -#ifndef __EFI_MANAGED_NETWORK_PROTOCOL_H__ -#define __EFI_MANAGED_NETWORK_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Protocol/SimpleNetwork.h> - -#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0xf36ff770, 0xa7e1, 0x42cf, {0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } \ - } - -#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \ - { \ - 0x7ab33a91, 0xace5, 0x4326, { 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 } \ - } - -typedef struct _EFI_MANAGED_NETWORK_PROTOCOL EFI_MANAGED_NETWORK_PROTOCOL; - -typedef struct { - /// - /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed - /// from the MNP receive queue will be dropped if its receive timeout expires. - /// - UINT32 ReceivedQueueTimeoutValue; - /// - /// Timeout value for a UEFI one-shot timer event. A packet that has not been removed - /// from the MNP transmit queue will be dropped if its receive timeout expires. - /// - UINT32 TransmitQueueTimeoutValue; - /// - /// Ethernet type II 16-bit protocol type in host byte order. Valid - /// values are zero and 1,500 to 65,535. - /// - UINT16 ProtocolTypeFilter; - /// - /// Set to TRUE to receive packets that are sent to the network - /// device MAC address. The startup default value is FALSE. - /// - BOOLEAN EnableUnicastReceive; - /// - /// Set to TRUE to receive packets that are sent to any of the - /// active multicast groups. The startup default value is FALSE. - /// - BOOLEAN EnableMulticastReceive; - /// - /// Set to TRUE to receive packets that are sent to the network - /// device broadcast address. The startup default value is FALSE. - /// - BOOLEAN EnableBroadcastReceive; - /// - /// Set to TRUE to receive packets that are sent to any MAC address. - /// The startup default value is FALSE. - /// - BOOLEAN EnablePromiscuousReceive; - /// - /// Set to TRUE to drop queued packets when the configuration - /// is changed. The startup default value is FALSE. - /// - BOOLEAN FlushQueuesOnReset; - /// - /// Set to TRUE to timestamp all packets when they are received - /// by the MNP. Note that timestamps may be unsupported in some - /// MNP implementations. The startup default value is FALSE. - /// - BOOLEAN EnableReceiveTimestamps; - /// - /// Set to TRUE to disable background polling in this MNP - /// instance. Note that background polling may not be supported in - /// all MNP implementations. The startup default value is FALSE, - /// unless background polling is not supported. - /// - BOOLEAN DisableBackgroundPolling; -} 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_MANAGED_NETWORK_RECEIVE_DATA; - -typedef struct { - 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_MANAGED_NETWORK_TRANSMIT_DATA; - - -typedef struct { - /// - /// This Event will be signaled after the Status field is updated - /// by the MNP. The type of Event must be - /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of - /// Event must be lower than or equal to TPL_CALLBACK. - /// - 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; - 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; - /// - /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA. - /// - EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData; - } Packet; -} EFI_MANAGED_NETWORK_COMPLETION_TOKEN; - -/** - Returns the operational parameters for the current MNP child driver. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param MnpConfigData The pointer to storage for MNP operational parameters. - @param SnpModeData The pointer to storage for SNP operational parameters. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. The default - values are returned in MnpConfigData if it is not NULL. - @retval Other The mode data could not be read. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, - OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL - ); - -/** - Sets or clears the operational parameters for the MNP child driver. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param MnpConfigData The pointer to configuration data that will be assigned to the MNP - child driver instance. If NULL, the MNP child driver instance is - reset to startup defaults and all pending transmit and receive - requests are flushed. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES Required system resources (usually memory) could not be - allocated. - @retval EFI_UNSUPPORTED The requested feature is unsupported in this [MNP] - implementation. - @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. - @retval Other The MNP child driver instance has been reset to startup defaults. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL - ); - -/** - Translates an IP multicast address to a hardware (MAC) multicast address. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address. - Set to FALSE if IpAddress is an IPv4 multicast address. - @param IpAddress The pointer to the multicast IP address (in network byte order) to convert. - @param MacAddress The pointer to the resulting multicast MAC address. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE: - - This is NULL. - - IpAddress is NULL. - - *IpAddress is not a valid multicast IP address. - - MacAddress is NULL. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. - @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation. - @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. - @retval Other The address could not be converted. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN BOOLEAN Ipv6Flag, - IN EFI_IP_ADDRESS *IpAddress, - OUT EFI_MAC_ADDRESS *MacAddress - ); - -/** - Enables and disables receive filters for multicast address. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param JoinFlag Set to TRUE to join this multicast group. - Set to FALSE to leave this multicast group. - @param MacAddress The pointer to the multicast MAC group (address) to join or leave. - - @retval EFI_SUCCESS The requested operation completed successfully. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - JoinFlag is TRUE and MacAddress is NULL. - - *MacAddress is not a valid multicast MAC address. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. - @retval EFI_ALREADY_STARTED The supplied multicast group is already joined. - @retval EFI_NOT_FOUND The supplied multicast group is not joined. - @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. - @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP implementation. - @retval Other The requested operation could not be completed. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_GROUPS)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN BOOLEAN JoinFlag, - IN EFI_MAC_ADDRESS *MacAddress OPTIONAL - ); - -/** - Places asynchronous outgoing data packets into the transmit queue. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param Token The pointer to a token associated with the transmit data descriptor. - - @retval EFI_SUCCESS The transmit completion token was cached. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_ACCESS_DENIED The transmit completion token is already in the transmit queue. - @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources - (usually memory). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_NOT_READY The transmit request could not be queued because the transmit queue is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token - ); - -/** - Places an asynchronous receiving request into the receiving queue. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param Token The pointer to a token associated with the receive data descriptor. - - @retval EFI_SUCCESS The receive completion token was cached. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - Token is NULL. - - Token.Event is NULL. - @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a lack of system resources - (usually memory). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_ACCESS_DENIED The receive completion token was already in the receive queue. - @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token - ); - - -/** - Aborts an asynchronous transmit or receive request. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - @param Token The pointer to a token that has been issued by - EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or - EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If - NULL, all pending tokens are aborted. - - @retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event - was signaled. When Token is NULL, all pending requests were - aborted and their events were signaled. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was - not found in the transmit or receive queue. It has either completed - or was not issued by Transmit() and Receive(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_CANCEL)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This, - IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL - ); - -/** - Polls for incoming data packets and processes outgoing data packets. - - @param This The pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance. - - @retval EFI_SUCCESS Incoming or outgoing data was processed. - @retval EFI_NOT_STARTED This MNP child driver instance has not been configured. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_NOT_READY No incoming or outgoing data was processed. Consider increasing - the polling rate. - @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. - Consider increasing the polling rate. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MANAGED_NETWORK_POLL)( - IN EFI_MANAGED_NETWORK_PROTOCOL *This - ); - -/// -/// The MNP is used by network applications (and drivers) to -/// 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; -}; - -extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid; -extern EFI_GUID gEfiManagedNetworkProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Mtftp4.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Mtftp4.h deleted file mode 100644 index 0e961cfd4..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Mtftp4.h +++ /dev/null @@ -1,595 +0,0 @@ -/** @file - EFI Multicast Trivial File Tranfer 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. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.0 - -**/ - -#ifndef __EFI_MTFTP4_PROTOCOL_H__ -#define __EFI_MTFTP4_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0x2FE800BE, 0x8F01, 0x4aa6, {0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } \ - } - -#define EFI_MTFTP4_PROTOCOL_GUID \ - { \ - 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; - -// -//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 - -// -// MTFTP4 error code definition -// -#define EFI_MTFTP4_ERRORCODE_NOT_DEFINED 0 -#define EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND 1 -#define EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION 2 -#define EFI_MTFTP4_ERRORCODE_DISK_FULL 3 -#define EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION 4 -#define EFI_MTFTP4_ERRORCODE_UNKNOWN_TRANSFER_ID 5 -#define EFI_MTFTP4_ERRORCODE_FILE_ALREADY_EXISTS 6 -#define EFI_MTFTP4_ERRORCODE_NO_SUCH_USER 7 -#define EFI_MTFTP4_ERRORCODE_REQUEST_DENIED 8 - -// -// MTFTP4 pacekt definitions -// -#pragma pack(1) - -typedef struct { - UINT16 OpCode; - UINT8 Filename[1]; -} EFI_MTFTP4_REQ_HEADER; - -typedef struct { - UINT16 OpCode; - UINT8 Data[1]; -} EFI_MTFTP4_OACK_HEADER; - -typedef struct { - UINT16 OpCode; - UINT16 Block; - UINT8 Data[1]; -} EFI_MTFTP4_DATA_HEADER; - -typedef struct { - UINT16 OpCode; - UINT16 Block[1]; -} EFI_MTFTP4_ACK_HEADER; - -typedef struct { - UINT16 OpCode; - UINT64 Block; - UINT8 Data[1]; -} EFI_MTFTP4_DATA8_HEADER; - -typedef struct { - UINT16 OpCode; - UINT64 Block[1]; -} EFI_MTFTP4_ACK8_HEADER; - -typedef struct { - 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; - /// - /// Read request packet header. - /// - EFI_MTFTP4_REQ_HEADER Rrq; - /// - /// Write request packet header. - /// - EFI_MTFTP4_REQ_HEADER Wrq; - /// - /// Option acknowledge packet header. - /// - EFI_MTFTP4_OACK_HEADER Oack; - /// - /// Data packet header. - /// - EFI_MTFTP4_DATA_HEADER Data; - /// - /// Acknowledgement packet header. - /// - EFI_MTFTP4_ACK_HEADER Ack; - /// - /// Data packet header with big block number. - /// - EFI_MTFTP4_DATA8_HEADER Data8; - /// - /// Acknowledgement header with big block num. - /// - EFI_MTFTP4_ACK8_HEADER Ack8; - /// - /// Error packet header. - /// - EFI_MTFTP4_ERROR_HEADER Error; -} EFI_MTFTP4_PACKET; - -#pragma pack() - -/// -/// MTFTP4 option definition. -/// -typedef struct { - 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; -} EFI_MTFTP4_CONFIG_DATA; - - -typedef struct { - 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_MTFTP4_OVERRIDE_DATA; - -// -// Protocol interfaces definition -// - -/** - A callback function that is provided by the caller to intercept - the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the - EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept - EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to - EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory(). - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token The token that the caller provided in the - EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() - or ReadDirectory() function. - @param PacketLen Indicates the length of the packet. - @param Packet The pointer to an MTFTPv4 packet. - - @retval EFI_SUCCESS The operation was successful. - @retval Others Aborts the transfer process. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_CHECK_PACKET)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_TOKEN *Token, - IN UINT16 PacketLen, - IN EFI_MTFTP4_PACKET *Paket - ); - -/** - Timeout callback funtion. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token The token that is provided in the - EFI_MTFTP4_PROTOCOL.ReadFile() or - EFI_MTFTP4_PROTOCOL.WriteFile() or - EFI_MTFTP4_PROTOCOL.ReadDirectory() functions - by the caller. - - @retval EFI_SUCCESS The operation was successful. - @retval Others Aborts download process. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_TOKEN *Token - ); - -/** - A callback function that the caller provides to feed data to the - EFI_MTFTP4_PROTOCOL.WriteFile() function. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token The token provided in the - EFI_MTFTP4_PROTOCOL.WriteFile() by the caller. - @param Length Indicates the length of the raw data wanted on input, and the - length the data available on output. - @param Buffer The pointer to the buffer where the data is stored. - - @retval EFI_SUCCESS The operation was successful. - @retval Others Aborts session. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_PACKET_NEEDED)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_TOKEN *Token, - IN OUT UINT16 *Length, - OUT VOID **Buffer - ); - - -/** - Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param ModeData The pointer to storage for the EFI MTFTPv4 Protocol driver mode data. - - @retval EFI_SUCCESS The configuration data was successfully returned. - @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated. - @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_GET_MODE_DATA)( - IN EFI_MTFTP4_PROTOCOL *This, - OUT EFI_MTFTP4_MODE_DATA *ModeData - ); - - -/** - Initializes, changes, or resets the default operational setting for this - EFI MTFTPv4 Protocol driver instance. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param MtftpConfigData The pointer to the configuration data structure. - - @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this time because - there is one MTFTP background operation in progress. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) has not finished yet. - @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) could not - be located when clients choose to use the default address - settings. - @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be - allocated. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI - MTFTPv4 Protocol driver instance is not configured. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_CONFIGURE)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL - ); - - -/** - Gets information about a file from an MTFTPv4 server. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param OverrideData Data that is used to override the existing parameters. If NULL, - the default parameters that were set in the - EFI_MTFTP4_PROTOCOL.Configure() function are used. - @param Filename The pointer to null-terminated ASCII file name string. - @param ModeStr The pointer to null-terminated ASCII mode string. If NULL, "octet" will be used. - @param OptionCount Number of option/value string pairs in OptionList. - @param OptionList The pointer to array of option/value string pairs. Ignored if - OptionCount is zero. - @param PacketLength The number of bytes in the returned packet. - @param Packet The pointer to the received packet. This buffer must be freed by - the caller. - - @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Packet. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - Filename is NULL. - - OptionCount is not zero and OptionList is NULL. - - One or more options in OptionList have wrong format. - - PacketLength is NULL. - - One or more IPv4 addresses in OverrideData are not valid - unicast IPv4 addresses if OverrideData is not NULL. - @retval EFI_UNSUPPORTED One or more options in the OptionList are in the - unsupported list of structure EFI_MTFTP4_MODE_DATA. - @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) has not finished yet. - @retval EFI_ACCESS_DENIED The previous operation has not completed yet. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the Packet. - @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL. - @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL. - @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL. - @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received and the Packet is set to NULL. - @retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received and is in the Buffer. - @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the Packet. - @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server. - @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. - @retval EFI_NO_MEDIA There was a media error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_GET_INFO)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL, - IN UINT8 *Filename, - IN UINT8 *ModeStr OPTIONAL, - IN UINT8 OptionCount, - IN EFI_MTFTP4_OPTION *OptionList, - OUT UINT32 *PacketLength, - OUT EFI_MTFTP4_PACKET **Packet OPTIONAL - ); - -/** - Parses the options in an MTFTPv4 OACK packet. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param PacketLen Length of the OACK packet to be parsed. - @param Packet The pointer to the OACK packet to be parsed. - @param OptionCount The pointer to the number of options in following OptionList. - @param OptionList The pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot - Service FreePool() to release the OptionList if the options - in this OptionList are not needed any more. - - @retval EFI_SUCCESS The OACK packet was valid and the OptionCount and - OptionList parameters have been updated. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - PacketLen is 0. - - Packet is NULL or Packet is not a valid MTFTPv4 packet. - - OptionCount is NULL. - @retval EFI_NOT_FOUND No options were found in the OACK packet. - @retval EFI_OUT_OF_RESOURCES Storage for the OptionList array cannot be allocated. - @retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_PARSE_OPTIONS)( - IN EFI_MTFTP4_PROTOCOL *This, - IN UINT32 PacketLen, - IN EFI_MTFTP4_PACKET *Packet, - OUT UINT32 *OptionCount, - OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL - ); - - -/** - Downloads a file from an MTFTPv4 server. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token The pointer to the token structure to provide the parameters that are - used in this operation. - - @retval EFI_SUCCESS The data file has been transferred successfully. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the - downloaded data in downloading process. - @retval EFI_ABORTED Current operation is aborted by user. - @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received. - @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received. - @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received. - @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received. - @retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received. - @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server. - @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received. - @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. - @retval EFI_NO_MEDIA There was a media error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_READ_FILE)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_TOKEN *Token - ); - - - -/** - Sends a file to an MTFTPv4 server. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token The pointer to the token structure to provide the parameters that are - used in this operation. - - @retval EFI_SUCCESS The upload session has started. - @retval EFI_UNSUPPORTED The operation is not supported by this implementation. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in - the unsupported list of structure EFI_MTFTP4_MODE_DATA. - @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_ACCESS_DENIED The previous operation has not completed yet. - @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_WRITE_FILE)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_TOKEN *Token - ); - - -/** - Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI - implementations. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token The pointer to the token structure to provide the parameters that are - used in this operation. - - @retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded. - @retval EFI_UNSUPPORTED The operation is not supported by this implementation. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in - the unsupported list of structure EFI_MTFTP4_MODE_DATA. - @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_ACCESS_DENIED The previous operation has not completed yet. - @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_READ_DIRECTORY)( - IN EFI_MTFTP4_PROTOCOL *This, - IN EFI_MTFTP4_TOKEN *Token - ); - -/** - Polls for incoming data packets and processes outgoing data packets. - - @param This The pointer to the EFI_MTFTP4_PROTOCOL instance. - - @retval EFI_SUCCESS Incoming or outgoing data was processed. - @retval EFI_NOT_STARTED This EFI MTFTPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. - Consider increasing the polling rate. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_MTFTP4_POLL)( - IN EFI_MTFTP4_PROTOCOL *This - ); - -/// -/// The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications -/// to transmit and receive data files. The EFI MTFTPv4 Protocol driver uses -/// the underlying EFI UDPv4 Protocol driver and EFI IPv4 Protocol driver. -/// -struct _EFI_MTFTP4_PROTOCOL { - EFI_MTFTP4_GET_MODE_DATA GetModeData; - EFI_MTFTP4_CONFIGURE Configure; - EFI_MTFTP4_GET_INFO GetInfo; - EFI_MTFTP4_PARSE_OPTIONS ParseOptions; - EFI_MTFTP4_READ_FILE ReadFile; - EFI_MTFTP4_WRITE_FILE WriteFile; - EFI_MTFTP4_READ_DIRECTORY ReadDirectory; - EFI_MTFTP4_POLL Poll; -}; - -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; - /// - /// The event that will be signaled when the operation completes. If - /// set to NULL, the corresponding function will wait until the read or - /// write operation finishes. The type of Event must be - /// EVT_NOTIFY_SIGNAL. The Task Priority Level (TPL) of - /// Event must be lower than or equal to TPL_CALLBACK. - /// - EFI_EVENT Event; - /// - /// If not NULL, the data that will be used to override the existing configure data. - /// - EFI_MTFTP4_OVERRIDE_DATA *OverrideData; - /// - /// The pointer to the null-terminated ASCII file name string. - /// - UINT8 *Filename; - /// - /// The pointer to the null-terminated ASCII mode string. If NULL, "octet" is used. - /// - UINT8 *ModeStr; - /// - /// Number of option/value string pairs. - /// - UINT32 OptionCount; - /// - /// The pointer to an array of option/value string pairs. Ignored if OptionCount is zero. - /// - EFI_MTFTP4_OPTION *OptionList; - /// - /// The size of the data buffer. - /// - 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; - /// - /// The pointer to the context that will be used by CheckPacket, - /// TimeoutCallback and PacketNeeded. - /// - VOID *Context; - /// - /// The pointer to the callback function to check the contents of the received packet. - /// - EFI_MTFTP4_CHECK_PACKET CheckPacket; - /// - /// The pointer to the function to be called when a timeout occurs. - /// - EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback; - /// - /// The pointer to the function to provide the needed packet contents. - /// - EFI_MTFTP4_PACKET_NEEDED PacketNeeded; -}; - -extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiMtftp4ProtocolGuid; - -#endif - diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h deleted file mode 100644 index 5adedd8e9..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h +++ /dev/null @@ -1,120 +0,0 @@ -/** @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. - - @par Revision Reference: - This Protocol is introduced in EFI Specification 1.10. - -**/ - -#ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__ -#define __EFI_NETWORK_INTERFACE_IDENTIFER_H__ - -FILE_LICENCE ( BSD3 ); - -// -// GUID retired from UEFI Specification 2.1b -// -#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID \ - { \ - 0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 } \ - } - -// -// GUID intruduced in UEFI Specification 2.1b -// -#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31 \ - { \ - 0x1ACED566, 0x76ED, 0x4218, {0xBC, 0x81, 0x76, 0x7F, 0x1F, 0x97, 0x7A, 0x89 } \ - } - -// -// Revision defined in UEFI Specification 2.4 -// -#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 - -/// -/// Forward reference for pure ANSI compatability. -/// -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; - -/// -/// 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. - -}; - -/// -///******************************************************* -/// EFI_NETWORK_INTERFACE_TYPE -///******************************************************* -/// -typedef enum { - EfiNetworkInterfaceUndi = 1 -} EFI_NETWORK_INTERFACE_TYPE; - -/// -/// Forward reference for pure ANSI compatability. -/// -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 - ///< that this UNDI controls. - 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. - } NII_entry[1]; -}; - -extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; -extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PciIo.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PciIo.h deleted file mode 100644 index 97f65e1f8..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PciIo.h +++ /dev/null @@ -1,560 +0,0 @@ -/** @file - 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. - -**/ - -#ifndef __PCI_IO_H__ -#define __PCI_IO_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// Global ID for the PCI I/O Protocol -/// -#define EFI_PCI_IO_PROTOCOL_GUID \ - { \ - 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \ - } - -typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; - -/// -/// ******************************************************* -/// EFI_PCI_IO_PROTOCOL_WIDTH -/// ******************************************************* -/// -typedef enum { - EfiPciIoWidthUint8 = 0, - EfiPciIoWidthUint16, - EfiPciIoWidthUint32, - EfiPciIoWidthUint64, - EfiPciIoWidthFifoUint8, - EfiPciIoWidthFifoUint16, - EfiPciIoWidthFifoUint32, - EfiPciIoWidthFifoUint64, - EfiPciIoWidthFillUint8, - EfiPciIoWidthFillUint16, - EfiPciIoWidthFillUint32, - EfiPciIoWidthFillUint64, - EfiPciIoWidthMaximum -} EFI_PCI_IO_PROTOCOL_WIDTH; - -// -// 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) - -/// -/// ******************************************************* -/// EFI_PCI_IO_PROTOCOL_OPERATION -/// ******************************************************* -/// -typedef enum { - /// - /// A read operation from system memory by a bus master. - /// - EfiPciIoOperationBusMasterRead, - /// - /// A write operation from system memory by a bus master. - /// - EfiPciIoOperationBusMasterWrite, - /// - /// Provides both read and write access to system memory by both the processor and a - /// bus master. The buffer is coherent from both the processor's and the bus master's point of view. - /// - EfiPciIoOperationBusMasterCommonBuffer, - EfiPciIoOperationMaximum -} EFI_PCI_IO_PROTOCOL_OPERATION; - -/// -/// ******************************************************* -/// EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION -/// ******************************************************* -/// -typedef enum { - /// - /// Retrieve the PCI controller's current attributes, and return them in Result. - /// - EfiPciIoAttributeOperationGet, - /// - /// Set the PCI controller's current attributes to Attributes. - /// - EfiPciIoAttributeOperationSet, - /// - /// Enable the attributes specified by the bits that are set in Attributes for this PCI controller. - /// - EfiPciIoAttributeOperationEnable, - /// - /// Disable the attributes specified by the bits that are set in Attributes for this PCI controller. - /// - EfiPciIoAttributeOperationDisable, - /// - /// Retrieve the PCI controller's supported attributes, and return them in Result. - /// - EfiPciIoAttributeOperationSupported, - EfiPciIoAttributeOperationMaximum -} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION; - -/** - Reads from the memory space of a PCI controller. Returns either when the polling exit criteria is - satisfied or after a defined duration. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Width Signifies the width of the memory or I/O operations. - @param BarIndex The BAR index of the standard PCI Configuration header to use as the - base address for the memory operation to perform. - @param Offset The offset within the selected BAR to start the memory operation. - @param Mask Mask used for the polling criteria. - @param Value The comparison value used for the polling exit criteria. - @param Delay The number of 100 ns units to poll. - @param Result Pointer to the last value read from the memory location. - - @retval EFI_SUCCESS The last data returned from the access matched the poll exit criteria. - @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller. - @retval EFI_UNSUPPORTED Offset is not valid for the BarIndex of this PCI controller. - @retval EFI_TIMEOUT Delay expired before a match occurred. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_POLL_IO_MEM)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_PCI_IO_PROTOCOL_WIDTH Width, - IN UINT8 BarIndex, - IN UINT64 Offset, - IN UINT64 Mask, - IN UINT64 Value, - IN UINT64 Delay, - OUT UINT64 *Result - ); - -/** - Enable a PCI driver to access PCI controller registers in the PCI memory or I/O space. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Width Signifies the width of the memory or I/O operations. - @param BarIndex The BAR index of the standard PCI Configuration header to use as the - base address for the memory or I/O operation to perform. - @param Offset The offset within the selected BAR to start the memory or I/O operation. - @param Count The number of memory or I/O operations to perform. - @param Buffer For read operations, the destination buffer to store the results. For write - operations, the source buffer to write data from. - - @retval EFI_SUCCESS The data was read from or written to the PCI controller. - @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller. - @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not - valid for the PCI BAR specified by BarIndex. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_IO_MEM)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_PCI_IO_PROTOCOL_WIDTH Width, - IN UINT8 BarIndex, - IN UINT64 Offset, - IN UINTN Count, - IN OUT VOID *Buffer - ); - -typedef struct { - /// - /// Read PCI controller registers in the PCI memory or I/O space. - /// - EFI_PCI_IO_PROTOCOL_IO_MEM Read; - /// - /// Write PCI controller registers in the PCI memory or I/O space. - /// - EFI_PCI_IO_PROTOCOL_IO_MEM Write; -} EFI_PCI_IO_PROTOCOL_ACCESS; - -/** - Enable a PCI driver to access PCI controller registers in PCI configuration space. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Width Signifies the width of the memory operations. - @param Offset The offset within the PCI configuration space for the PCI controller. - @param Count The number of PCI configuration operations to perform. - @param Buffer For read operations, the destination buffer to store the results. For write - operations, the source buffer to write data from. - - - @retval EFI_SUCCESS The data was read from or written to the PCI controller. - @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not - valid for the PCI configuration header of the PCI controller. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_INVALID_PARAMETER Buffer is NULL or Width is invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_CONFIG)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_PCI_IO_PROTOCOL_WIDTH Width, - IN UINT32 Offset, - IN UINTN Count, - IN OUT VOID *Buffer - ); - -typedef struct { - /// - /// Read PCI controller registers in PCI configuration space. - /// - EFI_PCI_IO_PROTOCOL_CONFIG Read; - /// - /// Write PCI controller registers in PCI configuration space. - /// - EFI_PCI_IO_PROTOCOL_CONFIG Write; -} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS; - -/** - Enables a PCI driver to copy one region of PCI memory space to another region of PCI - memory space. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Width Signifies the width of the memory operations. - @param DestBarIndex The BAR index in the standard PCI Configuration header to use as the - base address for the memory operation to perform. - @param DestOffset The destination offset within the BAR specified by DestBarIndex to - start the memory writes for the copy operation. - @param SrcBarIndex The BAR index in the standard PCI Configuration header to use as the - base address for the memory operation to perform. - @param SrcOffset The source offset within the BAR specified by SrcBarIndex to start - the memory reads for the copy operation. - @param Count The number of memory operations to perform. Bytes moved is Width - size * Count, starting at DestOffset and SrcOffset. - - @retval EFI_SUCCESS The data was copied from one memory region to another memory region. - @retval EFI_UNSUPPORTED DestBarIndex not valid for this PCI controller. - @retval EFI_UNSUPPORTED SrcBarIndex not valid for this PCI controller. - @retval EFI_UNSUPPORTED The address range specified by DestOffset, Width, and Count - is not valid for the PCI BAR specified by DestBarIndex. - @retval EFI_UNSUPPORTED The address range specified by SrcOffset, Width, and Count is - not valid for the PCI BAR specified by SrcBarIndex. - @retval EFI_INVALID_PARAMETER Width is invalid. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_COPY_MEM)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_PCI_IO_PROTOCOL_WIDTH Width, - IN UINT8 DestBarIndex, - IN UINT64 DestOffset, - IN UINT8 SrcBarIndex, - IN UINT64 SrcOffset, - IN UINTN Count - ); - -/** - Provides the PCI controller-specific addresses needed to access system memory. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Operation Indicates if the bus master is going to read or write to system memory. - @param HostAddress The system memory address to map to the PCI controller. - @param NumberOfBytes On input the number of bytes to map. On output the number of bytes - that were mapped. - @param DeviceAddress The resulting map address for the bus master PCI controller to use to - access the hosts HostAddress. - @param Mapping A resulting value to pass to Unmap(). - - @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes. - @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_DEVICE_ERROR The system hardware could not map the requested address. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_MAP)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_PCI_IO_PROTOCOL_OPERATION Operation, - IN VOID *HostAddress, - IN OUT UINTN *NumberOfBytes, - OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, - OUT VOID **Mapping - ); - -/** - Completes the Map() operation and releases any corresponding resources. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Mapping The mapping value returned from Map(). - - @retval EFI_SUCCESS The range was unmapped. - @retval EFI_DEVICE_ERROR The data was not committed to the target system memory. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_UNMAP)( - IN EFI_PCI_IO_PROTOCOL *This, - IN VOID *Mapping - ); - -/** - Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer - mapping. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Type This parameter is not used and must be ignored. - @param MemoryType The type of memory to allocate, EfiBootServicesData or - EfiRuntimeServicesData. - @param Pages The number of pages to allocate. - @param HostAddress A pointer to store the base system memory address of the - allocated range. - @param Attributes The requested bit mask of attributes for the allocated range. - - @retval EFI_SUCCESS The requested memory pages were allocated. - @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_ALLOCATE_TYPE Type, - IN EFI_MEMORY_TYPE MemoryType, - IN UINTN Pages, - OUT VOID **HostAddress, - IN UINT64 Attributes - ); - -/** - Frees memory that was allocated with AllocateBuffer(). - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Pages The number of pages to free. - @param HostAddress The base system memory address of the allocated range. - - @retval EFI_SUCCESS The requested memory pages were freed. - @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages - was not allocated with AllocateBuffer(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_FREE_BUFFER)( - IN EFI_PCI_IO_PROTOCOL *This, - IN UINTN Pages, - IN VOID *HostAddress - ); - -/** - Flushes all PCI posted write transactions from a PCI host bridge to system memory. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - - @retval EFI_SUCCESS The PCI posted write transactions were flushed from the PCI host - bridge to system memory. - @retval EFI_DEVICE_ERROR The PCI posted write transactions were not flushed from the PCI - host bridge due to a hardware error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_FLUSH)( - IN EFI_PCI_IO_PROTOCOL *This - ); - -/** - Retrieves this PCI controller's current PCI bus number, device number, and function number. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param SegmentNumber The PCI controller's current PCI segment number. - @param BusNumber The PCI controller's current PCI bus number. - @param DeviceNumber The PCI controller's current PCI device number. - @param FunctionNumber The PCI controller's current PCI function number. - - @retval EFI_SUCCESS The PCI controller location was returned. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_LOCATION)( - IN EFI_PCI_IO_PROTOCOL *This, - OUT UINTN *SegmentNumber, - OUT UINTN *BusNumber, - OUT UINTN *DeviceNumber, - OUT UINTN *FunctionNumber - ); - -/** - Performs an operation on the attributes that this PCI controller supports. The operations include - getting the set of supported attributes, retrieving the current attributes, setting the current - attributes, enabling attributes, and disabling attributes. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Operation The operation to perform on the attributes for this PCI controller. - @param Attributes The mask of attributes that are used for Set, Enable, and Disable - operations. - @param Result A pointer to the result mask of attributes that are returned for the Get - and Supported operations. - - @retval EFI_SUCCESS The operation on the PCI controller's attributes was completed. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_UNSUPPORTED one or more of the bits set in - Attributes are not supported by this PCI controller or one of - its parent bridges when Operation is Set, Enable or Disable. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_ATTRIBUTES)( - IN EFI_PCI_IO_PROTOCOL *This, - IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation, - IN UINT64 Attributes, - OUT UINT64 *Result OPTIONAL - ); - -/** - Gets the attributes that this PCI controller supports setting on a BAR using - SetBarAttributes(), and retrieves the list of resource descriptors for a BAR. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param BarIndex The BAR index of the standard PCI Configuration header to use as the - base address for resource range. The legal range for this field is 0..5. - @param Supports A pointer to the mask of attributes that this PCI controller supports - setting for this BAR with SetBarAttributes(). - @param Resources A pointer to the ACPI 2.0 resource descriptors that describe the current - configuration of this BAR of the PCI controller. - - @retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI - controller supports are returned in Supports. If Resources - is not NULL, then the ACPI 2.0 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 VOID **Resources OPTIONAL - ); - -/** - Sets the attributes for a range of a BAR on a PCI controller. - - @param This A pointer to the EFI_PCI_IO_PROTOCOL instance. - @param Attributes The mask of attributes to set for the resource range specified by - BarIndex, Offset, and Length. - @param BarIndex The BAR index of the standard PCI Configuration header to use as the - base address for resource range. The legal range for this field is 0..5. - @param Offset A pointer to the BAR relative base address of the resource range to be - modified by the attributes specified by Attributes. - @param Length A pointer to the length of the resource range to be modified by the - attributes specified by Attributes. - - @retval EFI_SUCCESS The set of attributes specified by Attributes for the resource - range specified by BarIndex, Offset, and Length were - set on the PCI controller, and the actual resource range is returned - in Offset and Length. - @retval EFI_INVALID_PARAMETER Offset or Length is NULL. - @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller. - @retval EFI_OUT_OF_RESOURCES There are not enough resources to set the attributes on the - resource range specified by BarIndex, Offset, and - Length. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES)( - IN EFI_PCI_IO_PROTOCOL *This, - IN UINT64 Attributes, - IN UINT8 BarIndex, - IN OUT UINT64 *Offset, - IN OUT UINT64 *Length - ); - -/// -/// The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration, -/// and DMA interfaces used to abstract accesses to PCI controllers. -/// There is one EFI_PCI_IO_PROTOCOL instance for each PCI controller on a PCI bus. -/// A device driver that wishes to manage a PCI controller in a system will have to -/// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller. -/// -struct _EFI_PCI_IO_PROTOCOL { - EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem; - 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; - - /// - /// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible - /// for allocating memory for the ROM image, and copying the contents of the ROM to memory. - /// The contents of this buffer are either from the PCI option ROM that can be accessed - /// through the ROM BAR of the PCI controller, or it is from a platform-specific location. - /// The Attributes() function can be used to determine from which of these two sources - /// the RomImage buffer was initialized. - /// - VOID *RomImage; -}; - -extern EFI_GUID gEfiPciIoProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h deleted file mode 100644 index b9c80f589..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PciRootBridgeIo.h +++ /dev/null @@ -1,444 +0,0 @@ -/** @file - PCI Root Bridge I/O protocol as defined in the UEFI 2.0 specification. - - PCI Root Bridge I/O protocol is used by PCI Bus Driver to perform PCI Memory, PCI I/O, - and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform - defferent types of bus mastering DMA. - - Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __PCI_ROOT_BRIDGE_IO_H__ -#define __PCI_ROOT_BRIDGE_IO_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Library/BaseLib.h> - -#define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \ - { \ - 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; - -/// -/// ******************************************************* -/// EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH -/// ******************************************************* -/// -typedef enum { - EfiPciWidthUint8, - EfiPciWidthUint16, - EfiPciWidthUint32, - EfiPciWidthUint64, - EfiPciWidthFifoUint8, - EfiPciWidthFifoUint16, - EfiPciWidthFifoUint32, - EfiPciWidthFifoUint64, - EfiPciWidthFillUint8, - EfiPciWidthFillUint16, - EfiPciWidthFillUint32, - EfiPciWidthFillUint64, - EfiPciWidthMaximum -} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH; - -/// -/// ******************************************************* -/// EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION -/// ******************************************************* -/// -typedef enum { - /// - /// A read operation from system memory by a bus master that is not capable of producing - /// PCI dual address cycles. - /// - EfiPciOperationBusMasterRead, - /// - /// A write operation from system memory by a bus master that is not capable of producing - /// PCI dual address cycles. - /// - EfiPciOperationBusMasterWrite, - /// - /// Provides both read and write access to system memory by both the processor and a bus - /// master that is not capable of producing PCI dual address cycles. - /// - EfiPciOperationBusMasterCommonBuffer, - /// - /// A read operation from system memory by a bus master that is capable of producing PCI - /// dual address cycles. - /// - EfiPciOperationBusMasterRead64, - /// - /// A write operation to system memory by a bus master that is capable of producing PCI - /// dual address cycles. - /// - EfiPciOperationBusMasterWrite64, - /// - /// Provides both read and write access to system memory by both the processor and a bus - /// master that is capable of producing PCI dual address cycles. - /// - EfiPciOperationBusMasterCommonBuffer64, - EfiPciOperationMaximum -} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION; - -#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) ( \ - (((UINTN) bus) << 24) | \ - (((UINTN) dev) << 16) | \ - (((UINTN) func) << 8) | \ - (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32)))) - -typedef struct { - UINT8 Register; - UINT8 Function; - UINT8 Device; - UINT8 Bus; - UINT32 ExtendedRegister; -} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS; - -/** - Reads from the I/O space of a PCI Root Bridge. Returns when either the polling exit criteria is - satisfied or after a defined duration. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Width Signifies the width of the memory or I/O operations. - @param Address The base address of the memory or I/O operations. - @param Mask Mask used for the polling criteria. - @param Value The comparison value used for the polling exit criteria. - @param Delay The number of 100 ns units to poll. - @param Result Pointer to the last value read from the memory location. - - @retval EFI_SUCCESS The last data returned from the access matched the poll exit criteria. - @retval EFI_TIMEOUT Delay expired before a match occurred. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, - IN UINT64 Address, - IN UINT64 Mask, - IN UINT64 Value, - IN UINT64 Delay, - OUT UINT64 *Result - ); - -/** - Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Width Signifies the width of the memory operations. - @param Address The base address of the memory operations. - @param Count The number of memory operations to perform. - @param Buffer For read operations, the destination buffer to store the results. For write - operations, the source buffer to write data from. - - @retval EFI_SUCCESS The data was read from or written to the PCI root bridge. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN OUT VOID *Buffer - ); - -typedef struct { - /// - /// Read PCI controller registers in the PCI root bridge memory space. - /// - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read; - /// - /// Write PCI controller registers in the PCI root bridge memory space. - /// - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write; -} EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS; - -/** - Enables a PCI driver to copy one region of PCI root bridge memory space to another region of PCI - root bridge memory space. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance. - @param Width Signifies the width of the memory operations. - @param DestAddress The destination address of the memory operation. - @param SrcAddress The source address of the memory operation. - @param Count The number of memory operations to perform. - - @retval EFI_SUCCESS The data was copied from one memory region to another memory region. - @retval EFI_INVALID_PARAMETER Width is invalid for this PCI root bridge. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, - IN UINT64 DestAddress, - IN UINT64 SrcAddress, - IN UINTN Count - ); - -/** - Provides the PCI controller-specific addresses required to access system memory from a - DMA bus master. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Operation Indicates if the bus master is going to read or write to system memory. - @param HostAddress The system memory address to map to the PCI controller. - @param NumberOfBytes On input the number of bytes to map. On output the number of bytes - that were mapped. - @param DeviceAddress The resulting map address for the bus master PCI controller to use to - access the hosts HostAddress. - @param Mapping A resulting value to pass to Unmap(). - - @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes. - @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. - @retval EFI_DEVICE_ERROR The system hardware could not map the requested address. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation, - IN VOID *HostAddress, - IN OUT UINTN *NumberOfBytes, - OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, - OUT VOID **Mapping - ); - -/** - Completes the Map() operation and releases any corresponding resources. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Mapping The mapping value returned from Map(). - - @retval EFI_SUCCESS The range was unmapped. - @retval EFI_INVALID_PARAMETER Mapping is not a value that was returned by Map(). - @retval EFI_DEVICE_ERROR The data was not committed to the target system memory. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN VOID *Mapping - ); - -/** - Allocates pages that are suitable for an EfiPciOperationBusMasterCommonBuffer or - EfiPciOperationBusMasterCommonBuffer64 mapping. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Type This parameter is not used and must be ignored. - @param MemoryType The type of memory to allocate, EfiBootServicesData or - EfiRuntimeServicesData. - @param Pages The number of pages to allocate. - @param HostAddress A pointer to store the base system memory address of the - allocated range. - @param Attributes The requested bit mask of attributes for the allocated range. - - @retval EFI_SUCCESS The requested memory pages were allocated. - @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN EFI_ALLOCATE_TYPE Type, - IN EFI_MEMORY_TYPE MemoryType, - IN UINTN Pages, - IN OUT VOID **HostAddress, - IN UINT64 Attributes - ); - -/** - Frees memory that was allocated with AllocateBuffer(). - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Pages The number of pages to free. - @param HostAddress The base system memory address of the allocated range. - - @retval EFI_SUCCESS The requested memory pages were freed. - @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages - was not allocated with AllocateBuffer(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN UINTN Pages, - IN VOID *HostAddress - ); - -/** - Flushes all PCI posted write transactions from a PCI host bridge to system memory. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - - @retval EFI_SUCCESS The PCI posted write transactions were flushed from the PCI host - bridge to system memory. - @retval EFI_DEVICE_ERROR The PCI posted write transactions were not flushed from the PCI - host bridge due to a hardware error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This - ); - -/** - Gets the attributes that a PCI root bridge supports setting with SetAttributes(), and the - attributes that a PCI root bridge is currently using. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Supports A pointer to the mask of attributes that this PCI root bridge supports - setting with SetAttributes(). - @param Attributes A pointer to the mask of attributes that this PCI root bridge is currently - using. - - @retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI root - bridge supports is returned in Supports. If Attributes is - not NULL, then the attributes that the PCI root bridge is currently - using is returned in Attributes. - @retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL. - - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - OUT UINT64 *Supports, - OUT UINT64 *Attributes - ); - -/** - Sets attributes for a resource range on a PCI root bridge. - - @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. - @param Attributes The mask of attributes to set. - @param ResourceBase A pointer to the base address of the resource range to be modified by the - attributes specified by Attributes. - @param ResourceLength A pointer to the length of the resource range to be modified by the - attributes specified by Attributes. - - @retval EFI_SUCCESS The set of attributes specified by Attributes for the resource - range specified by ResourceBase and ResourceLength - were set on the PCI root bridge, and the actual resource range is - returned in ResuourceBase and ResourceLength. - @retval EFI_UNSUPPORTED A bit is set in Attributes that is not supported by the PCI Root - Bridge. - @retval EFI_OUT_OF_RESOURCES There are not enough resources to set the attributes on the - resource range specified by BaseAddress and Length. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - IN UINT64 Attributes, - IN OUT UINT64 *ResourceBase, - IN OUT UINT64 *ResourceLength - ); - -/** - Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0 - 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 - configuration of this PCI root bridge. - - @retval EFI_SUCCESS The current configuration of this PCI root bridge was returned in - Resources. - @retval EFI_UNSUPPORTED The current configuration of this PCI root bridge could not be - retrieved. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION)( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, - OUT VOID **Resources - ); - -/// -/// Provides the basic Memory, I/O, PCI configuration, and DMA interfaces that are -/// used to abstract accesses to PCI controllers behind a PCI Root Bridge Controller. -/// -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; - - /// - /// The segment number that this PCI root bridge resides. - /// - UINT32 SegmentNumber; -}; - -extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PxeBaseCode.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PxeBaseCode.h deleted file mode 100644 index 26447987d..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/PxeBaseCode.h +++ /dev/null @@ -1,936 +0,0 @@ -/** @file - 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. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - @par Revision Reference: - This Protocol is introduced in EFI Specification 1.10. - -**/ -#ifndef __PXE_BASE_CODE_PROTOCOL_H__ -#define __PXE_BASE_CODE_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// PXE Base Code protocol. -/// -#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \ - { \ - 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ - } - -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; - -/// -/// Default IP TTL and ToS. -/// -#define DEFAULT_TTL 16 -#define DEFAULT_ToS 0 - -/// -/// ICMP error format. -/// -typedef struct { - UINT8 Type; - UINT8 Code; - UINT16 Checksum; - union { - UINT32 reserved; - UINT32 Mtu; - UINT32 Pointer; - struct { - UINT16 Identifier; - UINT16 Sequence; - } Echo; - } u; - UINT8 Data[494]; -} EFI_PXE_BASE_CODE_ICMP_ERROR; - -/// -/// TFTP error format. -/// -typedef struct { - UINT8 ErrorCode; - CHAR8 ErrorString[127]; -} EFI_PXE_BASE_CODE_TFTP_ERROR; - -/// -/// IP Receive Filter definitions. -/// -#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]; -} 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 - -/// -/// ARP cache entries. -/// -typedef struct { - 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_PXE_BASE_CODE_ROUTE_ENTRY; - -// -// UDP definitions -// -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 - -// -// Discover() definitions -// -#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15 -#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16 -// -// 17 through 32767 are reserved -// 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_LAYER_MASK 0x7FFF -#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000 - -// -// PXE Tag definition that identifies the processor -// and programming environment of the client system. -// These identifiers are defined by IETF: -// 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 -#elif defined (MDE_CPU_X64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0007 -#elif defined (MDE_CPU_ARM) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000A -#elif defined (MDE_CPU_AARCH64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B -#endif - - -/// -/// Discover() server list structure. -/// -typedef struct { - 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]; -} EFI_PXE_BASE_CODE_DISCOVER_INFO; - -/// -/// TFTP opcode definitions. -/// -typedef enum { - EFI_PXE_BASE_CODE_TFTP_FIRST, - EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE, - EFI_PXE_BASE_CODE_TFTP_READ_FILE, - EFI_PXE_BASE_CODE_TFTP_WRITE_FILE, - EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY, - EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE, - EFI_PXE_BASE_CODE_MTFTP_READ_FILE, - EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY, - EFI_PXE_BASE_CODE_MTFTP_LAST -} EFI_PXE_BASE_CODE_TFTP_OPCODE; - -/// -/// MTFTP information. This information is required -/// to start or join a multicast TFTP session. It is also required to -/// 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_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]; -} EFI_PXE_BASE_CODE_DHCPV4_PACKET; - -/// -/// DHCPV6 Packet structure. -/// -typedef struct { - 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; -} 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 - -/// -/// EFI_PXE_BASE_CODE_MODE. -/// The data values in this structure are read-only and -/// are updated by the code that produces the -/// 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; -} EFI_PXE_BASE_CODE_MODE; - -// -// PXE Base Code Interface Function definitions -// - -/** - Enables the use of the PXE Base Code Protocol functions. - - This function enables the use of the PXE Base Code Protocol functions. If the - Started field of the EFI_PXE_BASE_CODE_MODE structure is already TRUE, then - EFI_ALREADY_STARTED will be returned. If UseIpv6 is TRUE, then IPv6 formatted - addresses will be used in this session. If UseIpv6 is FALSE, then IPv4 formatted - addresses will be used in this session. If UseIpv6 is TRUE, and the Ipv6Supported - field of the EFI_PXE_BASE_CODE_MODE structure is FALSE, then EFI_UNSUPPORTED will - be returned. If there is not enough memory or other resources to start the PXE - Base Code Protocol, then EFI_OUT_OF_RESOURCES will be returned. Otherwise, the - PXE Base Code Protocol will be started, and all of the fields of the EFI_PXE_BASE_CODE_MODE - structure will be initialized as follows: - StartedSet to TRUE. - Ipv6SupportedUnchanged. - Ipv6AvailableUnchanged. - UsingIpv6Set to UseIpv6. - BisSupportedUnchanged. - BisDetectedUnchanged. - AutoArpSet to TRUE. - SendGUIDSet to FALSE. - TTLSet to DEFAULT_TTL. - ToSSet to DEFAULT_ToS. - DhcpCompletedSet to FALSE. - ProxyOfferReceivedSet to FALSE. - StationIpSet to an address of all zeros. - SubnetMaskSet to a subnet mask of all zeros. - DhcpDiscoverZero-filled. - DhcpAckZero-filled. - ProxyOfferZero-filled. - PxeDiscoverValidSet to FALSE. - PxeDiscoverZero-filled. - PxeReplyValidSet to FALSE. - PxeReplyZero-filled. - PxeBisReplyValidSet to FALSE. - PxeBisReplyZero-filled. - IpFilterSet the Filters field to 0 and the IpCnt field to 0. - ArpCacheEntriesSet to 0. - ArpCacheZero-filled. - RouteTableEntriesSet to 0. - RouteTableZero-filled. - IcmpErrorReceivedSet to FALSE. - IcmpErrorZero-filled. - TftpErroReceivedSet to FALSE. - TftpErrorZero-filled. - MakeCallbacksSet to TRUE if the PXE Base Code Callback Protocol is available. - Set to FALSE if the PXE Base Code Callback Protocol is not available. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param UseIpv6 Specifies the type of IP addresses that are to be used during the session - that is being started. Set to TRUE for IPv6 addresses, and FALSE for - IPv4 addresses. - - @retval EFI_SUCCESS The PXE Base Code Protocol was started. - @retval EFI_DEVICE_ERROR The network device encountered an error during this oper - @retval EFI_UNSUPPORTED UseIpv6 is TRUE, but the Ipv6Supported field of the - EFI_PXE_BASE_CODE_MODE structure is FALSE. - @retval EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state. - @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid - EFI_PXE_BASE_CODE_PROTOCOL structure. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory or other resources to start the - PXE Base Code Protocol. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_START)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN BOOLEAN UseIpv6 - ); - -/** - Disables the use of the PXE Base Code Protocol functions. - - This function stops all activity on the network device. All the resources allocated - in Start() are released, the Started field of the EFI_PXE_BASE_CODE_MODE structure is - set to FALSE and EFI_SUCCESS is returned. If the Started field of the EFI_PXE_BASE_CODE_MODE - structure is already FALSE, then EFI_NOT_STARTED will be returned. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - - @retval EFI_SUCCESS The PXE Base Code Protocol was stopped. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is already in the stopped state. - @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid - EFI_PXE_BASE_CODE_PROTOCOL structure. - @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_STOP)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This - ); - -/** - Attempts to complete a DHCPv4 D.O.R.A. (discover / offer / request / acknowledge) or DHCPv6 - S.A.R.R (solicit / advertise / request / reply) sequence. - - This function attempts to complete the DHCP sequence. If this sequence is completed, - then EFI_SUCCESS is returned, and the DhcpCompleted, ProxyOfferReceived, StationIp, - SubnetMask, DhcpDiscover, DhcpAck, and ProxyOffer fields of the EFI_PXE_BASE_CODE_MODE - structure are filled in. - If SortOffers is TRUE, then the cached DHCP offer packets will be sorted before - they are tried. If SortOffers is FALSE, then the cached DHCP offer packets will - be tried in the order in which they are received. Please see the Preboot Execution - Environment (PXE) Specification for additional details on the implementation of DHCP. - This function can take at least 31 seconds to timeout and return control to the - caller. If the DHCP sequence does not complete, then EFI_TIMEOUT will be returned. - If the Callback Protocol does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, - then the DHCP sequence will be stopped and EFI_ABORTED will be returned. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param SortOffers TRUE if the offers received should be sorted. Set to FALSE to try the - offers in the order that they are received. - - @retval EFI_SUCCESS Valid DHCP has completed. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid - EFI_PXE_BASE_CODE_PROTOCOL structure. - @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Protocol. - @retval EFI_ABORTED The callback function aborted the DHCP Protocol. - @retval EFI_TIMEOUT The DHCP Protocol timed out. - @retval EFI_ICMP_ERROR An ICMP error packet was received during the DHCP session. - @retval EFI_NO_RESPONSE Valid PXE offer was not received. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_DHCP)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN BOOLEAN SortOffers - ); - -/** - Attempts to complete the PXE Boot Server and/or boot image discovery sequence. - - This function attempts to complete the PXE Boot Server and/or boot image discovery - sequence. If this sequence is completed, then EFI_SUCCESS is returned, and the - PxeDiscoverValid, PxeDiscover, PxeReplyReceived, and PxeReply fields of the - EFI_PXE_BASE_CODE_MODE structure are filled in. If UseBis is TRUE, then the - PxeBisReplyReceived and PxeBisReply fields of the EFI_PXE_BASE_CODE_MODE structure - will also be filled in. If UseBis is FALSE, then PxeBisReplyValid will be set to FALSE. - In the structure referenced by parameter Info, the PXE Boot Server list, SrvList[], - has two uses: It is the Boot Server IP address list used for unicast discovery - (if the UseUCast field is TRUE), and it is the list used for Boot Server verification - (if the MustUseList field is TRUE). Also, if the MustUseList field in that structure - is TRUE and the AcceptAnyResponse field in the SrvList[] array is TRUE, any Boot - Server reply of that type will be accepted. If the AcceptAnyResponse field is - FALSE, only responses from Boot Servers with matching IP addresses will be accepted. - This function can take at least 10 seconds to timeout and return control to the - caller. If the Discovery sequence does not complete, then EFI_TIMEOUT will be - returned. Please see the Preboot Execution Environment (PXE) Specification for - additional details on the implementation of the Discovery sequence. - If the Callback Protocol does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, - then the Discovery sequence is stopped and EFI_ABORTED will be returned. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param Type The type of bootstrap to perform. - @param Layer The pointer to the boot server layer number to discover, which must be - PXE_BOOT_LAYER_INITIAL when a new server type is being - discovered. - @param UseBis TRUE if Boot Integrity Services are to be used. FALSE otherwise. - @param Info The pointer to a data structure that contains additional information on the - type of discovery operation that is to be performed. - - @retval EFI_SUCCESS The Discovery sequence has been completed. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete Discovery. - @retval EFI_ABORTED The callback function aborted the Discovery sequence. - @retval EFI_TIMEOUT The Discovery sequence timed out. - @retval EFI_ICMP_ERROR An ICMP error packet was received during the PXE discovery - session. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN UINT16 Type, - IN UINT16 *Layer, - IN BOOLEAN UseBis, - IN EFI_PXE_BASE_CODE_DISCOVER_INFO *Info OPTIONAL - ); - -/** - Used to perform TFTP and MTFTP services. - - This function is used to perform TFTP and MTFTP services. This includes the - TFTP operations to get the size of a file, read a directory, read a file, and - write a file. It also includes the MTFTP operations to get the size of a file, - read a directory, and read a file. The type of operation is specified by Operation. - If the callback function that is invoked during the TFTP/MTFTP operation does - not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, then EFI_ABORTED will - be returned. - For read operations, the return data will be placed in the buffer specified by - BufferPtr. If BufferSize is too small to contain the entire downloaded file, - then EFI_BUFFER_TOO_SMALL will be returned and BufferSize will be set to zero - or the size of the requested file (the size of the requested file is only returned - if the TFTP server supports TFTP options). If BufferSize is large enough for the - read operation, then BufferSize will be set to the size of the downloaded file, - and EFI_SUCCESS will be returned. Applications using the PxeBc.Mtftp() services - should use the get-file-size operations to determine the size of the downloaded - file prior to using the read-file operations--especially when downloading large - (greater than 64 MB) files--instead of making two calls to the read-file operation. - Following this recommendation will save time if the file is larger than expected - and the TFTP server does not support TFTP option extensions. Without TFTP option - extension support, the client has to download the entire file, counting and discarding - the received packets, to determine the file size. - For write operations, the data to be sent is in the buffer specified by BufferPtr. - BufferSize specifies the number of bytes to send. If the write operation completes - successfully, then EFI_SUCCESS will be returned. - For TFTP "get file size" operations, the size of the requested file or directory - is returned in BufferSize, and EFI_SUCCESS will be returned. If the TFTP server - does not support options, the file will be downloaded into a bit bucket and the - length of the downloaded file will be returned. For MTFTP "get file size" operations, - if the MTFTP server does not support the "get file size" option, EFI_UNSUPPORTED - will be returned. - This function can take up to 10 seconds to timeout and return control to the caller. - If the TFTP sequence does not complete, EFI_TIMEOUT will be returned. - If the Callback Protocol does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, - then the TFTP sequence is stopped and EFI_ABORTED will be returned. - The format of the data returned from a TFTP read directory operation is a null-terminated - filename followed by a null-terminated information string, of the form - "size year-month-day hour:minute:second" (i.e. %d %d-%d-%d %d:%d:%f - note that - the seconds field can be a decimal number), where the date and time are UTC. For - an MTFTP read directory command, there is additionally a null-terminated multicast - IP address preceding the filename of the form %d.%d.%d.%d for IP v4. The final - entry is itself null-terminated, so that the final information string is terminated - with two null octets. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param Operation The type of operation to perform. - @param BufferPtr A pointer to the data buffer. - @param Overwrite Only used on write file operations. TRUE if a file on a remote server can - be overwritten. - @param BufferSize For get-file-size operations, *BufferSize returns the size of the - requested file. - @param BlockSize The requested block size to be used during a TFTP transfer. - @param ServerIp The TFTP / MTFTP server IP address. - @param Filename A Null-terminated ASCII string that specifies a directory name or a file - name. - @param Info The pointer to the MTFTP information. - @param DontUseBuffer Set to FALSE for normal TFTP and MTFTP read file operation. - - @retval EFI_SUCCESS The TFTP/MTFTP operation was completed. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. - @retval EFI_BUFFER_TOO_SMALL The buffer is not large enough to complete the read operation. - @retval EFI_ABORTED The callback function aborted the TFTP/MTFTP operation. - @retval EFI_TIMEOUT The TFTP/MTFTP operation timed out. - @retval EFI_ICMP_ERROR An ICMP error packet was received during the MTFTP session. - @retval EFI_TFTP_ERROR A TFTP error packet was received during the MTFTP session. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_MTFTP)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation, - IN OUT VOID *BufferPtr OPTIONAL, - IN BOOLEAN Overwrite, - IN OUT UINT64 *BufferSize, - IN UINTN *BlockSize OPTIONAL, - IN EFI_IP_ADDRESS *ServerIp, - IN UINT8 *Filename OPTIONAL, - IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL, - IN BOOLEAN DontUseBuffer - ); - -/** - Writes a UDP packet to the network interface. - - This function writes a UDP packet specified by the (optional HeaderPtr and) - BufferPtr parameters to the network interface. The UDP header is automatically - built by this routine. It uses the parameters OpFlags, DestIp, DestPort, GatewayIp, - SrcIp, and SrcPort to build this header. If the packet is successfully built and - transmitted through the network interface, then EFI_SUCCESS will be returned. - If a timeout occurs during the transmission of the packet, then EFI_TIMEOUT will - be returned. If an ICMP error occurs during the transmission of the packet, then - the IcmpErrorReceived field is set to TRUE, the IcmpError field is filled in and - EFI_ICMP_ERROR will be returned. If the Callback Protocol does not return - EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, then EFI_ABORTED will be returned. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param OpFlags The UDP operation flags. - @param DestIp The destination IP address. - @param DestPort The destination UDP port number. - @param GatewayIp The gateway IP address. - @param SrcIp The source IP address. - @param SrcPort The source UDP port number. - @param HeaderSize An optional field which may be set to the length of a header at - HeaderPtr to be prefixed to the data at BufferPtr. - @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the - data at BufferPtr. - @param BufferSize A pointer to the size of the data at BufferPtr. - @param BufferPtr A pointer to the data to be written. - - @retval EFI_SUCCESS The UDP Write operation was completed. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_BAD_BUFFER_SIZE The buffer is too long to be transmitted. - @retval EFI_ABORTED The callback function aborted the UDP Write operation. - @retval EFI_TIMEOUT The UDP Write operation timed out. - @retval EFI_ICMP_ERROR An ICMP error packet was received during the UDP write session. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - 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 UINTN *BufferSize, - IN VOID *BufferPtr - ); - -/** - Reads a UDP packet from the network interface. - - This function reads a UDP packet from a network interface. The data contents - are returned in (the optional HeaderPtr and) BufferPtr, and the size of the - buffer received is returned in BufferSize. If the input BufferSize is smaller - than the UDP packet received (less optional HeaderSize), it will be set to the - required size, and EFI_BUFFER_TOO_SMALL will be returned. In this case, the - contents of BufferPtr are undefined, and the packet is lost. If a UDP packet is - successfully received, then EFI_SUCCESS will be returned, and the information - from the UDP header will be returned in DestIp, DestPort, SrcIp, and SrcPort if - they are not NULL. - Depending on the values of OpFlags and the DestIp, DestPort, SrcIp, and SrcPort - input values, different types of UDP packet receive filtering will be performed. - The following tables summarize these receive filter operations. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param OpFlags The UDP operation flags. - @param DestIp The destination IP address. - @param DestPort The destination UDP port number. - @param SrcIp The source IP address. - @param SrcPort The source UDP port number. - @param HeaderSize An optional field which may be set to the length of a header at - HeaderPtr to be prefixed to the data at BufferPtr. - @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the - data at BufferPtr. - @param BufferSize A pointer to the size of the data at BufferPtr. - @param BufferPtr A pointer to the data to be read. - - @retval EFI_SUCCESS The UDP Read operation was completed. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. - @retval EFI_BUFFER_TOO_SMALL The packet is larger than Buffer can hold. - @retval EFI_ABORTED The callback function aborted the UDP Read operation. - @retval EFI_TIMEOUT The UDP Read operation timed out. - -**/ -typedef -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 UINTN *BufferSize, - IN VOID *BufferPtr - ); - -/** - Updates the IP receive filters of a network device and enables software filtering. - - The NewFilter field is used to modify the network device's current IP receive - filter settings and to enable a software filter. This function updates the IpFilter - field of the EFI_PXE_BASE_CODE_MODE structure with the contents of NewIpFilter. - The software filter is used when the USE_FILTER in OpFlags is set to UdpRead(). - The current hardware filter remains in effect no matter what the settings of OpFlags - are, so that the meaning of ANY_DEST_IP set in OpFlags to UdpRead() is from those - packets whose reception is enabled in hardware - physical NIC address (unicast), - broadcast address, logical address or addresses (multicast), or all (promiscuous). - UdpRead() does not modify the IP filter settings. - Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP receive - filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. - If an application or driver wishes to preserve the IP receive filter settings, - it will have to preserve the IP receive filter settings before these calls, and - use SetIpFilter() to restore them after the calls. If incompatible filtering is - requested (for example, PROMISCUOUS with anything else), or if the device does not - support a requested filter setting and it cannot be accommodated in software - (for example, PROMISCUOUS not supported), EFI_INVALID_PARAMETER will be returned. - The IPlist field is used to enable IPs other than the StationIP. They may be - multicast or unicast. If IPcnt is set as well as EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP, - then both the StationIP and the IPs from the IPlist will be used. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param NewFilter The pointer to the new set of IP receive filters. - - @retval EFI_SUCCESS The IP receive filter settings were updated. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter - ); - -/** - Uses the ARP protocol to resolve a MAC address. - - This function uses the ARP protocol to resolve a MAC address. The UsingIpv6 field - of the EFI_PXE_BASE_CODE_MODE structure is used to determine if IPv4 or IPv6 - addresses are being used. The IP address specified by IpAddr is used to resolve - a MAC address. If the ARP protocol succeeds in resolving the specified address, - then the ArpCacheEntries and ArpCache fields of the EFI_PXE_BASE_CODE_MODE structure - are updated, and EFI_SUCCESS is returned. If MacAddr is not NULL, the resolved - MAC address is placed there as well. - If the PXE Base Code protocol is in the stopped state, then EFI_NOT_STARTED is - returned. If the ARP protocol encounters a timeout condition while attempting - to resolve an address, then EFI_TIMEOUT is returned. If the Callback Protocol - does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, then EFI_ABORTED is - returned. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param IpAddr The pointer to the IP address that is used to resolve a MAC address. - @param MacAddr If not NULL, a pointer to the MAC address that was resolved with the - ARP protocol. - - @retval EFI_SUCCESS The IP or MAC address was resolved. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. - @retval EFI_ABORTED The callback function aborted the ARP Protocol. - @retval EFI_TIMEOUT The ARP Protocol encountered a timeout condition. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_PXE_BASE_CODE_ARP)( - IN EFI_PXE_BASE_CODE_PROTOCOL *This, - IN EFI_IP_ADDRESS *IpAddr, - IN EFI_MAC_ADDRESS *MacAddr OPTIONAL - ); - -/** - Updates the parameters that affect the operation of the PXE Base Code Protocol. - - This function sets parameters that affect the operation of the PXE Base Code Protocol. - The parameter specified by NewAutoArp is used to control the generation of ARP - protocol packets. If NewAutoArp is TRUE, then ARP Protocol packets will be generated - as required by the PXE Base Code Protocol. If NewAutoArp is FALSE, then no ARP - Protocol packets will be generated. In this case, the only mappings that are - available are those stored in the ArpCache of the EFI_PXE_BASE_CODE_MODE structure. - If there are not enough mappings in the ArpCache to perform a PXE Base Code Protocol - service, then the service will fail. This function updates the AutoArp field of - the EFI_PXE_BASE_CODE_MODE structure to NewAutoArp. - The SetParameters() call must be invoked after a Callback Protocol is installed - to enable the use of callbacks. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param NewAutoArp If not NULL, a pointer to a value that specifies whether to replace the - current value of AutoARP. - @param NewSendGUID If not NULL, a pointer to a value that specifies whether to replace the - current value of SendGUID. - @param NewTTL If not NULL, a pointer to be used in place of the current value of TTL, - the "time to live" field of the IP header. - @param NewToS If not NULL, a pointer to be used in place of the current value of ToS, - the "type of service" field of the IP header. - @param NewMakeCallback If not NULL, a pointer to a value that specifies whether to replace the - current value of the MakeCallback field of the Mode structure. - - @retval EFI_SUCCESS The new parameters values were updated. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -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 *NewMakeCallback OPTIONAL - ); - -/** - Updates the station IP address and/or subnet mask values of a network device. - - This function updates the station IP address and/or subnet mask values of a network - device. - The NewStationIp field is used to modify the network device's current IP address. - If NewStationIP is NULL, then the current IP address will not be modified. Otherwise, - this function updates the StationIp field of the EFI_PXE_BASE_CODE_MODE structure - with NewStationIp. - The NewSubnetMask field is used to modify the network device's current subnet - mask. If NewSubnetMask is NULL, then the current subnet mask will not be modified. - Otherwise, this function updates the SubnetMask field of the EFI_PXE_BASE_CODE_MODE - structure with NewSubnetMask. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param NewStationIp The pointer to the new IP address to be used by the network device. - @param NewSubnetMask The pointer to the new subnet mask to be used by the network device. - - @retval EFI_SUCCESS The new station IP address and/or subnet mask were updated. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - -**/ -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 *NewSubnetMask OPTIONAL - ); - -/** - Updates the contents of the cached DHCP and Discover packets. - - The pointers to the new packets are used to update the contents of the cached - packets in the EFI_PXE_BASE_CODE_MODE structure. - - @param This The pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance. - @param NewDhcpDiscoverValid The pointer to a value that will replace the current - DhcpDiscoverValid field. - @param NewDhcpAckReceived The pointer to a value that will replace the current - DhcpAckReceived field. - @param NewProxyOfferReceived The pointer to a value that will replace the current - ProxyOfferReceived field. - @param NewPxeDiscoverValid The pointer to a value that will replace the current - ProxyOfferReceived field. - @param NewPxeReplyReceived The pointer to a value that will replace the current - PxeReplyReceived field. - @param NewPxeBisReplyReceived The pointer to a value that will replace the current - PxeBisReplyReceived field. - @param NewDhcpDiscover The pointer to the new cached DHCP Discover packet contents. - @param NewDhcpAck The pointer to the new cached DHCP Ack packet contents. - @param NewProxyOffer The pointer to the new cached Proxy Offer packet contents. - @param NewPxeDiscover The pointer to the new cached PXE Discover packet contents. - @param NewPxeReply The pointer to the new cached PXE Reply packet contents. - @param NewPxeBisReply The pointer to the new cached PXE BIS Reply packet contents. - - @retval EFI_SUCCESS The cached packet contents were updated. - @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state. - @retval EFI_INVALID_PARAMETER This is NULL or not point to a valid EFI_PXE_BASE_CODE_PROTOCOL structure. - -**/ -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 - IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL - ); - -// -// PXE Base Code Protocol structure -// -#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000 - -// -// Revision defined in EFI1.1 -// -#define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION - -/// -/// The EFI_PXE_BASE_CODE_PROTOCOL is used to control PXE-compatible devices. -/// An EFI_PXE_BASE_CODE_PROTOCOL will be layered on top of an -/// EFI_MANAGED_NETWORK_PROTOCOL protocol in order to perform packet level transactions. -/// The EFI_PXE_BASE_CODE_PROTOCOL handle also supports the -/// EFI_LOAD_FILE_PROTOCOL protocol. This provides a clean way to obtain control from the -/// boot manager if the boot path is from the remote device. -/// -struct _EFI_PXE_BASE_CODE_PROTOCOL { - /// - /// The revision of the EFI_PXE_BASE_CODE_PROTOCOL. All future revisions must - /// 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; - /// - /// The pointer to the EFI_PXE_BASE_CODE_MODE data for this device. - /// - EFI_PXE_BASE_CODE_MODE *Mode; -}; - -extern EFI_GUID gEfiPxeBaseCodeProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Rng.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Rng.h deleted file mode 100644 index f04efbb03..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Rng.h +++ /dev/null @@ -1,158 +0,0 @@ -/** @file - EFI_RNG_PROTOCOL as defined in UEFI 2.4. - 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. - -**/ - -#ifndef __EFI_RNG_PROTOCOL_H__ -#define __EFI_RNG_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -/// -/// Global ID for the Random Number Generator Protocol -/// -#define EFI_RNG_PROTOCOL_GUID \ - { \ - 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44 } \ - } - -typedef struct _EFI_RNG_PROTOCOL EFI_RNG_PROTOCOL; - -/// -/// A selection of EFI_RNG_PROTOCOL algorithms. -/// The algorithms listed are optional, not meant to be exhaustive and be argmented by -/// vendors or other industry standards. -/// - -typedef EFI_GUID EFI_RNG_ALGORITHM; - -/// -/// The algorithms corresponds to SP800-90 as defined in -/// NIST SP 800-90, "Recommendation for Random Number Generation Using Deterministic Random -/// Bit Generators", March 2007. -/// -#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID \ - { \ - 0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 } \ - } -#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID \ - { \ - 0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7 } \ - } -#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID \ - { \ - 0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e } \ - } -/// -/// The algorithms correspond to X9.31 as defined in -/// NIST, "Recommended Random Number Generator Based on ANSI X9.31 Appendix A.2.4 Using -/// the 3-Key Triple DES and AES Algorithm", January 2005. -/// -#define EFI_RNG_ALGORITHM_X9_31_3DES_GUID \ - { \ - 0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 } \ - } -#define EFI_RNG_ALGORITHM_X9_31_AES_GUID \ - { \ - 0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 } \ - } -/// -/// The "raw" algorithm, when supported, is intended to provide entropy directly from -/// the source, without it going through some deterministic random bit generator. -/// -#define EFI_RNG_ALGORITHM_RAW \ - { \ - 0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 } \ - } - -/** - Returns information about the random number generation implementation. - - @param[in] This A pointer to the EFI_RNG_PROTOCOL instance. - @param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList. - On output with a return code of EFI_SUCCESS, the size - in bytes of the data returned in RNGAlgorithmList. On output - with a return code of EFI_BUFFER_TOO_SMALL, - the size of RNGAlgorithmList required to obtain the list. - @param[out] RNGAlgorithmList A caller-allocated memory buffer filled by the driver - with one EFI_RNG_ALGORITHM element for each supported - RNG algorithm. The list must not change across multiple - calls to the same driver. The first algorithm in the list - is the default algorithm for the driver. - - @retval EFI_SUCCESS The RNG algorithm list was returned successfully. - @retval EFI_UNSUPPORTED The services is not supported by this driver. - @retval EFI_DEVICE_ERROR The list of algorithms could not be retrieved due to a - hardware or firmware error. - @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect. - @retval EFI_BUFFER_TOO_SMALL The buffer RNGAlgorithmList is too small to hold the result. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_RNG_GET_INFO) ( - IN EFI_RNG_PROTOCOL *This, - IN OUT UINTN *RNGAlgorithmListSize, - OUT EFI_RNG_ALGORITHM *RNGAlgorithmList - ); - -/** - Produces and returns an RNG value using either the default or specified RNG algorithm. - - @param[in] This A pointer to the EFI_RNG_PROTOCOL instance. - @param[in] RNGAlgorithm A pointer to the EFI_RNG_ALGORITHM that identifies the RNG - algorithm to use. May be NULL in which case the function will - use its default RNG algorithm. - @param[in] RNGValueLength The length in bytes of the memory buffer pointed to by - RNGValue. The driver shall return exactly this numbers of bytes. - @param[out] RNGValue A caller-allocated memory buffer filled by the driver with the - resulting RNG value. - - @retval EFI_SUCCESS The RNG value was returned successfully. - @retval EFI_UNSUPPORTED The algorithm specified by RNGAlgorithm is not supported by - this driver. - @retval EFI_DEVICE_ERROR An RNG value could not be retrieved due to a hardware or - firmware error. - @retval EFI_NOT_READY There is not enough random data available to satisfy the length - requested by RNGValueLength. - @retval EFI_INVALID_PARAMETER RNGValue is NULL or RNGValueLength is zero. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_RNG_GET_RNG) ( - IN EFI_RNG_PROTOCOL *This, - IN EFI_RNG_ALGORITHM *RNGAlgorithm, OPTIONAL - IN UINTN RNGValueLength, - OUT UINT8 *RNGValue - ); - -/// -/// The Random Number Generator (RNG) protocol provides random bits for use in -/// applications, or entropy for seeding other random number generators. -/// -struct _EFI_RNG_PROTOCOL { - 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; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleFileSystem.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleFileSystem.h deleted file mode 100644 index b6bacfd9c..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleFileSystem.h +++ /dev/null @@ -1,564 +0,0 @@ -/** @file - SimpleFileSystem protocol as defined in the UEFI 2.0 specification. - - The SimpleFileSystem protocol is the programmatic access to the FAT (12,16,32) - file system specified in UEFI 2.0. It can also be used to abstract a file - system other than FAT. - - 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. - -**/ - -#ifndef __SIMPLE_FILE_SYSTEM_H__ -#define __SIMPLE_FILE_SYSTEM_H__ - -FILE_LICENCE ( BSD3 ); - -#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_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 - -/// -/// Protocol name defined in EFI1.1. -/// -typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE; -typedef EFI_FILE_PROTOCOL EFI_FILE; - -/** - Open the root directory on a volume. - - @param This A pointer to the volume to open the root directory. - @param Root A pointer to the location to return the opened file handle for the - root directory. - - @retval EFI_SUCCESS The device was opened. - @retval EFI_UNSUPPORTED This volume does not support the requested file system type. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_ACCESS_DENIED The service denied access to the file. - @retval EFI_OUT_OF_RESOURCES The volume was not opened due to lack of resources. - @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no - longer supported. Any existing file handles for this volume are - no longer valid. To access the files on the new medium, the - volume must be reopened with OpenVolume(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME)( - IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This, - OUT EFI_FILE_PROTOCOL **Root - ); - -#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000 - -/// -/// Revision defined in EFI1.1 -/// -#define EFI_FILE_IO_INTERFACE_REVISION EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION - -struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL { - /// - /// The version of the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. The version - /// specified by this specification is 0x00010000. All future revisions - /// must be backwards compatible. - /// - UINT64 Revision; - EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume; -}; - -/** - Opens a new file relative to the source file's location. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to the source location. This would typically be an open - handle to a directory. - @param NewHandle A pointer to the location to return the opened handle for the new - file. - @param FileName The Null-terminated string of the name of the file to be opened. - The file name may contain the following path modifiers: "\", ".", - and "..". - @param OpenMode The mode to open the file. The only valid combinations that the - file may be opened with are: Read, Read/Write, or Create/Read/Write. - @param Attributes Only valid for EFI_FILE_MODE_CREATE, in which case these are the - attribute bits for the newly created file. - - @retval EFI_SUCCESS The file was opened. - @retval EFI_NOT_FOUND The specified file could not be found on the device. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no - longer supported. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write - when the media is write-protected. - @retval EFI_ACCESS_DENIED The service denied access to the file. - @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file. - @retval EFI_VOLUME_FULL The volume is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_OPEN)( - IN EFI_FILE_PROTOCOL *This, - OUT EFI_FILE_PROTOCOL **NewHandle, - IN CHAR16 *FileName, - IN UINT64 OpenMode, - IN UINT64 Attributes - ); - -// -// Open modes -// -#define EFI_FILE_MODE_READ 0x0000000000000001ULL -#define EFI_FILE_MODE_WRITE 0x0000000000000002ULL -#define EFI_FILE_MODE_CREATE 0x8000000000000000ULL - -// -// 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 - -/** - Closes a specified file handle. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to close. - - @retval EFI_SUCCESS The file was closed. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_CLOSE)( - IN EFI_FILE_PROTOCOL *This - ); - -/** - Close and delete the file handle. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the - handle to the file to delete. - - @retval EFI_SUCCESS The file was closed and deleted, and the handle was closed. - @retval EFI_WARN_DELETE_FAILURE The handle was closed, but the file was not deleted. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_DELETE)( - IN EFI_FILE_PROTOCOL *This - ); - -/** - Reads data from a file. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to read data from. - @param BufferSize On input, the size of the Buffer. On output, the amount of data - returned in Buffer. In both cases, the size is measured in bytes. - @param Buffer The buffer into which the data is read. - - @retval EFI_SUCCESS Data was read. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_DEVICE_ERROR An attempt was made to read from a deleted file. - @retval EFI_DEVICE_ERROR On entry, the current file position is beyond the end of the file. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory - entry. BufferSize has been updated with the size - needed to complete the request. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_READ)( - IN EFI_FILE_PROTOCOL *This, - IN OUT UINTN *BufferSize, - OUT VOID *Buffer - ); - -/** - Writes data to a file. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to write data to. - @param BufferSize On input, the size of the Buffer. On output, the amount of data - actually written. In both cases, the size is measured in bytes. - @param Buffer The buffer of data to write. - - @retval EFI_SUCCESS Data was written. - @retval EFI_UNSUPPORTED Writes to open directory files are not supported. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_DEVICE_ERROR An attempt was made to write to a deleted file. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED The file or medium is write-protected. - @retval EFI_ACCESS_DENIED The file was opened read only. - @retval EFI_VOLUME_FULL The volume is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_WRITE)( - IN EFI_FILE_PROTOCOL *This, - IN OUT UINTN *BufferSize, - IN VOID *Buffer - ); - -/** - Sets a file's current position. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the - file handle to set the requested position on. - @param Position The byte position from the start of the file to set. - - @retval EFI_SUCCESS The position was set. - @retval EFI_UNSUPPORTED The seek request for nonzero is not valid on open - directories. - @retval EFI_DEVICE_ERROR An attempt was made to set the position of a deleted file. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_SET_POSITION)( - IN EFI_FILE_PROTOCOL *This, - IN UINT64 Position - ); - -/** - Returns a file's current position. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to get the current position on. - @param Position The address to return the file's current position value. - - @retval EFI_SUCCESS The position was returned. - @retval EFI_UNSUPPORTED The request is not valid on open directories. - @retval EFI_DEVICE_ERROR An attempt was made to get the position from a deleted file. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_GET_POSITION)( - IN EFI_FILE_PROTOCOL *This, - OUT UINT64 *Position - ); - -/** - Returns information about a file. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle the requested information is for. - @param InformationType The type identifier for the information being requested. - @param BufferSize On input, the size of Buffer. On output, the amount of data - returned in Buffer. In both cases, the size is measured in bytes. - @param Buffer A pointer to the data buffer to return. The buffer's type is - indicated by InformationType. - - @retval EFI_SUCCESS The information was returned. - @retval EFI_UNSUPPORTED The InformationType is not known. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory entry. - BufferSize has been updated with the size needed to complete - the request. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_GET_INFO)( - IN EFI_FILE_PROTOCOL *This, - IN EFI_GUID *InformationType, - IN OUT UINTN *BufferSize, - OUT VOID *Buffer - ); - -/** - Sets information about a file. - - @param File A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle the information is for. - @param InformationType The type identifier for the information being set. - @param BufferSize The size, in bytes, of Buffer. - @param Buffer A pointer to the data buffer to write. The buffer's type is - indicated by InformationType. - - @retval EFI_SUCCESS The information was set. - @retval EFI_UNSUPPORTED The InformationType is not known. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED InformationType is EFI_FILE_INFO_ID and the media is - read-only. - @retval EFI_WRITE_PROTECTED InformationType is EFI_FILE_PROTOCOL_SYSTEM_INFO_ID - and the media is read only. - @retval EFI_WRITE_PROTECTED InformationType is EFI_FILE_SYSTEM_VOLUME_LABEL_ID - and the media is read-only. - @retval EFI_ACCESS_DENIED An attempt is made to change the name of a file to a - file that is already present. - @retval EFI_ACCESS_DENIED An attempt is being made to change the EFI_FILE_DIRECTORY - Attribute. - @retval EFI_ACCESS_DENIED An attempt is being made to change the size of a directory. - @retval EFI_ACCESS_DENIED InformationType is EFI_FILE_INFO_ID and the file was opened - read-only and an attempt is being made to modify a field - other than Attribute. - @retval EFI_VOLUME_FULL The volume is full. - @retval EFI_BAD_BUFFER_SIZE BufferSize is smaller than the size of the type indicated - by InformationType. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_SET_INFO)( - IN EFI_FILE_PROTOCOL *This, - IN EFI_GUID *InformationType, - IN UINTN BufferSize, - IN VOID *Buffer - ); - -/** - Flushes all modified data associated with a file to a device. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to flush. - - @retval EFI_SUCCESS The data was flushed. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED The file or medium is write-protected. - @retval EFI_ACCESS_DENIED The file was opened read-only. - @retval EFI_VOLUME_FULL The volume is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_FLUSH)( - IN EFI_FILE_PROTOCOL *This - ); - -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. - // 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; - - // - // Defines whether or not the signaled event encountered an error. - // - EFI_STATUS Status; - - // - // For OpenEx(): Not Used, ignored. - // For ReadEx(): On input, the size of the Buffer. On output, the amount of data returned in Buffer. - // In both cases, the size is measured in bytes. - // For WriteEx(): On input, the size of the Buffer. On output, the amount of data actually written. - // In both cases, the size is measured in bytes. - // For FlushEx(): Not used, ignored. - // - UINTN BufferSize; - - // - // For OpenEx(): Not Used, ignored. - // For ReadEx(): The buffer into which the data is read. - // For WriteEx(): The buffer of data to write. - // For FlushEx(): Not Used, ignored. - // - VOID *Buffer; -} EFI_FILE_IO_TOKEN; - -/** - Opens a new file relative to the source directory's location. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to the source location. - @param NewHandle A pointer to the location to return the opened handle for the new - file. - @param FileName The Null-terminated string of the name of the file to be opened. - The file name may contain the following path modifiers: "\", ".", - and "..". - @param OpenMode The mode to open the file. The only valid combinations that the - file may be opened with are: Read, Read/Write, or Create/Read/Write. - @param Attributes Only valid for EFI_FILE_MODE_CREATE, in which case these are the - attribute bits for the newly created file. - @param Token A pointer to the token associated with the transaction. - - @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully. - If Event is not NULL (asynchronous I/O): The request was successfully - queued for processing. - @retval EFI_NOT_FOUND The specified file could not be found on the device. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no - longer supported. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write - when the media is write-protected. - @retval EFI_ACCESS_DENIED The service denied access to the file. - @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file. - @retval EFI_VOLUME_FULL The volume is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_OPEN_EX)( - IN EFI_FILE_PROTOCOL *This, - OUT EFI_FILE_PROTOCOL **NewHandle, - IN CHAR16 *FileName, - IN UINT64 OpenMode, - IN UINT64 Attributes, - IN OUT EFI_FILE_IO_TOKEN *Token - ); - - -/** - Reads data from a file. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to read data from. - @param Token A pointer to the token associated with the transaction. - - @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully. - If Event is not NULL (asynchronous I/O): The request was successfully - queued for processing. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_DEVICE_ERROR An attempt was made to read from a deleted file. - @retval EFI_DEVICE_ERROR On entry, the current file position is beyond the end of the file. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_FILE_READ_EX) ( - IN EFI_FILE_PROTOCOL *This, - IN OUT EFI_FILE_IO_TOKEN *Token -); - - -/** - Writes data to a file. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to write data to. - @param Token A pointer to the token associated with the transaction. - - @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully. - If Event is not NULL (asynchronous I/O): The request was successfully - queued for processing. - @retval EFI_UNSUPPORTED Writes to open directory files are not supported. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_DEVICE_ERROR An attempt was made to write to a deleted file. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED The file or medium is write-protected. - @retval EFI_ACCESS_DENIED The file was opened read only. - @retval EFI_VOLUME_FULL The volume is full. - @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources. -**/ -typedef -EFI_STATUS -(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. - - @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file - handle to flush. - @param Token A pointer to the token associated with the transaction. - - @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully. - If Event is not NULL (asynchronous I/O): The request was successfully - queued for processing. - @retval EFI_NO_MEDIA The device has no medium. - @retval EFI_DEVICE_ERROR The device reported an error. - @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted. - @retval EFI_WRITE_PROTECTED The file or medium is write-protected. - @retval EFI_ACCESS_DENIED The file was opened read-only. - @retval EFI_VOLUME_FULL The volume is full. - @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources. - -**/ -typedef -EFI_STATUS -(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 - -// -// Revision defined in EFI1.1. -// -#define EFI_FILE_REVISION EFI_FILE_PROTOCOL_REVISION - -/// -/// The EFI_FILE_PROTOCOL provides file IO access to supported file systems. -/// An EFI_FILE_PROTOCOL provides access to a file's or directory's contents, -/// and is also a reference to a location in the directory tree of the file system -/// in which the file resides. With any given file handle, other files may be opened -/// relative to this file's location, yielding new file handles. -/// -struct _EFI_FILE_PROTOCOL { - /// - /// The version of the EFI_FILE_PROTOCOL interface. The version specified - /// 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; -}; - - -extern EFI_GUID gEfiSimpleFileSystemProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h deleted file mode 100644 index 2b521a9de..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleNetwork.h +++ /dev/null @@ -1,664 +0,0 @@ -/** @file - The EFI_SIMPLE_NETWORK_PROTOCOL provides services to initialize a network interface, - transmit packets, receive packets, and close a network interface. - - Basic network device abstraction. - - Rx - Received - Tx - Transmit - MCast - MultiCast - ... - -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. - - @par Revision Reference: - This Protocol is introduced in EFI Specification 1.10. - -**/ - -#ifndef __SIMPLE_NETWORK_H__ -#define __SIMPLE_NETWORK_H__ - -FILE_LICENCE ( BSD3 ); - -#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; - - -/// -/// Protocol defined in EFI1.1. -/// -typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK; - -/// -/// Simple Network Protocol data structures. -/// -typedef struct { - /// - /// Total number of frames received. Includes frames with errors and - /// dropped frames. - /// - UINT64 RxTotalFrames; - - /// - /// Number of valid frames received and copied into receive buffers. - /// - UINT64 RxGoodFrames; - - /// - /// Number of frames below the minimum length for the media. - /// This would be <64 for ethernet. - /// - UINT64 RxUndersizeFrames; - - /// - /// Number of frames longer than the maxminum length for the - /// media. This would be >1500 for ethernet. - /// - UINT64 RxOversizeFrames; - - /// - /// Valid frames that were dropped because receive buffers were full. - /// - UINT64 RxDroppedFrames; - - /// - /// Number of valid unicast frames received and not dropped. - /// - UINT64 RxUnicastFrames; - - /// - /// Number of valid broadcast frames received and not dropped. - /// - UINT64 RxBroadcastFrames; - - /// - /// Number of valid mutlicast frames received and not dropped. - /// - UINT64 RxMulticastFrames; - - /// - /// Number of frames w/ CRC or alignment errors. - /// - UINT64 RxCrcErrorFrames; - - /// - /// Total number of bytes received. Includes frames with errors - /// and dropped frames. - // - UINT64 RxTotalBytes; - - /// - /// Transmit statistics. - /// - 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; - - /// - /// Number of frames destined for unsupported protocol. - /// - UINT64 UnsupportedProtocol; - -} EFI_NETWORK_STATISTICS; - -/// -/// The state of the network interface. -/// When an EFI_SIMPLE_NETWORK_PROTOCOL driver initializes a -/// network interface, the network interface is left in the EfiSimpleNetworkStopped state. -/// -typedef enum { - EfiSimpleNetworkStopped, - EfiSimpleNetworkStarted, - EfiSimpleNetworkInitialized, - EfiSimpleNetworkMaxState -} EFI_SIMPLE_NETWORK_STATE; - -#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01 -#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02 -#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04 -#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 MAX_MCAST_FILTER_CNT 16 -typedef struct { - /// - /// Reports the current state of the network interface. - /// - UINT32 State; - /// - /// The size, in bytes, of the network interface's HW address. - /// - UINT32 HwAddressSize; - /// - /// The size, in bytes, of the network interface's media header. - /// - UINT32 MediaHeaderSize; - /// - /// The maximum size, in bytes, of the packets supported by the network interface. - /// - UINT32 MaxPacketSize; - /// - /// The size, in bytes, of the NVRAM device attached to the network interface. - /// - UINT32 NvRamSize; - /// - /// The size that must be used for all NVRAM reads and writes. The - /// start address for NVRAM read and write operations and the total - /// length of those operations, must be a multiple of this value. The - /// legal values for this field are 0, 1, 2, 4, and 8. - /// - UINT32 NvRamAccessSize; - /// - /// The multicast receive filter settings supported by the network interface. - /// - UINT32 ReceiveFilterMask; - /// - /// The current multicast receive filter settings. - /// - UINT32 ReceiveFilterSetting; - /// - /// The maximum number of multicast address receive filters supported by the driver. - /// - UINT32 MaxMCastFilterCount; - /// - /// The current number of multicast address receive filters. - /// - UINT32 MCastFilterCount; - /// - /// Array containing the addresses of the current multicast address receive filters. - /// - EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]; - /// - /// The current HW MAC address for the network interface. - /// - EFI_MAC_ADDRESS CurrentAddress; - /// - /// The current HW MAC address for broadcast packets. - /// - EFI_MAC_ADDRESS BroadcastAddress; - /// - /// The permanent HW MAC address for the network interface. - /// - EFI_MAC_ADDRESS PermanentAddress; - /// - /// The interface type of the network interface. - /// - UINT8 IfType; - /// - /// TRUE if the HW MAC address can be changed. - /// - BOOLEAN MacAddressChangeable; - /// - /// TRUE if the network interface can transmit more than one packet at a time. - /// - BOOLEAN MultipleTxSupported; - /// - /// TRUE if the presence of media can be determined; otherwise FALSE. - /// - BOOLEAN MediaPresentSupported; - /// - /// TRUE if media are connected to the network interface; otherwise FALSE. - /// - BOOLEAN MediaPresent; -} EFI_SIMPLE_NETWORK_MODE; - -// -// Protocol Member Functions -// -/** - Changes the state of a network interface from "stopped" to "started". - - @param This Protocol instance pointer. - - @retval EFI_SUCCESS The network interface was started. - @retval EFI_ALREADY_STARTED The network interface is already in the started state. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_START)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This - ); - -/** - Changes the state of a network interface from "started" to "stopped". - - @param This Protocol instance pointer. - - @retval EFI_SUCCESS The network interface was stopped. - @retval EFI_ALREADY_STARTED The network interface is already in the stopped state. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_STOP)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This - ); - -/** - Resets a network adapter and allocates the transmit and receive buffers - required by the network interface; optionally, also requests allocation - of additional transmit and receive buffers. - - @param This The protocol instance pointer. - @param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space - that the driver should allocate for the network interface. - Some network interfaces will not be able to use the extra - buffer, and the caller will not know if it is actually - being used. - @param ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space - that the driver should allocate for the network interface. - Some network interfaces will not be able to use the extra - buffer, and the caller will not know if it is actually - being used. - - @retval EFI_SUCCESS The network interface was initialized. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_OUT_OF_RESOURCES There was not enough memory for the transmit and - receive buffers. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN UINTN ExtraRxBufferSize OPTIONAL, - IN UINTN ExtraTxBufferSize OPTIONAL - ); - -/** - Resets a network adapter and re-initializes it with the parameters that were - provided in the previous call to Initialize(). - - @param This The protocol instance pointer. - @param ExtendedVerification Indicates that the driver may perform a more - exhaustive verification operation of the device - during reset. - - @retval EFI_SUCCESS The network interface was reset. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_RESET)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN BOOLEAN ExtendedVerification - ); - -/** - Resets a network adapter and leaves it in a state that is safe for - another driver to initialize. - - @param This Protocol instance pointer. - - @retval EFI_SUCCESS The network interface was shutdown. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This - ); - -/** - Manages the multicast receive filters of a network interface. - - @param This The protocol instance pointer. - @param Enable A bit mask of receive filters to enable on the network interface. - @param Disable A bit mask of receive filters to disable on the network interface. - @param ResetMCastFilter Set to TRUE to reset the contents of the multicast receive - filters on the network interface to their default values. - @param McastFilterCnt Number of multicast HW MAC addresses in the new - MCastFilter list. This value must be less than or equal to - the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This - field is optional if ResetMCastFilter is TRUE. - @param MCastFilter A pointer to a list of new multicast receive filter HW MAC - addresses. This list will replace any existing multicast - HW MAC address list. This field is optional if - ResetMCastFilter is TRUE. - - @retval EFI_SUCCESS The multicast receive filter list was updated. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN UINT32 Enable, - IN UINT32 Disable, - IN BOOLEAN ResetMCastFilter, - IN UINTN MCastFilterCnt OPTIONAL, - IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL - ); - -/** - Modifies or resets the current station address, if supported. - - @param This The protocol instance pointer. - @param Reset Flag used to reset the station address to the network interfaces - permanent address. - @param New The new station address to be used for the network interface. - - @retval EFI_SUCCESS The network interfaces station address was updated. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN BOOLEAN Reset, - IN EFI_MAC_ADDRESS *New OPTIONAL - ); - -/** - Resets or collects the statistics on a network interface. - - @param This Protocol instance pointer. - @param Reset Set to TRUE to reset the statistics for the network interface. - @param StatisticsSize On input the size, in bytes, of StatisticsTable. On - output the size, in bytes, of the resulting table of - statistics. - @param StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that - contains the statistics. - - @retval EFI_SUCCESS The statistics were collected from the network interface. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer - size needed to hold the statistics is returned in - StatisticsSize. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN BOOLEAN Reset, - IN OUT UINTN *StatisticsSize OPTIONAL, - OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL - ); - -/** - Converts a multicast IP address to a multicast HW MAC address. - - @param This The protocol instance pointer. - @param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set - to FALSE if the multicast IP address is IPv4 [RFC 791]. - @param IP The multicast IP address that is to be converted to a multicast - HW MAC address. - @param MAC The multicast HW MAC address that is to be generated from IP. - - @retval EFI_SUCCESS The multicast IP address was mapped to the multicast - HW MAC address. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer - size needed to hold the statistics is returned in - StatisticsSize. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN BOOLEAN IPv6, - IN EFI_IP_ADDRESS *IP, - OUT EFI_MAC_ADDRESS *MAC - ); - -/** - Performs read and write operations on the NVRAM device attached to a - network interface. - - @param This The protocol instance pointer. - @param ReadWrite TRUE for read operations, FALSE for write operations. - @param Offset Byte offset in the NVRAM device at which to start the read or - write operation. This must be a multiple of NvRamAccessSize and - less than NvRamSize. - @param BufferSize The number of bytes to read or write from the NVRAM device. - This must also be a multiple of NvramAccessSize. - @param Buffer A pointer to the data buffer. - - @retval EFI_SUCCESS The NVRAM access was performed. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN BOOLEAN ReadWrite, - IN UINTN Offset, - IN UINTN BufferSize, - IN OUT VOID *Buffer - ); - -/** - Reads the current interrupt status and recycled transmit buffer status from - a network interface. - - @param This The protocol instance pointer. - @param InterruptStatus A pointer to the bit mask of the currently active interrupts - If this is NULL, the interrupt status will not be read from - the device. If this is not NULL, the interrupt status will - be read from the device. When the interrupt status is read, - it will also be cleared. Clearing the transmit interrupt - does not empty the recycled transmit buffer array. - @param TxBuf Recycled transmit buffer address. The network interface will - not transmit if its internal recycled transmit buffer array - is full. Reading the transmit buffer does not clear the - transmit interrupt. If this is NULL, then the transmit buffer - status will not be read. If there are no transmit buffers to - recycle and TxBuf is not NULL, * TxBuf will be set to NULL. - - @retval EFI_SUCCESS The status of the network interface was retrieved. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - OUT UINT32 *InterruptStatus OPTIONAL, - OUT VOID **TxBuf OPTIONAL - ); - -/** - Places a packet in the transmit queue of a network interface. - - @param This The protocol instance pointer. - @param HeaderSize The size, in bytes, of the media header to be filled in by - the Transmit() function. If HeaderSize is non-zero, then it - must be equal to This->Mode->MediaHeaderSize and the DestAddr - and Protocol parameters must not be NULL. - @param BufferSize The size, in bytes, of the entire packet (media header and - data) to be transmitted through the network interface. - @param Buffer A pointer to the packet (media header followed by data) to be - transmitted. This parameter cannot be NULL. If HeaderSize is zero, - then the media header in Buffer must already be filled in by the - caller. If HeaderSize is non-zero, then the media header will be - filled in by the Transmit() function. - @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this parameter - is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then - This->Mode->CurrentAddress is used for the source HW MAC address. - @param DestAddr The destination HW MAC address. If HeaderSize is zero, then this - parameter is ignored. - @param Protocol The type of header to build. If HeaderSize is zero, then this - parameter is ignored. See RFC 1700, section "Ether Types", for - examples. - - @retval EFI_SUCCESS The packet was placed on the transmit queue. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. - @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - IN UINTN HeaderSize, - IN UINTN BufferSize, - IN VOID *Buffer, - IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL, - IN EFI_MAC_ADDRESS *DestAddr OPTIONAL, - IN UINT16 *Protocol OPTIONAL - ); - -/** - Receives a packet from a network interface. - - @param This The protocol instance pointer. - @param HeaderSize The size, in bytes, of the media header received on the network - interface. If this parameter is NULL, then the media header size - will not be returned. - @param BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in - bytes, of the packet that was received on the network interface. - @param Buffer A pointer to the data buffer to receive both the media header and - the data. - @param SrcAddr The source HW MAC address. If this parameter is NULL, the - HW MAC source address will not be extracted from the media - header. - @param DestAddr The destination HW MAC address. If this parameter is NULL, - the HW MAC destination address will not be extracted from the - media header. - @param Protocol The media header type. If this parameter is NULL, then the - protocol will not be extracted from the media header. See - RFC 1700 section "Ether Types" for examples. - - @retval EFI_SUCCESS The received data was stored in Buffer, and BufferSize has - been updated to the number of bytes received. - @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_NOT_READY The network interface is too busy to accept this transmit - request. - @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. - @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. - @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network interface. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE)( - IN EFI_SIMPLE_NETWORK_PROTOCOL *This, - OUT UINTN *HeaderSize OPTIONAL, - IN OUT UINTN *BufferSize, - OUT VOID *Buffer, - OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL, - OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL, - OUT UINT16 *Protocol OPTIONAL - ); - -#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000 - -// -// Revision defined in EFI1.1 -// -#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION - -/// -/// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access -/// to a network adapter. Once the network adapter initializes, -/// the EFI_SIMPLE_NETWORK_PROTOCOL protocol provides services that -/// allow packets to be transmitted and received. -/// -struct _EFI_SIMPLE_NETWORK_PROTOCOL { - /// - /// Revision of the EFI_SIMPLE_NETWORK_PROTOCOL. All future revisions must - /// 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; - /// - /// Event used with WaitForEvent() to wait for a packet to be received. - /// - EFI_EVENT WaitForPacket; - /// - /// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device. - /// - EFI_SIMPLE_NETWORK_MODE *Mode; -}; - -extern EFI_GUID gEfiSimpleNetworkProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextIn.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextIn.h deleted file mode 100644 index 571ecaf30..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextIn.h +++ /dev/null @@ -1,136 +0,0 @@ -/** @file - Simple Text Input protocol from the UEFI 2.0 specification. - - Abstraction of a very simple input device like a keyboard or serial - terminal. - - Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__ -#define __SIMPLE_TEXT_IN_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ - { \ - 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } - -typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL; - -/// -/// Protocol GUID name defined in EFI1.1. -/// -#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; - -/// -/// The keystroke information for the key that was pressed. -/// -typedef struct { - UINT16 ScanCode; - CHAR16 UnicodeChar; -} EFI_INPUT_KEY; - -// -// Required unicode control chars -// -#define CHAR_NULL 0x0000 -#define CHAR_BACKSPACE 0x0008 -#define CHAR_TAB 0x0009 -#define CHAR_LINEFEED 0x000A -#define CHAR_CARRIAGE_RETURN 0x000D - -// -// EFI Scan codes -// -#define SCAN_NULL 0x0000 -#define SCAN_UP 0x0001 -#define SCAN_DOWN 0x0002 -#define SCAN_RIGHT 0x0003 -#define SCAN_LEFT 0x0004 -#define SCAN_HOME 0x0005 -#define SCAN_END 0x0006 -#define SCAN_INSERT 0x0007 -#define SCAN_DELETE 0x0008 -#define SCAN_PAGE_UP 0x0009 -#define SCAN_PAGE_DOWN 0x000A -#define SCAN_F1 0x000B -#define SCAN_F2 0x000C -#define SCAN_F3 0x000D -#define SCAN_F4 0x000E -#define SCAN_F5 0x000F -#define SCAN_F6 0x0010 -#define SCAN_F7 0x0011 -#define SCAN_F8 0x0012 -#define SCAN_F9 0x0013 -#define SCAN_F10 0x0014 -#define SCAN_ESC 0x0017 - -/** - Reset the input device and optionally run diagnostics - - @param This Protocol instance pointer. - @param ExtendedVerification Driver may perform diagnostics on reset. - - @retval EFI_SUCCESS The device was reset. - @retval EFI_DEVICE_ERROR The device is not functioning properly and could not be reset. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_INPUT_RESET)( - IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, - IN BOOLEAN ExtendedVerification - ); - -/** - Reads the next keystroke from the input device. The WaitForKey Event can - be used to test for existence of a keystroke via WaitForEvent () call. - - @param This Protocol instance pointer. - @param Key A pointer to a buffer that is filled in with the keystroke - information for the key that was pressed. - - @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. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_INPUT_READ_KEY)( - IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, - OUT EFI_INPUT_KEY *Key - ); - -/// -/// The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device. -/// It is the minimum required protocol for ConsoleIn. -/// -struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL { - 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; -}; - -extern EFI_GUID gEfiSimpleTextInProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextInEx.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextInEx.h deleted file mode 100644 index 9a9f5ab59..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextInEx.h +++ /dev/null @@ -1,327 +0,0 @@ -/** @file - Simple Text Input Ex protocol from the UEFI 2.0 specification. - - This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL - 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. - -**/ - -#ifndef __SIMPLE_TEXT_IN_EX_H__ -#define __SIMPLE_TEXT_IN_EX_H__ - -FILE_LICENCE ( BSD3 ); - -#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; - -/** - The Reset() function resets the input device hardware. As part - of initialization process, the firmware/device will make a quick - but reasonable attempt to verify that the device is functioning. - If the ExtendedVerification flag is TRUE the firmware may take - an extended amount of time to verify the device is operating on - reset. Otherwise the reset operation is to occur as quickly as - possible. The hardware verification process is not defined by - this specification and is left up to the platform firmware or - driver to implement. - - @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. - - @param ExtendedVerification Indicates that the driver may - perform a more exhaustive - verification operation of the - device during reset. - - - @retval EFI_SUCCESS The device was reset. - - @retval EFI_DEVICE_ERROR The device is not functioning - correctly and could not be reset. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_INPUT_RESET_EX)( - IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, - IN BOOLEAN ExtendedVerification -); - - -/// -/// EFI_KEY_TOGGLE_STATE. The toggle states are defined. -/// They are: EFI_TOGGLE_STATE_VALID, EFI_SCROLL_LOCK_ACTIVE -/// EFI_NUM_LOCK_ACTIVE, EFI_CAPS_LOCK_ACTIVE -/// -typedef UINT8 EFI_KEY_TOGGLE_STATE; - -typedef struct _EFI_KEY_STATE { - /// - /// Reflects the currently pressed shift - /// modifiers for the input device. The - /// returned value is valid only if the high - /// order bit has been set. - /// - 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_STATE; - -typedef struct { - /// - /// The EFI scan code and Unicode value returned from the input device. - /// - EFI_INPUT_KEY Key; - /// - /// The current state of various toggled attributes as well as input modifier values. - /// - EFI_KEY_STATE KeyState; -} EFI_KEY_DATA; - -// -// Any Shift or Toggle State that is valid should have -// high order bit set. -// -// 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 - -// -// 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 - -// -// 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 - -/** - The function reads the next keystroke from the input device. If - there is no pending keystroke the function returns - EFI_NOT_READY. If there is a pending keystroke, then - KeyData.Key.ScanCode is the EFI scan code defined in Error! - Reference source not found. The KeyData.Key.UnicodeChar is the - actual printable character or is zero if the key does not - represent a printable character (control key, function key, - etc.). The KeyData.KeyState is shift state for the character - reflected in KeyData.Key.UnicodeChar or KeyData.Key.ScanCode . - When interpreting the data from this function, it should be - noted that if a class of printable characters that are - normally adjusted by shift modifiers (e.g. Shift Key + "f" - key) would be presented solely as a KeyData.Key.UnicodeChar - without the associated shift state. So in the previous example - of a Shift Key + "f" key being pressed, the only pertinent - data returned would be KeyData.Key.UnicodeChar with the value - of "F". This of course would not typically be the case for - non-printable characters such as the pressing of the Right - Shift Key + F10 key since the corresponding returned data - would be reflected both in the KeyData.KeyState.KeyShiftState - and KeyData.Key.ScanCode values. UEFI drivers which implement - the EFI_SIMPLE_TEXT_INPUT_EX protocol are required to return - KeyData.Key and KeyData.KeyState values. These drivers must - always return the most current state of - KeyData.KeyState.KeyShiftState and - KeyData.KeyState.KeyToggleState. It should also be noted that - certain input devices may not be able to produce shift or toggle - state information, and in those cases the high order bit in the - respective Toggle and Shift state fields should not be active. - - - @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. - - @param KeyData A pointer to a buffer that is filled in with - the keystroke state data for the key that was - 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. - - -**/ -typedef -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 - have state settings adjusted. - - @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. - - @param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to - set the state for the input device. - - - @retval EFI_SUCCESS The device state was set appropriately. - - @retval EFI_DEVICE_ERROR The device is not functioning - correctly and could not have the - setting adjusted. - - @retval EFI_UNSUPPORTED The device does not support the - ability to have its state set. - -**/ -typedef -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. -/// -typedef -EFI_STATUS -(EFIAPI *EFI_KEY_NOTIFY_FUNCTION)( - IN EFI_KEY_DATA *KeyData -); - -/** - The RegisterKeystrokeNotify() function registers a function - which will be called when a specified keystroke will occur. - - @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. - - @param KeyData A pointer to a buffer that is filled in with - the keystroke information for the key that was - pressed. - - @param KeyNotificationFunction Points to the function to be - called when the key sequence - is typed specified by KeyData. - - - @param NotifyHandle Points to the unique handle assigned to - the registered notification. - - @retval EFI_SUCCESS The device state was set - appropriately. - - @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary - data structures. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)( - IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, - IN EFI_KEY_DATA *KeyData, - IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, - OUT VOID **NotifyHandle -); - -/** - The UnregisterKeystrokeNotify() function removes the - notification which was previously registered. - - @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. - - @param NotificationHandle The handle of the notification - function being unregistered. - - @retval EFI_SUCCESS The device state was set appropriately. - - @retval EFI_INVALID_PARAMETER The NotificationHandle is - invalid. - -**/ -typedef -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 -/// device. It is an extension to the Simple Text Input protocol -/// 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; - /// - /// 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; -}; - - -extern EFI_GUID gEfiSimpleTextInputExProtocolGuid; - -#endif - diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h deleted file mode 100644 index a79cf431c..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/SimpleTextOut.h +++ /dev/null @@ -1,406 +0,0 @@ -/** @file - Simple Text Out protocol from the UEFI 2.0 specification. - - Abstraction of a very simple text based output device like VGA text mode or - a serial terminal. The Simple Text Out protocol instance can represent - a single hardware device or a virtual device that is an aggregation - of multiple physical devices. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __SIMPLE_TEXT_OUT_H__ -#define __SIMPLE_TEXT_OUT_H__ - -FILE_LICENCE ( BSD3 ); - -#define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \ - { \ - 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } - -/// -/// Protocol GUID defined in EFI1.1. -/// -#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; - -// -// Define's for required EFI Unicode Box Draw characters -// -#define BOXDRAW_HORIZONTAL 0x2500 -#define BOXDRAW_VERTICAL 0x2502 -#define BOXDRAW_DOWN_RIGHT 0x250c -#define BOXDRAW_DOWN_LEFT 0x2510 -#define BOXDRAW_UP_RIGHT 0x2514 -#define BOXDRAW_UP_LEFT 0x2518 -#define BOXDRAW_VERTICAL_RIGHT 0x251c -#define BOXDRAW_VERTICAL_LEFT 0x2524 -#define BOXDRAW_DOWN_HORIZONTAL 0x252c -#define BOXDRAW_UP_HORIZONTAL 0x2534 -#define BOXDRAW_VERTICAL_HORIZONTAL 0x253c -#define BOXDRAW_DOUBLE_HORIZONTAL 0x2550 -#define BOXDRAW_DOUBLE_VERTICAL 0x2551 -#define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552 -#define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553 -#define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554 -#define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555 -#define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556 -#define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557 -#define BOXDRAW_UP_RIGHT_DOUBLE 0x2558 -#define BOXDRAW_UP_DOUBLE_RIGHT 0x2559 -#define BOXDRAW_DOUBLE_UP_RIGHT 0x255a -#define BOXDRAW_UP_LEFT_DOUBLE 0x255b -#define BOXDRAW_UP_DOUBLE_LEFT 0x255c -#define BOXDRAW_DOUBLE_UP_LEFT 0x255d -#define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e -#define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f -#define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560 -#define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561 -#define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562 -#define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563 -#define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564 -#define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565 -#define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566 -#define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567 -#define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568 -#define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569 -#define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a -#define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b -#define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c - -// -// EFI Required Block Elements Code Chart -// -#define BLOCKELEMENT_FULL_BLOCK 0x2588 -#define BLOCKELEMENT_LIGHT_SHADE 0x2591 - -// -// 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 - -// -// EFI Required Arrow shapes -// -#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_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_TEXT_ATTR(f, b) ((f) | ((b) << 4)) - -#define EFI_BACKGROUND_BLACK 0x00 -#define EFI_BACKGROUND_BLUE 0x10 -#define EFI_BACKGROUND_GREEN 0x20 -#define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN) -#define EFI_BACKGROUND_RED 0x40 -#define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED) -#define EFI_BACKGROUND_BROWN (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED) -#define EFI_BACKGROUND_LIGHTGRAY (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED) - -// -// We currently define attributes from 0 - 7F for color manipulations -// To internally handle the local display characteristics for a particular character, -// Bit 7 signifies the local glyph representation for a character. If turned on, glyphs will be -// pulled from the wide glyph database and will display locally as a wide character (16 X 19 versus 8 X 19) -// If bit 7 is off, the narrow glyph database will be used. This does NOT affect information that is sent to -// non-local displays, such as serial or LAN consoles. -// -#define EFI_WIDE_ATTRIBUTE 0x80 - -/** - Reset the text output device hardware and optionaly run diagnostics - - @param This The protocol instance pointer. - @param ExtendedVerification Driver may perform more exhaustive verfication - operation of the device during reset. - - @retval EFI_SUCCESS The text output device was reset. - @retval EFI_DEVICE_ERROR The text output device is not functioning correctly and - could not be reset. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_RESET)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN BOOLEAN ExtendedVerification - ); - -/** - Write a string to the output device. - - @param This The protocol instance pointer. - @param String The NULL-terminated string to be displayed on the output - device(s). All output devices must also support the Unicode - drawing character codes defined in this file. - - @retval EFI_SUCCESS The string was output to the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting to output - the text. - @retval EFI_UNSUPPORTED The output device's mode is not currently in a - defined text mode. - @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the - characters in the string could not be - rendered and were skipped. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_STRING)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN CHAR16 *String - ); - -/** - Verifies that all characters in a string can be output to the - target device. - - @param This The protocol instance pointer. - @param String The NULL-terminated string to be examined for the output - device(s). - - @retval EFI_SUCCESS The device(s) are capable of rendering the output string. - @retval EFI_UNSUPPORTED Some of the characters in the string cannot be - rendered by one or more of the output devices mapped - by the EFI handle. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_TEST_STRING)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN CHAR16 *String - ); - -/** - Returns information for an available text mode that the output device(s) - supports. - - @param This The protocol instance pointer. - @param ModeNumber The mode number to return information on. - @param Columns Returns the geometry of the text output device for the - requested ModeNumber. - @param Rows Returns the geometry of the text output device for the - requested ModeNumber. - - @retval EFI_SUCCESS The requested mode information was returned. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED The mode number was not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_QUERY_MODE)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN UINTN ModeNumber, - OUT UINTN *Columns, - OUT UINTN *Rows - ); - -/** - Sets the output device(s) to a specified mode. - - @param This The protocol instance pointer. - @param ModeNumber The mode number to set. - - @retval EFI_SUCCESS The requested text mode was set. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED The mode number was not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_SET_MODE)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN UINTN ModeNumber - ); - -/** - Sets the background and foreground colors for the OutputString () and - ClearScreen () functions. - - @param This The protocol instance pointer. - @param Attribute The attribute to set. Bits 0..3 are the foreground color, and - bits 4..6 are the background color. All other bits are undefined - and must be zero. The valid Attributes are defined in this file. - - @retval EFI_SUCCESS The attribute was set. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED The attribute requested is not defined. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_SET_ATTRIBUTE)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN UINTN Attribute - ); - -/** - Clears the output device(s) display to the currently selected background - color. - - @param This The protocol instance pointer. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED The output device is not in a valid text mode. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_CLEAR_SCREEN)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This - ); - -/** - Sets the current coordinates of the cursor position - - @param This The protocol instance pointer. - @param Column The position to set the cursor to. Must be greater than or - equal to zero and less than the number of columns and rows - by QueryMode (). - @param Row The position to set the cursor to. Must be greater than or - equal to zero and less than the number of columns and rows - by QueryMode (). - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or the - cursor position is invalid for the current mode. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN UINTN Column, - IN UINTN Row - ); - -/** - Makes the cursor visible or invisible - - @param This The protocol instance pointer. - @param Visible If TRUE, the cursor is set to be visible. If FALSE, the cursor is - set to be invisible. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the - request, or the device does not support changing - the cursor mode. - @retval EFI_UNSUPPORTED The output device is not in a valid text mode. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TEXT_ENABLE_CURSOR)( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN BOOLEAN Visible - ); - -/** - @par Data Structure Description: - Mode Structure pointed to by Simple Text Out protocol. -**/ -typedef struct { - /// - /// The number of modes supported by QueryMode () and SetMode (). - /// - INT32 MaxMode; - - // - // current settings - // - - /// - /// The text mode of the output device(s). - /// - INT32 Mode; - /// - /// The current character output attribute. - /// - INT32 Attribute; - /// - /// The cursor's column. - /// - INT32 CursorColumn; - /// - /// The cursor's row. - /// - INT32 CursorRow; - /// - /// The cursor is currently visbile or not. - /// - BOOLEAN CursorVisible; -} EFI_SIMPLE_TEXT_OUTPUT_MODE; - -/// -/// The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices. -/// It is the minimum required protocol for any handle supplied as the ConsoleOut -/// or StandardError device. In addition, the minimum supported text mode of such -/// devices is at least 80 x 25 characters. -/// -struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL { - EFI_TEXT_RESET Reset; - - 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_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; -}; - -extern EFI_GUID gEfiSimpleTextOutProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h deleted file mode 100644 index 1068448f0..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/TcgService.h +++ /dev/null @@ -1,209 +0,0 @@ -/** @file - TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final - See http://trustedcomputinggroup.org for the latest specification - -Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef _TCG_SERVICE_PROTOCOL_H_ -#define _TCG_SERVICE_PROTOCOL_H_ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/IndustryStandard/UefiTcgPlatform.h> - -#define EFI_TCG_PROTOCOL_GUID \ - {0xf541796d, 0xa62e, 0x4954, { 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd } } - -typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL; - -typedef struct { - UINT8 Major; - UINT8 Minor; - UINT8 RevMajor; - UINT8 RevMinor; -} TCG_VERSION; - -typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY { - UINT8 Size; /// Size of this structure. - TCG_VERSION StructureVersion; - TCG_VERSION ProtocolSpecVersion; - UINT8 HashAlgorithmBitmap; /// Hash algorithms . - /// This protocol is capable of : 01=SHA-1. - BOOLEAN TPMPresentFlag; /// 00h = TPM not present. - BOOLEAN TPMDeactivatedFlag; /// 01h = TPM currently deactivated. -} TCG_EFI_BOOT_SERVICE_CAPABILITY; - -typedef UINT32 TCG_ALGORITHM_ID; - -/// -/// Note: -/// Status codes returned for functions of EFI_TCG_PROTOCOL do not exactly match -/// those defined in the TCG EFI Protocol 1.20 Final Specification. -/// - -/** - This service provides EFI protocol capability information, state information - about the TPM, and Event Log state information. - - @param This Indicates the calling context - @param ProtocolCapability The callee allocates memory for a TCG_BOOT_SERVICE_CAPABILITY - structure and fills in the fields with the EFI protocol - capability information and the current TPM state information. - @param TCGFeatureFlags This is a pointer to the feature flags. No feature - flags are currently defined so this parameter - MUST be set to 0. However, in the future, - feature flags may be defined that, for example, - enable hash algorithm agility. - @param EventLogLocation This is a pointer to the address of the event log in memory. - @param EventLogLastEntry If the Event Log contains more than one entry, - this is a pointer to the address of the start of - the last entry in the event log in memory. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER ProtocolCapability does not match TCG capability. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_STATUS_CHECK)( - IN EFI_TCG_PROTOCOL *This, - OUT TCG_EFI_BOOT_SERVICE_CAPABILITY - *ProtocolCapability, - OUT UINT32 *TCGFeatureFlags, - OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, - OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry - ); - -/** - This service abstracts the capability to do a hash operation on a data buffer. - - @param This Indicates the calling context. - @param HashData The pointer to the data buffer to be hashed. - @param HashDataLen The length of the data buffer to be hashed. - @param AlgorithmId Identification of the Algorithm to use for the hashing operation. - @param HashedDataLen Resultant length of the hashed data. - @param HashedDataResult Resultant buffer of the hashed data. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER HashDataLen is NULL. - @retval EFI_INVALID_PARAMETER HashDataLenResult is NULL. - @retval EFI_OUT_OF_RESOURCES Cannot allocate buffer of size *HashedDataLen. - @retval EFI_UNSUPPORTED AlgorithmId not supported. - @retval EFI_BUFFER_TOO_SMALL *HashedDataLen < sizeof (TCG_DIGEST). -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_HASH_ALL)( - IN EFI_TCG_PROTOCOL *This, - IN UINT8 *HashData, - IN UINT64 HashDataLen, - IN TCG_ALGORITHM_ID AlgorithmId, - IN OUT UINT64 *HashedDataLen, - IN OUT UINT8 **HashedDataResult - ); - -/** - This service abstracts the capability to add an entry to the Event Log. - - @param This Indicates the calling context - @param TCGLogData The pointer to the start of the data buffer containing - the TCG_PCR_EVENT data structure. All fields in - this structure are properly filled by the caller. - @param EventNumber The event number of the event just logged. - @param Flags Indicates additional flags. Only one flag has been - defined at this time, which is 0x01 and means the - extend operation should not be performed. All - other bits are reserved. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_OUT_OF_RESOURCES Insufficient memory in the event log to complete this action. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_LOG_EVENT)( - IN EFI_TCG_PROTOCOL *This, - IN TCG_PCR_EVENT *TCGLogData, - IN OUT UINT32 *EventNumber, - IN UINT32 Flags - ); - -/** - This service is a proxy for commands to the TPM. - - @param This Indicates the calling context. - @param TpmInputParameterBlockSize Size of the TPM input parameter block. - @param TpmInputParameterBlock The pointer to the TPM input parameter block. - @param TpmOutputParameterBlockSize Size of the TPM output parameter block. - @param TpmOutputParameterBlock The pointer to the TPM output parameter block. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_INVALID_PARAMETER Invalid ordinal. - @retval EFI_UNSUPPORTED Current Task Priority Level >= EFI_TPL_CALLBACK. - @retval EFI_TIMEOUT The TIS timed-out. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_PASS_THROUGH_TO_TPM)( - IN EFI_TCG_PROTOCOL *This, - IN UINT32 TpmInputParameterBlockSize, - IN UINT8 *TpmInputParameterBlock, - IN UINT32 TpmOutputParameterBlockSize, - IN UINT8 *TpmOutputParameterBlock - ); - -/** - This service abstracts the capability to do a hash operation on a data buffer, extend a specific TPM PCR with the hash result, and add an entry to the Event Log - - @param This Indicates the calling context - @param HashData The physical address of the start of the data buffer - to be hashed, extended, and logged. - @param HashDataLen The length, in bytes, of the buffer referenced by HashData - @param AlgorithmId Identification of the Algorithm to use for the hashing operation - @param TCGLogData The physical address of the start of the data - buffer containing the TCG_PCR_EVENT data structure. - @param EventNumber The event number of the event just logged. - @param EventLogLastEntry The physical address of the first byte of the entry - just placed in the Event Log. If the Event Log was - empty when this function was called then this physical - address will be the same as the physical address of - the start of the Event Log. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_UNSUPPORTED AlgorithmId != TPM_ALG_SHA. - @retval EFI_UNSUPPORTED Current TPL >= EFI_TPL_CALLBACK. - @retval EFI_DEVICE_ERROR The command was unsuccessful. -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_HASH_LOG_EXTEND_EVENT)( - IN EFI_TCG_PROTOCOL *This, - IN EFI_PHYSICAL_ADDRESS HashData, - IN UINT64 HashDataLen, - IN TCG_ALGORITHM_ID AlgorithmId, - IN OUT TCG_PCR_EVENT *TCGLogData, - IN OUT UINT32 *EventNumber, - 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; -}; - -extern EFI_GUID gEfiTcgProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Tcp4.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Tcp4.h deleted file mode 100644 index 1771bc55f..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Tcp4.h +++ /dev/null @@ -1,579 +0,0 @@ -/** @file - EFI TCPv4(Transmission Control Protocol version 4) Protocol Definition - The EFI TCPv4 Service Binding Protocol is used to locate EFI TCPv4 Protocol drivers to create - 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. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.0. - -**/ - -#ifndef __EFI_TCP4_PROTOCOL_H__ -#define __EFI_TCP4_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Protocol/Ip4.h> - -#define EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0x00720665, 0x67EB, 0x4a99, {0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 } \ - } - -#define EFI_TCP4_PROTOCOL_GUID \ - { \ - 0x65530BC7, 0xA359, 0x410f, {0xB0, 0x10, 0x5A, 0xAD, 0xC7, 0xEC, 0x2B, 0x62 } \ - } - -typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL; - -/// -/// EFI_TCP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more. -/// 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_TCP4_SERVICE_POINT; - -/// -/// EFI_TCP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more. -/// 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_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; -} 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; -} EFI_TCP4_OPTION; - -typedef struct { - // - // I/O parameters - // - UINT8 TypeOfService; - UINT8 TimeToLive; - - // - // Access Point - // - EFI_TCP4_ACCESS_POINT AccessPoint; - - // - // TCP Control Options - // - 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 -} EFI_TCP4_CONNECTION_STATE; - -typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; -} EFI_TCP4_COMPLETION_TOKEN; - -typedef struct { - /// - /// The Status in the CompletionToken will be set to one of - /// the following values if the active open succeeds or an unexpected - /// error happens: - /// EFI_SUCCESS: The active open succeeds and the instance's - /// state is Tcp4StateEstablished. - /// EFI_CONNECTION_RESET: The connect fails because the connection is reset - /// either by instance itself or the communication peer. - /// EFI_CONNECTION_REFUSED: The connect fails because this connection is initiated with - /// an active open and the connection is refused. - /// EFI_ABORTED: The active open is aborted. - /// EFI_TIMEOUT: The connection establishment timer expires and - /// no more specific information is available. - /// EFI_NETWORK_UNREACHABLE: The active open fails because - /// an ICMP network unreachable error is received. - /// EFI_HOST_UNREACHABLE: The active open fails because an - /// ICMP host unreachable error is received. - /// EFI_PROTOCOL_UNREACHABLE: The active open fails - /// because an ICMP protocol unreachable error is received. - /// EFI_PORT_UNREACHABLE: The connection establishment - /// timer times out and an ICMP port unreachable error is received. - /// EFI_ICMP_ERROR: The connection establishment timer timeout and some other ICMP - /// error is received. - /// 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_CONNECTION_TOKEN; - -typedef struct { - EFI_TCP4_COMPLETION_TOKEN CompletionToken; - EFI_HANDLE NewChildHandle; -} EFI_TCP4_LISTEN_TOKEN; - -typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; -} EFI_TCP4_FRAGMENT_DATA; - -typedef struct { - BOOLEAN UrgentFlag; - UINT32 DataLength; - UINT32 FragmentCount; - EFI_TCP4_FRAGMENT_DATA FragmentTable[1]; -} EFI_TCP4_RECEIVE_DATA; - -typedef struct { - BOOLEAN Push; - BOOLEAN Urgent; - UINT32 DataLength; - UINT32 FragmentCount; - EFI_TCP4_FRAGMENT_DATA FragmentTable[1]; -} EFI_TCP4_TRANSMIT_DATA; - -typedef struct { - /// - /// When transmission finishes or meets any unexpected error it will - /// be set to one of the following values: - /// EFI_SUCCESS: The receiving or transmission operation - /// completes successfully. - /// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer - /// has closed the connection and there is no more data in the - /// receive buffer of the instance. - /// EFI_CONNECTION_RESET: The receiving or transmission operation fails - /// because this connection is reset either by instance - /// itself or the communication peer. - /// EFI_ABORTED: The receiving or transmission is aborted. - /// EFI_TIMEOUT: The transmission timer expires and no more - /// specific information is available. - /// EFI_NETWORK_UNREACHABLE: The transmission fails - /// because an ICMP network unreachable error is received. - /// EFI_HOST_UNREACHABLE: The transmission fails because an - /// ICMP host unreachable error is received. - /// EFI_PROTOCOL_UNREACHABLE: The transmission fails - /// because an ICMP protocol unreachable error is received. - /// EFI_PORT_UNREACHABLE: The transmission fails and an - /// ICMP port unreachable error is received. - /// EFI_ICMP_ERROR: The transmission fails and some other - /// ICMP error is received. - /// EFI_DEVICE_ERROR: An unexpected system or network error occurs. - /// EFI_NO_MEDIA: There was a media error. - /// - 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; - /// - /// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA. - /// - EFI_TCP4_TRANSMIT_DATA *TxData; - } Packet; -} EFI_TCP4_IO_TOKEN; - -typedef struct { - EFI_TCP4_COMPLETION_TOKEN CompletionToken; - BOOLEAN AbortOnClose; -} EFI_TCP4_CLOSE_TOKEN; - -// -// Interface definition for TCP4 protocol -// - -/** - Get the current operational status. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param Tcp4State The pointer to the buffer to receive the current TCP state. - @param Tcp4ConfigData The pointer to the buffer to receive the current TCP configuration. - @param Ip4ModeData The pointer to the buffer to receive the current IPv4 configuration - data used by the TCPv4 instance. - @param MnpConfigData The pointer to the buffer to receive the current MNP configuration - data used indirectly by the TCPv4 instance. - @param SnpModeData The pointer to the buffer to receive the current SNP configuration - data used indirectly by the TCPv4 instance. - - @retval EFI_SUCCESS The mode data was read. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED No configuration data is available because this instance hasn't - been started. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_GET_MODE_DATA)( - IN EFI_TCP4_PROTOCOL *This, - OUT EFI_TCP4_CONNECTION_STATE *Tcp4State OPTIONAL, - OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL, - OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, - OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, - OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL - ); - -/** - Initialize or brutally reset the operational parameters for this EFI TCPv4 instance. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param Tcp4ConfigData The pointer to the configure data to configure the instance. - - @retval EFI_SUCCESS The operational settings are set, changed, or reset - successfully. - @retval EFI_INVALID_PARAMETER Some parameter is invalid. - @retval EFI_NO_MAPPING When using a default address, configuration (through - DHCP, BOOTP, RARP, etc.) is not finished yet. - @retval EFI_ACCESS_DENIED Configuring TCP instance when it is configured without - calling Configure() with NULL to reset it. - @retval EFI_DEVICE_ERROR An unexpected network or system error occurred. - @retval EFI_UNSUPPORTED One or more of the control options are not supported in - the implementation. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources when - executing Configure(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_CONFIGURE)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL - ); - - -/** - Add or delete a route entry to the route table - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param DeleteRoute Set it to TRUE to delete this route from the routing table. Set it to - FALSE to add this route to the routing table. - DestinationAddress and SubnetMask are used as the - keywords to search route entry. - @param SubnetAddress The destination network. - @param SubnetMask The subnet mask of the destination network. - @param GatewayAddress The gateway address for this route. It must be on the same - subnet with the station address unless a direct route is specified. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_NOT_STARTED The EFI TCPv4 Protocol instance has not been configured. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - SubnetAddress is NULL. - - SubnetMask is NULL. - - GatewayAddress is NULL. - - *SubnetAddress is not NULL a valid subnet address. - - *SubnetMask is not a valid subnet mask. - - *GatewayAddress is not a valid unicast IP address or it - is not in the same subnet. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough resources to add the entry to the - routing table. - @retval EFI_NOT_FOUND This route is not in the routing table. - @retval EFI_ACCESS_DENIED The route is already defined in the routing table. - @retval EFI_UNSUPPORTED The TCP driver does not support this operation. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_ROUTES)( - IN EFI_TCP4_PROTOCOL *This, - IN BOOLEAN DeleteRoute, - IN EFI_IPv4_ADDRESS *SubnetAddress, - IN EFI_IPv4_ADDRESS *SubnetMask, - IN EFI_IPv4_ADDRESS *GatewayAddress - ); - -/** - Initiate a nonblocking TCP connection request for an active TCP instance. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param ConnectionToken The pointer to the connection token to return when the TCP three - way handshake finishes. - - @retval EFI_SUCCESS The connection request is successfully initiated and the state - of this TCPv4 instance has been changed to Tcp4StateSynSent. - @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured. - @retval EFI_ACCESS_DENIED One or more of the following conditions are TRUE: - - This instance is not configured as an active one. - - This instance is not in Tcp4StateClosed state. - @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: - - This is NULL. - - ConnectionToken is NULL. - - ConnectionToken->CompletionToken.Event is NULL. - @retval EFI_OUT_OF_RESOURCES The driver can't allocate enough resource to initiate the activ eopen. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_CONNECT)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken - ); - - -/** - Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param ListenToken The pointer to the listen token to return when operation finishes. - - @retval EFI_SUCCESS The listen token has been queued successfully. - @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured. - @retval EFI_ACCESS_DENIED One or more of the following are TRUE: - - This instance is not a passive instance. - - This instance is not in Tcp4StateListen state. - - The same listen token has already existed in the listen - token queue of this TCP instance. - @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: - - This is NULL. - - ListenToken is NULL. - - ListentToken->CompletionToken.Event is NULL. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation. - @retval EFI_DEVICE_ERROR Any unexpected and not belonged to above category error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_ACCEPT)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_LISTEN_TOKEN *ListenToken - ); - -/** - Queues outgoing data into the transmit queue. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param Token The pointer to the completion token to queue to the transmit queue. - - @retval EFI_SUCCESS The data has been queued for transmission. - @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: - - This is NULL. - - Token is NULL. - - Token->CompletionToken.Event is NULL. - - Token->Packet.TxData is NULL L. - - Token->Packet.FragmentCount is zero. - - Token->Packet.DataLength is not equal to the sum of fragment lengths. - @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: - - A transmit completion token with the same Token->CompletionToken.Event - was already in the transmission queue. - - The current instance is in Tcp4StateClosed state. - - The current instance is a passive one and it is in - Tcp4StateListen state. - - User has called Close() to disconnect this connection. - @retval EFI_NOT_READY The completion token could not be queued because the - transmit queue is full. - @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data because of resource - shortage. - @retval EFI_NETWORK_UNREACHABLE There is no route to the destination network or address. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_TRANSMIT)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_IO_TOKEN *Token - ); - - -/** - Places an asynchronous receive request into the receiving queue. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param Token The pointer to a token that is associated with the receive data - descriptor. - - @retval EFI_SUCCESS The receive completion token was cached. - @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, - etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - Token is NULL. - - Token->CompletionToken.Event is NULL. - - Token->Packet.RxData is NULL. - - Token->Packet.RxData->DataLength is 0. - - The Token->Packet.RxData->DataLength is not - the sum of all FragmentBuffer length in FragmentTable. - @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of - system resources (usually memory). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: - - A receive completion token with the same Token- - >CompletionToken.Event was already in the receive - queue. - - The current instance is in Tcp4StateClosed state. - - The current instance is a passive one and it is in - Tcp4StateListen state. - - User has called Close() to disconnect this connection. - @retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is - no any buffered data in the receive buffer of this instance. - @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_RECEIVE)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_IO_TOKEN *Token - ); - -/** - Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a - nonblocking operation. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param CloseToken The pointer to the close token to return when operation finishes. - - @retval EFI_SUCCESS The Close() is called successfully. - @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured. - @retval EFI_ACCESS_DENIED One or more of the following are TRUE: - - Configure() has been called with - TcpConfigData set to NULL and this function has - not returned. - - Previous Close() call on this instance has not - finished. - @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: - - This is NULL. - - CloseToken is NULL. - - CloseToken->CompletionToken.Event is NULL. - @retval EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation. - @retval EFI_DEVICE_ERROR Any unexpected and not belonged to above category error. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_CLOSE)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_CLOSE_TOKEN *CloseToken - ); - -/** - Abort an asynchronous connection, listen, transmission or receive request. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - @param Token The pointer to a token that has been issued by - EFI_TCP4_PROTOCOL.Connect(), - EFI_TCP4_PROTOCOL.Accept(), - EFI_TCP4_PROTOCOL.Transmit() or - EFI_TCP4_PROTOCOL.Receive(). If NULL, all pending - tokens issued by above four functions will be aborted. Type - EFI_TCP4_COMPLETION_TOKEN is defined in - EFI_TCP4_PROTOCOL.Connect(). - - @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event - is signaled. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED This instance hasn't been configured. - @retval EFI_NO_MAPPING When using the default address, configuration - (DHCP, BOOTP,RARP, etc.) hasn't finished yet. - @retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the - transmission or receive queue. It has either - completed or wasn't issued by Transmit() and Receive(). - @retval EFI_UNSUPPORTED The implementation does not support this function. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_CANCEL)( - IN EFI_TCP4_PROTOCOL *This, - IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL - ); - - -/** - Poll to receive incoming data and transmit outgoing segments. - - @param This The pointer to the EFI_TCP4_PROTOCOL instance. - - @retval EFI_SUCCESS Incoming or outgoing data was processed. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_NOT_READY No incoming or outgoing data is processed. - @retval EFI_TIMEOUT Data was dropped out of the transmission or receive queue. - Consider increasing the polling rate. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCP4_POLL)( - IN EFI_TCP4_PROTOCOL *This - ); - -/// -/// The EFI_TCP4_PROTOCOL defines the EFI TCPv4 Protocol child to be used by -/// any network drivers or applications to send or receive data stream. -/// It can either listen on a specified port as a service or actively connected -/// to remote peer as a client. Each instance has its own independent settings, -/// 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; -}; - -extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiTcp4ProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Udp4.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Udp4.h deleted file mode 100644 index 3c61db8c2..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/Udp4.h +++ /dev/null @@ -1,447 +0,0 @@ -/** @file - UDP4 Service Binding Protocol as defined in UEFI specification. - - 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. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.0. - -**/ - -#ifndef __EFI_UDP4_PROTOCOL_H__ -#define __EFI_UDP4_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - -#include <ipxe/efi/Protocol/Ip4.h> -// -//GUID definitions -// -#define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \ - { \ - 0x83f01464, 0x99bd, 0x45e5, {0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6 } \ - } - -#define EFI_UDP4_PROTOCOL_GUID \ - { \ - 0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } \ - } - -typedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL; - -/// -/// EFI_UDP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more. -/// 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_UDP4_SERVICE_POINT; - -/// -/// EFI_UDP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more. -/// 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_UDP4_VARIABLE_DATA; - -typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; -} EFI_UDP4_FRAGMENT_DATA; - -typedef struct { - 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; - // - // I/O parameters - // - 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; -} EFI_UDP4_CONFIG_DATA; - -typedef struct { - EFI_UDP4_SESSION_DATA *UdpSessionData; //OPTIONAL - EFI_IPv4_ADDRESS *GatewayAddress; //OPTIONAL - UINT32 DataLength; - UINT32 FragmentCount; - EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; -} EFI_UDP4_TRANSMIT_DATA; - -typedef struct { - EFI_TIME TimeStamp; - EFI_EVENT RecycleSignal; - EFI_UDP4_SESSION_DATA UdpSession; - UINT32 DataLength; - UINT32 FragmentCount; - EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; -} EFI_UDP4_RECEIVE_DATA; - - -typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; - union { - EFI_UDP4_RECEIVE_DATA *RxData; - EFI_UDP4_TRANSMIT_DATA *TxData; - } Packet; -} EFI_UDP4_COMPLETION_TOKEN; - -/** - Reads the current operational settings. - - The GetModeData() function copies the current operational settings of this EFI - UDPv4 Protocol instance into user-supplied buffers. This function is used - optionally to retrieve the operational mode data of underlying networks or - drivers. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param Udp4ConfigData The pointer to the buffer to receive the current configuration data. - @param Ip4ModeData The pointer to the EFI IPv4 Protocol mode data structure. - @param MnpConfigData The pointer to the managed network configuration data structure. - @param SnpModeData The pointer to the simple network mode data structure. - - @retval EFI_SUCCESS The mode data was read. - @retval EFI_NOT_STARTED When Udp4ConfigData is queried, no configuration data is - available because this instance has not been started. - @retval EFI_INVALID_PARAMETER This is NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_GET_MODE_DATA)( - IN EFI_UDP4_PROTOCOL *This, - OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL, - OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, - OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, - OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL - ); - - -/** - Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 - Protocol. - - The Configure() function is used to do the following: - * Initialize and start this instance of the EFI UDPv4 Protocol. - * Change the filtering rules and operational parameters. - * Reset this instance of the EFI UDPv4 Protocol. - Until these parameters are initialized, no network traffic can be sent or - received by this instance. This instance can be also reset by calling Configure() - with UdpConfigData set to NULL. Once reset, the receiving queue and transmitting - queue are flushed and no traffic is allowed through this instance. - With different parameters in UdpConfigData, Configure() can be used to bind - this instance to specified port. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param Udp4ConfigData The pointer to the buffer to receive the current configuration data. - - @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_INVALID_PARAMETER UdpConfigData.StationAddress is not a valid unicast IPv4 address. - @retval EFI_INVALID_PARAMETER UdpConfigData.SubnetMask is not a valid IPv4 address mask. The subnet - mask must be contiguous. - @retval EFI_INVALID_PARAMETER UdpConfigData.RemoteAddress is not a valid unicast IPv4 address if it - is not zero. - @retval EFI_ALREADY_STARTED The EFI UDPv4 Protocol instance is already started/configured - and must be stopped/reset before it can be reconfigured. - @retval EFI_ACCESS_DENIED UdpConfigData. AllowDuplicatePort is FALSE - and UdpConfigData.StationPort is already used by - other instance. - @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this - EFI UDPv4 Protocol instance. - @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance - was not opened. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_CONFIGURE)( - IN EFI_UDP4_PROTOCOL *This, - IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL - ); - -/** - Joins and leaves multicast groups. - - The Groups() function is used to enable and disable the multicast group - filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all - currently joined groups are left. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param JoinFlag Set to TRUE to join a multicast group. Set to FALSE to leave one - or all multicast groups. - @param MulticastAddress The pointer to multicast group address to join or leave. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_OUT_OF_RESOURCES Could not allocate resources to join the group. - @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - - This is NULL. - - JoinFlag is TRUE and MulticastAddress is NULL. - - JoinFlag is TRUE and *MulticastAddress is not - a valid multicast address. - @retval EFI_ALREADY_STARTED The group address is already in the group table (when - JoinFlag is TRUE). - @retval EFI_NOT_FOUND The group address is not in the group table (when JoinFlag is - FALSE). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_GROUPS)( - IN EFI_UDP4_PROTOCOL *This, - IN BOOLEAN JoinFlag, - IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL - ); - -/** - Adds and deletes routing table entries. - - The Routes() function adds a route to or deletes a route from the routing table. - Routes are determined by comparing the SubnetAddress with the destination IP - address and arithmetically AND-ing it with the SubnetMask. The gateway address - must be on the same subnet as the configured station address. - The default route is added with SubnetAddress and SubnetMask both set to 0.0.0.0. - The default route matches all destination IP addresses that do not match any - other routes. - A zero GatewayAddress is a nonroute. Packets are sent to the destination IP - address if it can be found in the Address Resolution Protocol (ARP) cache or - on the local subnet. One automatic nonroute entry will be inserted into the - routing table for outgoing packets that are addressed to a local subnet - (gateway address of 0.0.0.0). - Each instance of the EFI UDPv4 Protocol has its own independent routing table. - Instances of the EFI UDPv4 Protocol that use the default IP address will also - have copies of the routing table provided by the EFI_IP4_CONFIG_PROTOCOL. These - copies will be updated automatically whenever the IP driver reconfigures its - instances; as a result, the previous modification to these copies will be lost. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param DeleteRoute Set to TRUE to delete this route from the routing table. - Set to FALSE to add this route to the routing table. - @param SubnetAddress The destination network address that needs to be routed. - @param SubnetMask The subnet mask of SubnetAddress. - @param GatewayAddress The gateway IP address for this route. - - @retval EFI_SUCCESS The operation completed successfully. - @retval EFI_NOT_STARTED The EFI UDPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES Could not add the entry to the routing table. - @retval EFI_NOT_FOUND This route is not in the routing table. - @retval EFI_ACCESS_DENIED The route is already defined in the routing table. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_ROUTES)( - IN EFI_UDP4_PROTOCOL *This, - IN BOOLEAN DeleteRoute, - IN EFI_IPv4_ADDRESS *SubnetAddress, - IN EFI_IPv4_ADDRESS *SubnetMask, - IN EFI_IPv4_ADDRESS *GatewayAddress - ); - -/** - Polls for incoming data packets and processes outgoing data packets. - - The Poll() function can be used by network drivers and applications to increase - the rate that data packets are moved between the communications device and the - transmit and receive queues. - In some systems, the periodic timer event in the managed network driver may not - poll the underlying communications device fast enough to transmit and/or receive - all data packets without missing incoming packets or dropping outgoing packets. - Drivers and applications that are experiencing packet loss should try calling - the Poll() function more often. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - - @retval EFI_SUCCESS Incoming or outgoing data was processed. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_POLL)( - IN EFI_UDP4_PROTOCOL *This - ); - -/** - Places an asynchronous receive request into the receiving queue. - - The Receive() function places a completion token into the receive packet queue. - This function is always asynchronous. - The caller must fill in the Token.Event field in the completion token, and this - field cannot be NULL. When the receive operation completes, the EFI UDPv4 Protocol - driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event - is signaled. Providing a proper notification function and context for the event - will enable the user to receive the notification and receiving status. That - notification function is guaranteed to not be re-entered. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param Token The pointer to a token that is associated with the receive data - descriptor. - - @retval EFI_SUCCESS The receive completion token was cached. - @retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) - is not finished yet. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_INVALID_PARAMETER Token is NULL. - @retval EFI_INVALID_PARAMETER Token.Event is NULL. - @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system - resources (usually memory). - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_ACCESS_DENIED A receive completion token with the same Token.Event was already in - the receive queue. - @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_RECEIVE)( - IN EFI_UDP4_PROTOCOL *This, - IN EFI_UDP4_COMPLETION_TOKEN *Token - ); - -/** - Queues outgoing data packets into the transmit queue. - - The Transmit() function places a sending request to this instance of the EFI - UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever - the packet in the token is sent out or some errors occur, the Token.Event will - be signaled and Token.Status is updated. Providing a proper notification function - and context for the event will enable the user to receive the notification and - transmitting status. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param Token The pointer to the completion token that will be placed into the - transmit queue. - - @retval EFI_SUCCESS The data has been queued for transmission. - @retval EFI_NOT_STARTED This EFI UDPv4 Protocol instance has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_ACCESS_DENIED The transmit completion token with the same - Token.Event was already in the transmit queue. - @retval EFI_NOT_READY The completion token could not be queued because the - transmit queue is full. - @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data. - @retval EFI_NOT_FOUND There is no route to the destination network or address. - @retval EFI_BAD_BUFFER_SIZE The data length is greater than the maximum UDP packet - size. Or the length of the IP header + UDP header + data - length is greater than MTU if DoNotFragment is TRUE. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_TRANSMIT)( - IN EFI_UDP4_PROTOCOL *This, - IN EFI_UDP4_COMPLETION_TOKEN *Token - ); - -/** - Aborts an asynchronous transmit or receive request. - - The Cancel() function is used to abort a pending transmit or receive request. - If the token is in the transmit or receive request queues, after calling this - function, Token.Status will be set to EFI_ABORTED and then Token.Event will be - signaled. If the token is not in one of the queues, which usually means that - the asynchronous operation has completed, this function will not signal the - token and EFI_NOT_FOUND is returned. - - @param This The pointer to the EFI_UDP4_PROTOCOL instance. - @param Token The pointer to a token that has been issued by - EFI_UDP4_PROTOCOL.Transmit() or - EFI_UDP4_PROTOCOL.Receive().If NULL, all pending - tokens are aborted. - - @retval EFI_SUCCESS The asynchronous I/O request was aborted and Token.Event - was signaled. When Token is NULL, all pending requests are - aborted and their events are signaled. - @retval EFI_INVALID_PARAMETER This is NULL. - @retval EFI_NOT_STARTED This instance has not been started. - @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP, - RARP, etc.) is not finished yet. - @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O request was - not found in the transmit or receive queue. It has either completed - or was not issued by Transmit() and Receive(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UDP4_CANCEL)( - IN EFI_UDP4_PROTOCOL *This, - IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL - ); - -/// -/// The EFI_UDP4_PROTOCOL defines an EFI UDPv4 Protocol session that can be used -/// by any network drivers, applications, or daemons to transmit or receive UDP packets. -/// This protocol instance can either be bound to a specified port as a service or -/// connected to some remote peer as an active client. Each instance has its own settings, -/// 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; -}; - -extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiUdp4ProtocolGuid; - -#endif diff --git a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/VlanConfig.h b/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/VlanConfig.h deleted file mode 100644 index 928faded2..000000000 --- a/qemu/roms/ipxe/src/include/ipxe/efi/Protocol/VlanConfig.h +++ /dev/null @@ -1,145 +0,0 @@ -/** @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. - - @par Revision Reference: - This Protocol is introduced in UEFI Specification 2.2 - -**/ - -#ifndef __EFI_VLANCONFIG_PROTOCOL_H__ -#define __EFI_VLANCONFIG_PROTOCOL_H__ - -FILE_LICENCE ( BSD3 ); - - -#define EFI_VLAN_CONFIG_PROTOCOL_GUID \ - { \ - 0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74 } \ - } - -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. -} EFI_VLAN_FIND_DATA; - - -/** - Create a VLAN device or modify the configuration parameter of an - already-configured VLAN. - - The Set() function is used to create a new VLAN device or change the VLAN - configuration parameters. If the VlanId hasn't been configured in the - physical Ethernet device, a new VLAN device will be created. If a VLAN with - this VlanId is already configured, then related configuration will be updated - as the input parameters. - - If VlanId is zero, the VLAN device will send and receive untagged frames. - Otherwise, the VLAN device will send and receive VLAN-tagged frames containing the VlanId. - If VlanId is out of scope of (0-4094), EFI_INVALID_PARAMETER is returned. - If Priority is out of the scope of (0-7), then EFI_INVALID_PARAMETER is returned. - If there is not enough system memory to perform the registration, then - EFI_OUT_OF_RESOURCES is returned. - - @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL. - @param[in] VlanId A unique identifier (1-4094) of the VLAN which is being created - or modified, or zero (0). - @param[in] Priority 3 bit priority in VLAN header. Priority 0 is default value. If - VlanId is zero (0), Priority is ignored. - - @retval EFI_SUCCESS The VLAN is successfully configured. - @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE: - - This is NULL. - - VlanId is an invalid VLAN Identifier. - - Priority is invalid. - @retval EFI_OUT_OF_RESOURCES There is not enough system memory to perform the registration. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_VLAN_CONFIG_SET)( - IN EFI_VLAN_CONFIG_PROTOCOL *This, - IN UINT16 VlanId, - IN UINT8 Priority - ); - -/** - Find configuration information for specified VLAN or all configured VLANs. - - The Find() function is used to find the configuration information for matching - VLAN and allocate a buffer into which those entries are copied. - - @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL. - @param[in] VlanId Pointer to VLAN identifier. Set to NULL to find all - configured VLANs. - @param[out] NumberOfVlan The number of VLANs which is found by the specified criteria. - @param[out] Entries The buffer which receive the VLAN configuration. - - @retval EFI_SUCCESS The VLAN is successfully found. - @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE: - - This is NULL. - - Specified VlanId is invalid. - @retval EFI_NOT_FOUND No matching VLAN is found. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_VLAN_CONFIG_FIND)( - IN EFI_VLAN_CONFIG_PROTOCOL *This, - IN UINT16 *VlanId OPTIONAL, - OUT UINT16 *NumberOfVlan, - OUT EFI_VLAN_FIND_DATA **Entries - ); - -/** - Remove the configured VLAN device. - - The Remove() function is used to remove the specified VLAN device. - If the VlanId is out of the scope of (0-4094), EFI_INVALID_PARAMETER is returned. - If specified VLAN hasn't been previously configured, EFI_NOT_FOUND is returned. - - @param[in] This Points to the EFI_VLAN_CONFIG_PROTOCOL. - @param[in] VlanId Identifier (0-4094) of the VLAN to be removed. - - @retval EFI_SUCCESS The VLAN is successfully removed. - @retval EFI_INVALID_PARAMETER One or more of following conditions is TRUE: - - This is NULL. - - VlanId is an invalid parameter. - @retval EFI_NOT_FOUND The to-be-removed VLAN does not exist. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_VLAN_CONFIG_REMOVE)( - IN EFI_VLAN_CONFIG_PROTOCOL *This, - IN UINT16 VlanId - ); - -/// -/// EFI_VLAN_CONFIG_PROTOCOL -/// provide manageability interface for VLAN setting. The intended -/// 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; -}; - -extern EFI_GUID gEfiVlanConfigProtocolGuid; - -#endif |