The hand assembled routine contained in the array "real_mode_switch"
contains INVD which invalidates the CPU caches, unfortunately the routine
was just previously copied via memcpy and is contained in the cache. This
leads to unexpected results. The following patch replaces INVD with WBINVD
which will make sure that the routine is written to RAM before invalidating
the cache, providing more reliable reboots.
This patch applies cleanly to 2.4.18 and 2.5.8. It probably also works with
all 2.2.X, 2.4.X and 2.5.X kernels.
This fixes a long standing bug that prevented reliable reboots on some
platforms.
Regards,
Robert Hentosh
-- Robert Hentosh Sr. Software Engineer Dell Linux Solutions www.dell.com/linux
--- linux-2.4.18.orig/arch/i386/kernel/process.c Fri Apr 19 14:37:21 2002 +++ linux-2.4.18/arch/i386/kernel/process.c Fri Apr 19 14:41:11 2002 @@ -253,7 +253,7 @@ 0x66, 0x0f, 0x20, 0xc3, /* movl %cr0,%ebx */ 0x66, 0x81, 0xe3, 0x00, 0x00, 0x00, 0x60, /* andl $0x60000000,%ebx */ 0x74, 0x02, /* jz f */ - 0x0f, 0x08, /* invd */ + 0x0f, 0x09, /* wbinvd */ 0x24, 0x10, /* f: andb $0x10,al */ 0x66, 0x0f, 0x22, 0xc0 /* movl %eax,%cr0 */ }; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/