1/** 2 * \file 3 * \brief I/O APIC driver. 4 */ 5 6/* 7 * Copyright (c) 2007, 2008, 2009, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15#ifndef IOAPIC_H 16#define IOAPIC_H 17 18#include <dev/lpc_ioapic_dev.h> 19#include "lpc_ioapic_ioapic_impl.h" 20 21struct ioapic { 22 int initialized; 23 lpc_ioapic_t dev; 24 int nintis; 25 uint32_t irqbase; 26 char label[255]; 27}; 28 29errval_t ioapic_init(struct ioapic *a, lvaddr_t base, uint8_t id, 30 uint32_t irqbase); 31void ioapic_toggle_inti(struct ioapic *a, int inti, bool enable); 32void ioapic_setup_inti(struct ioapic *a, int inti, 33 lpc_ioapic_redir_tbl_t entry); 34void ioapic_route_inti(struct ioapic *a, int inti, uint8_t vector, 35 uint8_t dest); 36 37struct ioapic *find_ioapic_for_label(const char *label); 38struct ioapic *find_ioapic_by_index(int index); 39 40#endif 41