DevApic.h revision 0c5d6027e582baa247e987e184f93d44623e7443
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync/* $Id$ */
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync/** @file
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * Advanced Programmable Interrupt Controller (APIC) Device Definitions.
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync */
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync/*
0c5d6027e582baa247e987e184f93d44623e7443vboxsync * Copyright (C) 2006-2012 Oracle Corporation
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * available from http://www.virtualbox.org. This file is free software;
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * you can redistribute it and/or modify it under the terms of the GNU
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * General Public License (GPL) as published by the Free Software
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * --------------------------------------------------------------------
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * This code is based on:
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * apic.c revision 1.5 @@OSETODO
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * APIC support
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * Copyright (c) 2004-2005 Fabrice Bellard
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * This library is free software; you can redistribute it and/or
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * modify it under the terms of the GNU Lesser General Public
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * License as published by the Free Software Foundation; either
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * version 2 of the License, or (at your option) any later version.
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * This library is distributed in the hope that it will be useful,
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * but WITHOUT ANY WARRANTY; without even the implied warranty of
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * Lesser General Public License for more details.
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync *
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * You should have received a copy of the GNU Lesser General Public
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * License along with this library; if not, write to the Free Software
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync */
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#ifndef ___PC_DevApic_h
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define ___PC_DevApic_h
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync/* APIC Local Vector Table */
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_TIMER 0
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_THERMAL 1
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_PERFORM 2
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_LINT0 3
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_LINT1 4
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_ERROR 5
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_NB 6
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync/* APIC delivery modes */
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_FIXED 0
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_LOWPRI 1
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_SMI 2
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_NMI 4
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_INIT 5
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_SIPI 6
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DM_EXTINT 7
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync/* APIC destination mode */
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DESTMODE_FLAT 0xf
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_DESTMODE_CLUSTER 0x0
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_TRIGGER_EDGE 0
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_TRIGGER_LEVEL 1
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_TIMER_PERIODIC (1<<17)
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_MASKED (1<<16)
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_LEVEL_TRIGGER (1<<15)
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_LVT_REMOTE_IRR (1<<14)
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_INPUT_POLARITY (1<<13)
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#define APIC_SEND_PENDING (1<<12)
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync#endif
abb14a9d49aa819cc2296b1daf7c416118d39f1evboxsync