Higher half and kernel linking

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.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Higher half and kernel linking

Post by Owen »

Seriously... Just have the PMM temporarily map them as it needs them. The code to do so is pretty trivial, and far easier than screwing around with calling functions linked at a completely different address.

Its code you're going to need anyway.
User avatar
Rusky
Member
Member
Posts: 792
Joined: Wed Jan 06, 2010 7:07 pm

Re: Higher half and kernel linking

Post by Rusky »

Ah yeah, good point.

So at this point I'm starting by mapping the kernel with position-independent/lower-half code that doesn't call any library functions, then mapping the multiboot structures as the PMM reads them, and running the rest of the initialization code for the GDT, IDT, etc. with paging enabled.
Post Reply