1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

All of the initrd is now loaded.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-08-07 01:30:47 +02:00
parent 794630a802
commit 294e5d72dd

View file

@ -255,12 +255,12 @@ namespace Sortix
{
addr_t loadat = 0x400000UL;
#ifdef PLATFORM_VIRTUAL_MEMORY
ASSERT(initrdsize <= 4096);
addr_t apppage = Page::Get();
VirtualMemory::MapUser(loadat, apppage);
#endif
for ( size_t i = 0; i < initrdsize; i += 4096 )
{
addr_t apppage = Page::Get();
if ( apppage == 0 ) { Panic("kernel.cpp: not enough memory for initrd!"); }
VirtualMemory::MapUser(loadat + i, apppage);
}
Memory::Copy((void*) loadat, initrd, initrdsize);
initstart = (Thread::Entry) loadat;