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 = 0;
15 unsigned char vgasave = 0;
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
47 sprintf(statstr, "15-412! %08x %08x", smi_status(), counter);
49 strblit(statstr, 0, 0);
56 if (inl(0x840) & 0x1000)
74 void timer_handler(smi_event_t ev)
76 static unsigned int ticks = 0;
78 smi_disable_event(SMI_EVENT_FAST_TIMER);
79 smi_enable_event(SMI_EVENT_FAST_TIMER);
81 outb(0x80, (ticks++) & 0xFF);
87 void __firstrun_start() {
91 smi_register_handler(SMI_EVENT_FAST_TIMER, timer_handler);
92 smi_enable_event(SMI_EVENT_FAST_TIMER);