]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ebc/ProcessorBind.h
Update FUNCTION_ENTRY_POINT() to be compatible with a wider variety of input parameters.
[mirror_edk2.git] / MdePkg / Include / Ebc / ProcessorBind.h
index 2e254ffb04ab609101fbffdf4a65c863fe45156b..966ddb67813b3dbed497932e4f51f061b23e859b 100644 (file)
@@ -4,7 +4,7 @@
   We currently only have one EBC complier so there may be some Intel compiler\r
   specific functions in this file.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006, Intel Corporation<BR>                                                         \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
@@ -68,7 +68,7 @@ typedef unsigned long         UINTN;
 ///\r
 /// Modifier to ensure that all protocol member functions and EFI intrinsics\r
 /// use the correct C calling convention. All protocol member functions and\r
-/// EFI intrinsics are required to modify thier member functions with EFIAPI.\r
+/// EFI intrinsics are required to modify their member functions with EFIAPI.\r
 ///\r
 #define EFIAPI    \r
 \r
@@ -79,7 +79,18 @@ typedef unsigned long         UINTN;
 ///\r
 #define GLOBAL_REMOVE_IF_UNREFERENCED\r
 \r
-#define FUNCTION_ENTRY_POINT(p) (p)\r
+\r
+/**\r
+  Return the pointer to the first instruction of a function given a function pointer.\r
+  On EBC architectures, these two pointer values are the same, \r
+  so the implementation of this macro is very simple.\r
+  \r
+  @param  FunctionPointer   A pointer to a function.\r
+\r
+  @return The pointer to the first instruction of a function given a function pointer.\r
+**/\r
+\r
+#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)\r
 \r
 #endif \r
 \r