x86: provide a DMI based port 0x80 I/O delay override
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Ingo Molnar
do you have any memories about the
outb_p()use ofmisc_32.c:pos = (x + cols * y) * 2; /* Update cursor position */ outb_p(14, vidport); outb_p(0xff & (pos >> 9), vidport+1); outb_p(15, vidport); outb_p(0xff & (pos >> 1), vidport+1);
Quoted 7 lines
was this ever needed? This is so early in the bootup that can we cannot do any sensible delay. Perhaps we could try a natural delay sequence via inb from
0x3cc:outb(14, vidport); inb(0x3cc); /* delay */ outb(0xff & (pos >> 9), vidport+1);
I've never seen code which would do that, and it was not suggested by any tutorial I ever saw. I'd expect any machine to break on all kinds of software if it required this. The only thing I remember being warned about is writing the index and the data register at the same time using outw, because that would write both registers at the same time on 16-bit-cards.
BTW: The error function in linux-2.6.23/arch/i386/boot/compressed/misc.c uses while(1) without cpu_relax() in order to halt the machine. Is this fixed? Should it be fixed?
Quoted 4 lines · Bodo Eggert
BTW: The error function in
linux-2.6.23/arch/i386/boot/compressed/misc.cuses while(1) withoutcpu_relax()in order to halt the machine. Is this fixed? Should it be fixed?
this is early bootup so there's no need to be "nice" to other cores or sockets - none of them are really running.
Ingo
H. Peter Anvin
reviewerQuoted 6 lines · Ingo Molnar
Quoted 1 line · Bodo Eggert
BTW: The error function in
linux-2.6.23/arch/i386/boot/compressed/misc.cuses while(1) withoutcpu_relax()in order to halt the machine. Is this fixed? Should it be fixed?this is early bootup so there's no need to be "nice" to other cores or sockets - none of them are really running.
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
-hpa
Quoted 7 lines · H. Peter Anvin
Quoted 6 lines · Ingo Molnar
Quoted 3 lines · Bodo Eggert
BTW: The error function in
linux-2.6.23/arch/i386/boot/compressed/misc.cuses while(1) withoutcpu_relax()in order to halt the machine. Is this fixed? Should it be fixed?
Quoted 7 lines
Quoted 3 lines
this is early bootup so there's no need to be "nice" to other cores or sockets - none of them are really running.
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
ok. Like the patch below?
Ingo
---------->
Subject: x86: hlt on early crash
From: Ingo Molnar <[email protected]>
Quoted 3 lines · H. Peter Anvin
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
--- arch/x86/boot/compressed/misc_32.c | 2 +- arch/x86/boot/compressed/misc_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/misc_32.c +1 -1
@@ -339,7 +339,7 @@ static void error(char *x)putstr (x);putstr ("\n\n -- System halted" ); -while (1 );/* Halt */ + asm("cli; hlt" );/* Halt */ } asmlinkage void decompress_kernel(void *rmode, unsigned long end,
arch/x86/boot/compressed/misc_64.c +1 -1
@@ -338,7 +338,7 @@ static void error(char *x)putstr (x);putstr ("\n\n -- System halted" ); -while (1 );/* Halt */ + asm("cli; hlt" );/* Halt */ } asmlinkage void decompress_kernel(void *rmode, unsigned long heap,
Quoted 19 lines · Ingo Molnar
Quoted 7 lines · H. Peter Anvin
Quoted 6 lines · Ingo Molnar
Quoted 3 lines · Bodo Eggert
BTW: The error function in
linux-2.6.23/arch/i386/boot/compressed/misc.cuses while(1) withoutcpu_relax()in order to halt the machine. Is this fixed? Should it be fixed?Quoted 7 lines
Quoted 3 lines
this is early bootup so there's no need to be "nice" to other cores or sockets - none of them are really running.
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
ok. Like the patch below?
Review
Quoted 2 lines
(quoted diff) +1
-1- while(1); /* Halt */ + asm("cli; hlt"); /* Halt */
The other users would loop around the hlt. Cargo Cult?
Signature · 2 lines
Top 100 things you don't want the sysadmin to say: 97. Go get your backup tape. (You _do_ have a backup tape?)
Quoted 1 line
ok. Like the patch below?
Not quite - you still need the loop in case you NMI and then run off into oblivion
Quoted 4 lines · Alan Cox
Quoted 1 line
ok. Like the patch below?
Not quite - you still need the loop in case you NMI and then run off into oblivion
yes indeed. Updated patch below.
Ingo
-------------->
Subject: x86: hlt on early crash
From: Ingo Molnar <[email protected]>
Quoted 3 lines · H. Peter Anvin
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
--- arch/x86/boot/compressed/misc_32.c | 3 ++- arch/x86/boot/compressed/misc_64.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/boot/compressed/misc_32.c +2 -1
@@ -339,7 +339,8 @@ static void error(char *x)putstr (x);putstr ("\n\n -- System halted" ); -while (1 );/* Halt */ +while (1 ) + asm("hlt" ); } asmlinkage void decompress_kernel(void *rmode, unsigned long end,
arch/x86/boot/compressed/misc_64.c +2 -1
@@ -338,7 +338,8 @@ static void error(char *x)putstr (x);putstr ("\n\n -- System halted" ); -while (1 );/* Halt */ +while (1 ) + asm("hlt" ); } asmlinkage void decompress_kernel(void *rmode, unsigned long heap,
H. Peter Anvin
reviewerQuoted 5 lines · Ingo Molnar
Quoted 2 lines
Quoted 1 line
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
ok. Like the patch below?
Don't need the cli; we're already running with interrupts disabled.
I'd do:
while (1)
asm volatile("hlt");... mostly on general principles.
-hpa
Quoted 7 lines · H. Peter Anvin
Quoted 5 lines · Ingo Molnar
Quoted 2 lines
Quoted 1 line
It probably should actually HLT, to avoid sucking power, and stressing the thermal system. We're dead at this point, and the early 486's which had problems with HLT will lock up - we don't care.
ok. Like the patch below?
Quoted 8 lines
Don't need the cli; we're already running with interrupts disabled.
I'd do:
while (1) asm volatile("hlt");... mostly on general principles.
At least with current GCC the volatile isn't strictly needed as its implied without output operands but I was only certain after checking that. Do you remember if that used to be different for previous GCC versions? I tend to also stick volatiles on them still...
Rene.
H. Peter Anvin
reviewerQuoted 7 lines · Bodo Eggert
I've never seen code which would do that, and it was not suggested by any tutorial I ever saw. I'd expect any machine to break on all kinds of software if it required this. The only thing I remember being warned about is writing the index and the data register at the same time using outw, because that would write both registers at the same time on 16-bit-cards.
And we use that, and have been for 15 years. I haven't seen any screams of pain about it.
-hpa
Quoted 11 lines · On Sun, 30 Dec 2007 12:53:02 -0800 "H. Peter Anvin" <[email protected]> wrote:
Quoted 7 lines · Bodo Eggert
I've never seen code which would do that, and it was not suggested by any tutorial I ever saw. I'd expect any machine to break on all kinds of software if it required this. The only thing I remember being warned about is writing the index and the data register at the same time using outw, because that would write both registers at the same time on 16-bit-cards.
And we use that, and have been for 15 years. I haven't seen any screams of pain about it.
Actually there were, and I sent numerous people patches for that back in ISA days.
Alan
Quoted 11 lines · Alan Cox
Quoted 9 lines · On Sun, 30 Dec 2007 12:53:02 -0800 "H. Peter Anvin" <[email protected]> wrote:
Quoted 6 lines · Bodo Eggert
I've never seen code which would do that, and it was not suggested by any tutorial I ever saw. I'd expect any machine to break on all kinds of software if it required this. The only thing I remember being warned about is writing the index and the data register at the same time using outw, because that would write both registers at the same time on 16-bit-cards.
Quoted 5 lines
Quoted 2 lines
And we use that, and have been for 15 years. I haven't seen any screams of pain about it.
Actually there were, and I sent numerous people patches for that back in ISA days.
Are you talking about VGA cards requiring a delay between outb index/outb data, VGA cards barfing on outw or systems barfing on outb(0x80,42)?
Signature · 1 line
Programming is an art form that fights back.
On Mon, 31 Dec 2007 15:39:02 +0100 (CET)
Quoted 5 lines
Quoted 2 lines
Actually there were, and I sent numerous people patches for that back in ISA days.
Are you talking about VGA cards requiring a delay between outb index/outb data, VGA cards barfing on outw or systems barfing on
outb(0x80,42)?
VGA cards barfing on outw - on some trident at least it would cause weird display messups when scrolling the text console that went right the next scroll.