OSDev.org
https://forum.osdev.org/

Silcos Initializer - usable on other kernel
https://forum.osdev.org/viewtopic.php?f=15&t=33046
Page 1 of 1

Author:  ShukantPal [ Sun Jul 01, 2018 3:33 am ]
Post subject:  Silcos Initializer - usable on other kernel

Hello Friends,

Maybe this may not be interesting for some - but for kernel newbies who have got a little comfortable writing code and want kernel modules along with the advantages without going into the complexity of building kernel module-loader (ELF dynamic-linker) may want to pay attention here!

Well, my kernel - the Silcos Kernel (@GitHub https://github.com/SukantPal/Silcos-Kernel) uses a initialization module - in the `/Initialization` directory. You don't need any type of configuration - other than using the grub.cfg file and listing your kernel, first - along with other secondary kernel modules after that. It will call the entry-pointer while linking.

Note that, it supports only IA32 architecture and relocates the kernel-modules to 0xC0000000 (3-GB). You'll need to enable paging carefully (for an example implementation of an kernel ontop of this initializer see the `/KernelHost` folder and go to `/Arch/IA32/Boot/Entry.S and Main.cpp`), and you won't be able to access global objects before doing so.

Other than that - this Initor module will pass on all information on the stack including - where the environment was loaded in physical memory, total size of segments, symbols, and all environment data, a global symbol table, string tables, the multiboot table, and even it will allocate page-frame entries for you physical memory allocator (well that can be disable if you declare a `sizeof_mmframe` macro with the value zero). In addition, at the end of the kernel environment, an AUTO_DAT buffer is provided of 32-KB size for storing page-tables and a stack - so you won't need any global objects before paging is enabled.

This kernel supports C++ although the KernelHost calls the constructors later on. See the Initor wiki - https://github.com/SukantPal/Silcos-Kernel/wiki/Initor for more information! Please give feedback on this!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/