Page MenuHomeFreeBSD

D53655.id166099.diff
No OneTemporary

D53655.id166099.diff

diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
--- a/stand/common/gfx_fb.c
+++ b/stand/common/gfx_fb.c
@@ -98,6 +98,7 @@
#if defined(EFI)
#include <efi.h>
#include <efilib.h>
+#include <Protocol/GraphicsOutput.h>
#else
#include <vbe.h>
#endif
@@ -855,7 +856,7 @@
int rv;
#if defined(EFI)
EFI_STATUS status;
- EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = gfx_state.tg_private;
EFI_TPL tpl;
/*
diff --git a/stand/defs.mk b/stand/defs.mk
--- a/stand/defs.mk
+++ b/stand/defs.mk
@@ -38,6 +38,7 @@
WARNS?= 1
BOOTSRC= ${SRCTOP}/stand
+EDK2INC= ${SYSDIR}/contrib/edk2/Include
EFISRC= ${BOOTSRC}/efi
EFIINC= ${EFISRC}/include
# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is
diff --git a/stand/efi/acpica/acpi_detect.c b/stand/efi/acpica/acpi_detect.c
--- a/stand/efi/acpica/acpi_detect.c
+++ b/stand/efi/acpica/acpi_detect.c
@@ -27,12 +27,13 @@
#include <machine/_inttypes.h>
#include <efi.h>
+#include <Guid/Acpi.h>
#include <acpi.h>
#include "acpi_detect.h"
/* For ACPI rsdp discovery. */
EFI_GUID acpi = ACPI_TABLE_GUID;
-EFI_GUID acpi20 = ACPI_20_TABLE_GUID;
+EFI_GUID acpi20 = EFI_ACPI_TABLE_GUID;
ACPI_TABLE_RSDP *rsdp;
void
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -44,7 +44,7 @@
CFLAGS+= -DEFI_ZFS_BOOT
.endif
-CFLAGS+= -I${EFIINC}
+CFLAGS+= -I${EFIINC} -I${EDK2INC}
CFLAGS+= -I${EFIINCMD}
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
CFLAGS+= -DEFI_UFS_BOOT
diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c
--- a/stand/efi/boot1/boot1.c
+++ b/stand/efi/boot1/boot1.c
@@ -296,12 +296,14 @@
BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize));
BS->Exit(IH, s, 0, NULL);
+ __unreachable();
}
void
exit(int error)
{
efi_exit(errno_to_efi_status(error));
+ __unreachable();
}
/*
@@ -320,6 +322,7 @@
printf("\n");
efi_exit(s);
+ __unreachable();
}
int getchar(void)
diff --git a/stand/efi/include/Guid/MemoryTypeInformation.h b/stand/efi/include/Guid/MemoryTypeInformation.h
deleted file mode 100644
--- a/stand/efi/include/Guid/MemoryTypeInformation.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/** @file
- This file defines:
- * Memory Type Information GUID for HOB and Variable.
- * Memory Type Information Variable Name.
- * Memory Type Information GUID HOB data structure.
-
- The memory type information HOB and variable can
- be used to store the information for each memory type in Variable or HOB.
-
-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 __MEMORY_TYPE_INFORMATION_GUID_H__
-#define __MEMORY_TYPE_INFORMATION_GUID_H__
-
-#define EFI_MEMORY_TYPE_INFORMATION_GUID \
- { 0x4c19049f,0x4137,0x4dd3, { 0x9c,0x10,0x8b,0x97,0xa8,0x3f,0xfd,0xfa } }
-
-#define EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME "MemoryTypeInformation"
-
-extern EFI_GUID gEfiMemoryTypeInformationGuid;
-
-typedef struct {
- UINT32 Type; ///< EFI memory type defined in UEFI specification.
- UINT32 NumberOfPages; ///< The pages of this type memory.
-} EFI_MEMORY_TYPE_INFORMATION;
-
-#endif
diff --git a/stand/efi/include/Guid/MtcVendor.h b/stand/efi/include/Guid/MtcVendor.h
deleted file mode 100644
--- a/stand/efi/include/Guid/MtcVendor.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/** @file
- GUID is for MTC variable.
-
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License 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 __MTC_VENDOR_GUID_H__
-#define __MTC_VENDOR_GUID_H__
-
-//
-// Vendor GUID of the variable for the high part of monotonic counter (UINT32).
-//
-#define MTC_VENDOR_GUID \
- { 0xeb704011, 0x1402, 0x11d3, { 0x8e, 0x77, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } }
-
-//
-// Name of the variable for the high part of monotonic counter
-//
-#define MTC_VARIABLE_NAME "MTC"
-
-extern EFI_GUID gMtcVendorGuid;
-
-#endif
diff --git a/stand/efi/include/Guid/ZeroGuid.h b/stand/efi/include/Guid/ZeroGuid.h
deleted file mode 100644
--- a/stand/efi/include/Guid/ZeroGuid.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/** @file
- GUID has all zero values.
-
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License 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 __ZERO_GUID_H__
-#define __ZERO_GUID_H__
-
-#define ZERO_GUID \
- { \
- 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} \
- }
-
-extern EFI_GUID gZeroGuid;
-
-#endif
diff --git a/stand/efi/include/Protocol/EdidActive.h b/stand/efi/include/Protocol/EdidActive.h
deleted file mode 100644
--- a/stand/efi/include/Protocol/EdidActive.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/** @file
- EDID Active Protocol from the UEFI 2.0 specification.
-
- Placed on the video output device child handle that is actively displaying output.
-
- 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 __EDID_ACTIVE_H__
-#define __EDID_ACTIVE_H__
-
-#define EFI_EDID_ACTIVE_PROTOCOL_GUID \
- { \
- 0xbd8c1056, 0x9f36, 0x44ec, {0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86 } \
- }
-
-///
-/// This protocol contains the EDID information for an active video output device. This is either the
-/// EDID information retrieved from the EFI_EDID_OVERRIDE_PROTOCOL if an override is
-/// available, or an identical copy of the EDID information from the
-/// EFI_EDID_DISCOVERED_PROTOCOL if no overrides are available.
-///
-typedef struct {
- ///
- /// The size, in bytes, of the Edid buffer. 0 if no EDID information
- /// is available from the video output device. Otherwise, it must be a
- /// minimum of 128 bytes.
- ///
- UINT32 SizeOfEdid;
-
- ///
- /// A pointer to a read-only array of bytes that contains the EDID
- /// information for an active video output device. This pointer is
- /// NULL if no EDID information is available for the video output
- /// device. The minimum size of a valid Edid buffer is 128 bytes.
- /// EDID information is defined in the E-EDID EEPROM
- /// specification published by VESA (www.vesa.org).
- ///
- UINT8 *Edid;
-} EFI_EDID_ACTIVE_PROTOCOL;
-
-extern EFI_GUID gEfiEdidActiveProtocolGuid;
-
-#endif
diff --git a/stand/efi/include/Protocol/EdidDiscovered.h b/stand/efi/include/Protocol/EdidDiscovered.h
deleted file mode 100644
--- a/stand/efi/include/Protocol/EdidDiscovered.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/** @file
- EDID Discovered Protocol from the UEFI 2.0 specification.
-
- This protocol is placed on the video output device child handle. It represents
- the EDID information being used for the output device represented by the child handle.
-
- 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 __EDID_DISCOVERED_H__
-#define __EDID_DISCOVERED_H__
-
-#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
- { \
- 0x1c0c34f6, 0xd380, 0x41fa, {0xa0, 0x49, 0x8a, 0xd0, 0x6c, 0x1a, 0x66, 0xaa } \
- }
-
-///
-/// This protocol contains the EDID information retrieved from a video output device.
-///
-typedef struct {
- ///
- /// The size, in bytes, of the Edid buffer. 0 if no EDID information
- /// is available from the video output device. Otherwise, it must be a
- /// minimum of 128 bytes.
- ///
- UINT32 SizeOfEdid;
-
- ///
- /// A pointer to a read-only array of bytes that contains the EDID
- /// information for an active video output device. This pointer is
- /// NULL if no EDID information is available for the video output
- /// device. The minimum size of a valid Edid buffer is 128 bytes.
- /// EDID information is defined in the E-EDID EEPROM
- /// specification published by VESA (www.vesa.org).
- ///
- UINT8 *Edid;
-} EFI_EDID_DISCOVERED_PROTOCOL;
-
-extern EFI_GUID gEfiEdidDiscoveredProtocolGuid;
-
-#endif
diff --git a/stand/efi/include/Protocol/EdidOverride.h b/stand/efi/include/Protocol/EdidOverride.h
deleted file mode 100644
--- a/stand/efi/include/Protocol/EdidOverride.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/** @file
- EDID Override Protocol from the UEFI 2.0 specification.
-
- Allow platform to provide EDID information to the producer of the Graphics Output
- 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 __EDID_OVERRIDE_H__
-#define __EDID_OVERRIDE_H__
-
-#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
- { \
- 0x48ecb431, 0xfb72, 0x45c0, {0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x4, 0xb, 0xd5 } \
- }
-
-typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL;
-
-#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01
-#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02
-
-/**
- Returns policy information and potentially a replacement EDID for the specified video output device.
-
- @param This The EFI_EDID_OVERRIDE_PROTOCOL instance.
- @param ChildHandle A child handle produced by the Graphics Output EFI
- driver that represents a video output device.
- @param Attributes The attributes associated with ChildHandle video output device.
- @param EdidSize A pointer to the size, in bytes, of the Edid buffer.
- @param Edid A pointer to callee allocated buffer that contains the EDID that
- should be used for ChildHandle. A value of NULL
- represents no EDID override for ChildHandle.
-
- @retval EFI_SUCCESS Valid overrides returned for ChildHandle.
- @retval EFI_UNSUPPORTED ChildHandle has no overrides.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID)(
- IN EFI_EDID_OVERRIDE_PROTOCOL *This,
- IN EFI_HANDLE *ChildHandle,
- OUT UINT32 *Attributes,
- IN OUT UINTN *EdidSize,
- IN OUT UINT8 **Edid
- );
-
-///
-/// This protocol is produced by the platform to allow the platform to provide
-/// EDID information to the producer of the Graphics Output protocol.
-///
-struct _EFI_EDID_OVERRIDE_PROTOCOL {
- EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid;
-};
-
-extern EFI_GUID gEfiEdidOverrideProtocolGuid;
-
-#endif
diff --git a/stand/efi/include/Protocol/Http.h b/stand/efi/include/Protocol/Http.h
deleted file mode 100644
--- a/stand/efi/include/Protocol/Http.h
+++ /dev/null
@@ -1,522 +0,0 @@
-/** @file
- This file defines the EFI HTTP Protocol interface. It is split into
- the following two main sections:
- HTTP Service Binding Protocol (HTTPSB)
- HTTP Protocol (HTTP)
-
- Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
- (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- @par Revision Reference:
- This Protocol is introduced in UEFI Specification 2.5
-
-**/
-
-#ifndef __EFI_HTTP_PROTOCOL_H__
-#define __EFI_HTTP_PROTOCOL_H__
-
-#define EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID \
- { \
- 0xbdc8e6af, 0xd9bc, 0x4379, {0xa7, 0x2a, 0xe0, 0xc4, 0xe7, 0x5d, 0xae, 0x1c } \
- }
-
-#define EFI_HTTP_PROTOCOL_GUID \
- { \
- 0x7a59b29b, 0x910b, 0x4171, {0x82, 0x42, 0xa8, 0x5a, 0x0d, 0xf2, 0x5b, 0x5b } \
- }
-
-typedef struct _EFI_HTTP_PROTOCOL EFI_HTTP_PROTOCOL;
-
-///
-/// EFI_HTTP_VERSION
-///
-typedef enum {
- HttpVersion10,
- HttpVersion11,
- HttpVersionUnsupported
-} EFI_HTTP_VERSION;
-
-///
-/// EFI_HTTP_METHOD
-///
-typedef enum {
- HttpMethodGet,
- HttpMethodPost,
- HttpMethodPatch,
- HttpMethodOptions,
- HttpMethodConnect,
- HttpMethodHead,
- HttpMethodPut,
- HttpMethodDelete,
- HttpMethodTrace,
- HttpMethodMax
-} EFI_HTTP_METHOD;
-
-///
-/// EFI_HTTP_STATUS_CODE
-///
-typedef enum {
- HTTP_STATUS_UNSUPPORTED_STATUS = 0,
- HTTP_STATUS_100_CONTINUE,
- HTTP_STATUS_101_SWITCHING_PROTOCOLS,
- HTTP_STATUS_200_OK,
- HTTP_STATUS_201_CREATED,
- HTTP_STATUS_202_ACCEPTED,
- HTTP_STATUS_203_NON_AUTHORITATIVE_INFORMATION,
- HTTP_STATUS_204_NO_CONTENT,
- HTTP_STATUS_205_RESET_CONTENT,
- HTTP_STATUS_206_PARTIAL_CONTENT,
- HTTP_STATUS_300_MULTIPLE_CHOICES,
- HTTP_STATUS_301_MOVED_PERMANENTLY,
- HTTP_STATUS_302_FOUND,
- HTTP_STATUS_303_SEE_OTHER,
- HTTP_STATUS_304_NOT_MODIFIED,
- HTTP_STATUS_305_USE_PROXY,
- HTTP_STATUS_307_TEMPORARY_REDIRECT,
- HTTP_STATUS_400_BAD_REQUEST,
- HTTP_STATUS_401_UNAUTHORIZED,
- HTTP_STATUS_402_PAYMENT_REQUIRED,
- HTTP_STATUS_403_FORBIDDEN,
- HTTP_STATUS_404_NOT_FOUND,
- HTTP_STATUS_405_METHOD_NOT_ALLOWED,
- HTTP_STATUS_406_NOT_ACCEPTABLE,
- HTTP_STATUS_407_PROXY_AUTHENTICATION_REQUIRED,
- HTTP_STATUS_408_REQUEST_TIME_OUT,
- HTTP_STATUS_409_CONFLICT,
- HTTP_STATUS_410_GONE,
- HTTP_STATUS_411_LENGTH_REQUIRED,
- HTTP_STATUS_412_PRECONDITION_FAILED,
- HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE,
- HTTP_STATUS_414_REQUEST_URI_TOO_LARGE,
- HTTP_STATUS_415_UNSUPPORTED_MEDIA_TYPE,
- HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED,
- HTTP_STATUS_417_EXPECTATION_FAILED,
- HTTP_STATUS_500_INTERNAL_SERVER_ERROR,
- HTTP_STATUS_501_NOT_IMPLEMENTED,
- HTTP_STATUS_502_BAD_GATEWAY,
- HTTP_STATUS_503_SERVICE_UNAVAILABLE,
- HTTP_STATUS_504_GATEWAY_TIME_OUT,
- HTTP_STATUS_505_HTTP_VERSION_NOT_SUPPORTED,
- HTTP_STATUS_308_PERMANENT_REDIRECT
-} EFI_HTTP_STATUS_CODE;
-
-///
-/// EFI_HTTPv4_ACCESS_POINT
-///
-typedef struct {
- ///
- /// Set to TRUE to instruct the EFI HTTP instance to use the default address
- /// information in every TCP connection made by this instance. In addition, when set
- /// to TRUE, LocalAddress and LocalSubnet are ignored.
- ///
- BOOLEAN UseDefaultAddress;
- ///
- /// If UseDefaultAddress is set to FALSE, this defines the local IP address to be
- /// used in every TCP connection opened by this instance.
- ///
- EFI_IPv4_ADDRESS LocalAddress;
- ///
- /// If UseDefaultAddress is set to FALSE, this defines the local subnet to be used
- /// in every TCP connection opened by this instance.
- ///
- EFI_IPv4_ADDRESS LocalSubnet;
- ///
- /// This defines the local port to be used in
- /// every TCP connection opened by this instance.
- ///
- UINT16 LocalPort;
-} EFI_HTTPv4_ACCESS_POINT;
-
-///
-/// EFI_HTTPv6_ACCESS_POINT
-///
-typedef struct {
- ///
- /// Local IP address to be used in every TCP connection opened by this instance.
- ///
- EFI_IPv6_ADDRESS LocalAddress;
- ///
- /// Local port to be used in every TCP connection opened by this instance.
- ///
- UINT16 LocalPort;
-} EFI_HTTPv6_ACCESS_POINT;
-
-///
-/// EFI_HTTP_CONFIG_DATA_ACCESS_POINT
-///
-
-
-typedef struct {
- ///
- /// HTTP version that this instance will support.
- ///
- EFI_HTTP_VERSION HttpVersion;
- ///
- /// Time out (in milliseconds) when blocking for requests.
- ///
- UINT32 TimeOutMillisec;
- ///
- /// Defines behavior of EFI DNS and TCP protocols consumed by this instance. If
- /// FALSE, this instance will use EFI_DNS4_PROTOCOL and EFI_TCP4_PROTOCOL. If TRUE,
- /// this instance will use EFI_DNS6_PROTOCOL and EFI_TCP6_PROTOCOL.
- ///
- BOOLEAN LocalAddressIsIPv6;
-
- union {
- ///
- /// When LocalAddressIsIPv6 is FALSE, this points to the local address, subnet, and
- /// port used by the underlying TCP protocol.
- ///
- EFI_HTTPv4_ACCESS_POINT *IPv4Node;
- ///
- /// When LocalAddressIsIPv6 is TRUE, this points to the local IPv6 address and port
- /// used by the underlying TCP protocol.
- ///
- EFI_HTTPv6_ACCESS_POINT *IPv6Node;
- } AccessPoint;
-} EFI_HTTP_CONFIG_DATA;
-
-///
-/// EFI_HTTP_REQUEST_DATA
-///
-typedef struct {
- ///
- /// The HTTP method (e.g. GET, POST) for this HTTP Request.
- ///
- EFI_HTTP_METHOD Method;
- ///
- /// The URI of a remote host. From the information in this field, the HTTP instance
- /// will be able to determine whether to use HTTP or HTTPS and will also be able to
- /// determine the port number to use. If no port number is specified, port 80 (HTTP)
- /// is assumed. See RFC 3986 for more details on URI syntax.
- ///
- CHAR16 *Url;
-} EFI_HTTP_REQUEST_DATA;
-
-///
-/// EFI_HTTP_RESPONSE_DATA
-///
-typedef struct {
- ///
- /// Response status code returned by the remote host.
- ///
- EFI_HTTP_STATUS_CODE StatusCode;
-} EFI_HTTP_RESPONSE_DATA;
-
-///
-/// EFI_HTTP_HEADER
-///
-typedef struct {
- ///
- /// Null terminated string which describes a field name. See RFC 2616 Section 14 for
- /// detailed information about field names.
- ///
- CHAR8 *FieldName;
- ///
- /// Null terminated string which describes the corresponding field value. See RFC 2616
- /// Section 14 for detailed information about field values.
- ///
- CHAR8 *FieldValue;
-} EFI_HTTP_HEADER;
-
-///
-/// EFI_HTTP_MESSAGE
-///
-typedef struct {
- ///
- /// HTTP message data.
- ///
- union {
- ///
- /// When the token is used to send a HTTP request, Request is a pointer to storage that
- /// contains such data as URL and HTTP method.
- ///
- EFI_HTTP_REQUEST_DATA *Request;
- ///
- /// When used to await a response, Response points to storage containing HTTP response
- /// status code.
- ///
- EFI_HTTP_RESPONSE_DATA *Response;
- } Data;
- ///
- /// Number of HTTP header structures in Headers list. On request, this count is
- /// provided by the caller. On response, this count is provided by the HTTP driver.
- ///
- UINTN HeaderCount;
- ///
- /// Array containing list of HTTP headers. On request, this array is populated by the
- /// caller. On response, this array is allocated and populated by the HTTP driver. It
- /// is the responsibility of the caller to free this memory on both request and
- /// response.
- ///
- EFI_HTTP_HEADER *Headers;
- ///
- /// Length in bytes of the HTTP body. This can be zero depending on the HttpMethod type.
- ///
- UINTN BodyLength;
- ///
- /// Body associated with the HTTP request or response. This can be NULL depending on
- /// the HttpMethod type.
- ///
- VOID *Body;
-} EFI_HTTP_MESSAGE;
-
-
-///
-/// EFI_HTTP_TOKEN
-///
-typedef struct {
- ///
- /// This Event will be signaled after the Status field is updated by the EFI HTTP
- /// 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;
- ///
- /// Status will be set to one of the following value if the HTTP request is
- /// successfully sent or if an unexpected error occurs:
- /// EFI_SUCCESS: The HTTP request was successfully sent to the remote host.
- /// EFI_HTTP_ERROR: The response message was successfully received but contains a
- /// HTTP error. The response status code is returned in token.
- /// EFI_ABORTED: The HTTP request was cancelled by the caller and removed from
- /// the transmit queue.
- /// EFI_TIMEOUT: The HTTP request timed out before reaching the remote host.
- /// EFI_DEVICE_ERROR: An unexpected system or network error occurred.
- ///
- EFI_STATUS Status;
- ///
- /// Pointer to storage containing HTTP message data.
- ///
- EFI_HTTP_MESSAGE *Message;
-} EFI_HTTP_TOKEN;
-
-/**
- Returns the operational parameters for the current HTTP child instance.
-
- The GetModeData() function is used to read the current mode data (operational
- parameters) for this HTTP protocol instance.
-
- @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
- @param[out] HttpConfigData Point to buffer for operational parameters of this
- HTTP instance. It is the responsibility of the caller
- to allocate the memory for HttpConfigData and
- HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
- it is recommended to allocate sufficient memory to record
- IPv6Node since it is big enough for all possibilities.
-
- @retval EFI_SUCCESS Operation succeeded.
- @retval EFI_INVALID_PARAMETER This is NULL.
- HttpConfigData is NULL.
- HttpConfigData->AccessPoint.IPv4Node or
- HttpConfigData->AccessPoint.IPv6Node is NULL.
- @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HTTP_GET_MODE_DATA)(
- IN EFI_HTTP_PROTOCOL *This,
- OUT EFI_HTTP_CONFIG_DATA *HttpConfigData
- );
-
-/**
- Initialize or brutally reset the operational parameters for this EFI HTTP instance.
-
- The Configure() function does the following:
- When HttpConfigData is not NULL Initialize this EFI HTTP instance by configuring
- timeout, local address, port, etc.
- When HttpConfigData is NULL, reset this EFI HTTP instance by closing all active
- connections with remote hosts, canceling all asynchronous tokens, and flush request
- and response buffers without informing the appropriate hosts.
-
- No other EFI HTTP function can be executed by this instance until the Configure()
- function is executed and returns successfully.
-
- @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
- @param[in] HttpConfigData Pointer to the configure data to configure the instance.
-
- @retval EFI_SUCCESS Operation succeeded.
- @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- HttpConfigData->LocalAddressIsIPv6 is FALSE and
- HttpConfigData->AccessPoint.IPv4Node is NULL.
- HttpConfigData->LocalAddressIsIPv6 is TRUE and
- HttpConfigData->AccessPoint.IPv6Node is NULL.
- @retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling
- Configure() with NULL to reset it.
- @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
- @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources when
- executing Configure().
- @retval EFI_UNSUPPORTED One or more options in ConfigData are not supported
- in the implementation.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HTTP_CONFIGURE)(
- IN EFI_HTTP_PROTOCOL *This,
- IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL
- );
-
-/**
- The Request() function queues an HTTP request to this HTTP instance,
- similar to Transmit() function in the EFI TCP driver. When the HTTP request is sent
- successfully, or if there is an error, Status in token will be updated and Event will
- be signaled.
-
- @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
- @param[in] Token Pointer to storage containing HTTP request token.
-
- @retval EFI_SUCCESS Outgoing data was processed.
- @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
- @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
- @retval EFI_TIMEOUT Data was dropped out of the transmit or receive queue.
- @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- Token is NULL.
- Token->Message is NULL.
- Token->Message->Body is not NULL,
- Token->Message->BodyLength is non-zero, and
- Token->Message->Data is NULL, but a previous call to
- Request()has not been completed successfully.
- @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources.
- @retval EFI_UNSUPPORTED The HTTP method is not supported in current implementation.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HTTP_REQUEST) (
- IN EFI_HTTP_PROTOCOL *This,
- IN EFI_HTTP_TOKEN *Token
- );
-
-/**
- Abort an asynchronous HTTP request or response token.
-
- The Cancel() function aborts a pending HTTP request or response transaction. If
- Token is not NULL and the token is in transmit or receive queues when it is being
- cancelled, its 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, EFI_NOT_FOUND is returned. If Token is NULL,
- all asynchronous tokens issued by Request() or Response() will be aborted.
-
- @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
- @param[in] Token Point to storage containing HTTP request or response
- token.
-
- @retval EFI_SUCCESS Request and Response queues are successfully flushed.
- @retval EFI_INVALID_PARAMETER This is NULL.
- @retval EFI_NOT_STARTED This instance hasn't been configured.
- @retval EFI_NOT_FOUND The asynchronous request or response token is not
- found.
- @retval EFI_UNSUPPORTED The implementation does not support this function.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HTTP_CANCEL)(
- IN EFI_HTTP_PROTOCOL *This,
- IN EFI_HTTP_TOKEN *Token
- );
-
-/**
- The Response() function queues an HTTP response to this HTTP instance, similar to
- Receive() function in the EFI TCP driver. When the HTTP Response is received successfully,
- or if there is an error, Status in token will be updated and Event will be signaled.
-
- The HTTP driver will queue a receive token to the underlying TCP instance. When data
- is received in the underlying TCP instance, the data will be parsed and Token will
- be populated with the response data. If the data received from the remote host
- contains an incomplete or invalid HTTP header, the HTTP driver will continue waiting
- (asynchronously) for more data to be sent from the remote host before signaling
- Event in Token.
-
- It is the responsibility of the caller to allocate a buffer for Body and specify the
- size in BodyLength. If the remote host provides a response that contains a content
- body, up to BodyLength bytes will be copied from the receive buffer into Body and
- BodyLength will be updated with the amount of bytes received and copied to Body. This
- allows the client to download a large file in chunks instead of into one contiguous
- block of memory. Similar to HTTP request, if Body is not NULL and BodyLength is
- non-zero and all other fields are NULL or 0, the HTTP driver will queue a receive
- token to underlying TCP instance. If data arrives in the receive buffer, up to
- BodyLength bytes of data will be copied to Body. The HTTP driver will then update
- BodyLength with the amount of bytes received and copied to Body.
-
- If the HTTP driver does not have an open underlying TCP connection with the host
- specified in the response URL, Request() will return EFI_ACCESS_DENIED. This is
- consistent with RFC 2616 recommendation that HTTP clients should attempt to maintain
- an open TCP connection between client and host.
-
- @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
- @param[in] Token Pointer to storage containing HTTP response token.
-
- @retval EFI_SUCCESS Allocation succeeded.
- @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been
- initialized.
- @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- Token is NULL.
- Token->Message->Headers is NULL.
- Token->Message is NULL.
- Token->Message->Body is not NULL,
- Token->Message->BodyLength is non-zero, and
- Token->Message->Data is NULL, but a previous call to
- Response() has not been completed successfully.
- @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources.
- @retval EFI_ACCESS_DENIED An open TCP connection is not present with the host
- specified by response URL.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HTTP_RESPONSE) (
- IN EFI_HTTP_PROTOCOL *This,
- IN EFI_HTTP_TOKEN *Token
- );
-
-/**
- The Poll() function can be used by network drivers and applications to increase the
- rate that data packets are moved between the communication devices 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[in] This Pointer to EFI_HTTP_PROTOCOL instance.
-
- @retval EFI_SUCCESS Incoming or outgoing data was processed..
- @retval EFI_DEVICE_ERROR An unexpected system or network error occurred
- @retval EFI_INVALID_PARAMETER This is NULL.
- @retval EFI_NOT_READY No incoming or outgoing data is processed.
- @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HTTP_POLL) (
- IN EFI_HTTP_PROTOCOL *This
- );
-
-///
-/// The EFI HTTP protocol is designed to be used by EFI drivers and applications to
-/// create and transmit HTTP Requests, as well as handle HTTP responses that are
-/// returned by a remote host. This EFI protocol uses and relies on an underlying EFI
-/// TCP protocol.
-///
-struct _EFI_HTTP_PROTOCOL {
- EFI_HTTP_GET_MODE_DATA GetModeData;
- EFI_HTTP_CONFIGURE Configure;
- EFI_HTTP_REQUEST Request;
- EFI_HTTP_CANCEL Cancel;
- EFI_HTTP_RESPONSE Response;
- EFI_HTTP_POLL Poll;
-};
-
-extern EFI_GUID gEfiHttpServiceBindingProtocolGuid;
-extern EFI_GUID gEfiHttpProtocolGuid;
-
-#endif
diff --git a/stand/efi/include/Protocol/Ip4Config2.h b/stand/efi/include/Protocol/Ip4Config2.h
deleted file mode 100644
--- a/stand/efi/include/Protocol/Ip4Config2.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/** @file
- This file provides a definition of the EFI IPv4 Configuration II
- Protocol.
-
-Copyright (c) 2015 - 2018, 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<BR>
-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.5
-
-**/
-#ifndef __EFI_IP4CONFIG2_PROTOCOL_H__
-#define __EFI_IP4CONFIG2_PROTOCOL_H__
-
-/* #include <Protocol/Ip4.h> */
-
-#define EFI_IP4_CONFIG2_PROTOCOL_GUID \
- { \
- 0x5b446ed1, 0xe30b, 0x4faa, {0x87, 0x1a, 0x36, 0x54, 0xec, 0xa3, 0x60, 0x80 } \
- }
-
-typedef struct _EFI_IP4_CONFIG2_PROTOCOL EFI_IP4_CONFIG2_PROTOCOL;
-
-
-///
-/// EFI_IP4_CONFIG2_DATA_TYPE
-///
-typedef enum {
- ///
- /// The interface information of the communication device this EFI
- /// IPv4 Configuration II Protocol instance manages. This type of
- /// data is read only. The corresponding Data is of type
- /// EFI_IP4_CONFIG2_INTERFACE_INFO.
- ///
- Ip4Config2DataTypeInterfaceInfo,
- ///
- /// The general configuration policy for the EFI IPv4 network stack
- /// running on the communication device this EFI IPv4
- /// Configuration II Protocol instance manages. The policy will
- /// affect other configuration settings. The corresponding Data is of
- /// type EFI_IP4_CONFIG2_POLICY.
- ///
- Ip4Config2DataTypePolicy,
- ///
- /// The station addresses set manually for the EFI IPv4 network
- /// stack. It is only configurable when the policy is
- /// Ip4Config2PolicyStatic. The corresponding Data is of
- /// type EFI_IP4_CONFIG2_MANUAL_ADDRESS. When DataSize
- /// is 0 and Data is NULL, the existing configuration is cleared
- /// from the EFI IPv4 Configuration II Protocol instance.
- ///
- Ip4Config2DataTypeManualAddress,
- ///
- /// The gateway addresses set manually for the EFI IPv4 network
- /// stack running on the communication device this EFI IPv4
- /// Configuration II Protocol manages. It is not configurable when
- /// the policy is Ip4Config2PolicyDhcp. The gateway
- /// addresses must be unicast IPv4 addresses. The corresponding
- /// Data is a pointer to an array of EFI_IPv4_ADDRESS instances.
- /// When DataSize is 0 and Data is NULL, the existing configuration
- /// is cleared from the EFI IPv4 Configuration II Protocol instance.
- ///
- Ip4Config2DataTypeGateway,
- ///
- /// The DNS server list for the EFI IPv4 network stack running on
- /// the communication device this EFI IPv4 Configuration II
- /// Protocol manages. It is not configurable when the policy is
- /// Ip4Config2PolicyDhcp. The DNS server addresses must be
- /// unicast IPv4 addresses. The corresponding Data is a pointer to
- /// an array of EFI_IPv4_ADDRESS instances. When DataSize
- /// is 0 and Data is NULL, the existing configuration is cleared
- /// from the EFI IPv4 Configuration II Protocol instance.
- ///
- Ip4Config2DataTypeDnsServer,
- Ip4Config2DataTypeMaximum
-} EFI_IP4_CONFIG2_DATA_TYPE;
-
-///
-/// EFI_IP4_CONFIG2_INTERFACE_INFO related definitions
-///
-#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE 32
-
-///
-/// EFI_IP4_CONFIG2_INTERFACE_INFO
-///
-typedef struct {
- ///
- /// The name of the interface. It is a NULL-terminated Unicode string.
- ///
- CHAR16 Name[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE];
- ///
- /// The interface type of the network interface. See RFC 1700,
- /// section "Number Hardware Type".
- ///
- UINT8 IfType;
- ///
- /// The size, in bytes, of the network interface's hardware address.
- ///
- UINT32 HwAddressSize;
- ///
- /// The hardware address for the network interface.
- ///
- EFI_MAC_ADDRESS HwAddress;
- ///
- /// The station IPv4 address of this EFI IPv4 network stack.
- ///
- EFI_IPv4_ADDRESS StationAddress;
- ///
- /// The subnet address mask that is associated with the station address.
- ///
- EFI_IPv4_ADDRESS SubnetMask;
- ///
- /// Size of the following RouteTable, in bytes. May be zero.
- ///
- UINT32 RouteTableSize;
- ///
- /// The route table of the IPv4 network stack runs on this interface.
- /// Set to NULL if RouteTableSize is zero. Type EFI_IP4_ROUTE_TABLE is defined in
- /// EFI_IP4_PROTOCOL.GetModeData().
- ///
- EFI_IP4_ROUTE_TABLE *RouteTable OPTIONAL;
-} EFI_IP4_CONFIG2_INTERFACE_INFO;
-
-///
-/// EFI_IP4_CONFIG2_POLICY
-///
-typedef enum {
- ///
- /// Under this policy, the Ip4Config2DataTypeManualAddress,
- /// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration
- /// data are required to be set manually. The EFI IPv4 Protocol will get all
- /// required configuration such as IPv4 address, subnet mask and
- /// gateway settings from the EFI IPv4 Configuration II protocol.
- ///
- Ip4Config2PolicyStatic,
- ///
- /// Under this policy, the Ip4Config2DataTypeManualAddress,
- /// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration data are
- /// not allowed to set via SetData(). All of these configurations are retrieved from DHCP
- /// server or other auto-configuration mechanism.
- ///
- Ip4Config2PolicyDhcp,
- Ip4Config2PolicyMax
-} EFI_IP4_CONFIG2_POLICY;
-
-///
-/// EFI_IP4_CONFIG2_MANUAL_ADDRESS
-///
-typedef struct {
- ///
- /// The IPv4 unicast address.
- ///
- EFI_IPv4_ADDRESS Address;
- ///
- /// The subnet mask.
- ///
- EFI_IPv4_ADDRESS SubnetMask;
-} EFI_IP4_CONFIG2_MANUAL_ADDRESS;
-
-/**
- Set the configuration for the EFI IPv4 network stack running on the communication device this EFI
- IPv4 Configuration II Protocol instance manages.
-
- This function is used to set the configuration data of type DataType for the EFI IPv4 network stack
- running on the communication device this EFI IPv4 Configuration II Protocol instance manages.
- The successfully configured data is valid after system reset or power-off.
- The DataSize is used to calculate the count of structure instances in the Data for some
- DataType that multiple structure instances are allowed.
- This function is always non-blocking. When setting some typeof configuration data, an
- asynchronous process is invoked to check the correctness of the data, such as doing address conflict
- detection on the manually set local IPv4 address. EFI_NOT_READY is returned immediately to
- indicate that such an asynchronous process is invoked and the process is not finished yet. The caller
- willing to get the result of the asynchronous process is required to call RegisterDataNotify()
- to register an event on the specified configuration data. Once the event is signaled, the caller can call
- GetData()to get back the configuration data in order to know the result. For other types of
- configuration data that do not require an asynchronous configuration process, the result of the
- operation is immediately returned.
-
- @param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
- @param[in] DataType The type of data to set.
- @param[in] DataSize Size of the buffer pointed to by Data in bytes.
- @param[in] Data The data buffer to set. The type ofthe data buffer is associated
- with the DataType.
-
- @retval EFI_SUCCESS The specified configuration data for the EFI IPv4 network stack is set
- successfully.
- @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
- This is NULL.
- One or more fields in Data and DataSize do not match the
- requirement of the data type indicated by DataType.
- @retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified configuration
- data can not be set under the current policy.
- @retval EFI_ACCESS_DENIED Another set operation on the specified configuration data is already in process.
- @retval EFI_NOT_READY An asynchronous process is invoked to set the specified configuration data and
- the process is not finished yet.
- @retval EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type indicated by DataType.
- @retval EFI_UNSUPPORTED This DataType is not supported.
- @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
- @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CONFIG2_SET_DATA) (
- IN EFI_IP4_CONFIG2_PROTOCOL *This,
- IN EFI_IP4_CONFIG2_DATA_TYPE DataType,
- IN UINTN DataSize,
- IN VOID *Data
- );
-
-/**
- Get the configuration data for the EFI IPv4 network stack running on the communication device this
- EFI IPv4 Configuration II Protocol instance manages.
-
- This function returns the configuration data of type DataType for the EFI IPv4 network stack
- running on the communication device this EFI IPv4 Configuration II Protocol instance manages.
- The caller is responsible for allocating the buffer usedto return the specified configuration data and
- the required size will be returned to the caller if the size of the buffer is too small.
- EFI_NOT_READY is returned if the specified configuration data is not ready due to an already in
- progress asynchronous configuration process. The caller can call RegisterDataNotify() to
- register an event on the specified configuration data. Once the asynchronous configuration process is
- finished, the event will be signaled and a subsequent GetData() call will return the specified
- configuration data.
-
- @param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
- @param[in] DataType The type of data to get.
- @param[out] DataSize On input, in bytes, the size of Data. On output, in bytes, the size
- of buffer required to store the specified configuration data.
- @param[in] Data The data buffer in which the configuration data is returned. The
- type of the data buffer is associated with the DataType. Ignored
- if DataSize is 0.
-
- @retval EFI_SUCCESS The specified configuration data is got successfully.
- @retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:
- This is NULL.
- DataSize is NULL.
- Data is NULL if *DataSizeis not zero.
- @retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified configuration data
- and the required size is returned in DataSize.
- @retval EFI_NOT_READY The specified configuration data is not ready due to an already in
- progress asynchronous configuration process.
- @retval EFI_NOT_FOUND The specified configuration data is not found.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CONFIG2_GET_DATA) (
- IN EFI_IP4_CONFIG2_PROTOCOL *This,
- IN EFI_IP4_CONFIG2_DATA_TYPE DataType,
- IN OUT UINTN *DataSize,
- IN VOID *Data OPTIONAL
- );
-
-/**
- Register an event that is to be signaled whenever a configuration process on the specified
- configuration data is done.
-
- This function registers an event that is to be signaled whenever a configuration process on the
- specified configuration data is done. An event can be registered for different DataType
- simultaneously and the caller is responsible for determining which type of configuration data causes
- the signaling of the event in such case.
-
- @param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
- @param[in] DataType The type of data to unregister the event for.
- @param[in] Event The event to register.
-
- @retval EFI_SUCCESS The notification event for the specified configuration data is
- registered.
- @retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
- @retval EFI_UNSUPPORTED The configuration data type specified by DataType is not supported.
- @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
- @retval EFI_ACCESS_DENIED The Event is already registered for the DataType.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CONFIG2_REGISTER_NOTIFY) (
- IN EFI_IP4_CONFIG2_PROTOCOL *This,
- IN EFI_IP4_CONFIG2_DATA_TYPE DataType,
- IN EFI_EVENT Event
- );
-
-/**
- Remove a previously registered event for the specified configuration data.
-
- This function removes a previously registeredevent for the specified configuration data.
-
- @param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
- @param[in] DataType The type of data to remove the previously registered event for.
- @param[in] Event The event to unregister.
-
- @retval EFI_SUCCESS The event registered for the specified configuration data is removed.
- @retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
- @retval EFI_NOT_FOUND The Eventhas not been registered for the specified DataType.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CONFIG2_UNREGISTER_NOTIFY) (
- IN EFI_IP4_CONFIG2_PROTOCOL *This,
- IN EFI_IP4_CONFIG2_DATA_TYPE DataType,
- IN EFI_EVENT Event
- );
-
-///
-/// The EFI_IP4_CONFIG2_PROTOCOL is designed to be the central repository for the common
-/// configurations and the administrator configurable settings for the EFI IPv4 network stack.
-/// An EFI IPv4 Configuration II Protocol instance will be installed on each communication device that
-/// the EFI IPv4 network stack runs on.
-///
-struct _EFI_IP4_CONFIG2_PROTOCOL {
- EFI_IP4_CONFIG2_SET_DATA SetData;
- EFI_IP4_CONFIG2_GET_DATA GetData;
- EFI_IP4_CONFIG2_REGISTER_NOTIFY RegisterDataNotify;
- EFI_IP4_CONFIG2_UNREGISTER_NOTIFY UnregisterDataNotify;
-};
-
-extern EFI_GUID gEfiIp4Config2ProtocolGuid;
-
-#endif
-
diff --git a/stand/efi/include/Protocol/ServiceBinding.h b/stand/efi/include/Protocol/ServiceBinding.h
deleted file mode 100644
--- a/stand/efi/include/Protocol/ServiceBinding.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/** @file
- UEFI Service Binding Protocol is defined in UEFI specification.
-
- The file defines the generic Service Binding Protocol functions.
- It provides services that are required to create and destroy child
- handles that support a given set of protocols.
-
- Copyright (c) 2006 - 2018, 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_SERVICE_BINDING_H__
-#define __EFI_SERVICE_BINDING_H__
-
-///
-/// Forward reference for pure ANSI compatibility
-///
-typedef struct _EFI_SERVICE_BINDING_PROTOCOL EFI_SERVICE_BINDING_PROTOCOL;
-
-/**
- Creates a child handle and installs a protocol.
-
- The CreateChild() function installs a protocol on ChildHandle.
- If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
- If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
-
- @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
- @param ChildHandle Pointer to the handle of the child to create. If it is NULL,
- then a new handle is created. If it is a pointer to an existing UEFI handle,
- then the protocol is added to the existing UEFI handle.
-
- @retval EFI_SUCCES The protocol was added to ChildHandle.
- @retval EFI_INVALID_PARAMETER ChildHandle is NULL.
- @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
- the child
- @retval other The child handle was not created
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD)(
- IN EFI_SERVICE_BINDING_PROTOCOL *This,
- IN OUT EFI_HANDLE *ChildHandle
- );
-
-/**
- Destroys a child handle with a protocol installed on it.
-
- The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
- that was installed by CreateChild() from ChildHandle. If the removed protocol is the
- last protocol on ChildHandle, then ChildHandle is destroyed.
-
- @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
- @param ChildHandle Handle of the child to destroy
-
- @retval EFI_SUCCES The protocol was removed from ChildHandle.
- @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
- @retval EFI_INVALID_PARAMETER Child handle is NULL.
- @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
- because its services are being used.
- @retval other The child handle was not destroyed
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD)(
- IN EFI_SERVICE_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ChildHandle
- );
-
-///
-/// The EFI_SERVICE_BINDING_PROTOCOL provides member functions to create and destroy
-/// child handles. A driver is responsible for adding protocols to the child handle
-/// in CreateChild() and removing protocols in DestroyChild(). It is also required
-/// that the CreateChild() function opens the parent protocol BY_CHILD_CONTROLLER
-/// to establish the parent-child relationship, and closes the protocol in DestroyChild().
-/// The pseudo code for CreateChild() and DestroyChild() is provided to specify the
-/// required behavior, not to specify the required implementation. Each consumer of
-/// a software protocol is responsible for calling CreateChild() when it requires the
-/// protocol and calling DestroyChild() when it is finished with that protocol.
-///
-struct _EFI_SERVICE_BINDING_PROTOCOL {
- EFI_SERVICE_BINDING_CREATE_CHILD CreateChild;
- EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
-};
-
-#endif
diff --git a/stand/efi/include/efi.h b/stand/efi/include/efi.h
--- a/stand/efi/include/efi.h
+++ b/stand/efi/include/efi.h
@@ -43,37 +43,48 @@
// Basic EFI types of various widths.
//
-#include <sys/efi-edk2.h>
-
-#if __SIZEOF_LONG__ == 4
-#define EFI_ERROR_MASK 0x80000000
-#define EFIERR(a) (0x80000000 | a)
-#define EFIERR_OEM(a) (0xc0000000 | a)
-#else
-#define EFI_ERROR_MASK 0x8000000000000000
-#define EFIERR(a) (0x8000000000000000 | a)
-#define EFIERR_OEM(a) (0xc000000000000000 | a)
-#endif
+#include <Uefi.h>
+#include <Protocol/LoadedImage.h>
+/* old efierr.h */
+#define EFI_ERROR_CODE(a) (unsigned long)(a & ~MAX_BIT)
+
+/* old efidevp.h */
+#define EFI_DP_TYPE_MASK 0x7F
+#define EFI_DP_TYPE_UNPACKED 0x80
+
+#define END_DEVICE_PATH_TYPE 0x7f
+
+#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
+#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH))
+
+
+#define DP_IS_END_TYPE(a)
+#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
+
+#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
+#define DevicePathSubType(a) ( (a)->SubType )
+#define DevicePathNodeLength(a) ((size_t)(((a)->Length[0]) | ((a)->Length[1] << 8)))
+#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
+#define IsDevicePathType(a, t) ( DevicePathType(a) == t )
+#define IsDevicePathEndType(a) IsDevicePathType(a, END_DEVICE_PATH_TYPE)
+#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
+#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
+#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
+
+
+#define SetDevicePathNodeLength(a,l) { \
+ (a)->Length[0] = (UINT8) (l); \
+ (a)->Length[1] = (UINT8) ((l) >> 8); \
+ }
+
+#define SetDevicePathEndNode(a) { \
+ (a)->Type = END_DEVICE_PATH_TYPE; \
+ (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
+ (a)->Length[0] = sizeof(EFI_DEVICE_PATH); \
+ (a)->Length[1] = 0; \
+ }
-#include "efidef.h"
-#include "efidevp.h"
-#include "efipciio.h"
-#include "efiprot.h"
-#include "eficon.h"
-#include "eficonsctl.h"
-#include "efiser.h"
-#include "efi_nii.h"
-#include "efipxebc.h"
-#include "efinet.h"
-#include "efiapi.h"
-#include "efifs.h"
-#include "efierr.h"
-#include "efigop.h"
-#include "efiip.h"
-#include "efiudp.h"
-#include "efitcp.h"
-#include "efipoint.h"
-#include "efiuga.h"
+#define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
#include <sys/types.h>
/*
diff --git a/stand/efi/include/efi_driver_utils.h b/stand/efi/include/efi_driver_utils.h
--- a/stand/efi/include/efi_driver_utils.h
+++ b/stand/efi/include/efi_driver_utils.h
@@ -27,10 +27,9 @@
#ifndef _EFI_DRIVER_UTILS_H_
#define _EFI_DRIVER_UTILS_H_
-#include <efi.h>
-#include <efiprot.h>
+#include <Protocol/DriverBinding.h>
-extern EFI_STATUS install_driver(EFI_DRIVER_BINDING *driver);
-extern EFI_STATUS connect_controllers(EFI_GUID *filter);
+EFI_STATUS install_driver(EFI_DRIVER_BINDING_PROTOCOL *driver);
+EFI_STATUS connect_controllers(EFI_GUID *filter);
#endif
diff --git a/stand/efi/include/efiapi.h b/stand/efi/include/efiapi.h
deleted file mode 100644
--- a/stand/efi/include/efiapi.h
+++ /dev/null
@@ -1,1195 +0,0 @@
-#ifndef _EFI_API_H
-#define _EFI_API_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efiapi.h
-
-Abstract:
-
- Global EFI runtime & boot service interfaces
-
-
-
-
-Revision History
-
---*/
-
-//
-// EFI Specification Revision
-//
-
-#define EFI_SPECIFICATION_MAJOR_REVISION 1
-#define EFI_SPECIFICATION_MINOR_REVISION 10
-
-//
-// Declare forward referenced data structures
-//
-
-INTERFACE_DECL(_EFI_SYSTEM_TABLE);
-
-//
-// EFI Memory
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ALLOCATE_PAGES) (
- IN EFI_ALLOCATE_TYPE Type,
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN NoPages,
- OUT EFI_PHYSICAL_ADDRESS *Memory
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FREE_PAGES) (
- IN EFI_PHYSICAL_ADDRESS Memory,
- IN UINTN NoPages
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_MEMORY_MAP) (
- IN OUT UINTN *MemoryMapSize,
- IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
- OUT UINTN *MapKey,
- OUT UINTN *DescriptorSize,
- OUT UINT32 *DescriptorVersion
- );
-
-#define NextMemoryDescriptor(Ptr,Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ALLOCATE_POOL) (
- IN EFI_MEMORY_TYPE PoolType,
- IN UINTN Size,
- OUT VOID **Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FREE_POOL) (
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
- IN UINTN MemoryMapSize,
- IN UINTN DescriptorSize,
- IN UINT32 DescriptorVersion,
- IN EFI_MEMORY_DESCRIPTOR *VirtualMap
- );
-
-
-#define EFI_OPTIONAL_PTR 0x00000001
-#define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc
-#define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CONVERT_POINTER) (
- IN UINTN DebugDisposition,
- IN OUT VOID **Address
- );
-
-
-//
-// EFI Events
-//
-
-
-
-#define EVT_TIMER 0x80000000
-#define EVT_RUNTIME 0x40000000
-#define EVT_RUNTIME_CONTEXT 0x20000000
-
-#define EVT_NOTIFY_WAIT 0x00000100
-#define EVT_NOTIFY_SIGNAL 0x00000200
-
-#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
-#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
-
-#define EVT_EFI_SIGNAL_MASK 0x000000FF
-#define EVT_EFI_SIGNAL_MAX 2
-
-typedef
-VOID
-(EFIAPI *EFI_EVENT_NOTIFY) (
- IN EFI_EVENT Event,
- IN VOID *Context
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CREATE_EVENT) (
- IN UINT32 Type,
- IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction,
- IN VOID *NotifyContext,
- OUT EFI_EVENT *Event
- );
-
-typedef enum {
- TimerCancel,
- TimerPeriodic,
- TimerRelative,
- TimerTypeMax
-} EFI_TIMER_DELAY;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_TIMER) (
- IN EFI_EVENT Event,
- IN EFI_TIMER_DELAY Type,
- IN UINT64 TriggerTime
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIGNAL_EVENT) (
- IN EFI_EVENT Event
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_WAIT_FOR_EVENT) (
- IN UINTN NumberOfEvents,
- IN EFI_EVENT *Event,
- OUT UINTN *Index
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CLOSE_EVENT) (
- IN EFI_EVENT Event
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CHECK_EVENT) (
- IN EFI_EVENT Event
- );
-
-//
-// Task priority level
-//
-
-#define TPL_APPLICATION 4
-#define TPL_CALLBACK 8
-#define TPL_NOTIFY 16
-#define TPL_HIGH_LEVEL 31
-
-typedef
-EFI_TPL
-(EFIAPI *EFI_RAISE_TPL) (
- IN EFI_TPL NewTpl
- );
-
-typedef
-VOID
-(EFIAPI *EFI_RESTORE_TPL) (
- IN EFI_TPL OldTpl
- );
-
-
-//
-// EFI platform varibles
-//
-
-#define EFI_GLOBAL_VARIABLE \
- { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
-
-// Variable attributes
-#define EFI_VARIABLE_NON_VOLATILE 0x00000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
-#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
-#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
-#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
-#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
-#define EFI_VARIABLE_APPEND_WRITE 0x00000040
-
-// Variable size limitation
-#define EFI_MAXIMUM_VARIABLE_SIZE 1024
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_VARIABLE) (
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- OUT UINT32 *Attributes OPTIONAL,
- IN OUT UINTN *DataSize,
- OUT VOID *Data
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
- IN OUT UINTN *VariableNameSize,
- IN OUT CHAR16 *VariableName,
- IN OUT EFI_GUID *VendorGuid
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_VARIABLE) (
- IN const CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- IN UINT32 Attributes,
- IN UINTN DataSize,
- IN VOID *Data
- );
-
-
-//
-// EFI Time
-//
-
-typedef struct {
- UINT32 Resolution; // 1e-6 parts per million
- UINT32 Accuracy; // hertz
- BOOLEAN SetsToZero; // Set clears sub-second time
-} EFI_TIME_CAPABILITIES;
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_TIME) (
- OUT EFI_TIME *Time,
- OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_TIME) (
- IN EFI_TIME *Time
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_WAKEUP_TIME) (
- OUT BOOLEAN *Enabled,
- OUT BOOLEAN *Pending,
- OUT EFI_TIME *Time
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_WAKEUP_TIME) (
- IN BOOLEAN Enable,
- IN EFI_TIME *Time OPTIONAL
- );
-
-
-//
-// Image functions
-//
-
-
-// PE32+ Subsystem type for EFI images
-
-#if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION)
-#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
-#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
-#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
-#endif
-
-// PE32+ Machine type for EFI images
-
-#if !defined(EFI_IMAGE_MACHINE_IA32)
-#define EFI_IMAGE_MACHINE_IA32 0x014c
-#endif
-
-#if !defined(EFI_IMAGE_MACHINE_EBC)
-#define EFI_IMAGE_MACHINE_EBC 0x0EBC
-#endif
-
-// Image Entry prototype
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
- IN EFI_HANDLE ImageHandle,
- IN struct _EFI_SYSTEM_TABLE *SystemTable
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_LOAD) (
- IN BOOLEAN BootPolicy,
- IN EFI_HANDLE ParentImageHandle,
- IN EFI_DEVICE_PATH *FilePath,
- IN VOID *SourceBuffer OPTIONAL,
- IN UINTN SourceSize,
- OUT EFI_HANDLE *ImageHandle
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_START) (
- IN EFI_HANDLE ImageHandle,
- OUT UINTN *ExitDataSize,
- OUT CHAR16 **ExitData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EXIT) (
- IN EFI_HANDLE ImageHandle,
- IN EFI_STATUS ExitStatus,
- IN UINTN ExitDataSize,
- IN CHAR16 *ExitData OPTIONAL
- ) __dead2;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_UNLOAD) (
- IN EFI_HANDLE ImageHandle
- );
-
-
-// Image handle
-#define LOADED_IMAGE_PROTOCOL \
- { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-#define EFI_LOADED_IMAGE_INFORMATION_REVISION 0x1000
-typedef struct {
- UINT32 Revision;
- EFI_HANDLE ParentHandle;
- struct _EFI_SYSTEM_TABLE *SystemTable;
-
- // Source location of image
- EFI_HANDLE DeviceHandle;
- EFI_DEVICE_PATH *FilePath;
- VOID *Reserved;
-
- // Images load options
- UINT32 LoadOptionsSize;
- VOID *LoadOptions;
-
- // Location of where image was loaded
- VOID *ImageBase;
- UINT64 ImageSize;
- EFI_MEMORY_TYPE ImageCodeType;
- EFI_MEMORY_TYPE ImageDataType;
-
- // If the driver image supports a dynamic unload request
- EFI_IMAGE_UNLOAD Unload;
-
-} EFI_LOADED_IMAGE;
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EXIT_BOOT_SERVICES) (
- IN EFI_HANDLE ImageHandle,
- IN UINTN MapKey
- );
-
-//
-// Misc
-//
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STALL) (
- IN UINTN Microseconds
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_WATCHDOG_TIMER) (
- IN UINTN Timeout,
- IN UINT64 WatchdogCode,
- IN UINTN DataSize,
- IN CHAR16 *WatchdogData OPTIONAL
- );
-
-
-typedef enum {
- EfiResetCold,
- EfiResetWarm,
- EfiResetShutdown
-} EFI_RESET_TYPE;
-
-typedef
-VOID
-(EFIAPI *EFI_RESET_SYSTEM) (
- IN EFI_RESET_TYPE ResetType,
- IN EFI_STATUS ResetStatus,
- IN UINTN DataSize,
- IN CHAR16 *ResetData OPTIONAL
- ) __dead2;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
- OUT UINT64 *Count
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
- OUT UINT32 *HighCount
- );
-
-//
-// Protocol handler functions
-//
-
-typedef enum {
- EFI_NATIVE_INTERFACE
-} EFI_INTERFACE_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
- IN OUT EFI_HANDLE *Handle,
- IN EFI_GUID *Protocol,
- IN EFI_INTERFACE_TYPE InterfaceType,
- IN VOID *Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- IN VOID *OldInterface,
- IN VOID *NewInterface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- IN VOID *Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HANDLE_PROTOCOL) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- OUT VOID **Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
- IN EFI_GUID *Protocol,
- IN EFI_EVENT Event,
- OUT VOID **Registration
- );
-
-typedef enum {
- AllHandles,
- ByRegisterNotify,
- ByProtocol
-} EFI_LOCATE_SEARCH_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_HANDLE) (
- IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol OPTIONAL,
- IN VOID *SearchKey OPTIONAL,
- IN OUT UINTN *BufferSize,
- OUT EFI_HANDLE *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_DEVICE_PATH) (
- IN EFI_GUID *Protocol,
- IN OUT EFI_DEVICE_PATH **DevicePath,
- OUT EFI_HANDLE *Device
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
- IN EFI_GUID *Guid,
- IN VOID *Table
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RESERVED_SERVICE) (
- VOID
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CONNECT_CONTROLLER) (
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE *DriverImageHandle OPTIONAL,
- IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL,
- IN BOOLEAN Recursive
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISCONNECT_CONTROLLER)(
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE DriverImageHandle, OPTIONAL
- IN EFI_HANDLE ChildHandle OPTIONAL
- );
-
-#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
-#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
-#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
-#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
-#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
-#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_OPEN_PROTOCOL) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- OUT VOID **Interface,
- IN EFI_HANDLE ImageHandle,
- IN EFI_HANDLE ControllerHandle, OPTIONAL
- IN UINT32 Attributes
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CLOSE_PROTOCOL) (
- IN EFI_HANDLE Handle,
- IN EFI_GUID *Protocol,
- IN EFI_HANDLE ImageHandle,
- IN EFI_HANDLE DeviceHandle
- );
-
-typedef struct {
- EFI_HANDLE AgentHandle;
- EFI_HANDLE ControllerHandle;
- UINT32 Attributes;
- UINT32 OpenCount;
-} EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- IN EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
- OUT UINTN *EntryCount
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (
- IN EFI_HANDLE UserHandle,
- OUT EFI_GUID ***ProtocolBuffer,
- OUT UINTN *ProtocolBufferCount
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (
- IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol OPTIONAL,
- IN VOID *SearchKey OPTIONAL,
- IN OUT UINTN *NumberHandles,
- OUT EFI_HANDLE **Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_PROTOCOL) (
- EFI_GUID *Protocol,
- VOID *Registration, OPTIONAL
- VOID **Interface
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
- IN OUT EFI_HANDLE *Handle,
- ...
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
- IN EFI_HANDLE Handle,
- ...
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CALCULATE_CRC32) (
- IN VOID *Data,
- IN UINTN DataSize,
- OUT UINT32 *Crc32
- );
-
-typedef
-VOID
-(EFIAPI *EFI_COPY_MEM) (
- IN VOID *Destination,
- IN VOID *Source,
- IN UINTN Length
- );
-
-typedef
-VOID
-(EFIAPI *EFI_SET_MEM) (
- IN VOID *Buffer,
- IN UINTN Size,
- IN UINT8 Value
- );
-
-//
-// Standard EFI table header
-//
-
-typedef struct _EFI_TABLE_HEARDER {
- UINT64 Signature;
- UINT32 Revision;
- UINT32 HeaderSize;
- UINT32 CRC32;
- UINT32 Reserved;
-} EFI_TABLE_HEADER;
-
-
-//
-// EFI Runtime Serivces Table
-//
-
-#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
-#define EFI_RUNTIME_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION))
-
-typedef struct {
- EFI_TABLE_HEADER Hdr;
-
- //
- // Time services
- //
-
- EFI_GET_TIME GetTime;
- EFI_SET_TIME SetTime;
- EFI_GET_WAKEUP_TIME GetWakeupTime;
- EFI_SET_WAKEUP_TIME SetWakeupTime;
-
- //
- // Virtual memory services
- //
-
- EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
- EFI_CONVERT_POINTER ConvertPointer;
-
- //
- // Variable serviers
- //
-
- EFI_GET_VARIABLE GetVariable;
- EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
- EFI_SET_VARIABLE SetVariable;
-
- //
- // Misc
- //
-
- EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
- EFI_RESET_SYSTEM ResetSystem;
-
-} EFI_RUNTIME_SERVICES;
-
-
-//
-// EFI Boot Services Table
-//
-
-#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
-#define EFI_BOOT_SERVICES_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION))
-
-typedef struct {
-
- EFI_TABLE_HEADER Hdr;
-
- //
- // Task priority functions
- //
-
- EFI_RAISE_TPL RaiseTPL;
- EFI_RESTORE_TPL RestoreTPL;
-
- //
- // Memory functions
- //
-
- EFI_ALLOCATE_PAGES AllocatePages;
- EFI_FREE_PAGES FreePages;
- EFI_GET_MEMORY_MAP GetMemoryMap;
- EFI_ALLOCATE_POOL AllocatePool;
- EFI_FREE_POOL FreePool;
-
- //
- // Event & timer functions
- //
-
- EFI_CREATE_EVENT CreateEvent;
- EFI_SET_TIMER SetTimer;
- EFI_WAIT_FOR_EVENT WaitForEvent;
- EFI_SIGNAL_EVENT SignalEvent;
- EFI_CLOSE_EVENT CloseEvent;
- EFI_CHECK_EVENT CheckEvent;
-
- //
- // Protocol handler functions
- //
-
- EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
- EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
- EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
- EFI_HANDLE_PROTOCOL HandleProtocol;
- VOID *Reserved;
- EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
- EFI_LOCATE_HANDLE LocateHandle;
- EFI_LOCATE_DEVICE_PATH LocateDevicePath;
- EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
-
- //
- // Image functions
- //
-
- EFI_IMAGE_LOAD LoadImage;
- EFI_IMAGE_START StartImage;
- EFI_EXIT Exit;
- EFI_IMAGE_UNLOAD UnloadImage;
- EFI_EXIT_BOOT_SERVICES ExitBootServices;
-
- //
- // Misc functions
- //
-
- EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
- EFI_STALL Stall;
- EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
-
- //
- // DriverSupport Services
- //
- EFI_CONNECT_CONTROLLER ConnectController;
- EFI_DISCONNECT_CONTROLLER DisconnectController;
-
- //
- // Open and Close Protocol Services
- //
- EFI_OPEN_PROTOCOL OpenProtocol;
- EFI_CLOSE_PROTOCOL CloseProtocol;
- EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
-
- //
- // Library Services to reduce size of drivers
- //
- EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
- EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
- EFI_LOCATE_PROTOCOL LocateProtocol;
-
- EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
- EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
-
- //
- // CRC32 services
- //
- EFI_CALCULATE_CRC32 CalculateCrc32;
-
- //
- // Memory Utility Services
- //
- EFI_COPY_MEM CopyMem;
- EFI_SET_MEM SetMem;
-
-} EFI_BOOT_SERVICES;
-
-
-//
-// EFI Configuration Table and GUID definitions
-//
-
-#define MPS_TABLE_GUID \
- { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define ACPI_TABLE_GUID \
- { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define ACPI_20_TABLE_GUID \
- { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-#define SMBIOS_TABLE_GUID \
- { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define SMBIOS3_TABLE_GUID \
- { 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94} }
-
-#define SAL_SYSTEM_TABLE_GUID \
- { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define FDT_TABLE_GUID \
- { 0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0} }
-
-#define DXE_SERVICES_TABLE_GUID \
- { 0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9} }
-
-#define HOB_LIST_TABLE_GUID \
- { 0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define LZMA_DECOMPRESSION_GUID \
- { 0xee4e5898, 0x3914, 0x4259, {0x9d, 0x6e, 0xdc, 0x7b, 0xd7, 0x94, 0x3, 0xcf} }
-
-#define ARM_MP_CORE_INFO_TABLE_GUID \
- { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }
-
-#define ESRT_TABLE_GUID \
- { 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80} }
-
-#define MEMORY_TYPE_INFORMATION_TABLE_GUID \
- { 0x4c19049f, 0x4137, 0x4dd3, {0x9c, 0x10, 0x8b, 0x97, 0xa8, 0x3f, 0xfd, 0xfa} }
-
-#define DEBUG_IMAGE_INFO_TABLE_GUID \
- { 0x49152e77, 0x1ada, 0x4764, {0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b} }
-
-typedef struct _EFI_CONFIGURATION_TABLE {
- EFI_GUID VendorGuid;
- VOID *VendorTable;
-} EFI_CONFIGURATION_TABLE;
-
-
-//
-// EFI System Table
-//
-
-
-
-
-#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
-#define EFI_SYSTEM_TABLE_REVISION ((EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION))
-#define EFI_1_10_SYSTEM_TABLE_REVISION ((1<<16) | 10)
-#define EFI_1_02_SYSTEM_TABLE_REVISION ((1<<16) | 02)
-
-typedef struct _EFI_SYSTEM_TABLE {
- EFI_TABLE_HEADER Hdr;
-
- CHAR16 *FirmwareVendor;
- UINT32 FirmwareRevision;
-
- EFI_HANDLE ConsoleInHandle;
- SIMPLE_INPUT_INTERFACE *ConIn;
-
- EFI_HANDLE ConsoleOutHandle;
- SIMPLE_TEXT_OUTPUT_INTERFACE *ConOut;
-
- EFI_HANDLE StandardErrorHandle;
- SIMPLE_TEXT_OUTPUT_INTERFACE *StdErr;
-
- EFI_RUNTIME_SERVICES *RuntimeServices;
- EFI_BOOT_SERVICES *BootServices;
-
- UINTN NumberOfTableEntries;
- EFI_CONFIGURATION_TABLE *ConfigurationTable;
-
-} EFI_SYSTEM_TABLE;
-
-/*
- * unlisted GUID's..
- */
-#define EFI_EBC_INTERPRETER_PROTOCOL_GUID \
-{ 0x13AC6DD1, 0x73D0, 0x11D4, {0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7} }
-
-#define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
-{ 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe} }
-
-#define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
-{ 0x107a772b, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
- { 0x18A031AB, 0xB443, 0x4D1A, \
- { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71 } \
- }
-
-#define EFI_TAPE_IO_PROTOCOL_GUID \
- { 0x1e93e633, 0xd65a, 0x459e, \
- { 0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } \
- }
-
-#define EFI_SCSI_IO_PROTOCOL_GUID \
- { 0x932f47e6, 0x2362, 0x4002, \
- { 0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \
- }
-
-#define EFI_USB2_HC_PROTOCOL_GUID \
- { 0x3e745226, 0x9818, 0x45b6, \
- { 0xa2, 0xac, 0xd7, 0xcd, 0x0e, 0x8b, 0xa2, 0xbc } \
- }
-
-#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
- { 0x2755590C, 0x6F3C, 0x42FA, \
- { 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \
- }
-
-#define EFI_DEBUGPORT_PROTOCOL_GUID \
- { 0xEBA4E8D2, 0x3858, 0x41EC, \
- { 0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
- }
-
-#define EFI_DECOMPRESS_PROTOCOL_GUID \
- { 0xd8117cfe, 0x94a6, 0x11d4, \
- { 0x9a, 0x3a, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
- }
-
-#define EFI_ACPI_TABLE_PROTOCOL_GUID \
- { 0xffe06bdd, 0x6107, 0x46a6, \
- { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c} \
- }
-
-#define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \
- { 0x587e72d7, 0xcc50, 0x4f79, \
- { 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f } \
- }
-
-#define EFI_HII_DATABASE_PROTOCOL_GUID \
- { 0xef9fc172, 0xa1b2, 0x4693, \
- { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } \
- }
-
-#define EFI_HII_STRING_PROTOCOL_GUID \
- { 0xfd96974, 0x23aa, 0x4cdc, \
- { 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a } \
- }
-
-#define EFI_HII_IMAGE_PROTOCOL_GUID \
- { 0x31a6406a, 0x6bdf, 0x4e46, \
- { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } \
- }
-
-#define EFI_HII_FONT_PROTOCOL_GUID \
- { 0xe9ca4775, 0x8657, 0x47fc, \
- { 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 } \
- }
-#define EFI_HII_CONFIGURATION_ACCESS_PROTOCOL_GUID \
- { 0x330d4706, 0xf2a0, 0x4e4f, \
- { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } \
- }
-
-#define EFI_COMPONENT_NAME_PROTOCOL_GUID \
-{ 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
- { 0x6a7a5cff, 0xe8d9, 0x4f70, \
- { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14} \
- }
-
-#define EFI_USB_IO_PROTOCOL_GUID \
- { 0x2B2F68D6, 0x0CD2, 0x44cf, \
- { 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \
- }
-#define EFI_HCDP_TABLE_GUID \
- { 0xf951938d, 0x620b, 0x42ef, \
- { 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 } \
- }
-
-#define EFI_DEVICE_TREE_GUID \
- { 0xb1b621d5, 0xf19c, 0x41a5, \
- { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } \
- }
-
-#define EFI_VENDOR_APPLE_GUID \
- { 0x2B0585EB, 0xD8B8, 0x49A9, \
- { 0x8B, 0x8C, 0xE2, 0x1B, 0x01, 0xAE, 0xF2, 0xB7 } \
- }
-
-#define EFI_CONSOLE_IN_DEVICE_GUID \
-{ 0xd3b36f2b, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_CONSOLE_OUT_DEVICE_GUID \
-{ 0xd3b36f2c, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_STANDARD_ERROR_DEVICE_GUID \
-{ 0xd3b36f2d, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_UNICODE_COLLATION2_PROTOCOL_GUID \
-{ 0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49} }
-
-#define EFI_FORM_BROWSER2_PROTOCOL_GUID \
-{ 0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58} }
-
-#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} }
-
-#define EFI_IP4_CONFIG_PROTOCOL_GUID \
-{ 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e} }
-
-#define EFI_IP6_CONFIG_PROTOCOL_GUID \
-{ 0x937fe521, 0x95ae, 0x4d1a, {0x89, 0x29, 0x48, 0xbc, 0xd9, 0x0a, 0xd3, 0x1a} }
-
-#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} }
-
-#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} }
-
-#define EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID \
-{ 0xd9760ff3, 0x3cca, 0x4267, {0x80, 0xf9, 0x75, 0x27, 0xfa, 0xfa, 0x42, 0x23} }
-
-#define EFI_MTFTP6_PROTOCOL_GUID \
-{ 0xbf0a78ba, 0xec29, 0x49cf, {0xa1, 0xc9, 0x7a, 0xe5, 0x4e, 0xab, 0x6a, 0x51} }
-
-#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} }
-
-#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
-{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5} }
-
-#define EFI_DHCP6_PROTOCOL_GUID \
-{ 0x87c8bad7, 0x595, 0x4053, {0x82, 0x97, 0xde, 0xde, 0x39, 0x5f, 0x5d, 0x5b} }
-
-#define EFI_SCSI_PASS_THRU_PROTOCOL_GUID \
-{ 0xa59e8fcf, 0xbda0, 0x43bb, {0x90, 0xb1, 0xd3, 0x73, 0x2e, 0xca, 0xa8, 0x77} }
-
-#define EFI_EXT_SCSI_PASS_THRU_PROTOCOL_GUID \
-{ 0x143b7632, 0xb81b, 0x4cb7, {0xab, 0xd3, 0xb6, 0x25, 0xa5, 0xb9, 0xbf, 0xfe} }
-
-#define EFI_DISK_INFO_PROTOCOL_GUID \
-{ 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27} }
-
-#define EFI_ISA_IO_PROTOCOL_GUID \
-{ 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_VLAN_CONFIG_PROTOCOL_GUID \
-{ 0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74} }
-
-#define EFI_IDE_CONTROLLER_INIT_PROTOCOL_GUID \
-{ 0xa1e37052, 0x80d9, 0x4e65, {0xa3, 0x17, 0x3e, 0x9a, 0x55, 0xc4, 0x3e, 0xc9} }
-
-#define EFI_ISA_ACPI_PROTOCOL_GUID \
-{ 0x64a892dc, 0x5561, 0x4536, {0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55} }
-
-#define EFI_PCI_ENUMERATION_COMPLETE_GUID \
-{ 0x30cfe3e7, 0x3de1, 0x4586, {0xbe, 0x20, 0xde, 0xab, 0xa1, 0xb3, 0xb7, 0x93} }
-
-#define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
-{ 0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
-
-#define EFI_DRIVER_DIAGNOSTICS2_PROTOCOL_GUID \
-{ 0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63} }
-
-#define EFI_CAPSULE_ARCH_PROTOCOL_GUID \
-{ 0x5053697e, 0x2cbc, 0x4819, {0x90, 0xd9, 0x05, 0x80, 0xde, 0xee, 0x57, 0x54} }
-
-#define EFI_MONOTONIC_COUNTER_ARCH_PROTOCOL_GUID \
-{0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} }
-
-#define EFI_REALTIME_CLOCK_ARCH_PROTOCOL_GUID \
-{0x27cfac87, 0x46cc, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_MP_SERVICES_PROTOCOL_GUID \
-{ 0x3fdda605, 0xa76e, 0x4f46, {0xad, 0x29, 0x12, 0xf4, 0x53, 0x1b, 0x3d, 0x08} }
-
-#define EFI_VARIABLE_ARCH_PROTOCOL_GUID \
-{ 0x1e5668e2, 0x8481, 0x11d4, {0xbc, 0xf1, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
-
-#define EFI_VARIABLE_WRITE_ARCH_PROTOCOL_GUID \
-{ 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53} }
-
-#define EFI_WATCHDOG_TIMER_ARCH_PROTOCOL_GUID \
-{ 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53} }
-
-#define EFI_ACPI_SUPPORT_PROTOCOL_GUID \
-{ 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53} }
-
-#define EFI_BDS_ARCH_PROTOCOL_GUID \
-{ 0x665e3ff6, 0x46cc, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_METRONOME_ARCH_PROTOCOL_GUID \
-{ 0x26baccb2, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
-
-#define EFI_TIMER_ARCH_PROTOCOL_GUID \
-{ 0x26baccb3, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
-
-#define EFI_DPC_PROTOCOL_GUID \
-{ 0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6} }
-
-#define EFI_PRINT2_PROTOCOL_GUID \
-{ 0xf05976ef, 0x83f1, 0x4f3d, {0x86, 0x19, 0xf7, 0x59, 0x5d, 0x41, 0xe5, 0x38} }
-
-#define EFI_RESET_ARCH_PROTOCOL_GUID \
-{ 0x27cfac88, 0x46cc, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define EFI_CPU_ARCH_PROTOCOL_GUID \
-{ 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
-
-#define EFI_CPU_IO2_PROTOCOL_GUID \
-{ 0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f} }
-
-#define EFI_LEGACY_8259_PROTOCOL_GUID \
-{ 0x38321dba, 0x4fe0, 0x4e17, {0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed, 0xc1} }
-
-#define EFI_SECURITY_ARCH_PROTOCOL_GUID \
-{ 0xa46423e3, 0x4617, 0x49f1, {0xb9, 0xff, 0xd1, 0xbf, 0xa9, 0x11, 0x58, 0x39} }
-
-#define EFI_SECURITY2_ARCH_PROTOCOL_GUID \
-{ 0x94ab2f58, 0x1438, 0x4ef1, {0x91, 0x52, 0x18, 0x94, 0x1a, 0x3a, 0x0e, 0x68} }
-
-#define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
-{ 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33} }
-
-#define EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID \
-{ 0xd2b2b828, 0x826, 0x48a7, {0xb3, 0xdf, 0x98, 0x3c, 0x0, 0x60, 0x24, 0xf0} }
-
-#define EFI_DATA_HUB_PROTOCOL_GUID \
-{ 0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-#define PCD_PROTOCOL_GUID \
-{ 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7} }
-
-#define EFI_PCD_PROTOCOL_GUID \
-{ 0x13a3f0f6, 0x264a, 0x3ef0, {0xf2, 0xe0, 0xde, 0xc5, 0x12, 0x34, 0x2f, 0x34} }
-
-#define EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID \
-{ 0x8f644fa9, 0xe850, 0x4db1, {0x9c, 0xe2, 0xb, 0x44, 0x69, 0x8e, 0x8d, 0xa4 } }
-
-#define EFI_FIRMWARE_VOLUME2_PROTOCOL_GUID \
-{ 0x220e73b6, 0x6bdb, 0x4413, { 0x84, 0x5, 0xb9, 0x74, 0xb1, 0x8, 0x61, 0x9a } }
-
-#define EFI_FIRMWARE_VOLUME_DISPATCH_PROTOCOL_GUID \
-{ 0x7aa35a69, 0x506c, 0x444f, {0xa7, 0xaf, 0x69, 0x4b, 0xf5, 0x6f, 0x71, 0xc8} }
-
-#define LZMA_COMPRESS_GUID \
-{ 0xee4e5898, 0x3914, 0x4259, {0x9d, 0x6e, 0xdc, 0x7b, 0xd7, 0x94, 0x03, 0xcf} }
-#endif
diff --git a/stand/efi/include/eficon.h b/stand/efi/include/eficon.h
deleted file mode 100644
--- a/stand/efi/include/eficon.h
+++ /dev/null
@@ -1,526 +0,0 @@
-#ifndef _EFI_CON_H
-#define _EFI_CON_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- eficon.h
-
-Abstract:
-
- EFI console protocols
-
-
-
-Revision History
-
---*/
-
-//
-// Text output protocol
-//
-
-#define SIMPLE_TEXT_OUTPUT_PROTOCOL \
- { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_RESET) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN BOOLEAN ExtendedVerification
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_OUTPUT_STRING) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN CHAR16 *String
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_TEST_STRING) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN CHAR16 *String
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_QUERY_MODE) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN ModeNumber,
- OUT UINTN *Columns,
- OUT UINTN *Rows
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_MODE) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN ModeNumber
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_ATTRIBUTE) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN Attribute
- );
-
-#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)
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_CLEAR_SCREEN) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN UINTN Column,
- IN UINTN Row
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_ENABLE_CURSOR) (
- IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
- IN BOOLEAN Enable
- );
-
-typedef struct {
- INT32 MaxMode;
- // current settings
- INT32 Mode;
- INT32 Attribute;
- INT32 CursorColumn;
- INT32 CursorRow;
- BOOLEAN CursorVisible;
-} SIMPLE_TEXT_OUTPUT_MODE;
-
-typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
- EFI_TEXT_RESET Reset;
-
- EFI_TEXT_OUTPUT_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;
-
- // Current mode
- SIMPLE_TEXT_OUTPUT_MODE *Mode;
-} SIMPLE_TEXT_OUTPUT_INTERFACE;
-
-//
-// Define's for required EFI Unicode Box Draw character
-//
-
-#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_UP 0x2191
-#define ARROW_DOWN 0x2193
-
-//
-// Text input protocol
-//
-
-#define SIMPLE_TEXT_INPUT_PROTOCOL \
- { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE);
-
-typedef struct {
- UINT16 ScanCode;
- CHAR16 UnicodeChar;
-} EFI_INPUT_KEY;
-
-//
-// Baseline unicode control chars
-//
-
-#define CHAR_NULL 0x0000
-#define CHAR_BACKSPACE 0x0008
-#define CHAR_TAB 0x0009
-#define CHAR_LINEFEED 0x000A
-#define CHAR_CARRIAGE_RETURN 0x000D
-
-//
-// Scan codes for base line keys
-//
-
-#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
-
-//
-// EFI Scan code Ex
-//
-#define SCAN_F11 0x0015
-#define SCAN_F12 0x0016
-#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
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_RESET) (
- IN struct _SIMPLE_INPUT_INTERFACE *This,
- IN BOOLEAN ExtendedVerification
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_READ_KEY) (
- IN struct _SIMPLE_INPUT_INTERFACE *This,
- OUT EFI_INPUT_KEY *Key
- );
-
-typedef struct _SIMPLE_INPUT_INTERFACE {
- EFI_INPUT_RESET Reset;
- EFI_INPUT_READ_KEY ReadKeyStroke;
- EFI_EVENT WaitForKey;
-} SIMPLE_INPUT_INTERFACE;
-
-#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
- {0xdd9e7534, 0x7762, 0x4698, {0x8c, 0x14, 0xf5, 0x85, \
- 0x17, 0xa6, 0x25, 0xaa} }
-
-INTERFACE_DECL(_EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL);
-
-typedef UINT8 EFI_KEY_TOGGLE_STATE;
-//
-// Any Shift or Toggle State that is valid should have
-// high order bit set.
-//
-typedef struct EFI_KEY_STATE {
- UINT32 KeyShiftState;
- EFI_KEY_TOGGLE_STATE KeyToggleState;
-} EFI_KEY_STATE;
-
-typedef struct {
- EFI_INPUT_KEY Key;
- EFI_KEY_STATE KeyState;
-} EFI_KEY_DATA;
-
-//
-// 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 Key Notfication Function
-//
-typedef
-EFI_STATUS
-(EFIAPI *EFI_KEY_NOTIFY_FUNCTION) (
- IN EFI_KEY_DATA *KeyData
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_RESET_EX) (
- IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
- Routine Description:
- Reset the input device and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
-
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
-
---*/
-;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_READ_KEY_EX) (
- IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- OUT EFI_KEY_DATA *KeyData
- )
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existence of a keystroke via WaitForEvent () call.
-
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- state data for the key that was pressed.
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
- hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
---*/
-;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_STATE) (
- IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_KEY_TOGGLE_STATE *KeyToggleState
- )
-/*++
-
- Routine Description:
- Set certain state for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
- state for the input device.
-
- Returns:
- EFI_SUCCESS - The device state was set successfully.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
- not have the setting adjusted.
- EFI_UNSUPPORTED - The device does not have the ability to set its state.
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.
-
---*/
-;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
- IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_KEY_DATA *KeyData,
- IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
- OUT EFI_HANDLE *NotifyHandle
- )
-/*++
-
- Routine Description:
- Register a notification function for a particular keystroke for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
- information data for the key that was pressed.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
-
- Returns:
- EFI_SUCCESS - The notification function was registered successfully.
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necessary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
-
---*/
-;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY) (
- IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_HANDLE NotificationHandle
- )
-/*++
-
- Routine Description:
- Remove a registered notification function from a particular keystroke.
-
- Arguments:
- This - Protocol instance pointer.
- NotificationHandle - The handle of the notification function being unregistered.
-
- Returns:
- EFI_SUCCESS - The notification function was unregistered successfully.
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
-;
-
-typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
- EFI_INPUT_RESET_EX Reset;
- EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
- EFI_EVENT WaitForKeyEx;
- EFI_SET_STATE SetState;
- EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
- EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
-} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
-
-#endif
diff --git a/stand/efi/include/efidebug.h b/stand/efi/include/efidebug.h
deleted file mode 100644
--- a/stand/efi/include/efidebug.h
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef _EFI_DEBUG_H
-#define _EFI_DEBUG_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efidebug.h
-
-Abstract:
-
- EFI library debug functions
-
-
-
-Revision History
-
---*/
-
-extern UINTN EFIDebug;
-
-#if EFI_DEBUG
-
- #define DBGASSERT(a) DbgAssert(__FILE__, __LINE__, #a)
- #define DEBUG(a) DbgPrint a
-
-#else
-
- #define DBGASSERT(a)
- #define DEBUG(a)
-
-#endif
-
-#if EFI_DEBUG_CLEAR_MEMORY
-
- #define DBGSETMEM(a,l) SetMem(a,l,(CHAR8)BAD_POINTER)
-
-#else
-
- #define DBGSETMEM(a,l)
-
-#endif
-
-#define D_INIT 0x00000001 // Initialization style messages
-#define D_WARN 0x00000002 // Warnings
-#define D_LOAD 0x00000004 // Load events
-#define D_FS 0x00000008 // EFI File system
-#define D_POOL 0x00000010 // Alloc & Free's
-#define D_PAGE 0x00000020 // Alloc & Free's
-#define D_INFO 0x00000040 // Verbose
-#define D_VARIABLE 0x00000100 // Variable
-#define D_VAR 0x00000100 // Variable
-#define D_BM 0x00000400 // Boot Manager
-#define D_BLKIO 0x00001000 // BlkIo Driver
-#define D_BLKIO_ULTRA 0x00002000 // BlkIo Driver
-#define D_NET 0x00004000 // SNI Driver
-#define D_NET_ULTRA 0x00008000 // SNI Driver
-#define D_UNDI 0x00010000 // UNDI Driver
-#define D_LOADFILE 0x00020000 // UNDI Driver
-#define D_EVENT 0x00080000 // Event messages
-
-#define D_ERROR 0x80000000 // Error
-
-#define D_RESERVED 0x7ff40A80 // Bits not reserved above
-
-//
-// Current Debug level of the system, value of EFIDebug
-//
-//#define EFI_DBUG_MASK (D_ERROR | D_WARN | D_LOAD | D_BLKIO | D_INIT)
-#define EFI_DBUG_MASK (D_ERROR)
-
-//
-//
-//
-
-#if EFI_DEBUG
-
- #define ASSERT(a) if(!(a)) DBGASSERT(a)
- #define ASSERT_LOCKED(l) if(!(l)->Lock) DBGASSERT(l not locked)
- #define ASSERT_STRUCT(p,t) DBGASSERT(t not structure), p
-
-#else
-
- #define ASSERT(a)
- #define ASSERT_LOCKED(l)
- #define ASSERT_STRUCT(p,t)
-
-#endif
-
-//
-// Prototypes
-//
-
-INTN
-DbgAssert (
- CHAR8 *file,
- INTN lineno,
- CHAR8 *string
- );
-
-INTN
-DbgPrint (
- INTN mask,
- CHAR8 *format,
- ...
- );
-
-#endif
diff --git a/stand/efi/include/efidef.h b/stand/efi/include/efidef.h
deleted file mode 100644
--- a/stand/efi/include/efidef.h
+++ /dev/null
@@ -1,223 +0,0 @@
-#ifndef _EFI_DEF_H
-#define _EFI_DEF_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efidef.h
-
-Abstract:
-
- EFI definitions
-
-
-
-
-Revision History
-
---*/
-
-typedef UINT16 CHAR16;
-typedef UINT8 CHAR8;
-#ifndef ACPI_THREAD_ID /* ACPI's definitions are fine */
-typedef UINT8 BOOLEAN;
-#endif
-
-#ifndef TRUE
- #define TRUE ((BOOLEAN) 1)
- #define FALSE ((BOOLEAN) 0)
-#endif
-
-#ifndef NULL
- #define NULL ((VOID *) 0)
-#endif
-
-typedef UINTN EFI_STATUS;
-typedef UINT64 EFI_LBA;
-typedef UINTN EFI_TPL;
-typedef VOID *EFI_HANDLE;
-typedef VOID *EFI_EVENT;
-
-
-//
-// Prototype argument decoration for EFI parameters to indicate
-// their direction
-//
-// IN - argument is passed into the function
-// OUT - argument (pointer) is returned from the function
-// OPTIONAL - argument is optional
-//
-
-#ifndef IN
- #define IN
- #define OUT
- #define OPTIONAL
- #define CONST const
-#endif
-
-
-//
-// A GUID
-//
-
-typedef struct {
- UINT32 Data1;
- UINT16 Data2;
- UINT16 Data3;
- UINT8 Data4[8];
-} EFI_GUID;
-
-
-//
-// Time
-//
-
-typedef struct {
- UINT16 Year; // 1998 - 20XX
- UINT8 Month; // 1 - 12
- UINT8 Day; // 1 - 31
- UINT8 Hour; // 0 - 23
- UINT8 Minute; // 0 - 59
- UINT8 Second; // 0 - 59
- UINT8 Pad1;
- UINT32 Nanosecond; // 0 - 999,999,999
- INT16 TimeZone; // -1440 to 1440 or 2047
- UINT8 Daylight;
- UINT8 Pad2;
-} EFI_TIME;
-
-// Bit definitions for EFI_TIME.Daylight
-#define EFI_TIME_ADJUST_DAYLIGHT 0x01
-#define EFI_TIME_IN_DAYLIGHT 0x02
-
-// Value definition for EFI_TIME.TimeZone
-#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
-
-
-
-//
-// Networking
-//
-
-typedef struct {
- UINT8 Addr[4];
-} EFI_IPv4_ADDRESS;
-
-typedef struct {
- UINT8 Addr[16];
-} EFI_IPv6_ADDRESS;
-
-typedef struct {
- UINT8 Addr[32];
-} EFI_MAC_ADDRESS;
-
-typedef struct {
- UINT32 ReceivedQueueTimeoutValue;
- UINT32 TransmitQueueTimeoutValue;
- UINT16 ProtocolTypeFilter;
- BOOLEAN EnableUnicastReceive;
- BOOLEAN EnableMulticastReceive;
- BOOLEAN EnableBroadcastReceive;
- BOOLEAN EnablePromiscuousReceive;
- BOOLEAN FlushQueuesOnReset;
- BOOLEAN EnableReceiveTimestamps;
- BOOLEAN DisableBackgroundPolling;
-} EFI_MANAGED_NETWORK_CONFIG_DATA;
-
-//
-// Memory
-//
-
-typedef UINT64 EFI_PHYSICAL_ADDRESS;
-typedef UINT64 EFI_VIRTUAL_ADDRESS;
-
-typedef enum {
- AllocateAnyPages,
- AllocateMaxAddress,
- AllocateAddress,
- MaxAllocateType
-} EFI_ALLOCATE_TYPE;
-
-//Preseve the attr on any range supplied.
-//ConventialMemory must have WB,SR,SW when supplied.
-//When allocating from ConventialMemory always make it WB,SR,SW
-//When returning to ConventialMemory always make it WB,SR,SW
-//When getting the memory map, or on RT for runtime types
-
-
-typedef enum {
- EfiReservedMemoryType,
- EfiLoaderCode,
- EfiLoaderData,
- EfiBootServicesCode,
- EfiBootServicesData,
- EfiRuntimeServicesCode,
- EfiRuntimeServicesData,
- EfiConventionalMemory,
- EfiUnusableMemory,
- EfiACPIReclaimMemory,
- EfiACPIMemoryNVS,
- EfiMemoryMappedIO,
- EfiMemoryMappedIOPortSpace,
- EfiPalCode,
- EfiPersistentMemory,
- EfiMaxMemoryType
-} EFI_MEMORY_TYPE;
-
-// possible caching types for the memory range
-#define EFI_MEMORY_UC 0x0000000000000001
-#define EFI_MEMORY_WC 0x0000000000000002
-#define EFI_MEMORY_WT 0x0000000000000004
-#define EFI_MEMORY_WB 0x0000000000000008
-#define EFI_MEMORY_UCE 0x0000000000000010
-
-// physical memory protection on range
-#define EFI_MEMORY_WP 0x0000000000001000
-#define EFI_MEMORY_RP 0x0000000000002000
-#define EFI_MEMORY_XP 0x0000000000004000
-#define EFI_MEMORY_NV 0x0000000000008000
-#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000
-#define EFI_MEMORY_RO 0x0000000000020000
-
-// range requires a runtime mapping
-#define EFI_MEMORY_RUNTIME 0x8000000000000000
-
-#define EFI_MEMORY_DESCRIPTOR_VERSION 1
-typedef struct {
- UINT32 Type; // Field size is 32 bits followed by 32 bit pad
- UINT32 Pad;
- EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is 64 bits
- EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is 64 bits
- UINT64 NumberOfPages; // Field size is 64 bits
- UINT64 Attribute; // Field size is 64 bits
-} EFI_MEMORY_DESCRIPTOR;
-
-//
-// International Language
-//
-
-typedef UINT8 ISO_639_2;
-#define ISO_639_2_ENTRY_SIZE 3
-
-//
-//
-//
-
-#define EFI_PAGE_SIZE 4096
-#define EFI_PAGE_MASK 0xFFF
-#define EFI_PAGE_SHIFT 12
-
-#define EFI_SIZE_TO_PAGES(a) \
- ( ((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0) )
-
-#endif
diff --git a/stand/efi/include/efidevp.h b/stand/efi/include/efidevp.h
deleted file mode 100644
--- a/stand/efi/include/efidevp.h
+++ /dev/null
@@ -1,510 +0,0 @@
-#ifndef _DEVPATH_H
-#define _DEVPATH_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- devpath.h
-
-Abstract:
-
- Defines for parsing the EFI Device Path structures
-
-
-
-Revision History
-
---*/
-
-//
-// Device Path structures - Section C
-//
-
-#pragma pack(1)
-
-typedef struct _EFI_DEVICE_PATH {
- UINT8 Type;
- UINT8 SubType;
- UINT8 Length[2];
-} EFI_DEVICE_PATH;
-
-#define EFI_DP_TYPE_MASK 0x7F
-#define EFI_DP_TYPE_UNPACKED 0x80
-
-#define END_DEVICE_PATH_TYPE 0x7f
-
-#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
-#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
-#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH))
-
-
-#define DP_IS_END_TYPE(a)
-#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
-
-#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
-#define DevicePathSubType(a) ( (a)->SubType )
-#define DevicePathNodeLength(a) ((size_t)(((a)->Length[0]) | ((a)->Length[1] << 8)))
-#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
-#define IsDevicePathType(a, t) ( DevicePathType(a) == t )
-#define IsDevicePathEndType(a) IsDevicePathType(a, END_DEVICE_PATH_TYPE)
-#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
-#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
-#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
-
-
-#define SetDevicePathNodeLength(a,l) { \
- (a)->Length[0] = (UINT8) (l); \
- (a)->Length[1] = (UINT8) ((l) >> 8); \
- }
-
-#define SetDevicePathEndNode(a) { \
- (a)->Type = END_DEVICE_PATH_TYPE; \
- (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
- (a)->Length[0] = sizeof(EFI_DEVICE_PATH); \
- (a)->Length[1] = 0; \
- }
-
-/*
- *
- */
-#define HARDWARE_DEVICE_PATH 0x01
-
-#define HW_PCI_DP 0x01
-typedef struct _PCI_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT8 Function;
- UINT8 Device;
-} PCI_DEVICE_PATH;
-
-#define HW_PCCARD_DP 0x02
-typedef struct _PCCARD_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT8 FunctionNumber;
-} PCCARD_DEVICE_PATH;
-
-#define HW_MEMMAP_DP 0x03
-typedef struct _MEMMAP_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 MemoryType;
- EFI_PHYSICAL_ADDRESS StartingAddress;
- EFI_PHYSICAL_ADDRESS EndingAddress;
-} MEMMAP_DEVICE_PATH;
-
-#define HW_VENDOR_DP 0x04
-typedef struct _VENDOR_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- EFI_GUID Guid;
-} VENDOR_DEVICE_PATH;
-
-#define UNKNOWN_DEVICE_GUID \
- { 0xcf31fac5, 0xc24e, 0x11d2, {0x85, 0xf3, 0x0, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} }
-
-typedef struct _UKNOWN_DEVICE_VENDOR_DP {
- VENDOR_DEVICE_PATH DevicePath;
- UINT8 LegacyDriveLetter;
-} UNKNOWN_DEVICE_VENDOR_DEVICE_PATH;
-
-#define HW_CONTROLLER_DP 0x05
-typedef struct _CONTROLLER_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 Controller;
-} CONTROLLER_DEVICE_PATH;
-
-/*
- *
- */
-#define ACPI_DEVICE_PATH 0x02
-
-#define ACPI_DP 0x01
-typedef struct _ACPI_HID_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 HID;
- UINT32 UID;
-} ACPI_HID_DEVICE_PATH;
-
-#define ACPI_EXTENDED_DP 0x02
-typedef struct _ACPI_EXTENDED_HID_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 HID;
- UINT32 UID;
- UINT32 CID;
-} ACPI_EXTENDED_HID_DEVICE_PATH;
-
-#define ACPI_ADR_DP 0x03
-/* ACPI_ADR_DEVICE_PATH not defined */
-
-//
-// 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)
-/*
- *
- */
-#define MESSAGING_DEVICE_PATH 0x03
-
-#define MSG_ATAPI_DP 0x01
-typedef struct _ATAPI_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT8 PrimarySecondary;
- UINT8 SlaveMaster;
- UINT16 Lun;
-} ATAPI_DEVICE_PATH;
-
-#define MSG_SCSI_DP 0x02
-typedef struct _SCSI_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT16 Pun;
- UINT16 Lun;
-} SCSI_DEVICE_PATH;
-
-#define MSG_FIBRECHANNEL_DP 0x03
-typedef struct _FIBRECHANNEL_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 Reserved;
- UINT64 WWN;
- UINT64 Lun;
-} FIBRECHANNEL_DEVICE_PATH;
-
-#define MSG_1394_DP 0x04
-typedef struct _F1394_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 Reserved;
- UINT64 Guid;
-} F1394_DEVICE_PATH;
-
-#define MSG_USB_DP 0x05
-typedef struct _USB_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT8 ParentPortNumber;
- UINT8 InterfaceNumber;
-} USB_DEVICE_PATH;
-
-#define MSG_USB_CLASS_DP 0x0F
-typedef struct _USB_CLASS_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT16 VendorId;
- UINT16 ProductId;
- UINT8 DeviceClass;
- UINT8 DeviceSubClass;
- UINT8 DeviceProtocol;
-} USB_CLASS_DEVICE_PATH;
-
-#define MSG_I2O_DP 0x06
-typedef struct _I2O_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 Tid;
-} I2O_DEVICE_PATH;
-
-#define MSG_MAC_ADDR_DP 0x0b
-typedef struct _MAC_ADDR_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- EFI_MAC_ADDRESS MacAddress;
- UINT8 IfType;
-} MAC_ADDR_DEVICE_PATH;
-
-#define MSG_IPv4_DP 0x0c
-typedef struct _IPv4_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- EFI_IPv4_ADDRESS LocalIpAddress;
- EFI_IPv4_ADDRESS RemoteIpAddress;
- UINT16 LocalPort;
- UINT16 RemotePort;
- UINT16 Protocol;
- BOOLEAN StaticIpAddress;
- EFI_IPv4_ADDRESS GatewayIpAddress;
- EFI_IPv4_ADDRESS SubnetMask;
-} IPv4_DEVICE_PATH;
-
-#define MSG_IPv6_DP 0x0d
-typedef struct _IPv6_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- EFI_IPv6_ADDRESS LocalIpAddress;
- EFI_IPv6_ADDRESS RemoteIpAddress;
- UINT16 LocalPort;
- UINT16 RemotePort;
- UINT16 Protocol;
- BOOLEAN StaticIpAddress;
-} IPv6_DEVICE_PATH;
-
-#define MSG_INFINIBAND_DP 0x09
-typedef struct _INFINIBAND_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 ResourceFlags;
- UINT8 PortGid[16];
- UINT64 ServiceId;
- UINT64 TargetPortId;
- 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
-
-#define MSG_UART_DP 0x0e
-typedef struct _UART_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 Reserved;
- UINT64 BaudRate;
- UINT8 DataBits;
- UINT8 Parity;
- UINT8 StopBits;
-} UART_DEVICE_PATH;
-
-#define MSG_VENDOR_DP 0x0A
-/* Use VENDOR_DEVICE_PATH struct */
-
-#define DEVICE_PATH_MESSAGING_PC_ANSI \
- { 0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define DEVICE_PATH_MESSAGING_VT_100 \
- { 0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
- { 0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43} }
-
-#define DEVICE_PATH_MESSAGING_VT_UTF8 \
- { 0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88} }
-
-/* Device Logical Unit SubType. */
-#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
-typedef struct {
- EFI_DEVICE_PATH Header;
- /* Logical Unit Number for the interface. */
- UINT8 Lun;
-} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
-
-#define MSG_SATA_DP 0x12
-typedef struct _SATA_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT16 HBAPortNumber;
- UINT16 PortMultiplierPortNumber;
- UINT16 Lun;
-} SATA_DEVICE_PATH;
-
-
-/* DNS Device Path SubType */
-#define MSG_DNS_DP 0x1F
-typedef struct {
- EFI_DEVICE_PATH Header;
- /* Indicates the DNS server address is IPv4 or IPv6 address. */
- UINT8 IsIPv6;
- /* Instance of the DNS server address. */
- /* XXX: actually EFI_IP_ADDRESS */
- EFI_IPv4_ADDRESS DnsServerIp[];
-} DNS_DEVICE_PATH;
-
-/* Uniform Resource Identifiers (URI) Device Path SubType */
-#define MSG_URI_DP 0x18
-typedef struct {
- EFI_DEVICE_PATH Header;
- /* Instance of the URI pursuant to RFC 3986. */
- CHAR8 Uri[];
-} URI_DEVICE_PATH;
-
-#define MEDIA_DEVICE_PATH 0x04
-
-#define MEDIA_HARDDRIVE_DP 0x01
-typedef struct _HARDDRIVE_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 PartitionNumber;
- UINT64 PartitionStart;
- UINT64 PartitionSize;
- UINT8 Signature[16];
- UINT8 MBRType;
- UINT8 SignatureType;
-} HARDDRIVE_DEVICE_PATH;
-
-#define MBR_TYPE_PCAT 0x01
-#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
-
-#define SIGNATURE_TYPE_MBR 0x01
-#define SIGNATURE_TYPE_GUID 0x02
-
-#define MEDIA_CDROM_DP 0x02
-typedef struct _CDROM_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT32 BootEntry;
- UINT64 PartitionStart;
- UINT64 PartitionSize;
-} CDROM_DEVICE_PATH;
-
-#define MEDIA_VENDOR_DP 0x03
-/* Use VENDOR_DEVICE_PATH struct */
-
-#define MEDIA_FILEPATH_DP 0x04
-typedef struct _FILEPATH_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- CHAR16 PathName[1];
-} FILEPATH_DEVICE_PATH;
-
-#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
-
-#define MEDIA_PROTOCOL_DP 0x05
-typedef struct _MEDIA_PROTOCOL_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- EFI_GUID Protocol;
-} MEDIA_PROTOCOL_DEVICE_PATH;
-
-
-#define BBS_DEVICE_PATH 0x05
-#define BBS_BBS_DP 0x01
-typedef struct _BBS_BBS_DEVICE_PATH {
- EFI_DEVICE_PATH Header;
- UINT16 DeviceType;
- UINT16 StatusFlag;
- 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_DEV 0x80
-#define BBS_TYPE_UNKNOWN 0xFF
-
-typedef union {
- EFI_DEVICE_PATH DevPath;
- PCI_DEVICE_PATH Pci;
- PCCARD_DEVICE_PATH PcCard;
- MEMMAP_DEVICE_PATH MemMap;
- VENDOR_DEVICE_PATH Vendor;
- UNKNOWN_DEVICE_VENDOR_DEVICE_PATH UnknownVendor;
- CONTROLLER_DEVICE_PATH Controller;
- ACPI_HID_DEVICE_PATH Acpi;
-
- ATAPI_DEVICE_PATH Atapi;
- SCSI_DEVICE_PATH Scsi;
- FIBRECHANNEL_DEVICE_PATH FibreChannel;
-
- F1394_DEVICE_PATH F1394;
- USB_DEVICE_PATH Usb;
- USB_CLASS_DEVICE_PATH UsbClass;
- I2O_DEVICE_PATH I2O;
- MAC_ADDR_DEVICE_PATH MacAddr;
- IPv4_DEVICE_PATH Ipv4;
- IPv6_DEVICE_PATH Ipv6;
- INFINIBAND_DEVICE_PATH InfiniBand;
- UART_DEVICE_PATH Uart;
-
- HARDDRIVE_DEVICE_PATH HardDrive;
- CDROM_DEVICE_PATH CD;
-
- FILEPATH_DEVICE_PATH FilePath;
- MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
-
- BBS_BBS_DEVICE_PATH Bbs;
-
-} EFI_DEV_PATH;
-
-typedef union {
- EFI_DEVICE_PATH *DevPath;
- PCI_DEVICE_PATH *Pci;
- PCCARD_DEVICE_PATH *PcCard;
- MEMMAP_DEVICE_PATH *MemMap;
- VENDOR_DEVICE_PATH *Vendor;
- UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
- CONTROLLER_DEVICE_PATH *Controller;
- ACPI_HID_DEVICE_PATH *Acpi;
- ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
-
- ATAPI_DEVICE_PATH *Atapi;
- SCSI_DEVICE_PATH *Scsi;
- FIBRECHANNEL_DEVICE_PATH *FibreChannel;
-
- F1394_DEVICE_PATH *F1394;
- USB_DEVICE_PATH *Usb;
- USB_CLASS_DEVICE_PATH *UsbClass;
- I2O_DEVICE_PATH *I2O;
- MAC_ADDR_DEVICE_PATH *MacAddr;
- IPv4_DEVICE_PATH *Ipv4;
- IPv6_DEVICE_PATH *Ipv6;
- INFINIBAND_DEVICE_PATH *InfiniBand;
- UART_DEVICE_PATH *Uart;
-
- HARDDRIVE_DEVICE_PATH *HardDrive;
-
- FILEPATH_DEVICE_PATH *FilePath;
- MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
-
- CDROM_DEVICE_PATH *CD;
- BBS_BBS_DEVICE_PATH *Bbs;
-
-} EFI_DEV_PATH_PTR;
-
-#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
- { 0xbc62157e, 0x3e33, 0x4fec, { 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } }
-
-#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
- { 0x8b843e20, 0x8132, 0x4852, { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } }
-
-#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
- { 0x05c99a21, 0xc70f, 0x4ad2, { 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } }
-
-INTERFACE_DECL(_EFI_DEVICE_PATH_PROTOCOL);
-
-typedef
-CHAR16*
-(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
- IN struct _EFI_DEVICE_PATH *This,
- IN BOOLEAN DisplayOnly,
- IN BOOLEAN AllowShortCuts
- );
-
-typedef
-CHAR16*
-(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
- IN struct _EFI_DEVICE_PATH *This,
- IN BOOLEAN DisplayOnly,
- IN BOOLEAN AllowShortCuts
- );
-
-typedef struct _EFI_DEVICE_PATH_TO_TEXT_PROTOCOL {
- EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
- EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
-} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
-
-typedef
-struct _EFI_DEVICE_PATH*
-(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
- IN CONST CHAR16* TextDeviceNode
- );
-typedef
-struct _EFI_DEVICE_PATH*
-(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
- IN CONST CHAR16* TextDevicePath
- );
-
-
-typedef struct _EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL {
- EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
- EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
-} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
-
-#pragma pack()
-
-#endif
diff --git a/stand/efi/include/efifpswa.h b/stand/efi/include/efifpswa.h
deleted file mode 100644
--- a/stand/efi/include/efifpswa.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _EFI_FPSWA_H
-#define _EFI_FPSWA_H
-
-/*
- * EFI FP SWA Driver (Floating Point Software Assist)
- */
-
-#define EFI_INTEL_FPSWA \
- { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-INTERFACE_DECL(_FPSWA_INTERFACE);
-
-typedef struct _FPSWA_RET {
- UINT64 status;
- UINT64 err1;
- UINT64 err2;
- UINT64 err3;
-} FPSWA_RET;
-
-typedef
-FPSWA_RET
-(EFIAPI *EFI_FPSWA) (
- IN UINTN TrapType,
- IN OUT VOID *Bundle,
- IN OUT UINT64 *pipsr,
- IN OUT UINT64 *pfsr,
- IN OUT UINT64 *pisr,
- IN OUT UINT64 *ppreds,
- IN OUT UINT64 *pifs,
- IN OUT VOID *fp_state
- );
-
-typedef struct _FPSWA_INTERFACE {
- UINT32 Revision;
- UINT32 Reserved;
- EFI_FPSWA Fpswa;
-} FPSWA_INTERFACE;
-
-#endif
diff --git a/stand/efi/include/efifs.h b/stand/efi/include/efifs.h
deleted file mode 100644
--- a/stand/efi/include/efifs.h
+++ /dev/null
@@ -1,122 +0,0 @@
-#ifndef _EFI_FS_H
-#define _EFI_FS_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efifs.h
-
-Abstract:
-
- EFI File System structures
-
-
-
-Revision History
-
---*/
-
-
-//
-// EFI Partition header (normally starts in LBA 1)
-//
-
-#define EFI_PARTITION_SIGNATURE 0x5053595320494249
-#define EFI_PARTITION_REVISION 0x00010001
-#define MIN_EFI_PARTITION_BLOCK_SIZE 512
-#define EFI_PARTITION_LBA 1
-
-typedef struct _EFI_PARTITION_HEADER {
- EFI_TABLE_HEADER Hdr;
- UINT32 DirectoryAllocationNumber;
- UINT32 BlockSize;
- EFI_LBA FirstUsableLba;
- EFI_LBA LastUsableLba;
- EFI_LBA UnusableSpace;
- EFI_LBA FreeSpace;
- EFI_LBA RootFile;
- EFI_LBA SecutiryFile;
-} EFI_PARTITION_HEADER;
-
-
-//
-// File header
-//
-
-#define EFI_FILE_HEADER_SIGNATURE 0x454c494620494249
-#define EFI_FILE_HEADER_REVISION 0x00010000
-#define EFI_FILE_STRING_SIZE 260
-
-typedef struct _EFI_FILE_HEADER {
- EFI_TABLE_HEADER Hdr;
- UINT32 Class;
- UINT32 LBALOffset;
- EFI_LBA Parent;
- UINT64 FileSize;
- UINT64 FileAttributes;
- EFI_TIME FileCreateTime;
- EFI_TIME FileModificationTime;
- EFI_GUID VendorGuid;
- CHAR16 FileString[EFI_FILE_STRING_SIZE];
-} EFI_FILE_HEADER;
-
-
-//
-// Return the file's first LBAL which is in the same
-// logical block as the file header
-//
-
-#define EFI_FILE_LBAL(a) ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
-
-#define EFI_FILE_CLASS_FREE_SPACE 1
-#define EFI_FILE_CLASS_EMPTY 2
-#define EFI_FILE_CLASS_NORMAL 3
-
-
-//
-// Logical Block Address List - the fundemental block
-// description structure
-//
-
-#define EFI_LBAL_SIGNATURE 0x4c41424c20494249
-#define EFI_LBAL_REVISION 0x00010000
-
-typedef struct _EFI_LBAL {
- EFI_TABLE_HEADER Hdr;
- UINT32 Class;
- EFI_LBA Parent;
- EFI_LBA Next;
- UINT32 ArraySize;
- UINT32 ArrayCount;
-} EFI_LBAL;
-
-// Array size
-#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
- (((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
-
-//
-// Logical Block run-length
-//
-
-typedef struct {
- EFI_LBA Start;
- UINT64 Length;
-} EFI_RL;
-
-//
-// Return the run-length structure from an LBAL header
-//
-
-#define EFI_LBAL_RL(a) ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))
-
-#endif
diff --git a/stand/efi/include/efigop.h b/stand/efi/include/efigop.h
deleted file mode 100644
--- a/stand/efi/include/efigop.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efigop.h
-
-Abstract:
- Info about framebuffers
-
-
-
-
-Revision History
-
---*/
-
-#ifndef _EFIGOP_H
-#define _EFIGOP_H
-
-#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
- { 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a} }
-
-INTERFACE_DECL(_EFI_GRAPHICS_OUTPUT);
-
-typedef struct {
- UINT32 RedMask;
- UINT32 GreenMask;
- UINT32 BlueMask;
- UINT32 ReservedMask;
-} EFI_PIXEL_BITMASK;
-
-typedef enum {
- PixelRedGreenBlueReserved8BitPerColor,
- PixelBlueGreenRedReserved8BitPerColor,
- PixelBitMask,
- PixelBltOnly,
- PixelFormatMax,
-} EFI_GRAPHICS_PIXEL_FORMAT;
-
-typedef struct {
- UINT32 Version;
- UINT32 HorizontalResolution;
- UINT32 VerticalResolution;
- EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
- EFI_PIXEL_BITMASK PixelInformation;
- UINT32 PixelsPerScanLine;
-} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
-
-typedef struct {
- UINT32 MaxMode;
- UINT32 Mode;
- EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
- UINTN SizeOfInfo;
- EFI_PHYSICAL_ADDRESS FrameBufferBase;
- UINTN FrameBufferSize;
-} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
- IN struct _EFI_GRAPHICS_OUTPUT *This,
- IN UINT32 ModeNumber,
- OUT UINTN *SizeOfInfo,
- OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
- IN struct _EFI_GRAPHICS_OUTPUT *This,
- IN UINT32 ModeNumber
- );
-
-typedef struct {
- UINT8 Blue;
- UINT8 Green;
- UINT8 Red;
- UINT8 Reserved;
-} EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
-
-typedef enum {
- EfiBltVideoFill,
- EfiBltVideoToBltBuffer,
- EfiBltBufferToVideo,
- EfiBltVideoToVideo,
- EfiGraphcisOutputBltOperationMax,
-} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
- IN struct _EFI_GRAPHICS_OUTPUT *This,
- IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,
- 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
- );
-
-typedef struct _EFI_GRAPHICS_OUTPUT {
- EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode;
- EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode;
- EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt;
- EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
-} EFI_GRAPHICS_OUTPUT;
-
-#endif /* _EFIGOP_H */
diff --git a/stand/efi/include/efiip.h b/stand/efi/include/efiip.h
deleted file mode 100644
--- a/stand/efi/include/efiip.h
+++ /dev/null
@@ -1,459 +0,0 @@
-#ifndef _EFI_IP_H
-#define _EFI_IP_H
-
-/*++
-Copyright (c) 2013 Intel Corporation
-
---*/
-
-#define EFI_IP4_SERVICE_BINDING_PROTOCOL \
- {0xc51711e7,0xb4bf,0x404a,{0xbf,0xb8,0x0a,0x04, 0x8e,0xf1,0xff,0xe4}}
-
-#define EFI_IP4_PROTOCOL \
- {0x41d94cd2,0x35b6,0x455a,{0x82,0x58,0xd4,0xe5,0x13,0x34,0xaa,0xdd}}
-
-#define EFI_IP6_SERVICE_BINDING_PROTOCOL \
- {0xec835dd3,0xfe0f,0x617b,{0xa6,0x21,0xb3,0x50,0xc3,0xe1,0x33,0x88}}
-
-#define EFI_IP6_PROTOCOL \
- {0x2c8759d5,0x5c2d,0x66ef,{0x92,0x5f,0xb6,0x6c,0x10,0x19,0x57,0xe2}}
-
-INTERFACE_DECL(_EFI_IP4);
-INTERFACE_DECL(_EFI_IP6);
-
-typedef struct {
- EFI_HANDLE InstanceHandle;
- EFI_IPv4_ADDRESS Ip4Address;
- EFI_IPv4_ADDRESS SubnetMask;
-} EFI_IP4_ADDRESS_PAIR;
-
-typedef struct {
- EFI_HANDLE DriverHandle;
- UINT32 AddressCount;
- EFI_IP4_ADDRESS_PAIR AddressPairs[1];
-} EFI_IP4_VARIABLE_DATA;
-
-typedef struct {
- UINT8 DefaultProtocol;
- BOOLEAN AcceptAnyProtocol;
- BOOLEAN AcceptIcmpErrors;
- BOOLEAN AcceptBroadcast;
- BOOLEAN AcceptPromiscuous;
- BOOLEAN UseDefaultAddress;
- EFI_IPv4_ADDRESS StationAddress;
- EFI_IPv4_ADDRESS SubnetMask;
- UINT8 TypeOfService;
- UINT8 TimeToLive;
- BOOLEAN DoNotFragment;
- BOOLEAN RawData;
- UINT32 ReceiveTimeout;
- 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 {
- BOOLEAN IsStarted;
- UINT32 MaxPacketSize;
- EFI_IP4_CONFIG_DATA ConfigData;
- BOOLEAN IsConfigured;
- UINT32 GroupCount;
- EFI_IPv4_ADDRESS *GroupTable;
- UINT32 RouteCount;
- EFI_IP4_ROUTE_TABLE *RouteTable;
- UINT32 IcmpTypeCount;
- EFI_IP4_ICMP_TYPE *IcmpTypeList;
-} EFI_IP4_MODE_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_GET_MODE_DATA) (
- IN struct _EFI_IP4 *This,
- OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
- OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
- OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CONFIGURE) (
- IN struct _EFI_IP4 *This,
- IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_GROUPS) (
- IN struct _EFI_IP4 *This,
- IN BOOLEAN JoinFlag,
- IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_ROUTES) (
- IN struct _EFI_IP4 *This,
- IN BOOLEAN DeleteRoute,
- IN EFI_IPv4_ADDRESS *SubnetAddress,
- IN EFI_IPv4_ADDRESS *SubnetMask,
- IN EFI_IPv4_ADDRESS *GatewayAddress
- );
-
-#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;
- UINT32 OptionsLength;
- VOID *OptionsBuffer;
- UINT32 TotalDataLength;
- UINT32 FragmentCount;
- EFI_IP4_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP4_TRANSMIT_DATA;
-
-typedef struct {
- EFI_EVENT Event;
- EFI_STATUS Status;
- union {
- EFI_IP4_RECEIVE_DATA *RxData;
- EFI_IP4_TRANSMIT_DATA *TxData;
- } Packet;
-} EFI_IP4_COMPLETION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_TRANSMIT) (
- IN struct _EFI_IP4 *This,
- IN EFI_IP4_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_RECEIVE) (
- IN struct _EFI_IP4 *This,
- IN EFI_IP4_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CANCEL)(
- IN struct _EFI_IP4 *This,
- IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_POLL) (
- IN struct _EFI_IP4 *This
- );
-
-typedef struct _EFI_IP4 {
- EFI_IP4_GET_MODE_DATA GetModeData;
- EFI_IP4_CONFIGURE Configure;
- EFI_IP4_GROUPS Groups;
- EFI_IP4_ROUTES Routes;
- EFI_IP4_TRANSMIT Transmit;
- EFI_IP4_RECEIVE Receive;
- EFI_IP4_CANCEL Cancel;
- EFI_IP4_POLL Poll;
-} EFI_IP4;
-
-typedef struct {
- UINT8 DefaultProtocol;
- BOOLEAN AcceptAnyProtocol;
- BOOLEAN AcceptIcmpErrors;
- BOOLEAN AcceptPromiscuous;
- EFI_IPv6_ADDRESS DestinationAddress;
- EFI_IPv6_ADDRESS StationAddress;
- UINT8 TrafficClass;
- UINT8 HopLimit;
- UINT32 FlowLabel;
- UINT32 ReceiveTimeout;
- UINT32 TransmitTimeout;
-} EFI_IP6_CONFIG_DATA;
-
-typedef struct {
- EFI_IPv6_ADDRESS Address;
- UINT8 PrefixLength;
-} EFI_IP6_ADDRESS_INFO;
-
-typedef struct {
- EFI_IPv6_ADDRESS Gateway;
- EFI_IPv6_ADDRESS Destination;
- UINT8 PrefixLength;
-} EFI_IP6_ROUTE_TABLE;
-
-typedef enum {
- EfiNeighborInComplete,
- EfiNeighborReachable,
- EfiNeighborStale,
- EfiNeighborDelay,
- EfiNeighborProbe
-} EFI_IP6_NEIGHBOR_STATE;
-
-typedef struct {
- EFI_IPv6_ADDRESS Neighbor;
- EFI_MAC_ADDRESS LinkAddress;
- EFI_IP6_NEIGHBOR_STATE State;
-} EFI_IP6_NEIGHBOR_CACHE;
-
-typedef struct {
- UINT8 Type;
- UINT8 Code;
-} EFI_IP6_ICMP_TYPE;
-
-//***********************************************************
-// ICMPv6 type definitions for error messages
-//***********************************************************
-#define ICMP_V6_DEST_UNREACHABLE 0x1
-#define ICMP_V6_PACKET_TOO_BIG 0x2
-#define ICMP_V6_TIME_EXCEEDED 0x3
-#define ICMP_V6_PARAMETER_PROBLEM 0x4
-
-//***********************************************************
-// ICMPv6 type definition for informational messages
-//***********************************************************
-#define ICMP_V6_ECHO_REQUEST 0x80
-#define ICMP_V6_ECHO_REPLY 0x81
-#define ICMP_V6_LISTENER_QUERY 0x82
-#define ICMP_V6_LISTENER_REPORT 0x83
-#define ICMP_V6_LISTENER_DONE 0x84
-#define ICMP_V6_ROUTER_SOLICIT 0x85
-#define ICMP_V6_ROUTER_ADVERTISE 0x86
-#define ICMP_V6_NEIGHBOR_SOLICIT 0x87
-#define ICMP_V6_NEIGHBOR_ADVERTISE 0x88
-#define ICMP_V6_REDIRECT 0x89
-#define ICMP_V6_LISTENER_REPORT_2 0x8F
-
-//***********************************************************
-// ICMPv6 code definitions for ICMP_V6_DEST_UNREACHABLE
-//***********************************************************
-#define ICMP_V6_NO_ROUTE_TO_DEST 0x0
-#define ICMP_V6_COMM_PROHIBITED 0x1
-#define ICMP_V6_BEYOND_SCOPE 0x2
-#define ICMP_V6_ADDR_UNREACHABLE 0x3
-#define ICMP_V6_PORT_UNREACHABLE 0x4
-#define ICMP_V6_SOURCE_ADDR_FAILED 0x5
-#define ICMP_V6_ROUTE_REJECTED 0x6
-
-//***********************************************************
-// ICMPv6 code definitions for ICMP_V6_TIME_EXCEEDED
-//***********************************************************
-#define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0
-#define ICMP_V6_TIMEOUT_REASSEMBLE 0x1
-
-//***********************************************************
-// ICMPv6 code definitions for ICMP_V6_PARAMETER_PROBLEM
-//***********************************************************
-#define ICMP_V6_ERRONEOUS_HEADER 0x0
-#define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1
-#define ICMP_V6_UNRECOGNIZE_OPTION 0x2
-
-typedef struct {
- BOOLEAN IsStarted;
- UINT32 MaxPacketSize;
- EFI_IP6_CONFIG_DATA ConfigData;
- BOOLEAN IsConfigured;
- UINT32 AddressCount;
- EFI_IP6_ADDRESS_INFO *AddressList;
- UINT32 GroupCount;
- EFI_IPv6_ADDRESS *GroupTable;
- UINT32 RouteCount;
- EFI_IP6_ROUTE_TABLE *RouteTable;
- UINT32 NeighborCount;
- EFI_IP6_NEIGHBOR_CACHE *NeighborCache;
- UINT32 PrefixCount;
- EFI_IP6_ADDRESS_INFO *PrefixTable;
- UINT32 IcmpTypeCount;
- EFI_IP6_ICMP_TYPE *IcmpTypeList;
-} EFI_IP6_MODE_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_GET_MODE_DATA) (
- IN struct _EFI_IP6 *This,
- OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,
- OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
- OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_CONFIGURE) (
- IN struct _EFI_IP6 *This,
- IN EFI_IP6_CONFIG_DATA *Ip6ConfigData OPTIONAL
- );
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_GROUPS) (
- IN struct _EFI_IP6 *This,
- IN BOOLEAN JoinFlag,
- IN EFI_IPv6_ADDRESS *GroupAddress OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_ROUTES) (
- IN struct _EFI_IP6 *This,
- IN BOOLEAN DeleteRoute,
- IN EFI_IPv6_ADDRESS *Destination OPTIONAL,
- IN UINT8 PrefixLength,
- IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_NEIGHBORS) (
- IN struct _EFI_IP6 *This,
- IN BOOLEAN DeleteFlag,
- IN EFI_IPv6_ADDRESS *TargetIp6Address,
- IN EFI_MAC_ADDRESS *TargetLinkAddress OPTIONAL,
- IN UINT32 Timeout,
- IN BOOLEAN Override
- );
-
-typedef struct _EFI_IP6_FRAGMENT_DATA {
- UINT32 FragmentLength;
- VOID *FragmentBuffer;
-} EFI_IP6_FRAGMENT_DATA;
-
-typedef struct _EFI_IP6_OVERRIDE_DATA {
- UINT8 Protocol;
- UINT8 HopLimit;
- UINT32 FlowLabel;
-} EFI_IP6_OVERRIDE_DATA;
-
-typedef struct _EFI_IP6_TRANSMIT_DATA {
- EFI_IPv6_ADDRESS DestinationAddress;
- EFI_IP6_OVERRIDE_DATA *OverrideData;
- UINT32 ExtHdrsLength;
- VOID *ExtHdrs;
- UINT8 NextHeader;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_IP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP6_TRANSMIT_DATA;
-
-#pragma pack(1)
-typedef struct _EFI_IP6_HEADER {
- UINT8 TrafficClassH:4;
- UINT8 Version:4;
- UINT8 FlowLabelH:4;
- UINT8 TrafficClassL:4;
- UINT16 FlowLabelL;
- UINT16 PayloadLength;
- UINT8 NextHeader;
- UINT8 HopLimit;
- EFI_IPv6_ADDRESS SourceAddress;
- EFI_IPv6_ADDRESS DestinationAddress;
-} EFI_IP6_HEADER;
-#pragma pack()
-
-typedef struct _EFI_IP6_RECEIVE_DATA {
- EFI_TIME TimeStamp;
- EFI_EVENT RecycleSignal;
- UINT32 HeaderLength;
- EFI_IP6_HEADER *Header;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_IP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP6_RECEIVE_DATA;
-
-typedef struct {
- EFI_EVENT Event;
- EFI_STATUS Status;
- union {
- EFI_IP6_RECEIVE_DATA *RxData;
- EFI_IP6_TRANSMIT_DATA *TxData;
- } Packet;
-} EFI_IP6_COMPLETION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_TRANSMIT) (
- IN struct _EFI_IP6 *This,
- IN EFI_IP6_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_RECEIVE) (
- IN struct _EFI_IP6 *This,
- IN EFI_IP6_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_CANCEL)(
- IN struct _EFI_IP6 *This,
- IN EFI_IP6_COMPLETION_TOKEN *Token OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_POLL) (
- IN struct _EFI_IP6 *This
- );
-
-typedef struct _EFI_IP6 {
- EFI_IP6_GET_MODE_DATA GetModeData;
- EFI_IP6_CONFIGURE Configure;
- EFI_IP6_GROUPS Groups;
- EFI_IP6_ROUTES Routes;
- EFI_IP6_NEIGHBORS Neighbors;
- EFI_IP6_TRANSMIT Transmit;
- EFI_IP6_RECEIVE Receive;
- EFI_IP6_CANCEL Cancel;
- EFI_IP6_POLL Poll;
-} EFI_IP6;
-
-#endif /* _EFI_IP_H */
diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h
--- a/stand/efi/include/efilib.h
+++ b/stand/efi/include/efilib.h
@@ -32,6 +32,8 @@
#include <stdbool.h>
#include <sys/queue.h>
+#include <Protocol/BlockIo.h>
+
extern EFI_HANDLE IH;
extern EFI_SYSTEM_TABLE *ST;
extern EFI_BOOT_SERVICES *BS;
@@ -119,7 +121,7 @@
EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab);
EFI_STATUS main(int argc, CHAR16 *argv[]);
-void efi_exit(EFI_STATUS status) __dead2;
+void efi_exit(EFI_STATUS status);
/* EFI environment initialization. */
void efi_init_environment(void);
diff --git a/stand/efi/include/efinet.h b/stand/efi/include/efinet.h
deleted file mode 100644
--- a/stand/efi/include/efinet.h
+++ /dev/null
@@ -1,347 +0,0 @@
-#ifndef _EFINET_H
-#define _EFINET_H
-
-
-/*++
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
- efinet.h
-
-Abstract:
- EFI Simple Network protocol
-
-Revision History
---*/
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Simple Network Protocol
-//
-
-#define EFI_SIMPLE_NETWORK_PROTOCOL \
- { 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-
-INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-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;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-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 {
- UINT32 State;
- UINT32 HwAddressSize;
- UINT32 MediaHeaderSize;
- UINT32 MaxPacketSize;
- UINT32 NvRamSize;
- UINT32 NvRamAccessSize;
- UINT32 ReceiveFilterMask;
- UINT32 ReceiveFilterSetting;
- UINT32 MaxMCastFilterCount;
- UINT32 MCastFilterCount;
- EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
- EFI_MAC_ADDRESS CurrentAddress;
- EFI_MAC_ADDRESS BroadcastAddress;
- EFI_MAC_ADDRESS PermanentAddress;
- UINT8 IfType;
- BOOLEAN MacAddressChangeable;
- BOOLEAN MultipleTxSupported;
- BOOLEAN MediaPresentSupported;
- BOOLEAN MediaPresent;
-} EFI_SIMPLE_NETWORK_MODE;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_START) (
- IN struct _EFI_SIMPLE_NETWORK *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
- IN struct _EFI_SIMPLE_NETWORK *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN UINTN ExtraRxBufferSize OPTIONAL,
- IN UINTN ExtraTxBufferSize OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN ExtendedVerification
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
- IN struct _EFI_SIMPLE_NETWORK *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN UINT32 Enable,
- IN UINT32 Disable,
- IN BOOLEAN ResetMCastFilter,
- IN UINTN MCastFilterCnt OPTIONAL,
- IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN Reset,
- IN EFI_MAC_ADDRESS *New OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN Reset,
- IN OUT UINTN *StatisticsSize OPTIONAL,
- OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN IPv6,
- IN EFI_IP_ADDRESS *IP,
- OUT EFI_MAC_ADDRESS *MAC
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- IN BOOLEAN ReadWrite,
- IN UINTN Offset,
- IN UINTN BufferSize,
- IN OUT VOID *Buffer
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
- IN struct _EFI_SIMPLE_NETWORK *This,
- OUT UINT32 *InterruptStatus OPTIONAL,
- OUT VOID **TxBuf OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
- IN struct _EFI_SIMPLE_NETWORK *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
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
- IN struct _EFI_SIMPLE_NETWORK *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_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_SIMPLE_NETWORK {
- 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;
- EFI_EVENT WaitForPacket;
- EFI_SIMPLE_NETWORK_MODE *Mode;
-} EFI_SIMPLE_NETWORK;
-
-#endif /* _EFINET_H */
diff --git a/stand/efi/include/efipart.h b/stand/efi/include/efipart.h
deleted file mode 100644
--- a/stand/efi/include/efipart.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _EFI_PART_H
-#define _EFI_PART_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efipart.h
-
-Abstract:
- Info about disk partitions and Master Boot Records
-
-
-
-
-Revision History
-
---*/
-
-//
-//
-//
-
-#define EFI_PARTITION 0xef
-#define MBR_SIZE 512
-
-#pragma pack(1)
-
-typedef struct {
- UINT8 BootIndicator;
- UINT8 StartHead;
- UINT8 StartSector;
- UINT8 StartTrack;
- UINT8 OSIndicator;
- UINT8 EndHead;
- UINT8 EndSector;
- UINT8 EndTrack;
- UINT8 StartingLBA[4];
- UINT8 SizeInLBA[4];
-} MBR_PARTITION_RECORD;
-
-#define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
-
-#define MBR_SIGNATURE 0xaa55
-#define MIN_MBR_DEVICE_SIZE 0x80000
-#define MBR_ERRATA_PAD 0x40000 // 128 MB
-
-#define MAX_MBR_PARTITIONS 4
-typedef struct {
- UINT8 BootStrapCode[440];
- UINT8 UniqueMbrSignature[4];
- UINT8 Unknown[2];
- MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];
- UINT16 Signature;
-} MASTER_BOOT_RECORD;
-#pragma pack()
-
-
-#endif
diff --git a/stand/efi/include/efipoint.h b/stand/efi/include/efipoint.h
deleted file mode 100644
--- a/stand/efi/include/efipoint.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 2014 by John Cronin
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
-
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
-
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef _EFI_POINT_H
-#define _EFI_POINT_H
-
-#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
- { 0x31878c87, 0xb75, 0x11d5, { 0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
-
-INTERFACE_DECL(_EFI_SIMPLE_POINTER);
-
-typedef struct {
- INT32 RelativeMovementX;
- INT32 RelativeMovementY;
- INT32 RelativeMovementZ;
- BOOLEAN LeftButton;
- BOOLEAN RightButton;
-} EFI_SIMPLE_POINTER_STATE;
-
-typedef struct {
- UINT64 ResolutionX;
- UINT64 ResolutionY;
- UINT64 ResolutionZ;
- BOOLEAN LeftButton;
- BOOLEAN RightButton;
-} EFI_SIMPLE_POINTER_MODE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_POINTER_RESET) (
- IN struct _EFI_SIMPLE_POINTER *This,
- IN BOOLEAN ExtendedVerification
-);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE) (
- IN struct _EFI_SIMPLE_POINTER *This,
- IN OUT EFI_SIMPLE_POINTER_STATE *State
-);
-
-typedef struct _EFI_SIMPLE_POINTER {
- EFI_SIMPLE_POINTER_RESET Reset;
- EFI_SIMPLE_POINTER_GET_STATE GetState;
- EFI_EVENT WaitForInput;
- EFI_SIMPLE_POINTER_MODE *Mode;
-} EFI_SIMPLE_POINTER_PROTOCOL;
-
-#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
- { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
-
-INTERFACE_DECL(_EFI_ABSOLUTE_POINTER_PROTOCOL);
-
-typedef struct {
- UINT64 AbsoluteMinX;
- UINT64 AbsoluteMinY;
- UINT64 AbsoluteMinZ;
- UINT64 AbsoluteMaxX;
- UINT64 AbsoluteMaxY;
- UINT64 AbsoluteMaxZ;
- UINT32 Attributes;
-} EFI_ABSOLUTE_POINTER_MODE;
-
-typedef struct {
- UINT64 CurrentX;
- UINT64 CurrentY;
- UINT64 CurrentZ;
- UINT32 ActiveButtons;
-} EFI_ABSOLUTE_POINTER_STATE;
-
-#define EFI_ABSP_SupportsAltActive 0x00000001
-#define EFI_ABSP_SupportsPressureAsZ 0x00000002
-#define EFI_ABSP_TouchActive 0x00000001
-#define EFI_ABS_AltActive 0x00000002
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (
- IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This,
- IN BOOLEAN ExtendedVerification
-);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (
- IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This,
- IN OUT EFI_ABSOLUTE_POINTER_STATE *State
-);
-
-typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
- EFI_ABSOLUTE_POINTER_RESET Reset;
- EFI_ABSOLUTE_POINTER_GET_STATE GetState;
- EFI_EVENT WaitForInput;
- EFI_ABSOLUTE_POINTER_MODE *Mode;
-} EFI_ABSOLUTE_POINTER_PROTOCOL;
-
-#endif
diff --git a/stand/efi/include/efiprot.h b/stand/efi/include/efiprot.h
deleted file mode 100644
--- a/stand/efi/include/efiprot.h
+++ /dev/null
@@ -1,662 +0,0 @@
-#ifndef _EFI_PROT_H
-#define _EFI_PROT_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efiprot.h
-
-Abstract:
-
- EFI Protocols
-
-
-
-Revision History
-
---*/
-
-#include <efidef.h>
-
-//
-// Device Path protocol
-//
-
-#define DEVICE_PATH_PROTOCOL \
- { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-
-//
-// Block IO protocol
-//
-
-#define BLOCK_IO_PROTOCOL \
- { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-#define EFI_BLOCK_IO_INTERFACE_REVISION 0x00010000
-
-INTERFACE_DECL(_EFI_BLOCK_IO);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_RESET) (
- IN struct _EFI_BLOCK_IO *This,
- IN BOOLEAN ExtendedVerification
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_READ) (
- IN struct _EFI_BLOCK_IO *This,
- IN UINT32 MediaId,
- IN EFI_LBA LBA,
- IN UINTN BufferSize,
- OUT VOID *Buffer
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_WRITE) (
- IN struct _EFI_BLOCK_IO *This,
- IN UINT32 MediaId,
- IN EFI_LBA LBA,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_FLUSH) (
- IN struct _EFI_BLOCK_IO *This
- );
-
-
-
-typedef struct {
- UINT32 MediaId;
- BOOLEAN RemovableMedia;
- BOOLEAN MediaPresent;
-
- BOOLEAN LogicalPartition;
- BOOLEAN ReadOnly;
- BOOLEAN WriteCaching;
-
- UINT32 BlockSize;
- UINT32 IoAlign;
-
- EFI_LBA LastBlock;
-} EFI_BLOCK_IO_MEDIA;
-
-typedef struct _EFI_BLOCK_IO {
- UINT64 Revision;
-
- EFI_BLOCK_IO_MEDIA *Media;
-
- EFI_BLOCK_RESET Reset;
- EFI_BLOCK_READ ReadBlocks;
- EFI_BLOCK_WRITE WriteBlocks;
- EFI_BLOCK_FLUSH FlushBlocks;
-
-} EFI_BLOCK_IO;
-
-
-
-//
-// Disk Block IO protocol
-//
-
-#define DISK_IO_PROTOCOL \
- { 0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-#define EFI_DISK_IO_INTERFACE_REVISION 0x00010000
-
-INTERFACE_DECL(_EFI_DISK_IO);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISK_READ) (
- IN struct _EFI_DISK_IO *This,
- IN UINT32 MediaId,
- IN UINT64 Offset,
- IN UINTN BufferSize,
- OUT VOID *Buffer
- );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISK_WRITE) (
- IN struct _EFI_DISK_IO *This,
- IN UINT32 MediaId,
- IN UINT64 Offset,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-
-typedef struct _EFI_DISK_IO {
- UINT64 Revision;
- EFI_DISK_READ ReadDisk;
- EFI_DISK_WRITE WriteDisk;
-} EFI_DISK_IO;
-
-
-//
-// Simple file system protocol
-//
-
-#define SIMPLE_FILE_SYSTEM_PROTOCOL \
- { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_FILE_IO_INTERFACE);
-INTERFACE_DECL(_EFI_FILE_HANDLE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_VOLUME_OPEN) (
- IN struct _EFI_FILE_IO_INTERFACE *This,
- OUT struct _EFI_FILE_HANDLE **Root
- );
-
-#define EFI_FILE_IO_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_FILE_IO_INTERFACE {
- UINT64 Revision;
- EFI_VOLUME_OPEN OpenVolume;
-} EFI_FILE_IO_INTERFACE;
-
-//
-//
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_OPEN) (
- IN struct _EFI_FILE_HANDLE *File,
- OUT struct _EFI_FILE_HANDLE **NewHandle,
- IN CHAR16 *FileName,
- IN UINT64 OpenMode,
- IN UINT64 Attributes
- );
-
-// Open modes
-#define EFI_FILE_MODE_READ 0x0000000000000001
-#define EFI_FILE_MODE_WRITE 0x0000000000000002
-#define EFI_FILE_MODE_CREATE 0x8000000000000000
-
-// File attributes
-#define EFI_FILE_READ_ONLY 0x0000000000000001
-#define EFI_FILE_HIDDEN 0x0000000000000002
-#define EFI_FILE_SYSTEM 0x0000000000000004
-#define EFI_FILE_RESERVIED 0x0000000000000008
-#define EFI_FILE_DIRECTORY 0x0000000000000010
-#define EFI_FILE_ARCHIVE 0x0000000000000020
-#define EFI_FILE_VALID_ATTR 0x0000000000000037
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_CLOSE) (
- IN struct _EFI_FILE_HANDLE *File
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_DELETE) (
- IN struct _EFI_FILE_HANDLE *File
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_READ) (
- IN struct _EFI_FILE_HANDLE *File,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_WRITE) (
- IN struct _EFI_FILE_HANDLE *File,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_SET_POSITION) (
- IN struct _EFI_FILE_HANDLE *File,
- IN UINT64 Position
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_GET_POSITION) (
- IN struct _EFI_FILE_HANDLE *File,
- OUT UINT64 *Position
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_GET_INFO) (
- IN struct _EFI_FILE_HANDLE *File,
- IN EFI_GUID *InformationType,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_SET_INFO) (
- IN struct _EFI_FILE_HANDLE *File,
- IN EFI_GUID *InformationType,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_FLUSH) (
- IN struct _EFI_FILE_HANDLE *File
- );
-
-
-
-#define EFI_FILE_HANDLE_REVISION 0x00010000
-typedef struct _EFI_FILE_HANDLE {
- 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, *EFI_FILE_HANDLE;
-
-
-//
-// File information types
-//
-
-#define EFI_FILE_INFO_ID \
- { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-typedef struct {
- UINT64 Size;
- UINT64 FileSize;
- UINT64 PhysicalSize;
- EFI_TIME CreateTime;
- EFI_TIME LastAccessTime;
- EFI_TIME ModificationTime;
- UINT64 Attribute;
- CHAR16 FileName[1];
-} EFI_FILE_INFO;
-
-//
-// The FileName field of the EFI_FILE_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
-// be the size of the data structure without the FileName field. The following macro
-// computes this size correctly no matter how big the FileName array is declared.
-// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
-//
-
-#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
-
-#define EFI_FILE_SYSTEM_INFO_ID \
- { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-typedef struct {
- UINT64 Size;
- BOOLEAN ReadOnly;
- UINT64 VolumeSize;
- UINT64 FreeSpace;
- UINT32 BlockSize;
- CHAR16 VolumeLabel[1];
-} EFI_FILE_SYSTEM_INFO;
-
-//
-// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
-// to be the size of the data structure without the VolumeLable field. The following macro
-// computes this size correctly no matter how big the VolumeLable array is declared.
-// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
-//
-
-#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
-
-#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID \
- { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-typedef struct {
- CHAR16 VolumeLabel[1];
-} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
-
-#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
-
-//
-// Load file protocol
-//
-
-
-#define LOAD_FILE_PROTOCOL \
- { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-INTERFACE_DECL(_EFI_LOAD_FILE_INTERFACE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOAD_FILE) (
- IN struct _EFI_LOAD_FILE_INTERFACE *This,
- IN EFI_DEVICE_PATH *FilePath,
- IN BOOLEAN BootPolicy,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer OPTIONAL
- );
-
-typedef struct _EFI_LOAD_FILE_INTERFACE {
- EFI_LOAD_FILE LoadFile;
-} EFI_LOAD_FILE_INTERFACE;
-
-
-//
-// Device IO protocol
-//
-
-#define DEVICE_IO_PROTOCOL \
- { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_DEVICE_IO_INTERFACE);
-
-typedef enum {
- IO_UINT8,
- IO_UINT16,
- IO_UINT32,
- IO_UINT64,
-//
-// Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
-//
- MMIO_COPY_UINT8,
- MMIO_COPY_UINT16,
- MMIO_COPY_UINT32,
- MMIO_COPY_UINT64
-} EFI_IO_WIDTH;
-
-#define EFI_PCI_ADDRESS(bus,dev,func,reg) \
- ( (UINT64) ( (((UINTN)bus) << 24) + (((UINTN)dev) << 16) + (((UINTN)func) << 8) + ((UINTN)reg) ))
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEVICE_IO) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN EFI_IO_WIDTH Width,
- IN UINT64 Address,
- IN UINTN Count,
- IN OUT VOID *Buffer
- );
-
-typedef struct {
- EFI_DEVICE_IO Read;
- EFI_DEVICE_IO Write;
-} EFI_IO_ACCESS;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_DEVICE_PATH) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN UINT64 Address,
- IN OUT EFI_DEVICE_PATH **PciDevicePath
- );
-
-typedef enum {
- EfiBusMasterRead,
- EfiBusMasterWrite,
- EfiBusMasterCommonBuffer
-} EFI_IO_OPERATION_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_MAP) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN EFI_IO_OPERATION_TYPE Operation,
- IN EFI_PHYSICAL_ADDRESS *HostAddress,
- IN OUT UINTN *NumberOfBytes,
- OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
- OUT VOID **Mapping
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_UNMAP) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN VOID *Mapping
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN EFI_ALLOCATE_TYPE Type,
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN Pages,
- IN OUT EFI_PHYSICAL_ADDRESS *HostAddress
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_FLUSH) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_FREE_BUFFER) (
- IN struct _EFI_DEVICE_IO_INTERFACE *This,
- IN UINTN Pages,
- IN EFI_PHYSICAL_ADDRESS HostAddress
- );
-
-typedef struct _EFI_DEVICE_IO_INTERFACE {
- EFI_IO_ACCESS Mem;
- EFI_IO_ACCESS Io;
- EFI_IO_ACCESS Pci;
- EFI_IO_MAP Map;
- EFI_PCI_DEVICE_PATH PciDevicePath;
- EFI_IO_UNMAP Unmap;
- EFI_IO_ALLOCATE_BUFFER AllocateBuffer;
- EFI_IO_FLUSH Flush;
- EFI_IO_FREE_BUFFER FreeBuffer;
-} EFI_DEVICE_IO_INTERFACE;
-
-
-//
-// Unicode Collation protocol
-//
-
-#define UNICODE_COLLATION_PROTOCOL \
- { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define UNICODE_BYTE_ORDER_MARK (CHAR16)(0xfeff)
-
-INTERFACE_DECL(_EFI_UNICODE_COLLATION_INTERFACE);
-
-typedef
-INTN
-(EFIAPI *EFI_UNICODE_COLLATION_STRICOLL) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *s1,
- IN CHAR16 *s2
- );
-
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_COLLATION_METAIMATCH) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *String,
- IN CHAR16 *Pattern
- );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_COLLATION_STRLWR) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN OUT CHAR16 *Str
- );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_COLLATION_STRUPR) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN OUT CHAR16 *Str
- );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_COLLATION_FATTOSTR) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN UINTN FatSize,
- IN CHAR8 *Fat,
- OUT CHAR16 *String
- );
-
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_COLLATION_STRTOFAT) (
- IN struct _EFI_UNICODE_COLLATION_INTERFACE *This,
- IN CHAR16 *String,
- IN UINTN FatSize,
- OUT CHAR8 *Fat
- );
-
-
-typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
-
- // general
- EFI_UNICODE_COLLATION_STRICOLL StriColl;
- EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch;
- EFI_UNICODE_COLLATION_STRLWR StrLwr;
- EFI_UNICODE_COLLATION_STRUPR StrUpr;
-
- // for supporting fat volumes
- EFI_UNICODE_COLLATION_FATTOSTR FatToStr;
- EFI_UNICODE_COLLATION_STRTOFAT StrToFat;
-
- CHAR8 *SupportedLanguages;
-} EFI_UNICODE_COLLATION_INTERFACE;
-
-//
-// Driver Binding protocol
-//
-
-#define DRIVER_BINDING_PROTOCOL \
- { 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0x0c, 0x09, 0x26, 0x1e, 0x9f, 0x71} }
-
-INTERFACE_DECL(_EFI_DRIVER_BINDING);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
- IN struct _EFI_DRIVER_BINDING *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH *RemainingPath
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DRIVER_BINDING_START) (
- IN struct _EFI_DRIVER_BINDING *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH *RemainingPath
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DRIVER_BINDING_STOP) (
- IN struct _EFI_DRIVER_BINDING *This,
- IN EFI_HANDLE ControllerHandle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-typedef struct _EFI_DRIVER_BINDING {
- EFI_DRIVER_BINDING_SUPPORTED Supported;
- EFI_DRIVER_BINDING_START Start;
- EFI_DRIVER_BINDING_STOP Stop;
- UINT32 Version;
- EFI_HANDLE ImageHandle;
- EFI_HANDLE DriverBindingHandle;
-} EFI_DRIVER_BINDING;
-
-//
-// Component Name Protocol 2
-//
-
-#define COMPONENT_NAME2_PROTOCOL \
- { 0x6a7a5cff, 0xe8d9, 0x4f70, {0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
-
-INTERFACE_DECL(_EFI_COMPONENT_NAME2);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
- IN struct _EFI_COMPONENT_NAME2 *This,
- IN CHAR8 * Language,
- OUT CHAR16 **DriverName
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
- IN struct _EFI_COMPONENT_NAME2 *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- );
-
-typedef struct _EFI_COMPONENT_NAME2 {
- EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
- EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
- CHAR8 **SupportedLanguages;
-} EFI_COMPONENT_NAME2;
-
-//
-// RISC-V EFI Boot Protocol
-//
-// https://github.com/riscv-non-isa/riscv-uefi
-//
-
-#define RISCV_EFI_BOOT_PROTOCOL_GUID \
- { 0xccd15fec, 0x6f73, 0x4eec, {0x83, 0x95, 0x3e, 0x69, 0xe4, 0xb9, 0x40, 0xbf} }
-
-INTERFACE_DECL(_RISCV_EFI_BOOT_PROTOCOL);
-
-#define RISCV_EFI_BOOT_PROTOCOL_REVISION 0x00010000
-#define RISCV_EFI_BOOT_PROTOCOL_LATEST_VERSION \
- RISCV_EFI_BOOT_PROTOCOL_REVISION
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_BOOT_HARTID) (
- IN struct _RISCV_EFI_BOOT_PROTOCOL *This,
- OUT UINTN *BootHartId
- );
-
-typedef struct _RISCV_EFI_BOOT_PROTOCOL {
- UINT64 Revision;
- EFI_GET_BOOT_HARTID GetBootHartId;
-} RISCV_EFI_BOOT_PROTOCOL;
-
-#endif
diff --git a/stand/efi/include/efipxebc.h b/stand/efi/include/efipxebc.h
deleted file mode 100644
--- a/stand/efi/include/efipxebc.h
+++ /dev/null
@@ -1,471 +0,0 @@
-#ifndef _EFIPXEBC_H
-#define _EFIPXEBC_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efipxebc.h
-
-Abstract:
-
- EFI PXE Base Code Protocol
-
-
-
-Revision History
-
---*/
-
-//
-// PXE Base Code protocol
-//
-
-#define EFI_PXE_BASE_CODE_PROTOCOL \
- { 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-INTERFACE_DECL(_EFI_PXE_BASE_CODE);
-
-#define DEFAULT_TTL 8
-#define DEFAULT_ToS 0
-//
-// Address definitions
-//
-
-typedef union {
- UINT32 Addr[4];
- EFI_IPv4_ADDRESS v4;
- EFI_IPv6_ADDRESS v6;
-} EFI_IP_ADDRESS;
-
-typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
-
-//
-// Packet definitions
-//
-
-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;
-
-// TBD in EFI v1.1
-//typedef struct {
-// UINT8 reserved;
-//} EFI_PXE_BASE_CODE_DHCPV6_PACKET;
-
-typedef union {
- UINT8 Raw[1472];
- EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;
-// EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
-} EFI_PXE_BASE_CODE_PACKET;
-
-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;
-
-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
-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 definitions
-//
-
-typedef struct {
- EFI_IP_ADDRESS IpAddr;
- EFI_MAC_ADDRESS MacAddr;
-} EFI_PXE_BASE_CODE_ARP_ENTRY;
-
-typedef struct {
- EFI_IP_ADDRESS IpAddr;
- EFI_IP_ADDRESS SubnetMask;
- EFI_IP_ADDRESS GwAddr;
-} EFI_PXE_BASE_CODE_ROUTE_ENTRY;
-
-//
-// UDP definitions
-//
-
-#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
-#define EFI_PXE_BASE_CODE_BOOT_LAYER_CREDENTIALS 0x8000
-
-
-typedef struct {
- UINT16 Type;
- BOOLEAN AcceptAnyResponse;
- UINT8 Reserved;
- EFI_IP_ADDRESS IpAddr;
-} EFI_PXE_BASE_CODE_SRVLIST;
-
-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;
-
-//
-// Mtftp() 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;
-
-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;
-
-//
-// PXE Base Code Mode structure
-//
-
-#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
-#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
-
-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
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_START) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN BOOLEAN UseIpv6
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_STOP) (
- IN struct _EFI_PXE_BASE_CODE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_DHCP) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN BOOLEAN SortOffers
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN UINT16 Type,
- IN UINT16 *Layer,
- IN BOOLEAN UseBis,
- IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO *Info OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
- IN struct _EFI_PXE_BASE_CODE *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,
- IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL,
- IN BOOLEAN DontUseBuffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
- IN struct _EFI_PXE_BASE_CODE *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
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ) (
- IN struct _EFI_PXE_BASE_CODE *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
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_ARP) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN EFI_IP_ADDRESS *IpAddr,
- IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN BOOLEAN *NewAutoArp, OPTIONAL
- IN BOOLEAN *NewSendGUID, OPTIONAL
- IN UINT8 *NewTTL, OPTIONAL
- IN UINT8 *NewToS, OPTIONAL
- IN BOOLEAN *NewMakeCallback OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP) (
- IN struct _EFI_PXE_BASE_CODE *This,
- IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL
- IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS) (
- IN struct _EFI_PXE_BASE_CODE *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_INTERFACE_REVISION 0x00010000
-
-typedef struct _EFI_PXE_BASE_CODE {
- 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;
- EFI_PXE_BASE_CODE_MODE *Mode;
-} EFI_PXE_BASE_CODE;
-
-//
-// Call Back Definitions
-//
-
-#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL \
- { 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-//
-// Revision Number
-//
-
-#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000
-
-INTERFACE_DECL(_EFI_PXE_BASE_CODE_CALLBACK);
-
-typedef enum {
- EFI_PXE_BASE_CODE_FUNCTION_FIRST,
- EFI_PXE_BASE_CODE_FUNCTION_DHCP,
- EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,
- EFI_PXE_BASE_CODE_FUNCTION_MTFTP,
- EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,
- EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,
- EFI_PXE_BASE_CODE_FUNCTION_ARP,
- EFI_PXE_BASE_CODE_FUNCTION_IGMP,
- EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST
-} EFI_PXE_BASE_CODE_FUNCTION;
-
-typedef enum {
- EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,
- EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,
- EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,
- EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST
-} EFI_PXE_BASE_CODE_CALLBACK_STATUS;
-
-typedef
-EFI_PXE_BASE_CODE_CALLBACK_STATUS
-(EFIAPI *EFI_PXE_CALLBACK) (
- IN struct _EFI_PXE_BASE_CODE_CALLBACK *This,
- IN EFI_PXE_BASE_CODE_FUNCTION Function,
- IN BOOLEAN Received,
- IN UINT32 PacketLen,
- IN EFI_PXE_BASE_CODE_PACKET *Packet OPTIONAL
- );
-
-typedef struct _EFI_PXE_BASE_CODE_CALLBACK {
- UINT64 Revision;
- EFI_PXE_CALLBACK Callback;
-} EFI_PXE_BASE_CODE_CALLBACK;
-
-#endif /* _EFIPXEBC_H */
diff --git a/stand/efi/include/efirng.h b/stand/efi/include/efirng.h
deleted file mode 100644
--- a/stand/efi/include/efirng.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright 2006 - 2016 Unified EFI, Inc.<BR>
- * Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
- * This program and the accompanying materials
- * are licensed and made available under the terms and conditions of the BSD License
- * which accompanies this distribution. The full text of the license may be found at
- * 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 _EFIRNG_H
-#define _EFIRNG_H
-
-#define EFI_RNG_PROTOCOL_GUID \
- { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44} }
-
-INTERFACE_DECL(_EFI_RNG_PROTOCOL);
-
-typedef EFI_GUID EFI_RNG_ALGORITHM;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RNG_GET_INFO) (
- IN struct _EFI_RNG_PROTOCOL *This,
- IN OUT UINTN *RNGAlgorithmListSize,
- OUT EFI_RNG_ALGORITHM *RNGAlgorithmList
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RNG_GET_RNG) (
- IN struct _EFI_RNG_PROTOCOL *This,
- IN EFI_RNG_ALGORITHM *RNGAlgorithm, OPTIONAL
- IN UINTN RNGValueLength,
- OUT UINT8 *RNGValue
- );
-
-typedef struct _EFI_RNG_PROTOCOL {
- EFI_RNG_GET_INFO GetInfo;
- EFI_RNG_GET_RNG GetRNG;
-} EFI_RNG_PROTOCOL;
-
-static EFI_GUID rng_guid = EFI_RNG_PROTOCOL_GUID;
-
-#endif /* _EFIRNG_H */
diff --git a/stand/efi/include/efiser.h b/stand/efi/include/efiser.h
deleted file mode 100644
--- a/stand/efi/include/efiser.h
+++ /dev/null
@@ -1,138 +0,0 @@
-#ifndef _EFI_SER_H
-#define _EFI_SER_H
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- efiser.h
-
-Abstract:
-
- EFI serial protocol
-
-Revision History
-
---*/
-
-//
-// Serial protocol
-//
-
-#define SERIAL_IO_PROTOCOL \
- { 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD} }
-
-INTERFACE_DECL(_SERIAL_IO_INTERFACE);
-
-typedef enum {
- DefaultParity,
- NoParity,
- EvenParity,
- OddParity,
- MarkParity,
- SpaceParity
-} EFI_PARITY_TYPE;
-
-typedef enum {
- DefaultStopBits,
- OneStopBit, // 1 stop bit
- OneFiveStopBits, // 1.5 stop bits
- TwoStopBits // 2 stop bits
-} EFI_STOP_BITS_TYPE;
-
-#define EFI_SERIAL_CLEAR_TO_SEND 0x0010 // RO
-#define EFI_SERIAL_DATA_SET_READY 0x0020 // RO
-#define EFI_SERIAL_RING_INDICATE 0x0040 // RO
-#define EFI_SERIAL_CARRIER_DETECT 0x0080 // RO
-#define EFI_SERIAL_REQUEST_TO_SEND 0x0002 // WO
-#define EFI_SERIAL_DATA_TERMINAL_READY 0x0001 // WO
-#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x0100 // RO
-#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x0200 // RO
-#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x1000 // RW
-#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x2000 // RW
-#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x4000 // RW
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_RESET) (
- IN struct _SERIAL_IO_INTERFACE *This
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_SET_ATTRIBUTES) (
- IN struct _SERIAL_IO_INTERFACE *This,
- IN UINT64 BaudRate,
- IN UINT32 ReceiveFifoDepth,
- IN UINT32 Timeout,
- IN EFI_PARITY_TYPE Parity,
- IN UINT8 DataBits,
- IN EFI_STOP_BITS_TYPE StopBits
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_SET_CONTROL_BITS) (
- IN struct _SERIAL_IO_INTERFACE *This,
- IN UINT32 Control
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_GET_CONTROL_BITS) (
- IN struct _SERIAL_IO_INTERFACE *This,
- OUT UINT32 *Control
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_WRITE) (
- IN struct _SERIAL_IO_INTERFACE *This,
- IN OUT UINTN *BufferSize,
- IN VOID *Buffer
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERIAL_READ) (
- IN struct _SERIAL_IO_INTERFACE *This,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer
- );
-
-typedef struct {
- UINT32 ControlMask;
-
- // current Attributes
- UINT32 Timeout;
- UINT64 BaudRate;
- UINT32 ReceiveFifoDepth;
- UINT32 DataBits;
- UINT32 Parity;
- UINT32 StopBits;
-} SERIAL_IO_MODE;
-
-#define SERIAL_IO_INTERFACE_REVISION 0x00010000
-
-typedef struct _SERIAL_IO_INTERFACE {
- UINT32 Revision;
- EFI_SERIAL_RESET Reset;
- EFI_SERIAL_SET_ATTRIBUTES SetAttributes;
- EFI_SERIAL_SET_CONTROL_BITS SetControl;
- EFI_SERIAL_GET_CONTROL_BITS GetControl;
- EFI_SERIAL_WRITE Write;
- EFI_SERIAL_READ Read;
-
- SERIAL_IO_MODE *Mode;
-} SERIAL_IO_INTERFACE;
-
-#endif
diff --git a/stand/efi/include/efistdarg.h b/stand/efi/include/efistdarg.h
deleted file mode 100644
--- a/stand/efi/include/efistdarg.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef _EFISTDARG_H_
-#define _EFISTDARG_H_
-
-/*++
-
-Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
-This software and associated documentation (if any) is furnished
-under a license and may only be used or copied in accordance
-with the terms of the license. Except as permitted by such
-license, no part of this software or documentation may be
-reproduced, stored in a retrieval system, or transmitted in any
-form or by any means without the express written consent of
-Intel Corporation.
-
-Module Name:
-
- devpath.h
-
-Abstract:
-
- Defines for parsing the EFI Device Path structures
-
-
-
-Revision History
-
---*/
-
-#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) )
-
-typedef CHAR8 * va_list;
-
-#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
-#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
-#define va_end(ap) ( ap = (va_list)0 )
-
-
-#endif /* _INC_STDARG */
diff --git a/stand/efi/include/efitcp.h b/stand/efi/include/efitcp.h
deleted file mode 100644
--- a/stand/efi/include/efitcp.h
+++ /dev/null
@@ -1,391 +0,0 @@
-#ifndef _EFI_TCP_H
-#define _EFI_TCP_H
-
-/*++
-Copyright (c) 2013 Intel Corporation
-
---*/
-
-#define EFI_TCP4_SERVICE_BINDING_PROTOCOL \
- { 0x00720665, 0x67eb, 0x4a99, {0xba, 0xf7, 0xd3, 0xc3, 0x3a, 0x1c,0x7c, 0xc9}}
-
-#define EFI_TCP4_PROTOCOL \
- { 0x65530bc7, 0xa359, 0x410f, {0xb0, 0x10, 0x5a, 0xad, 0xc7, 0xec, 0x2b, 0x62}}
-
-#define EFI_TCP6_SERVICE_BINDING_PROTOCOL \
- { 0xec20eb79, 0x6c1a, 0x4664, {0x9a, 0xd, 0xd2, 0xe4, 0xcc, 0x16, 0xd6, 0x64}}
-
-#define EFI_TCP6_PROTOCOL \
- { 0x46e44855, 0xbd60, 0x4ab7, {0xab, 0xd, 0xa6, 0x79, 0xb9, 0x44, 0x7d, 0x77}}
-
-INTERFACE_DECL(_EFI_TCP4);
-INTERFACE_DECL(_EFI_TCP6);
-
-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 {
- // Receiving Filters
- // 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;
-
-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
-EFI_STATUS
-(EFIAPI *EFI_TCP4_GET_MODE_DATA) (
- IN struct _EFI_TCP4 *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
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_CONFIGURE) (
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_ROUTES) (
- IN struct _EFI_TCP4 *This,
- IN BOOLEAN DeleteRoute,
- IN EFI_IPv4_ADDRESS *SubnetAddress,
- IN EFI_IPv4_ADDRESS *SubnetMask,
- IN EFI_IPv4_ADDRESS *GatewayAddress
-);
-
-typedef struct {
- EFI_EVENT Event;
- EFI_STATUS Status;
-} EFI_TCP4_COMPLETION_TOKEN;
-
-typedef struct {
- EFI_TCP4_COMPLETION_TOKEN CompletionToken;
-} EFI_TCP4_CONNECTION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_CONNECT) (
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken
- );
-
-typedef struct {
- EFI_TCP4_COMPLETION_TOKEN CompletionToken;
- EFI_HANDLE NewChildHandle;
-} EFI_TCP4_LISTEN_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_ACCEPT) (
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_LISTEN_TOKEN *ListenToken
- );
-
-#define EFI_CONNECTION_FIN EFIERR(104)
-#define EFI_CONNECTION_RESET EFIERR(105)
-#define EFI_CONNECTION_REFUSED EFIERR(106)
-
-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 {
- EFI_TCP4_COMPLETION_TOKEN CompletionToken;
- union {
- EFI_TCP4_RECEIVE_DATA *RxData;
- EFI_TCP4_TRANSMIT_DATA *TxData;
- } Packet;
-} EFI_TCP4_IO_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_TRANSMIT) (
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_IO_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_RECEIVE) (
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_IO_TOKEN *Token
- );
-
-typedef struct {
- EFI_TCP4_COMPLETION_TOKEN CompletionToken;
- BOOLEAN AbortOnClose;
-} EFI_TCP4_CLOSE_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_CLOSE)(
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_CLOSE_TOKEN *CloseToken
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_CANCEL)(
- IN struct _EFI_TCP4 *This,
- IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL
-);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP4_POLL) (
- IN struct _EFI_TCP4 *This
- );
-
-typedef struct _EFI_TCP4 {
- EFI_TCP4_GET_MODE_DATA GetModeData;
- EFI_TCP4_CONFIGURE Configure;
- EFI_TCP4_ROUTES Routes;
- EFI_TCP4_CONNECT Connect;
- EFI_TCP4_ACCEPT Accept;
- EFI_TCP4_TRANSMIT Transmit;
- EFI_TCP4_RECEIVE Receive;
- EFI_TCP4_CLOSE Close;
- EFI_TCP4_CANCEL Cancel;
- EFI_TCP4_POLL Poll;
-} EFI_TCP4;
-
-typedef enum {
- Tcp6StateClosed = 0,
- Tcp6StateListen = 1,
- Tcp6StateSynSent = 2,
- Tcp6StateSynReceived = 3,
- Tcp6StateEstablished = 4,
- Tcp6StateFinWait1 = 5,
- Tcp6StateFinWait2 = 6,
- Tcp6StateClosing = 7,
- Tcp6StateTimeWait = 8,
- Tcp6StateCloseWait = 9,
- Tcp6StateLastAck = 10
-} EFI_TCP6_CONNECTION_STATE;
-
-typedef struct {
- EFI_IPv6_ADDRESS StationAddress;
- UINT16 StationPort;
- EFI_IPv6_ADDRESS RemoteAddress;
- UINT16 RemotePort;
- BOOLEAN ActiveFlag;
-} EFI_TCP6_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 EnableWindbowScaling;
- BOOLEAN EnableSelectiveAck;
- BOOLEAN EnablePathMtuDiscovery;
-} EFI_TCP6_OPTION;
-
-typedef struct {
- UINT8 TrafficClass;
- UINT8 HopLimit;
- EFI_TCP6_ACCESS_POINT AccessPoint;
- EFI_TCP6_OPTION *ControlOption;
-} EFI_TCP6_CONFIG_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_GET_MODE_DATA) (
- IN struct _EFI_TCP6 *This,
- OUT EFI_TCP6_CONNECTION_STATE *Tcp6State OPTIONAL,
- OUT EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL,
- OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,
- OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
- OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_CONFIGURE) (
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL
- );
-
-typedef struct {
- EFI_EVENT Event;
- EFI_STATUS Status;
-} EFI_TCP6_COMPLETION_TOKEN;
-
-typedef struct {
- EFI_TCP6_COMPLETION_TOKEN CompletionToken;
-} EFI_TCP6_CONNECTION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_CONNECT) (
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_CONNECTION_TOKEN *ConnectionToken
- );
-
-typedef struct {
- EFI_TCP6_COMPLETION_TOKEN CompletionToken;
- EFI_HANDLE NewChildHandle;
-} EFI_TCP6_LISTEN_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_ACCEPT) (
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_LISTEN_TOKEN *ListenToken
- );
-
-typedef struct {
- UINT32 FragmentLength;
- VOID *FragmentBuffer;
-} EFI_TCP6_FRAGMENT_DATA;
-
-typedef struct {
- BOOLEAN UrgentFlag;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_TCP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_TCP6_RECEIVE_DATA;
-
-typedef struct {
- BOOLEAN Push;
- BOOLEAN Urgent;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_TCP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_TCP6_TRANSMIT_DATA;
-
-typedef struct {
- EFI_TCP6_COMPLETION_TOKEN CompletionToken;
- union {
- EFI_TCP6_RECEIVE_DATA *RxData;
- EFI_TCP6_TRANSMIT_DATA *TxData;
- } Packet;
-} EFI_TCP6_IO_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_TRANSMIT) (
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_IO_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_RECEIVE) (
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_IO_TOKEN *Token
- );
-
-typedef struct {
- EFI_TCP6_COMPLETION_TOKEN CompletionToken;
- BOOLEAN AbortOnClose;
-} EFI_TCP6_CLOSE_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_CLOSE)(
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_CLOSE_TOKEN *CloseToken
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_CANCEL)(
- IN struct _EFI_TCP6 *This,
- IN EFI_TCP6_COMPLETION_TOKEN *Token OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TCP6_POLL) (
- IN struct _EFI_TCP6 *This
- );
-
-typedef struct _EFI_TCP6 {
- EFI_TCP6_GET_MODE_DATA GetModeData;
- EFI_TCP6_CONFIGURE Configure;
- EFI_TCP6_CONNECT Connect;
- EFI_TCP6_ACCEPT Accept;
- EFI_TCP6_TRANSMIT Transmit;
- EFI_TCP6_RECEIVE Receive;
- EFI_TCP6_CLOSE Close;
- EFI_TCP6_CANCEL Cancel;
- EFI_TCP6_POLL Poll;
-} EFI_TCP6;
-
-#endif /* _EFI_TCP_H */
diff --git a/stand/efi/include/efiudp.h b/stand/efi/include/efiudp.h
deleted file mode 100644
--- a/stand/efi/include/efiudp.h
+++ /dev/null
@@ -1,272 +0,0 @@
-#ifndef _EFI_UDP_H
-#define _EFI_UDP_H
-
-
-/*++
-Copyright (c) 2013 Intel Corporation
-
---*/
-
-#define EFI_UDP4_SERVICE_BINDING_PROTOCOL \
- { 0x83f01464, 0x99bd, 0x45e5, {0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6} }
-
-#define EFI_UDP4_PROTOCOL \
- { 0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3} }
-
-#define EFI_UDP6_SERVICE_BINDING_PROTOCOL \
- { 0x66ed4721, 0x3c98, 0x4d3e, {0x81, 0xe3, 0xd0, 0x3d, 0xd3, 0x9a, 0x72, 0x54} }
-
-#define EFI_UDP6_PROTOCOL \
- { 0x4f948815, 0xb4b9, 0x43cb, {0x8a, 0x33, 0x90, 0xe0, 0x60, 0xb3,0x49, 0x55} }
-
-INTERFACE_DECL(_EFI_UDP4);
-INTERFACE_DECL(_EFI_UDP6);
-
-typedef struct {
- BOOLEAN AcceptBroadcast;
- BOOLEAN AcceptPromiscuous;
- BOOLEAN AcceptAnyPort;
- BOOLEAN AllowDuplicatePort;
- UINT8 TypeOfService;
- UINT8 TimeToLive;
- BOOLEAN DoNotFragment;
- UINT32 ReceiveTimeout;
- UINT32 TransmitTimeout;
- BOOLEAN UseDefaultAddress;
- EFI_IPv4_ADDRESS StationAddress;
- EFI_IPv4_ADDRESS SubnetMask;
- UINT16 StationPort;
- EFI_IPv4_ADDRESS RemoteAddress;
- UINT16 RemotePort;
-} EFI_UDP4_CONFIG_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_GET_MODE_DATA) (
- IN struct _EFI_UDP4 *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
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_CONFIGURE) (
- IN struct _EFI_UDP4 *This,
- IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_GROUPS) (
- IN struct _EFI_UDP4 *This,
- IN BOOLEAN JoinFlag,
- IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_ROUTES) (
- IN struct _EFI_UDP4 *This,
- IN BOOLEAN DeleteRoute,
- IN EFI_IPv4_ADDRESS *SubnetAddress,
- IN EFI_IPv4_ADDRESS *SubnetMask,
- IN EFI_IPv4_ADDRESS *GatewayAddress
- );
-
-#define EFI_NETWORK_UNREACHABLE EFIERR(100)
-#define EFI_HOST_UNREACHABLE EFIERR(101)
-#define EFI_PROTOCOL_UNREACHABLE EFIERR(102)
-#define EFI_PORT_UNREACHABLE EFIERR(103)
-
-typedef struct {
- EFI_IPv4_ADDRESS SourceAddress;
- UINT16 SourcePort;
- EFI_IPv4_ADDRESS DestinationAddress;
- UINT16 DestinationPort;
-} EFI_UDP4_SESSION_DATA;
-
-typedef struct {
- UINT32 FragmentLength;
- VOID *FragmentBuffer;
-} EFI_UDP4_FRAGMENT_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_UDP4_SESSION_DATA *UdpSessionData;
- EFI_IPv4_ADDRESS *GatewayAddress;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_UDP4_FRAGMENT_DATA FragmentTable[1];
-} EFI_UDP4_TRANSMIT_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;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_TRANSMIT) (
- IN struct _EFI_UDP4 *This,
- IN EFI_UDP4_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_RECEIVE) (
- IN struct _EFI_UDP4 *This,
- IN EFI_UDP4_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_CANCEL)(
- IN struct _EFI_UDP4 *This,
- IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP4_POLL) (
- IN struct _EFI_UDP4 *This
- );
-
-typedef struct _EFI_UDP4 {
- EFI_UDP4_GET_MODE_DATA GetModeData;
- EFI_UDP4_CONFIGURE Configure;
- EFI_UDP4_GROUPS Groups;
- EFI_UDP4_ROUTES Routes;
- EFI_UDP4_TRANSMIT Transmit;
- EFI_UDP4_RECEIVE Receive;
- EFI_UDP4_CANCEL Cancel;
- EFI_UDP4_POLL Poll;
-} EFI_UDP4;
-
-typedef struct {
- BOOLEAN AcceptPromiscuous;
- BOOLEAN AcceptAnyPort;
- BOOLEAN AllowDuplicatePort;
- UINT8 TrafficClass;
- UINT8 HopLimit;
- UINT32 ReceiveTimeout;
- UINT32 TransmitTimeout;
- EFI_IPv6_ADDRESS StationAddress;
- UINT16 StationPort;
- EFI_IPv6_ADDRESS RemoteAddress;
- UINT16 RemotePort;
-} EFI_UDP6_CONFIG_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_GET_MODE_DATA) (
- IN struct _EFI_UDP6 *This,
- OUT EFI_UDP6_CONFIG_DATA *Udp6ConfigData OPTIONAL,
- OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,
- OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
- OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_CONFIGURE) (
- IN struct _EFI_UDP6 *This,
- IN EFI_UDP6_CONFIG_DATA *UdpConfigData OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_GROUPS) (
- IN struct _EFI_UDP6 *This,
- IN BOOLEAN JoinFlag,
- IN EFI_IPv6_ADDRESS *MulticastAddress OPTIONAL
- );
-
-typedef struct {
- EFI_IPv6_ADDRESS SourceAddress;
- UINT16 SourcePort;
- EFI_IPv6_ADDRESS DestinationAddress;
- UINT16 DestinationPort;
-} EFI_UDP6_SESSION_DATA;
-
-typedef struct {
- UINT32 FragmentLength;
- VOID *FragmentBuffer;
-} EFI_UDP6_FRAGMENT_DATA;
-
-typedef struct {
- EFI_TIME TimeStamp;
- EFI_EVENT RecycleSignal;
- EFI_UDP6_SESSION_DATA UdpSession;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_UDP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_UDP6_RECEIVE_DATA;
-
-typedef struct {
- EFI_UDP6_SESSION_DATA *UdpSessionData;
- UINT32 DataLength;
- UINT32 FragmentCount;
- EFI_UDP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_UDP6_TRANSMIT_DATA;
-
-typedef struct {
- EFI_EVENT Event;
- EFI_STATUS Status;
- union {
- EFI_UDP6_RECEIVE_DATA *RxData;
- EFI_UDP6_TRANSMIT_DATA *TxData;
- } Packet;
-} EFI_UDP6_COMPLETION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_TRANSMIT) (
- IN struct _EFI_UDP6 *This,
- IN EFI_UDP6_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_RECEIVE) (
- IN struct _EFI_UDP6 *This,
- IN EFI_UDP6_COMPLETION_TOKEN *Token
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_CANCEL)(
- IN struct _EFI_UDP6 *This,
- IN EFI_UDP6_COMPLETION_TOKEN *Token OPTIONAL
- );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UDP6_POLL) (
- IN struct _EFI_UDP6 *This
- );
-
-typedef struct _EFI_UDP6 {
- EFI_UDP6_GET_MODE_DATA GetModeData;
- EFI_UDP6_CONFIGURE Configure;
- EFI_UDP6_GROUPS Groups;
- EFI_UDP6_TRANSMIT Transmit;
- EFI_UDP6_RECEIVE Receive;
- EFI_UDP6_CANCEL Cancel;
- EFI_UDP6_POLL Poll;
-} EFI_UDP6;
-
-#endif /* _EFI_UDP_H */
diff --git a/stand/efi/include/efiuga.h b/stand/efi/include/efiuga.h
deleted file mode 100644
--- a/stand/efi/include/efiuga.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/** @file
- UGA Draw protocol from the EFI 1.1 specification.
-
- Abstraction of a very simple graphics device.
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
-
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which accompanies this
- distribution. The full text of the license may be found at:
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- File name: UgaDraw.h
-
-**/
-
-#ifndef __UGA_DRAW_H__
-#define __UGA_DRAW_H__
-
-#define EFI_UGA_DRAW_PROTOCOL_GUID \
- { 0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39} }
-
-typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
-
-/**
- Return the current video mode information.
-
- @param This Protocol instance pointer.
- @param HorizontalResolution Current video horizontal resolution in pixels
- @param VerticalResolution Current video vertical resolution in pixels
- @param ColorDepth Current video color depth in bits per pixel
- @param RefreshRate Current video refresh rate in Hz.
-
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE) (
- IN EFI_UGA_DRAW_PROTOCOL *This,
- OUT UINT32 *HorizontalResolution,
- OUT UINT32 *VerticalResolution,
- OUT UINT32 *ColorDepth,
- OUT UINT32 *RefreshRate
- )
-;
-
-/**
- Return the current video mode information.
-
- @param This Protocol instance pointer.
- @param HorizontalResolution Current video horizontal resolution in pixels
- @param VerticalResolution Current video vertical resolution in pixels
- @param ColorDepth Current video color depth in bits per pixel
- @param RefreshRate Current video refresh rate in Hz.
-
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE) (
- IN EFI_UGA_DRAW_PROTOCOL *This,
- IN UINT32 HorizontalResolution,
- IN UINT32 VerticalResolution,
- IN UINT32 ColorDepth,
- IN UINT32 RefreshRate
- )
-;
-
-typedef struct {
- UINT8 Blue;
- UINT8 Green;
- UINT8 Red;
- UINT8 Reserved;
-} EFI_UGA_PIXEL;
-
-typedef union {
- EFI_UGA_PIXEL Pixel;
- UINT32 Raw;
-} EFI_UGA_PIXEL_UNION;
-
-typedef enum {
- EfiUgaVideoFill,
- EfiUgaVideoToBltBuffer,
- EfiUgaBltBufferToVideo,
- EfiUgaVideoToVideo,
- EfiUgaBltMax
-} EFI_UGA_BLT_OPERATION;
-
-/**
- Type specifying a pointer to a function to perform an UGA Blt operation.
-
- The following table defines actions for BltOperations:
-
- <B>EfiUgaVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
- directly to every pixel of the video display rectangle
- (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
- Only one pixel will be used from the BltBuffer. Delta is NOT used.
-
- <B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
- the BltBuffer rectangle (DestinationX, DestinationY )
- (DestinationX + Width, DestinationY + Height). If DestinationX or
- DestinationY is not zero then Delta must be set to the length in bytes
- of a row in the BltBuffer.
-
- <B>EfiUgaBltBufferToVideo</B> - Write data from the BltBuffer rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
- video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
- not zero then Delta must be set to the length in bytes of a row in the
- BltBuffer.
-
- <B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
- (SourceX + Width, SourceY + Height) .to the video display rectangle
- (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
- The BltBuffer and Delta are not used in this mode.
-
-
- @param[in] This - Protocol instance pointer.
- @param[in] BltBuffer - Buffer containing data to blit into video buffer. This
- buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
- @param[in] BltOperation - Operation to perform on BlitBuffer and video memory
- @param[in] SourceX - X coordinate of source for the BltBuffer.
- @param[in] SourceY - Y coordinate of source for the BltBuffer.
- @param[in] DestinationX - X coordinate of destination for the BltBuffer.
- @param[in] DestinationY - Y coordinate of destination for the BltBuffer.
- @param[in] Width - Width of rectangle in BltBuffer in pixels.
- @param[in] Height - Hight of rectangle in BltBuffer in pixels.
- @param[in] Delta - OPTIONAL
-
- @retval EFI_SUCCESS - The Blt operation completed.
- @retval EFI_INVALID_PARAMETER - BltOperation is not valid.
- @retval EFI_DEVICE_ERROR - A hardware error occurred writing to the video buffer.
-
---*/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT) (
- IN EFI_UGA_DRAW_PROTOCOL * This,
- IN EFI_UGA_PIXEL * BltBuffer, OPTIONAL
- IN EFI_UGA_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta OPTIONAL
- );
-
-struct _EFI_UGA_DRAW_PROTOCOL {
- EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode;
- EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode;
- EFI_UGA_DRAW_PROTOCOL_BLT Blt;
-};
-
-extern EFI_GUID gEfiUgaDrawProtocolGuid;
-
-#endif
diff --git a/stand/efi/include/efizfs.h b/stand/efi/include/efizfs.h
--- a/stand/efi/include/efizfs.h
+++ b/stand/efi/include/efizfs.h
@@ -31,6 +31,13 @@
#define _EFIZFS_H_
#ifdef EFI_ZFS_BOOT
+/*
+ * EFI defines these, but libzfs.h includes stuff which includes stuff which
+ * include sys/param.h which defines these. This is easier than any of the other
+ * crazy we can do.
+ */
+#undef MIN
+#undef MAX
#include <libzfs.h>
typedef STAILQ_HEAD(zfsinfo_list, zfsinfo) zfsinfo_list_t;
diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile
--- a/stand/efi/libefi/Makefile
+++ b/stand/efi/libefi/Makefile
@@ -47,7 +47,7 @@
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -fPIC -mno-red-zone
.endif
-CFLAGS+= -I${EFIINC}
+CFLAGS+= -I${EFIINC} -I${EDK2INC}
CFLAGS+= -I${EFIINCMD}
CFLAGS.efi_console.c+= -I${SRCTOP}/sys/teken -I${SRCTOP}/contrib/pnglite
CFLAGS.efi_console.c+= -I${.CURDIR}/../loader
diff --git a/stand/efi/libefi/devpath.c b/stand/efi/libefi/devpath.c
--- a/stand/efi/libefi/devpath.c
+++ b/stand/efi/libefi/devpath.c
@@ -28,6 +28,8 @@
#include <efichar.h>
#include <uuid.h>
#include <machine/_inttypes.h>
+#include <Protocol/DevicePathToText.h>
+#include <Protocol/DevicePathFromText.h>
static EFI_GUID ImageDevicePathGUID =
EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID;
@@ -165,7 +167,7 @@
break;
case HW_CONTROLLER_DP:
if (asprintf(&name, "Ctrl(%x)%s",
- ((CONTROLLER_DEVICE_PATH *)node)->Controller, tail) < 0)
+ ((CONTROLLER_DEVICE_PATH *)node)->ControllerNumber, tail) < 0)
name = NULL;
break;
default:
diff --git a/stand/efi/libefi/efi_driver_utils.c b/stand/efi/libefi/efi_driver_utils.c
--- a/stand/efi/libefi/efi_driver_utils.c
+++ b/stand/efi/libefi/efi_driver_utils.c
@@ -24,14 +24,11 @@
* SUCH DAMAGE.
*/
-#include <stdbool.h>
-
-#include <efi.h>
-#include <efilib.h>
-
+#include "efi.h"
+#include "efilib.h"
#include "efi_driver_utils.h"
-static EFI_GUID DriverBindingProtocolGUID = DRIVER_BINDING_PROTOCOL;
+static EFI_GUID DriverBindingProtocolGUID = EFI_DRIVER_BINDING_PROTOCOL_GUID;
EFI_STATUS
connect_controllers(EFI_GUID *filter)
@@ -71,7 +68,7 @@
}
EFI_STATUS
-install_driver(EFI_DRIVER_BINDING *driver)
+install_driver(EFI_DRIVER_BINDING_PROTOCOL *driver)
{
EFI_STATUS status;
diff --git a/stand/efi/libefi/eficom.c b/stand/efi/libefi/eficom.c
--- a/stand/efi/libefi/eficom.c
+++ b/stand/efi/libefi/eficom.c
@@ -30,8 +30,9 @@
#include <efi.h>
#include <efilib.h>
+#include <Protocol/SerialIo.h>
-static EFI_GUID serial = SERIAL_IO_PROTOCOL;
+static EFI_GUID serial = EFI_SERIAL_IO_PROTOCOL_GUID;
#define COMC_TXWAIT 0x40000 /* transmit timeout */
diff --git a/stand/efi/libefi/efienv.c b/stand/efi/libefi/efienv.c
--- a/stand/efi/libefi/efienv.c
+++ b/stand/efi/libefi/efienv.c
@@ -27,6 +27,7 @@
#include <efi.h>
#include <efichar.h>
#include <efilib.h>
+#include <Guid/GlobalVariable.h>
static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID;
static EFI_GUID GlobalBootVarGUID = EFI_GLOBAL_VARIABLE;
diff --git a/stand/efi/libefi/efihttp.c b/stand/efi/libefi/efihttp.c
--- a/stand/efi/libefi/efihttp.c
+++ b/stand/efi/libefi/efihttp.c
@@ -36,7 +36,6 @@
#include <efi.h>
#include <efilib.h>
-#include <efiprot.h>
#include <Protocol/Http.h>
#include <Protocol/Ip4Config2.h>
#include <Protocol/ServiceBinding.h>
diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c
--- a/stand/efi/libefi/efinet.c
+++ b/stand/efi/libefi/efinet.c
@@ -36,10 +36,11 @@
#include <efi.h>
#include <efilib.h>
+#include <Protocol/SimpleNetwork.h>
#include "dev_net.h"
-static EFI_GUID sn_guid = EFI_SIMPLE_NETWORK_PROTOCOL;
+static EFI_GUID sn_guid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
static void efinet_end(struct netif *);
static ssize_t efinet_get(struct iodesc *, void **, time_t);
diff --git a/stand/efi/libefi/efipart.c b/stand/efi/libefi/efipart.c
--- a/stand/efi/libefi/efipart.c
+++ b/stand/efi/libefi/efipart.c
@@ -35,8 +35,9 @@
#include <efi.h>
#include <efilib.h>
-#include <efiprot.h>
#include <efichar.h>
+#include <Protocol/DevicePath.h>
+#include <Protocol/BlockIo.h>
#include <disk.h>
static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL;
diff --git a/stand/efi/libefi/env.c b/stand/efi/libefi/env.c
--- a/stand/efi/libefi/env.c
+++ b/stand/efi/libefi/env.c
@@ -23,22 +23,67 @@
* SUCH DAMAGE.
*/
+#include <sys/param.h>
#include <stand.h>
#include <string.h>
#include <efi.h>
#include <efichar.h>
#include <efilib.h>
-#include <efigpt.h> /* Partition GUIDS */
-#include <Guid/MemoryTypeInformation.h>
-#include <Guid/MtcVendor.h>
-#include <Guid/ZeroGuid.h>
+#include <Guid/Acpi.h>
+#include <Guid/DxeServices.h>
+#include <Guid/DebugImageInfoTable.h>
+#include <Guid/GlobalVariable.h>
+#include <Guid/Gpt.h>
+#include <Guid/Mps.h>
+#include <Guid/SmBios.h>
+#include <Protocol/AbsolutePointer.h>
+#include <Protocol/Arp.h>
+#include <Protocol/ComponentName.h>
+#include <Protocol/DeviceIo.h>
+#include <Protocol/DiskInfo.h>
+#include <Protocol/DiskIo.h>
+#include <Protocol/DriverBinding.h>
+#include <Protocol/DriverConfiguration2.h>
+#include <Protocol/DriverDiagnostics.h>
+#include <Protocol/DriverDiagnostics2.h>
#include <Protocol/EdidActive.h>
#include <Protocol/EdidDiscovered.h>
+#include <Protocol/GraphicsOutput.h>
+#include <Protocol/IdeControllerInit.h>
+#include <Protocol/Ip4.h>
+#include <Protocol/Ip4Config.h>
+#include <Protocol/LoadFile.h>
+#include <Protocol/PciEnumerationComplete.h>
+#include <Protocol/PciHostBridgeResourceAllocation.h>
+#include <Protocol/PciHotPlugInit.h>
+#include <Protocol/PciHotPlugRequest.h>
+#include <Protocol/PciIo.h>
+#include <Protocol/PciOverride.h>
+#include <Protocol/PciPlatform.h>
+#include <Protocol/PciRootBridgeIo.h>
+#include <Protocol/PxeBaseCode.h>
+#include <Protocol/PxeBaseCodeCallBack.h>
+#include <Protocol/SerialIo.h>
+#include <Protocol/SimpleFileSystem.h>
+#include <Protocol/SimpleNetwork.h>
+#include <Protocol/SimplePointer.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/SimpleTextInEx.h>
+#include <Protocol/SimpleTextOut.h>
+#include <Protocol/Tcp4.h>
+#include <Protocol/Tcp6.h>
+#include <Protocol/UgaDraw.h>
+#include <Protocol/UgaIo.h>
+#include <Protocol/UnicodeCollation.h>
+#include <Protocol/Usb2HostController.h>
+#include <Protocol/UsbIo.h>
+#include <Protocol/VlanConfig.h>
#include <uuid.h>
#include <stdbool.h>
-#include <sys/param.h>
#include "bootstrap.h"
+#define ZERO_GUID { 0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} }
+
/*
* About ENABLE_UPDATES
*
@@ -66,64 +111,64 @@
/* EFI Systab entry names. */
{ .efi_guid_name = "MPS Table", .efi_guid = MPS_TABLE_GUID },
{ .efi_guid_name = "ACPI Table", .efi_guid = ACPI_TABLE_GUID },
- { .efi_guid_name = "ACPI 2.0 Table", .efi_guid = ACPI_20_TABLE_GUID },
+ { .efi_guid_name = "ACPI 2.0 Table", .efi_guid = EFI_ACPI_20_TABLE_GUID },
{ .efi_guid_name = "SMBIOS Table", .efi_guid = SMBIOS_TABLE_GUID },
{ .efi_guid_name = "SMBIOS3 Table", .efi_guid = SMBIOS3_TABLE_GUID },
{ .efi_guid_name = "DXE Table", .efi_guid = DXE_SERVICES_TABLE_GUID },
- { .efi_guid_name = "HOB List Table", .efi_guid = HOB_LIST_TABLE_GUID },
- { .efi_guid_name = EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
- .efi_guid = EFI_MEMORY_TYPE_INFORMATION_GUID },
+// { .efi_guid_name = "HOB List Table", .efi_guid = HOB_LIST_TABLE_GUID },
+// { .efi_guid_name = EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
+// .efi_guid = EFI_MEMORY_TYPE_INFORMATION_GUID },
{ .efi_guid_name = "Debug Image Info Table",
- .efi_guid = DEBUG_IMAGE_INFO_TABLE_GUID },
- { .efi_guid_name = "FDT Table", .efi_guid = FDT_TABLE_GUID },
+ .efi_guid = EFI_DEBUG_IMAGE_INFO_TABLE_GUID },
+// { .efi_guid_name = "FDT Table", .efi_guid = FDT_TABLE_GUID },
/*
* Protocol names for debug purposes.
* Can be removed along with lsefi command.
*/
{ .efi_guid_name = "device path", .efi_guid = DEVICE_PATH_PROTOCOL },
{ .efi_guid_name = "block io", .efi_guid = BLOCK_IO_PROTOCOL },
- { .efi_guid_name = "disk io", .efi_guid = DISK_IO_PROTOCOL },
+ { .efi_guid_name = "disk io", .efi_guid = EFI_DISK_IO_PROTOCOL_GUID },
{ .efi_guid_name = "disk info", .efi_guid =
EFI_DISK_INFO_PROTOCOL_GUID },
{ .efi_guid_name = "simple fs",
- .efi_guid = SIMPLE_FILE_SYSTEM_PROTOCOL },
+ .efi_guid = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID },
{ .efi_guid_name = "load file", .efi_guid = LOAD_FILE_PROTOCOL },
{ .efi_guid_name = "device io", .efi_guid = DEVICE_IO_PROTOCOL },
{ .efi_guid_name = "unicode collation",
- .efi_guid = UNICODE_COLLATION_PROTOCOL },
+ .efi_guid = EFI_UNICODE_COLLATION_PROTOCOL_GUID },
{ .efi_guid_name = "unicode collation2",
- .efi_guid = EFI_UNICODE_COLLATION2_PROTOCOL_GUID },
+ .efi_guid = EFI_UNICODE_COLLATION_PROTOCOL2_GUID },
{ .efi_guid_name = "simple network",
- .efi_guid = EFI_SIMPLE_NETWORK_PROTOCOL },
+ .efi_guid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID },
{ .efi_guid_name = "simple text output",
- .efi_guid = SIMPLE_TEXT_OUTPUT_PROTOCOL },
+ .efi_guid = EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID },
{ .efi_guid_name = "simple text input",
- .efi_guid = SIMPLE_TEXT_INPUT_PROTOCOL },
+ .efi_guid = EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID },
{ .efi_guid_name = "simple text ex input",
.efi_guid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID },
- { .efi_guid_name = "console control",
- .efi_guid = EFI_CONSOLE_CONTROL_PROTOCOL_GUID },
- { .efi_guid_name = "stdin", .efi_guid = EFI_CONSOLE_IN_DEVICE_GUID },
- { .efi_guid_name = "stdout", .efi_guid = EFI_CONSOLE_OUT_DEVICE_GUID },
- { .efi_guid_name = "stderr",
- .efi_guid = EFI_STANDARD_ERROR_DEVICE_GUID },
+// { .efi_guid_name = "console control",
+// .efi_guid = EFI_CONSOLE_CONTROL_PROTOCOL_GUID },
+// { .efi_guid_name = "stdin", .efi_guid = EFI_CONSOLE_IN_DEVICE_GUID },
+// { .efi_guid_name = "stdout", .efi_guid = EFI_CONSOLE_OUT_DEVICE_GUID },
+// { .efi_guid_name = "stderr",
+// .efi_guid = EFI_STANDARD_ERROR_DEVICE_GUID },
{ .efi_guid_name = "GOP",
.efi_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID },
{ .efi_guid_name = "UGA draw", .efi_guid = EFI_UGA_DRAW_PROTOCOL_GUID },
{ .efi_guid_name = "PXE base code",
- .efi_guid = EFI_PXE_BASE_CODE_PROTOCOL },
+ .efi_guid = EFI_PXE_BASE_CODE_PROTOCOL_GUID },
{ .efi_guid_name = "PXE base code callback",
- .efi_guid = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL },
- { .efi_guid_name = "serial io", .efi_guid = SERIAL_IO_PROTOCOL },
- { .efi_guid_name = "loaded image", .efi_guid = LOADED_IMAGE_PROTOCOL },
+ .efi_guid = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_GUID },
+ { .efi_guid_name = "serial io", .efi_guid = EFI_SERIAL_IO_PROTOCOL_GUID },
+ { .efi_guid_name = "loaded image", .efi_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID },
{ .efi_guid_name = "loaded image device path",
.efi_guid = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID },
- { .efi_guid_name = "ISA io", .efi_guid = EFI_ISA_IO_PROTOCOL_GUID },
+// { .efi_guid_name = "ISA io", .efi_guid = EFI_ISA_IO_PROTOCOL_GUID },
{ .efi_guid_name = "IDE controller init",
.efi_guid = EFI_IDE_CONTROLLER_INIT_PROTOCOL_GUID },
- { .efi_guid_name = "ISA ACPI", .efi_guid = EFI_ISA_ACPI_PROTOCOL_GUID },
+// { .efi_guid_name = "ISA ACPI", .efi_guid = EFI_ISA_ACPI_PROTOCOL_GUID },
{ .efi_guid_name = "PCI", .efi_guid = EFI_PCI_IO_PROTOCOL_GUID },
- { .efi_guid_name = "PCI root", .efi_guid = EFI_PCI_ROOT_IO_GUID },
+// { .efi_guid_name = "PCI root", .efi_guid = EFI_PCI_ROOT_IO_GUID },
{ .efi_guid_name = "PCI enumeration",
.efi_guid = EFI_PCI_ENUMERATION_COMPLETE_GUID },
{ .efi_guid_name = "Driver diagnostics",
@@ -140,44 +185,45 @@
.efi_guid = EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID },
{ .efi_guid_name = "ARP", .efi_guid = EFI_ARP_PROTOCOL_GUID },
{ .efi_guid_name = "IPv4 service binding",
- .efi_guid = EFI_IP4_SERVICE_BINDING_PROTOCOL },
- { .efi_guid_name = "IPv4", .efi_guid = EFI_IP4_PROTOCOL },
+ .efi_guid = EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID },
+ { .efi_guid_name = "IPv4", .efi_guid = EFI_IP4_PROTOCOL_GUID },
{ .efi_guid_name = "IPv4 config",
.efi_guid = EFI_IP4_CONFIG_PROTOCOL_GUID },
- { .efi_guid_name = "IPv6 service binding",
- .efi_guid = EFI_IP6_SERVICE_BINDING_PROTOCOL },
- { .efi_guid_name = "IPv6", .efi_guid = EFI_IP6_PROTOCOL },
- { .efi_guid_name = "IPv6 config",
- .efi_guid = EFI_IP6_CONFIG_PROTOCOL_GUID },
- { .efi_guid_name = "UDPv4", .efi_guid = EFI_UDP4_PROTOCOL },
- { .efi_guid_name = "UDPv4 service binding",
- .efi_guid = EFI_UDP4_SERVICE_BINDING_PROTOCOL },
- { .efi_guid_name = "UDPv6", .efi_guid = EFI_UDP6_PROTOCOL },
- { .efi_guid_name = "UDPv6 service binding",
- .efi_guid = EFI_UDP6_SERVICE_BINDING_PROTOCOL },
- { .efi_guid_name = "TCPv4", .efi_guid = EFI_TCP4_PROTOCOL },
+// { .efi_guid_name = "IPv6 service binding",
+// .efi_guid = EFI_IP6_SERVICE_BINDING_PROTOCOL_GUID },
+// { .efi_guid_name = "IPv6", .efi_guid = EFI_IP6_PROTOCOL },
+// { .efi_guid_name = "IPv6 config",
+// .efi_guid = EFI_IP6_CONFIG_PROTOCOL_GUID },
+// { .efi_guid_name = "UDPv4", .efi_guid = EFI_UDP4_PROTOCOL },
+// { .efi_guid_name = "UDPv4 service binding",
+// .efi_guid = EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID },
+// { .efi_guid_name = "UDPv6", .efi_guid = EFI_UDP6_PROTOCOL },
+// { .efi_guid_name = "UDPv6 service binding",
+// .efi_guid = EFI_UDP6_SERVICE_BINDING_PROTOCOL_GUID },
+ { .efi_guid_name = "TCPv4", .efi_guid = EFI_TCP4_PROTOCOL_GUID },
{ .efi_guid_name = "TCPv4 service binding",
- .efi_guid = EFI_TCP4_SERVICE_BINDING_PROTOCOL },
- { .efi_guid_name = "TCPv6", .efi_guid = EFI_TCP6_PROTOCOL },
+ .efi_guid = EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID },
+ { .efi_guid_name = "TCPv6", .efi_guid = EFI_TCP6_PROTOCOL_GUID },
{ .efi_guid_name = "TCPv6 service binding",
- .efi_guid = EFI_TCP6_SERVICE_BINDING_PROTOCOL },
+ .efi_guid = EFI_TCP6_SERVICE_BINDING_PROTOCOL_GUID },
{ .efi_guid_name = "EFI System partition",
.efi_guid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID },
{ .efi_guid_name = "MBR legacy",
.efi_guid = EFI_PART_TYPE_LEGACY_MBR_GUID },
- { .efi_guid_name = "device tree", .efi_guid = EFI_DEVICE_TREE_GUID },
+// { .efi_guid_name = "device tree", .efi_guid = EFI_DEVICE_TREE_GUID },
{ .efi_guid_name = "USB io", .efi_guid = EFI_USB_IO_PROTOCOL_GUID },
{ .efi_guid_name = "USB2 HC", .efi_guid = EFI_USB2_HC_PROTOCOL_GUID },
{ .efi_guid_name = "component name",
.efi_guid = EFI_COMPONENT_NAME_PROTOCOL_GUID },
- { .efi_guid_name = "component name2",
- .efi_guid = EFI_COMPONENT_NAME2_PROTOCOL_GUID },
+// { .efi_guid_name = "component name2",
+// .efi_guid = EFI_COMPONENT_NAME2_PROTOCOL_GUID },
{ .efi_guid_name = "driver binding",
.efi_guid = EFI_DRIVER_BINDING_PROTOCOL_GUID },
- { .efi_guid_name = "driver configuration",
- .efi_guid = EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID },
+// { .efi_guid_name = "driver configuration",
+// .efi_guid = EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID },
{ .efi_guid_name = "driver configuration2",
.efi_guid = EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID },
+#ifdef TOO_MUCH_PAIN
{ .efi_guid_name = "decompress",
.efi_guid = EFI_DECOMPRESS_PROTOCOL_GUID },
{ .efi_guid_name = "ebc interpreter",
@@ -276,6 +322,7 @@
.efi_guid = EFI_EDID_ACTIVE_PROTOCOL_GUID },
{ .efi_guid_name = "Discovered EDID",
.efi_guid = EFI_EDID_DISCOVERED_PROTOCOL_GUID }
+#endif
};
bool
@@ -441,6 +488,7 @@
}
}
+#if 0
/* Print memory type table. */
static int
efi_print_mem_type(const CHAR16 *varnamearg __unused, uint8_t *data,
@@ -463,6 +511,7 @@
return (CMD_OK);
}
+#endif
/*
* Print FreeBSD variables.
@@ -709,19 +758,22 @@
rv = efi_print_global(varnamearg, data, datasz);
else if (strcmp(str, "freebsd") == 0)
rv = efi_print_freebsd(varnamearg, data, datasz);
- else if (strcmp(str,
- EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME) == 0)
- rv = efi_print_mem_type(varnamearg, data, datasz);
else if (strcmp(str,
"47c7b227-c42a-11d2-8e57-00a0c969723b") == 0)
rv = efi_print_shell_str(varnamearg, data, datasz);
+#if 0
+ else if (strcmp(str,
+ EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME) == 0)
+ rv = efi_print_mem_type(varnamearg, data, datasz);
else if (strcmp(str, MTC_VARIABLE_NAME) == 0) {
printf(" = ");
printf("%u", *((uint32_t *)data)); /* UINT32 */
rv = CMD_OK;
if (pager_output("\n"))
rv = CMD_WARN;
- } else
+ }
+#endif
+ else
rv = efi_print_other_value(data, datasz);
} else if (pager_output("\n"))
rv = CMD_WARN;
diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile
--- a/stand/efi/loader/Makefile
+++ b/stand/efi/loader/Makefile
@@ -70,6 +70,7 @@
CFLAGS+= -I${.CURDIR}/arch/${__arch}
CFLAGS+= -I${EFISRC}/include
CFLAGS+= -I${EFISRC}/include/${__arch}
+CFLAGS+= -I${EDK2INC}
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
CFLAGS+= -I${BOOTSRC}/i386/libi386
CFLAGS+= -DEFI
diff --git a/stand/efi/loader/efi_main.c b/stand/efi/loader/efi_main.c
--- a/stand/efi/loader/efi_main.c
+++ b/stand/efi/loader/efi_main.c
@@ -43,6 +43,7 @@
} else {
RS->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
}
+ __unreachable();
}
void
@@ -50,6 +51,7 @@
{
efi_exit(errno_to_efi_status(status));
+ __unreachable();
}
static CHAR16 *
diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c
--- a/stand/efi/loader/framebuffer.c
+++ b/stand/efi/loader/framebuffer.c
@@ -32,15 +32,20 @@
#include <efi.h>
#include <efilib.h>
-#include <efiuga.h>
#include <efipciio.h>
#include <Protocol/EdidActive.h>
#include <Protocol/EdidDiscovered.h>
+#include <Protocol/GraphicsOutput.h>
+#include <Protocol/UgaDraw.h>
#include <machine/metadata.h>
#include "bootstrap.h"
#include "framebuffer.h"
+/* XXX This may be obsolete -- edk2 doesn't define it anywhere */
+#define EFI_CONSOLE_OUT_DEVICE_GUID \
+{ 0xd3b36f2c, 0xd551, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
+
static EFI_GUID conout_guid = EFI_CONSOLE_OUT_DEVICE_GUID;
EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
static EFI_GUID pciio_guid = EFI_PCI_IO_PROTOCOL_GUID;
@@ -52,7 +57,7 @@
/* Cached EDID. */
struct vesa_edid_info *edid_info = NULL;
-static EFI_GRAPHICS_OUTPUT *gop;
+static EFI_GRAPHICS_OUTPUT_PROTOCOL *gop;
static EFI_UGA_DRAW_PROTOCOL *uga;
static struct named_resolution {
@@ -595,7 +600,7 @@
*/
gop_handle = NULL;
for (i = 0; i < nhandles; i++) {
- EFI_GRAPHICS_OUTPUT *tgop;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *tgop;
void *dummy;
status = OpenProtocolByHandle(hlist[i], &gop_guid, (void **)&tgop);
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -50,7 +50,14 @@
#include <efi.h>
#include <efilib.h>
#include <efichar.h>
-#include <efirng.h>
+
+#include <Guid/DebugImageInfoTable.h>
+#include <Guid/DxeServices.h>
+#include <Guid/Mps.h>
+#include <Guid/SmBios.h>
+#include <Protocol/Rng.h>
+#include <Protocol/SimpleNetwork.h>
+#include <Protocol/SimpleTextIn.h>
#include <uuid.h>
@@ -85,10 +92,25 @@
.arch_zfs_probe = efi_zfs_probe,
};
+// XXX These are from ???? Maybe ACPI which needs to define them?
+// XXX EDK2 doesn't (or didn't as of Feb 2025)
+#define HOB_LIST_TABLE_GUID \
+ { 0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
+#define LZMA_DECOMPRESSION_GUID \
+ { 0xee4e5898, 0x3914, 0x4259, {0x9d, 0x6e, 0xdc, 0x7b, 0xd7, 0x94, 0x3, 0xcf} }
+#define ARM_MP_CORE_INFO_TABLE_GUID \
+ { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }
+#define ESRT_TABLE_GUID \
+ { 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80} }
+#define MEMORY_TYPE_INFORMATION_TABLE_GUID \
+ { 0x4c19049f, 0x4137, 0x4dd3, {0x9c, 0x10, 0x8b, 0x97, 0xa8, 0x3f, 0xfd, 0xfa} }
+#define FDT_TABLE_GUID \
+ { 0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0} }
+
EFI_GUID devid = DEVICE_PATH_PROTOCOL;
EFI_GUID imgid = LOADED_IMAGE_PROTOCOL;
EFI_GUID mps = MPS_TABLE_GUID;
-EFI_GUID netid = EFI_SIMPLE_NETWORK_PROTOCOL;
+EFI_GUID netid = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
EFI_GUID smbios = SMBIOS_TABLE_GUID;
EFI_GUID smbios3 = SMBIOS3_TABLE_GUID;
EFI_GUID dxe = DXE_SERVICES_TABLE_GUID;
@@ -97,9 +119,10 @@
EFI_GUID mpcore = ARM_MP_CORE_INFO_TABLE_GUID;
EFI_GUID esrt = ESRT_TABLE_GUID;
EFI_GUID memtype = MEMORY_TYPE_INFORMATION_TABLE_GUID;
-EFI_GUID debugimg = DEBUG_IMAGE_INFO_TABLE_GUID;
+EFI_GUID debugimg = EFI_DEBUG_IMAGE_INFO_TABLE_GUID;
EFI_GUID fdtdtb = FDT_TABLE_GUID;
-EFI_GUID inputid = SIMPLE_TEXT_INPUT_PROTOCOL;
+EFI_GUID inputid = EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID;
+EFI_GUID rng_guid = EFI_RNG_PROTOCOL_GUID;
/*
* Number of seconds to wait for a keystroke before exiting with failure

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 8:58 PM (14 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25803568
Default Alt Text
D53655.id166099.diff (253 KB)

Event Timeline