Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ioapic.h

Go to the documentation of this file.
00001 
00007 /*
00008  *  Copyright (C) 2004,2005 Bregmasoft
00009  * 
00010  * This program is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU General Public License as published by the Free
00012  * Software Foundation; either version 2 of the License, or (at your option)
00013  * any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful, but WITHOUT
00016  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00017  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00018  * more details.
00019  *
00020  * You should have received a copy of the GNU General Public License along
00021  * with this program; if not, write to the Free Software Foundation, Inc., 59
00022  * Temple Place, Suite 330, Boston, MA 02111-1307 USA
00023  */
00024 #ifndef ZYGOMA_IA32_IOAPIC_H_ 
00025 #define ZYGOMA_IA32_IOAPIC_H_ 
00026 
00027 #include <config.h>
00028 #include <iosfwd>
00029 #include <types.h>
00030 
00031 namespace Zygoma
00032 {
00033   namespace ia32
00034   {
00172     class IOApicRedirection
00173     {
00174     public:
00175       u08 m_vector;
00176       u08 m_deliverMode:3;
00177       u08 m_destinationMode:1;
00178       u08 m_deliveryStatus:1;
00179       u08 m_pinPolarity:1;
00180       u08 m_remoteIRR:1;
00181       u08 m_triggerMode:1;
00182       u08 m_interruptMask:1;
00183       u08 m_reserved17:7;
00184       u08 m_reserved24;
00185       u08 m_reserved32;
00186       u08 m_reserved40;
00187       u08 m_reserved48;
00188       u08 m_destination;
00189     } ZYGOMA_PACKED;
00190 
00191 
00199     class IOApic
00200     {
00201     public:
00202       IOApic();
00203 
00204       u32
00205       id() const;
00206 
00207       void
00208       setId(u32 id);
00209 
00210       u32
00211       maxRedirectionEntry() const;
00212 
00213       u32
00214       version() const;
00215 
00216       u32
00217       arbitrationId() const;
00218 
00219       IOApicRedirection
00220       redirection(int interrupt) const;
00221 
00222       void
00223       setRedirection(int interrupt, IOApicRedirection);
00224 
00226       std::ostream&
00227       printStream(std::ostream& ostr) const;
00228 
00229     private:
00230       mutable u32 volatile m_registerSelect; 
00231       u32 volatile m_unused[3];
00232       u32 volatile m_data;           
00233     } ZYGOMA_PACKED;
00234 
00236     inline std::ostream&
00237     operator<<(std::ostream& ostr, IOApic& ioapic)
00238     {
00239       return ioapic.printStream(ostr);
00240     }
00241 
00242   } // namespace ia32
00243 } // namespace Zygoma
00244 
00245 #endif // ZYGOMA_IA32_IOAPIC_H_ 

Generated on Fri Sep 2 10:44:36 2005 for zygoma by doxygen 1.4.2