TianoCore EDK2 master
Loading...
Searching...
No Matches
HobPrintLib.c File Reference

Go to the source code of this file.

Data Structures

struct  HOB_PRINT_HANDLER_TABLE
 

Macros

#define ROW_LIMITER   16
 

Functions

EFI_STATUS PrintHex (IN UINT32 ErrorLevel, IN UINT8 *DataStart, IN UINT16 DataSize)
 
EFI_STATUS PrintInvalidHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintHandOffHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintMemoryAllocationHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintResourceDiscriptorHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintGuidHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintFvHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintCpuHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintMemoryPoolHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintFv2Hob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintCapsuleHob (IN VOID *HobStart, IN UINT16 HobLength)
 
EFI_STATUS PrintFv3Hob (IN VOID *HobStart, IN UINT16 HobLength)
 
VOID EFIAPI PrintHobList (IN CONST VOID *HobStart, IN HOB_PRINT_HANDLER PrintHandler)
 

Variables

CHAR8 * mMemoryTypeStr []
 
CHAR8 * mResource_Type_List []
 
HOB_PRINT_HANDLER_TABLE mHobHandles []
 

Detailed Description

Prints all the HOBs.

Copyright (c) 2024, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file HobPrintLib.c.

Macro Definition Documentation

◆ ROW_LIMITER

#define ROW_LIMITER   16

Definition at line 18 of file HobPrintLib.c.

Function Documentation

◆ PrintCapsuleHob()

EFI_STATUS PrintCapsuleHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in Capsule Hob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_UEFI_CAPSULE.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_UEFI_CAPSULE.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 344 of file HobPrintLib.c.

◆ PrintCpuHob()

EFI_STATUS PrintCpuHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in Cpu Hob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_CPU.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_CPU.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 272 of file HobPrintLib.c.

◆ PrintFv2Hob()

EFI_STATUS PrintFv2Hob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in Fv2Hob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_FV2.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_FV2.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 320 of file HobPrintLib.c.

◆ PrintFv3Hob()

EFI_STATUS PrintFv3Hob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in Fv3 Hob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_FV3.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_FV3.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 366 of file HobPrintLib.c.

◆ PrintFvHob()

EFI_STATUS PrintFvHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in FV Hob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_FV.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_FV.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 250 of file HobPrintLib.c.

◆ PrintGuidHob()

EFI_STATUS PrintGuidHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the Guid Hob using related print handle function.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_GUID_EXTENSION.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_GUID_EXTENSION.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 224 of file HobPrintLib.c.

◆ PrintHandOffHob()

EFI_STATUS PrintHandOffHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in HandOffHob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_HANDOFF.
[in]HobLengthThe length in bytes of HOB of type EFI_HOB_TYPE_HANDOFF.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 117 of file HobPrintLib.c.

◆ PrintHex()

EFI_STATUS PrintHex ( IN UINT32  ErrorLevel,
IN UINT8 *  DataStart,
IN UINT16  DataSize 
)

Print the Hex value of a given range.

Parameters
[in]ErrorLevelError Level to print the Hex value.
[in]DataStartA pointer to the start of data to be printed.
[in]DataSizeThe length of the data to be printed.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 66 of file HobPrintLib.c.

◆ PrintHobList()

VOID EFIAPI PrintHobList ( IN CONST VOID *  HobStart,
IN HOB_PRINT_HANDLER PrintHandler  OPTIONAL 
)

Print all HOBs info from the HOB list.

Parameters
[in]HobStartA pointer to the HOB list.
[in]PrintHandlerA custom handler to print HOB info.

Definition at line 410 of file HobPrintLib.c.

◆ PrintInvalidHob()

EFI_STATUS PrintInvalidHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the Hex value of the Invalid HOB.

Parameters
[in]HobStartA pointer to the Invalid HOB.
[in]HobLengthThe length in bytes of the Invalid HOB.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 99 of file HobPrintLib.c.

◆ PrintMemoryAllocationHob()

EFI_STATUS PrintMemoryAllocationHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in Memory Allocation Hob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_MEMORY_ALLOCATION.
[in]HobLengthThe length in bytes of HOB of type EFI_HOB_TYPE_MEMORY_ALLOCATION.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 145 of file HobPrintLib.c.

◆ PrintMemoryPoolHob()

EFI_STATUS PrintMemoryPoolHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in MemoryPoolHob.

Parameters
[in]HobStartA pointer to the HOB of type EFI_HOB_TYPE_MEMORY_POOL.
[in]HobLengthThe length in bytes of the HOB of type EFI_HOB_TYPE_MEMORY_POOL.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 294 of file HobPrintLib.c.

◆ PrintResourceDiscriptorHob()

EFI_STATUS PrintResourceDiscriptorHob ( IN VOID *  HobStart,
IN UINT16  HobLength 
)

Print the information in Resource Discriptor Hob.

Parameters
[in]HobStartA pointer to HOB of type EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.
[in]HobLengthThe Length in bytes of HOB of type EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.
Return values
EFI_SUCCESSIf it completed successfully.

Definition at line 196 of file HobPrintLib.c.

Variable Documentation

◆ mHobHandles

HOB_PRINT_HANDLER_TABLE mHobHandles[]
Initial value:
= {
{ EFI_HOB_TYPE_HANDOFF, "EFI_HOB_TYPE_HANDOFF", PrintHandOffHob },
{ EFI_HOB_TYPE_MEMORY_ALLOCATION, "EFI_HOB_TYPE_MEMORY_ALLOCATION", PrintMemoryAllocationHob },
{ EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, "EFI_HOB_TYPE_RESOURCE_DESCRIPTOR", PrintResourceDiscriptorHob },
{ EFI_HOB_TYPE_GUID_EXTENSION, "EFI_HOB_TYPE_GUID_EXTENSION", PrintGuidHob },
{ EFI_HOB_TYPE_FV, "EFI_HOB_TYPE_FV", PrintFvHob },
{ EFI_HOB_TYPE_CPU, "EFI_HOB_TYPE_CPU", PrintCpuHob },
{ EFI_HOB_TYPE_MEMORY_POOL, "EFI_HOB_TYPE_MEMORY_POOL", PrintMemoryPoolHob },
{ EFI_HOB_TYPE_FV2, "EFI_HOB_TYPE_FV2", PrintFv2Hob },
{ EFI_HOB_TYPE_UEFI_CAPSULE, "EFI_HOB_TYPE_UEFI_CAPSULE", PrintCapsuleHob },
{ EFI_HOB_TYPE_FV3, "EFI_HOB_TYPE_FV3", PrintFv3Hob }
}
EFI_STATUS PrintCapsuleHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:344
EFI_STATUS PrintMemoryAllocationHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:145
EFI_STATUS PrintCpuHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:272
EFI_STATUS PrintGuidHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:224
EFI_STATUS PrintHandOffHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:117
EFI_STATUS PrintMemoryPoolHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:294
EFI_STATUS PrintFv2Hob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:320
EFI_STATUS PrintFvHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:250
EFI_STATUS PrintResourceDiscriptorHob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:196
EFI_STATUS PrintFv3Hob(IN VOID *HobStart, IN UINT16 HobLength)
Definition: HobPrintLib.c:366

Definition at line 388 of file HobPrintLib.c.

◆ mMemoryTypeStr

CHAR8* mMemoryTypeStr[]
Initial value:
= {
"EfiReservedMemoryType",
"EfiLoaderCode",
"EfiLoaderData",
"EfiBootServicesCode",
"EfiBootServicesData",
"EfiRuntimeServicesCode",
"EfiRuntimeServicesData",
"EfiConventionalMemory",
"EfiUnusableMemory",
"EfiACPIReclaimMemory",
"EfiACPIMemoryNVS",
"EfiMemoryMappedIO",
"EfiMemoryMappedIOPortSpace",
"EfiPalCode",
"EfiPersistentMemory",
"EfiMaxMemoryType"
}

Definition at line 26 of file HobPrintLib.c.

◆ mResource_Type_List

CHAR8* mResource_Type_List[]
Initial value:
= {
"EFI_RESOURCE_SYSTEM_MEMORY ",
"EFI_RESOURCE_MEMORY_MAPPED_IO ",
"EFI_RESOURCE_IO ",
"EFI_RESOURCE_FIRMWARE_DEVICE ",
"EFI_RESOURCE_MEMORY_MAPPED_IO_PORT ",
"EFI_RESOURCE_MEMORY_RESERVED ",
"EFI_RESOURCE_IO_RESERVED ",
"EFI_RESOURCE_MAX_MEMORY_TYPE "
}

Definition at line 45 of file HobPrintLib.c.