OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Nov 14, 2018 2:08 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Silcos Initializer - usable on other kernel
PostPosted: Sun Jul 01, 2018 3:33 am 
Offline

Joined: Tue Dec 12, 2017 6:51 am
Posts: 23
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group