Red Hat Bugzilla – Bug 64394
Unreliable reboots with "reboot=bios" option.
Last modified: 2007-11-30 17:06:51 EST
Description of Problem:
When specifying the "reboot=bios" option the code that switches to real-mode
and jumps to the BIOS vector contains a bug that causes some platforms to hang
repeatedly. This bug has been present since at since least 2.2.x kernel. This
problem exists in both Hampton, Pensacola and prior versions at least to 7.0.
Version-Release number of selected component (if applicable):
How Reproducible: On a PE6400 running 7.2 it happens most every time. On some
tests it showed more frequently after booting then running vi on any file and
then typing `reboot`.
Steps to Reproduce:
1. Boot PE6400 on 7.2 with "reboot=bios" as kernel param.
2. login as root, vi any file.
3. type `reboot`
System will shutdown orderly and then hang not continuing to the BIOS post
System will reboot normally and one will see the BIOS screens.
A patch has been submitted to the lkml and was accepted by the orignal author
of the routine at fault(Jamie Lokier).
Created attachment 56286 [details]
INVD cache patch for reboot=bios
The patch simply changes the hand assembled code instruction INVD to WBINVD.
INVD invalidates the CPU cache and since the routine was just previously copied
in can still exists only in the cache. INVD at this time then cause the
routine to be lost and it just executes the "garbage" left in RAM. WBINVD
insures that the routine is written to RAM before invalidating the cache,
insuring that the jump to the BIOS reset vector takes place.
This will be included in the first Pensacola errata kernel, and is included
already in 2.4.19-ac. This needs to get pushed to Marcelo for 2.4.x, and to
Linus for 2.5.x.
Closing since it is fixed.