int kickoff() { initVideo(); putStr("Hello World! - Team Virtua!!!\n"); installDescriptorTables(); installTimer(); installKeyboard(); initializePaging(); putStr("Hello, paging world! - Team Virtua !!!\n"); enableInterrupts(); // u32 end_addr = (u32)&end; // u32 *ptr = (u32 *)end_addr; // while(1) { // putStr("End Address : "); // putHex(end_addr); // putStr(" "); // putHex((u32)ptr); // putStr(" : "); // putNum(*ptr); // putStr("\n"); // ptr++; // } putStr("Gotcha!!!\n"); for (;;); return 0; }
/********************************************** Starting point of the whole OS *************************************************/ int kmain() { int i, h; char * buffer = calloc(512 , 1); _Cli(); k_clear_screen(); printf("screen clear\n"); //cache_initarray(); printf("array init\n"); //cache_sortarray(); printf("array sort\n"); initializeSemaphoreTable(); printf("semaphore init\n"); initializeIDT(); unmaskPICS(); initializePaging(); _StartCR3(); SetupScheduler(); //printf("after SetupScheduler\n"); for(h = 0; h < 200; h++){ write_disk(0,h,buffer,BLOCK_SIZE,0); } fd_table = (filedescriptor *)calloc(100,1); masterBootRecord * mbr = (masterBootRecord *)malloc(512); superblock = (masterBlock*)malloc(512); bitmap = (BM*)calloc(BITMAP_SIZE,1); inodemap = (IM*)calloc(INODEMAP_SIZE,1); read_disk(0,0,mbr,BLOCK_SIZE,0); if ( mbr->existFS == 0 ){ init_filesystem("Chinux", mbr); }else{ load_filesystem(); } ready = NULL; for(i = 0; i < 4; i++) startTerminal(i); //free(mbr); logPID = CreateProcessAt("Login", (int(*)(int, char**))logUser, 0, 0, (char**)0, PAGE_SIZE, 4, 1); _Sti(); while(TRUE) ; return 1; }
void kernel_main() { initDescriptorTables(); Terminal term; term.clear(); initializePaging(); term.writeColoredString("$7Hello $FMaster$7, $4welcome $7home!\n"); asm volatile("sti"); initTimer(100); term.writeDec(*(uint32_t*)0xABADF00D); for (;;); }