higher-half-kernel memory addresses

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
sebihepp
Member
Member
Posts: 195
Joined: Tue Aug 26, 2008 11:24 am
GitHub: https://github.com/sebihepp

higher-half-kernel memory addresses

Post by sebihepp »

Hello,

if I use a higher half kernel, does that mean the virtual address ist above 0xC000 0000 or does
it mean the physical address is above 0xC000 0000? And first the GDT is applied to the addresses and
then paging, right?

TIA Sebihepp
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: higher-half-kernel memory addresses

Post by AJ »

sebihepp wrote:if I use a higher half kernel, does that mean the virtual address ist above 0xC000 0000 or does it mean the physical address is above 0xC000 0000?
It generally refers to virtual memory addresses. The lower half of the virtual memory space is often then exchanged depending on the running process. Also, it doesn't have to be 0xC0000000. For example, Windows uses 0x80000000 by default (with an 0xC0000000 option), IIRC.
And first the GDT is applied to the addresses and then paging, right?
If you are referring to the GDT segment base trick, you don't have to use that. If you use a suitable boot loader, you could get the boot loader to set up flat segmentation and use paging to place the kernel at the 3GiB mark. You can then jump directly to the kernel entry point without having to worry about segments (you'll still need an accessible GDT for when you start multitasking).

Cheers,
Adam
sebihepp
Member
Member
Posts: 195
Joined: Tue Aug 26, 2008 11:24 am
GitHub: https://github.com/sebihepp

Re: higher-half-kernel memory addresses

Post by sebihepp »

Okay, thanks.

And I didn't refer to the GDT-trick.^^ I just asked, because I want to use one
GDT entry for a flat memory modell and then one for each driver, one for the kernel
and one for an application that should be run (But that's the future =) ).
And there will definitly be no multi tasking in my OS. That's some stuff for the future...

Cheers,
Sebihepp
Post Reply