]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ipf/ProcessorBind.h
Correct Minor Comments in M3 to M4 review.
[mirror_edk2.git] / MdePkg / Include / Ipf / ProcessorBind.h
index a383868fc62bd306eac0f99b01481427858bc8ec..31940a578854d89591c89f5817aec6f08987c78f 100644 (file)
@@ -16,9 +16,9 @@
 #define __PROCESSOR_BIND_H__\r
 \r
 \r
-//\r
-// Define the processor type so other code can make processor based choices\r
-//\r
+///\r
+/// Define the processor type so other code can make processor based choices\r
+///\r
 #define MDE_CPU_IPF\r
 \r
 \r
 #pragma pack()\r
 \r
 \r
-#if _MSC_EXTENSIONS\r
-\r
+#if __INTEL_COMPILER\r
 //\r
-// Disable warning that make it impossible to compile at /W4\r
-// This only works for Microsoft tools. Copied from the\r
-// IA-32 version of efibind.h\r
+// Disable ICC's remark #869: "Parameter" was never referenced warning.\r
+// This is legal ANSI C code so we disable the remark that is turned on with -Wall\r
 //\r
+#pragma warning ( disable : 869 )\r
 \r
-#if __INTEL_COMPILER\r
 //\r
-// Disable ICC's error #1418: external function definition with no prior declaration\r
+// Disable ICC's remark #1418: external function definition with no prior declaration.\r
+// This is legal ANSI C code so we disable the remark that is turned on with /W4\r
 //\r
 #pragma warning ( disable : 1418 )\r
 \r
-\r
 //\r
-// Disable ICC's error #1419: external declaration in primary source file\r
+// Disable ICC's remark #1419: external declaration in primary source file\r
+// This is legal ANSI C code so we disable the remark that is turned on with /W4\r
 //\r
 #pragma warning ( disable : 1419 )\r
 \r
 #endif\r
 \r
+\r
+#if _MSC_EXTENSIONS\r
+//\r
+// Disable warning that make it impossible to compile at /W4\r
+// This only works for Microsoft tools. \r
+//\r
+\r
 //\r
 // Disabling bitfield type checking warnings.\r
 //\r
   //\r
 \r
   #if _MSC_EXTENSIONS\r
-\r
-\r
     //\r
     // use Microsoft C complier dependent interger width types\r
     //\r
   #else\r
     #ifdef _EFI_P64\r
       //\r
-      // P64 - is Intel Itanium(TM) speak for pointers being 64-bit and longs and ints\r
-      //  are 32-bits\r
+      // P64 - pointers being 64-bit and longs and ints are 32-bits.\r
       //\r
       typedef unsigned long long  UINT64;\r
       typedef long long           INT64;\r
@@ -219,15 +222,9 @@ typedef INT64   INTN;
   #define GLOBAL_REMOVE_IF_UNREFERENCED\r
 #endif\r
 \r
-//\r
-// For IPF boot mode\r
-//\r
-#define RECOVERY_CHECK_CALL 0x3\r
-#define NORMAL_BOOT_CALL    0x0\r
-\r
-//\r
-// A pointer to a function in IPF points to a plabel.\r
-//\r
+///\r
+/// A pointer to a function in IPF points to a plabel.\r
+///\r
 typedef struct {\r
   UINT64  EntryPoint;\r
   UINT64  GP;\r
@@ -240,5 +237,19 @@ typedef struct {
   UINT64                    r11;\r
 } PAL_CALL_RETURN;\r
 \r
+/**\r
+  Return the pointer to the first instruction of a function given a function pointer.\r
+  For Itanium CPUs, all function calls are made through a PLABEL, so a pointer to a function \r
+  is actually a pointer to a PLABEL.  The pointer to the first instruction of the function \r
+  is contained within the PLABEL.  This macro may be used to retrieve a pointer to the first \r
+  instruction of a function independent of the CPU architecture being used.  This is very \r
+  useful when printing function addresses through DEBUG() macros.\r
+  \r
+  @param  p A pointer to a function\r
+\r
+  @return The pointer to the first instruction of a function given a function pointer.\r
+**/\r
+#define FUNCTION_ENTRY_POINT(p) (((EFI_PLABEL *)(p))->EntryPoint)\r
+\r
 #endif\r
 \r