problems on some network cards.
* MEMDISK: Try work around a bug on some BIOSes when no
physical floppy disk is present in the system.
+ * Enable the 16550A FIFOs, if present, when doing serial
+ console.
Changes in 3.10:
* gcc 4.0.1 compilation fixes.
mov di,[di+serial_base] ; Get the I/O port from the BIOS
.port_is_io:
mov [SerialPort],di
+
+ ;
+ ; Begin code to actually set up the serial port
+ ;
lea dx,[di+3] ; DX -> LCR
mov al,83h ; Enable DLAB
call slow_out
+
pop ax ; Divisor
mov dx,di ; DX -> LS
call slow_out
+
inc dx ; DX -> MS
mov al,ah
call slow_out
+
mov al,03h ; Disable DLAB
add dx,byte 2 ; DX -> LCR
call slow_out
+
in al,dx ; Read back LCR (detect missing hw)
cmp al,03h ; If nothing here we'll read 00 or FF
jne .serial_port_bad ; Assume serial port busted
xor al,al ; IRQ disable
call slow_out
- add dx,byte 3 ; DX -> MCR
+ inc dx
+ inc dx ; DX -> FCR
+ mov al,01h
+ call slow_out ; Enable FIFOs if present
+ dec dx ; DX -> IIR
+ in al,dx
+ inc dx ; DX -> FCR
+ cmp al,0C0h ; FIFOs enabled and usable?
+ jae .fifo_ok
+ xor ax,ax ; Disable FIFO if unusable
+ call slow_out
+.fifo_ok:
+
+ inc dx ; DX -> MCR
in al,dx
or al,[FlowOutput] ; Assert bits
call slow_out