X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FHob%2FHob.c;fp=MdeModulePkg%2FCore%2FPei%2FHob%2FHob.c;h=ed49e5be4ad672e47c4da143fa611f50a6d96914;hp=bb9f3f744e96c3a266b2f4f5df61adb1859a3e3d;hb=d1102dba7210b95e41d06c2338a22ba6af248645;hpb=ca79bab7af4770c5eb578f6d495af01705aedb79 diff --git a/MdeModulePkg/Core/Pei/Hob/Hob.c b/MdeModulePkg/Core/Pei/Hob/Hob.c index bb9f3f744e..ed49e5be4a 100644 --- a/MdeModulePkg/Core/Pei/Hob/Hob.c +++ b/MdeModulePkg/Core/Pei/Hob/Hob.c @@ -1,14 +1,14 @@ /** @file This module provide Hand-Off Block manupulation. - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+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 +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -34,22 +34,22 @@ PeiGetHobList ( ) { PEI_CORE_INSTANCE *PrivateData; - + // // Only check this parameter in debug mode // - - DEBUG_CODE_BEGIN (); + + DEBUG_CODE_BEGIN (); if (HobList == NULL) { return EFI_INVALID_PARAMETER; } DEBUG_CODE_END (); - + PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices); *HobList = PrivateData->HobList.Raw; - return EFI_SUCCESS; + return EFI_SUCCESS; } @@ -90,7 +90,7 @@ PeiCreateHob ( HandOffHob = *Hob; // - // Check Length to avoid data overflow. + // Check Length to avoid data overflow. // if (0x10000 - Length <= 0x7) { return EFI_INVALID_PARAMETER; @@ -106,7 +106,7 @@ PeiCreateHob ( DEBUG ((EFI_D_ERROR, " FreeMemoryBottom - 0x%08x\n", (UINTN)HandOffHob->EfiFreeMemoryBottom)); return EFI_OUT_OF_RESOURCES; } - + *Hob = (VOID*) (UINTN) HandOffHob->EfiEndOfHobList; ((EFI_HOB_GENERIC_HEADER*) *Hob)->HobType = Type; ((EFI_HOB_GENERIC_HEADER*) *Hob)->HobLength = Length; @@ -114,14 +114,14 @@ PeiCreateHob ( HobEnd = (EFI_HOB_GENERIC_HEADER*) ((UINTN) *Hob + Length); HandOffHob->EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd; - + HobEnd->HobType = EFI_HOB_TYPE_END_OF_HOB_LIST; HobEnd->HobLength = (UINT16) sizeof (EFI_HOB_GENERIC_HEADER); HobEnd->Reserved = 0; HobEnd++; HandOffHob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd; - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -222,14 +222,14 @@ PeiCoreBuildHobHandoffInfoTable ( Hob->Header.HobType = EFI_HOB_TYPE_HANDOFF; Hob->Header.HobLength = (UINT16) sizeof (EFI_HOB_HANDOFF_INFO_TABLE); Hob->Header.Reserved = 0; - + HobEnd->HobType = EFI_HOB_TYPE_END_OF_HOB_LIST; HobEnd->HobLength = (UINT16) sizeof (EFI_HOB_GENERIC_HEADER); HobEnd->Reserved = 0; Hob->Version = EFI_HOB_HANDOFF_TABLE_VERSION; Hob->BootMode = BootMode; - + Hob->EfiMemoryTop = MemoryBegin + MemoryLength; Hob->EfiMemoryBottom = MemoryBegin; Hob->EfiFreeMemoryTop = MemoryBegin + MemoryLength;