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

[build] Feature Switch to Enable PIC Support #432

Open
ppenna opened this issue Aug 25, 2024 · 4 comments
Open

[build] Feature Switch to Enable PIC Support #432

ppenna opened this issue Aug 25, 2024 · 4 comments
Labels
enhancement Enhancement Request on an Existing Feature good first issue Good for Newcomers

Comments

@ppenna
Copy link
Contributor

ppenna commented Aug 25, 2024

Description

Currently we employ a best-effort strategy to enable the PIC at startup time:

  • If LAPIC is supported, we try to initialize it.
  • If we fail, or if LAPIC is not supported, we try to enable the 8259 PIC.
  • If we fail, we turn off PIC support.

We should have a feature switch that disables PIC support at build time, to avoid higher startup times on platforms that don't support interrupts at all.

Code Snippets

The code snippet bellows points to where we first detect that interrupts are not supported.

kernel/src/hal/mod.rs

Lines 77 to 85 in cc7d169

// Initialize the interrupt manager.
let intman: InterruptManager = match platform.arch.controller.take() {
Some(controller) => InterruptManager::new(controller)?,
None => {
let reason: &str = "no interrupt controller found";
error!("{}", reason);
return Err(Error::new(ErrorCode::NoSuchDevice, reason));
},
};

@ppenna ppenna added enhancement Enhancement Request on an Existing Feature good first issue Good for Newcomers labels Aug 25, 2024
@lemosep
Copy link
Member

lemosep commented Aug 30, 2024

The feature must be pushed added into the cc7d169 branch?

@ppenna
Copy link
Contributor Author

ppenna commented Aug 30, 2024

The feature must be pushed added into the cc7d169 branch?

No. Every PR should be opened towards latest dev branch. Permalink was used to link the concerned code-snippet here.

@ppenna
Copy link
Contributor Author

ppenna commented Sep 21, 2024

@lemosep are you working on this issue?

@ppenna
Copy link
Contributor Author

ppenna commented Oct 1, 2024

Removed previous asignees due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement Request on an Existing Feature good first issue Good for Newcomers
Projects
None yet
Development

No branches or pull requests

2 participants