summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Ebc/ProcessorBind.h9
-rw-r--r--MdePkg/Include/Guid/Acpi.h6
-rw-r--r--MdePkg/Include/Ia32/ProcessorBind.h9
-rw-r--r--MdePkg/Include/IndustryStandard/PeImage.h22
-rw-r--r--MdePkg/Include/IndustryStandard/Sal.h6
-rw-r--r--MdePkg/Include/IndustryStandard/Scsi.h2
-rw-r--r--MdePkg/Include/IndustryStandard/Tpm12.h6
-rw-r--r--MdePkg/Include/Ipf/ProcessorBind.h12
-rw-r--r--MdePkg/Include/PiDxe.h2
-rw-r--r--MdePkg/Include/X64/ProcessorBind.h9
10 files changed, 60 insertions, 23 deletions
diff --git a/MdePkg/Include/Ebc/ProcessorBind.h b/MdePkg/Include/Ebc/ProcessorBind.h
index 2e254ffb04..7c10230eed 100644
--- a/MdePkg/Include/Ebc/ProcessorBind.h
+++ b/MdePkg/Include/Ebc/ProcessorBind.h
@@ -79,6 +79,15 @@ typedef unsigned long UINTN;
///
#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)
#endif
diff --git a/MdePkg/Include/Guid/Acpi.h b/MdePkg/Include/Guid/Acpi.h
index ea616d3110..91e24f1b22 100644
--- a/MdePkg/Include/Guid/Acpi.h
+++ b/MdePkg/Include/Guid/Acpi.h
@@ -33,9 +33,9 @@
}
#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
extern EFI_GUID gEfiAcpiTableGuid;
diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h
index c452e62f32..c3ca840242 100644
--- a/MdePkg/Include/Ia32/ProcessorBind.h
+++ b/MdePkg/Include/Ia32/ProcessorBind.h
@@ -209,6 +209,15 @@ typedef INT32 INTN;
#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)
#endif
diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/IndustryStandard/PeImage.h
index 97a17e5eb5..310f16b8e3 100644
--- a/MdePkg/Include/IndustryStandard/PeImage.h
+++ b/MdePkg/Include/IndustryStandard/PeImage.h
@@ -134,8 +134,6 @@ typedef struct {
UINT32 Size;
} EFI_IMAGE_DATA_DIRECTORY;
-#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
-
//
// Directory Entries
//
@@ -386,7 +384,7 @@ typedef struct {
#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_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_ALIGN_1BYTES BIT20 ///< 0x00100000
@@ -566,15 +564,15 @@ typedef struct {
//
// Based relocation types.
//
-#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
-#define EFI_IMAGE_REL_BASED_HIGH 1
-#define EFI_IMAGE_REL_BASED_LOW 2
-#define EFI_IMAGE_REL_BASED_HIGHLOW 3
-#define EFI_IMAGE_REL_BASED_HIGHADJ 4
-#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
-#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
-#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
-#define EFI_IMAGE_REL_BASED_DIR64 10
+#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
+#define EFI_IMAGE_REL_BASED_HIGH 1
+#define EFI_IMAGE_REL_BASED_LOW 2
+#define EFI_IMAGE_REL_BASED_HIGHLOW 3
+#define EFI_IMAGE_REL_BASED_HIGHADJ 4
+#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
+#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
+#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR16 9
+#define EFI_IMAGE_REL_BASED_DIR64 10
///
/// Line number format.
diff --git a/MdePkg/Include/IndustryStandard/Sal.h b/MdePkg/Include/IndustryStandard/Sal.h
index ca1bfb2c29..bf6c54b130 100644
--- a/MdePkg/Include/IndustryStandard/Sal.h
+++ b/MdePkg/Include/IndustryStandard/Sal.h
@@ -87,7 +87,7 @@ typedef struct {
/**
Prototype of SAL procedures.
- @param Arg0 Functional identifier.
+ @param FunctionId Functional identifier.
The upper 32 bits are ignored and only the lower 32 bits
are used. The following functional identifiers are defined:
0x01XXXXXX - Architected SAL functional group.
@@ -113,13 +113,13 @@ typedef
SAL_RETURN_REGS
(EFIAPI *SAL_PROC) (
IN UINT64 FunctionId,
+ IN UINT64 Arg1,
IN UINT64 Arg2,
IN UINT64 Arg3,
IN UINT64 Arg4,
IN UINT64 Arg5,
IN UINT64 Arg6,
- IN UINT64 Arg7,
- IN UINT64 Arg8
+ IN UINT64 Arg7
);
//
diff --git a/MdePkg/Include/IndustryStandard/Scsi.h b/MdePkg/Include/IndustryStandard/Scsi.h
index ccb3590bdf..c86c452870 100644
--- a/MdePkg/Include/IndustryStandard/Scsi.h
+++ b/MdePkg/Include/IndustryStandard/Scsi.h
@@ -265,7 +265,7 @@ typedef struct {
// defined here. Please refer to SCSI standard for full value definition.
//
#define EFI_SCSI_ASC_NOT_READY (0x04)
-#define EFI_SCSI_ASCQ_IN_PROGRESS (0x01)
+#define EFI_SCSI_ASCQ_IN_PROGRESS (0x01)
#define EFI_SCSI_ASC_MEDIA_ERR1 (0x10)
#define EFI_SCSI_ASC_MEDIA_ERR2 (0x11)
diff --git a/MdePkg/Include/IndustryStandard/Tpm12.h b/MdePkg/Include/IndustryStandard/Tpm12.h
index eca5eec327..77b2e9ad6b 100644
--- a/MdePkg/Include/IndustryStandard/Tpm12.h
+++ b/MdePkg/Include/IndustryStandard/Tpm12.h
@@ -1052,9 +1052,9 @@ typedef struct tdTPM_TRANSPORT_PUBLIC {
//
// Part 2, section 13.1.1 TPM_TRANSPORT_ATTRIBUTES Definitions
//
-#define TPM_TRANSPORT_ENCRYPT ((UINT32)0x00000001)
-#define TPM_TRANSPORT_LOG ((UINT32)0x00000002)
-#define TPM_TRANSPORT_EXCLUSIVE ((UINT32)0x00000004)
+#define TPM_TRANSPORT_ENCRYPT ((UINT32)BIT0)
+#define TPM_TRANSPORT_LOG ((UINT32)BIT1)
+#define TPM_TRANSPORT_EXCLUSIVE ((UINT32)BIT2)
///
/// Part 2, section 13.2 TPM_TRANSPORT_INTERNAL
diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h
index 3dbeceb585..31940a5788 100644
--- a/MdePkg/Include/Ipf/ProcessorBind.h
+++ b/MdePkg/Include/Ipf/ProcessorBind.h
@@ -237,6 +237,18 @@ typedef struct {
UINT64 r11;
} 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)
#endif
diff --git a/MdePkg/Include/PiDxe.h b/MdePkg/Include/PiDxe.h
index d90368b5fa..3364cdf622 100644
--- a/MdePkg/Include/PiDxe.h
+++ b/MdePkg/Include/PiDxe.h
@@ -1,6 +1,6 @@
/** @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
All rights reserved. This program and the accompanying materials
diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h
index 3b61a3b826..2609a8e427 100644
--- a/MdePkg/Include/X64/ProcessorBind.h
+++ b/MdePkg/Include/X64/ProcessorBind.h
@@ -238,6 +238,15 @@ typedef INT64 INTN;
#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)
#endif