a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This program is free software; you can redistribute it and/or
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * modify it under the terms of the GNU General Public License as
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * published by the Free Software Foundation; either version 2 of the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * License, or any later version.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This program is distributed in the hope that it will be useful, but
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * WITHOUT ANY WARRANTY; without even the implied warranty of
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * General Public License for more details.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * You should have received a copy of the GNU General Public License
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * along with this program; if not, write to the Free Software
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Minimal support for the 8259 Programmable Interrupt Controller
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Send non-specific EOI(s)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v irq IRQ number
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * This seems to be inherently unsafe.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline void send_nonspecific_eoi ( unsigned int irq ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync DBG ( "Sending non-specific EOI for IRQ %d\n", irq );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Send specific EOI(s)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v irq IRQ number
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncstatic inline void send_specific_eoi ( unsigned int irq ) {
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync outb ( ( ICR_EOI_SPECIFIC | ICR_VALUE ( CHAINED_IRQ ) ),
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync outb ( ( ICR_EOI_SPECIFIC | ICR_VALUE ( irq ) ), ICR_REG ( irq ) );
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * Send End-Of-Interrupt to the PIC
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync * @v irq IRQ number