root/core/io.inc

Revision e1192a81bddbf803feb9445a9408a9feec6159aa, 0.9 KB (checked in by H. Peter Anvin <hpa@…>, 3 years ago)

core: add a proper interrupt handler for the serial console

If we enable interrupts for the serial console, add a proper interrupt
handler. Since we don't know what vector we'll end up using, or if we
are shared with other devices, simply hook *all* the interrupts and
poll the serial port then.

Signed-off-by: H. Peter Anvin <hpa@…>

  • Property mode set to 100644
Line 
1;; -----------------------------------------------------------------------
2;;
3;;   Copyright 1994-2009 H. Peter Anvin - All Rights Reserved
4;;   Copyright 2009 Intel Corporation; author: H. Peter Anvin
5;;
6;;   This program is free software; you can redistribute it and/or modify
7;;   it under the terms of the GNU General Public License as published by
8;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9;;   Boston MA 02111-1307, USA; either version 2 of the License, or
10;;   (at your option) any later version; incorporated herein by reference.
11;;
12;; -----------------------------------------------------------------------
13
14;;
15;; io.inc
16;;
17;; I/O related macros
18;;
19
20%ifndef _IO_INC
21%define _IO_INC
22
23%define IO_DELAY_PORT   80h             ; Invalid port (we hope!)
24
25%macro io_delay 0.nolist
26                out IO_DELAY_PORT,al
27                out IO_DELAY_PORT,al
28%endmacro
29
30%macro slow_out 2.nolist
31                out %1,%2
32                io_delay
33%endmacro
34
35%endif ; _IO_INC
Note: See TracBrowser for help on using the browser.