summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Capsule
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Capsule')
-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
3 files changed, 49 insertions, 137 deletions
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;
+}