/** @file\r
-\r
Defines data types and constants introduced in UEFI.\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation\r
+ Copyright (c) 2006 - 2008, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
//\r
// Basical data type definitions introduced in UEFI.\r
-// \r
+//\r
+\r
+///\r
+/// 128-bit buffer containing a unique identifier value.\r
+///\r
typedef GUID EFI_GUID;\r
///\r
/// Function return status for EFI API\r
///\r
typedef RETURN_STATUS EFI_STATUS;\r
+///\r
+/// A collection of related interfaces.\r
+///\r
typedef VOID *EFI_HANDLE;\r
-\r
+///\r
+/// Handle to an event structure.\r
+///\r
typedef VOID *EFI_EVENT;\r
-\r
+///\r
+/// Task priority level.\r
+///\r
typedef UINTN EFI_TPL;\r
-\r
-\r
+///\r
+/// Logical block address.\r
+///\r
typedef UINT64 EFI_LBA;\r
-\r
-\r
-typedef UINT16 STRING_REF;\r
-\r
typedef UINT64 EFI_PHYSICAL_ADDRESS;\r
typedef UINT64 EFI_VIRTUAL_ADDRESS;\r
\r
-//\r
-// EFI Time Abstraction:\r
-// Year: 2000 - 20XX\r
-// Month: 1 - 12\r
-// Day: 1 - 31\r
-// Hour: 0 - 23\r
-// Minute: 0 - 59\r
-// Second: 0 - 59\r
-// Nanosecond: 0 - 999,999,999\r
-// TimeZone: -1440 to 1440 or 2047\r
-//\r
+///\r
+/// EFI Time Abstraction:\r
+/// Year: 1998 - 20XX\r
+/// Month: 1 - 12\r
+/// Day: 1 - 31\r
+/// Hour: 0 - 23\r
+/// Minute: 0 - 59\r
+/// Second: 0 - 59\r
+/// Nanosecond: 0 - 999,999,999\r
+/// TimeZone: -1440 to 1440 or 2047\r
+///\r
typedef struct {\r
UINT16 Year;\r
UINT8 Month;\r
} EFI_TIME;\r
\r
\r
-//\r
-// Networking Definitions\r
-//\r
+///\r
+/// 4-byte buffer. An IPv4 internet protocol address.\r
+///\r
typedef struct {\r
UINT8 Addr[4];\r
} EFI_IPv4_ADDRESS;\r
\r
+///\r
+/// 16-byte buffer. An IPv6 internet protocol address\r
+///\r
typedef struct {\r
UINT8 Addr[16];\r
} EFI_IPv6_ADDRESS;\r
\r
+///\r
+/// 32-byte buffer containing a network Media Access Control address.\r
+///\r
typedef struct {\r
UINT8 Addr[32];\r
} EFI_MAC_ADDRESS;\r
\r
+///\r
+/// 16-byte buffer aligned on a 4-byte boundary.\r
+/// An IPv4 or IPv6 internet protocol address.\r
+///\r
typedef union {\r
UINT32 Addr[4];\r
EFI_IPv4_ADDRESS v4;\r
#define EFI_CRC_ERROR RETURN_CRC_ERROR \r
#define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA\r
#define EFI_END_OF_FILE RETURN_END_OF_FILE\r
+#define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE\r
\r
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH \r
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE \r
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL\r
\r
\r
-#define NULL_HANDLE ((VOID *) 0)\r
-\r
//\r
// Define macro to encode the status code.\r
// \r
//\r
// Define macros to build data structure signatures from characters.\r
//\r
-#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))\r
-#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))\r
-#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \\r
- (EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))\r
-\r
+#define EFI_SIGNATURE_16(A, B) SIGNATURE_16 (A, B)\r
+#define EFI_SIGNATURE_32(A, B, C, D) SIGNATURE_32 (A, B, C, D)\r
+#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) SIGNATURE_64 (A, B, C, D, E, F, G, H)\r
+ \r
\r
-//\r
-// Returns the byte offset to a field within a structure\r
-//\r
+///\r
+/// Returns the byte offset to a field within a structure\r
+///\r
#define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))\r
\r
//\r
#define EFI_MAX_BIT MAX_BIT\r
#define EFI_MAX_ADDRESS MAX_ADDRESS\r
\r
+\r
+///\r
+/// Limited buffer size for a language code recommended by RFC3066\r
+/// (42 characters plus a NULL terminator)\r
+///\r
+#define RFC_3066_ENTRY_SIZE (42 + 1)\r
+\r
+///\r
+/// The size of a 3 character ISO639 language code.\r
+///\r
+#define ISO_639_2_ENTRY_SIZE 3\r
+\r
+\r
#endif\r