Import backup from 2003-11-03

This commit is contained in:
Josh Holtrop 2003-11-03 22:00:00 -05:00
parent ba97e8a7f0
commit 57980293e6
5 changed files with 14 additions and 3 deletions

View File

@ -107,6 +107,13 @@ inline void init_timer()
outportb(0x40, 0x2e); //msb
}
//Invalidates the page tables to re-cache the Translation Lookaside Buffer
/*inline void invlpg()
{
asm("invlpg");
}*/
//Signals an End Of Interrupt signal to the first PIC
inline void eoi()
{

View File

@ -21,6 +21,8 @@ inline void eoi();
inline void eoi2();
inline dword kernel_size();
inline void init_timer();
//inline void invlpg();

View File

@ -45,8 +45,8 @@ void k_init()
console_cls();
remap_pics(0x20, 0x28);
init_timer();
video_init((ModeInfoBlock *) 0x90306);
mm_init();
video_init((ModeInfoBlock *) 0x90306);
vmm_init();
mouse_init();
vmm_enable_paging();
@ -74,7 +74,7 @@ void isr(dword num)
{
case 0x20: // IRQ0 - timer interrupt
timer++;
(*(byte *)(0xb8000+3998))++;
(*(byte *)(0xb8000))++;
eoi();
break;
case 0x21: // IRQ1 - keyboard interrupt

View File

@ -18,6 +18,8 @@ void video_init(ModeInfoBlock *mib)
vid_ptr32 = (dword *) video_mode.PhysBasePtr;
}
vid_Buffer = mm_palloc((4*video_mode.XResolution*video_mode.YResolution)/4096+1, PID_KERNEL);
dword tot = ((video_mode.XResolution) * (video_mode.YResolution));
int a;
for (a = 0; a < tot; a++)

View File

@ -57,7 +57,7 @@ ModeInfoBlock video_mode;
byte *vid_ptr24;
word *vid_ptr16;
dword *vid_ptr32;
dword *vid_Buffer;