X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=MdePkg%2FInclude%2FUefi%2FUefiBaseType.h;h=fb87559c458d61ec4611dd223c5c16e3523087f9;hb=13c310654c058ae70f8e95b9a47f03fc9d42c7da;hp=35505a5ee2731a1718640330b35a1ccecc1411b8;hpb=8b13229b469f05ec22d76098b052bd6e943fecee;p=mirror_edk2.git diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 35505a5ee2..fb87559c45 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -1,5 +1,4 @@ /** @file - Defines data types and constants introduced in UEFI. Copyright (c) 2006 - 2008, Intel Corporation @@ -18,41 +17,48 @@ #include "Base.h" +// +// Basical data type definitions introduced in UEFI. +// + +/// +/// 128-bit buffer containing a unique identifier value. /// -/// Basical data type definitions introduced in UEFI. -/// typedef GUID EFI_GUID; - /// /// Function return status for EFI API /// typedef RETURN_STATUS EFI_STATUS; +/// +/// A collection of related interfaces. +/// typedef VOID *EFI_HANDLE; - +/// +/// Handle to an event structure. +/// typedef VOID *EFI_EVENT; - +/// +/// Task priority level. +/// typedef UINTN EFI_TPL; - - +/// +/// Logical block address. +/// typedef UINT64 EFI_LBA; - - -typedef UINT16 STRING_REF; - typedef UINT64 EFI_PHYSICAL_ADDRESS; typedef UINT64 EFI_VIRTUAL_ADDRESS; -// -// EFI Time Abstraction: -// Year: 2000 - 20XX -// Month: 1 - 12 -// Day: 1 - 31 -// Hour: 0 - 23 -// Minute: 0 - 59 -// Second: 0 - 59 -// Nanosecond: 0 - 999,999,999 -// TimeZone: -1440 to 1440 or 2047 -// +/// +/// EFI Time Abstraction: +/// Year: 1998 - 20XX +/// Month: 1 - 12 +/// Day: 1 - 31 +/// Hour: 0 - 23 +/// Minute: 0 - 59 +/// Second: 0 - 59 +/// Nanosecond: 0 - 999,999,999 +/// TimeZone: -1440 to 1440 or 2047 +/// typedef struct { UINT16 Year; UINT8 Month; @@ -68,21 +74,31 @@ typedef struct { } EFI_TIME; -// -// Networking Definitions -// +/// +/// 4-byte buffer. An IPv4 internet protocol address. +/// typedef struct { UINT8 Addr[4]; } EFI_IPv4_ADDRESS; +/// +/// 16-byte buffer. An IPv6 internet protocol address +/// typedef struct { UINT8 Addr[16]; } EFI_IPv6_ADDRESS; +/// +/// 32-byte buffer containing a network Media Access Control address. +/// typedef struct { UINT8 Addr[32]; } EFI_MAC_ADDRESS; +/// +/// 16-byte buffer aligned on a 4-byte boundary. +/// An IPv4 or IPv6 internet protocol address. +/// typedef union { UINT32 Addr[4]; EFI_IPv4_ADDRESS v4; @@ -131,8 +147,6 @@ typedef union { #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL -#define NULL_HANDLE ((VOID *) 0) - // // Define macro to encode the status code. // @@ -143,11 +157,10 @@ typedef union { // // Define macros to build data structure signatures from characters. // -#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8)) -#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16)) -#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \ - (EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32)) - +#define EFI_SIGNATURE_16(A, B) SIGNATURE_16 (A, B) +#define EFI_SIGNATURE_32(A, B, C, D) SIGNATURE_32 (A, B, C, D) +#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) SIGNATURE_64 (A, B, C, D, E, F, G, H) + /// /// Returns the byte offset to a field within a structure @@ -171,4 +184,17 @@ typedef union { #define EFI_MAX_BIT MAX_BIT #define EFI_MAX_ADDRESS MAX_ADDRESS + +/// +/// 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. +/// +#define ISO_639_2_ENTRY_SIZE 3 + + #endif