/** @file\r
This module provide Hand-Off Block manupulation.\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
+Copyright (c) 2006, 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 <PeiMain.h>\r
+#include "PeiMain.h"\r
\r
/**\r
\r
Gets the pointer to the HOB List.\r
\r
-\r
- @param PeiServices The PEI core services table.\r
+ @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
@param HobList Pointer to the HOB List.\r
\r
@retval EFI_SUCCESS Get the pointer of HOB List\r
)\r
{\r
PEI_CORE_INSTANCE *PrivateData;\r
-\r
\r
//\r
// Only check this parameter in debug mode\r
\r
*HobList = PrivateData->HobList.Raw;\r
\r
-\r
return EFI_SUCCESS; \r
}\r
\r
/**\r
Add a new HOB to the HOB List.\r
\r
- @param PeiServices - The PEI core services table.\r
- @param Type - Type of the new HOB.\r
- @param Length - Length of the new HOB to allocate.\r
- @param Hob - Pointer to the new HOB.\r
+ @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
+ @param Type Type of the new HOB.\r
+ @param Length Length of the new HOB to allocate.\r
+ @param Hob Pointer to the new HOB.\r
\r
@return EFI_SUCCESS Success to create hob.\r
@retval EFI_INVALID_PARAMETER if Hob is NULL\r
HobEnd++;\r
HandOffHob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd;\r
\r
-\r
return EFI_SUCCESS; \r
}\r
\r
-\r
/**\r
\r
Builds a Handoff Information Table HOB\r
EFI_HOB_HANDOFF_INFO_TABLE *Hob;\r
EFI_HOB_GENERIC_HEADER *HobEnd;\r
\r
- Hob = (VOID *)(UINTN)MemoryBegin;\r
- HobEnd = (EFI_HOB_GENERIC_HEADER*) (Hob+1);\r
- Hob->Header.HobType = EFI_HOB_TYPE_HANDOFF;\r
- Hob->Header.HobLength = sizeof(EFI_HOB_HANDOFF_INFO_TABLE);\r
- Hob->Header.Reserved = 0;\r
+ Hob = (VOID *)(UINTN)MemoryBegin;\r
+ HobEnd = (EFI_HOB_GENERIC_HEADER*) (Hob+1);\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
+ 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 = BootMode;\r
Hob->EfiMemoryTop = MemoryBegin + MemoryLength;\r
Hob->EfiMemoryBottom = MemoryBegin;\r
Hob->EfiFreeMemoryTop = MemoryBegin + MemoryLength;\r
- Hob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS) (UINTN) (HobEnd+1);\r
+ Hob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS) (UINTN) (HobEnd + 1);\r
Hob->EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd;\r
\r
return EFI_SUCCESS;\r