33 lines
777 B
C++
33 lines
777 B
C++
#include <dbg.h>
|
|
#include <stdint.h>
|
|
#include <gic.h>
|
|
#include <interrupt.h>
|
|
#include <timer.h>
|
|
|
|
extern "C" void go_usr(void);
|
|
|
|
/* KERNEL MAIN */
|
|
extern "C" int main(int argc, char** argv) {
|
|
printkl("Welcome to STKARM -- Simple and Trivial Kernel for Advanced Reduced Instruction Set Computer Machines");
|
|
|
|
printkl("Installing kernel...");
|
|
|
|
printkl("Now firing test software interrupt...");
|
|
fireswi();
|
|
|
|
printkl("Now enabling GIC interrupts...");
|
|
GIC::enable();
|
|
|
|
printkl("Now enabling timer...");
|
|
Timer::timer[0].set(0x80, Timer::CONTINUOUS, Timer::PRESCALER_128, Timer::LS_OSC);
|
|
Timer::timer[0].start();
|
|
|
|
printkl("Now going user...");
|
|
go_usr();
|
|
|
|
printkl("EOK -- End of Kernel -- This point can not be reached");
|
|
return 0;
|
|
}
|
|
|
|
|