Linking to a High Address

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shadrak

Linking to a High Address

Post by shadrak »

I want to link my kernel to a high address such as 0xC0000000, with the help of Tim's tutorial i have managed to load my kernel at 0x100000 but link it to 0xC0000000 with the GDT base being 0x40100000. The problem arises when i attempt to map 0x100000 to 0xC0000000, i get a crash and a bogus memory error (from bochs). I have been subtracting the base and what not from my pointers (not from global var addr's) and what not. So what could the problem be?
Anton

RE:Linking to a High Address

Post by Anton »

It seems that you are not talking about virtual memory, so ... How much ram do you have? 4G? You need to use virtual adresses to map memory at 0xC0000000, unless you realy have that much ram.
Anton.
shadrak

RE:Linking to a High Address

Post by shadrak »

No im talking about virtual memory, im using that base so my addresses will be ok UNTIL i map 0xC0000000 to 0x100000, (the virtual part) Thats where its getting messed up. (when i set the paging bit)
Post Reply