7 #include <hob_iiouds.h>
8 #include <hob_memmap.h>
41 printk(
BIOS_DEBUG,
"\tResource type: 0x%x, attribute: 0x%x, addr: 0x%08llx, len: 0x%08llx\n",
58 const struct SystemMemoryMapHob *hob =
62 printk(
BIOS_DEBUG,
"===================== MEMORY MAP HOB DATA =====================\n");
63 printk(
BIOS_DEBUG,
"hob: %p, hob_size: 0x%lx, SystemMemoryMapHob size: 0x%lx, "
64 "MAX_SOCKET: %d, SAD_RULES: %d\n",
65 hob, hob_size,
sizeof(
struct SystemMemoryMapHob), MAX_SOCKET, SAD_RULES);
66 printk(
BIOS_DEBUG,
"\tlowMemBase: 0x%x, lowMemSize: 0x%x, highMemBase: 0x%x, "
67 "highMemSize: 0x%x\n",
68 hob->lowMemBase, hob->lowMemSize, hob->highMemBase, hob->highMemSize);
69 printk(
BIOS_DEBUG,
"\tasilLoMemBase: 0x%x, asilHiMemBase: 0x%x, asilLoMemSize: 0x%x, "
70 "asilHiMemSize: 0x%x\n",
71 hob->lowMemBase, hob->lowMemSize, hob->highMemBase, hob->highMemSize);
72 printk(
BIOS_DEBUG,
"\tmemSize: 0x%x, memFreq: 0x%x, memMode: 0x%x, volMemMode: 0x%x, "
73 "DimmType: 0x%x, DramType: 0x%x\n",
74 hob->memSize, hob->memFreq, hob->memMode, hob->volMemMode,
75 hob->DimmType, hob->DramType);
76 printk(
BIOS_DEBUG,
"\tNumChPerMC: 0x%x, numberEntries: 0x%x, maxIMC: 0x%x, maxCh: 0x%x\n",
77 hob->NumChPerMC, hob->numberEntries, hob->maxIMC, hob->maxCh);
79 printk(
BIOS_DEBUG,
"\tSystemMemoryMapElement Entries: %d\n", hob->numberEntries);
80 for (
int e = 0; e < hob->numberEntries; ++e) {
81 const struct SystemMemoryMapElement *mem_element = &hob->Element[e];
82 printk(
BIOS_DEBUG,
"\t\tmemory_map %d BaseAddress: 0x%x, ElementSize: 0x%x, Type: 0x%x\n",
83 e, mem_element->BaseAddress,
84 mem_element->ElementSize, mem_element->Type);
95 printk(
BIOS_DEBUG,
"===================== IIO_UDS HOB DATA =====================\n");
97 printk(
BIOS_DEBUG,
"\t===================== SYSTEM STATUS =====================\n");
100 printk(
BIOS_DEBUG,
"\tSystemRasType: 0x%x\n", hob->SystemStatus.SystemRasType);
102 for (
int x = 0;
x < MAX_SOCKET; ++
x) {
104 "MaxCoreToBusRatio: 0x%x, MinCoreToBusRatio: 0x%x\n",
105 x, hob->SystemStatus.FusedCores[
x], hob->SystemStatus.ActiveCores[
x],
106 hob->SystemStatus.MaxCoreToBusRatio[
x],
107 hob->SystemStatus.MinCoreToBusRatio[
x]);
110 hob->SystemStatus.CurrentCoreToBusRatio);
112 hob->SystemStatus.IntelSpeedSelectCapable);
114 hob->SystemStatus.IssConfigTdpLevelInfo);
115 for (
int x = 0;
x < TDP_MAX_LEVEL; ++
x) {
117 "IssConfigTdpPowerInfo: 0x%x, IssConfigTdpCoreCount: 0x%x\n",
118 x, hob->SystemStatus.IssConfigTdpTdpInfo[
x],
119 hob->SystemStatus.IssConfigTdpPowerInfo[
x],
120 hob->SystemStatus.IssConfigTdpCoreCount[
x]);
123 hob->SystemStatus.socketPresentBitMap);
131 printk(
BIOS_DEBUG,
"\t===================== PLATFORM DATA =====================\n");
132 printk(
BIOS_DEBUG,
"\tPlatGlobalIoBase: 0x%x\n", hob->PlatformData.PlatGlobalIoBase);
133 printk(
BIOS_DEBUG,
"\tPlatGlobalIoLimit: 0x%x\n", hob->PlatformData.PlatGlobalIoLimit);
135 hob->PlatformData.PlatGlobalMmiolBase);
137 hob->PlatformData.PlatGlobalMmiolLimit);
139 hob->PlatformData.PlatGlobalMmiohBase);
141 hob->PlatformData.PlatGlobalMmiohLimit);
144 printk(
BIOS_DEBUG,
"\tPciExpressBase: 0x%llx\n", hob->PlatformData.PciExpressBase);
145 printk(
BIOS_DEBUG,
"\tPciExpressSize: 0x%x\n", hob->PlatformData.PciExpressSize);
148 printk(
BIOS_DEBUG,
"\tMaxBusNumber: 0x%x\n", hob->PlatformData.MaxBusNumber);
149 printk(
BIOS_DEBUG,
"\tIoGranularity: 0x%x\n", hob->PlatformData.IoGranularity);
150 printk(
BIOS_DEBUG,
"\tMmiolGranularity: 0x%x\n", hob->PlatformData.MmiolGranularity);
152 hob->PlatformData.MmiohGranularity.hi, hob->PlatformData.MmiohGranularity.lo);
154 for (
int s = 0;
s < hob->PlatformData.numofIIO; ++
s) {
157 hob->PlatformData.IIO_resource[
s].SocketID);
159 hob->PlatformData.IIO_resource[
s].BusBase);
161 hob->PlatformData.IIO_resource[
s].BusLimit);
163 hob->PlatformData.IIO_resource[
s].PciResourceIoBase);
165 hob->PlatformData.IIO_resource[
s].PciResourceIoLimit);
167 hob->PlatformData.IIO_resource[
s].IoApicBase);
169 hob->PlatformData.IIO_resource[
s].IoApicLimit);
171 hob->PlatformData.IIO_resource[
s].PciResourceMem32Base);
173 hob->PlatformData.IIO_resource[
s].PciResourceMem32Limit);
175 hob->PlatformData.IIO_resource[
s].PciResourceMem64Base);
177 hob->PlatformData.IIO_resource[
s].PciResourceMem64Limit);
180 for (
int x = 0;
x < MAX_IIO_STACK; ++
x) {
181 const STACK_RES *ri = &hob->PlatformData.IIO_resource[
s].StackRes[
x];
186 ri->PciResourceIoBase);
188 ri->PciResourceIoLimit);
192 ri->PciResourceMem32Base);
194 ri->PciResourceMem32Limit);
196 ri->PciResourceMem64Base);
198 ri->PciResourceMem64Limit);
203 IIO_RESOURCE_INSTANCE iio_resource =
204 hob->PlatformData.IIO_resource[
s];
205 for (
int p = 0; p < NUMBER_PORTS_PER_SOCKET; ++p) {
207 p, iio_resource.PcieInfo.PortInfo[p].Device,
208 iio_resource.PcieInfo.PortInfo[p].Function);
213 for (
int socket = 0; socket < MAX_SOCKET; ++socket) {
214 for (
int stack = 0; stack < MAX_IIO_STACK; ++stack) {
217 hob->PlatformData.CpuQpiInfo[socket].StackBus[stack]);
#define assert(statement)
#define printk(level,...)
__weak void soc_display_hob(const struct hob_header *hob)
__weak const char * soc_get_guid_name(const uint8_t *guid)
const char * fsp_get_guid_name(const uint8_t *guid)
const void * fsp_find_extension_hob_by_guid(const uint8_t *guid, size_t *size)
void fsp_print_guid(const void *base)
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_DEBUG
BIOS_DEBUG - Verbose output.
static const uint8_t fsp_hob_memmap_guid[16]
static const uint8_t fsp_hob_iio_uds_guid[16]
void soc_display_memmap_hob(void)
static const struct guid_name_map guid_names[]
void soc_display_iio_universal_data_hob(void)
#define s(param, src_bits, pmcreg, dst_bits)