|
|
|
|
@ -58,42 +58,12 @@ OutputStream* copyout[Core::MAX]{
|
|
|
|
|
&dout[7]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void test(){
|
|
|
|
|
kout << "test" << endl << flush;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Main function
|
|
|
|
|
// (the bootstrap processor starts here)}
|
|
|
|
|
extern "C" int main() {
|
|
|
|
|
unsigned int numCPUs = Core::count();
|
|
|
|
|
DBG_VERBOSE << "Number of CPUs: " << numCPUs << endl;
|
|
|
|
|
|
|
|
|
|
////test cga implemantation
|
|
|
|
|
// CGA::setCursor(1, 2);
|
|
|
|
|
// unsigned x,y;
|
|
|
|
|
// CGA::getCursor(x, y);
|
|
|
|
|
// CGA::setCursor(x+1, y+1);
|
|
|
|
|
// for(uint8_t i = 0; i < 10; i++)
|
|
|
|
|
// CGA::show(i, i, i+0x30, CGA::Attribute());
|
|
|
|
|
|
|
|
|
|
////test textwindow implemantation
|
|
|
|
|
//TextWindow tw_global = TextWindow(0, 80, 0, 25, true);
|
|
|
|
|
//tw_global.reset(' ', CGA::Attribute(CGA::LIGHT_GREEN, CGA::BLUE, false));
|
|
|
|
|
|
|
|
|
|
//// test SerialStream
|
|
|
|
|
//SerialStream ss = SerialStream();
|
|
|
|
|
//ss.print("test", 4);
|
|
|
|
|
//ss.setAttribute(SerialStream::UNDERSCORE);
|
|
|
|
|
//ss.print("test", 4);
|
|
|
|
|
//ss.setAttribute(SerialStream::RESET);
|
|
|
|
|
//ss.setForeground(SerialStream::MAGENTA);
|
|
|
|
|
//ss.print("test", 4);
|
|
|
|
|
//ss.setBackground(SerialStream::CYAN);
|
|
|
|
|
//ss.print("test", 4);
|
|
|
|
|
//ss.setPos(10, 10);
|
|
|
|
|
//ss.print("test\n", 5);
|
|
|
|
|
//ss.setBackground(SerialStream::BLACK);
|
|
|
|
|
|
|
|
|
|
kout << "Test <stream result> -> <expected>" << endl;
|
|
|
|
|
kout << "bool: " << true << " -> true" << endl;
|
|
|
|
|
kout << "zero: " << 0 << " -> 0" << endl;
|
|
|
|
|
@ -140,21 +110,6 @@ extern "C" int main_ap() {
|
|
|
|
|
<< static_cast<int>(LAPIC::getID()) << " in main_ap()" << endl;
|
|
|
|
|
Core::Interrupt::enable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TextWindow dout0 = TextWindow(0,20,13,19, false);
|
|
|
|
|
//dout0.reset();
|
|
|
|
|
//dout0.reset(' ', CGA::Attribute(CGA::LIGHT_GREEN, CGA::RED, false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////test Serial
|
|
|
|
|
//Serial s = Serial();
|
|
|
|
|
//s.write('a');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//uint8_t from = static_cast<int>(LAPIC::getID()) * 20;
|
|
|
|
|
//uint8_t to = from+20;
|
|
|
|
|
//dout[LAPIC::getID()] = TextStream(from, to, 0, 6, false);
|
|
|
|
|
DBG << "test\n" << flush;
|
|
|
|
|
DBG << static_cast<int>(LAPIC::getID()) << endl << flush;
|
|
|
|
|
|
|
|
|
|
|