x86: use invd instead of wbinvd in real mode start code
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 8 Jan 2020 11:08:44 +0000 (20:08 +0900)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 3 Feb 2020 17:19:26 +0000 (01:19 +0800)
I do not know why the boot code immediately after the system reset
should write-back the cache content. I think the cache invalidation
should be enough.

I tested this commit with qemu-x86_defconfig, and it worked for me.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/start.S
arch/x86/cpu/start16.S

index 01524635e9c82d9a498653605dc36d2107ea8d90..26cf995db2d01c8eb5475ee47070ad1aab2c13ae 100644 (file)
@@ -50,7 +50,7 @@ _x86boot_start:
        movl    %cr0, %eax
        orl     $(X86_CR0_NW | X86_CR0_CD), %eax
        movl    %eax, %cr0
-       wbinvd
+       invd
 
        /*
         * Zero the BIST (Built-In Self Test) value since we don't have it.
index 54f4ff6662a8d8999311be3e7553882b1b245c2a..292e750508149aae68770160f1a39090a12a9912 100644 (file)
@@ -28,7 +28,7 @@ start16:
        movl    %cr0, %eax
        orl     $(X86_CR0_NW | X86_CR0_CD), %eax
        movl    %eax, %cr0
-       wbinvd
+       invd
 
        /* load the temporary Global Descriptor Table */
 data32 cs      lidt    idt_ptr