Should I handle local interrupt pins?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
austanss
Member
Member
Posts: 377
Joined: Sun Oct 11, 2020 9:46 pm
Location: United States

Should I handle local interrupt pins?

Post by austanss »

Should I handle interrupts arising from the LINT0/LINT1 pins? Or should I (when not specified to set as NMI) just set them to external interrupt 0? Should I handle the spurious interrupt / local interrupt triggers? Do they ever arise at all?
Skylight: https://github.com/austanss/skylight

I make stupid mistakes and my vision is terrible. Not a good combination.

NOTE: Never respond to my posts with "it's too hard".
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Should I handle local interrupt pins?

Post by Korona »

Do what the MADT demands and/or what the BIOS configured.

LINT0/LINT1 are usually used to (1) connect the legacy PIC to the local APIC via ExINT delivery mode, and to (2) route NMIs or SMIs to the local APIC.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
User avatar
austanss
Member
Member
Posts: 377
Joined: Sun Oct 11, 2020 9:46 pm
Location: United States

Re: Should I handle local interrupt pins?

Post by austanss »

So don't configure the LINTs myself. Got it. Use the MADT and let the firmware do the rest.
Skylight: https://github.com/austanss/skylight

I make stupid mistakes and my vision is terrible. Not a good combination.

NOTE: Never respond to my posts with "it's too hard".
nullplan
Member
Member
Posts: 1790
Joined: Wed Aug 30, 2017 8:24 am

Re: Should I handle local interrupt pins?

Post by nullplan »

You can only handle an interrupt if you know what caused the interrupt. This is true for all interrupts, LAPIC or not. Therefore you can only handle LINT0 and LINT1 once you know what they mean.
Carpe diem!
Post Reply