diff options
-rw-r--r-- | isolinux.asm | 26 | ||||
-rw-r--r-- | ldlinux.asm | 26 | ||||
-rw-r--r-- | pxelinux.asm | 26 | ||||
-rw-r--r-- | syslinux.doc | 24 |
4 files changed, 58 insertions, 44 deletions
diff --git a/isolinux.asm b/isolinux.asm index e44e0410..32f1259c 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -348,9 +348,11 @@ CursorRow resb 1 ; Cursor row for message file ScreenSize equ $ VidCols resb 1 ; Columns on screen-1 VidRows resb 1 ; Rows on screen-1 +FlowControl equ $ +FlowOutput resb 1 ; Outputs to assert for serial flow +FlowInput resb 1 ; Input bits for serial flow RetryCount resb 1 ; Used for disk access retries KbdFlags resb 1 ; Check for keyboard escapes -FlowControl resb 1 ; Serial port flow control LoadFlags resb 1 ; Loadflags from kernel A20Tries resb 1 ; Times until giving up on A20 FuncFlag resb 1 ; == 1 if <Ctrl-F> pressed @@ -1186,7 +1188,7 @@ pc_serial: call getint ; "serial" command jc parse_config_2 call ungetc call getint - mov [FlowControl], byte 0 ; Default to no flow control + mov [FlowControl], word 0 ; Default to no flow control jc .nobaud .valid_baud: push ebx @@ -1194,7 +1196,9 @@ pc_serial: call getint ; "serial" command jnc .valid_flow xor bl,bl ; Default -> no flow control .valid_flow: - mov [FlowControl],bl + mov bh,bl + and bx,0F003h ; Valid bits + mov [FlowControl],bx pop ebx ; Baud rate jmp short .parse_baud .nobaud: @@ -1228,13 +1232,11 @@ pc_serial: call getint ; "serial" command xor al,al ; IRQ disable call slow_out - test byte [FlowControl],01h - jz .no_flow add dx,byte 3 ; DX -> MCR in al,dx - or al,03h ; DTR=1 RTS=1 + mov ah,[FlowOutput] ; DTR and RTS control + or al,ah ; Assert bits call slow_out -.no_flow: ; Show some life mov si,isolinux_banner @@ -3331,6 +3333,7 @@ write_serial: and bx,bx je .noserial push ax + mov ah,[FlowInput] .waitspace: ; Wait for space in transmit register lea dx,[bx+5] ; DX -> LSR @@ -3338,13 +3341,12 @@ write_serial: test al,20h jz .waitspace - ; Wait for CTS to become available if applicable - test byte [FlowControl], 01h - jz .no_flow + ; Wait for input flow control inc dx ; DX -> MSR in al,dx - test al,10h - jz .waitspace + and al,ah + cmp al,ah + jne .waitspace .no_flow: xchg dx,bx ; DX -> THR diff --git a/ldlinux.asm b/ldlinux.asm index ecdcf3aa..d1a065c9 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -323,9 +323,11 @@ CursorRow resb 1 ; Cursor row for message file ScreenSize equ $ VidCols resb 1 ; Columns on screen-1 VidRows resb 1 ; Rows on screen-1 +FlowControl equ $ +FlowOutput resb 1 ; Outputs to assert for serial flow +FlowInput resb 1 ; Input bits for serial flow RetryCount resb 1 ; Used for disk access retries KbdFlags resb 1 ; Check for keyboard escapes -FlowControl resb 1 ; Serial port flow control LoadFlags resb 1 ; Loadflags from kernel A20Tries resb 1 ; Times until giving up on A20 FuncFlag resb 1 ; Escape sequences received from keyboard @@ -1284,7 +1286,7 @@ pc_serial: call getint ; "serial" command jc parse_config_2 call ungetc call getint - mov [FlowControl], byte 0 ; Default to no flow control + mov [FlowControl], word 0 ; Default to no flow control jc .nobaud .valid_baud: push ebx @@ -1292,7 +1294,9 @@ pc_serial: call getint ; "serial" command jnc .valid_flow xor bl,bl ; Default -> no flow control .valid_flow: - mov [FlowControl],bl + mov bh,bl + and bx,0F003h ; Valid bits + mov [FlowControl],bx pop ebx ; Baud rate jmp short .parse_baud .nobaud: @@ -1326,13 +1330,11 @@ pc_serial: call getint ; "serial" command xor al,al ; IRQ disable call slow_out - test byte [FlowControl],01h - jz .no_flow add dx,byte 3 ; DX -> MCR in al,dx - or al,03h ; DTR=1 RTS=1 + mov ah,[FlowOutput] ; DTR and RTS control + or al,ah ; Assert bits call slow_out -.no_flow: ; Show some life mov si,syslinux_banner @@ -3270,6 +3272,7 @@ write_serial: and bx,bx je .noserial push ax + mov ah,[FlowInput] .waitspace: ; Wait for space in transmit register lea dx,[bx+5] ; DX -> LSR @@ -3277,13 +3280,12 @@ write_serial: test al,20h jz .waitspace - ; Wait for CTS to become available if applicable - test byte [FlowControl], 01h - jz .no_flow + ; Wait for input flow control inc dx ; DX -> MSR in al,dx - test al,10h - jz .waitspace + and al,ah + cmp al,ah + jne .waitspace .no_flow: xchg dx,bx ; DX -> THR diff --git a/pxelinux.asm b/pxelinux.asm index 8d1e5d32..7c5ef7b5 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -383,9 +383,11 @@ CursorRow resb 1 ; Cursor row for message file ScreenSize equ $ VidCols resb 1 ; Columns on screen-1 VidRows resb 1 ; Rows on screen-1 +FlowControl equ $ +FlowOutput resb 1 ; Outputs to assert for serial flow +FlowInput resb 1 ; Input bits for serial flow RetryCount resb 1 ; Used for disk access retries KbdFlags resb 1 ; Check for keyboard escapes -FlowControl resb 1 ; Serial port flow control LoadFlags resb 1 ; Loadflags from kernel A20Tries resb 1 ; Times until giving up on A20 FuncFlag resb 1 ; == 1 if <Ctrl-F> pressed @@ -1001,7 +1003,7 @@ pc_serial: call getint ; "serial" command jc parse_config_2 call ungetc call getint - mov [FlowControl], byte 0 ; Default to no flow control + mov [FlowControl], word 0 ; Default to no flow control jc .nobaud .valid_baud: push ebx @@ -1009,7 +1011,9 @@ pc_serial: call getint ; "serial" command jnc .valid_flow xor bl,bl ; Default -> no flow control .valid_flow: - mov [FlowControl],bl + mov bh,bl + and bx,0F003h ; Valid bits + mov [FlowControl],bx pop ebx ; Baud rate jmp short .parse_baud .nobaud: @@ -1043,13 +1047,11 @@ pc_serial: call getint ; "serial" command xor al,al ; IRQ disable call slow_out - test byte [FlowControl],01h - jz .no_flow add dx,byte 3 ; DX -> MCR in al,dx - or al,03h ; DTR=1 RTS=1 + mov ah,[FlowOutput] ; DTR and RTS control + or al,ah ; Assert bits call slow_out -.no_flow: ; Show some life mov si,pxelinux_banner @@ -3337,6 +3339,7 @@ write_serial: and bx,bx je .noserial push ax + mov ah,[FlowInput] .waitspace: ; Wait for space in transmit register lea dx,[bx+5] ; DX -> LSR @@ -3344,13 +3347,12 @@ write_serial: test al,20h jz .waitspace - ; Wait for CTS to become available if applicable - test byte [FlowControl], 01h - jz .no_flow + ; Wait for input flow control inc dx ; DX -> MSR in al,dx - test al,10h - jz .waitspace + and al,ah + cmp al,ah + jne .waitspace .no_flow: xchg dx,bx ; DX -> THR diff --git a/syslinux.doc b/syslinux.doc index 19f87e20..ce6c0236 100644 --- a/syslinux.doc +++ b/syslinux.doc @@ -208,14 +208,22 @@ SERIAL port [[baudrate] flowcontrol] to 9600 bps. The serial parameters are hardcoded to be 8 bits, no parity, 1 stop bit. - "flowcontrol" is one of the following values: - - Value Flow control RTS DTR CTS DCD - 0 None U U I I - 1 RTS/CTS A A O I - 2 DTR/DCD A A O O - - U = Unchanged A = Asserted I = Ignored O = Observed + "flowcontrol" is a combination of the following bits: + 1 - Assert DTR + 2 - Assert RTS + 16 - Wait for CTS assertion + 32 - Wait for DSR assertion + 64 - Wait for RI assertion + 128 - Wait for DCD assertion + + Typical values are: + + 0 - No flow control (default) + 19 - RTS/CTS flow control + 35 - DTR/DSR flow control + 131 - DTR/DCD flow control + + All other values are reserved. For this directive to be guaranteed to work properly, it should be the first directive in the configuration file. |