Skip to contentSkip to conversation

Revert "x86: use invd instead of wbinvd in real mode start code"

PATCH New Andy Shevchenko 3 participants 6 messages Feb 17, 2020 – Feb 20, 2020 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "x86: use invd instead of wbinvd in real mode start code"

This reverts commit 0d67fac29f3187e67f4fd3ef15f73e91be2fad12.

As real hardware testing (*) shows the above mentioned commit breaks U-Boot on it. Revert for the upcoming release. We may get more information in the future and optimize the code accordingly.

(*) om Intel Edison board.

---
 arch/x86/cpu/start.S   | 2 +-
 arch/x86/cpu/start16.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/cpu/start.S +1 -1
index 26cf995db2..01524635e9 100644
@@ -50,7 +50,7 @@ _x86boot_start:
 	movl	%cr0, %eax
 	orl	$(X86_CR0_NW | X86_CR0_CD), %eax
 	movl	%eax, %cr0
-	invd
+	wbinvd
 
 	/*
 	 * Zero the BIST (Built-In Self Test) value since we don't have it.
arch/x86/cpu/start16.S +1 -1
index 292e750508..54f4ff6662 100644
@@ -28,7 +28,7 @@ start16:
 	movl	%cr0, %eax
 	orl	$(X86_CR0_NW | X86_CR0_CD), %eax
 	movl	%eax, %cr0
-	invd
+	wbinvd
 
 	/* load the temporary Global Descriptor Table */
 data32 cs	lidt	idt_ptr
Signature · 1 line
2.25.0
#1 lore raw

PATCH 1/1 Revert "x86: use invd instead of wbinvd in real mode start code"

Quoted 8 lines · Andy Shevchenko

This reverts commit 0d67fac29f3187e67f4fd3ef15f73e91be2fad12.

As real hardware testing (*) shows the above mentioned commit breaks U-Boot on it. Revert for the upcoming release. We may get more information in the future and optimize the code accordingly.

(*) om Intel Edison board.

on?

Quoted 7 lines
---
 arch/x86/cpu/start.S   | 2 +-
 arch/x86/cpu/start16.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
#2 lore raw

PATCH 1/1 Revert "x86: use invd instead of wbinvd in real mode start code"

Quoted 5 lines · Bin Meng
Quoted 3 lines · Andy Shevchenko

This reverts commit 0d67fac29f3187e67f4fd3ef15f73e91be2fad12.

Quoted 7 lines
Quoted 5 lines

As real hardware testing (*) shows the above mentioned commit breaks U-Boot on it. Revert for the upcoming release. We may get more information in the future and optimize the code accordingly.

(*) om Intel Edison board.

on?

Right. Should I resend or you can fix when apply?

Quoted 8 lines
Quoted 6 lines
---
 arch/x86/cpu/start.S   | 2 +-
 arch/x86/cpu/start16.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw

PATCH 1/1 Revert "x86: use invd instead of wbinvd in real mode start code"

Quoted 11 lines · Andy Shevchenko
Quoted 9 lines · Bin Meng
Quoted 7 lines · Andy Shevchenko

This reverts commit 0d67fac29f3187e67f4fd3ef15f73e91be2fad12.

As real hardware testing (*) shows the above mentioned commit breaks U-Boot on it. Revert for the upcoming release. We may get more information in the future and optimize the code accordingly.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

(*) om Intel Edison board.

on?

Right. Should I resend or you can fix when apply?

No, I fixed it when applying,

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
---
 arch/x86/cpu/start.S   | 2 +-
 arch/x86/cpu/start16.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

applied to u-boot-x86, thanks!

#4 lore raw

PATCH 1/1 Revert "x86: use invd instead of wbinvd in real mode start code"

In reply to Andy Shevchenko

Hi Andy,

Quoted 7 lines · Andy Shevchenko

This reverts commit 0d67fac29f3187e67f4fd3ef15f73e91be2fad12.

As real hardware testing (*) shows the above mentioned commit breaks U-Boot on it. Revert for the upcoming release. We may get more information in the future and optimize the code accordingly.

Quoted 6 lines

(*) om Intel Edison board.

---
 arch/x86/cpu/start.S   | 2 +-
 arch/x86/cpu/start16.S | 2 +-

Reverting arch/x86/cpu/start.S is enough, isn't it?

arch/x86/cpu/start16.S is not compiled for the
Edison board.

start16.S is the start of the Real Mode,
and we are sure no program was running before
U-Boot.

Quoted 31 lines
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/cpu/start.S +1 -1
index 26cf995db2..01524635e9 100644
@@ -50,7 +50,7 @@ _x86boot_start:
        movl    %cr0, %eax
        orl     $(X86_CR0_NW | X86_CR0_CD), %eax
        movl    %eax, %cr0
-       invd
+       wbinvd
 
        /*
         * Zero the BIST (Built-In Self Test) value since we don't have it.
arch/x86/cpu/start16.S +1 -2
index 292e750508..54f4ff6662 100644
@@ -28,7 +28,7 @@ start16:
        movl    %cr0, %eax
        orl     $(X86_CR0_NW | X86_CR0_CD), %eax
        movl    %eax, %cr0
-       invd
+       wbinvd
 
        /* load the temporary Global Descriptor Table */
 data32 cs      lidt    idt_ptr
--

2.25.0

Signature · 2 lines
Best Regards
Masahiro Yamada
#5 lore raw

PATCH 1/1 Revert "x86: use invd instead of wbinvd in real mode start code"

Quoted 5 lines · Masahiro Yamada
Quoted 3 lines · Andy Shevchenko

This reverts commit 0d67fac29f3187e67f4fd3ef15f73e91be2fad12.

Quoted 7 lines
Quoted 5 lines

As real hardware testing (*) shows the above mentioned commit breaks U-Boot on it. Revert for the upcoming release. We may get more information in the future and optimize the code accordingly.

(*) om Intel Edison board.

Reverting arch/x86/cpu/start.S is enough, isn't it?

Had you tested on real hardware?

Since Qemu ~= "no test" for the available hardware, I can't answer to this.

Quoted 6 lines

arch/x86/cpu/start16.S is not compiled for the
Edison board.

start16.S is the start of the Real Mode,
and we are sure no program was running before
U-Boot.

To be on the safer side I prefer to revert completely. Then you may come up with a new patch with better commit message and testing. To me it sounds fair.

Signature · 2 lines
With Best Regards,
Andy Shevchenko