From: hpa Date: Mon, 17 Jun 2002 16:10:15 +0000 (+0000) Subject: Add API call to determine the serial console configuration. X-Git-Tag: syslinux-3.11~666 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac8df6db27137f44c91fe6d57233b62b226a18e0;p=platform%2Fupstream%2Fsyslinux.git Add API call to determine the serial console configuration. --- diff --git a/comboot.doc b/comboot.doc index a677b54..032eed4 100644 --- a/comboot.doc +++ b/comboot.doc @@ -1,4 +1,4 @@ -$Id$ + $Id$ COMBOOT and COM32 files @@ -363,3 +363,14 @@ AX=000Ah Get Derivative-Specific Information This call gives information specific to a particular SYSLINUX derivative. The value returned in AL is the same as is returned in DL by INT 22h AX=0001h. + + +AX=000Bh Get Serial Console Configuration + + Input: AX 000Bh + Output: DX Serial port I/O base (e.g. 3F8h = COM1...) + CX Baud rate divisor (1 = 115200 bps, 2 = 57600 bps...) + BX Flow control configuration bits (see syslinux.doc) + + If no serial port is configured, DX will be set to 0 and the + other registers are undefined. diff --git a/comboot.inc b/comboot.inc index 80b15b8..d25fd2c 100644 --- a/comboot.inc +++ b/comboot.inc @@ -462,6 +462,22 @@ comapi_derinfo: ret ; +; INT 22h AX=000Bh Get Serial Console Configuration +; +comapi_serialcfg: + mov ax,[SerialPort] + mov P_DX,ax + mov ax,[BaudDivisor] + mov P_CX,ax + mov ax,[FlowControl] + or al,ah + mov ah,[FlowIgnore] + shr ah,4 + mov P_BX,ax + clc + ret + +; ; This stuff should really be in the data section... ; %macro int21 2 @@ -495,6 +511,7 @@ int22_table: dw comapi_close ; 0008 close file dw comapi_pxecall ; 0009 call PXE stack dw comapi_derinfo ; 000A derivative-specific info + dw comapi_serialcfg ; 000B get serial port config int22_count equ ($-int22_table)/2 APIKeyWait db 0 diff --git a/isolinux.asm b/isolinux.asm index 5d5e418..1fd90d4 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -185,6 +185,7 @@ CursorRow resb 1 ; Cursor row for message file ScreenSize equ $ VidCols resb 1 ; Columns on screen-1 VidRows resb 1 ; Rows on screen-1 +BaudDivisor resw 1 ; Baud rate divisor FlowControl equ $ FlowOutput resb 1 ; Outputs to assert for serial flow FlowInput resb 1 ; Input bits for serial flow diff --git a/ldlinux.asm b/ldlinux.asm index f35deb6..d81353b 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -178,6 +178,7 @@ CursorRow resb 1 ; Cursor row for message file ScreenSize equ $ VidCols resb 1 ; Columns on screen-1 VidRows resb 1 ; Rows on screen-1 +BaudDivisor resw 1 ; Baud rate divisor FlowControl equ $ FlowOutput resb 1 ; Outputs to assert for serial flow FlowInput resb 1 ; Input bits for serial flow diff --git a/parseconfig.inc b/parseconfig.inc index cee88df..96c52b4 100644 --- a/parseconfig.inc +++ b/parseconfig.inc @@ -170,6 +170,7 @@ pc_serial: call getint mov eax,BAUD_DIVISOR cdq div ebx + mov [BaudDivisor],ax push ax ; Baud rate divisor cmp di,3 ja .port_is_io ; If port > 3 then port is I/O addr diff --git a/pxelinux.asm b/pxelinux.asm index d19e171..53b46b8 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -233,6 +233,7 @@ CursorRow resb 1 ; Cursor row for message file ScreenSize equ $ VidCols resb 1 ; Columns on screen-1 VidRows resb 1 ; Rows on screen-1 +BaudDivisor resw 1 ; Baud rate divisor FlowControl equ $ FlowOutput resb 1 ; Outputs to assert for serial flow FlowInput resb 1 ; Input bits for serial flow