Citadel Design... so far.
Posted: Mon May 22, 2006 8:01 pm
Hey all, Im Zeii! *waves*
Im the enigmatic coffee-slurping cigarette snarfing codemonkey that youll see lurking around here often.
Anywho, onto my project - which I have codenamed Citadel.
Ive written a basic Monolithic Citadel kernel, it has basic Exception handling, aswell as being in Protected mode.
It can output text in protected mode, including translating Integer and Hexidecimal numbers into Strings for output.
Anywho, the point im trying to get to is quite simply this...
I dont think my current setup and design is very good.
*screws up Citadel Design A, throws into Cyberspace*
*gets paper, entitled Citadel Design B*
Im going to write a much more advanced bootloader,
this time - I want it to enter protected mode, and setup a decent GDT list.
Im yet to research the GDT fully.
However, Id appreciate it if anyone would explain why there should be a GDT entry for Interrupts?
anywho, onwards.
The bootloader will also establish a basic filesystem (probably Fat12/32 or something).
I want to make a Microkernel.
From research (mainly Wikipedia and OS FAQ), A Microkernel only supplies 'basic' (I use that word... sarcasticly) services.
Thread control, Memory management, Inter process communication?
The rest, apparently, is all done outside of Kernel code through Servers. Obviously, I want my kernel to eventually be Multitasking.
So, for the next couple days these are my goals:
- A new bootloader.
- Bootloader will detect if the floppy-sector-read fails,
(due to lack of floppy disk in the drive, or just a random
read error.
- Setup a 'real' GDT table.
- Null Selector?
- Code Selector?
- Data Selector?
- Interrupt Selector?
- TSS Selector?
- Im not sure what else I need, If someone would
mind teaching me about the other selectors, id be
grateful.
- Maybe setup a LDT?
- Setup a basic filesystem, Im planning on implementing
something I can mount from within Linux.
This is for several reasons, first off - I want to be able
to update the Kernel simply by dragging KERNEL.BIN onto
the floppy. Also, I want to have basic filesystem support
so I can say 'load kernel', then once thats loaded, the
Kernel can simply say 'load XXX server'
Im not entirely sure what functions I should have in the kernel_main(), but I know I need to implement:
kmalloc / kfree
kmemset / kmemcpy
kprintf
ksetcursor
kclrscr
koutportb
kinportb
In order to implement Printf, Ill need to implement a Variable Argument list system. More research!
Anyone interested and would mind helping - what other in kernel functions should I have?
Keyboard input, etc - will be done by the Input Server.
Basically, I wouldnt mind making something along the lines of BeOS, but... simpler.
It doenst matter if its slow... this is primarily a learning excersize.
Thanks!
~zeii
PS: My hotmail is : [email protected].
If you have MSN, and would like to talk to me in real time, feel free to add me!
Im the enigmatic coffee-slurping cigarette snarfing codemonkey that youll see lurking around here often.
Anywho, onto my project - which I have codenamed Citadel.
Ive written a basic Monolithic Citadel kernel, it has basic Exception handling, aswell as being in Protected mode.
It can output text in protected mode, including translating Integer and Hexidecimal numbers into Strings for output.
Anywho, the point im trying to get to is quite simply this...
I dont think my current setup and design is very good.
*screws up Citadel Design A, throws into Cyberspace*
*gets paper, entitled Citadel Design B*
Im going to write a much more advanced bootloader,
this time - I want it to enter protected mode, and setup a decent GDT list.
Im yet to research the GDT fully.
However, Id appreciate it if anyone would explain why there should be a GDT entry for Interrupts?
anywho, onwards.
The bootloader will also establish a basic filesystem (probably Fat12/32 or something).
I want to make a Microkernel.
From research (mainly Wikipedia and OS FAQ), A Microkernel only supplies 'basic' (I use that word... sarcasticly) services.
Thread control, Memory management, Inter process communication?
The rest, apparently, is all done outside of Kernel code through Servers. Obviously, I want my kernel to eventually be Multitasking.
So, for the next couple days these are my goals:
- A new bootloader.
- Bootloader will detect if the floppy-sector-read fails,
(due to lack of floppy disk in the drive, or just a random
read error.
- Setup a 'real' GDT table.
- Null Selector?
- Code Selector?
- Data Selector?
- Interrupt Selector?
- TSS Selector?
- Im not sure what else I need, If someone would
mind teaching me about the other selectors, id be
grateful.
- Maybe setup a LDT?
- Setup a basic filesystem, Im planning on implementing
something I can mount from within Linux.
This is for several reasons, first off - I want to be able
to update the Kernel simply by dragging KERNEL.BIN onto
the floppy. Also, I want to have basic filesystem support
so I can say 'load kernel', then once thats loaded, the
Kernel can simply say 'load XXX server'
Im not entirely sure what functions I should have in the kernel_main(), but I know I need to implement:
kmalloc / kfree
kmemset / kmemcpy
kprintf
ksetcursor
kclrscr
koutportb
kinportb
In order to implement Printf, Ill need to implement a Variable Argument list system. More research!
Anyone interested and would mind helping - what other in kernel functions should I have?
Keyboard input, etc - will be done by the Input Server.
Basically, I wouldnt mind making something along the lines of BeOS, but... simpler.
It doenst matter if its slow... this is primarily a learning excersize.
Thanks!
~zeii
PS: My hotmail is : [email protected].
If you have MSN, and would like to talk to me in real time, feel free to add me!