polka/src/Kernel.hh

51 lines
954 B
C++
Raw Normal View History

/* Kernel.hh
* vim: set tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
/**
* Kernel object. This is the highest level object in the system.
*/
#ifndef __KERNEL_HH__
#define __KERNEL_HH__
#include "Attributes.hh"
2016-03-23 00:56:00 -04:00
#include "Console.hh"
#include "Multiboot.hh"
#include "StartupInformation.hh"
#include "kstd/Types.hh"
2016-03-26 19:40:31 -04:00
#include "memory/Memory.hh"
namespace kernel {
2016-03-25 01:25:21 -04:00
/** The kernel itself. */
struct Kernel
{
static Kernel& systemKernel();
2016-03-23 00:56:00 -04:00
Kernel();
/** Initialize the system. */
void initialize(const StartupInformation& startupInformation);
2016-03-23 00:56:00 -04:00
/**
* Put up a panic screen and halt the system.
* @see halt()
*/
void panic(const char* msg, ...);
/** Disable interrupts and halt the system. You will never return from that place... */
void halt() NORETURN;
2016-03-23 00:56:00 -04:00
Console& console();
2016-03-23 00:56:00 -04:00
private:
Console mConsole;
MemoryManager mMemoryManager;
};
} /* namespace kernel */
#endif /* __KERNEL_HH__ */