]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Library/PeiHobLibFramework/HobLib.c
Add explicit type cast to suppress possible warning of precession loss.
[mirror_edk2.git] / IntelFrameworkPkg / Library / PeiHobLibFramework / HobLib.c
index 3ce955a88c44ad4175f7cbce862e56ce48865360..8bd9eac8193117914701914c358fd3b21c7f7987 100644 (file)
@@ -5,7 +5,7 @@
  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. All rights reserved.<BR>\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
@@ -281,7 +281,7 @@ BuildModuleHob (
   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
@@ -323,7 +323,7 @@ BuildResourceDescriptorHob (
 {\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
@@ -432,7 +432,7 @@ BuildFvHob (
 {\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
@@ -464,7 +464,7 @@ BuildFv2Hob (
 {\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
@@ -495,7 +495,7 @@ BuildCvHob (
 {\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
@@ -523,7 +523,7 @@ BuildCpuHob (
 {\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
@@ -559,7 +559,7 @@ BuildStackHob (
   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
@@ -599,7 +599,7 @@ BuildBspStoreHob (
   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
@@ -639,7 +639,7 @@ BuildMemoryAllocationHob (
   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