6 #include <hob_iiouds.h>
7 #include <hob_memmap.h>
8 #include <hob_prevbooterr.h>
10 #include <soc/soc_util.h>
41 struct SystemMemoryMapHob *hob = (
struct SystemMemoryMapHob *)*hob_addr;
43 printk(
BIOS_DEBUG,
"================== MEMORY MAP HOB DATA ==================\n");
47 printk(
BIOS_DEBUG,
"\tlowMemBase: 0x%x, lowMemSize: 0x%x, highMemBase: 0x%x, "
48 "highMemSize: 0x%x\n",
49 hob->lowMemBase, hob->lowMemSize, hob->highMemBase, hob->highMemSize);
51 hob->memSize, hob->memFreq);
54 printk(
BIOS_DEBUG,
"\tSystemMemoryMapElement Entries: %d, entry size: %ld\n",
55 hob->numberEntries,
sizeof(SYSTEM_MEMORY_MAP_ELEMENT));
56 for (
int e = 0; e < hob->numberEntries; ++e) {
57 const struct SystemMemoryMapElement *mem_element = &hob->Element[e];
58 printk(
BIOS_DEBUG,
"\t\tmemory_map %d BaseAddress: 0x%x, ElementSize: 0x%x, Type: 0x%x\n",
59 e, mem_element->BaseAddress,
60 mem_element->ElementSize, mem_element->Type);
71 printk(
BIOS_DEBUG,
"===================== IIO_UDS HOB DATA =====================\n");
75 printk(
BIOS_DEBUG,
"\t===================== SYSTEM STATUS =====================\n");
80 printk(
BIOS_DEBUG,
"\t===================== PLATFORM DATA =====================\n");
81 printk(
BIOS_DEBUG,
"\tPlatGlobalIoBase: 0x%x\n", hob->PlatformData.PlatGlobalIoBase);
82 printk(
BIOS_DEBUG,
"\tPlatGlobalIoLimit: 0x%x\n", hob->PlatformData.PlatGlobalIoLimit);
84 hob->PlatformData.PlatGlobalMmio32Base);
86 hob->PlatformData.PlatGlobalMmio32Limit);
88 hob->PlatformData.PlatGlobalMmio64Base);
90 hob->PlatformData.PlatGlobalMmio64Limit);
93 printk(
BIOS_DEBUG,
"\tPciExpressBase: 0x%llx\n", hob->PlatformData.PciExpressBase);
94 printk(
BIOS_DEBUG,
"\tPciExpressSize: 0x%x\n", hob->PlatformData.PciExpressSize);
97 printk(
BIOS_DEBUG,
"\tMaxBusNumber: 0x%x\n", hob->PlatformData.MaxBusNumber);
98 printk(
BIOS_DEBUG,
"\tIoGranularity: 0x%x\n", hob->PlatformData.IoGranularity);
99 printk(
BIOS_DEBUG,
"\tMmiolGranularity: 0x%x\n", hob->PlatformData.MmiolGranularity);
101 hob->PlatformData.MmiohGranularity.hi, hob->PlatformData.MmiohGranularity.lo);
103 hob->PlatformData.Pci64BitResourceAllocation);
105 for (
uint8_t s = 0;
s < hob->PlatformData.numofIIO; ++
s) {
108 hob->PlatformData.IIO_resource[
s].Valid);
110 hob->PlatformData.IIO_resource[
s].SocketID);
112 hob->PlatformData.IIO_resource[
s].BusBase);
114 hob->PlatformData.IIO_resource[
s].BusLimit);
116 hob->PlatformData.IIO_resource[
s].PciResourceIoBase);
118 hob->PlatformData.IIO_resource[
s].PciResourceIoLimit);
120 hob->PlatformData.IIO_resource[
s].IoApicBase);
122 hob->PlatformData.IIO_resource[
s].IoApicLimit);
124 hob->PlatformData.IIO_resource[
s].Mmio32Base);
126 hob->PlatformData.IIO_resource[
s].Mmio32Limit);
128 hob->PlatformData.IIO_resource[
s].Mmio64Base);
130 hob->PlatformData.IIO_resource[
s].Mmio64Limit);
133 for (
int x = 0;
x < MAX_LOGIC_IIO_STACK; ++
x) {
134 const STACK_RES *ri = &hob->PlatformData.IIO_resource[
s].StackRes[
x];
140 ri->PciResourceIoBase);
142 ri->PciResourceIoLimit);
150 ri->PciResourceMem32Base);
152 ri->PciResourceMem32Limit);
154 ri->PciResourceMem64Base);
156 ri->PciResourceMem64Limit);
161 IIO_RESOURCE_INSTANCE iio_resource =
162 hob->PlatformData.IIO_resource[
s];
163 for (
int p = 0; p < NUMBER_PORTS_PER_SOCKET; ++p) {
165 p, iio_resource.PcieInfo.PortInfo[p].Device,
166 iio_resource.PcieInfo.PortInfo[p].Function);
181 printk(
BIOS_DEBUG,
"================ PREV_BOOT_ERR_SRC HOB DATA ================\n");
184 if (hob->Length <= 2) {
185 printk(
BIOS_INFO,
"PREV_BOOT_ERR_SRC_HOB does not have valid error record.\n");
189 MCBANK_ERR_INFO *mcbinfo;
190 for (
uint16_t len = 2; len < hob->Length; ) {
195 mcbinfo = (MCBANK_ERR_INFO *)((
void *)hob + len);
197 mcbinfo->Segment, mcbinfo->Socket, mcbinfo->ApicId);
200 mcbinfo->McBankStatus);
203 len +=
sizeof(MCBANK_ERR_INFO);
207 len +=
sizeof(PCI_EX_ERR_INFO);
211 len +=
sizeof(CSR_ERR_INFO);
#define printk(level,...)
__weak void soc_display_hob(const struct hob_header *hob)
__weak const char * soc_get_guid_name(const uint8_t *guid)
@ HOB_TYPE_GUID_EXTENSION
const struct hob_resource * fsp_hob_header_to_resource(const struct hob_header *hob)
bool fsp_guid_compare(const uint8_t guid1[16], const uint8_t guid2[16])
void hexdump(const void *memory, size_t length)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
static const uint8_t fsp_hob_memmap_guid[16]
static void soc_display_memmap_hob(const struct SystemMemoryMapHob **hob_addr)
static const uint8_t fsp_hob_iio_uds_guid[16]
static const uint8_t fsp_hob_prevbooterr_guid[16]
static void soc_display_iio_universal_data_hob(const IIO_UDS *hob)
static const struct guid_name_map guid_names[]
static void soc_display_prevbooterr_hob(const PREV_BOOT_ERR_SRC_HOB *hob)
#define s(param, src_bits, pmcreg, dst_bits)