#include <smi.h>
#include <pci-bother.h>
#include <serial.h>
+#include "traps.h"
#include "../net/net.h"
#include "vga-overlay.h"
+extern void smi_init();
#include "vm_flags.h"
-#include "pagetable.h"
void set_cr0(unsigned int);
void ps_switch_stack (void (*call)(), int stack);
set_cr0(get_cr0() | CR0_PG);
outb(0x80, 0x43);
+
if (!entry_initialized) {
- extern void __firstrun_start();
/* If needed, copy in data. */
for (bp = (void *)0x200000; (void *)bp < (void *)&_bss; bp++)
*bp = 0;
serial_init();
dolog("Paging enabled.");
- __firstrun_start(); /* Now initialize BSS, etc. */
+ }
+
+ traps_install();
+
+ if (!entry_initialized) {
+ smi_init();
entry_initialized = 1;
}