summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/DxeHobLib
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2014-10-27 00:42:57 +0000
committerlzeng14 <lzeng14@Edk2>2014-10-27 00:42:57 +0000
commitf1e2b7283ea6fa12691edee22aca403c3b3af24c (patch)
treee88d6a8d5d7b05ea78ac49d0ad94a9aa8d6e9a2d /MdePkg/Library/DxeHobLib
parent956f71b611b7677bc0605b95c4e67af413aaab86 (diff)
downloadedk2-f1e2b7283ea6fa12691edee22aca403c3b3af24c.tar.gz
edk2-f1e2b7283ea6fa12691edee22aca403c3b3af24c.tar.bz2
edk2-f1e2b7283ea6fa12691edee22aca403c3b3af24c.zip
MdePkg/IntelFrameworkPkg HobLib: Add BuildResourceDescriptorWithOwnerHob() API.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16230 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/DxeHobLib')
-rw-r--r--MdePkg/Library/DxeHobLib/HobLib.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/MdePkg/Library/DxeHobLib/HobLib.c b/MdePkg/Library/DxeHobLib/HobLib.c
index 215436149d..3cedc6f6c6 100644
--- a/MdePkg/Library/DxeHobLib/HobLib.c
+++ b/MdePkg/Library/DxeHobLib/HobLib.c
@@ -1,7 +1,7 @@
/** @file
HOB Library implemenation for Dxe Phase.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
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
@@ -272,6 +272,38 @@ BuildModuleHob (
ASSERT (FALSE);
}
+/**
+ Builds a HOB that describes a chunk of system memory with Owner GUID.
+
+ This function builds a HOB that describes a chunk of system memory.
+ 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 ResourceType The type of resource described by this HOB.
+ @param ResourceAttribute The resource attributes of the memory described by this HOB.
+ @param PhysicalStart The 64 bit physical address of memory described by this HOB.
+ @param NumberOfBytes The length of the memory described by this HOB in bytes.
+ @param OwnerGUID GUID for the owner of this resource.
+
+**/
+VOID
+EFIAPI
+BuildResourceDescriptorWithOwnerHob (
+ IN EFI_RESOURCE_TYPE ResourceType,
+ IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
+ IN EFI_PHYSICAL_ADDRESS PhysicalStart,
+ IN UINT64 NumberOfBytes,
+ IN EFI_GUID *OwnerGUID
+ )
+{
+ //
+ // PEI HOB is read only for DXE phase
+ //
+ ASSERT (FALSE);
+}
+
/**
Builds a HOB that describes a chunk of system memory.