Max OS 0.3
Loading...
Searching...
No Matches
apic.h File Reference

Defines classes and structures for handling the Advanced Programmable Interrupt Controller (APIC) in a multiprocessor system. More...

#include <common/macros.h>
#include <hardwarecommunication/port.h>
#include <hardwarecommunication/acpi.h>
#include <memory/physical.h>

Go to the source code of this file.

Classes

class  MaxOS::hardwarecommunication::LocalAPIC
 Handles the local APIC for the current core. More...
 
struct  MaxOS::hardwarecommunication::MADT
 Multiple APIC Description Table (MADT) (ACPI 2 or higher). Provides information about the APICs in the system. Following this header are multiple entries describing the APICs (see MADTEntry). More...
 
struct  MaxOS::hardwarecommunication::MADTEntry
 An item in the MADT table. More...
 
struct  MaxOS::hardwarecommunication::MADT_IO_APIC
 An entry in the MADT table describing an IO APIC. More...
 
struct  MaxOS::hardwarecommunication::MADT_PROCESSOR_APIC
 An entry in the MADT table describing a processor local APIC. More...
 
union  MaxOS::hardwarecommunication::RedirectionEntry
 An IO APIC redirection entry. Describes how an interrupt is routed. More...
 
struct  MaxOS::hardwarecommunication::RedirectionEntry::PACKED
 Packed because the bitfields should be one uint64_t together. More...
 
struct  MaxOS::hardwarecommunication::InterruptRedirect
 Defines how an interrupt input is redirected to a specific processor via the I/O APIC. More...
 
struct  MaxOS::hardwarecommunication::Override
 Specifies how a specific interrupt source is mapped to a global system interrupt. More...
 
class  MaxOS::hardwarecommunication::IOAPIC
 Handles the IO APIC in the system (one per system) More...
 
class  MaxOS::hardwarecommunication::AdvancedProgrammableInterruptController
 Handles both the Local APIC (boot core) and IO APIC. More...
 

Typedefs

typedef struct PACKED MaxOS::hardwarecommunication::MADT MaxOS::hardwarecommunication::madt_t
 Alias for MADT struct.
 
typedef struct PACKED MaxOS::hardwarecommunication::MADTEntry MaxOS::hardwarecommunication::madt_entry_t
 Alias for MADTEntry struct.
 
typedef struct PACKED MaxOS::hardwarecommunication::MADT_IO_APIC MaxOS::hardwarecommunication::madt_io_apic_t
 Alias for MADT_IO_APIC struct.
 
typedef struct PACKED MaxOS::hardwarecommunication::MADT_PROCESSOR_APIC MaxOS::hardwarecommunication::madt_processor_apic_t
 Alias for MADT_PROCESSOR_APIC struct.
 
typedef union MaxOS::hardwarecommunication::RedirectionEntry MaxOS::hardwarecommunication::redirection_entry_t
 Alias for RedirectionEntry union.
 
typedef struct MaxOS::hardwarecommunication::InterruptRedirect MaxOS::hardwarecommunication::interrupt_redirect_t
 Alias for InterruptRedirect struct.
 
typedef struct PACKED MaxOS::hardwarecommunication::Override MaxOS::hardwarecommunication::override_t
 Alias for Override struct.
 

Enumerations

enum class  MaxOS::hardwarecommunication::MADT_TYPE {
  PROCESSOR_APIC , IO_APIC , INTERRUPT_SOURCE_OVERRIDE , NMI_SOURCE ,
  APIC_NMIS , APIC_ADDRESS_OVERRIDE , PROCESSOR_X2APIC
}
 The types of MADT entries. More...
 
enum  MaxOS::hardwarecommunication::DeliveryMode {
  FIXED = 0 , LOWEST_PRIORITY = 1 , SMI = 2 , NMI = 4 ,
  INIT = 5 , EXTINT = 7
}
 How the interrupt should be delivered (can it override others etc). Set fixed/lowest priority for normal interrupts. More...
 

Detailed Description

Defines classes and structures for handling the Advanced Programmable Interrupt Controller (APIC) in a multiprocessor system.

Date
18th January 2024
Author
Max Tyson

Definition in file apic.h.

Typedef Documentation

◆ madt_io_apic_t

Alias for MADT_IO_APIC struct.

Todo:
Rename for consistency

Enumeration Type Documentation

◆ DeliveryMode

How the interrupt should be delivered (can it override others etc). Set fixed/lowest priority for normal interrupts.

Todo:
use this

Definition at line 146 of file apic.h.

146 {
147 FIXED = 0,
148 LOWEST_PRIORITY = 1,
149 SMI = 2,
150 NMI = 4,
151 INIT = 5,
152 EXTINT = 7,
153 };

◆ MADT_TYPE

The types of MADT entries.

Definition at line 77 of file apic.h.

77 {
78 PROCESSOR_APIC,
79 IO_APIC,
80 INTERRUPT_SOURCE_OVERRIDE,
81 NMI_SOURCE,
82 APIC_NMIS,
83 APIC_ADDRESS_OVERRIDE,
84 PROCESSOR_X2APIC,
85 };