Annotation of XNU/iokit/Drivers/pci/drvApplePCI/AppleMacRiscPCI.h, revision 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) 1998 Apple Computer, Inc.  All rights reserved. 
        !            24:  *
        !            25:  * HISTORY
        !            26:  *
        !            27:  */
        !            28: 
        !            29: 
        !            30: #ifndef _IOKIT_APPLEMACRISCPCI_H
        !            31: #define _IOKIT_APPLEMACRISCPCI_H
        !            32: 
        !            33: #include <IOKit/pci/IOPCIBridge.h>
        !            34: 
        !            35: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
        !            36: 
        !            37: enum {
        !            38:     kBridgeSelfDevice = 11
        !            39: };
        !            40: 
        !            41: enum {
        !            42:     kMacRISCAddressSelect      = 0x48
        !            43: };
        !            44: 
        !            45: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
        !            46: 
        !            47: class AppleMacRiscPCI : public IOPCIBridge
        !            48: {
        !            49:     OSDeclareDefaultStructors(AppleMacRiscPCI)
        !            50: 
        !            51: protected:
        !            52:     IOSimpleLock *             lock;
        !            53:     IODeviceMemory *           ioMemory;
        !            54:     IOMemoryMap *              configAddrMap;
        !            55:     IOMemoryMap *              configDataMap;
        !            56: 
        !            57:     volatile UInt32    *       configAddr;
        !            58:     volatile UInt32    *       configData;
        !            59: 
        !            60:     UInt16                     coarseAddressMask;
        !            61:     UInt16                     fineAddressMask;
        !            62:     UInt8                      primaryBus;
        !            63:     UInt8                      configDataOffsetMask;
        !            64: 
        !            65:     inline bool setConfigSpace( IOPCIAddressSpace space, UInt8 offset );
        !            66:     virtual UInt8 firstBusNum( void );
        !            67:     virtual UInt8 lastBusNum( void );
        !            68: 
        !            69: public:
        !            70:     virtual bool start(        IOService * provider );
        !            71:     virtual bool configure( IOService * provider );
        !            72: 
        !            73:     virtual void free();
        !            74: 
        !            75:     virtual IODeviceMemory * ioDeviceMemory( void );
        !            76: 
        !            77:     virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset );
        !            78: 
        !            79:     virtual void configWrite32( IOPCIAddressSpace space,
        !            80:                                        UInt8 offset, UInt32 data );
        !            81: 
        !            82:     virtual IOPCIAddressSpace getBridgeSpace( void );
        !            83: };
        !            84: 
        !            85: class AppleMacRiscVCI : public AppleMacRiscPCI
        !            86: {
        !            87:     OSDeclareDefaultStructors(AppleMacRiscVCI)
        !            88: 
        !            89: public:
        !            90:     virtual bool configure( IOService * provider );
        !            91: 
        !            92:     virtual IODeviceMemory * ioDeviceMemory( void );
        !            93: 
        !            94: };
        !            95: 
        !            96: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
        !            97: 
        !            98: /* Definitions of UniNorth Target config registers */
        !            99: enum {
        !           100:     kUniNGART_BASE             = 0x8c,
        !           101:     kUniNAGP_BASE              = 0x90,
        !           102:     kUniNGART_CTRL             = 0x94,
        !           103:     kUniNINTERNAL_STATUS       = 0x98
        !           104: };
        !           105: enum {
        !           106:     kGART_INV                  = 0x00000001,
        !           107:     kGART_EN                   = 0x00000100,
        !           108:     kGART_2xRESET              = 0x00010000
        !           109: };
        !           110: 
        !           111: class IORangeAllocator;
        !           112: 
        !           113: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
        !           114: 
        !           115: class AppleMacRiscAGP : public AppleMacRiscPCI
        !           116: {
        !           117:     OSDeclareDefaultStructors(AppleMacRiscAGP)
        !           118: 
        !           119: protected:
        !           120:     IORangeAllocator * agpRange;
        !           121:     UInt32             agpBaseIndex;
        !           122:     IOPhysicalAddress  systemBase;
        !           123:     IOPhysicalLength   systemLength;
        !           124:     volatile UInt32 *  gartArray;
        !           125:     IOByteCount                gartLength;
        !           126: 
        !           127: private:
        !           128:     virtual IOReturn setAGPEnable( IOPCIAddressSpace master, bool enable,
        !           129:                                        IOOptionBits options = 0 );
        !           130: 
        !           131: public:
        !           132: 
        !           133:     virtual bool configure( IOService * provider );
        !           134: 
        !           135:     virtual IOPCIDevice * createNub( OSDictionary * from );
        !           136: 
        !           137:     virtual IOReturn createAGPSpace( IOPCIAddressSpace master, 
        !           138:                                     IOOptionBits options,
        !           139:                                     IOPhysicalAddress * address, 
        !           140:                                     IOPhysicalLength * length );
        !           141: 
        !           142:     virtual IOReturn destroyAGPSpace( IOPCIAddressSpace master );
        !           143: 
        !           144:     virtual IORangeAllocator * getAGPRangeAllocator( IOPCIAddressSpace master );
        !           145: 
        !           146:     virtual IOOptionBits getAGPStatus( IOPCIAddressSpace master,
        !           147:                                      IOOptionBits options = 0 );
        !           148: 
        !           149:     virtual IOReturn commitAGPMemory( IOPCIAddressSpace master, 
        !           150:                                      IOMemoryDescriptor * memory,
        !           151:                                      IOByteCount agpOffset,
        !           152:                                      IOOptionBits options = 0 );
        !           153: 
        !           154:     virtual IOReturn releaseAGPMemory( IOPCIAddressSpace master, 
        !           155:                                        IOMemoryDescriptor * memory,
        !           156:                                        IOByteCount agpOffset );
        !           157: };
        !           158: 
        !           159: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
        !           160: 
        !           161: #endif /* ! _IOKIT_APPLEMACRISCPCI_H */
        !           162: 

unix.superglobalmegacorp.com

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