cpu/x86/smm: Use PRIxPTR to print uintptr_t

Since 'base' is a uintptr_t, it needs the PRIxPTR format specifier. This
fixes a compilation error when targeting x86_64 or using Clang 9.0.0.

Change-Id: Ib806e2b3cbb255ef208b361744ac4547b8ba262f
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36785
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
This commit is contained in:
Jacob Garber 2019-11-04 09:35:15 -07:00 committed by Patrick Georgi
parent eb2e0b56ee
commit 06f2fcc0ff
1 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <stage_cache.h> #include <stage_cache.h>
#include <types.h> #include <types.h>
#include <inttypes.h>
/* /*
* Subregions within SMM * Subregions within SMM
@ -88,11 +89,11 @@ void smm_list_regions(void)
return; return;
printk(BIOS_DEBUG, "SMM Memory Map\n"); printk(BIOS_DEBUG, "SMM Memory Map\n");
printk(BIOS_DEBUG, "SMRAM : 0x%zx 0x%zx\n", base, size); printk(BIOS_DEBUG, "SMRAM : 0x%" PRIxPTR " 0x%zx\n", base, size);
for (i = 0; i < SMM_SUBREGION_NUM; i++) { for (i = 0; i < SMM_SUBREGION_NUM; i++) {
if (smm_subregion(i, &base, &size)) if (smm_subregion(i, &base, &size))
continue; continue;
printk(BIOS_DEBUG, " Subregion %d: 0x%zx 0x%zx\n", i, base, size); printk(BIOS_DEBUG, " Subregion %d: 0x%" PRIxPTR " 0x%zx\n", i, base, size);
} }
} }