diff options
119 files changed, 1031 insertions, 1277 deletions
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 5fbcb10..5d87fc9 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -17,6 +17,8 @@ #ifndef __BASE_LIB__ #define __BASE_LIB__ +#include <IndustryStandard/Pal.h> + // // Definitions for architecture specific types // These include SPIN_LOCK and BASE_LIBRARY_JUMP_BUFFER diff --git a/MdePkg/Include/Library/HiiLib.h b/MdePkg/Include/Library/HiiLib.h index 4d3e18d..9da8d29 100644 --- a/MdePkg/Include/Library/HiiLib.h +++ b/MdePkg/Include/Library/HiiLib.h @@ -32,15 +32,12 @@ The allocated and initialized packages.
**/
-EFI_HII_PACKAGE_LIST_HEADER*
+EFI_HII_PACKAGE_LIST_HEADER *
EFIAPI
PreparePackages (
- IN UINTN NumberOfPackages,
- IN CONST EFI_GUID *Guid OPTIONAL,
+ IN CONST UINTN NumberOfPackages,
+ IN CONST EFI_GUID *Guid OPTIONAL,
...
- )
-;
-
-
+ );
#endif
diff --git a/MdePkg/Include/Library/PeiCoreEntryPoint.h b/MdePkg/Include/Library/PeiCoreEntryPoint.h index 76afc59..00105f5 100644 --- a/MdePkg/Include/Library/PeiCoreEntryPoint.h +++ b/MdePkg/Include/Library/PeiCoreEntryPoint.h @@ -16,19 +16,35 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define __MODULE_ENTRY_POINT_H__
/**
+
Enrty point to PEI core.
- @param PeiStartupDescriptor Pointer of start up information.
-
- @return Status returned by entry points of core and drivers.
+ @param SecCoreData Points to a data structure containing
+ information about the PEI core's
+ operating environment, such as the size
+ and location of temporary RAM, the stack
+ location and the BFV location. The type
+ EFI_SEC_PEI_HAND_OFF is
+
+ @param PpiList Points to a list of one or more PPI
+ descriptors to be installed initially by
+ the PEI core. An empty PPI list consists
+ of a single descriptor with the end-tag
+ EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
+ As part of its initialization phase, the
+ PEI Foundation will add these SEC-hosted
+ PPIs to its PPI database such that both
+ the PEI Foundation and any modules can
+ leverage the associated service calls
+ and/or code in these early PPIs.
**/
-EFI_STATUS
-EFIAPI
-_ModuleEntryPoint (
+VOID
+EFIAPI
+_ModuleEntryPoint(
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
- );
+);
/**
Wrapper of enrty point to PEI core.
@@ -38,7 +54,7 @@ _ModuleEntryPoint ( @return Status returned by entry points of core and drivers.
**/
-EFI_STATUS
+VOID
EFIAPI
EfiMain (
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
@@ -69,7 +85,7 @@ ProcessLibraryConstructorList ( @return Status returned by entry points of drivers.
**/
-EFI_STATUS
+VOID
EFIAPI
ProcessModuleEntryPointList (
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
diff --git a/MdePkg/Include/Library/ReportStatusCodeLib.h b/MdePkg/Include/Library/ReportStatusCodeLib.h index 6b32ddb..626ad11 100644 --- a/MdePkg/Include/Library/ReportStatusCodeLib.h +++ b/MdePkg/Include/Library/ReportStatusCodeLib.h @@ -15,6 +15,8 @@ #ifndef __REPORT_STATUS_CODE_LIB_H__
#define __REPORT_STATUS_CODE_LIB_H__
+#include <Protocol/DevicePath.h>
+
//
// Declare bits for PcdReportStatusCodePropertyMask
//
@@ -26,150 +28,6 @@ // Extended Data structure definitions with EFI_STATUS_CODE_DATA headers removed
//
-///
-/// Voltage Extended Error Data
-///
-typedef struct {
- EFI_EXP_BASE10_DATA Voltage;
- EFI_EXP_BASE10_DATA Threshold;
-} REPORT_STATUS_CODE_LIBRARY_COMPUTING_UNIT_VOLTAGE_ERROR_DATA;
-
-///
-/// Microcode Update Extended Error Data
-///
-typedef struct {
- UINT32 Version;
-} REPORT_STATUS_CODE_LIBRARY_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA;
-
-///
-/// Asynchronous Timer Extended Error Data
-///
-typedef struct {
- EFI_EXP_BASE10_DATA TimerLimit;
-} REPORT_STATUS_CODE_LIBRARY_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA;
-
-///
-/// Host Processor Mismatch Extended Error Data
-///
-typedef struct {
- UINT32 Instance;
- UINT16 Attributes;
-} REPORT_STATUS_CODE_LIBRARY_HOST_PROCESSOR_MISMATCH_ERROR_DATA;
-
-///
-/// Thermal Extended Error Data
-///
-typedef struct {
- EFI_EXP_BASE10_DATA Temperature;
- EFI_EXP_BASE10_DATA Threshold;
-} REPORT_STATUS_CODE_LIBRARY_COMPUTING_UNIT_THERMAL_ERROR_DATA;
-
-///
-/// Processor Disabled Extended Error Data
-///
-typedef struct {
- UINT32 Cause;
- BOOLEAN SoftwareDisabled;
-} REPORT_STATUS_CODE_LIBRARY_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA;
-
-///
-/// Embedded cache init extended data
-///
-typedef struct {
- UINT32 Level;
- EFI_INIT_CACHE_TYPE Type;
-} REPORT_STATUS_CODE_LIBRARY_CACHE_INIT_DATA;
-
-///
-/// Memory Extended Error Data
-///
-typedef struct {
- EFI_MEMORY_ERROR_GRANULARITY Granularity;
- EFI_MEMORY_ERROR_OPERATION Operation;
- UINTN Syndrome;
- EFI_PHYSICAL_ADDRESS Address;
- UINTN Resolution;
-} REPORT_STATUS_CODE_LIBRARY_MEMORY_EXTENDED_ERROR_DATA;
-
-///
-/// DIMM number
-///
-typedef struct {
- UINT16 Array;
- UINT16 Device;
-} REPORT_STATUS_CODE_LIBRARY_STATUS_CODE_DIMM_NUMBER;
-
-///
-/// Memory Module Mismatch Extended Error Data
-///
-typedef struct {
- EFI_STATUS_CODE_DIMM_NUMBER Instance;
-} REPORT_STATUS_CODE_LIBRARY_MEMORY_MODULE_MISMATCH_ERROR_DATA;
-
-///
-/// Memory Range Extended Data
-///
-typedef struct {
- EFI_PHYSICAL_ADDRESS Start;
- EFI_PHYSICAL_ADDRESS Length;
-} REPORT_STATUS_CODE_LIBRARY_MEMORY_RANGE_EXTENDED_DATA;
-
-///
-/// Device handle Extended Data. Used for many
-/// errors and progress codes to point to the device.
-///
-typedef struct {
- EFI_HANDLE Handle;
-} REPORT_STATUS_CODE_LIBRARY_DEVICE_HANDLE_EXTENDED_DATA;
-
-typedef struct {
- UINT8 *DevicePath;
-} REPORT_STATUS_CODE_LIBRARY_DEVICE_PATH_EXTENDED_DATA;
-
-typedef struct {
- EFI_HANDLE ControllerHandle;
- EFI_HANDLE DriverBindingHandle;
- UINT16 DevicePathSize;
- UINT8 *RemainingDevicePath;
-} REPORT_STATUS_CODE_LIBRARY_STATUS_CODE_START_EXTENDED_DATA;
-
-///
-/// Resource Allocation Failure Extended Error Data
-///
-typedef struct {
- UINT32 Bar;
- UINT16 DevicePathSize;
- UINT16 ReqResSize;
- UINT16 AllocResSize;
- UINT8 *DevicePath;
- UINT8 *ReqRes;
- UINT8 *AllocRes;
-} REPORT_STATUS_CODE_LIBRARY_RESOURCE_ALLOC_FAILURE_ERROR_DATA;
-
-///
-/// Extended Error Data for Assert
-///
-typedef struct {
- UINT32 LineNumber;
- UINT32 FileNameSize;
- EFI_STATUS_CODE_STRING_DATA *FileName;
-} REPORT_STATUS_CODE_LIBRARY_DEBUG_ASSERT_DATA;
-
-///
-/// System Context Data EBC/IA32/IPF
-///
-typedef struct {
- EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context;
-} REPORT_STATUS_CODE_LIBRARY_STATUS_CODE_EXCEP_EXTENDED_DATA;
-
-///
-/// Legacy Oprom extended data
-///
-typedef struct {
- EFI_HANDLE DeviceHandle;
- EFI_PHYSICAL_ADDRESS RomImageBase;
-} REPORT_STATUS_CODE_LIBRARY_LEGACY_OPROM_EXTENDED_DATA;
-
//
// Extern for the modules Caller ID GUID
//
diff --git a/MdePkg/Include/Library/ScsiLib.h b/MdePkg/Include/Library/ScsiLib.h index bb1a1ad..239cd1c 100644 --- a/MdePkg/Include/Library/ScsiLib.h +++ b/MdePkg/Include/Library/ScsiLib.h @@ -24,6 +24,8 @@ Module Name: #ifndef _SCSI_LIB_H
#define _SCSI_LIB_H
+#include <Protocol/ScsiIo.h>
+
//
// the time unit is 100ns, since the SCSI I/O defines timeout in 100ns unit.
//
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h index 9eaf48c..ef231f1 100644 --- a/MdePkg/Include/Library/UefiLib.h +++ b/MdePkg/Include/Library/UefiLib.h @@ -15,6 +15,13 @@ #ifndef __UEFI_LIB_H__
#define __UEFI_LIB_H__
+#include <Protocol/DriverBinding.h>
+#include <Protocol/DriverConfiguration.h>
+#include <Protocol/ComponentName.h>
+#include <Protocol/ComponentName2.h>
+#include <Protocol/DriverDiagnostics.h>
+#include <Protocol/DriverDiagnostics2.h>
+
//
// Unicode String Table
//
@@ -708,4 +715,125 @@ AsciiErrorPrint ( ...
);
+/**
+ Intialize a driver by installing the Driver Binding Protocol onto the
+ driver's DriverBindingHandle. This is typically the same as the driver's
+ ImageHandle, but it can be different if the driver produces multiple
+ DriverBinding Protocols. This function also initializes the EFI Driver
+ Library that initializes the global variables gST, gBS, gRT.
+
+ @param ImageHandle The image handle of the driver
+ @param SystemTable The EFI System Table that was passed to the driver's entry point
+ @param DriverBinding A Driver Binding Protocol instance that this driver is producing
+ @param DriverBindingHandle The handle that DriverBinding is to be installe onto. If this
+ parameter is NULL, then a new handle is created.
+
+ @retval EFI_SUCCESS DriverBinding is installed onto DriverBindingHandle
+ @retval Other Status from gBS->InstallProtocolInterface()
+
+**/
+EFI_STATUS
+EFIAPI
+EfiLibInstallDriverBinding (
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle
+ );
+
+/**
+ Intialize a driver by installing the Driver Binding Protocol onto the
+ driver's DriverBindingHandle. This is typically the same as the driver's
+ ImageHandle, but it can be different if the driver produces multiple
+ DriverBinding Protocols. This function also initializes the EFI Driver
+ Library that initializes the global variables gST, gBS, gRT.
+
+ @ImageHandle The image handle of the driver
+ @SystemTable The EFI System Table that was passed to the driver's entry point
+ @DriverBinding A Driver Binding Protocol instance that this driver is producing
+ @DriverBindingHandle The handle that DriverBinding is to be installe onto. If this
+ parameter is NULL, then a new handle is created.
+ @ComponentName A Component Name Protocol instance that this driver is producing
+ @DriverConfiguration A Driver Configuration Protocol instance that this driver is producing
+ @DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing
+
+ @retval EFI_SUCCESS DriverBinding is installed onto DriverBindingHandle
+ @retval Other Status from gBS->InstallProtocolInterface()
+
+**/
+EFI_STATUS
+EFIAPI
+EfiLibInstallAllDriverProtocols (
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle,
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL
+ );
+
+
+/**
+ Intialize a driver by installing the Driver Binding Protocol
+ onto the driver's DriverBindingHandle. This is typically the
+ same as the driver's ImageHandle, but it can be different if
+ the driver produces multiple DriverBinding Protocols. This
+ function also initializes the EFI Driver Library that
+ initializes the global variables gST, gBS, gRT.
+
+ @ImageHandle The image handle of the driver
+
+ @SystemTable The EFI System Table that was
+ passed to the driver's entry
+ point
+
+ @DriverBinding A Driver Binding Protocol
+ instance that this driver is
+ producing
+
+ @DriverBindingHandle The handle that DriverBinding is
+ to be installe onto. If this
+ parameter is NULL, then a new
+ handle is created.
+
+ @ComponentName A Component Name Protocol
+ instance that this driver is
+ producing
+
+ @ComponentName2 A Component Name 2 Protocol
+ instance that this driver is
+ producing
+
+ @DriverConfiguration A Driver Configuration Protocol
+ instance that this driver is
+ producing
+
+ @DriverDiagnostics A Driver Diagnostics Protocol
+ instance that this driver is
+ producing
+
+ @DriverDiagnostics2 A Driver Diagnostics 2 Protocol
+ instance that this driver is
+ producing
+
+ @retval EFI_SUCCESS DriverBinding is installed onto DriverBindingHandle
+ @retval Other Status from gBS->InstallProtocolInterface()
+
+**/
+EFI_STATUS
+EFIAPI
+EfiLibInstallAllDriverProtocols2 (
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle,
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL
+ IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL
+ IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL
+ IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
+ );
+
+
#endif
diff --git a/MdePkg/Include/Library/UsbLib.h b/MdePkg/Include/Library/UsbLib.h index 005e045..6e00c1c 100644 --- a/MdePkg/Include/Library/UsbLib.h +++ b/MdePkg/Include/Library/UsbLib.h @@ -25,6 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _USB_DXE_LIB_H
#define _USB_DXE_LIB_H
+#include <Protocol/UsbIo.h>
//
// define the timeout time as 3ms
//
diff --git a/MdePkg/Include/Uefi.h b/MdePkg/Include/Uefi.h index 3ae15de..e2f68d5 100644 --- a/MdePkg/Include/Uefi.h +++ b/MdePkg/Include/Uefi.h @@ -21,8 +21,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __PI_UEFI_H__
#define __PI_UEFI_H__
-#include <UefiBaseType.h>
-#include <UefiSpec.h>
+#include <Uefi/UefiBaseType.h>
+#include <Uefi/UefiSpec.h>
#endif
diff --git a/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf b/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf index bc939c2..7d5f926 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 27168bf..0000000 --- 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 1d3e719..d457821 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 2814b59..f5505db 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 01be6d5..0000000 --- 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 77676b7..0c8ae6b 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 18868b9..d184d6c 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 0f71c42..0000000 --- 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 a98e66d..30536df 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 5914d4d..09593dc 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 07c1b07..0000000 --- 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 1bf9c87..52ef02e 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 91ea0ee..4d74eca 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 b101e3f..0000000 --- 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 0b828dd..de7c761 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 99bb3f7..a3423d3 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 fcc8d3e..0000000 --- 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 057a171..c44bb64 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 9f50ecd..b3d87c5 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 17bcd31..0000000 --- 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 1785bab..e9f21b5 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 bc8e36d..466480b 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 7d68ffe..0000000 --- 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 f929ba8..7b5896f 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 b43a006..117114a 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 12ef16f..0000000 --- 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 a5e8a65..d3b11e6 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 5a48211..6147e14 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 c65882c..0000000 --- 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 caca0c3..ddfc6fe 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 15917a1..36d9a47 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 979c95b..2d61364 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 38ef4e2..0000000 --- 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 6f409d6..0000000 --- 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 34e8461..e410d41 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 ad1bb48..7af7887 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 2ea383a..0000000 --- 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 b85faa0..fd1fd24 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 8175bf6..751d7cf 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 1ff08af..8f03476 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 b0ccd70..0000000 --- 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 d5cf9d5..04437e0 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 c77e071..b05f143 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 9428979..e3032a9 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 b25b637..e26accb 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 0d8685e..1234e2e 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 9d2a5e1..0000000 --- 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 380d167..b05c655 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 eb6459f..a2e9025 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 cda2b96..5aea46e 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 a5a47fd..1f870c2 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 df5adc8..0000000 --- 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 ab2a172..0dc56b3 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 0d48630..06456e7 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 5c99e07..0000000 --- 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 32c62c2..156111c 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 73745d9..55e594f 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 ee462f8..cf8c789 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 dae5581..0000000 --- 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 76102c6..f686d4e 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 25c1e78..60de929 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 9aef9c8..0000000 --- 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 fca01dc..94292f2 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 ade69a9..84da87a 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 abc6987..0000000 --- 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 b6eeb7d..7294618 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 a7d40b1..daa421b 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 6c4d785..c923f60 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 bd8c311..dc997ad 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 0000000..22d32ac --- /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 0000000..74f19af --- /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 0000000..aa578ee --- /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 0000000..44bc71b --- /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 0000000..4c9b3d3 --- /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 0000000..99c482e --- /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 0000000..30eccdd --- /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 0000000..290e929 --- /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 0000000..c3cd57e --- /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 0000000..77f926a --- /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 64d6b7a..0000000 --- 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 f80d4c2..a7faf2b 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 cefd6e4..b8668d8 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 580668c..d56a088 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 0bb4cde..60d06fd 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 c7a33f2..0000000 --- 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 b7795e6..bf77adf 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 3d5b1f3..25fa23a 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 1851011..0000000 --- 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 711f29c..ebe00c7 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 2d78685..6aee822 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 1851011..0000000 --- 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 c03009c..ca4e56e 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 9f8fbe6..a46f3ef 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 d34b4d9..0000000 --- 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 bdc512b..2031fe6 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 20f6449..d21cde1 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 40a075d..0000000 --- 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 2492e4b..6a587ab 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 39da015..4827da1 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 7749e63..0000000 --- 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 8e3b30a..20abcda 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 b28ed5d..e552d55 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 9a52f26..ad028a7 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 1b218a4..1801b17 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 b6693d4..a5616ab 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 b00cc22..9eba9dd 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 ca35d63..0000000 --- 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 7fb7773..3d493d5 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 86d31fb..d99c019 100644 --- a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf +++ b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf @@ -45,7 +45,6 @@ [Sources.common]
UefiRuntimeServicesTableLib.c
- CommonHeader.h
################################################################################
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 38c956d..ece4a28 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -270,6 +270,8 @@ [PcdsFeatureFlag.common]
PcdComponentNameDisable|0x0000000d|gEfiMdePkgTokenSpaceGuid|BOOLEAN|FALSE
PcdDriverDiagnosticsDisable|0x0000000e|gEfiMdePkgTokenSpaceGuid|BOOLEAN|FALSE
+ PcdComponentName2Disable|0x0000ffff|gEfiMdePkgTokenSpaceGuid|BOOLEAN|FALSE
+ PcdDriverDiagnostics2Disable|0x0000fffe|gEfiMdePkgTokenSpaceGuid|BOOLEAN|FALSE
[PcdsFixedAtBuild.common]
PcdMaximumUnicodeStringLength|0x00000001|gEfiMdePkgTokenSpaceGuid|UINT32|1000000
diff --git a/MdePkg/MdePkg.nspd b/MdePkg/MdePkg.nspd index 97eb8c5..4ce2a55 100644 --- a/MdePkg/MdePkg.nspd +++ b/MdePkg/MdePkg.nspd @@ -1102,7 +1102,7 @@ <HelpText>If this value is set TRUE, autogen will replace Compoent Name Protocol instance with NULL.</HelpText>
</PcdEntry>
<PcdEntry>
- <C_Name>PcdDriverDiagnosticsDisable</C_Name>
+ <C_Name>PcdDriverDiagnostics2Disable</C_Name>
<Token>0x0000000e</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<DatumType>BOOLEAN</DatumType>
@@ -1111,6 +1111,24 @@ <HelpText>If this value is set TRUE, autogen will replace Driver Diagnostics Protocol instance with NULL.</HelpText>
</PcdEntry>
<PcdEntry>
+ <C_Name>PcdComponentName2Disable</C_Name>
+ <Token>0x0000000f</Token>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <ValidUsage>FEATURE_FLAG</ValidUsage>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>If this value is set TRUE, autogen will replace Compoent Name Protocol instance with NULL.</HelpText>
+ </PcdEntry>
+ <PcdEntry>
+ <C_Name>PcdDriverDiagnostics2Disable</C_Name>
+ <Token>0x00000010</Token>
+ <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <DatumType>BOOLEAN</DatumType>
+ <ValidUsage>FEATURE_FLAG</ValidUsage>
+ <DefaultValue>FALSE</DefaultValue>
+ <HelpText>If this value is set TRUE, autogen will replace Driver Diagnostics Protocol instance with NULL.</HelpText>
+ </PcdEntry>
+ <PcdEntry>
<C_Name>PcdUefiLibMaxPrintBufferSize</C_Name>
<Token>0x101</Token>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
|