]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Add defines for MAX values for UEFI data types.
authorLiming Gao <liming.gao@intel.com>
Fri, 12 Jul 2013 02:48:08 +0000 (02:48 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jul 2013 02:48:08 +0000 (02:48 +0000)
2. Remove the #defines and add the extern declarations for gEfiDebugPortVariableGuid and gEfiDebugPortDevicePathGuid.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: michael.d.kinney@intel.com
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14465 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Arm/ProcessorBind.h
MdePkg/Include/Base.h
MdePkg/Include/Ia32/ProcessorBind.h
MdePkg/Include/Ipf/ProcessorBind.h
MdePkg/Include/Protocol/DebugPort.h
MdePkg/Include/X64/ProcessorBind.h

index 5528ffba7ab6bbee47110ee4513b827976a66082..8207044684d7743db0c73ed57614dd717a88cadb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types for ARM.\r
 \r
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
@@ -92,6 +92,12 @@ typedef INT32   INTN;
 ///\r
 #define MAX_ADDRESS  0xFFFFFFFF\r
 \r
+///\r
+/// Maximum legal ARM INTN and UINTN values.\r
+///\r
+#define MAX_INTN   ((INTN)0x7FFFFFFF)\r
+#define MAX_UINTN  ((UINTN)0xFFFFFFFF)\r
+\r
 ///\r
 /// The stack alignment required for ARM\r
 ///\r
index fa02f0f5307baf7cdaad89e2d07bb25fd44b95f6..e1ffa7d23b6434c2270a4f11885a5a126cef06cc 100644 (file)
@@ -6,7 +6,7 @@
   environment. There are a set of base libraries in the Mde Package that can\r
   be used to implement base modules.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -206,6 +206,17 @@ struct _LIST_ENTRY {
 ///\r
 #define NULL  ((VOID *) 0)\r
 \r
+///\r
+/// Maximum values for common UEFI Data Types\r
+///\r
+#define MAX_INT8    ((INT8)0x7F)\r
+#define MAX_UINT8   ((UINT8)0xFF)\r
+#define MAX_INT16   ((INT16)0x7FFF)\r
+#define MAX_UINT16  ((UINT16)0xFFFF)\r
+#define MAX_INT32   ((INT32)0x7FFFFFFF)\r
+#define MAX_UINT32  ((UINT32)0xFFFFFFFF)\r
+#define MAX_INT64   ((INT64)0x7FFFFFFFFFFFFFFFULL)\r
+#define MAX_UINT64  ((UINT64)0xFFFFFFFFFFFFFFFFULL)\r
 \r
 #define  BIT0     0x00000001\r
 #define  BIT1     0x00000002\r
index 9874bd836d26c175d2fb569124071efe20e6e697..7beee20953b591a39c7bbb1968001584e5057209 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types for IA-32 architecture.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -226,6 +226,12 @@ typedef INT32   INTN;
 ///\r
 #define MAX_ADDRESS   0xFFFFFFFF\r
 \r
+///\r
+/// Maximum legal IA-32 INTN and UINTN values.\r
+///\r
+#define MAX_INTN   ((INTN)0x7FFFFFFF)\r
+#define MAX_UINTN  ((UINTN)0xFFFFFFFF)\r
+\r
 ///\r
 /// The stack alignment required for IA-32.\r
 ///\r
index 7137c278b62a83c3afdc14b4d5eaaaa75975edf7..a40ecd71e586009db84c12d8cecb66a1196c5778 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types for Intel Itanium(TM) processors.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available \r
 under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
@@ -236,6 +236,12 @@ typedef INT64   INTN;
 ///\r
 #define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL\r
 \r
+///\r
+/// Maximum legal Itanium-based INTN and UINTN values.\r
+///\r
+#define MAX_INTN   ((INTN)0x7FFFFFFFFFFFFFFFULL)\r
+#define MAX_UINTN  ((UINTN)0xFFFFFFFFFFFFFFFFULL)\r
+\r
 ///\r
 /// Per the Itanium Software Conventions and Runtime Architecture Guide,\r
 /// section 3.3.4, IPF stack must always be 16-byte aligned.\r
index 66bcd31c2692c1aa76820fca35562f5ad410db48..2e09033b10859150e82a77f1beffad4b399d48aa 100644 (file)
@@ -4,7 +4,7 @@
   This protocol is used by debug agent to communicate with the\r
   remote debug host.\r
   \r
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -128,13 +128,15 @@ struct _EFI_DEBUGPORT_PROTOCOL {
 //\r
 #define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"\r
 #define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID\r
-#define gEfiDebugPortVariableGuid   gEfiDebugPortProtocolGuid\r
+\r
+extern EFI_GUID  gEfiDebugPortVariableGuid;\r
 \r
 //\r
 // DebugPort device path definitions...\r
 //\r
 #define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID\r
-#define gEfiDebugPortDevicePathGuid     gEfiDebugPortProtocolGuid\r
+\r
+extern EFI_GUID  gEfiDebugPortDevicePathGuid;\r
 \r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL  Header;\r
index b6dd16314df31a59f6eeafa74f2eedd98e4b7723..df324340d1932b8ce87ce750ab3ae145e7783ded 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types x64 (Intel 64, AMD64).\r
 \r
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -227,6 +227,12 @@ typedef INT64   INTN;
 ///\r
 #define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL\r
 \r
+///\r
+/// Maximum legal x64 INTN and UINTN values.\r
+///\r
+#define MAX_INTN   ((INTN)0x7FFFFFFFFFFFFFFFULL)\r
+#define MAX_UINTN  ((UINTN)0xFFFFFFFFFFFFFFFFULL)\r
+\r
 ///\r
 /// The stack alignment required for x64\r
 ///\r