summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-03 18:34:24 +0000
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-03 18:34:24 +0000
commitba2377328775b10caa4c2091a8997eb8685c39b8 (patch)
tree25dcb7bffc70961027119f8a9deebcac101eaf21 /MdeModulePkg
parentc1f23d63363d36947e76df61320bdd2e5e233946 (diff)
downloadedk2-platforms-ba2377328775b10caa4c2091a8997eb8685c39b8.tar.xz
Removed IntelframeworkPkg contamination from MdeModulePkg modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3019 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h42
-rw-r--r--MdeModulePkg/MdeModulePkg.dec3
-rw-r--r--MdeModulePkg/MdeModulePkg.dsc4
-rw-r--r--MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c26
-rw-r--r--MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h8
-rw-r--r--MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf42
-rw-r--r--MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c68
-rw-r--r--MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf53
-rw-r--r--MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c65
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c43
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h13
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf44
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c61
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h54
-rw-r--r--MdeModulePkg/Universal/RuntimeDxe/Runtime.c30
-rw-r--r--MdeModulePkg/Universal/RuntimeDxe/Runtime.h16
-rw-r--r--MdeModulePkg/Universal/RuntimeDxe/Runtime.inf4
-rw-r--r--MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c17
-rw-r--r--MdeModulePkg/Universal/VariablePei/Variable.c72
-rw-r--r--MdeModulePkg/Universal/VariablePei/Variable.h30
-rw-r--r--MdeModulePkg/Universal/VariablePei/Variable.inf53
-rw-r--r--MdeModulePkg/Universal/VariablePei/VariableWorker.c18
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c36
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h26
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf52
25 files changed, 250 insertions, 630 deletions
diff --git a/MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h b/MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h
new file mode 100644
index 0000000000..6ef3b227ad
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h
@@ -0,0 +1,42 @@
+/** @file
+ This protocol implements a FV section extraction using a CRC32 encapsulation.
+
+ The GUID defins the encapsulation scheme and the data structures come from
+ the SectionExtraction protocol definition.
+
+ 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.
+
+**/
+
+#ifndef __CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__
+#define __CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__
+
+
+//
+// Protocol GUID definition. Each GUIDed section extraction protocol has the
+// same interface but with different GUID. All the GUIDs is defined here.
+// May add multiple GUIDs here.
+//
+#define EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID \
+ { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }
+
+//
+// Forward reference for pure ANSI compatability
+//
+typedef struct _EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_CRC32_GUID_SECTION_EXTRACTION_PROTOCOL;
+
+//
+// The data structures are the same as GuidedSectionExtraction protocol only the GUID's are different
+//
+#include <Protocol/GuidedSectionExtraction.h>
+
+extern EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid;
+
+#endif
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index ac6e2cfe90..6d4690507d 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -89,7 +89,8 @@
gEfiTianoDecompressProtocolGuid = { 0xE84CF29C, 0x191F, 0x4EAE, { 0x96, 0xE1, 0xF4, 0x6A, 0xEC, 0xEA, 0xEA, 0x0B }}
gEfiCustomizedDecompressProtocolGuid = { 0x9A44198E, 0xA4A2, 0x44E6, { 0x8A, 0x1F, 0x39, 0xBE, 0xFD, 0xAC, 0x89, 0x6F }}
gEfiCapsuleArchProtocolGuid = { 0x5053697E, 0x2EBC, 0x4819, { 0x90, 0xD9, 0x05, 0x80, 0xDE, 0xEE, 0x57, 0x54 }}
-
+ gEfiCrc32GuidedSectionExtractionProtocolGuid = { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }
+
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 77290bc3ea..7379728bca 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -326,6 +326,10 @@
PcdMaxPeiPerformanceLogEntries|gEfiEdkModulePkgTokenSpaceGuid|28
PcdVpdBaseAddress|gEfiEdkModulePkgTokenSpaceGuid|0x0
PcdMaxPeiPcdCallBackNumberPerPcdEntry|gEfiEdkModulePkgTokenSpaceGuid|0x08
+ PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid|0x00011003 # EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED
+ PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid|0x00051006 # EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP
+ PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004 # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_PC_TEST
+ PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x0005100 # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE3
[PcdsPatchableInModule.common]
PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid|0x80000000
diff --git a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c
index 7b207b919d..f1ab82d87a 100644
--- a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c
+++ b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c
@@ -19,22 +19,6 @@ Abstract:
--*/
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-#include <FrameworkPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Ppi/BaseMemoryTest.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/PeimEntryPoint.h>
-#include <Library/ReportStatusCodeLib.h>
-
#include <BaseMemoryTest.h>
static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest };
@@ -109,10 +93,7 @@ Returns:
EFI_PHYSICAL_ADDRESS TempAddress;
UINT32 SpanSize;
- REPORT_STATUS_CODE (
- EFI_PROGRESS_CODE,
- EFI_COMPUTING_UNIT_MEMORY + EFI_CU_MEMORY_PC_TEST
- );
+ REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueMemoryTestStarted));
TestPattern = TEST_PATTERN;
SpanSize = 0;
@@ -151,10 +132,7 @@ Returns:
while (TempAddress < BeginAddress + MemoryLength) {
if ((*(UINT32 *) (UINTN) TempAddress) != TestPattern) {
*ErrorAddress = TempAddress;
- REPORT_STATUS_CODE (
- EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED,
- EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE
- );
+ REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED, PcdGet32 (PcdStatusCodeValueUncorrectableMemoryError));
return EFI_DEVICE_ERROR;
}
diff --git a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h
index 791a66c54c..ed6081af11 100644
--- a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h
+++ b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h
@@ -22,6 +22,14 @@ Abstract:
#ifndef _PEI_BASE_MEMORY_TEST_H_
#define _PEI_BASE_MEMORY_TEST_H_
+#include <PiPei.h>
+#include <Ppi/BaseMemoryTest.h>
+#include <Library/DebugLib.h>
+#include <Library/PeimEntryPoint.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/PcdLib.h>
+
+
//
// Some global define
//
diff --git a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf
index 6010077de8..90d71e94ef 100644
--- a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf
+++ b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf
@@ -36,56 +36,22 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
-
[Sources.common]
BaseMemoryTest.c
BaseMemoryTest.h
-
-################################################################################
-#
-# Includes Section - list of Include locations that are required for
-# this module.
-#
-################################################################################
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
-
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
[LibraryClasses]
ReportStatusCodeLib
PeimEntryPoint
DebugLib
-
-################################################################################
-#
-# PPI C Name Section - list of PPI and PPI Notify C Names that this module
-# uses or produces.
-#
-################################################################################
-
[Ppis]
gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED
+[PcdsFixedAtBuild.common]
+ PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid
+ PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid
+
diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c b/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c
deleted file mode 100644
index 15736c6ca9..0000000000
--- a/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*++
-
-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:
-
- Capsule.c
-
-Abstract:
-
- Capsule Runtime Service Initialization
-
---*/
-
-#include "CapsuleService.h"
-
-
-EFI_STATUS
-EFIAPI
-CapsuleServiceInitialize (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-/*++
-
-Routine Description:
-
- This code is capsule runtime service initialization.
-
-Arguments:
-
- ImageHandle The image handle
- SystemTable The system table.
-
-Returns:
-
- EFI STATUS
-
---*/
-{
- EFI_STATUS Status;
- EFI_HANDLE NewHandle;
-
- SystemTable->RuntimeServices->UpdateCapsule = UpdateCapsule;
- SystemTable->RuntimeServices->QueryCapsuleCapabilities = QueryCapsuleCapabilities;
-
- //
- // Now install the Capsule Architectural Protocol on a new handle
- //
- NewHandle = NULL;
-
- Status = gBS->InstallMultipleProtocolInterfaces (
- &NewHandle,
- &gEfiCapsuleArchProtocolGuid,
- NULL,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
- return EFI_SUCCESS;
-}
diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf
index bdc91db1d7..61dae1b849 100644
--- a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf
+++ b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf
@@ -45,26 +45,9 @@
[Sources.common]
CapsuleService.h
CapsuleService.c
- Capsule.c
-
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
[LibraryClasses]
UefiBootServicesTableLib
@@ -76,54 +59,18 @@
DxeServicesTableLib
UefiDriverEntryPoint
-
-################################################################################
-#
-# Guid C Name Section - list of Guids that this module uses or produces.
-#
-################################################################################
-
[Guids]
gEfiCapsuleVendorGuid # SOMETIMES_CONSUMED
- gEfiCapsuleGuid
-
-################################################################################
-#
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names
-# that this module uses or produces.
-#
-################################################################################
[Protocols]
gEfiCapsuleArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED
-
-################################################################################
-#
-# Pcd FEATURE_FLAG - list of PCDs that this module is coded for.
-#
-################################################################################
-
[PcdsFeatureFlag.common]
PcdSupportUpdateCapsuleRest|gEfiEdkModulePkgTokenSpaceGuid
-
-################################################################################
-#
-# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
-#
-################################################################################
-
[PcdsFixedAtBuild.common]
PcdMaxSizeNonPopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid
PcdMaxSizePopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid
-################################################################################
-#
-# Dependency Expression Section - list of Dependency expressions that are required for
-# this module.
-#
-################################################################################
-
[Depex]
gEfiVariableArchProtocolGuid
diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c
index 7370eb4198..5a923cda34 100644
--- a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c
+++ b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c
@@ -65,19 +65,13 @@ Returns:
BufferPtr = NULL;
CapsuleHeader = NULL;
- //
- //Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET
- //and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.
- //
for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {
CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {
return EFI_INVALID_PARAMETER;
}
- if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {
- if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
- return EFI_UNSUPPORTED;
- }
+ if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
+ return EFI_UNSUPPORTED;
}
}
@@ -193,19 +187,13 @@ Returns:
CapsuleHeader = NULL;
- //
- //Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET
- //and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.
- //
for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {
CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {
return EFI_INVALID_PARAMETER;
}
- if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {
- if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
- return EFI_UNSUPPORTED;
- }
+ if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
+ return EFI_UNSUPPORTED;
}
}
@@ -229,3 +217,48 @@ Returns:
return EFI_SUCCESS;
}
+
+EFI_STATUS
+EFIAPI
+CapsuleServiceInitialize (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+/*++
+
+Routine Description:
+
+ This code is capsule runtime service initialization.
+
+Arguments:
+
+ ImageHandle The image handle
+ SystemTable The system table.
+
+Returns:
+
+ EFI STATUS
+
+--*/
+{
+ EFI_STATUS Status;
+ EFI_HANDLE NewHandle;
+
+ SystemTable->RuntimeServices->UpdateCapsule = UpdateCapsule;
+ SystemTable->RuntimeServices->QueryCapsuleCapabilities = QueryCapsuleCapabilities;
+
+ //
+ // Now install the Capsule Architectural Protocol on a new handle
+ //
+ NewHandle = NULL;
+
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &NewHandle,
+ &gEfiCapsuleArchProtocolGuid,
+ NULL,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ return EFI_SUCCESS;
+}
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c
index de9ba8372f..ca5ee21fe7 100644
--- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c
+++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c
@@ -23,10 +23,45 @@ Abstract:
--*/
-#include <GuidedSection.h>
#include <Crc32SectionExtract.h>
EFI_STATUS
+GuidedSectionExtractionProtocolConstructor (
+ OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
+ IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
+ )
+/*++
+
+Routine Description:
+
+ Constructor for the GUIDed section extraction protocol. Initializes
+ instance data.
+
+Arguments:
+
+ This Instance to construct
+
+Returns:
+
+ EFI_SUCCESS: Instance initialized.
+
+--*/
+// TODO: GuidedSep - add argument and description to function comment
+// TODO: ExtractSection - add argument and description to function comment
+// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
+{
+ *GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));
+ if (*GuidedSep == NULL) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+
+ (*GuidedSep)->ExtractSection = ExtractSection;
+
+ return EFI_SUCCESS;
+}
+
+
+EFI_STATUS
EFIAPI
InitializeCrc32GuidedSectionExtractionProtocol (
IN EFI_HANDLE ImageHandle,
@@ -206,21 +241,21 @@ Crc32ExtractSection (
// Implictly CRC32 GUIDed section should have STATUS_VALID bit set
//
ASSERT (GuidedSectionHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);
- *AuthenticationStatus = EFI_LOCAL_AUTH_STATUS_IMAGE_SIGNED | EFI_AGGREGATE_AUTH_STATUS_IMAGE_SIGNED;
+ *AuthenticationStatus = EFI_AUTH_STATUS_IMAGE_SIGNED;
//
// Check whether there exists EFI_SECURITY_POLICY_PROTOCOL_GUID.
//
Status = gBS->LocateProtocol (&gEfiSecurityPolicyProtocolGuid, NULL, &DummyInterface);
if (!EFI_ERROR (Status)) {
- *AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_PLATFORM_OVERRIDE | EFI_AGGREGATE_AUTH_STATUS_PLATFORM_OVERRIDE;
+ *AuthenticationStatus |= EFI_AUTH_STATUS_PLATFORM_OVERRIDE;
} else {
//
// Calculate CRC32 Checksum of Image
//
gBS->CalculateCrc32 (Image, *OutputSize, &Crc32Checksum);
if (Crc32Checksum != Crc32SectionHeader->CRC32Checksum) {
- *AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_TEST_FAILED | EFI_AGGREGATE_AUTH_STATUS_TEST_FAILED;
+ *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;
}
}
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h
index 65fb0a27ab..e7bf276a35 100644
--- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h
+++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h
@@ -23,26 +23,17 @@ Abstract:
#ifndef _CRC32_GUIDED_SECTION_EXTRACTION_H
#define _CRC32_GUIDED_SECTION_EXTRACTION_H
-//
-// The package level header files this module uses
-//
#include <PiDxe.h>
-#include <Common/FrameworkFirmwareVolumeImageFormat.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
#include <Protocol/SecurityPolicy.h>
-#include <Protocol/GuidedSectionExtaction.h>
#include <Protocol/Crc32GuidedSectionExtraction.h>
-//
-// The Library classes this module consumes
-//
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
+
+
typedef struct {
EFI_GUID_DEFINED_SECTION GuidedSectionHeader;
UINT32 CRC32Checksum;
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf
index 9bce71f76b..5b0c65dbce 100644
--- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf
+++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf
@@ -14,11 +14,6 @@
#
#**/
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = Crc32SectionExtract
@@ -36,36 +31,12 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
-
[Sources.common]
- GuidedSection.h
- GuidedSection.c
Crc32SectionExtract.h
Crc32SectionExtract.c
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
-
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
[LibraryClasses]
MemoryAllocationLib
@@ -74,24 +45,9 @@
UefiDriverEntryPoint
DebugLib
-
-################################################################################
-#
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names
-# that this module uses or produces.
-#
-################################################################################
-
[Protocols]
gEfiSecurityPolicyProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gEfiCrc32GuidedSectionExtractionProtocolGuid # PROTOCOL ALWAYS_PRODUCED
-################################################################################
-#
-# Dependency Expression Section - list of Dependency expressions that are required for
-# this module.
-#
-################################################################################
-
[Depex]
gEfiRuntimeArchProtocolGuid
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c
deleted file mode 100644
index 87605cc055..0000000000
--- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*++
-
-Copyright (c) 2006 - 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.
-
-Module Name:
-
- GuidedSection.c
-
-Abstract:
-
- GUIDed section extraction protocol implementation.
- This contains the common constructor of GUIDed section
- extraction protocol. GUID specific implementation of each
- GUIDed section extraction protocol can be found in other
- files under the same directory.
-
---*/
-
-#include "GuidedSection.h"
-
-EFI_STATUS
-GuidedSectionExtractionProtocolConstructor (
- OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
- IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
- )
-/*++
-
-Routine Description:
-
- Constructor for the GUIDed section extraction protocol. Initializes
- instance data.
-
-Arguments:
-
- This Instance to construct
-
-Returns:
-
- EFI_SUCCESS: Instance initialized.
-
---*/
-// TODO: GuidedSep - add argument and description to function comment
-// TODO: ExtractSection - add argument and description to function comment
-// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
-{
- *GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));
- if (*GuidedSep == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- (*GuidedSep)->ExtractSection = ExtractSection;
-
- return EFI_SUCCESS;
-}
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h
deleted file mode 100644
index d6613b0f4b..0000000000
--- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*++
-
-Copyright (c) 2006 - 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.
-
-Module Name:
-
- GuidedSection.h
-
-Abstract:
-
- Header file for GuidedSection.c
- Please refer to the Framewokr Firmware Volume Specification 0.9.
-
---*/
-
-#ifndef _GUIDED_SECTION_EXTRACTION_H
-#define _GUIDED_SECTION_EXTRACTION_H
-
-#include "Crc32SectionExtract.h"
-
-//
-// Function prototype declarations
-//
-EFI_STATUS
-GuidedSectionExtractionProtocolConstructor (
- OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
- IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
- )
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- GuidedSep - TODO: add argument description
- ExtractSection - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
-;
-
-#endif
diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.c b/MdeModulePkg/Universal/RuntimeDxe/Runtime.c
index 4bf2e402a3..c2c0242962 100644
--- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.c
+++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.c
@@ -51,31 +51,6 @@ Revision History:
--*/
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-#include <FrameworkDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/LoadedImage.h>
-#include <Protocol/Runtime.h>
-#include <Protocol/UgaIo.h>
-
-//
-// The Library classes this module consumes
-//
-#include <Library/BaseLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/DebugLib.h>
-#include <Library/ReportStatusCodeLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/CacheMaintenanceLib.h>
-#include <Library/PeCoffLib.h>
-
#include "Runtime.h"
//
@@ -333,10 +308,7 @@ Returns:
// check whether in Runtime or not (this is judged by looking at
// mEfiAtRuntime global So this ReportStatusCode will work
//
- REPORT_STATUS_CODE (
- EFI_PROGRESS_CODE,
- (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP)
- );
+ REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueSetVirtualAddressMap));
//
// Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events.
diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.h b/MdeModulePkg/Universal/RuntimeDxe/Runtime.h
index c2e4b39666..7154b53cdf 100644
--- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.h
+++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.h
@@ -24,6 +24,22 @@ Abstract:
#ifndef _RUNTIME_H_
#define _RUNTIME_H_
+#include <PiDxe.h>
+#include <Protocol/LoadedImage.h>
+#include <Protocol/Runtime.h>
+#include <Protocol/UgaIo.h>
+#include <Library/BaseLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/DebugLib.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/CacheMaintenanceLib.h>
+#include <Library/PeCoffLib.h>
+#include <Library/PcdLib.h>
+
+
//
// Function Prototypes
//
diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf b/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf
index 288e5d0766..e535fb1c8d 100644
--- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf
+++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf
@@ -66,7 +66,6 @@
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################
@@ -108,3 +107,6 @@
gEfiRuntimeArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED
+[PcdsFixedAtBuild.common]
+ PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid
+ \ No newline at end of file
diff --git a/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c b/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c
index 912aab1182..0a4ee95774 100644
--- a/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c
+++ b/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c
@@ -11,23 +11,6 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Ppi/ReadOnlyVariable.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/PeimEntryPoint.h>
-#include <Library/HobLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseMemoryLib.h>
#include <Variable.h>
diff --git a/MdeModulePkg/Universal/VariablePei/Variable.c b/MdeModulePkg/Universal/VariablePei/Variable.c
index b56e315e69..ba8a23d67a 100644
--- a/MdeModulePkg/Universal/VariablePei/Variable.c
+++ b/MdeModulePkg/Universal/VariablePei/Variable.c
@@ -18,38 +18,20 @@ Abstract:
--*/
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Ppi/ReadOnlyVariable.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/PeimEntryPoint.h>
-#include <Library/HobLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseMemoryLib.h>
-
-
-#include <Variable.h>
+#include "Variable.h"
//
// Module globals
//
-static EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = {
+static EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = {
PeiGetVariable,
PeiGetNextVariableName
};
static EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
- &gEfiPeiReadOnlyVariablePpiGuid,
+ &gEfiPeiReadOnlyVariable2PpiGuid,
&mVariablePpi
};
@@ -187,10 +169,10 @@ Returns:
STATIC
EFI_STATUS
CompareWithValidVariable (
- IN VARIABLE_HEADER *Variable,
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
- OUT VARIABLE_POINTER_TRACK *PtrTrack
+ IN VARIABLE_HEADER *Variable,
+ IN CONST CHAR16 *VariableName,
+ IN CONST EFI_GUID *VendorGuid,
+ OUT VARIABLE_POINTER_TRACK *PtrTrack
)
/*++
@@ -242,8 +224,8 @@ EFI_STATUS
EFIAPI
FindVariable (
IN EFI_PEI_SERVICES **PeiServices,
- IN CHAR16 *VariableName,
- IN EFI_GUID *VendorGuid,
+ IN CONST CHAR16 *VariableName,
+ IN CONST EFI_GUID *VendorGuid,
OUT VARIABLE_POINTER_TRACK *PtrTrack
)
/*++
@@ -380,12 +362,12 @@ Returns:
EFI_STATUS
EFIAPI
PeiGetVariable (
- IN EFI_PEI_SERVICES **PeiServices,
- IN CHAR16 *VariableName,
- IN EFI_GUID * VendorGuid,
- OUT UINT32 *Attributes OPTIONAL,
- IN OUT UINTN *DataSize,
- OUT VOID *Data
+ IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
+ IN CONST CHAR16 *VariableName,
+ IN CONST EFI_GUID *VariableGuid,
+ OUT UINT32 *Attributes,
+ IN OUT UINTN *DataSize,
+ OUT VOID *Data
)
/*++
@@ -420,15 +402,16 @@ Returns:
VARIABLE_POINTER_TRACK Variable;
UINTN VarDataSize;
EFI_STATUS Status;
+ EFI_PEI_SERVICES **PeiServices;
- if (VariableName == NULL || VendorGuid == NULL) {
+ PeiServices = GetPeiServicesTablePointer ();
+ if (VariableName == NULL || VariableGuid == NULL) {
return EFI_INVALID_PARAMETER;
}
//
// Find existing variable
//
- Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable);
-
+ Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status;
}
@@ -454,10 +437,10 @@ Returns:
EFI_STATUS
EFIAPI
PeiGetNextVariableName (
- IN EFI_PEI_SERVICES **PeiServices,
- IN OUT UINTN *VariableNameSize,
- IN OUT CHAR16 *VariableName,
- IN OUT EFI_GUID *VendorGuid
+ IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
+ IN OUT UINTN *VariableNameSize,
+ IN OUT CHAR16 *VariableName,
+ IN OUT EFI_GUID *VariableGuid
)
/*++
@@ -470,7 +453,7 @@ Arguments:
PeiServices - General purpose services available to every PEIM.
VariabvleNameSize - The variable name's size.
VariableName - A pointer to the variable's name.
- VendorGuid - A pointer to the EFI_GUID structure.
+ VariableGuid - A pointer to the EFI_GUID structure.
VariableNameSize - Size of the variable name
@@ -489,13 +472,14 @@ Returns:
VARIABLE_POINTER_TRACK Variable;
UINTN VarNameSize;
EFI_STATUS Status;
+ EFI_PEI_SERVICES **PeiServices;
+ PeiServices = GetPeiServicesTablePointer ();
if (VariableName == NULL) {
return EFI_INVALID_PARAMETER;
}
- Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable);
-
+ Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status;
}
@@ -514,7 +498,7 @@ Returns:
if (VarNameSize <= *VariableNameSize) {
(*PeiServices)->CopyMem (VariableName, GET_VARIABLE_NAME_PTR (Variable.CurrPtr), VarNameSize);
- (*PeiServices)->CopyMem (VendorGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));
+ (*PeiServices)->CopyMem (VariableGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));
Status = EFI_SUCCESS;
} else {
diff --git a/MdeModulePkg/Universal/VariablePei/Variable.h b/MdeModulePkg/Universal/VariablePei/Variable.h
index 187edbaf7d..9747a8d426 100644
--- a/MdeModulePkg/Universal/VariablePei/Variable.h
+++ b/MdeModulePkg/Universal/VariablePei/Variable.h
@@ -22,6 +22,16 @@ Abstract:
#ifndef _PEI_VARIABLE_H
#define _PEI_VARIABLE_H
+#include <PiPei.h>
+#include <Ppi/ReadOnlyVariable2.h>
+#include <Library/DebugLib.h>
+#include <Library/PeimEntryPoint.h>
+#include <Library/HobLib.h>
+#include <Library/PcdLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/PeiServicesTablePointerLib.h>
+
+
//
// BugBug: We need relcate the head file.
//
@@ -91,12 +101,12 @@ Returns:
EFI_STATUS
EFIAPI
PeiGetVariable (
- IN EFI_PEI_SERVICES **PeiServices,
- IN CHAR16 *VariableName,
- IN EFI_GUID * VendorGuid,
- OUT UINT32 *Attributes OPTIONAL,
- IN OUT UINTN *DataSize,
- OUT VOID *Data
+ IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
+ IN CONST CHAR16 *VariableName,
+ IN CONST EFI_GUID *VariableGuid,
+ OUT UINT32 *Attributes,
+ IN OUT UINTN *DataSize,
+ OUT VOID *Data
)
/*++
@@ -123,10 +133,10 @@ Returns:
EFI_STATUS
EFIAPI
PeiGetNextVariableName (
- IN EFI_PEI_SERVICES **PeiServices,
- IN OUT UINTN *VariableNameSize,
- IN OUT CHAR16 *VariableName,
- IN OUT EFI_GUID *VendorGuid
+ IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
+ IN OUT UINTN *VariableNameSize,
+ IN OUT CHAR16 *VariableName,
+ IN OUT EFI_GUID *VariableGuid
)
/*++
diff --git a/MdeModulePkg/Universal/VariablePei/Variable.inf b/MdeModulePkg/Universal/VariablePei/Variable.inf
index 5151c4bf4b..434c2991c8 100644
--- a/MdeModulePkg/Universal/VariablePei/Variable.inf
+++ b/MdeModulePkg/Universal/VariablePei/Variable.inf
@@ -14,11 +14,6 @@
#
#**/
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = PeiVariable
@@ -36,12 +31,6 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
-
[Sources.common]
Variable.c
Variable.h
@@ -58,26 +47,9 @@
[Sources.EBC]
VariableWorker.c
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
-
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
[LibraryClasses]
BaseMemoryLib
@@ -85,34 +57,13 @@
HobLib
PeimEntryPoint
DebugLib
-
-
-################################################################################
-#
-# PPI C Name Section - list of PPI and PPI Notify C Names that this module
-# uses or produces.
-#
-################################################################################
+ PeiServiceTablePointerLib
[Ppis]
- gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_CONSUMED
-
-
-################################################################################
-#
-# Pcd DYNAMIC - list of PCDs that this module is coded for.
-#
-################################################################################
+ gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED
[PcdsDynamic.common]
PcdFlashNvStorageVariableBase|gEfiGenericPlatformTokenSpaceGuid
-################################################################################
-#
-# Dependency Expression Section - list of Dependency expressions that are required for
-# this module.
-#
-################################################################################
-
[Depex]
TRUE
diff --git a/MdeModulePkg/Universal/VariablePei/VariableWorker.c b/MdeModulePkg/Universal/VariablePei/VariableWorker.c
index 5cb75d03ef..1a49ee8c98 100644
--- a/MdeModulePkg/Universal/VariablePei/VariableWorker.c
+++ b/MdeModulePkg/Universal/VariablePei/VariableWorker.c
@@ -18,24 +18,6 @@ Abstract:
Framework PEIM to provide the Variable functionality
--*/
-//
-// The package level header files this module uses
-//
-#include <PiPei.h>
-
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Ppi/ReadOnlyVariable.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/PeimEntryPoint.h>
-#include <Library/HobLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseMemoryLib.h>
-
#include <Variable.h>
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c
index ec43aec283..76289087bc 100644
--- a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c
@@ -21,24 +21,6 @@ Revision History
--*/
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-#include <FrameworkDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/ReportStatusCodeLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Protocol/WatchDogTimer.h>
-
#include "WatchDogTimer.h"
//
@@ -103,13 +85,7 @@ WatchdogTimerDriverExpires (
--*/
{
- //
- // Report error code before exiting
- //
- REPORT_STATUS_CODE (
- EFI_ERROR_CODE | EFI_ERROR_MINOR,
- (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED)
- );
+ REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_MINOR, PcdGet32 (PcdStatusCodeValueEfiWatchDogTimerExpired));
//
// If a notification function has been registered, then call it
@@ -123,6 +99,7 @@ WatchdogTimerDriverExpires (
gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL);
}
+
EFI_STATUS
EFIAPI
WatchdogTimerDriverRegisterHandler (
@@ -288,10 +265,6 @@ Returns:
{
EFI_STATUS Status;
- REPORT_STATUS_CODE (
- EFI_PROGRESS_CODE,
- (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_BEGIN)
- );
//
// Make sure the Watchdog Timer Architectural Protocol is not already installed in the system
//
@@ -320,10 +293,5 @@ Returns:
);
ASSERT_EFI_ERROR (Status);
- REPORT_STATUS_CODE (
- EFI_PROGRESS_CODE,
- (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_END)
- );
-
return Status;
}
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h
index bb1936b90e..2c8c33a8cb 100644
--- a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h
@@ -24,6 +24,20 @@ Revision History
#ifndef _WATCHDOG_TIMER_H_
#define _WATCHDOG_TIMER_H_
+
+//
+// The package level header files this module uses
+//
+#include <PiDxe.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Library/PcdLib.h>
+#include <Protocol/WatchDogTimer.h>
+
+
//
// Function Prototypes
//
@@ -32,31 +46,27 @@ EFIAPI
WatchdogTimerDriverRegisterHandler (
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction
- )
-;
+ );
EFI_STATUS
EFIAPI
WatchdogTimerDriverSetTimerPeriod (
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
IN UINT64 TimerPeriod
- )
-;
+ );
EFI_STATUS
EFIAPI
WatchdogTimerDriverGetTimerPeriod (
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
IN UINT64 *TimerPeriod
- )
-;
+ );
EFI_STATUS
EFIAPI
WatchdogTimerDriverInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
- )
-;
+ );
#endif
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf
index 7c3984d488..5c9f3dfa4b 100644
--- a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf
@@ -14,11 +14,6 @@
#
#**/
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = WatchDogTimer
@@ -36,35 +31,13 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
+[Packages]
+ MdePkg/MdePkg.dec
[Sources.common]
WatchDogTimer.h
WatchDogTimer.c
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
-
-[Packages]
- MdePkg/MdePkg.dec
- IntelFrameWorkPkg/IntelFrameworkPkg.dec
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
-
[LibraryClasses]
UefiRuntimeServicesTableLib
UefiBootServicesTableLib
@@ -72,22 +45,13 @@
UefiDriverEntryPoint
DebugLib
-
-################################################################################
-#
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names
-# that this module uses or produces.
-#
-################################################################################
-
[Protocols]
gEfiWatchdogTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
-################################################################################
-#
-# Dependency Expression Section - list of Dependency expressions that are required for
-# this module.
-#
-################################################################################
+[PcdsFixedAtBuild.common]
+ PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid
+
[depex]
- gEfiTimerArchProtocolGuid \ No newline at end of file
+ gEfiTimerArchProtocolGuid
+
+ \ No newline at end of file