summaryrefslogtreecommitdiffstats
path: root/src/cpu/x86
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-04-07 18:33:50 +0200
committerArthur Heymans <arthur@aheymans.xyz>2022-04-11 10:08:10 +0000
commitff69b6f4d59ebc2917d462ade5eab3e2a0d69509 (patch)
tree5de45e6430bf69eea33e17a4ab93e70ded755585 /src/cpu/x86
parentbc749a068ad8640497abb1985f0ccfdd66cd5ffb (diff)
downloadcoreboot-ff69b6f4d59ebc2917d462ade5eab3e2a0d69509.tar.gz
coreboot-ff69b6f4d59ebc2917d462ade5eab3e2a0d69509.tar.bz2
coreboot-ff69b6f4d59ebc2917d462ade5eab3e2a0d69509.zip
cpu/x86/smm_module_loader.c: Clean up printing the CPU map
There is no reason to do this in a separate loop. Change-Id: I7fe9f1004597602147aae72f4b754395b6b527cf Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63473 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/smm/smm_module_loader.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index 17c6779122f7..9068435d20a9 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -126,38 +126,26 @@ static int smm_create_map(uintptr_t smbase, unsigned int num_cpus,
}
for (i = 0; i < num_cpus; i++) {
+ printk(BIOS_DEBUG, "CPU 0x%x\n", i);
cpus[i].smbase = base;
cpus[i].entry = base + smm_entry_offset;
+ printk(BIOS_DEBUG, " smbase %lx entry %lx\n", cpus[i].smbase,
+ cpus[i].entry);
cpus[i].ss_start = cpus[i].entry + (smm_entry_offset - ss_size);
cpus[i].code_start = cpus[i].entry;
cpus[i].code_end = cpus[i].entry + stub_size;
+ printk(BIOS_DEBUG, " ss_start %lx code_end %lx\n", cpus[i].ss_start,
+ cpus[i].code_end);
cpus[i].active = 1;
base -= ss_size;
seg_count++;
if (seg_count >= cpus_in_segment) {
base -= smm_entry_offset;
seg_count = 0;
+ printk(BIOS_DEBUG, "-------------NEW CODE SEGMENT --------------\n");
}
}
- if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG) {
- seg_count = 0;
- for (i = 0; i < num_cpus; i++) {
- printk(BIOS_DEBUG, "CPU 0x%x\n", i);
- printk(BIOS_DEBUG,
- " smbase %lx entry %lx\n",
- cpus[i].smbase, cpus[i].entry);
- printk(BIOS_DEBUG,
- " ss_start %lx code_end %lx\n",
- cpus[i].ss_start, cpus[i].code_end);
- seg_count++;
- if (seg_count >= cpus_in_segment) {
- printk(BIOS_DEBUG,
- "-------------NEW CODE SEGMENT --------------\n");
- seg_count = 0;
- }
- }
- }
return 1;
}