}
dump_pci_dev();
- asm("cli;hlt;");
}
typedef struct pci_info {
#pragma once
-void switch_printk_screen();
int printk(const char *fmtstr, ...);
int printd(const char *fmtstr, ...);
int printlo(unsigned int line, unsigned int offset, const char *fmtstr, ...);
printl(MPL_TITLE, " SYSTEM MONITOR");
printl(MPL_ROOTDEV, "root device %08x", system.root_dev);
- system_delay();
-
// setup_tasks();
setup_irqs();
void ide_init();
ide_init();
- while (1) {
- asm("sti;hlt;");
- }
- extern tty_t monitor_tty;
- // tty_switch(&monitor_tty);
- // asm("sti");
- // while (1) { /* code */
- // }
-
- return;
- // switch_printk_screen();
+ detect_cpu();
- // switch_printk_screen();
- system_delay();
+ printk(version);
- system_delay();
+ extern tty_t monitor_tty;
+ tty_switch(&monitor_tty);
- detect_cpu();
+ while (1) {
+ asm("sti;hlt;");
+ }
setup_fs();
-
- printk(version);
-
- // switch_printk_screen();
}
return 0;
}
-
-void system_delay() {
- unsigned long flags;
- irq_save(flags);
- unsigned int n = system.delay;
- while (n--) {
- unsigned long cr0;
- asm("movl %%cr0, %%eax;" : "=a"(cr0));
- asm("movl %%eax, %%cr0;" ::"a"(cr0));
- }
- irq_restore(flags);
-}
irq_restore(flags);
current_tty = tty;
+
+ tty_set_cursor(current_tty);
}
tty_t *current_tty;
\ No newline at end of file