Correct Minor Comments in M3 to M4 review.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6842 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2008-12-04 08:35:07 +00:00
parent 749adca550
commit 14996c9669
10 changed files with 60 additions and 23 deletions

View File

@ -79,6 +79,15 @@ typedef unsigned long UINTN;
/// ///
#define GLOBAL_REMOVE_IF_UNREFERENCED #define GLOBAL_REMOVE_IF_UNREFERENCED
/**
Return the pointer to the first instruction of a function given a function pointer.
On EBC architectures, these two pointer values are the same,
so the implementation of this macro is very simple.
@param p A pointer to a function
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(p) (p) #define FUNCTION_ENTRY_POINT(p) (p)
#endif #endif

View File

@ -33,9 +33,9 @@
} }
#define ACPI_10_TABLE_GUID EFI_ACPI_10_TABLE_GUID #define ACPI_10_TABLE_GUID EFI_ACPI_10_TABLE_GUID
/// //
/// ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID. // ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID.
/// //
#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID #define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID
extern EFI_GUID gEfiAcpiTableGuid; extern EFI_GUID gEfiAcpiTableGuid;

View File

@ -209,6 +209,15 @@ typedef INT32 INTN;
#endif #endif
#endif #endif
/**
Return the pointer to the first instruction of a function given a function pointer.
On IA32 CPU architectures, these two pointer values are the same,
so the implementation of this macro is very simple.
@param p A pointer to a function
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(p) (p) #define FUNCTION_ENTRY_POINT(p) (p)
#endif #endif

View File

@ -134,8 +134,6 @@ typedef struct {
UINT32 Size; UINT32 Size;
} EFI_IMAGE_DATA_DIRECTORY; } EFI_IMAGE_DATA_DIRECTORY;
#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
// //
// Directory Entries // Directory Entries
// //
@ -386,7 +384,7 @@ typedef struct {
#define EFI_IMAGE_SCN_LNK_OTHER BIT8 ///< 0x00000100 ///< Reserved. #define EFI_IMAGE_SCN_LNK_OTHER BIT8 ///< 0x00000100 ///< Reserved.
#define EFI_IMAGE_SCN_LNK_INFO BIT9 ///< 0x00000200 ///< Section contains comments or some other type of information. #define EFI_IMAGE_SCN_LNK_INFO BIT9 ///< 0x00000200 ///< Section contains comments or some other type of information.
#define EFI_IMAGE_SCN_LNK_REMOVE BIT10 ///< 0x00000800 ///< Section contents will not become part of image. #define EFI_IMAGE_SCN_LNK_REMOVE BIT11 ///< 0x00000800 ///< Section contents will not become part of image.
#define EFI_IMAGE_SCN_LNK_COMDAT BIT12 ///< 0x00001000 #define EFI_IMAGE_SCN_LNK_COMDAT BIT12 ///< 0x00001000
#define EFI_IMAGE_SCN_ALIGN_1BYTES BIT20 ///< 0x00100000 #define EFI_IMAGE_SCN_ALIGN_1BYTES BIT20 ///< 0x00100000
@ -573,7 +571,7 @@ typedef struct {
#define EFI_IMAGE_REL_BASED_HIGHADJ 4 #define EFI_IMAGE_REL_BASED_HIGHADJ 4
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5 #define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
#define EFI_IMAGE_REL_BASED_IA64_IMM64 9 #define EFI_IMAGE_REL_BASED_IA64_IMM64 9
#define IMAGE_REL_BASED_MIPS_JMPADDR16 9 #define EFI_IMAGE_REL_BASED_MIPS_JMPADDR16 9
#define EFI_IMAGE_REL_BASED_DIR64 10 #define EFI_IMAGE_REL_BASED_DIR64 10
/// ///

View File

@ -87,7 +87,7 @@ typedef struct {
/** /**
Prototype of SAL procedures. Prototype of SAL procedures.
@param Arg0 Functional identifier. @param FunctionId Functional identifier.
The upper 32 bits are ignored and only the lower 32 bits The upper 32 bits are ignored and only the lower 32 bits
are used. The following functional identifiers are defined: are used. The following functional identifiers are defined:
0x01XXXXXX - Architected SAL functional group. 0x01XXXXXX - Architected SAL functional group.
@ -113,13 +113,13 @@ typedef
SAL_RETURN_REGS SAL_RETURN_REGS
(EFIAPI *SAL_PROC) ( (EFIAPI *SAL_PROC) (
IN UINT64 FunctionId, IN UINT64 FunctionId,
IN UINT64 Arg1,
IN UINT64 Arg2, IN UINT64 Arg2,
IN UINT64 Arg3, IN UINT64 Arg3,
IN UINT64 Arg4, IN UINT64 Arg4,
IN UINT64 Arg5, IN UINT64 Arg5,
IN UINT64 Arg6, IN UINT64 Arg6,
IN UINT64 Arg7, IN UINT64 Arg7
IN UINT64 Arg8
); );
// //

View File

@ -1052,9 +1052,9 @@ typedef struct tdTPM_TRANSPORT_PUBLIC {
// //
// Part 2, section 13.1.1 TPM_TRANSPORT_ATTRIBUTES Definitions // Part 2, section 13.1.1 TPM_TRANSPORT_ATTRIBUTES Definitions
// //
#define TPM_TRANSPORT_ENCRYPT ((UINT32)0x00000001) #define TPM_TRANSPORT_ENCRYPT ((UINT32)BIT0)
#define TPM_TRANSPORT_LOG ((UINT32)0x00000002) #define TPM_TRANSPORT_LOG ((UINT32)BIT1)
#define TPM_TRANSPORT_EXCLUSIVE ((UINT32)0x00000004) #define TPM_TRANSPORT_EXCLUSIVE ((UINT32)BIT2)
/// ///
/// Part 2, section 13.2 TPM_TRANSPORT_INTERNAL /// Part 2, section 13.2 TPM_TRANSPORT_INTERNAL

View File

@ -237,6 +237,18 @@ typedef struct {
UINT64 r11; UINT64 r11;
} PAL_CALL_RETURN; } PAL_CALL_RETURN;
/**
Return the pointer to the first instruction of a function given a function pointer.
For Itanium CPUs, all function calls are made through a PLABEL, so a pointer to a function
is actually a pointer to a PLABEL. The pointer to the first instruction of the function
is contained within the PLABEL. This macro may be used to retrieve a pointer to the first
instruction of a function independent of the CPU architecture being used. This is very
useful when printing function addresses through DEBUG() macros.
@param p A pointer to a function
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(p) (((EFI_PLABEL *)(p))->EntryPoint) #define FUNCTION_ENTRY_POINT(p) (((EFI_PLABEL *)(p))->EntryPoint)
#endif #endif

View File

@ -1,6 +1,6 @@
/** @file /** @file
Root include file for Mde Package DXE_CORE, DXE, SMM, SAL type modules. Root include file for Mde Package DXE_CORE, DXE, RUNTIME, SMM, SAL type modules.
Copyright (c) 2006 - 2007, Intel Corporation Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials

View File

@ -238,6 +238,15 @@ typedef INT64 INTN;
#endif #endif
#endif #endif
/**
Return the pointer to the first instruction of a function given a function pointer.
On x64 CPU architectures, these two pointer values are the same,
so the implementation of this macro is very simple.
@param p A pointer to a function
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(p) (p) #define FUNCTION_ENTRY_POINT(p) (p)
#endif #endif