From 4826c90afd85d3bc8ee963de0bf1438340db865a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 18 May 2009 13:42:19 -0700 Subject: Try to HLT the processor during idle Try to HLT the processor during idle. All the events we care about should have interrupts associated with them, except possibly the serial console. Try to deal with the serial console by waiting some time before going into HLT, and giving the user the option of enabling the serial console interrupt, on the assumption that the BIOS will simply IRET. Signed-off-by: H. Peter Anvin --- core/parseconfig.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'core/parseconfig.inc') diff --git a/core/parseconfig.inc b/core/parseconfig.inc index fd1c6511..61e7b330 100644 --- a/core/parseconfig.inc +++ b/core/parseconfig.inc @@ -178,9 +178,8 @@ pc_include: inc word [IncludeLevel] pc_serial: call getint jc .err push bx ; Serial port # - xor ax,ax - mov [FlowControl],ax ; Default to no flow control - mov [FlowIgnore],al + xor eax,eax + mov [FlowControl],eax ; Default to no flow control call skipspace jc .nobaud call ungetc @@ -200,7 +199,7 @@ pc_serial: call getint shl bh,4 mov [FlowIgnore],bh mov bh,bl - and bx,0F003h ; Valid bits + and bx,0F00Bh ; Valid bits mov [FlowControl],bx pop ebx ; Baud rate jmp short .parse_baud @@ -247,7 +246,8 @@ pc_serial: call getint jne .err ; Assume serial port busted dec dx dec dx ; DX -> IER - xor al,al ; IRQ disable + test byte [FlowOutput],8 + setnz al ; Bit 0 -> input available IRQ call slow_out inc dx ; DX -> FCR/IIR @@ -262,8 +262,7 @@ pc_serial: call getint inc dx inc dx ; DX -> MCR - in al,dx - or al,[FlowOutput] ; Assert bits + mov al,[FlowOutput] ; Assert bits call slow_out ; Show some life -- cgit v1.2.1