microkernel icon indicating copy to clipboard operation
microkernel copied to clipboard

[build] Feature Switch to Enable PIC Support

Open ppenna opened this issue 6 months ago • 2 comments

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.

https://github.com/nanvix/kernel/blob/cc7d169cacb92f5cf97c7e1700222de7579ab930/src/hal/mod.rs#L77-L85

ppenna avatar Aug 25 '24 16:08 ppenna