aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2002-06-17 16:10:15 +0000
committerhpa <hpa>2002-06-17 16:10:15 +0000
commitac8df6db27137f44c91fe6d57233b62b226a18e0 (patch)
treeab74d4aab98b3e934fce3347bbc846fc78b995dd
parent2600c93ff5c16b523e1a9d3a4506b3e9623d102d (diff)
downloadsyslinux-ac8df6db27137f44c91fe6d57233b62b226a18e0.tar.gz
syslinux-ac8df6db27137f44c91fe6d57233b62b226a18e0.tar.xz
syslinux-ac8df6db27137f44c91fe6d57233b62b226a18e0.zip
Add API call to determine the serial console configuration.
-rw-r--r--comboot.doc13
-rw-r--r--comboot.inc17
-rw-r--r--isolinux.asm1
-rw-r--r--ldlinux.asm1
-rw-r--r--parseconfig.inc1
-rw-r--r--pxelinux.asm1
6 files changed, 33 insertions, 1 deletions
diff --git a/comboot.doc b/comboot.doc
index a677b540..032eed4b 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 80b15b83..d25fd2cc 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 5d5e4185..1fd90d4b 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 f35deb6b..d81353b5 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 cee88df0..96c52b46 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 d19e1711..53b46b84 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