The Pedigree Project
0.1
|
#include <OpenFirmware.h>
Classes | |
struct | PromArgs |
Public Types | |
typedef int(* | OFInterface) (PromArgs *) |
Public Member Functions | |
void | initialise (OFInterface interface) |
OFHandle | findDevice (const char *pName) |
OFHandle | getSibling (class OFDevice *pDev) |
OFHandle | getFirstChild (class OFDevice *pDev) |
OFParam | call (const char *pService, int nArgs, OFParam p1=0, OFParam p2=0, OFParam p3=0, OFParam p4=0, OFParam p5=0, OFParam p6=0, OFParam p7=0, OFParam p8=0) |
Static Public Member Functions | |
static OpenFirmware & | instance () |
Private Member Functions | |
OpenFirmware () | |
Private Attributes | |
OFInterface | m_Interface |
processor_register_t | m_Sprg0 |
processor_register_t | m_Sprg1 |
processor_register_t | m_Sprg2 |
processor_register_t | m_Sprg3 |
Static Private Attributes | |
static OpenFirmware | m_Instance |
Definition at line 29 of file OpenFirmware.h.
|
private |
Default constructor is private.
Definition at line 27 of file OpenFirmware.cc.
Referenced by instance().
OFParam OpenFirmware::call | ( | const char * | pService, |
int | nArgs, | ||
OFParam | p1 = 0 , |
||
OFParam | p2 = 0 , |
||
OFParam | p3 = 0 , |
||
OFParam | p4 = 0 , |
||
OFParam | p5 = 0 , |
||
OFParam | p6 = 0 , |
||
OFParam | p7 = 0 , |
||
OFParam | p8 = 0 |
||
) |
Calls OpenFirmware with the given arguments, returning one argument.
Definition at line 64 of file OpenFirmware.cc.
References m_Interface, and m_Sprg0.
Referenced by findDevice(), getFirstChild(), getSibling(), instance(), and OFDevice::setProperty().
OFHandle OpenFirmware::findDevice | ( | const char * | pName | ) |
Finds a device in the tree by name.
Definition at line 46 of file OpenFirmware.cc.
References call().
Referenced by instance().
OFHandle OpenFirmware::getFirstChild | ( | class OFDevice * | pDev | ) |
Returns the given Device's first child, or NULL if none.
Definition at line 58 of file OpenFirmware.cc.
References call().
Referenced by instance(), and Mac::~Mac().
OFHandle OpenFirmware::getSibling | ( | class OFDevice * | pDev | ) |
Returns the given Device's sibling, or NULL if none.
Definition at line 52 of file OpenFirmware.cc.
References call().
Referenced by instance(), and Mac::~Mac().
void OpenFirmware::initialise | ( | OFInterface | interface | ) |
Initialises the OF interface.
Definition at line 35 of file OpenFirmware.cc.
References m_Interface, and m_Sprg0.
Referenced by instance().
|
inlinestatic |
Retrieves the singleton instance of the OpenFirmware class.
Definition at line 45 of file OpenFirmware.h.
References call(), findDevice(), getFirstChild(), getSibling(), initialise(), m_Instance, and OpenFirmware().
Referenced by PPCKeyboard::getChar(), PPCKeyboard::getCharNonBlock(), PPCKeyboard::initialise(), Decrementer::initialise(), HashedPageTable::initialise(), PPCVga::initialise(), PPC32VirtualAddressSpace::initialise(), Mac::initialiseDeviceTree(), PPC32InterruptManager::initialiseProcessor(), OFDevice::setProperty(), and Mac::~Mac().
|
staticprivate |
|
private |
The PROM callback.
Definition at line 74 of file OpenFirmware.h.
Referenced by call(), and initialise().
|
private |
OpenFirmware requires the saving of these registers. It shouldn't, but it does.
Definition at line 81 of file OpenFirmware.h.
Referenced by call(), and initialise().