diff options
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/smm/tseg_region.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cpu/x86/smm/tseg_region.c b/src/cpu/x86/smm/tseg_region.c index df9dea5c0f..07789f4ac1 100644 --- a/src/cpu/x86/smm/tseg_region.c +++ b/src/cpu/x86/smm/tseg_region.c @@ -84,3 +84,23 @@ void __weak stage_cache_external_region(void **base, size_t *size) *size = 0; } } + +void smm_list_regions(void) +{ + uintptr_t base; + size_t size; + int i; + + smm_region(&base, &size); + if (!size) + return; + + printk(BIOS_DEBUG, "SMM Memory Map\n"); + printk(BIOS_DEBUG, "SMRAM : 0x%zx 0x%zx\n", base, size); + + for (i = 0; i < SMM_SUBREGION_NUM; i++) { + if (smm_subregion(i, &base, &size)) + continue; + printk(BIOS_DEBUG, " Subregion %d: 0x%zx 0x%zx\n", i, base, size); + } +} |