X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FAArch64%2FProcessorBind.h;h=dad75df1c5796a458a945780c7a090830afc1e37;hp=c5fe874b1bd016de2fc634bfaaaa2ca5a3d926a1;hb=82379bf6603274e81604d5a6f6bb14bdde616286;hpb=ba0a34f15f3a3633c1e8d179ab13595413530b29
diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
index c5fe874b1b..dad75df1c5 100644
--- a/MdePkg/Include/AArch64/ProcessorBind.h
+++ b/MdePkg/Include/AArch64/ProcessorBind.h
@@ -1,7 +1,7 @@
/** @file
Processor or Compiler specific defines and types for AArch64.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
@@ -26,13 +26,59 @@
//
// Make sure we are using the correct packing rules per EFI specification
//
-#ifndef __GNUC__
+#if !defined(__GNUC__) && !defined(__ASSEMBLER__)
#pragma pack()
#endif
-#if _MSC_EXTENSIONS
+#if defined(_MSC_EXTENSIONS)
+
+//
+// Disable some level 4 compilation warnings (same as IA32 and X64)
+//
+
+//
+// Disabling bitfield type checking warnings.
+//
+#pragma warning ( disable : 4214 )
+
+//
+// Disabling the unreferenced formal parameter warnings.
+//
+#pragma warning ( disable : 4100 )
+
+//
+// Disable slightly different base types warning as CHAR8 * can not be set
+// to a constant string.
+//
+#pragma warning ( disable : 4057 )
+
+//
+// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
+//
+#pragma warning ( disable : 4127 )
+
+//
+// This warning is caused by functions defined but not used. For precompiled header only.
+//
+#pragma warning ( disable : 4505 )
+
+//
+// This warning is caused by empty (after preprocessing) source file. For precompiled header only.
+//
+#pragma warning ( disable : 4206 )
+
+//
+// Disable 'potentially uninitialized local variable X used' warnings
+//
+#pragma warning ( disable : 4701 )
+
+//
+// Disable 'potentially uninitialized local pointer variable X used' warnings
+//
+#pragma warning ( disable : 4703 )
+
//
- // use Microsoft* C complier dependent integer width types
+ // use Microsoft* C compiler dependent integer width types
//
typedef unsigned __int64 UINT64;
typedef __int64 INT64;
@@ -45,7 +91,9 @@
typedef unsigned char UINT8;
typedef char CHAR8;
typedef signed char INT8;
+
#else
+
//
// Assume standard AARCH64 alignment.
//
@@ -60,6 +108,7 @@
typedef unsigned char UINT8;
typedef char CHAR8;
typedef signed char INT8;
+
#endif
///
@@ -89,9 +138,9 @@ typedef INT64 INTN;
#define MAX_2_BITS 0xC000000000000000ULL
///
-/// Maximum legal AARCH64 address
+/// Maximum legal AARCH64 address (48 bits for 4 KB page size)
///
-#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
+#define MAX_ADDRESS 0xFFFFFFFFFFFFULL
///
/// Maximum legal AArch64 INTN and UINTN values.
@@ -99,11 +148,22 @@ typedef INT64 INTN;
#define MAX_INTN ((INTN)0x7FFFFFFFFFFFFFFFULL)
#define MAX_UINTN ((UINTN)0xFFFFFFFFFFFFFFFFULL)
+///
+/// Minimum legal AArch64 INTN value.
+///
+#define MIN_INTN (((INTN)-9223372036854775807LL) - 1)
+
///
/// The stack alignment required for AARCH64
///
#define CPU_STACK_ALIGNMENT 16
+///
+/// Page allocation granularity for AARCH64
+///
+#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000)
+#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000)
+
//
// Modifier to ensure that all protocol member functions and EFI intrinsics
// use the correct C calling convention. All protocol member functions and