X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FUefi%2FUefiBaseType.h;h=5b8a7620728f6e899cd512864a0017d239a0b86c;hp=fb0ac22dbbf2ddddde38de6f8189faee77c471ff;hb=4e361093575831434922665cf2ed30fbeddf1c7b;hpb=4ab0dff3381de97cbecd8ec48d68c7bacfea1fb3 diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index fb0ac22dbb..5b8a762072 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -1,14 +1,14 @@ /** @file Defines data types and constants introduced in UEFI. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+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. **/ @@ -18,7 +18,7 @@ #include // -// Basical data type definitions introduced in UEFI. +// Basic data type definitions introduced in UEFI. // /// @@ -26,7 +26,7 @@ /// typedef GUID EFI_GUID; /// -/// Function return status for EFI API +/// Function return status for EFI API. /// typedef RETURN_STATUS EFI_STATUS; /// @@ -58,7 +58,7 @@ typedef UINT64 EFI_VIRTUAL_ADDRESS; /// /// EFI Time Abstraction: -/// Year: 1998 - 20XX +/// Year: 1900 - 9999 /// Month: 1 - 12 /// Day: 1 - 31 /// Hour: 0 - 23 @@ -90,7 +90,7 @@ typedef struct { } EFI_IPv4_ADDRESS; /// -/// 16-byte buffer. An IPv6 internet protocol address +/// 16-byte buffer. An IPv6 internet protocol address. /// typedef struct { UINT8 Addr[16]; @@ -114,9 +114,9 @@ typedef union { } EFI_IP_ADDRESS; -// -// Enumeration of EFI_STATUS. -// +/// +/// Enumeration of EFI_STATUS. +///@{ #define EFI_SUCCESS RETURN_SUCCESS #define EFI_LOAD_ERROR RETURN_LOAD_ERROR #define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER @@ -153,16 +153,31 @@ typedef union { #define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE #define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL +///@} - -// -// Define macro to encode the status code. -// +/// +/// Define macro to encode the status code. +/// #define EFIERR(_a) ENCODE_ERROR(_a) #define EFI_ERROR(A) RETURN_ERROR(A) +/// +/// ICMP error definitions +///@{ +#define EFI_NETWORK_UNREACHABLE EFIERR(100) +#define EFI_HOST_UNREACHABLE EFIERR(101) +#define EFI_PROTOCOL_UNREACHABLE EFIERR(102) +#define EFI_PORT_UNREACHABLE EFIERR(103) +///@} +/// +/// Tcp connection status definitions +///@{ +#define EFI_CONNECTION_FIN EFIERR(104) +#define EFI_CONNECTION_RESET EFIERR(105) +#define EFI_CONNECTION_REFUSED EFIERR(106) +///@} // // The EFI memory allocation functions work in units of EFI_PAGEs that are @@ -173,40 +188,38 @@ typedef union { #define EFI_PAGE_MASK 0xFFF #define EFI_PAGE_SHIFT 12 +// +// It is expected that a parameter for the following two macros is of type UINTN. +// Be careful to pass a UINT64 parameter because 32-bit build break may happen +// if << or >> shift operations are performed on a 64-bit integer with 32-bit C compiler. +// #define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0)) - #define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT) /// -/// Limited buffer size for a language code recommended by RFC3066 -/// (42 characters plus a NULL terminator) -/// -#define RFC_3066_ENTRY_SIZE (42 + 1) - -/// -/// The size of a 3 character ISO639 language code. +/// PE32+ Machine type for IA32 UEFI images. /// -#define ISO_639_2_ENTRY_SIZE 3 +#define EFI_IMAGE_MACHINE_IA32 0x014C /// -/// PE32+ Machine type for IA32 UEFI images +/// PE32+ Machine type for IA64 UEFI images. /// -#define EFI_IMAGE_MACHINE_IA32 0x014C +#define EFI_IMAGE_MACHINE_IA64 0x0200 /// -/// PE32+ Machine type for IA64 UEFI images +/// PE32+ Machine type for EBC UEFI images. /// -#define EFI_IMAGE_MACHINE_IA64 0x0200 +#define EFI_IMAGE_MACHINE_EBC 0x0EBC /// -/// PE32+ Machine type for EBC UEFI images +/// PE32+ Machine type for X64 UEFI images. /// -#define EFI_IMAGE_MACHINE_EBC 0x0EBC +#define EFI_IMAGE_MACHINE_X64 0x8664 /// -/// PE32+ Machine type for X64 UEFI images +/// PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images. /// -#define EFI_IMAGE_MACHINE_X64 0x8664 +#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2 #if defined (MDE_CPU_IA32) @@ -230,12 +243,18 @@ typedef union { #define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32) +#elif defined (MDE_CPU_ARM) + +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ + (((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) + #elif defined (MDE_CPU_EBC) /// -/// This is just to make sure you can cross compile with the EBC compiiler. -/// It does not make sense to have a PE loader coded in EBC. You need to -/// understand the basic +/// This is just to make sure you can cross compile with the EBC compiler. +/// It does not make sense to have a PE loader coded in EBC. /// #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)