diff options
author | davidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-06 06:42:48 +0000 |
---|---|---|
committer | davidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-06 06:42:48 +0000 |
commit | 045f4521f2dffa1f788ea12f2952782f3db627de (patch) | |
tree | aeefaa4f3520bbdb8ac68c44b892782df7e87b07 /EdkModulePkg/Universal/Runtime | |
parent | 1de04b4f83050f9a8f6c3eedce27f841591972f3 (diff) | |
download | edk2-045f4521f2dffa1f788ea12f2952782f3db627de.zip edk2-045f4521f2dffa1f788ea12f2952782f3db627de.tar.gz edk2-045f4521f2dffa1f788ea12f2952782f3db627de.tar.bz2 |
1)Add a new module CapsuleRuntime under EdkModulePkg\Universal\Capsule\RuntimeDxe.And add the module into Nt32.fpd
2)Modify the related files to fit for the runtime services UpdateCapsule/QueryCapsuleCapabilities defined in UEFI2.0 spec
3)Modify the related files to fit for the runtime services QueryVariableInfo defined in UEFI2.0 spec
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@790 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/Runtime')
-rw-r--r-- | EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c b/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c index 5a21d49..d2428ea 100644 --- a/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c +++ b/EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.c @@ -92,6 +92,9 @@ UINTN mVirtualMapMaxIndex; EFI_LOADED_IMAGE_PROTOCOL *mMyLoadedImage;
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+STATIC EFI_GUID mEfiCapsuleHeaderGuid = EFI_CAPSULE_GUID;
+#endif
//
// Worker Functions
//
@@ -356,6 +359,9 @@ RuntimeDriverSetVirtualAddressMap ( UINTN Index1;
EFI_DRIVER_OS_HANDOFF_HEADER *DriverOsHandoffHeader;
EFI_DRIVER_OS_HANDOFF *DriverOsHandoff;
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ EFI_CAPSULE_TABLE *CapsuleTable;
+#endif
//
// Can only switch to virtual addresses once the memory map is locked down,
@@ -464,6 +470,11 @@ RuntimeDriverSetVirtualAddressMap ( RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetVariable);
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->SetVariable);
RuntimeDriverConvertInternalPointer ((VOID **) &gRT->GetNextVariableName);
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryVariableInfo);
+ RuntimeDriverConvertInternalPointer ((VOID **) &gRT->UpdateCapsule);
+ RuntimeDriverConvertInternalPointer ((VOID **) &gRT->QueryCapsuleCapabilities);
+#endif
RuntimeDriverCalculateEfiHdrCrc (&gRT->Hdr);
//
@@ -486,6 +497,15 @@ RuntimeDriverSetVirtualAddressMap ( RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
}
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ if (CompareGuid (&mEfiCapsuleHeaderGuid, &(gST->ConfigurationTable[Index].VendorGuid))) {
+ CapsuleTable = gST->ConfigurationTable[Index].VendorTable;
+ for (Index1 = 0; Index1 < CapsuleTable->CapsuleArrayNumber; Index1++) {
+ RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &CapsuleTable->CapsulePtr[Index1]);
+ }
+ RuntimeDriverConvertPointer (EFI_OPTIONAL_POINTER, (VOID **) &(gST->ConfigurationTable[Index].VendorTable));
+ }
+#endif
}
//
// Convert the runtime fields of the EFI System Table and recompute the CRC-32
|