This patch to serial.S should prevent the absence of a serial interface from hanging Etherboot even if the image has been compiled with the serial options, so there should be no need for a different image if no serial interface is present. It works for no serial interface, could someone who uses the serial interface please check that it still works? It should appear in 4.5.7 or maybe 4.6.0. --- serial.S.old Thu Mar 9 19:06:23 2000 +++ serial.S Fri Mar 31 00:27:13 2000 @@ -91,6 +91,8 @@ */ .globl serial_putc serial_putc: + cmpl $0,found + je 2f # no serial interface movl $10000, %ecx # timeout movl $COMCONSOLE + 5, %edx # line status reg 1: @@ -140,9 +142,12 @@ .globl serial_ischar serial_ischar: xorl %eax, %eax + cmpl $0,found + je 1f movl $COMCONSOLE + 5, %edx # line status reg inb %dx, %al andb $0x01, %al # rx char available? +1: ret #if !defined(COMBRD) && defined(CONSPEED) @@ -189,10 +194,20 @@ subl $3, %edx # divisor latch, low byte movb $COMBRD & 0xff, %al outb %al, %dx + inb %dx, %al # read back to check if device present + cmpb $COMBRD & 0xff, %al + je 1f + ret +1: incl %edx # divisor latch, high byte movb $COMBRD >> 8, %al outb %al, %dx - + inb %dx, %al # read back to check if device present + cmpb $COMBRD >> 8, %al + je 2f + ret +2: + movl $1,found # set device present flag incl %edx # fifo control register (if any) xorl %eax,%eax outb %al, %dx # disable fifo to reduce worst-case busy-wait @@ -215,5 +230,9 @@ jne 1b # more ret + + .data + +found: .long 0 #endif #endif =========================================================================== This Mail was sent to netboot mailing list by: Ken Yap <ken@nlc.net.au> To get help about this list, send a mail with 'help' as the only string in it's body to majordomo@baghira.han.de. If you have problems with this list, send a mail to netboot-owner@baghira.han.de.
For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.