> > Or I can wait until the grub menu timeout expires. This starts loading the
> > default entry. multiboot and the boot_archive is loaded. Text screen is
> > cleared, ...., and the system hangs - before printing the
> > "SunOS Release 5.xx" copyright string.
>
> A completely wild guess but maybe we got into multiboot's main and got to
> here:
>
> http://cvs.opensolaris.org/source/xref/on/usr/src/psm/stand/boot/i386/common/keyboard.c#kb_init
Yep. That was an excellent guess!
kb_init() was called from multiboot's main() -> console_init() -> kb_init().
And it was hanging there, waiting for an "empty" ps/2 keyboard buffer (which
never happens because the unimplemented I/O port returns 0xff bytes all the
time).
My experimental boot CD now contains a changed mutliboot module:
diff -ru ../opensolaris-20060404/usr/src/psm/stand/boot/i386/common/keyboard.c
usr/src/psm/stand/boot/i386/common/keyboard.c
--- ../opensolaris-20060404/usr/src/psm/stand/boot/i386/common/keyboard.c
2006-04-05 23:28:21.000000000 +0200
+++ usr/src/psm/stand/boot/i386/common/keyboard.c 2006-04-11
17:10:09.326605310 +0200
@@ -182,8 +182,10 @@
return (1);
for (;;) {
- buffer_stat =
- inb(I8042_STAT) & (I8042_STAT_OUTBF | I8042_STAT_AUXBF);
+ buffer_stat = inb(I8042_STAT);
+ if (buffer_stat == 0xff)
+ return (0);
+ buffer_stat &= (I8042_STAT_OUTBF | I8042_STAT_AUXBF);
switch (buffer_stat) {
case 0:
@@ -456,7 +458,11 @@
void
kb_send(unsigned char cmd)
{
- while (inb(I8042_STAT) & I8042_STAT_INBF)
+ int retries;
+
+ for (retries = 0;
+ (inb(I8042_STAT) & I8042_STAT_INBF) != 0 && retries < 100000;
+ retries++)
/* LOOP */;
outb(I8042_DATA, cmd);
}
@@ -487,6 +493,7 @@
kb_init(void)
{
unsigned char pic_mask;
+ int retries;
/*
* Write the command byte to turn off interrupts and
@@ -507,11 +514,15 @@
* 0x01: 0 = Disable aux interrupts.
*/
- while (inb(I8042_STAT) & I8042_STAT_INBF)
+ for (retries = 0;
+ (inb(I8042_STAT) & I8042_STAT_INBF) != 0 && retries < 100000;
+ retries++)
/* LOOP */;
outb(I8042_CMD, I8042_WCB);
- while (inb(I8042_STAT) & I8042_STAT_INBF)
+ for (retries = 0;
+ (inb(I8042_STAT) & I8042_STAT_INBF) != 0 && retries < 100000;
+ retries++)
/* LOOP */;
outb(I8042_DATA, 0x64);
.... any I'm able to boot in Intel iMac into a snv_34 failsafe kernel boot
archive !
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]