!**************************************************************************
!*
!* Boot-ROM-Code to load an operating system across a TCP/IP network.
!*
!* Module:  i8259a.inc
!* Purpose: Definitions for using i8259A interrupt controllers
!* Entries: None
!*
!**************************************************************************
!*
!* Copyright (C) 1998-2003 Gero Kuhlmann <gero@gkminix.han.de>
!*
!*  This program is free software; you can redistribute it and/or modify
!*  it under the terms of the GNU General Public License as published by
!*  the Free Software Foundation; either version 2 of the License, or
!*  any later version.
!*
!*  This program is distributed in the hope that it will be useful,
!*  but WITHOUT ANY WARRANTY; without even the implied warranty of
!*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!*  GNU General Public License for more details.
!*
!*  You should have received a copy of the GNU General Public License
!*  along with this program; if not, write to the Free Software
!*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!*
!* $Id: i8259a.inc,v 1.4 2003/01/25 23:29:40 gkminix Exp $
!*

#ifndef _HW_I8259A_INC
#define _HW_I8259A_INC


!
!**************************************************************************
!
! I/O addresses used by PICs in a typical PC:
!
MASTER_CMD	equ	$20		! master PIC command port
MASTER_IMR	equ	$21		! master PIC interrupt mask register
SLAVE_CMD	equ	$A0		! slave PIC command port
SLAVE_IMR	equ	$A1		! slave PIC interrupt mask register


!
!**************************************************************************
!
! Command codes for i8259A:
!
CMD_NS_EOI	equ	$20		! non-specific EOI command
CMD_S_EOI	equ	$60		! specific EOI command
CMD_READ_IRR	equ	$0A		! read IR register
CMD_READ_ISR	equ	$0B		! read IS register
CMD_SET_SMM	equ	$68		! set special-mask mode
CMD_RST_SMM	equ	$48		! reset special-mask mode


!
!**************************************************************************
!
! Definitions used for handling the redirected slave interrupt on AT and
! higher systems:
!
SLAVE_IRQ_MASK	equ	$04		! IRQ mask for slave PIC on master PIC
SLAVE_IRQ_NUM	equ	$02		! IRQ number for slave PIC on master
SLAVE_IRQ_REDIR	equ	$09		! IRQ number for redirected int 2


!
!**************************************************************************
!
! Interrupt vector ranges with some special meaning:
!
! Hardware interrupts. Not that some master PIC hardware interrupts may
! also be generated by CPU error conditions.
!
MIN_MASTER_HWINT	equ	$08	! first interrupt vector on master PIC
MAX_MASTER_HWINT	equ	$0F	! last interrupt vector on master PIC

MIN_SLAVE_HWINT		equ	$70	! first interrupt vector on slave PIC
MAX_SLAVE_HWINT		equ	$77	! last interrupt vector on slave PIC

PIC_IRQ_NUM		equ	8	! number of IRQs per PIC


!
!**************************************************************************
!
! Define hardware interrupt vectors, which are usually assigned some
! special meaning in PC/AT compatible systems:
!
HWINT_TIMER		equ	$08	! hardware timer interrupt
HWINT_KBD		equ	$09	! keyboard data ready interrupt
HWINT_LPT2_XT		equ	$0A	! LPT2 interrupt on old PC/XT
HWINT_SLAVE		equ	$0A	! slave PIC interrupt on PC/AT
HWINT_COM2		equ	$0B	! COM2 interrupt
HWINT_COM1		equ	$0C	! COM1 interrupt
HWINT_LPT2_AT		equ	$0D	! LPT2 interrupt on PC/AT
HWINT_HD_XT		equ	$0D	! hard disk interrupt on old PC/XT
HWINT_DISKETTE		equ	$0E	! diskette driver interrupt
HWINT_LPT1		equ	$0F	! LPT1 interrupt

HWINT_CLOCK		equ	$70	! CMOS clock interrupt
HWINT_IRQ9		equ	$71	! IRQ 2 hardware interrupt
HWINT_MOUSE_PS2		equ	$74	! PS/2 mouse interrupt
HWINT_MATHERR		equ	$75	! math coprocessor error
HWINT_HD_AT		equ	$76	! hard disk interrupt on PC/AT


!
!**************************************************************************
!
#endif



syntax highlighted by Code2HTML, v. 0.9.1