|
The Pedigree Project 0.1
|
#include <Machine.h>
Inheritance diagram for Machine:
Collaboration diagram for Machine:Public Member Functions | |
| virtual bool | supportsPowerOff () const |
| virtual bool | prepareShutdown (ShutdownType type) |
| virtual void | finalShutdown (ShutdownType type) |
| void | displayShutdownMessage (const char *message) |
| virtual void | initialise ()=0 |
| virtual void | initialise2 () |
| Called after debugger startup. | |
| virtual void | initialise3 () |
| Called after processor startup - for thread creation etc. | |
| virtual void | deinitialise () |
| bool | isInitialised () |
| virtual void | initialiseDeviceTree () |
| virtual Serial * | getSerial (size_t n)=0 |
| virtual size_t | getNumSerial ()=0 |
| virtual Vga * | getVga (size_t n)=0 |
| virtual size_t | getNumVga ()=0 |
| virtual IrqManager * | getIrqManager ()=0 |
| virtual SchedulerTimer * | getSchedulerTimer ()=0 |
| virtual Timer * | getTimer ()=0 |
| virtual Keyboard * | getKeyboard ()=0 |
| virtual void | setKeyboard (Keyboard *kb)=0 |
| virtual MUST_USE_RESULT bool | quiesceAllOtherProcessors () |
| virtual MUST_USE_RESULT bool | resumeAllOtherProcessors () |
| virtual MUST_USE_RESULT bool | stopAllOtherProcessors () |
Static Public Member Functions | |
| static void | setShutdownPhase (ShutdownPhase phase) |
| static const char * | shutdownPhaseName () |
| static Machine & | instance () |
Protected Attributes | |
| bool | m_bInitialised |
Private Member Functions | |
| Machine (const Machine &) | |
| Machine & | operator= (const Machine &) |
Friends | |
| void | system_reset () |
This is an abstraction on a machine, or board. It provides functions to retrieve Timers, Serial controllers, VGA controllers, Ethernet controllers etc, without having to know the exact implementation required or memory map. It also provides a "probe" function, which will attempt to detect if a machine is present.
Definition at line 41 of file include/pedigree/kernel/machine/Machine.h.
|
strong |
Definition at line 46 of file include/pedigree/kernel/machine/Machine.h.
|
strong |
Definition at line 45 of file include/pedigree/kernel/machine/Machine.h.
|
inlineprotected |
Definition at line 163 of file include/pedigree/kernel/machine/Machine.h.
|
protectedvirtual |
Definition at line 26 of file Machine.cc.
|
inlinevirtual |
Stops platform services while interrupts and the scheduler are alive. Implementations may synchronously drain callbacks and join workers.
Reimplemented in HostedMachine, Pc, and VirtMachine.
Definition at line 94 of file include/pedigree/kernel/machine/Machine.h.
Referenced by HostedMachine::deinitialise(), and VirtMachine::deinitialise().
Here is the caller graph for this function:| void Machine::displayShutdownMessage | ( | const char * | message | ) |
Uses retained console providers after other display writers have stopped.
Definition at line 80 of file Machine.cc.
References Vga::getNumCols(), Vga::getNumRows(), getNumSerial(), getNumVga(), getSerial(), getVga(), Vga::moveCursor(), and Vga::setLargestTextMode().
Referenced by Pc::finalShutdown(), and panic().
Here is the caller graph for this function:
|
virtual |
Runs after all workers, devices and other processors have stopped.
Reimplemented in Pc, and VirtMachine.
Definition at line 75 of file Machine.cc.
References ProcessorBase::reset().
Referenced by ProcessorBase::reset().
Here is the caller graph for this function:
|
pure virtual |
Returns the keyboard device.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by Debugger::start().
Here is the caller graph for this function:
|
pure virtual |
Returns the number of Serial device.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by displayShutdownMessage().
Here is the caller graph for this function:
|
pure virtual |
Returns the number of VGA devices.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by displayShutdownMessage(), and Debugger::start().
Here is the caller graph for this function:
|
pure virtual |
Returns the SchedulerTimer device.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by PerProcessorScheduler::initialise(), and Rtc::initialise3().
Here is the caller graph for this function:
|
pure virtual |
Returns the n'th Serial device.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by _assert(), Log::addEntry(), displayShutdownMessage(), SlamCommand::execute(), panic(), Rtc::processElapsedTime(), HostedTimer::processTimerBatch(), and Debugger::start().
Here is the caller graph for this function:
|
pure virtual |
Returns the n'th Timer device.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by CacheManager::initialise(), IntervalTimer::IntervalTimer(), HidInputManager::keyDown(), RequestQueue::resume(), Uhci::timer(), and PerProcessorScheduler::timer().
Here is the caller graph for this function:
|
pure virtual |
Returns the n'th VGA device.
Implemented in HostedMachine, Pc, and VirtMachine.
Referenced by FramebufferFile::command(), displayShutdownMessage(), BootIO::initialise(), and TextIO::initialise().
Here is the caller graph for this function:
|
pure virtual |
Initialises the machine.
Implemented in HostedMachine, Pc, and VirtMachine.
|
inlinevirtual |
Called after debugger startup.
Definition at line 87 of file include/pedigree/kernel/machine/Machine.h.
|
inlinevirtual |
Called after processor startup - for thread creation etc.
Reimplemented in HostedMachine, Pc, and VirtMachine.
Definition at line 89 of file include/pedigree/kernel/machine/Machine.h.
|
inlinevirtual |
Initialises the machine's base device tree, if one exists, to prefill the tree with those devices that are not otherwise able to be detected via some sort of bus support.
Reimplemented in HostedMachine, Pc, and VirtMachine.
Definition at line 106 of file include/pedigree/kernel/machine/Machine.h.
|
static |
Definition at line 32 of file hosted/Machine.cc.
|
inline |
Definition at line 97 of file include/pedigree/kernel/machine/Machine.h.
|
inlinevirtual |
Prepares firmware and drains its workers while scheduling is available.
Reimplemented in Pc.
Definition at line 73 of file include/pedigree/kernel/machine/Machine.h.
|
virtual |
Temporarily pauses every other processor for an interactive debugger.
Reimplemented in HostedMachine.
Definition at line 129 of file Machine.cc.
References EMIT_IF.
Referenced by Debugger::start().
Here is the caller graph for this function:
|
virtual |
Resumes processors paused by quiesceAllOtherProcessors().
Reimplemented in HostedMachine.
Definition at line 136 of file Machine.cc.
References EMIT_IF.
|
pure virtual |
Sets the keyboard device.
Implemented in HostedMachine, Pc, and VirtMachine.
|
static |
Definition at line 32 of file Machine.cc.
|
static |
Definition at line 36 of file Machine.cc.
|
virtual |
Permanently stops all other cores for panic or terminal shutdown.
Reimplemented in HostedMachine.
Definition at line 143 of file Machine.cc.
References EMIT_IF.
Referenced by panic().
Here is the caller graph for this function:
|
inlinevirtual |
Definition at line 69 of file include/pedigree/kernel/machine/Machine.h.
|
friend |
Definition at line 638 of file system/kernel/core/main.cc.
|
protected |
Definition at line 166 of file include/pedigree/kernel/machine/Machine.h.