soc/mediatek/mt8196: Initialize SSPM
[coreboot2.git] / src / drivers / intel / fsp2_0 / upd_display.c
blob0883390a64d306925b234b6a2647134a69e3a0ea
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <console/console.h>
4 #include <fsp/util.h>
5 #include <lib.h>
7 void fsp_display_upd_value(const char *name, size_t size, uint64_t old,
8 uint64_t new)
10 size *= 2;
11 if (old == new) {
12 printk(BIOS_SPEW, " 0x%0*llx: %s\n", (int)size, new, name);
13 } else {
14 printk(BIOS_SPEW, " 0x%0*llx --> 0x%0*llx: %s\n", (int)size,
15 old, (int)size, new, name);
19 static void fspm_display_arch_params(const FSPM_ARCHx_UPD *old,
20 const FSPM_ARCHx_UPD *new)
22 /* Display the architectural parameters for MemoryInit */
23 printk(BIOS_SPEW, "Architectural UPD values for MemoryInit at: %p\n",
24 new);
25 fsp_display_upd_value("Revision", sizeof(old->Revision),
26 old->Revision, new->Revision);
27 fsp_display_upd_value("NvsBufferPtr", sizeof(old->NvsBufferPtr),
28 (uintptr_t)old->NvsBufferPtr,
29 (uintptr_t)new->NvsBufferPtr);
30 fsp_display_upd_value("StackBase", sizeof(old->StackBase),
31 (uintptr_t)old->StackBase,
32 (uintptr_t)new->StackBase);
33 fsp_display_upd_value("StackSize", sizeof(old->StackSize),
34 old->StackSize, new->StackSize);
35 fsp_display_upd_value("BootLoaderTolumSize",
36 sizeof(old->BootLoaderTolumSize),
37 old->BootLoaderTolumSize, new->BootLoaderTolumSize);
38 fsp_display_upd_value("BootMode", sizeof(old->BootMode),
39 old->BootMode, new->BootMode);
42 /* Display the UPD parameters for MemoryInit */
43 __weak void soc_display_fspm_upd_params(
44 const FSPM_UPD *fspm_old_upd,
45 const FSPM_UPD *fspm_new_upd)
47 printk(BIOS_SPEW, "UPD values for MemoryInit:\n");
48 hexdump(fspm_new_upd, sizeof(*fspm_new_upd));
51 void fspm_display_upd_values(const FSPM_UPD *old,
52 const FSPM_UPD *new)
54 /* Display the UPD data */
55 fspm_display_arch_params(&old->FspmArchUpd, &new->FspmArchUpd);
56 soc_display_fspm_upd_params(old, new);
59 /* Display the UPD parameters for SiliconInit */
60 __weak void soc_display_fsps_upd_params(
61 const FSPS_UPD *fsps_old_upd,
62 const FSPS_UPD *fsps_new_upd)
64 printk(BIOS_SPEW, "UPD values for SiliconInit:\n");
65 hexdump(fsps_new_upd, sizeof(*fsps_new_upd));