+++ /dev/null
-/** @file\r
- HOB Library implementation for Standalone MM Core.\r
-\r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.<BR>\r
-\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
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <PiMm.h>\r
-\r
-#include <Library/HobLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-\r
-#include <Guid/MemoryAllocationHob.h>\r
-\r
-//\r
-// Cache copy of HobList pointer.\r
-//\r
-extern VOID *gHobList;\r
-\r
-EFI_HOB_HANDOFF_INFO_TABLE*\r
-HobConstructor (\r
- IN VOID *EfiMemoryBegin,\r
- IN UINTN EfiMemoryLength,\r
- IN VOID *EfiFreeMemoryBottom,\r
- IN VOID *EfiFreeMemoryTop\r
- )\r
-{\r
- EFI_HOB_HANDOFF_INFO_TABLE *Hob;\r
- EFI_HOB_GENERIC_HEADER *HobEnd;\r
-\r
- Hob = EfiFreeMemoryBottom;\r
- HobEnd = (EFI_HOB_GENERIC_HEADER *)(Hob+1);\r
-\r
- Hob->Header.HobType = EFI_HOB_TYPE_HANDOFF;\r
- Hob->Header.HobLength = sizeof (EFI_HOB_HANDOFF_INFO_TABLE);\r
- Hob->Header.Reserved = 0;\r
-\r
- HobEnd->HobType = EFI_HOB_TYPE_END_OF_HOB_LIST;\r
- HobEnd->HobLength = sizeof (EFI_HOB_GENERIC_HEADER);\r
- HobEnd->Reserved = 0;\r
-\r
- Hob->Version = EFI_HOB_HANDOFF_TABLE_VERSION;\r
- Hob->BootMode = BOOT_WITH_FULL_CONFIGURATION;\r
-\r
- Hob->EfiMemoryTop = (UINTN)EfiMemoryBegin + EfiMemoryLength;\r
- Hob->EfiMemoryBottom = (UINTN)EfiMemoryBegin;\r
- Hob->EfiFreeMemoryTop = (UINTN)EfiFreeMemoryTop;\r
- Hob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS)(UINTN)(HobEnd+1);\r
- Hob->EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS)(UINTN)HobEnd;\r
-\r
- gHobList = Hob;\r
-\r
- return Hob;\r
-}\r