Implemented a kinda broken tty

This commit is contained in:
Alex
2022-10-09 04:01:49 +03:00
parent e332fc57e0
commit 7c4d43fec3
11 changed files with 496 additions and 133 deletions

View File

@ -28,7 +28,7 @@ void tracepagetable(PageTable *pt)
for (int i = 0; i < 512; i++)
{
if (pt->Entries[i].Value.Present)
debug("Entry %d: %x %x %x %x %x %x %x %x %x %x %x %p-%#lx", i,
debug("Entry %03d: %x %x %x %x %x %x %x %x %x %x %x %p-%#lx", i,
pt->Entries[i].Value.Present, pt->Entries[i].Value.ReadWrite,
pt->Entries[i].Value.UserSupervisor, pt->Entries[i].Value.WriteThrough,
pt->Entries[i].Value.CacheDisable, pt->Entries[i].Value.Accessed,

View File

@ -118,6 +118,13 @@ namespace Memory
this->Unmap((void *)((uint64_t)VirtualAddress + (i * PAGE_SIZE)));
}
Virtual::Virtual(PageTable *Table) { this->Table = Table; }
Virtual::Virtual(PageTable *Table)
{
if (Table)
this->Table = Table;
else
this->Table = (PageTable *)CPU::PageTable();
}
Virtual::~Virtual() {}
}