From 0687bd2760c18409e77766b0c6fb9ff39c63173e Mon Sep 17 00:00:00 2001 From: mintsuki Date: Tue, 11 May 2021 06:12:22 +0200 Subject: [PATCH] Revert "linux: Reduce verbosity" This reverts commit e228745e5cb0d60aea562d82f9dd172cce68461e. --- stage23/protos/linux.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stage23/protos/linux.c b/stage23/protos/linux.c index b2433299..190c1891 100644 --- a/stage23/protos/linux.c +++ b/stage23/protos/linux.c @@ -385,6 +385,9 @@ void linux_load(char *config, char *cmdline) { fread(kernel, setup_header, 0x1f1, setup_header_end - 0x1f1); + print("linux: Boot protocol: %u.%u\n", + setup_header->version >> 8, setup_header->version & 0xff); + if (setup_header->version < 0x203) { panic("Linux protocols < 2.03 are not supported"); } @@ -394,6 +397,12 @@ void linux_load(char *config, char *cmdline) { // vid_mode. 0xffff means "normal" setup_header->vid_mode = 0xffff; + char *kernel_version = ext_mem_alloc(128); + if (setup_header->kernel_version != 0) { + fread(kernel, kernel_version, setup_header->kernel_version + 0x200, 128); + print("linux: Kernel version: %s\n", kernel_version); + } + setup_header->type_of_loader = 0xff; if (!(setup_header->loadflags & (1 << 0))) { @@ -404,7 +413,7 @@ void linux_load(char *config, char *cmdline) { // load kernel uintptr_t kernel_load_addr = 0x100000; - print("linux: Loading kernel `%s`...\n", kernel_path); + print("linux: Loading kernel...\n"); for (;;) { if (memmap_alloc_range(kernel_load_addr, ALIGN_UP(kernel->size - real_mode_code_size, 4096),