Revision: 14465
          http://sourceforge.net/p/edk2/code/14465
Author:   lgao4
Date:     2013-07-12 02:48:08 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
Add defines for MAX values for UEFI data types.
Signed-off-by: Liming Gao <[email protected]>
reviewed-by: [email protected]

Modified Paths:
--------------
    trunk/edk2/MdePkg/Include/Arm/ProcessorBind.h
    trunk/edk2/MdePkg/Include/Base.h
    trunk/edk2/MdePkg/Include/Ia32/ProcessorBind.h
    trunk/edk2/MdePkg/Include/Ipf/ProcessorBind.h
    trunk/edk2/MdePkg/Include/Protocol/DebugPort.h
    trunk/edk2/MdePkg/Include/X64/ProcessorBind.h

Modified: trunk/edk2/MdePkg/Include/Arm/ProcessorBind.h
===================================================================
--- trunk/edk2/MdePkg/Include/Arm/ProcessorBind.h       2013-07-11 08:18:56 UTC 
(rev 14464)
+++ trunk/edk2/MdePkg/Include/Arm/ProcessorBind.h       2013-07-12 02:48:08 UTC 
(rev 14465)
@@ -1,7 +1,7 @@
 /** @file
   Processor or Compiler specific defines and types for ARM.
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
   This program and the accompanying materials                          
   are licensed and made available under the terms and conditions of the BSD 
License         
@@ -93,6 +93,12 @@
 #define MAX_ADDRESS  0xFFFFFFFF
 
 ///
+/// Maximum legal ARM INTN and UINTN values.
+///
+#define MAX_INTN   ((INTN)0x7FFFFFFF)
+#define MAX_UINTN  ((UINTN)0xFFFFFFFF)
+
+///
 /// The stack alignment required for ARM
 ///
 #define CPU_STACK_ALIGNMENT  sizeof(UINT64)

Modified: trunk/edk2/MdePkg/Include/Base.h
===================================================================
--- trunk/edk2/MdePkg/Include/Base.h    2013-07-11 08:18:56 UTC (rev 14464)
+++ trunk/edk2/MdePkg/Include/Base.h    2013-07-12 02:48:08 UTC (rev 14465)
@@ -6,7 +6,7 @@
   environment. There are a set of base libraries in the Mde Package that can
   be used to implement base modules.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
@@ -206,6 +206,17 @@
 ///
 #define NULL  ((VOID *) 0)
 
+///
+/// Maximum values for common UEFI Data Types
+///
+#define MAX_INT8    ((INT8)0x7F)
+#define MAX_UINT8   ((UINT8)0xFF)
+#define MAX_INT16   ((INT16)0x7FFF)
+#define MAX_UINT16  ((UINT16)0xFFFF)
+#define MAX_INT32   ((INT32)0x7FFFFFFF)
+#define MAX_UINT32  ((UINT32)0xFFFFFFFF)
+#define MAX_INT64   ((INT64)0x7FFFFFFFFFFFFFFFULL)
+#define MAX_UINT64  ((UINT64)0xFFFFFFFFFFFFFFFFULL)
 
 #define  BIT0     0x00000001
 #define  BIT1     0x00000002

Modified: trunk/edk2/MdePkg/Include/Ia32/ProcessorBind.h
===================================================================
--- trunk/edk2/MdePkg/Include/Ia32/ProcessorBind.h      2013-07-11 08:18:56 UTC 
(rev 14464)
+++ trunk/edk2/MdePkg/Include/Ia32/ProcessorBind.h      2013-07-12 02:48:08 UTC 
(rev 14465)
@@ -1,7 +1,7 @@
 /** @file
   Processor or Compiler specific defines and types for IA-32 architecture.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 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
@@ -227,6 +227,12 @@
 #define MAX_ADDRESS   0xFFFFFFFF
 
 ///
+/// Maximum legal IA-32 INTN and UINTN values.
+///
+#define MAX_INTN   ((INTN)0x7FFFFFFF)
+#define MAX_UINTN  ((UINTN)0xFFFFFFFF)
+
+///
 /// The stack alignment required for IA-32.
 ///
 #define CPU_STACK_ALIGNMENT   sizeof(UINTN)

Modified: trunk/edk2/MdePkg/Include/Ipf/ProcessorBind.h
===================================================================
--- trunk/edk2/MdePkg/Include/Ipf/ProcessorBind.h       2013-07-11 08:18:56 UTC 
(rev 14464)
+++ trunk/edk2/MdePkg/Include/Ipf/ProcessorBind.h       2013-07-12 02:48:08 UTC 
(rev 14465)
@@ -1,7 +1,7 @@
 /** @file
   Processor or Compiler specific defines and types for Intel Itanium(TM) 
processors.
 
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 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
@@ -237,6 +237,12 @@
 #define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL
 
 ///
+/// Maximum legal Itanium-based INTN and UINTN values.
+///
+#define MAX_INTN   ((INTN)0x7FFFFFFFFFFFFFFFULL)
+#define MAX_UINTN  ((UINTN)0xFFFFFFFFFFFFFFFFULL)
+
+///
 /// Per the Itanium Software Conventions and Runtime Architecture Guide,
 /// section 3.3.4, IPF stack must always be 16-byte aligned.
 ///

Modified: trunk/edk2/MdePkg/Include/Protocol/DebugPort.h
===================================================================
--- trunk/edk2/MdePkg/Include/Protocol/DebugPort.h      2013-07-11 08:18:56 UTC 
(rev 14464)
+++ trunk/edk2/MdePkg/Include/Protocol/DebugPort.h      2013-07-12 02:48:08 UTC 
(rev 14465)
@@ -4,7 +4,7 @@
   This protocol is used by debug agent to communicate with the
   remote debug host.
   
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
   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        
@@ -128,14 +128,16 @@
 //
 #define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
 #define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
-#define gEfiDebugPortVariableGuid   gEfiDebugPortProtocolGuid
 
+extern EFI_GUID  gEfiDebugPortVariableGuid;
+
 //
 // DebugPort device path definitions...
 //
 #define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
-#define gEfiDebugPortDevicePathGuid     gEfiDebugPortProtocolGuid
 
+extern EFI_GUID  gEfiDebugPortDevicePathGuid;
+
 typedef struct {
   EFI_DEVICE_PATH_PROTOCOL  Header;
   EFI_GUID                  Guid;

Modified: trunk/edk2/MdePkg/Include/X64/ProcessorBind.h
===================================================================
--- trunk/edk2/MdePkg/Include/X64/ProcessorBind.h       2013-07-11 08:18:56 UTC 
(rev 14464)
+++ trunk/edk2/MdePkg/Include/X64/ProcessorBind.h       2013-07-12 02:48:08 UTC 
(rev 14465)
@@ -1,7 +1,7 @@
 /** @file
   Processor or Compiler specific defines and types x64 (Intel 64, AMD64).
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
   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        
@@ -228,6 +228,12 @@
 #define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL
 
 ///
+/// Maximum legal x64 INTN and UINTN values.
+///
+#define MAX_INTN   ((INTN)0x7FFFFFFFFFFFFFFFULL)
+#define MAX_UINTN  ((UINTN)0xFFFFFFFFFFFFFFFFULL)
+
+///
 /// The stack alignment required for x64
 ///
 #define CPU_STACK_ALIGNMENT   16

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to