|
|
|
|
@ -73,9 +73,13 @@ unsigned int testx, testy;
|
|
|
|
|
|
|
|
|
|
uint8_t test1_stack[1024];
|
|
|
|
|
uint8_t test2_stack[1024];
|
|
|
|
|
uint8_t test3_stack[1024];
|
|
|
|
|
uint8_t test4_stack[1024];
|
|
|
|
|
//Thread test1_thread = Thread(&test1_stack[sizeof(test1_stack)-1]);
|
|
|
|
|
Application application1 = Application(&test1_stack[sizeof(test1_stack)-1]);
|
|
|
|
|
Application application2 = Application(&test2_stack[sizeof(test2_stack)-1]);
|
|
|
|
|
Application application3 = Application(&test3_stack[sizeof(test3_stack)-1]);
|
|
|
|
|
Application application4 = Application(&test4_stack[sizeof(test4_stack)-1]);
|
|
|
|
|
|
|
|
|
|
//Context test2;
|
|
|
|
|
//uint8_t test2_stack[256];
|
|
|
|
|
@ -114,6 +118,14 @@ extern "C" int main() {
|
|
|
|
|
* Startup IPIs or even block devices like keyboard because of a missing EOI
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Guarded g = Guard::enter();
|
|
|
|
|
sch.ready(&application1);
|
|
|
|
|
sch.ready(&application2);
|
|
|
|
|
sch.ready(&application3);
|
|
|
|
|
sch.ready(&application4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ApplicationProcessor::boot();
|
|
|
|
|
|
|
|
|
|
PS2Controller::init();
|
|
|
|
|
@ -128,9 +140,12 @@ extern "C" int main() {
|
|
|
|
|
|
|
|
|
|
DBG << "Main CPU " << static_cast<int>(LAPIC::getID()) << endl << flush;
|
|
|
|
|
|
|
|
|
|
sch.ready(&application1);
|
|
|
|
|
sch.ready(&application2);
|
|
|
|
|
sch.schedule();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Guarded g = Guard::enter();
|
|
|
|
|
sch.schedule();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Application{}.action();
|
|
|
|
|
@ -150,6 +165,11 @@ extern "C" int main_ap() {
|
|
|
|
|
|
|
|
|
|
DBG << "App CPU " << static_cast<int>(Core::getID()) << endl << flush;
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Guarded g = Guard::enter();
|
|
|
|
|
sch.schedule();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//assert(Core::getID() != 1);
|
|
|
|
|
//Application{}.action();
|
|
|
|
|
|
|
|
|
|
|