summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-22 16:22:26 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-22 16:22:26 +0000
commitc7d265a94a3ee2517430e4f19f5b24482e5e7132 (patch)
tree6f74331af15f965bc99f56652cfa75db9794e743 /MdePkg/Library
parent1a5589a183b11fcfa54a0c4b5496d80f233b1ceb (diff)
Checked in part of MDE library instances following PI and UEFI. It includes:
1) UefiLib adds features of RFC 3066/Iso639 language string and driver model protocols installation. 2) PeiCoreEntryPoint following PI. 3) UefiDriverEntryPoint following UEFI/EFI. 4) PeiServicesTablePointerLib following PI for IPF and x86. 5) Remove many CommonHeader.h. If there is only one C file in module, we should add the common headers in C file instead of creating a new CommonHeader.h. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2723 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf1
-rw-r--r--MdePkg/Library/BaseDebugLibNull/CommonHeader.h31
-rw-r--r--MdePkg/Library/BaseDebugLibNull/DebugLib.c9
-rw-r--r--MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf1
-rw-r--r--MdePkg/Library/BasePciCf8Lib/CommonHeader.h33
-rw-r--r--MdePkg/Library/BasePciCf8Lib/PciLib.c13
-rw-r--r--MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf1
-rw-r--r--MdePkg/Library/BasePciExpressLib/CommonHeader.h34
-rw-r--r--MdePkg/Library/BasePciExpressLib/PciLib.c15
-rw-r--r--MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf1
-rw-r--r--MdePkg/Library/BasePciLibCf8/CommonHeader.h32
-rw-r--r--MdePkg/Library/BasePciLibCf8/PciLib.c12
-rw-r--r--MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf1
-rw-r--r--MdePkg/Library/BasePciLibPciExpress/CommonHeader.h32
-rw-r--r--MdePkg/Library/BasePciLibPciExpress/PciLib.c12
-rw-r--r--MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf1
-rw-r--r--MdePkg/Library/BasePeCoffGetEntryPointLib/CommonHeader.h32
-rw-r--r--MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c17
-rw-r--r--MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf1
-rw-r--r--MdePkg/Library/BasePerformanceLibNull/CommonHeader.h33
-rw-r--r--MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c13
-rw-r--r--MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf1
-rw-r--r--MdePkg/Library/BasePostCodeLibDebug/CommonHeader.h33
-rw-r--r--MdePkg/Library/BasePostCodeLibDebug/PostCode.c13
-rw-r--r--MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf1
-rw-r--r--MdePkg/Library/BasePostCodeLibPort80/CommonHeader.h33
-rw-r--r--MdePkg/Library/BasePostCodeLibPort80/PostCode.c13
-rw-r--r--MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf1
-rw-r--r--MdePkg/Library/BaseTimerLibNullTemplate/CommonHeader.h32
-rw-r--r--MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c12
-rw-r--r--MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c13
-rw-r--r--MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf1
-rw-r--r--MdePkg/Library/BaseUefiDecompressLib/CommonHeader.h33
-rw-r--r--MdePkg/Library/DxeCoreEntryPoint/CommonHeader.h33
-rw-r--r--MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c13
-rw-r--r--MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf1
-rw-r--r--MdePkg/Library/DxeCoreHobLib/CommonHeader.h33
-rw-r--r--MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf3
-rw-r--r--MdePkg/Library/DxeCoreHobLib/HobLib.c16
-rw-r--r--MdePkg/Library/DxeCoreHobLib/InternalHobLib.h (renamed from MdePkg/Library/DxeCoreHobLib/HobLib.h)5
-rw-r--r--MdePkg/Library/DxeHobLib/CommonHeader.h35
-rw-r--r--MdePkg/Library/DxeHobLib/DxeHobLib.inf1
-rw-r--r--MdePkg/Library/DxeHobLib/HobLib.c16
-rw-r--r--MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf1
-rw-r--r--MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c14
-rw-r--r--MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLibInternals.h5
-rw-r--r--MdePkg/Library/DxePcdLib/CommonHeader.h35
-rw-r--r--MdePkg/Library/DxePcdLib/DxePcdLib.c15
-rw-r--r--MdePkg/Library/DxePcdLib/DxePcdLib.inf1
-rw-r--r--MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c15
-rw-r--r--MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf1
-rw-r--r--MdePkg/Library/PeiCoreEntryPoint/CommonHeader.h31
-rw-r--r--MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c43
-rw-r--r--MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf1
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/CommonHeader.h34
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c14
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLibInternals.h5
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf1
-rw-r--r--MdePkg/Library/PeiPcdLib/CommonHeader.h35
-rw-r--r--MdePkg/Library/PeiPcdLib/PeiPcdLib.c15
-rw-r--r--MdePkg/Library/PeiPcdLib/PeiPcdLib.inf1
-rw-r--r--MdePkg/Library/PeiResourcePublicationLib/CommonHeader.h33
-rw-r--r--MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c14
-rw-r--r--MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf1
-rw-r--r--MdePkg/Library/PeiServicesLib/CommonHeader.h32
-rw-r--r--MdePkg/Library/PeiServicesLib/PeiServicesLib.c12
-rw-r--r--MdePkg/Library/PeiServicesLib/PeiServicesLib.inf1
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c12
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf1
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.S36
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.asm41
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.c25
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h31
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c50
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.msa50
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.S36
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.asm38
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c46
-rw-r--r--MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.msa43
-rw-r--r--MdePkg/Library/PeimEntryPoint/CommonHeader.h32
-rw-r--r--MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c12
-rw-r--r--MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf1
-rw-r--r--MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c12
-rw-r--r--MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf1
-rw-r--r--MdePkg/Library/UefiBootServicesTableLib/CommonHeader.h32
-rw-r--r--MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c12
-rw-r--r--MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf1
-rw-r--r--MdePkg/Library/UefiDebugLibConOut/CommonHeader.h36
-rw-r--r--MdePkg/Library/UefiDebugLibConOut/DebugLib.c17
-rw-r--r--MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf1
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/CommonHeader.h36
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/DebugLib.c16
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf1
-rw-r--r--MdePkg/Library/UefiDevicePathLib/CommonHeader.h37
-rw-r--r--MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c17
-rw-r--r--MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf1
-rw-r--r--MdePkg/Library/UefiDevicePathLibDevicePathProtocol/CommonHeader.h38
-rw-r--r--MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c18
-rw-r--r--MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf1
-rw-r--r--MdePkg/Library/UefiDriverEntryPoint/CommonHeader.h34
-rw-r--r--MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c50
-rw-r--r--MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf1
-rw-r--r--MdePkg/Library/UefiLib/CommonHeader.h2
-rw-r--r--MdePkg/Library/UefiLib/UefiLib.inf5
-rw-r--r--MdePkg/Library/UefiLib/UefiLib.msa21
-rw-r--r--MdePkg/Library/UefiLib/UefiNotTiano.c42
-rw-r--r--MdePkg/Library/UefiRuntimeServicesTableLib/CommonHeader.h32
-rw-r--r--MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c12
-rw-r--r--MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf1
109 files changed, 844 insertions, 1114 deletions
diff --git a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf b/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
index bc939c270..7d5f9264a 100644
--- a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+++ b/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
@@ -44,7 +44,6 @@
[Sources.common]
DebugLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BaseDebugLibNull/CommonHeader.h b/MdePkg/Library/BaseDebugLibNull/CommonHeader.h
deleted file mode 100644
index 27168bfa7..000000000
--- a/MdePkg/Library/BaseDebugLibNull/CommonHeader.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/BaseDebugLibNull/DebugLib.c b/MdePkg/Library/BaseDebugLibNull/DebugLib.c
index 1d3e719b0..d45782109 100644
--- a/MdePkg/Library/BaseDebugLibNull/DebugLib.c
+++ b/MdePkg/Library/BaseDebugLibNull/DebugLib.c
@@ -13,9 +13,14 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+
+//
+// The Library classes this module produced
+//
+#include <Library/DebugLib.h>
/**
diff --git a/MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf b/MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
index 2814b59a7..f5505dba7 100644
--- a/MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
+++ b/MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
@@ -45,7 +45,6 @@
[Sources.common]
PciLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePciCf8Lib/CommonHeader.h b/MdePkg/Library/BasePciCf8Lib/CommonHeader.h
deleted file mode 100644
index 01be6d532..000000000
--- a/MdePkg/Library/BasePciCf8Lib/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PciCf8Lib.h>
-#include <Library/IoLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePciCf8Lib/PciLib.c b/MdePkg/Library/BasePciCf8Lib/PciLib.c
index 77676b7eb..0c8ae6b3c 100644
--- a/MdePkg/Library/BasePciCf8Lib/PciLib.c
+++ b/MdePkg/Library/BasePciCf8Lib/PciLib.c
@@ -15,9 +15,18 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PciCf8Lib.h>
+#include <Library/IoLib.h>
+#include <Library/DebugLib.h>
//
// Declare I/O Ports used to perform PCI Confguration Cycles
diff --git a/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf b/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
index 18868b98c..d184d6ce4 100644
--- a/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+++ b/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
@@ -45,7 +45,6 @@
[Sources.common]
PciLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePciExpressLib/CommonHeader.h b/MdePkg/Library/BasePciExpressLib/CommonHeader.h
deleted file mode 100644
index 0f71c42ce..000000000
--- a/MdePkg/Library/BasePciExpressLib/CommonHeader.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PciExpressLib.h>
-#include <Library/IoLib.h>
-#include <Library/DebugLib.h>
-#include <Library/PcdLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePciExpressLib/PciLib.c b/MdePkg/Library/BasePciExpressLib/PciLib.c
index a98e66dd4..30536dfbf 100644
--- a/MdePkg/Library/BasePciExpressLib/PciLib.c
+++ b/MdePkg/Library/BasePciExpressLib/PciLib.c
@@ -21,9 +21,20 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PciExpressLib.h>
+#include <Library/IoLib.h>
+#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
+
/**
Assert the validity of a PCI address. A valid PCI address should contain 1's
diff --git a/MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf b/MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
index 5914d4d0e..09593dc94 100644
--- a/MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
+++ b/MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
@@ -45,7 +45,6 @@
[Sources.common]
PciLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePciLibCf8/CommonHeader.h b/MdePkg/Library/BasePciLibCf8/CommonHeader.h
deleted file mode 100644
index 07c1b07df..000000000
--- a/MdePkg/Library/BasePciLibCf8/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PciLib.h>
-#include <Library/PciCf8Lib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePciLibCf8/PciLib.c b/MdePkg/Library/BasePciLibCf8/PciLib.c
index 1bf9c87ea..52ef02e31 100644
--- a/MdePkg/Library/BasePciLibCf8/PciLib.c
+++ b/MdePkg/Library/BasePciLibCf8/PciLib.c
@@ -15,9 +15,17 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PciLib.h>
+#include <Library/PciCf8Lib.h>
/**
Reads an 8-bit PCI configuration register.
diff --git a/MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf b/MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
index 91ea0eeaa..4d74eca60 100644
--- a/MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+++ b/MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
@@ -45,7 +45,6 @@
[Sources.common]
PciLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePciLibPciExpress/CommonHeader.h b/MdePkg/Library/BasePciLibPciExpress/CommonHeader.h
deleted file mode 100644
index b101e3f2d..000000000
--- a/MdePkg/Library/BasePciLibPciExpress/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PciLib.h>
-#include <Library/PciExpressLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePciLibPciExpress/PciLib.c b/MdePkg/Library/BasePciLibPciExpress/PciLib.c
index 0b828dd8c..de7c761f7 100644
--- a/MdePkg/Library/BasePciLibPciExpress/PciLib.c
+++ b/MdePkg/Library/BasePciLibPciExpress/PciLib.c
@@ -15,9 +15,17 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PciLib.h>
+#include <Library/PciExpressLib.h>
/**
Reads an 8-bit PCI configuration register.
diff --git a/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf b/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
index 99bb3f767..a3423d3a6 100644
--- a/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+++ b/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
@@ -44,7 +44,6 @@
[Sources.common]
PeCoffGetEntryPoint.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePeCoffGetEntryPointLib/CommonHeader.h b/MdePkg/Library/BasePeCoffGetEntryPointLib/CommonHeader.h
deleted file mode 100644
index fcc8d3ebe..000000000
--- a/MdePkg/Library/BasePeCoffGetEntryPointLib/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PeCoffGetEntryPointLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c b/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
index 057a171e9..c44bb6420 100644
--- a/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
+++ b/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c
@@ -14,13 +14,20 @@
**/
-
-
//
-// Include common header file for this module.
+// The package level header files this module uses
+//
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
//
-#include "CommonHeader.h"
-#include <Include/IndustryStandard/PeImage.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/PeCoffGetEntryPointLib.h>
+#include <Library/DebugLib.h>
+
+#include <IndustryStandard/PeImage.h>
/**
Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded
diff --git a/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf b/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
index 9f50ecd85..b3d87c5ca 100644
--- a/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
+++ b/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
@@ -45,7 +45,6 @@
[Sources.common]
PerformanceLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePerformanceLibNull/CommonHeader.h b/MdePkg/Library/BasePerformanceLibNull/CommonHeader.h
deleted file mode 100644
index 17bcd31a5..000000000
--- a/MdePkg/Library/BasePerformanceLibNull/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PerformanceLib.h>
-#include <Library/DebugLib.h>
-#include <Library/PcdLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c b/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c
index 1785bab28..e9f21b577 100644
--- a/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c
+++ b/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c
@@ -15,9 +15,18 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PerformanceLib.h>
+#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
/**
Creates a record for the beginning of a performance measurement.
diff --git a/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf b/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
index bc8e36d4d..466480bd6 100644
--- a/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
+++ b/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
@@ -44,7 +44,6 @@
[Sources.common]
PostCode.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePostCodeLibDebug/CommonHeader.h b/MdePkg/Library/BasePostCodeLibDebug/CommonHeader.h
deleted file mode 100644
index 7d68ffe3c..000000000
--- a/MdePkg/Library/BasePostCodeLibDebug/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PostCodeLib.h>
-#include <Library/DebugLib.h>
-#include <Library/PcdLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c
index f929ba811..7b5896f7b 100644
--- a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c
+++ b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c
@@ -14,9 +14,18 @@
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PostCodeLib.h>
+#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
/**
Sends an 32-bit value to a POST card.
diff --git a/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf b/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf
index b43a00619..117114a7e 100644
--- a/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf
+++ b/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf
@@ -44,7 +44,6 @@
[Sources.common]
PostCode.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BasePostCodeLibPort80/CommonHeader.h b/MdePkg/Library/BasePostCodeLibPort80/CommonHeader.h
deleted file mode 100644
index 12ef16fb1..000000000
--- a/MdePkg/Library/BasePostCodeLibPort80/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PostCodeLib.h>
-#include <Library/PcdLib.h>
-#include <Library/IoLib.h>
-
-#endif
diff --git a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c
index a5e8a65be..d3b11e66c 100644
--- a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c
+++ b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c
@@ -14,9 +14,18 @@
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PostCodeLib.h>
+#include <Library/PcdLib.h>
+#include <Library/IoLib.h>
/**
Sends an 32-bit value to a POST card.
diff --git a/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf b/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
index 5a48211af..6147e14bc 100644
--- a/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+++ b/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
@@ -47,7 +47,6 @@
[Sources.common]
TimerLibNull.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BaseTimerLibNullTemplate/CommonHeader.h b/MdePkg/Library/BaseTimerLibNullTemplate/CommonHeader.h
deleted file mode 100644
index c65882cc1..000000000
--- a/MdePkg/Library/BaseTimerLibNullTemplate/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/TimerLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c b/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
index caca0c3cc..ddfc6fed3 100644
--- a/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
+++ b/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
@@ -15,9 +15,17 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/TimerLib.h>
+#include <Library/DebugLib.h>
/**
Stalls the CPU for at least the given number of microseconds.
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
index 15917a1c1..36d9a47e7 100644
--- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
+++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
@@ -15,9 +15,18 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Base.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/UefiDecompressLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseMemoryLib.h>
#include "BaseUefiDecompressLibInternals.h"
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
index 979c95b44..2d613647a 100644
--- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
+++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
@@ -45,7 +45,6 @@
[Sources.common]
BaseUefiDecompressLibInternals.h
BaseUefiDecompressLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/BaseUefiDecompressLib/CommonHeader.h b/MdePkg/Library/BaseUefiDecompressLib/CommonHeader.h
deleted file mode 100644
index 38ef4e221..000000000
--- a/MdePkg/Library/BaseUefiDecompressLib/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Base.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/UefiDecompressLib.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/DxeCoreEntryPoint/CommonHeader.h b/MdePkg/Library/DxeCoreEntryPoint/CommonHeader.h
deleted file mode 100644
index 6f409d6e8..000000000
--- a/MdePkg/Library/DxeCoreEntryPoint/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/DxeCoreEntryPoint.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-
-#endif
diff --git a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
index 34e846147..e410d41f2 100644
--- a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
+++ b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c
@@ -13,9 +13,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/DxeCoreEntryPoint.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
//
// Cache copy of HobList pointer.
diff --git a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
index ad1bb48a4..7af788720 100644
--- a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
+++ b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
@@ -44,7 +44,6 @@
[Sources.common]
DxeCoreEntryPoint.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/DxeCoreHobLib/CommonHeader.h b/MdePkg/Library/DxeCoreHobLib/CommonHeader.h
deleted file mode 100644
index 2ea383a2d..000000000
--- a/MdePkg/Library/DxeCoreHobLib/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/HobLib.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf b/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
index b85faa09f..fd1fd242f 100644
--- a/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
+++ b/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
@@ -44,9 +44,8 @@
################################################################################
[Sources.common]
- HobLib.h
+ InternalHobLib.h
HobLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/DxeCoreHobLib/HobLib.c b/MdePkg/Library/DxeCoreHobLib/HobLib.c
index 8175bf67a..751d7cfef 100644
--- a/MdePkg/Library/DxeCoreHobLib/HobLib.c
+++ b/MdePkg/Library/DxeCoreHobLib/HobLib.c
@@ -14,12 +14,22 @@
**/
+
+//
+// The package level header files this module uses
+//
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
//
-// Include common header file for this module.
+// The Library classes this module consumes
//
-#include "CommonHeader.h"
+#include <Library/HobLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseMemoryLib.h>
-#include "HobLib.h"
+#include "InternalHobLib.h""
/**
Returns the pointer to the HOB list.
diff --git a/MdePkg/Library/DxeCoreHobLib/HobLib.h b/MdePkg/Library/DxeCoreHobLib/InternalHobLib.h
index 1ff08af93..8f0347639 100644
--- a/MdePkg/Library/DxeCoreHobLib/HobLib.h
+++ b/MdePkg/Library/DxeCoreHobLib/InternalHobLib.h
@@ -17,11 +17,6 @@
#ifndef __DXE_ENTRY_POINT_HOB_LIB_H__
#define __DXE_ENTRY_POINT_HOB_LIB_H__
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
extern VOID *gHobList;
#endif
diff --git a/MdePkg/Library/DxeHobLib/CommonHeader.h b/MdePkg/Library/DxeHobLib/CommonHeader.h
deleted file mode 100644
index b0ccd700f..000000000
--- a/MdePkg/Library/DxeHobLib/CommonHeader.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Guid/HobList.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/HobLib.h>
-#include <Library/UefiLib.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/DxeHobLib/DxeHobLib.inf b/MdePkg/Library/DxeHobLib/DxeHobLib.inf
index d5cf9d567..04437e003 100644
--- a/MdePkg/Library/DxeHobLib/DxeHobLib.inf
+++ b/MdePkg/Library/DxeHobLib/DxeHobLib.inf
@@ -46,7 +46,6 @@
[Sources.common]
HobLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/DxeHobLib/HobLib.c b/MdePkg/Library/DxeHobLib/HobLib.c
index c77e07172..b05f14386 100644
--- a/MdePkg/Library/DxeHobLib/HobLib.c
+++ b/MdePkg/Library/DxeHobLib/HobLib.c
@@ -15,11 +15,21 @@
**/
-
//
-// Include common header file for this module.
+// The package level header files this module uses
+//
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Guid/HobList.h>
+//
+// The Library classes this module consumes
//
-#include "CommonHeader.h"
+#include <Library/HobLib.h>
+#include <Library/UefiLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseMemoryLib.h>
STATIC VOID *mHobList = NULL;
diff --git a/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf b/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
index 942897963..e3032a9a5 100644
--- a/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
+++ b/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
@@ -46,7 +46,6 @@
[Sources.common]
MemoryAllocationLibInternals.h
MemoryAllocationLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c
index b25b63773..e26accb31 100644
--- a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c
@@ -15,9 +15,19 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
#include "MemoryAllocationLibInternals.h"
diff --git a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLibInternals.h b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLibInternals.h
index 0d8685e12..1234e2e6c 100644
--- a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLibInternals.h
+++ b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLibInternals.h
@@ -17,11 +17,6 @@
#ifndef __DXE_MEMORY_ALLOCATION_LIB_INTERNALS_H__
#define __DXE_MEMORY_ALLOCATION_LIB_INTERNALS_H__
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
/**
Allocates one or more 4KB pages of a certain memory type.
diff --git a/MdePkg/Library/DxePcdLib/CommonHeader.h b/MdePkg/Library/DxePcdLib/CommonHeader.h
deleted file mode 100644
index 9d2a5e13e..000000000
--- a/MdePkg/Library/DxePcdLib/CommonHeader.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/Pcd.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/PcdLib.h>
-#include <Library/DebugLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c
index 380d167af..b05c6550c 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.c
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c
@@ -16,9 +16,20 @@ Module Name: DxePcdLib.c
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Protocol/Pcd.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/PcdLib.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/BaseMemoryLib.h>
static PCD_PROTOCOL *mPcd;
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.inf b/MdePkg/Library/DxePcdLib/DxePcdLib.inf
index eb6459fe4..a2e90258c 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.inf
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -47,7 +47,6 @@
[Sources.common]
DxePcdLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c
index cda2b9639..5aea46e08 100644
--- a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c
+++ b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c
@@ -14,11 +14,20 @@
**/
-
//
-// Include common header file for this module.
+// The package level header files this module uses
+//
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Guid/DxeServices.h>
+//
+// The Library classes this module consumes
//
-#include "CommonHeader.h"
+#include <Library/DxeServicesTableLib.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiLib.h>
//
// Cache copy of the DXE Services Table
diff --git a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
index a5a47fd50..1f870c24b 100644
--- a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
+++ b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
@@ -46,7 +46,6 @@
[Sources.common]
DxeServicesTableLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiCoreEntryPoint/CommonHeader.h b/MdePkg/Library/PeiCoreEntryPoint/CommonHeader.h
deleted file mode 100644
index df5adc84a..000000000
--- a/MdePkg/Library/PeiCoreEntryPoint/CommonHeader.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PeiCoreEntryPoint.h>
-
-#endif
diff --git a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
index ab2a17239..0dc56b3ae 100644
--- a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
+++ b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c
@@ -1,7 +1,7 @@
/** @file
Entry point to a the PEI Core.
-Copyright (c) 2007, Intel Corporation<BR>
+Copyright (c) 2006 - 2007, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -13,11 +13,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module produced
+//
+#include <Library/PeiCoreEntryPoint.h>
/**
+
Enrty point to PEI core.
@param SecCoreData Points to a data structure containing
@@ -40,23 +48,21 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
and/or code in these early PPIs.
**/
-EFI_STATUS
-EFIAPI
-_ModuleEntryPoint (
- IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
- IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
- )
+VOID
+EFIAPI
+_ModuleEntryPoint(
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
+)
{
- //
- // Call the PEI Core entry point
- //
- return ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);
+ ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);
}
/**
+
Wrapper of enrty point to PEI core.
-
+
@param SecCoreData Points to a data structure containing
information about the PEI core's
operating environment, such as the size
@@ -77,11 +83,12 @@ _ModuleEntryPoint (
and/or code in these early PPIs.
**/
-EFI_STATUS
+VOID
+EFIAPI
EfiMain (
- IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
- IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
)
{
- return _ModuleEntryPoint (SecCoreData, PpiList);
+ _ModuleEntryPoint (SecCoreData, PpiList);
}
diff --git a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
index 0d48630d8..06456e731 100644
--- a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
+++ b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
@@ -44,7 +44,6 @@
[Sources.common]
PeiCoreEntryPoint.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/CommonHeader.h b/MdePkg/Library/PeiMemoryAllocationLib/CommonHeader.h
deleted file mode 100644
index 5c99e0789..000000000
--- a/MdePkg/Library/PeiMemoryAllocationLib/CommonHeader.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/MemoryAllocationLib.h>
-#include <Library/PeiServicesTablePointerLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
index 32c62c25f..156111cef 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
@@ -15,9 +15,19 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/MemoryAllocationLib.h>
+#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
#include "MemoryAllocationLibInternals.h"
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLibInternals.h b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLibInternals.h
index 73745d972..55e594fb3 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLibInternals.h
+++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLibInternals.h
@@ -17,11 +17,6 @@
#ifndef __PEI_MEMORY_ALLOCATION_LIB_INTERNALS_H__
#define __PEI_MEMORY_ALLOCATION_LIB_INTERNALS_H__
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
/**
Allocates one or more 4KB pages of a certain memory type.
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf b/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
index ee462f845..cf8c78920 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
+++ b/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
@@ -46,7 +46,6 @@
[Sources.common]
MemoryAllocationLibInternals.h
MemoryAllocationLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiPcdLib/CommonHeader.h b/MdePkg/Library/PeiPcdLib/CommonHeader.h
deleted file mode 100644
index dae5581d1..000000000
--- a/MdePkg/Library/PeiPcdLib/CommonHeader.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Ppi/Pcd.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/PcdLib.h>
-#include <Library/DebugLib.h>
-#include <Library/PeiServicesTablePointerLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
index 76102c6a2..f686d4e86 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
@@ -18,9 +18,20 @@ Module Name: PeiPcdLib.c
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Ppi/Pcd.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/PcdLib.h>
+#include <Library/DebugLib.h>
+#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/BaseMemoryLib.h>
/**
The constructor function retrieve the PCD_PPI pointer.
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf b/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
index 25c1e7801..60de92963 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
@@ -46,7 +46,6 @@
[Sources.common]
PeiPcdLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiResourcePublicationLib/CommonHeader.h b/MdePkg/Library/PeiResourcePublicationLib/CommonHeader.h
deleted file mode 100644
index 9aef9c825..000000000
--- a/MdePkg/Library/PeiResourcePublicationLib/CommonHeader.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/ResourcePublicationLib.h>
-#include <Library/PeiServicesLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c
index fca01dcd5..94292f2f3 100644
--- a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c
+++ b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c
@@ -16,9 +16,19 @@
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/ResourcePublicationLib.h>
+#include <Library/PeiServicesLib.h>
+#include <Library/DebugLib.h>
+
/**
diff --git a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
index ade69a994..84da87a41 100644
--- a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
+++ b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
@@ -44,7 +44,6 @@
[Sources.common]
PeiResourcePublicationLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiServicesLib/CommonHeader.h b/MdePkg/Library/PeiServicesLib/CommonHeader.h
deleted file mode 100644
index abc698784..000000000
--- a/MdePkg/Library/PeiServicesLib/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PeiServicesLib.h>
-#include <Library/PeiServicesTablePointerLib.h>
-
-#endif
diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
index b6eeb7dd8..7294618a8 100644
--- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
+++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c
@@ -15,9 +15,17 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PeiServicesLib.h>
+#include <Library/PeiServicesTablePointerLib.h>
/**
This service enables a given PEIM to register an interface into the PEI Foundation.
diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf b/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
index a7d40b1a7..daa421b46 100644
--- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
+++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
@@ -44,7 +44,6 @@
[Sources.common]
PeiServicesLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
index 6c4d7851e..c923f601d 100644
--- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
+++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
@@ -17,9 +17,17 @@
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/DebugLib.h>
static EFI_PEI_SERVICES **gPeiServices;
diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
index bd8c31169..dc997ad62 100644
--- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
+++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
@@ -47,7 +47,6 @@
[Sources.common]
PeiServicesTablePointer.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.S b/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.S
new file mode 100644
index 000000000..22d32acb1
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.S
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+# ReadIdtr.Asm
+#
+# Abstract:
+#
+# AsmPeiSevicesTablePointer function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+.globl ASM_PFX(AsmPeiSevicesTablePointer)
+
+#------------------------------------------------------------------------------
+# EFI_PEI_SERVICES **
+# EFIAPI
+# AsmPeiSevicesTablePointer (
+# );
+#------------------------------------------------------------------------------
+ASM_PFX(AsmPeiSevicesTablePointer):
+ movl 4(%esp), %eax
+ sidt (%eax)
+ movl -4(%eax), %eax
+ ret
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.asm b/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.asm
new file mode 100644
index 000000000..74f19afa6
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.asm
@@ -0,0 +1,41 @@
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006, Intel Corporation
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+; Module Name:
+;
+; AsmPeiSevicesTablePointer.Asm
+;
+; Abstract:
+;
+; AsmPeiSevicesTablePointer function
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+ .386
+ .model flat,C
+ .code
+
+;------------------------------------------------------------------------------
+; EFI_PEI_SERVICES **
+; EFIAPI
+; AsmPeiSevicesTablePointer (
+; );
+;------------------------------------------------------------------------------
+PeiServicesTablePointer PROC
+ mov eax, [esp + 4]
+ sidt fword ptr [eax]
+ mov eax, [eax - 4]
+ ret
+PeiServicesTablePointer ENDP
+
+ END
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.c
new file mode 100644
index 000000000..aa578ee13
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/Ia32/AsmPeiSevicesTablePointer.c
@@ -0,0 +1,25 @@
+/** @file
+ AsmReadIdtr function
+
+ Copyright (c) 2006 - 2007, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+EFI_PEI_SERVICES **
+EFIAPI
+AsmPeiSevicesTablePointer (
+ VOID
+ )
+{
+ _asm {
+ sidt fword ptr [eax]
+ mov eax, [eax - 4]
+ }
+}
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h b/MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h
new file mode 100644
index 000000000..44bc71b53
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/InternalPeiServicesTablePointer.h
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2006 - 2007 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ InternalPeiServicesTablePointer.h
+
+
+--*/
+
+#ifndef __INTERNAL_PEI_SERVICES_TABLE_POINTER_H__
+#define __INTERNAL_PEI_SERVICES_TABLE_POINTER_H__
+
+extern
+EFI_PEI_SERVICES **
+EFIAPI
+AsmPeiSevicesTablePointer (
+ VOID
+ );
+
+
+#endif \ No newline at end of file
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
new file mode 100644
index 000000000..4c9b3d354
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c
@@ -0,0 +1,50 @@
+/*++
+
+Copyright (c) 2006 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ PeiServicesTablePointer.c
+
+Abstract:
+
+ PEI Services Table Pointer Library.
+
+--*/
+
+#include "InternalPeiServicesTablePointer.h"
+
+/**
+
+ The function returns the pointer to PeiServicee following
+ PI1.0.
+
+ For IA32, the four-bytes field immediately prior to new IDT
+ base addres is used to save the EFI_PEI_SERVICES**.
+ For x64, the eight-bytes field immediately prior to new IDT
+ base addres is used to save the EFI_PEI_SERVICES**.
+
+ @retval The pointer to PeiServices.
+
+**/
+EFI_PEI_SERVICES **
+EFIAPI
+GetPeiServicesTablePointer (
+ VOID
+ )
+{
+ EFI_PEI_SERVICES **PeiServices;
+
+ PeiServices = (EFI_PEI_SERVICES **) AsmPeiSevicesTablePointer ();
+ ASSERT (PeiServices != NULL);
+ return PeiServices;
+}
+
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.msa b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.msa
new file mode 100644
index 000000000..99c482eb6
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.msa
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <MsaHeader>
+ <ModuleName>PeiServicesTablePointerLibIdt</ModuleName>
+ <ModuleType>PEIM</ModuleType>
+ <GuidValue>DED3F743-CE2C-4ba6-92A2-FFCE2A6D72D9</GuidValue>
+ <Version>1.0</Version>
+ <Abstract>Component description file for IPF KR1 Pei Services Table Pointer Library</Abstract>
+ <Description>PEI Services Table Library implementation that retrieves a pointer to the PEI
+ Services Table from the KR1 register on IPF.</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation.</Copyright>
+ <License>All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
+ <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
+ </MsaHeader>
+ <ModuleDefinitions>
+ <SupportedArchitectures>IA32 X64</SupportedArchitectures>
+ <BinaryModule>false</BinaryModule>
+ <OutputFileBasename>PeiServicesTablePointerLibIdt</OutputFileBasename>
+ </ModuleDefinitions>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="PEIM PEI_CORE">
+ <Keyword>PeiServicesTablePointerLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>DebugLib</Keyword>
+ </LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename SupArchList="IA32 X64">PeiServicesTablePointer.c</Filename>
+ <Filename SupArchList="IA32" ToolChainFamily="GCC">Ia32/AsmPeiSevicesTablePointer.S</Filename>
+ <Filename SupArchList="IA32" ToolChainFamily="MSFT">Ia32/AsmPeiSevicesTablePointer.c</Filename>
+ <Filename SupArchList="X64" ToolChainFamily="GCC">x64/AsmPeiSevicesTablePointer.S</Filename>
+ <Filename SupArchList="X64" ToolChainFamily="MSFT">x64/AsmPeiSevicesTablePointer.asm</Filename>
+ </SourceFiles>
+ <NonProcessedFiles>
+ <Filename>Ia32/AsmPeiSevicesTablePointer.Asm</Filename>
+ </NonProcessedFiles>
+ <PackageDependencies>
+ <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+ </PackageDependencies>
+ <Externs>
+ <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
+ <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
+ </Externs>
+</ModuleSurfaceArea> \ No newline at end of file
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.S b/MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.S
new file mode 100644
index 000000000..30eccdd0b
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.S
@@ -0,0 +1,36 @@
+#------------------------------------------------------------------------------
+#
+# Copyright (c) 2006, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Module Name:
+#
+# AsmPeiSevicesTablePointer.S
+#
+# Abstract:
+#
+# AsmPeiSevicesTablePointer function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# EFI_PEI_SERVICES **
+# EFIAPI
+# AsmPeiSevicesTablePointer (
+# );
+#------------------------------------------------------------------------------
+.global AsmPeiSevicesTablePointer;
+.align 16;
+AsmPeiSevicesTablePointer:
+ sidt (%rcx)
+ movq -8(%rcx), %rcx
+ ret
diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.asm b/MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.asm
new file mode 100644
index 000000000..290e929d0
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/x64/AsmPeiSevicesTablePointer.asm
@@ -0,0 +1,38 @@
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006, Intel Corporation
+; All rights reserved. This program and the accompanying materials
+; are licensed and made available under the terms and conditions of the BSD License
+; which accompanies this distribution. The full text of the license may be found at
+; http://opensource.org/licenses/bsd-license.php
+;
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+;
+; Module Name:
+;
+; ReadIdtr.Asm
+;
+; Abstract:
+;
+; AsmPeiSevicesTablePointer function
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+ .code
+
+;------------------------------------------------------------------------------
+; EFI_PEI_SERVICES **
+; EFIAPI
+; AsmPeiSevicesTablePointer (
+; );
+;------------------------------------------------------------------------------
+AsmPeiSevicesTablePointer PROC
+ sidt fword ptr [rcx]
+ mov rcx, [rcx - 8]
+ ret
+AsmPeiSevicesTablePointer ENDP
+
+ END
diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
new file mode 100644
index 000000000..c3cd57e28
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
@@ -0,0 +1,46 @@
+/*++
+
+Copyright (c) 2006 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ PeiServicesTablePointer.c
+
+Abstract:
+
+ PEI Services Table Pointer Library.
+
+--*/
+
+#include <Library/BaseLib.h>
+
+/**
+ The function returns the pointer to PeiServices.
+
+ The function returns the pointer to PeiServices.
+ It will ASSERT() if the pointer to PeiServices is NULL.
+
+ @retval The pointer to PeiServices.
+
+**/
+EFI_PEI_SERVICES **
+EFIAPI
+GetPeiServicesTablePointer (
+ VOID
+ )
+{
+ EFI_PEI_SERVICES **PeiServices;
+
+ PeiServices = (EFI_PEI_SERVICES **)(UINTN)AsmReadKr7 ();
+ ASSERT (PeiServices != NULL);
+ return PeiServices;
+}
+
diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.msa b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.msa
new file mode 100644
index 000000000..77f926a80
--- /dev/null
+++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.msa
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <MsaHeader>
+ <ModuleName>PeiServicesTablePointerLibKr7</ModuleName>
+ <ModuleType>PEIM</ModuleType>
+ <GuidValue>E0E7D776-E7EB-4e5f-9AA8-54CF3AA64A43</GuidValue>
+ <Version>1.0</Version>
+ <Abstract>Component description file for IPF KR1 Pei Services Table Pointer Library</Abstract>
+ <Description>PEI Services Table Library implementation that retrieves a pointer to the PEI
+ Services Table from the KR1 register on IPF.</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation.</Copyright>
+ <License>All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
+ <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
+ </MsaHeader>
+ <ModuleDefinitions>
+ <SupportedArchitectures>IPF</SupportedArchitectures>
+ <BinaryModule>false</BinaryModule>
+ <OutputFileBasename>PeiServicesTablePointerLibKr7</OutputFileBasename>
+ </ModuleDefinitions>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_PRODUCED" SupModuleList="PEIM PEI_CORE">
+ <Keyword>PeiServicesTablePointerLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>DebugLib</Keyword>
+ </LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename>PeiServicesTablePointer.c</Filename>
+ </SourceFiles>
+ <PackageDependencies>
+ <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+ </PackageDependencies>
+ <Externs>
+ <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
+ <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
+ </Externs>
+</ModuleSurfaceArea> \ No newline at end of file
diff --git a/MdePkg/Library/PeimEntryPoint/CommonHeader.h b/MdePkg/Library/PeimEntryPoint/CommonHeader.h
deleted file mode 100644
index 64d6b7a77..000000000
--- a/MdePkg/Library/PeimEntryPoint/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/PeimEntryPoint.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
index f80d4c2c8..a7faf2b5f 100644
--- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
+++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
@@ -14,9 +14,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiPei.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/PeimEntryPoint.h>
+#include <Library/DebugLib.h>
/**
Image entry point of Peim.
diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
index cefd6e4e8..b8668d838 100644
--- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
+++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
@@ -44,7 +44,6 @@
[Sources.common]
PeimEntryPoint.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
index 580668c88..d56a08880 100644
--- a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
+++ b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c
@@ -13,9 +13,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Uefi.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/UefiApplicationEntryPoint.h>
+#include <Library/UefiBootServicesTableLib.h>
/**
Enrty point to UEFI application.
diff --git a/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf b/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
index 0bb4cde41..60d06fd75 100644
--- a/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
+++ b/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
@@ -44,7 +44,6 @@
[Sources.common]
ApplicationEntryPoint.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiBootServicesTableLib/CommonHeader.h b/MdePkg/Library/UefiBootServicesTableLib/CommonHeader.h
deleted file mode 100644
index c7a33f26e..000000000
--- a/MdePkg/Library/UefiBootServicesTableLib/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
index b7795e6a3..bf77adf49 100644
--- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
+++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
@@ -15,9 +15,17 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/DebugLib.h>
EFI_HANDLE gImageHandle = NULL;
EFI_SYSTEM_TABLE *gST = NULL;
diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
index 3d5b1f376..25fa23aad 100644
--- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
@@ -45,7 +45,6 @@
[Sources.common]
UefiBootServicesTableLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiDebugLibConOut/CommonHeader.h b/MdePkg/Library/UefiDebugLibConOut/CommonHeader.h
deleted file mode 100644
index 1851011d1..000000000
--- a/MdePkg/Library/UefiDebugLibConOut/CommonHeader.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/PrintLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
index 711f29c6d..ebe00c7f3 100644
--- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c
@@ -13,9 +13,22 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Uefi.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/DebugLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/PrintLib.h>
+#include <Library/PcdLib.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+
//
// Define the maximum debug and assert message length that this library supports
diff --git a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf b/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
index 2d7868503..6aee822fe 100644
--- a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+++ b/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
@@ -44,7 +44,6 @@
[Sources.common]
DebugLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiDebugLibStdErr/CommonHeader.h b/MdePkg/Library/UefiDebugLibStdErr/CommonHeader.h
deleted file mode 100644
index 1851011d1..000000000
--- a/MdePkg/Library/UefiDebugLibStdErr/CommonHeader.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/PrintLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
index c03009c80..ca4e56e98 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
@@ -13,9 +13,21 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Uefi.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/DebugLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/PrintLib.h>
+#include <Library/PcdLib.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
//
// Define the maximum debug and assert message length that this library supports
diff --git a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf b/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
index 9f8fbe64c..a46f3ef0d 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
+++ b/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
@@ -44,7 +44,6 @@
[Sources.common]
DebugLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiDevicePathLib/CommonHeader.h b/MdePkg/Library/UefiDevicePathLib/CommonHeader.h
deleted file mode 100644
index d34b4d9b8..000000000
--- a/MdePkg/Library/UefiDevicePathLib/CommonHeader.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DevicePathLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/DebugLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/BaseLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
index bdc512b49..2031fe69e 100644
--- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
+++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c
@@ -22,9 +22,22 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Uefi.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Protocol/DevicePath.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/DevicePathLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/BaseLib.h>
/**
Returns the size of a device path in bytes.
diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
index 20f6449f2..d21cde18c 100644
--- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
@@ -44,7 +44,6 @@
[Sources.common]
UefiDevicePathLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/CommonHeader.h b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/CommonHeader.h
deleted file mode 100644
index 40a075d50..000000000
--- a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/CommonHeader.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/DevicePathUtilities.h>
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DevicePathLib.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
index 2492e4b95..6a587ab1c 100644
--- a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
+++ b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c
@@ -15,9 +15,23 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Uefi.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Protocol/DevicePathUtilities.h>
+#include <Protocol/DevicePath.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/DevicePathLib.h>
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/UefiBootServicesTableLib.h>
STATIC EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathUtilities = NULL;
diff --git a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
index 39da01537..4827da100 100644
--- a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
+++ b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
@@ -46,7 +46,6 @@
[Sources.common]
UefiDevicePathLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiDriverEntryPoint/CommonHeader.h b/MdePkg/Library/UefiDriverEntryPoint/CommonHeader.h
deleted file mode 100644
index 7749e632c..000000000
--- a/MdePkg/Library/UefiDriverEntryPoint/CommonHeader.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007 - 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/LoadedImage.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/DebugLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c
index 8e3b30ac1..20abcdaf6 100644
--- a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c
+++ b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c
@@ -14,9 +14,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <Uefi.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Protocol/LoadedImage.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiBootServicesTableLib.h>
/**
@@ -49,7 +59,6 @@ _DriverUnloadHandler (
// unloaded, and the library destructors should not be called
//
if (!EFI_ERROR (Status)) {
-
ProcessLibraryDestructorList (ImageHandle, gST);
}
@@ -61,31 +70,6 @@ _DriverUnloadHandler (
/**
- Notification Entry of ExitBootService event. In the entry, all notifications in _gDriverExitBootServicesEvent[]
- would be invoked.
-
- @param Event The Event that is being processed.
- @param Context Event Context.
-
-**/
-STATIC
-VOID
-EFIAPI
-_DriverExitBootServices (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-{
- EFI_EVENT_NOTIFY ChildNotifyEventHandler;
- UINTN Index;
-
- for (Index = 0; _gDriverExitBootServicesEvent[Index] != NULL; Index++) {
- ChildNotifyEventHandler = _gDriverExitBootServicesEvent[Index];
- ChildNotifyEventHandler (Event, NULL);
- }
-}
-
-/**
Enrty point to DXE Driver.
@param ImageHandle ImageHandle of the loaded driver.
@@ -115,6 +99,11 @@ _ModuleEntryPoint (
}
//
+ // Call constructor for all libraries
+ //
+ ProcessLibraryConstructorList (ImageHandle, SystemTable);
+
+ //
// Install unload handler...
//
if (_gDriverUnloadImageCount != 0) {
@@ -128,11 +117,6 @@ _ModuleEntryPoint (
}
//
- // Call constructor for all libraries
- //
- ProcessLibraryConstructorList (ImageHandle, SystemTable);
-
- //
// Call the driver entry point
//
Status = ProcessModuleEntryPointList (ImageHandle, SystemTable);
diff --git a/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf b/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
index b28ed5d66..e552d55dc 100644
--- a/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+++ b/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
@@ -44,7 +44,6 @@
[Sources.common]
DriverEntryPoint.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/Library/UefiLib/CommonHeader.h b/MdePkg/Library/UefiLib/CommonHeader.h
index 9a52f266e..ad028a769 100644
--- a/MdePkg/Library/UefiLib/CommonHeader.h
+++ b/MdePkg/Library/UefiLib/CommonHeader.h
@@ -25,8 +25,10 @@
//
#include <Protocol/DriverBinding.h>
#include <Protocol/ComponentName.h>
+#include <Protocol/ComponentName2.h>
#include <Protocol/DriverConfiguration.h>
#include <Protocol/DriverDiagnostics.h>
+#include <Protocol/DriverDiagnostics2.h>
#include <Guid/EventGroup.h>
diff --git a/MdePkg/Library/UefiLib/UefiLib.inf b/MdePkg/Library/UefiLib/UefiLib.inf
index 1b218a42c..1801b17bd 100644
--- a/MdePkg/Library/UefiLib/UefiLib.inf
+++ b/MdePkg/Library/UefiLib/UefiLib.inf
@@ -48,6 +48,7 @@
[Sources.common]
UefiLibPrint.c
UefiNotTiano.c
+ UefiDriverModel.c
Console.c
UefiLib.c
CommonHeader.h
@@ -116,6 +117,10 @@
[PcdsFixedAtBuild.common]
PcdUefiLibMaxPrintBufferSize|gEfiMdePkgTokenSpaceGuid
+
+[PcdsFeatureFlag.common]
PcdDriverDiagnosticsDisable|gEfiMdePkgTokenSpaceGuid
PcdComponentNameDisable|gEfiMdePkgTokenSpaceGuid
+ PcdDriverDiagnostics2Disable|gEfiMdePkgTokenSpaceGuid
+ PcdComponentName2Disable|gEfiMdePkgTokenSpaceGuid
diff --git a/MdePkg/Library/UefiLib/UefiLib.msa b/MdePkg/Library/UefiLib/UefiLib.msa
index b6693d485..a5616ab1c 100644
--- a/MdePkg/Library/UefiLib/UefiLib.msa
+++ b/MdePkg/Library/UefiLib/UefiLib.msa
@@ -55,6 +55,7 @@
<Filename>Console.c</Filename>
<Filename>UefiNotTiano.c</Filename>
<Filename>UefiLibPrint.c</Filename>
+ <Filename>UefiDriverModel.c</Filename>
</SourceFiles>
<PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
@@ -77,5 +78,25 @@
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>This PCD is used by UefiLib APIs, which are Print, ErrorPrint, AsciiPrint, AsciiErrorPrint. If the length of the formatted Unicode or ASCII string is greater than PcdUefiLibMaxPrintBufferSize, then only the first (PcdUefiLibMaxPrintBufferSize / Sizeof(CHAR16)) Unicode characters or PcdUefiLibMaxPrintBufferSize Ascii characters are sent to the respective console.</HelpText>
</PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdDriverDiagnosticsDisable</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>If this value is set TRUE, autogen will replace Driver Diagnostics Protocol instance with NULL.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdDriverDiagnostics2Disable</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>If this value is set TRUE, autogen will replace Driver Diagnostics2 Protocol instance with NULL.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdComponentNameDisable</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>If this value is set TRUE, autogen will replace Component Name Protocol instance with NULL.</HelpText>
+ </PcdEntry>
+ <PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
+ <C_Name>PcdComponentName2Disable</C_Name>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>If this value is set TRUE, autogen will replace Component Name2 Protocol instance with NULL.</HelpText>
+ </PcdEntry>
</PcdCoded>
</ModuleSurfaceArea> \ No newline at end of file
diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c
index b00cc22d8..9eba9ddf4 100644
--- a/MdePkg/Library/UefiLib/UefiNotTiano.c
+++ b/MdePkg/Library/UefiLib/UefiNotTiano.c
@@ -103,7 +103,10 @@ EfiCreateEventLegacyBootEx (
ASSERT (LegacyBootEvent != NULL);
- if (gST->Hdr.Revision < 0x00020000) {
+ if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {
+ DEBUG ((EFI_D_ERROR, "EFI1.1 can't support LegacyBootEvent!"));
+ ASSERT (FALSE);
+
return EFI_UNSUPPORTED;
} else {
//
@@ -145,7 +148,7 @@ EfiCreateEventReadyToBoot (
)
{
return EfiCreateEventReadyToBootEx (
- TPL_CALLBACK ,
+ TPL_CALLBACK,
InternalEmptyFuntion,
NULL,
ReadyToBootEvent
@@ -184,7 +187,10 @@ EfiCreateEventReadyToBootEx (
ASSERT (ReadyToBootEvent != NULL);
- if (gST->Hdr.Revision < 0x00020000) {
+ if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {
+ DEBUG ((EFI_D_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));
+ ASSERT (FALSE);
+
return EFI_UNSUPPORTED;
} else {
//
@@ -269,16 +275,20 @@ EfiSignalEventLegacyBoot (
@retval Other FvDevicePathNode is valid and pointer to NameGuid was returned.
**/
-EFI_GUID *
+EFI_GUID*
EFIAPI
EfiGetNameGuidFromFwVolDevicePathNode (
- IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode
+ IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFileDevicePathNode
)
{
- ASSERT (FvDevicePathNode != NULL);
- //
- // bugbug:Need to implement ...
- //
+ ASSERT (FvFileDevicePathNode != NULL);
+
+ if (FvFileDevicePathNode->Header.Type == MEDIA_DEVICE_PATH &&
+ FvFileDevicePathNode->Header.SubType == MEDIA_PIWG_FW_FILE_DP
+ ) {
+ return (EFI_GUID *) &FvFileDevicePathNode->FvFileName;
+ }
+
return NULL;
}
@@ -300,14 +310,20 @@ EfiGetNameGuidFromFwVolDevicePathNode (
VOID
EFIAPI
EfiInitializeFwVolDevicepathNode (
- IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode,
- IN CONST EFI_GUID *NameGuid
+ IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFileDevicePathNode,
+ IN CONST EFI_GUID *NameGuid
)
{
- ASSERT (FvDevicePathNode != NULL);
+ ASSERT (FvFileDevicePathNode != NULL);
ASSERT (NameGuid != NULL);
+
//
- // bugbug:Need to implement ...
+ // Use the new Device path that does not conflict with the UEFI
//
+ FvFileDevicePathNode->Header.Type = MEDIA_DEVICE_PATH;
+ FvFileDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP;
+ SetDevicePathNodeLength (&FvFileDevicePathNode->Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
+
+ CopyGuid (&FvFileDevicePathNode->FvFileName, NameGuid);
}
diff --git a/MdePkg/Library/UefiRuntimeServicesTableLib/CommonHeader.h b/MdePkg/Library/UefiRuntimeServicesTableLib/CommonHeader.h
deleted file mode 100644
index ca35d63c0..000000000
--- a/MdePkg/Library/UefiRuntimeServicesTableLib/CommonHeader.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2007, Intel Corporation.
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-
-#ifndef __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/DebugLib.h>
-
-#endif
diff --git a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
index 7fb777348..3d493d5af 100644
--- a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
+++ b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c
@@ -15,9 +15,17 @@
**/
//
-// Include common header file for this module.
+// The package level header files this module uses
//
-#include "CommonHeader.h"
+#include <PiDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Library/DebugLib.h>
EFI_RUNTIME_SERVICES *gRT = NULL;
diff --git a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
index 86d31fb6a..d99c0193f 100644
--- a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+++ b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
@@ -45,7 +45,6 @@
[Sources.common]
UefiRuntimeServicesTableLib.c
- CommonHeader.h
################################################################################