[serial] Use new UART abstraction in serial console driver

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-06-29 08:43:16 +01:00
parent 5e622dc085
commit 2a696ab963
7 changed files with 173 additions and 300 deletions

View File

@@ -41,8 +41,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/image.h>
#include <ipxe/version.h>
#include <usr/imgmgmt.h>
#include "config/console.h"
#include "config/serial.h"
/** The "SYSLINUX" version string */
static char __bss16_array ( syslinux_version, [32] );
@@ -261,8 +259,10 @@ static __asmcall void int21 ( struct i386_all_regs *ix86 ) {
break;
case 0x04: /* Write Character to Serial Port */
serial_putc ( ix86->regs.dl );
ix86->flags &= ~CF;
if ( serial_console.base ) {
uart_transmit ( &serial_console, ix86->regs.dl );
ix86->flags &= ~CF;
}
break;
case 0x09: /* Write DOS String to Console */
@@ -455,15 +455,12 @@ static __asmcall void int22 ( struct i386_all_regs *ix86 ) {
break;
case 0x000B: /* Get Serial Console Configuration */
#if defined(CONSOLE_SERIAL) && !defined(COMPRESERVE)
ix86->regs.dx = COMCONSOLE;
ix86->regs.cx = 115200 / COMSPEED;
ix86->regs.bx = 0;
#else
ix86->regs.dx = 0;
#endif
ix86->flags &= ~CF;
if ( serial_console.base ) {
ix86->regs.dx = ( ( intptr_t ) serial_console.base );
ix86->regs.cx = serial_console.divisor;
ix86->regs.bx = 0;
ix86->flags &= ~CF;
}
break;
case 0x000E: /* Get configuration file name */