This library instance uses EFI_HOB_TYPE_CV defined in Intel framework HOB specification v0.9\r
to implement HobLib BuildCvHob() API. \r
\r
-Copyright (c) 2007 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
**/\r
\r
-#include <PiPei.h>\r
#include <FrameworkPei.h>\r
\r
#include <Guid/MemoryAllocationHob.h>\r
ASSERT (((MemoryAllocationModule & (EFI_PAGE_SIZE - 1)) == 0) &&\r
((ModuleLength & (EFI_PAGE_SIZE - 1)) == 0));\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE));\r
\r
CopyGuid (&(Hob->MemoryAllocationHeader.Name), &gEfiHobMemoryAllocModuleGuid);\r
Hob->MemoryAllocationHeader.MemoryBaseAddress = MemoryAllocationModule;\r
{\r
EFI_HOB_RESOURCE_DESCRIPTOR *Hob;\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, sizeof (EFI_HOB_RESOURCE_DESCRIPTOR));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16) sizeof (EFI_HOB_RESOURCE_DESCRIPTOR));\r
\r
Hob->ResourceType = ResourceType;\r
Hob->ResourceAttribute = ResourceAttribute;\r
{\r
EFI_HOB_FIRMWARE_VOLUME *Hob;\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV, sizeof (EFI_HOB_FIRMWARE_VOLUME));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME));\r
\r
Hob->BaseAddress = BaseAddress;\r
Hob->Length = Length;\r
{\r
EFI_HOB_FIRMWARE_VOLUME2 *Hob;\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV2, sizeof (EFI_HOB_FIRMWARE_VOLUME2));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV2, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME2));\r
\r
Hob->BaseAddress = BaseAddress;\r
Hob->Length = Length;\r
It can only be invoked during PEI phase;\r
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r
\r
+ If the platform does not support Capsule Volume HOBs, then ASSERT().\r
If there is no additional space for HOB creation, then ASSERT().\r
\r
@param BaseAddress The base address of the Capsule Volume.\r
{\r
EFI_HOB_CAPSULE_VOLUME *Hob;\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CV, sizeof (EFI_HOB_CAPSULE_VOLUME));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CV, (UINT16) sizeof (EFI_HOB_CAPSULE_VOLUME));\r
\r
Hob->BaseAddress = BaseAddress;\r
Hob->Length = Length;\r
{\r
EFI_HOB_CPU *Hob;\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CPU, sizeof (EFI_HOB_CPU));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CPU, (UINT16) sizeof (EFI_HOB_CPU));\r
\r
Hob->SizeOfMemorySpace = SizeOfMemorySpace;\r
Hob->SizeOfIoSpace = SizeOfIoSpace;\r
ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&\r
((Length & (EFI_PAGE_SIZE - 1)) == 0));\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK));\r
\r
CopyGuid (&(Hob->AllocDescriptor.Name), &gEfiHobMemoryAllocStackGuid);\r
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&\r
((Length & (EFI_PAGE_SIZE - 1)) == 0));\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_BSP_STORE));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION_BSP_STORE));\r
\r
CopyGuid (&(Hob->AllocDescriptor.Name), &gEfiHobMemoryAllocBspStoreGuid);\r
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&\r
((Length & (EFI_PAGE_SIZE - 1)) == 0));\r
\r
- Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION));\r
+ Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION));\r
\r
ZeroMem (&(Hob->AllocDescriptor.Name), sizeof (EFI_GUID));\r
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r