summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-04 06:51:07 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-04 06:51:07 +0000
commit61acaac87fd8567a1b975aa3ec9c3cb9c33a4900 (patch)
tree270daff90f0206350f312c8e39da0ae337c9bae7 /MdePkg
parent25126a0530371f7a8e20bf663cc1beaf3eebd6f2 (diff)
downloadedk2-platforms-61acaac87fd8567a1b975aa3ec9c3cb9c33a4900.tar.xz
1. rolled back Hob library to remove new API - BuildCapsuleHob() and related implementation in MdePkg.
2. implemented BuildCvHob() in PeiHobLib/HobLib.c. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9389 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Library/HobLib.h19
-rw-r--r--MdePkg/Library/DxeHobLib/HobLib.c25
-rw-r--r--MdePkg/Library/PeiHobLib/HobLib.c34
3 files changed, 6 insertions, 72 deletions
diff --git a/MdePkg/Include/Library/HobLib.h b/MdePkg/Include/Library/HobLib.h
index dcb4080d48..d17de0b35e 100644
--- a/MdePkg/Include/Library/HobLib.h
+++ b/MdePkg/Include/Library/HobLib.h
@@ -416,25 +416,6 @@ BuildMemoryAllocationHob (
);
/**
- Builds an UEFI Capsule HOB.
-
- This function builds an UEFI Capsule HOB.
- It can only be invoked during PEI phase;
- for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
- If there is no additional space for HOB creation, then ASSERT().
-
- @param BaseAddress The physical memory-mapped base address of an UEFI capsule.
- @param Length The length of the contiguous memory in bytes.
-
-**/
-VOID
-EFIAPI
-BuildCapsuleHob (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- );
-
-/**
Returns the type of a HOB.
This macro returns the HobType field from the HOB header for the
diff --git a/MdePkg/Library/DxeHobLib/HobLib.c b/MdePkg/Library/DxeHobLib/HobLib.c
index 9de92ef3be..61a8fba9a2 100644
--- a/MdePkg/Library/DxeHobLib/HobLib.c
+++ b/MdePkg/Library/DxeHobLib/HobLib.c
@@ -562,28 +562,3 @@ BuildMemoryAllocationHob (
//
ASSERT (FALSE);
}
-
-/**
- Builds an UEFI Capsule HOB.
-
- This function builds an UEFI Capsule HOB.
- It can only be invoked during PEI phase;
- for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
- If there is no additional space for HOB creation, then ASSERT().
-
- @param BaseAddress The physical memory-mapped base address of an UEFI capsule.
- @param Length The length of the contiguous memory in bytes.
-
-**/
-VOID
-EFIAPI
-BuildCapsuleHob (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- //
- // PEI HOB is read only for DXE phase
- //
- ASSERT (FALSE);
-}
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index f0cc665085..1815ddf530 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -489,7 +489,12 @@ BuildCvHob (
IN UINT64 Length
)
{
- ASSERT (FALSE);
+ EFI_HOB_UEFI_CAPSULE *Hob;
+
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_UEFI_CAPSULE, sizeof (EFI_HOB_UEFI_CAPSULE));
+
+ Hob->BaseAddress = BaseAddress;
+ Hob->Length = Length;
}
/**
@@ -641,30 +646,3 @@ BuildMemoryAllocationHob (
//
ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}
-
-/**
- Builds an UEFI Capsule HOB.
-
- This function builds an UEFI Capsule HOB.
- It can only be invoked during PEI phase;
- for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
- If there is no additional space for HOB creation, then ASSERT().
-
- @param BaseAddress The physical memory-mapped base address of an UEFI capsule.
- @param Length The length of the contiguous memory in bytes.
-
-**/
-VOID
-EFIAPI
-BuildCapsuleHob (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length
- )
-{
- EFI_HOB_UEFI_CAPSULE *Hob;
-
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_UEFI_CAPSULE, sizeof (EFI_HOB_UEFI_CAPSULE));
-
- Hob->BaseAddress = BaseAddress;
- Hob->Length = Length;
-}