-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more options for global init #2727
Conversation
I've added the following options: * InitSerial * InitPCI * InitACPI * Init AHCI This gives more control to the developer because they can now disable certain drivers and initialization steps. This may be helpful when certain drivers aren't needed, or the developer is writing their own.
I think that the better approach would be to move everything from Global.Init to the project template. |
That could work, but then we'd have a bunch of checkboxes everywhere. Unless we find a different way of course |
I meant to move it to Kernel.BeforeRun() |
Does that mean calling every init function in Kernel.BeforeRun() instead of global.init? I don't really see any advantages. Would we have to make new functions for each initialization step? |
I think the idea is that we provide a initialise function, which anyone can then implement themselves if they want to change it. Rather than using this flag based approach. |
how would we implement this though? Maybe a function that can be overridden? |
Yeah, that is what I was thinking |
Would be better like that but please add so that we can do this with every part of cosmos, even the vga screen so that we can really just initialise what is only needed for the user |
PS/2 driver, ac97 (dont really remember the name)... you get the point |
Or we can make it a List and then use foreach to execute all of them (so the type would be Action) https://learn.microsoft.com/en-us/dotnet/api/system.action?view=net-7.0 |
that can already be done you can override the virtual method in your Kernel (OnBoot, Start or GetTextScreen in the case of vga screen) or you can make a plug to override what cosmos does |
Then is there any reason to add more configuration options? |
I've added the following options to
HAL2.Global.Init
:This gives more control to the developer because they can enable/disable certain drivers and initialization steps, which may be helpful when certain drivers/devices/features aren't needed, or the developer is writing their own.