i have a question. I've tried to set up Paging in my Kernel and i've mapped my physical Kernel location (1mb, 0x100000) to virtual 3gb (0xc0000000). Everything is fine with it, but then i want to have my stack pointer 4 bytes below the virtual kernel position at 0xbffffffc. So i allocate another 4mb in my physical memory manager and create a new page table and add it to my page directory at the 0xbfc00000 location so it maps the allocated 4mb from 0xbfc00000 to 0xc0000000. When i try to write a simple value to all of the 4mb to test it, it works, like so:
Code: Select all
uint32_t* test = (uint32_t *) 0xBFC00000;
for(int i = 0; i < (1024 * 1024); i++)
{
*test = 123456;
}
Code: Select all
for(int i = 0; i < (1024 * 1024); i++)
{
_asm push eax
}