You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
819 B
C++
29 lines
819 B
C++
|
|
#include "arch/lapic.h"
|
|
#include "boot/startup_ap.h"
|
|
#include "debug/output.h"
|
|
|
|
// Main function
|
|
// (the bootstrap processor starts here)}
|
|
extern "C" int main() {
|
|
unsigned int numCPUs = Core::count();
|
|
DBG_VERBOSE << "Number of CPUs: " << numCPUs << endl;
|
|
|
|
/* Start application processors
|
|
* To avoid unexpected behaviour, make sure that interrupts are not
|
|
* enabled before the APs are booted. Otherwise it might interfere with the
|
|
* Startup IPIs or even block devices like keyboard because of a missing EOI
|
|
*/
|
|
ApplicationProcessor::boot();
|
|
|
|
return 0;
|
|
}
|
|
|
|
// Main function for application processors
|
|
extern "C" int main_ap() {
|
|
DBG_VERBOSE << "CPU core " << static_cast<int>(Core::getID()) << " / LAPIC "
|
|
<< static_cast<int>(LAPIC::getID()) << " in main_ap()" << endl;
|
|
|
|
return 0;
|
|
}
|