Need help with module loading.
Posted: Sat Jul 22, 2017 12:53 pm
Hi!
Im writing an x86 OS in C and NASM. So far I have done the bare bones such as:
- GDT
- IDT
- Console output
- Reading scancodes from keyboard
- Physical memory manager - bitmap based
- Paging with kernel being relocated to 3GB mark
- Kernel Heap, linked list based
My plan is to create a modular kernel where only core bits like the ones I have so far + scheduling and going into
userspace will be in the core of the kernel and rest such as filesystem drivers etc. will be loaded as modules using grub.
I've been reading around the subject a lot but I have a vague idea on how to approach it.
What I don't know is where to actually start. I know the modules I'll write will be separate from the kernel so they
(or the kernel) won't have idea of eachother - for that I presume I'll need the kernel symbol table to somehow magically
link the two together once the kernel and modules are being loaded by grub.
I do know Im not being specific here but at this stage Im uncertain if the things I ask about are even making sense
to people that are experienced with this.
Could anyone explain this a bit more to me? Specifically if my assumptions on how this should be done are
remotely correct.
Thanks!
Im writing an x86 OS in C and NASM. So far I have done the bare bones such as:
- GDT
- IDT
- Console output
- Reading scancodes from keyboard
- Physical memory manager - bitmap based
- Paging with kernel being relocated to 3GB mark
- Kernel Heap, linked list based
My plan is to create a modular kernel where only core bits like the ones I have so far + scheduling and going into
userspace will be in the core of the kernel and rest such as filesystem drivers etc. will be loaded as modules using grub.
I've been reading around the subject a lot but I have a vague idea on how to approach it.
What I don't know is where to actually start. I know the modules I'll write will be separate from the kernel so they
(or the kernel) won't have idea of eachother - for that I presume I'll need the kernel symbol table to somehow magically
link the two together once the kernel and modules are being loaded by grub.
I do know Im not being specific here but at this stage Im uncertain if the things I ask about are even making sense
to people that are experienced with this.
Could anyone explain this a bit more to me? Specifically if my assumptions on how this should be done are
remotely correct.
Thanks!