Does your kernel load binaries, or is it all just compiled into one blob, like the latter example in your first link says?
If you load binaries, you could either use relocatable code, or you could use paging and have protection. Paging has some other benefits too.
If the latter, all the paging you can do is only for the kernel, so it's as if there is no paging in the first place. unless you decide, you want to not see certain memory areas. But I don't see a big reason for that. Also, mapping your kernel somewhere else than the physical address will only complicate things, so it's either identity mapping, optionally with some areas you don't wanna see unmapped, or none at all, I suggest.
It depends on your wishes, but I would say, that processes should have their own address spaces. But then again, I don't even like the megalithic kernel approach.
Good luck.
Edit: And about the GDT. I'm not sure I understand you, but you should set up all the GDT entries, except the null one, from 0 to 0xFFFFFFFF. That's all the (possible) 4gb of memory.
Here's how I do it in my (kinda) bootloader:
Code: Select all
start:
; Set up GDT so we can enter Protected Mode.
lgdt [gdt]
gdt:
; Null descriptor + GDT self-descriptor in one to save 6 bytes. =)
dw 23
dd gdt
db 00000000b
db 00000000b
; Code descriptor.
db 11111111b ; Limit low.
db 11111111b ; Limit low.
db 00000000b ; Base low.
db 00000000b ; Base low.
db 00000000b ; Base middle.
db 10011010b ; Access.
db 11001111b ; Granularity.
db 00000000b ; Base high.
; Data descriptor.
db 11111111b ; Limit low.
db 11111111b ; Limit low.
db 00000000b ; Base low.
db 00000000b ; Base low.
db 00000000b ; Base middle.
db 10010010b ; Access.
db 11001111b ; Granularity.
db 00000000b ; Base high.
I think this may need editing when I enter user space, but for now and for you it should do (such a poet).