Microkernel loading
Microkernel loading
I will make a microkernel, but my problem is now how I load it without using GRUB? I need a loader which can handle the HDD and some filesystems. My Problem is that I have to load all servers and all modules. But I think that this is to much overhead! How do a "normal" microkernel os load its servers and modules?
Re:Microkernel loading
Well, you've got HDD support in the BIOS, for a start. And simple read-only FS support is not difficult. If you want, you can embed the sector numbers of the files your OS needs inside the loader itself; this is how LILO works on ext2.
Really this process is no different between microkernels and monolithic ones.
Really this process is no different between microkernels and monolithic ones.
Re:Microkernel loading
The problem that I see is that I have to switch between PMode and RMode for every file and for every file which is bigger than 640KiB, too. I haven?t started yet with programing the HDD in PMode. Is this hard to do? Because this would be another option I have, but this is something I wont do now!
Re:Microkernel loading
No, just do as every other OS loader does, and stay in real mode. Load all the files into memory using the BIOS, switch to protected mode, then JMP to the kernel entry point.
Re:Microkernel loading
The problem is that the kernel, the servers and all modules will be over 1MiB and so I need to move it behind 1MiB. But I will see how I will have look now at the V2OS source.
Re:Microkernel loading
for each file to load
read 64kb
switch to pmode.
copy into into place in upper memory
switch to rmode
loop
how hard is that?
read 64kb
switch to pmode.
copy into into place in upper memory
switch to rmode
loop
how hard is that?
-- Stu --
Re:Microkernel loading
You don't even need to switch back and forth to copy the data to upper memory. You could use the INT 15h extended memory services, or switch to unreal mode when your loader starts and use A32 REP MOVSD or the like to copy.
Really, this has all been done before, and it's no different whether you're using a microkernel or not. The boot loader is definitely the wrong place to get stuck on when writing an OS.
Really, this has all been done before, and it's no different whether you're using a microkernel or not. The boot loader is definitely the wrong place to get stuck on when writing an OS.
Re:Microkernel loading
you're going to make a microkernel of over a megabyte? You might want to think your design over again. I would start by thinking up a boot procedure that has a driver for filesystems, and the core kernel you intend to make (which in case of a true microkernel IS the entire kernel). That should fit in 128KB, let alone 1MB.FlashBurn wrote: The problem is that the kernel, the servers and all modules will be over 1MiB and so I need to move it behind 1MiB. But I will see how I will have look now at the V2OS source.
And, putting only that in your startup code will simply make the problem disappear. You do not need a full OS to load an HDD driver.
Re:Microkernel loading
I need to load the storage server with all modules and I need also the modules of the kernel and I think that this all together will be over 1MiB! But I give the unreal-mode a try.
Re:Microkernel loading
To get a microkernel running, you'll need to load:
- The microkernel (small, by definition)
- A file system driver, e.g. FAT
- A storage device driver, e.g. ATA