Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Conversation

MEMESCOEP
Copy link
Contributor

I've added the following options to HAL2.Global.Init:

  • InitSerial
  • InitPCI
  • InitACPI
  • Init AHCI

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.

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.
@MishaProductions
Copy link
Contributor

I think that the better approach would be to move everything from Global.Init to the project template.

@MEMESCOEP
Copy link
Contributor Author

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

@MishaProductions
Copy link
Contributor

I meant to move it to Kernel.BeforeRun()

@MEMESCOEP
Copy link
Contributor Author

MEMESCOEP commented Jul 17, 2023

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?

@quajak
Copy link
Member

quajak commented Jul 17, 2023

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.

@MEMESCOEP
Copy link
Contributor Author

MEMESCOEP commented Jul 19, 2023

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?

@quajak
Copy link
Member

quajak commented Jul 22, 2023

how would we implement this though? Maybe a function that can be overridden?

Yeah, that is what I was thinking

@Kiirx
Copy link
Contributor

Kiirx commented Jul 24, 2023

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

@Kiirx
Copy link
Contributor

Kiirx commented Jul 24, 2023

PS/2 driver, ac97 (dont really remember the name)... you get the point

@Kiirx
Copy link
Contributor

Kiirx commented Jul 24, 2023

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

@zarlo
Copy link
Member

zarlo commented Jul 25, 2023

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

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

@quajak
Copy link
Member

quajak commented Jul 30, 2023

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?

@MEMESCOEP MEMESCOEP closed this by deleting the head repository Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants