Annotation of XNU/iokit/IOKit/IOCPU.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
                      3:  *
                      4:  *  DRI: Josh de Cesare
                      5:  *
                      6:  */
                      7: 
                      8: #ifndef _IOKIT_CPU_H
                      9: #define _IOKIT_CPU_H
                     10: 
                     11: extern "C" {
                     12: #include <machine/machine_routines.h>
                     13: #include <pexpert/pexpert.h>
                     14: }
                     15: 
                     16: #include <IOKit/IOService.h>
                     17: #include <IOKit/IOInterruptController.h>
                     18: 
                     19: #define kIOCPUStateUnregistered (0)
                     20: #define kIOCPUStateUninitalized (1)
                     21: #define kIOCPUStateStopped      (2)
                     22: #define kIOCPUStateRunning      (3)
                     23: 
                     24: class IOCPUInterruptController;
                     25: 
                     26: extern IOCPUInterruptController *gIOCPUInterruptController;
                     27: 
                     28: class IOCPU : public IOService
                     29: {
                     30:   OSDeclareAbstractStructors(IOCPU);
                     31:   
                     32: protected:
                     33:   OSDictionary  *cpuGroup;
                     34:   IOService     *cpuNub;
                     35:   int           physCPU;
                     36:   int           cpuState;
                     37:   processor_t   machProcessor;
                     38:   ipi_handler_t ipi_handler;
                     39:   
                     40: public:
                     41:   static  void          initCPUs(void);
                     42:   
                     43:   virtual bool          start(IOService *provider);
                     44:   virtual void          initCPU(void);
                     45:   virtual kern_return_t startCPU(vm_offset_t start_paddr,
                     46:                                 vm_offset_t arg_paddr);
                     47:   virtual void          haltCPU(vm_offset_t start_paddr,
                     48:                                vm_offset_t arg_paddr);
                     49:   virtual void          signalCPU(IOCPU *target);
                     50:   
                     51:   virtual int           getCPUNumber(void);
                     52:   virtual int           getCPUState(void);
                     53:   virtual OSDictionary  *getCPUGroup(void);
                     54:   virtual int           getCPUGroupSize(void);
                     55:   
                     56:   virtual OSSymbol      *getCPUName(void) = 0;
                     57: };
                     58: 
                     59: class IOCPUInterruptController : public IOInterruptController
                     60: {
                     61:   OSDeclareDefaultStructors(IOCPUInterruptController);
                     62:   
                     63: private:
                     64:   int   enabledCPUs;
                     65:   
                     66: protected:  
                     67:   int   numCPUs;
                     68:   IOCPU **cpus;
                     69:   
                     70:   
                     71: public:
                     72:   virtual IOReturn initCPUInterruptController(int sources);
                     73:   virtual void     registerCPUInterruptController(void);
                     74:   virtual void     setCPUInterruptProperties(IOService *service);
                     75:   virtual void     enableCPUInterrupt(IOCPU *cpu);
                     76:   
                     77:   virtual IOReturn registerInterrupt(IOService *nub, int source,
                     78:                                     void *target,
                     79:                                     IOInterruptHandler handler,
                     80:                                     void *refCon);
                     81:   
                     82:   virtual IOReturn getInterruptType(IOService *nub, int source,
                     83:                                    int *interruptType);
                     84:   
                     85:   virtual IOReturn enableInterrupt(IOService *nub, int source);
                     86:   virtual IOReturn disableInterrupt(IOService *nub, int source);
                     87:   virtual IOReturn causeInterrupt(IOService *nub, int source);
                     88:   
                     89:   virtual IOReturn handleInterrupt(void *refCon, IOService *nub,
                     90:                                   int source);
                     91: };
                     92: 
                     93: #endif /* ! _IOKIT_CPU_H */

unix.superglobalmegacorp.com

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