21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/machine/Device.h" 23 #include "pedigree/kernel/machine/openfirmware/Device.h" 24 #include "pedigree/kernel/machine/openfirmware/OpenFirmware.h" 25 #include "pedigree/kernel/machine/ppc_common/pci.h" 26 #include "pedigree/kernel/processor/Processor.h" 27 #include <machine/ppc_common/Heathrow.h> 28 #include <machine/ppc_common/OpenPic.h> 30 extern size_t resolveInterruptNumber(
Device *pDev);
36 return Mac::instance();
42 m_Keyboard.initialise();
43 m_Decrementer.initialise();
44 m_bInitialised =
true;
68 return &m_Decrementer;
80 Mac::Mac() : m_Decrementer(), m_Vga(), m_Keyboard(), m_pIrqManager(0)
89 static void probeDev(
int depth,
OFDevice *pOfDev,
Device *pInternalDev)
96 OFHandle hOldChild = hChild;
102 dChild.getProperty(
"device_type", type);
105 if (type.length() == 0)
114 node->setOFHandle(hOldChild);
117 probeDev(depth + 1, &dChild, node);
129 probeDev(0, &ofRoot, &internalRoot);
137 ERROR(
"No IRQ manager found.");
virtual Vga * getVga(size_t n)
static OpenFirmware & instance()
virtual void setInterruptNumber(uintptr_t n)
virtual Timer * getTimer()
OFHandle getSibling(class OFDevice *pDev)
virtual void initialiseDeviceTree()
virtual Serial * getSerial(size_t n)
virtual size_t getNumSerial()
virtual SchedulerTimer * getSchedulerTimer()
virtual void setSpecificType(String str)
void addChild(Device *pDevice)
void setParent(Device *p)
virtual Keyboard * getKeyboard()
OFHandle getFirstChild(class OFDevice *pDev)
static OpenPic & instance()
virtual size_t getNumVga()
virtual void initialise()
static Heathrow & instance()