Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Sun, 04 Nov 2007 15:51:43 -0800, H. Peter Anvin wrote: > Mikael, can you try this patch (rev 3) on your 486? It works fine. /Mikael - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Linus Torvalds
On Sun, 4 Nov 2007, Linus Torvalds wrote: > > So I'd suggest having both jumps back-to-back, but realistically, the > first regular short jump is actually the one that is more important. > That's the one that really matters on i386/i486 class machines, and later > CPU's will generally do the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Linus Torvalds
On Sun, 4 Nov 2007, H. Peter Anvin wrote: > > Joy. Apparently the Intel documentation is actually self-inconsistent. > Section 9.9.1, page 9-17 does indeed have the "far jump or call" injunction, > whereas the sample code in section 9.10.1, page 9-27, line 180 does a near > jump! See the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael, can you try this patch (rev 3) on your 486? -hpa diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S index 2e55923..d93a0c2 100644 --- a/arch/x86/boot/pmjump.S +++ b/arch/x86/boot/pmjump.S @@ -28,17 +28,21 @@ * void protected_mode_jump(u32 entrypoint, u32 bootparams);

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Jeremy Fitzhardinge wrote: Maybe not. I had a look in Intel's SDM Vol3, and the section "switching to protected mode" specifies that a move to %cr0 that sets PE should immediately be followed by a far jmp or call. Yes, that's what the spec says. I queried this a few months ago, but hpa used

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Jeremy Fitzhardinge wrote: Yes, that's what the spec says. I queried this a few months ago, but hpa used his convincing voice and said that in practice it isn't necessary; there are no known cpus which need this, and any that do would cause other things to break. But I guess now we have the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Jeremy Fitzhardinge
Mikael Pettersson wrote: > On Sun, 04 Nov 2007 11:41:58 -0800, H. Peter Anvin wrote: > >> Mikael Pettersson wrote: >> >>> First patch didn't build. Second patch builds and boots Ok. >>> >>> So this means the 486 DX4 has a buggy mov to %cr0? >>> >>> >> Apparently. >> > > Maybe

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Andi Kleen
Mikael Pettersson <[EMAIL PROTECTED]> writes: > Maybe not. I had a look in Intel's SDM Vol3, and the > section "switching to protected mode" specifies that > a move to %cr0 that sets PE should immediately be > followed by a far jmp or call. They write that "random > failures can occur if other

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael Pettersson wrote: Maybe not. I had a look in Intel's SDM Vol3, and the section "switching to protected mode" specifies that a move to %cr0 that sets PE should immediately be followed by a far jmp or call. They write that "random failures can occur if other instructions exist between [the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Sun, 04 Nov 2007 11:41:58 -0800, H. Peter Anvin wrote: > Mikael Pettersson wrote: > > > > First patch didn't build. Second patch builds and boots Ok. > > > > So this means the 486 DX4 has a buggy mov to %cr0? > > > > Apparently. Maybe not. I had a look in Intel's SDM Vol3, and the section

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael Pettersson wrote: First patch didn't build. Second patch builds and boots Ok. So this means the 486 DX4 has a buggy mov to %cr0? Apparently. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Sun, 04 Nov 2007 10:29:34 -0800, H. Peter Anvin wrote: >Could you send me your /proc/cpuinfo? Sure. It's a 100Mhz Intel 486 DX4: processor : 0 vendor_id : GenuineIntel cpu family : 4 model : 8 model name : 486 DX/4 stepping: 0 cache size : 0 KB

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Urk, -ENOTAWAKEYET. Try *THIS* patch, please. -hpa diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S index 2e55923..17e6dec 100644 --- a/arch/x86/boot/pmjump.S +++ b/arch/x86/boot/pmjump.S @@ -28,27 +28,37 @@ * void protected_mode_jump(u32 entrypoint, u32 bootparams); */

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael Pettersson wrote: The machine in question is a ca 1993 vintage Siemens 486 with a Quadtel S3 / Phoenix BIOS from 1994, booting via grub-0.95-13 from Fedora Core 4. Signed-off-by: Mikael Pettersson <[EMAIL PROTECTED]> --- arch/x86/boot/compressed/head_32.S |5 + 1 files changed,

[PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Mon, 29 Oct 2007 01:05:58 +0100 (MET), Mikael Pettersson wrote: >My old 486 fails to boot with the 2.6.24-rc1 kernel. >Grub loads it, 4 lines of text appear but not the kernel's >"Linux version greet", and the machine reboots. >Double-checked with a serial console: nothing appears >before it

[PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Mon, 29 Oct 2007 01:05:58 +0100 (MET), Mikael Pettersson wrote: My old 486 fails to boot with the 2.6.24-rc1 kernel. Grub loads it, 4 lines of text appear but not the kernel's Linux version blah greet, and the machine reboots. Double-checked with a serial console: nothing appears before it

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael Pettersson wrote: The machine in question is a ca 1993 vintage Siemens 486 with a Quadtel S3 / Phoenix BIOS from 1994, booting via grub-0.95-13 from Fedora Core 4. Signed-off-by: Mikael Pettersson [EMAIL PROTECTED] --- arch/x86/boot/compressed/head_32.S |5 + 1 files changed, 5

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Urk, -ENOTAWAKEYET. Try *THIS* patch, please. -hpa diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S index 2e55923..17e6dec 100644 --- a/arch/x86/boot/pmjump.S +++ b/arch/x86/boot/pmjump.S @@ -28,27 +28,37 @@ * void protected_mode_jump(u32 entrypoint, u32 bootparams); */

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Sun, 04 Nov 2007 10:29:34 -0800, H. Peter Anvin wrote: Could you send me your /proc/cpuinfo? Sure. It's a 100Mhz Intel 486 DX4: processor : 0 vendor_id : GenuineIntel cpu family : 4 model : 8 model name : 486 DX/4 stepping: 0 cache size : 0 KB

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael Pettersson wrote: First patch didn't build. Second patch builds and boots Ok. So this means the 486 DX4 has a buggy mov to %cr0? Apparently. -hpa - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Sun, 04 Nov 2007 11:41:58 -0800, H. Peter Anvin wrote: Mikael Pettersson wrote: First patch didn't build. Second patch builds and boots Ok. So this means the 486 DX4 has a buggy mov to %cr0? Apparently. Maybe not. I had a look in Intel's SDM Vol3, and the section switching to

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael Pettersson wrote: Maybe not. I had a look in Intel's SDM Vol3, and the section switching to protected mode specifies that a move to %cr0 that sets PE should immediately be followed by a far jmp or call. They write that random failures can occur if other instructions exist between [the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Andi Kleen
Mikael Pettersson [EMAIL PROTECTED] writes: Maybe not. I had a look in Intel's SDM Vol3, and the section switching to protected mode specifies that a move to %cr0 that sets PE should immediately be followed by a far jmp or call. They write that random failures can occur if other instructions

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Jeremy Fitzhardinge
Mikael Pettersson wrote: On Sun, 04 Nov 2007 11:41:58 -0800, H. Peter Anvin wrote: Mikael Pettersson wrote: First patch didn't build. Second patch builds and boots Ok. So this means the 486 DX4 has a buggy mov to %cr0? Apparently. Maybe not. I had a look in Intel's

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Jeremy Fitzhardinge wrote: Yes, that's what the spec says. I queried this a few months ago, but hpa used his convincing voice and said that in practice it isn't necessary; there are no known cpus which need this, and any that do would cause other things to break. But I guess now we have the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Jeremy Fitzhardinge wrote: Maybe not. I had a look in Intel's SDM Vol3, and the section switching to protected mode specifies that a move to %cr0 that sets PE should immediately be followed by a far jmp or call. Yes, that's what the spec says. I queried this a few months ago, but hpa used his

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread H. Peter Anvin
Mikael, can you try this patch (rev 3) on your 486? -hpa diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S index 2e55923..d93a0c2 100644 --- a/arch/x86/boot/pmjump.S +++ b/arch/x86/boot/pmjump.S @@ -28,17 +28,21 @@ * void protected_mode_jump(u32 entrypoint, u32 bootparams);

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Linus Torvalds
On Sun, 4 Nov 2007, H. Peter Anvin wrote: Joy. Apparently the Intel documentation is actually self-inconsistent. Section 9.9.1, page 9-17 does indeed have the far jump or call injunction, whereas the sample code in section 9.10.1, page 9-27, line 180 does a near jump! See the older code.

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Linus Torvalds
On Sun, 4 Nov 2007, Linus Torvalds wrote: So I'd suggest having both jumps back-to-back, but realistically, the first regular short jump is actually the one that is more important. That's the one that really matters on i386/i486 class machines, and later CPU's will generally do the

Re: [PATCH] fix i486 boot failure due to stale %ds

2007-11-04 Thread Mikael Pettersson
On Sun, 04 Nov 2007 15:51:43 -0800, H. Peter Anvin wrote: Mikael, can you try this patch (rev 3) on your 486? It works fine. /Mikael - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at