//--------------------------------------------------------------------------- //Hauptprogramm int main (int argc, char *argv[]) { uv_main::konfig.load_file("config.txt"); uv_main::mainwindow = uv_main::konfig.get_mainwindow_attribute(); uv_main::mainwindow.set_callback(mainloop); uv_main::fps = uv_fpscounter::make_attribut(&uv_main::mainwindow, uv_main::mainwindow.get_w()-100, 0, 0, 0, uv_text::make_attribut(0, 0, 0, 0, 0, 16, "Frames", "Wait...", "Test.ttf", uv_color::make_color(255, 255, 255)),"FPS Counter"); uv_main::menu = uv_container::make_attribut(&uv_main::mainwindow); uv_main::game = uv_container::make_attribut(&uv_main::mainwindow); uv_main::game.set_visible(0); uv_main::menu.set_visible(1); aboutinit(); menueinit(); gameinit(); optionsinit(); // uv_main::options.set_visible(1); // uv_main::mainwindow.set_on_top_widget(&uv_main::options); //TEST /* uv_dropdown drop; vector<string> lolo; lolo.push_back("hellou"); lolo.push_back("hellaau"); lolo.push_back("hilleu"); lolo.push_back("hollau"); drop = uv_dropdown::make_attribut(&uv_main::menu,&uv_main::mainwindow,60,60,200,40,"", lolo, "");*/ ///TEST uv_main::mainwindow.run(); uv_main::konfig.save_file("config.txt"); ki_thread::kill_thread(); return 0; };
void main(void) { extern char edata[], end[]; uint rev; okay(1); m = (Mach*)MACHADDR; memset(edata, 0, end - edata); /* clear bss */ machinit(); mmuinit1(); optionsinit("/boot/boot boot"); quotefmtinstall(); ataginit((Atag*)BOOTARGS); confinit(); /* figures out amount of memory */ xinit(); uartconsinit(); screeninit(); print("\nPlan 9 from Bell Labs\n"); rev = getfirmware(); print("firmware: rev %d\n", rev); if(rev < Minfirmrev){ print("Sorry, firmware (start.elf) must be at least rev %d (%s)\n", Minfirmrev, Minfirmdate); for(;;) ; } trapinit(); clockinit(); printinit(); timersinit(); cpuidprint(); archreset(); procinit0(); initseg(); links(); chandevreset(); /* most devices are discovered here */ pageinit(); swapinit(); userinit(); gpiomeminit(); schedinit(); assert(0); /* shouldn't have returned */ }
/* * entered from l.s with mmu enabled. * * we may have to realign the data segment; apparently 5l -H0 -R4096 * does not pad the text segment. on the other hand, we may have been * loaded by another kernel. * * be careful not to touch the data segment until we know it's aligned. */ void main(Mach* mach) { extern char bdata[], edata[], end[], etext[]; static ulong vfy = 0xcafebabe; m = mach; if (vfy != 0xcafebabe) memmove(bdata, etext, edata - bdata); if (vfy != 0xcafebabe) { wave('?'); panic("misaligned data segment"); } memset(edata, 0, end - edata); /* zero bss */ vfy = 0; wave('9'); machinit(); archreset(); mmuinit(); optionsinit("/boot/boot boot"); quotefmtinstall(); archconsole(); wave(' '); /* want plan9.ini to be able to affect memory sizing in confinit */ plan9iniinit(); /* before we step on plan9.ini in low memory */ /* set memsize before xinit */ confinit(); /* xinit would print if it could */ xinit(); /* * Printinit will cause the first malloc call. * (printinit->qopen->malloc) unless any of the * above (like clockintr) do an irqenable, which * will call malloc. * If the system dies here it's probably due * to malloc(->xalloc) not being initialised * correctly, or the data segment is misaligned * (it's amazing how far you can get with * things like that completely broken). * * (Should be) boilerplate from here on. */ trapinit(); clockinit(); printinit(); uartkirkwoodconsole(); /* only now can we print */ print("from Bell Labs\n\n"); #ifdef CRYPTOSANDBOX print("sandbox: 64K at physical %#lux, mapped to 0xf10b0000\n", PADDR((uintptr)sandbox & ~(BY2PG-1))); #endif archconfinit(); cpuidprint(); timersinit(); procinit0(); initseg(); links(); chandevreset(); /* most devices are discovered here */ spiprobe(); pageinit(); swapinit(); userinit(); schedinit(); panic("schedinit returned"); }
/* * at entry, l.s has set m for cpu0 and printed "Plan 9 from Be" * but has not zeroed bss. */ void main(void) { int cpu; static ulong vfy = 0xcafebabe; up = nil; if (vfy != 0xcafebabe) { serialputc('?'); serialputc('d'); panic("data segment misaligned"); } memset(edata, 0, end - edata); /* * we can't lock until smpon has run, but we're supposed to wait * until l1 & l2 are on. too bad. l1 is on, l2 will soon be. */ smpon(); iprint("ll Labs "); cacheinit(); /* * data segment is aligned, bss is zeroed, caches' characteristics * are known. begin initialisation. */ mach0init(); l2pageinit(); mmuinit(); optionsinit("/boot/boot boot"); quotefmtinstall(); /* want plan9.ini to be able to affect memory sizing in confinit */ plan9iniinit(); /* before we step on plan9.ini in low memory */ /* l2 looks for *l2off= in plan9.ini */ l2cache->on(); /* l2->on requires locks to work, thus smpon */ l2cache->info(&cachel[2]); allcache->on(); cortexa9cachecfg(); trapinit(); /* so confinit can probe memory to size it */ confinit(); /* figures out amount of memory */ /* xinit prints (if it can), so finish up the banner here. */ delay(100); navailcpus = getncpus(); iprint("(mp arm; %d cpus)\n\n", navailcpus); delay(100); for (cpu = 1; cpu < navailcpus; cpu++) stopcpu(cpu); xinit(); irqtooearly = 0; /* now that xinit and trapinit have run */ mainmem->flags |= POOL_ANTAGONISM /* | POOL_PARANOIA */ ; /* * Printinit will cause the first malloc call. * (printinit->qopen->malloc) unless any of the * above (like clockinit) do an irqenable, which * will call malloc. * If the system dies here it's probably due * to malloc(->xalloc) not being initialised * correctly, or the data segment is misaligned * (it's amazing how far you can get with * things like that completely broken). * * (Should be) boilerplate from here on. */ archreset(); /* cfg clock signals, print cache cfg */ clockinit(); /* start clocks */ timersinit(); delay(50); /* let uart catch up */ printinit(); kbdenable(); cpuidprint(); chkmissing(); procinit0(); initseg(); // dmainit(); links(); conf.monitor = 1; // screeninit(); iprint("pcireset..."); pcireset(); /* this tends to hang after a reboot */ iprint("ok\n"); chandevreset(); /* most devices are discovered here */ // i8250console(); /* too early; see init0 */ pageinit(); /* prints "1020M memory: ⋯ */ swapinit(); userinit(); /* * starting a cpu will eventually result in it calling schedinit, * so everything necessary to run user processes should be set up * before starting secondary cpus. */ launchinit(); /* SMP & FW are already on when we get here; u-boot set them? */ for (cpu = 1; cpu < navailcpus; cpu++) if (startcpu(cpu) < 0) panic("cpu%d didn't start", cpu); l1diag(); schedinit(); panic("cpu%d: schedinit returned", m->machno); }
/************************************************************************ * dasm * * - dasm is the application main window. * * - everything the main window does is in this routine (for now) and * * where a response is quick it appears in one of its helper functions * * later in this file, otherwise it has been substantial enough to * * warrant its own file and routines........ * * - this is long * ************************************************************************/ LRESULT CALLBACK MainWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) { HDC hdc; TEXTMETRIC tm; POINT point; lptr scrll; int killcount; g_hMainWnd=hwnd; RECT tmp_rect; switch(message) { case WM_COMMAND: switch(LOWORD(wParam)) { case file_exit: SendMessage(g_hMainWnd,WM_CLOSE,0,0); break; case file_save: savefile_text(hwnd,true,false); break; case get_comment: getcomment(); break; case jump_to: jumpto(); break; case change_oep: changeoep(); break; case save_database: savedb(); break; case load_database: loaddb(); break; case save_asm: savefile_text(hwnd,false,false); break; case block_saveasm: savefile_text(hwnd,false,true); break; case block_savetext: savefile_text(hwnd,true,true); break; case cm_decrypt: decrypterdialog(); break; case file_open: newfile(); break; case view_segment: segviewer(); break; case view_names: namesviewer(); break; case view_imports: importsviewer(); break; case view_exports: exportsviewer(); break; case view_xrefs: xrefsviewer(); break; case make_code: g_scheduler.addtask(user_makecode,priority_userrequest,nlptr,NULL); break; case make_dword: g_scheduler.addtask(user_makedword,priority_userrequest,nlptr,NULL); break; case float_single: g_scheduler.addtask(user_makesingle,priority_userrequest,nlptr,NULL); break; case float_double: g_scheduler.addtask(user_makedouble,priority_userrequest,nlptr,NULL); break; case float_longdouble: g_scheduler.addtask(user_makelongdouble,priority_userrequest,nlptr,NULL); break; case make_word: g_scheduler.addtask(user_makeword,priority_userrequest,nlptr,NULL); break; case make_string: g_scheduler.addtask(user_makestring,priority_userrequest,nlptr,NULL); break; case pascal_string: g_scheduler.addtask(user_pascalstring,priority_userrequest,nlptr,NULL); break; case uc_string: g_scheduler.addtask(user_ucstring,priority_userrequest,nlptr,NULL); break; case up_string: g_scheduler.addtask(user_upstring,priority_userrequest,nlptr,NULL); break; case dos_string: g_scheduler.addtask(user_dosstring,priority_userrequest,nlptr,NULL); break; case general_string: g_scheduler.addtask(user_generalstring,priority_userrequest,nlptr,NULL); break; case argover_dec: g_scheduler.addtask(user_argoverdec,priority_userrequest,nlptr,NULL); break; case arg_single: g_scheduler.addtask(user_argsingle,priority_userrequest,nlptr,NULL); break; case argover_hex: g_scheduler.addtask(user_argoverhex,priority_userrequest,nlptr,NULL); break; case argnegate: g_scheduler.addtask(user_argnegate,priority_userrequest,nlptr,NULL); break; case offset_dseg: g_scheduler.addtask(user_argoveroffsetdseg,priority_userrequest,nlptr,NULL); break; case argover_char: g_scheduler.addtask(user_argoverchar,priority_userrequest,nlptr,NULL); break; case undefine_line: g_scheduler.addtask(user_undefineline,priority_userrequest,nlptr,NULL); break; case undefine_lines: g_scheduler.addtask(user_undefinelines,priority_userrequest,nlptr,NULL); break; case undefine_lines_long: g_scheduler.addtask(user_undefinelines_long,priority_userrequest,nlptr,NULL); break; case block_undefine: g_scheduler.addtask(user_undefineblock,priority_userrequest,nlptr,NULL); break; case block_view: blockview(); break; case block_top: g_scheduler.addtask(user_marktopblock,priority_userrequest,nlptr,NULL); break; case block_bottom: g_scheduler.addtask(user_markbottomblock,priority_userrequest,nlptr,NULL); break; case line_jumpto: g_scheduler.addtask(user_jumpto,priority_userrequest,nlptr,NULL); break; case line_jumptoarg2: g_scheduler.addtask(user_jumptoarg2,priority_userrequest,nlptr,NULL); break; case Name_Location: namelocation(); break; case help_short: DialogBox(g_hInst,MAKEINTRESOURCE(help_shortcuts),hwnd,(DLGPROC)helpshortcuts); break; case help_about: DialogBox(g_hInst,MAKEINTRESOURCE(D_help_about),hwnd,(DLGPROC)habox); break; case Jump_Back: g_scheduler.addtask(user_jumpback,priority_userrequest,nlptr,NULL); break; case main_search: searchengine(); break; case search_again: searchmore(); break; case set_bg_color: g_options.bgcolor=choosecolour(g_options.bgcolor); GetClientRect(g_hMainWnd,&tmp_rect); InvalidateRect(g_hMainWnd,&tmp_rect,true); g_scheduler.addtask(windowupdate,priority_window,nlptr,NULL); break; case set_high_color: g_options.highcolor=choosecolour(g_options.highcolor); GetClientRect(g_hMainWnd,&tmp_rect); InvalidateRect(g_hMainWnd,&tmp_rect,true); g_scheduler.addtask(windowupdate,priority_window,nlptr,NULL); break; case set_text_color: g_options.textcolor=choosecolour(g_options.textcolor); GetClientRect(g_hMainWnd,&tmp_rect); InvalidateRect(g_hMainWnd,&tmp_rect,true); g_scheduler.addtask(windowupdate,priority_window,nlptr,NULL); break; case font_system: g_options.font=systemfont; setupfont(); break; case font_courier: g_options.font=courierfont; setupfont(); break; case font_courier10: g_options.font=courierfont10; setupfont(); break; case font_courier12: g_options.font=courierfont12; setupfont(); break; case font_ansi: g_options.font=ansifont; setupfont(); break; default: return DefWindowProc(hwnd,message,wParam,lParam); } break; case WM_CHAR: if(charinputenabled) switch(wParam) { case 'c': g_scheduler.addtask(user_makecode,priority_userrequest,nlptr,NULL); break; case 'C': g_scheduler.addtask(user_argoverchar,priority_userrequest,nlptr,NULL); break; case 'd': g_scheduler.addtask(user_makedword,priority_userrequest,nlptr,NULL); break; case 'D': g_scheduler.addtask(user_argoverdec,priority_userrequest,nlptr,NULL); break; case 'H': g_scheduler.addtask(user_argoverhex,priority_userrequest,nlptr,NULL); break; case '-': g_scheduler.addtask(user_argnegate,priority_userrequest,nlptr,NULL); break; case 'n': namelocation(); break; case ';': getcomment(); break; case 'o': g_scheduler.addtask(user_argoveroffsetdseg,priority_userrequest,nlptr,NULL); break; case 'p': g_scheduler.addtask(user_pascalstring,priority_userrequest,nlptr,NULL); break; case 's': g_scheduler.addtask(user_makestring,priority_userrequest,nlptr,NULL); break; case 'u': g_scheduler.addtask(user_undefineline,priority_userrequest,nlptr,NULL); break; case 'U': g_scheduler.addtask(user_undefinelines,priority_userrequest,nlptr,NULL); break; case 'w': g_scheduler.addtask(user_makeword,priority_userrequest,nlptr,NULL); break; case 't': g_scheduler.addtask(user_marktopblock,priority_userrequest,nlptr,NULL); break; case 'b': g_scheduler.addtask(user_markbottomblock,priority_userrequest,nlptr,NULL); break; default: break; } break; case WM_LBUTTONDOWN: dio.setpos(HIWORD(lParam)); break; case WM_RBUTTONDOWN: dio.setpos(HIWORD(lParam)); point.x=LOWORD(lParam); point.y=HIWORD(lParam); ClientToScreen(g_hMainWnd,&point); TrackPopupMenu(rmenu,0,point.x,point.y,0,g_hMainWnd,NULL); break; case WM_PAINT: if(!KillThread) DoPaint(hwnd,cxChar,cyChar); else PaintBack(hwnd); ValidateRect(g_hMainWnd,NULL); break; case WM_CLOSE: if(MessageBox(g_hMainWnd,"Are you sure that you want to exit Borg ?\n\rHit Yes To Exit\n\rHit No to Stay","Borg Disassembler", MB_ICONEXCLAMATION|MB_YESNO)==IDNO) break; g_scheduler.stopthread(); g_scheduler.addtask(quitborg,priority_quit,nlptr,NULL); KillThread=true; if(InThread) SetThreadPriority(ThreadHandle,THREAD_PRIORITY_TIME_CRITICAL); DestroyWindow(g_hMainWnd); return 0; case WM_DESTROY: save_reg_entries(); KillThread=true; killcount=0; Sleep(0); SetPriorityClass(ThreadHandle,HIGH_PRIORITY_CLASS); if(InThread) while(TestThread()) { killcount++; if(killcount>2) { // this is a nasty way of getting out. // sometimes the thread just will not exit nicely when its busy. if(TerminateThread(ThreadHandle,1)) { CloseHandle(ThreadHandle); break; } } } DeleteCriticalSection(&g_hCs); PostQuitMessage(0); break; case WM_SIZE: if(wParam==SIZE_MAXIMIZED) g_options.winmax=true; else if (wParam==SIZE_RESTORED) g_options.winmax=false; mainwndsize.top=0; mainwndsize.left=0; mainwndsize.right=LOWORD(lParam); mainwndsize.bottom=HIWORD(lParam); GetWindowRect(hwndStatusBar,&StatusWindowSize); GetWindowRect(g_hMainWnd,&mainwnd); MoveWindow(hwndStatusBar,0,mainwndsize.bottom-StatusWindowSize.bottom+StatusWindowSize.top, mainwndsize.right,StatusWindowSize.bottom-StatusWindowSize.top,true); break; case WM_MOUSEWHEEL: if (GET_KEYSTATE_WPARAM(wParam) & MK_SHIFT) { scrll.assign(0,GET_WHEEL_DELTA_WPARAM(wParam)/WHEEL_DELTA); g_scheduler.addtask(hscroll,priority_userrequest,scrll,NULL); } else { scrll.assign(0,-GET_WHEEL_DELTA_WPARAM(wParam)/WHEEL_DELTA); if(InThread) g_scheduler.addtask(scrolling,priority_userrequest,scrll,NULL); } break; case WM_VSCROLL: switch(LOWORD(wParam)) { case SB_TOP: break; case SB_BOTTOM: break; case SB_LINEUP: scrll.assign(0,-1); if(InThread) g_scheduler.addtask(scrolling,priority_userrequest,scrll,NULL); break; case SB_LINEDOWN: scrll.assign(0,1); if(InThread) g_scheduler.addtask(scrolling,priority_userrequest,scrll,NULL); break; case SB_PAGEUP: scrll.assign(0,-mainwndsize.bottom/cyChar+1); if(InThread) g_scheduler.addtask(scrolling,priority_userrequest,scrll,NULL); break; case SB_PAGEDOWN: scrll.assign(0,mainwndsize.bottom/cyChar-1); if(InThread) g_scheduler.addtask(scrolling,priority_userrequest,scrll,NULL); break; case SB_THUMBPOSITION: scrll.assign(0,HIWORD(wParam)); if(InThread) g_scheduler.addtask(vthumbposition,priority_userrequest,scrll,NULL); break; default: break; } break; case WM_HSCROLL: switch(LOWORD(wParam)) { case SB_LINEUP: scrll.assign(0,-1); g_scheduler.addtask(hscroll,priority_userrequest,scrll,NULL); break; case SB_LINEDOWN: scrll.assign(0,1); g_scheduler.addtask(hscroll,priority_userrequest,scrll,NULL); break; case SB_PAGEUP: scrll.assign(0,-8); g_scheduler.addtask(hscroll,priority_userrequest,scrll,NULL); break; case SB_PAGEDOWN: scrll.assign(0,8); g_scheduler.addtask(hscroll,priority_userrequest,scrll,NULL); break; case SB_THUMBPOSITION: scrll.assign(0,HIWORD(wParam)); if(InThread) g_scheduler.addtask(hthumbposition,priority_userrequest,scrll,NULL); break; default: break; } break; case WM_REPEATNAMEVIEW: namesviewer(); break; case WM_REPEATXREFVIEW: xrefsviewer(); break; // maximises window, used when the reg is read in at the start to maximise // the main window after initialisation of it case WM_MAXITOUT: ShowWindow(g_hMainWnd,SW_MAXIMIZE); break; case WM_CREATE: optionsinit(); hdc=GetDC(hwnd); SelectObject(hdc,GetStockObject(ANSI_FIXED_FONT)); GetTextMetrics(hdc,&tm); cxChar=tm.tmAveCharWidth; cyChar=tm.tmHeight+tm.tmExternalLeading; ReleaseDC(hwnd,hdc); InitializeCriticalSection(&g_hCs); hwndStatusBar=CreateStatusWindow(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|CCS_BOTTOM, "No File Loaded",hwnd,2); GetWindowRect(hwndStatusBar,&StatusWindowSize); GetWindowRect(g_hMainWnd,&mainwnd); SetScrollRange(hwnd,SB_VERT,0,VERTSCROLLRANGE,false); SetScrollPos(hwnd,SB_VERT,0,false); KillThread=false; InThread=false; rmenu=LoadMenu(g_hInst,MAKEINTRESOURCE(right_click_menu)); rmenu=GetSubMenu(rmenu,0); load_reg_entries(); setupfont(); break; case WM_KEYDOWN: if(!charinputenabled) break; switch(wParam) { case VK_HOME: SendMessage(hwnd,WM_VSCROLL,SB_TOP,0L); break; case VK_PRIOR: SendMessage(hwnd,WM_VSCROLL,SB_PAGEUP,0L); break; case VK_NEXT: SendMessage(hwnd,WM_VSCROLL,SB_PAGEDOWN,0L); break; case VK_DOWN: SendMessage(hwnd,WM_VSCROLL,SB_LINEDOWN,0L); break; case VK_UP: SendMessage(hwnd,WM_VSCROLL,SB_LINEUP,0L); break; case VK_LEFT: SendMessage(hwnd,WM_HSCROLL,SB_PAGEUP,0L); break; case VK_RIGHT: SendMessage(hwnd,WM_HSCROLL,SB_PAGEDOWN,0L); break; case VK_RETURN: if(GetKeyState(VK_SHIFT)&0x8000) g_scheduler.addtask(user_jumptoarg2,priority_userrequest,nlptr,NULL); else g_scheduler.addtask(user_jumpto,priority_userrequest,nlptr,NULL); break; case VK_ESCAPE: g_scheduler.addtask(user_jumpback,priority_userrequest,nlptr,NULL); break; case VK_F1: DialogBox(g_hInst,MAKEINTRESOURCE(help_shortcuts),hwnd,(DLGPROC)helpshortcuts); break; case VK_F3: searchmore(); break; default: break; } break; default: return DefWindowProc(hwnd,message,wParam,lParam); } return 0; }
void main(void) { int machno; /* entry to main pushed stuff onto the stack. */ // memset(edata, 0, (ulong)end-(ulong)edata); machno = getpir(); if (machno > 0) startcpu(machno); // dcrcompile(); if (dverify != 0x01020304) { uartlputs("data segment not initialised\n"); panic("data segment not initialised"); } if (bverify != 0) { uartlputs("bss segment not zeroed\n"); panic("bss segment not zeroed"); } mach0init(); archreset(); quotefmtinstall(); optionsinit("/boot/boot boot"); // archconsole(); meminit(); confinit(); mmuinit(); xinit(); /* xinit would print if it could */ trapinit(); qtminit(); ioinit(); uncinit(); printinit(); uartliteconsole(); mainmem->flags |= POOL_ANTAGONISM; mainmem->panic = mypanic; ethermedium.maxtu = 1512; /* must be multiple of 4 for temac's dma */ // print("\n\nPlan 9k H\n"); /* already printed by l.s */ plan9iniinit(); timersinit(); clockinit(); dma0init(); /* does not start kprocs; see init0 */ fpuinit(); procinit0(); initseg(); links(); chandevreset(); okprint = 1; /* only now can we print */ barriers(); dcflush((uintptr)&okprint, sizeof okprint); cpuidprint(); print("%d Hz clock", HZ); print("; memory size %,ud (%#ux)\n", (uint)memsz, (uint)memsz); pageinit(); swapinit(); userinit(); active.thunderbirdsarego = 1; dcflush((uintptr)&active.thunderbirdsarego, sizeof active.thunderbirdsarego); schedinit(); /* no return */ panic("schedinit returned"); }
void main(void) { // int i; extern char bdata[], edata[], end[], etext[]; static ulong vfy = 0xcafebabe; /* l.s has already printed "Plan 9 from Be" */ // m = mach; /* now done in l.s */ /* realign data seg; apparently -H0 -R4096 does not pad the text seg */ if (vfy != 0xcafebabe) { // wave('<'); wave('-'); memmove(bdata, etext, edata - bdata); } /* * once data segment is in place, always zero bss since we may * have been loaded by another Plan 9 kernel. */ memset(edata, 0, end - edata); /* zero BSS */ cacheuwbinv(); l2cacheuwbinv(); if (vfy != 0xcafebabe) panic("data segment misaligned"); vfy = 0; wave('l'); machinit(); mmuinit(); optionsinit("/boot/boot boot"); quotefmtinstall(); /* want plan9.ini to be able to affect memory sizing in confinit */ plan9iniinit(); /* before we step on plan9.ini in low memory */ trapinit(); /* so confinit can probe memory to size it */ confinit(); /* figures out amount of memory */ /* xinit prints (if it can), so finish up the banner here. */ delay(500); iprint("l Labs\n\n"); delay(500); xinit(); mainmem->flags |= POOL_ANTAGONISM /* | POOL_PARANOIA */ ; /* * Printinit will cause the first malloc call. * (printinit->qopen->malloc) unless any of the * above (like clockinit) do an irqenable, which * will call malloc. * If the system dies here it's probably due * to malloc(->xalloc) not being initialised * correctly, or the data segment is misaligned * (it's amazing how far you can get with * things like that completely broken). * * (Should be) boilerplate from here on. */ archreset(); /* configure clock signals */ clockinit(); /* start clocks */ timersinit(); watchdoginit(); delay(250); /* let uart catch up */ printinit(); // kbdenable(); cpuidprint(); // chkmissing(); procinit0(); initseg(); dmainit(); links(); conf.monitor = 1; screeninit(); chandevreset(); /* most devices are discovered here */ // i8250console(); /* too early; see init0 */ pageinit(); swapinit(); userinit(); schedinit(); }