Import backup from 2004-05-22

This commit is contained in:
josh committed 2017-07-25 22:23:46 -04:00
1 parent 6b6e19effd
commit a982312d2c
11 files changed
+225 -170

No files matched your search

+1 -11
View File
@@ -6,10 +6,8 @@
#include "hos_defines.h"
#include "vmm.h"
#include "video/video.h"
#include "asmfuncs.h"
#include "mm/mm.h"
#include "video/stdfont.h"
HeapEntry *firstHeapEntry = (HeapEntry *)0xD0000000; //this is where heap memory starts
@@ -21,15 +19,7 @@ void vmm_init()
pageTables[0x3FF] = 0x104000|0x03; //the last page directory entry points to the page directory itself
pageTables[0] = 0;
invlpg_(0);
if (video_Mode()) //we are in a graphical mode
{
unsigned int vidPages = video_getWidth() * video_getHeight() * (video_getBitsPerPixel() >> 3);
if (vidPages % 4096)
vidPages = (vidPages >> 12) + 1;
else
vidPages = (vidPages >> 12);
vmm_mapn(0xF0000000, video_getPhysBasePtr(), vidPages);
}
unsigned int firstHeapEntryBlock = (unsigned int)mm_palloc();
vmm_map1((unsigned int)firstHeapEntry, firstHeapEntryBlock);
HeapEntryBlock *heb = (HeapEntryBlock *)firstHeapEntry;