summaryrefslogtreecommitdiff
path: root/core/parseconfig.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-23 19:44:46 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-23 19:45:46 -0700
commitf4f5faffaafb0fa41345df9c8d872b00208db21a (patch)
tree55b3dad7557e227637039919c2c3fbb6f4841e3a /core/parseconfig.inc
parente22d7eeaf36c4150354cfe536045bb2ed5b17d83 (diff)
parent9d1cde418a4f0dc6cccf4af7eae340e75de2f3d4 (diff)
downloadsyslinux-f4f5faffaafb0fa41345df9c8d872b00208db21a.tar.gz
Merge branch 'master' into core32
Conflicts: core/bcopy32.inc core/cleanup.inc core/conio.inc Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/parseconfig.inc')
-rw-r--r--core/parseconfig.inc39
1 files changed, 20 insertions, 19 deletions
diff --git a/core/parseconfig.inc b/core/parseconfig.inc
index e6819bf7..02bc4bf8 100644
--- a/core/parseconfig.inc
+++ b/core/parseconfig.inc
@@ -224,46 +224,48 @@ pc_serial: call getint
;
; Begin code to actually set up the serial port
;
+ call sirq_cleanup_nowipe ; Cleanup existing IRQ handler
+
lea dx,[di+3] ; DX -> LCR
mov al,83h ; Enable DLAB
- call slow_out
+ slow_out dx,al
pop ax ; Divisor
mov dx,di ; DX -> LS
- call slow_out
+ slow_out dx,al
inc dx ; DX -> MS
mov al,ah
- call slow_out
+ slow_out dx,al
mov al,03h ; Disable DLAB
inc dx ; DX -> LCR
inc dx
- 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 .err ; Assume serial port busted
- dec dx
- dec dx ; DX -> IER
- test byte [FlowOutput],8
- setnz al ; Bit 0 -> input available IRQ
- call slow_out
-
- inc dx ; DX -> FCR/IIR
+ slow_out dx,al
+
+ in al,dx ; Read back LCR (detect missing hw)
+ cmp al,03h ; If nothing here we'll read 00 or FF
+ jne .err ; Assume serial port busted
+ dec dx ; DX -> IIR/FCR
mov al,01h
- call slow_out ; Enable FIFOs if present
+ slow_out dx,al ; Enable FIFOs if present
in al,dx
cmp al,0C0h ; FIFOs enabled and usable?
jae .fifo_ok
xor ax,ax ; Disable FIFO if unusable
- call slow_out
+ slow_out dx,al
.fifo_ok:
inc dx
inc dx ; DX -> MCR
mov al,[FlowOutput] ; Assert bits
- call slow_out
+ slow_out dx,al
+
+ ; Enable interrupts if requested
+ test al,8
+ jz .noirq
+ call sirq_install
+.noirq:
; Show some life
cmp byte [SerialNotice],0
@@ -461,7 +463,6 @@ AllowImplicit dw 1 ; Allow implicit kernels
AllowOptions dw 1 ; User-specified options allowed
IncludeLevel dw 1 ; Nesting level
DefaultLevel dw 0 ; The current level of default
-SerialPort dw 0 ; Serial port base (or 0 for no serial port)
VKernel db 0 ; Have we seen any "label" statements?
%if IS_PXELINUX