]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiBaseType.h
Merged in the following trackers from EDK:
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiBaseType.h
index 429cbdcf1dcbba1f3d4071769f43faa485a32cb2..c27dd999459b29c150a789faf1b31e89732e3722 100644 (file)
@@ -1,16 +1,15 @@
-\r
-/* @file\r
+/** @file\r
 \r
   Defines data types and constants introduced in UEFI.\r
 \r
-Copyright (c) 2006 - 2007, 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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\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
+  http://opensource.org/licenses/bsd-license.php\r
+  \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -23,6 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 // Basical data type definitions introduced in UEFI.\r
 // \r
 typedef GUID                      EFI_GUID;\r
+///\r
+/// Function return status for EFI API\r
+///\r
 typedef RETURN_STATUS             EFI_STATUS;\r
 typedef VOID                      *EFI_HANDLE;\r
 \r
@@ -34,7 +36,6 @@ typedef UINTN                     EFI_TPL;
 typedef UINT64                    EFI_LBA;\r
 \r
 \r
-typedef UINT16                    EFI_HII_HANDLE;\r
 typedef UINT16                    STRING_REF;\r
 \r
 typedef UINT64                    EFI_PHYSICAL_ADDRESS;\r
@@ -65,6 +66,29 @@ typedef struct {
   UINT8   Pad2;\r
 } EFI_TIME;\r
 \r
+\r
+//\r
+// Networking Definitions\r
+//\r
+typedef struct {\r
+  UINT8 Addr[4];\r
+} EFI_IPv4_ADDRESS;\r
+\r
+typedef struct {\r
+  UINT8 Addr[16];\r
+} EFI_IPv6_ADDRESS;\r
+\r
+typedef struct {\r
+  UINT8 Addr[32];\r
+} EFI_MAC_ADDRESS;\r
+\r
+typedef union {\r
+  UINT32            Addr[4];\r
+  EFI_IPv4_ADDRESS  v4;\r
+  EFI_IPv6_ADDRESS  v6;\r
+} EFI_IP_ADDRESS;\r
+\r
+\r
 //\r
 // Enumeration of EFI_STATUS.\r
 // \r
@@ -98,6 +122,7 @@ typedef struct {
 #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
@@ -137,5 +162,12 @@ typedef struct {
 #define EFI_PAGE_MASK             0xFFF\r
 #define EFI_PAGE_SHIFT            12\r
 \r
+#define EFI_SIZE_TO_PAGES(a)  (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))\r
+\r
+#define EFI_PAGES_TO_SIZE(a)   ( (a) << EFI_PAGE_SHIFT)\r
+\r
+\r
+#define EFI_MAX_BIT               MAX_BIT\r
+#define EFI_MAX_ADDRESS           MAX_ADDRESS\r
 \r
 #endif\r