:: commit f730eb0b0fb1485576498109ae0428c2017c3723

mintsuki <mintsuki@protonmail.com> — 2021-10-29 23:51

parents: 97d0a17798

stivale2: Only print base addresses when fully virtual

diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c
index 4a8d3119..a306a003 100644
--- a/stage23/protos/stivale2.c
+++ b/stage23/protos/stivale2.c
@@ -169,8 +169,10 @@ void stivale2_load(char *config, char *cmdline, bool pxe, void *efi_system_table
                                want_fully_virtual, &physical_base, &virtual_base))
                     panic("stivale2: ELF64 load failure");
 
-                printv("stivale2: Physical base: %X\n", physical_base);
-                printv("stivale2: Virtual base:  %X\n", virtual_base);
+                if (want_fully_virtual) {
+                    printv("stivale2: Physical base: %X\n", physical_base);
+                    printv("stivale2: Virtual base:  %X\n", virtual_base);
+                }
 
                 ret = elf64_load_section(kernel, &stivale2_hdr, ".stivale2hdr",
                                          sizeof(struct stivale2_header), slide);
tab: 248 wrap: offon