x86/boot: Call get_rsdp_addr() after console_init()
authorBorislav Petkov <bp@suse.de>
Fri, 17 May 2019 13:45:08 +0000 (15:45 +0200)
committerBorislav Petkov <bp@suse.de>
Thu, 6 Jun 2019 18:29:27 +0000 (20:29 +0200)
... so that early debugging output from the RSDP parsing code can be
visible and collected.

Suggested-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Baoquan He <bhe@redhat.com>
Cc: Chao Fan <fanc.fnst@cn.fujitsu.com>
Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Kairui Song <kasong@redhat.com>
Cc: kexec@lists.infradead.org
Cc: x86@kernel.org
arch/x86/boot/compressed/misc.c

index c0d6c560df69e0e63941a34539660770304ff612..24e65a0f756d631f1b84f4b1e4c779ae9fca264c 100644 (file)
@@ -351,9 +351,6 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,
        /* Clear flags intended for solely in-kernel use. */
        boot_params->hdr.loadflags &= ~KASLR_FLAG;
 
-       /* Save RSDP address for later use. */
-       boot_params->acpi_rsdp_addr = get_rsdp_addr();
-
        sanitize_boot_params(boot_params);
 
        if (boot_params->screen_info.orig_video_mode == 7) {
@@ -368,6 +365,14 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,
        cols = boot_params->screen_info.orig_video_cols;
 
        console_init();
+
+       /*
+        * Save RSDP address for later use. Have this after console_init()
+        * so that early debugging output from the RSDP parsing code can be
+        * collected.
+        */
+       boot_params->acpi_rsdp_addr = get_rsdp_addr();
+
        debug_putstr("early console in extract_kernel\n");
 
        free_mem_ptr     = heap;        /* Heap */