3 #include <video_defines.h>
6 #include <pci-bother.h>
7 #include "../net/net.h"
8 #include "vga-overlay.h"
10 #include "pagetable.h"
12 unsigned int counter = 0;
13 unsigned int lastctr = 0;
14 unsigned long pcisave;
15 unsigned char vgasave;
17 void set_cr0(unsigned int);
21 register unsigned int _temp__; \
22 asm volatile("mov %%cr0, %0" : "=r" (_temp__)); \
27 #define set_cr3(value) \
29 register unsigned int _temp__ = (value); \
30 asm volatile("mov %0, %%cr3" : : "r" (_temp__)); \
32 #define CR0_PG 0x80000000
44 char * pagedir = pt_setup(0xA0000);
46 set_cr3((int)pagedir);
50 set_cr0(get_cr0() | CR0_PG);
61 sprintf(statstr, "15-412! %08x %08x", smi_status(), counter);
62 strblit(statstr, 0, 0);
69 if (inl(0x840) & 0x1000)
87 void timer_handler(smi_event_t ev)
89 static unsigned int ticks = 0;
91 smi_disable_event(SMI_EVENT_FAST_TIMER);
92 smi_enable_event(SMI_EVENT_FAST_TIMER);
94 outb(0x80, (ticks++) & 0xFF);
100 void __firstrun_start() {
104 smi_register_handler(SMI_EVENT_FAST_TIMER, timer_handler);
105 smi_enable_event(SMI_EVENT_FAST_TIMER);