Annotation of XNU/iokit/Drivers/platform/drvAppleHeathrow/Heathrow.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*
                     23:  * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
                     24:  *
                     25:  *  DRI: Josh de Cesare
                     26:  *
                     27:  */
                     28: 
                     29: #ifndef _IOKIT_HEATHROW_H
                     30: #define _IOKIT_HEATHROW_H
                     31: 
                     32: #include <IOKit/platform/AppleMacIO.h>
                     33: 
                     34: #include <IOKit/IOInterrupts.h>
                     35: #include <IOKit/IOInterruptController.h>
                     36: 
                     37: #define kPrimaryHeathrow   (0)
                     38: #define kSecondaryHeathrow (1)
                     39: 
                     40: #define kNumVectors        (64)
                     41: #define kVectorsPerReg     (32)
                     42: 
                     43: #define kTypeLevelMask     (0x1FF00000)
                     44: 
                     45: #define kEvents1Offset     (0x00020)
                     46: #define kEvents2Offset     (0x00010)
                     47: #define kMask1Offset       (0x00024)
                     48: #define kMask2Offset       (0x00014)
                     49: #define kClear1Offset      (0x00028)
                     50: #define kClear2Offset      (0x00018)
                     51: #define kLevels1Offset     (0x0002C)
                     52: #define kLevels2Offset     (0x0001C)
                     53: 
                     54: 
                     55: class HeathrowInterruptController;
                     56: 
                     57: class Heathrow : public AppleMacIO
                     58: {
                     59:   OSDeclareDefaultStructors(Heathrow);
                     60:   
                     61: private:
                     62:   IOLogicalAddress             heathrowBaseAddress;
                     63:   long                         heathrowNum;
                     64:   HeathrowInterruptController  *interruptController;
                     65:   
                     66:   virtual bool installInterrupts(IOService *provider);
                     67:   virtual OSSymbol *getInterruptControllerName(void);
                     68:   
                     69:   virtual void processNub(IOService *nub);
                     70:   
                     71: public:
                     72:   virtual bool start(IOService *provider);
                     73: };
                     74: 
                     75: 
                     76: class HeathrowInterruptController : public IOInterruptController
                     77: {
                     78:   OSDeclareDefaultStructors(HeathrowInterruptController);
                     79:   
                     80: private:
                     81:   IOService         *parentNub;
                     82:   IOLock            *taskLock;
                     83:   unsigned long     pendingEvents1;
                     84:   unsigned long     pendingEvents2;
                     85:   unsigned long     events1Reg;
                     86:   unsigned long     events2Reg;
                     87:   unsigned long     mask1Reg;
                     88:   unsigned long     mask2Reg;
                     89:   unsigned long     clear1Reg;
                     90:   unsigned long     clear2Reg;
                     91:   unsigned long     levels1Reg;
                     92:   unsigned long     levels2Reg;
                     93:   
                     94: public:
                     95:   virtual IOReturn initInterruptController(IOService *provider,
                     96:                                           IOLogicalAddress interruptControllerBase);
                     97:   
                     98:   virtual IOInterruptAction getInterruptHandlerAddress(void);
                     99:   virtual IOReturn handleInterrupt(void *refCon, IOService *nub, int source);
                    100:   
                    101:   virtual bool vectorCanBeShared(long vectorNumber, IOInterruptVector *vector);
                    102:   virtual int  getVectorType(long vectorNumber, IOInterruptVector *vector);
                    103:   virtual void disableVectorHard(long vectorNumber, IOInterruptVector *vector);
                    104:   virtual void enableVector(long vectorNumber, IOInterruptVector *vector);
                    105:   virtual void causeVector(long vectorNumber, IOInterruptVector *vector);
                    106: };
                    107: 
                    108: 
                    109: #endif /* ! _IOKIT_HEATHROW_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.