The Pedigree Project  0.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
OpenFirmware Class Reference

#include <OpenFirmware.h>

+ Collaboration diagram for OpenFirmware:

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 OpenFirmwareinstance ()
 

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
 

Detailed Description

Interface to OpenFirmware.

Definition at line 29 of file OpenFirmware.h.

Constructor & Destructor Documentation

OpenFirmware::OpenFirmware ( )
private

Default constructor is private.

Definition at line 27 of file OpenFirmware.cc.

Referenced by instance().

+ Here is the caller graph for this function:

Member Function Documentation

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

static OpenFirmware& OpenFirmware::instance ( )
inlinestatic

Member Data Documentation

OpenFirmware OpenFirmware::m_Instance
staticprivate

The singleton instance

Definition at line 77 of file OpenFirmware.h.

Referenced by instance().

OFInterface OpenFirmware::m_Interface
private

The PROM callback.

Definition at line 74 of file OpenFirmware.h.

Referenced by call(), and initialise().

processor_register_t OpenFirmware::m_Sprg0
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().


The documentation for this class was generated from the following files: