APIC implementation.
More...
#include <acpi/acpi.h>
#include <apic.h>
#include <assert.h>
#include <bsp.h>
#include <pic.h>
#include <rtems/score/idt.h>
|
void | apic_spurious_handler (void) |
|
bool | lapic_initialize (void) |
| Initializes the Local APIC by hardware and software enabling it.
|
|
uint32_t | lapic_timer_calc_ticks (uint64_t desired_freq_hz) |
| Calculates the number of Local APIC timer ticks which can be used with lapic_timer_enable to set up a timer of given frequency.
|
|
void | lapic_timer_enable (uint32_t reload_value) |
| Enables the Local APIC timer.
|
|
|
volatile uint32_t * | amd64_lapic_base |
|
◆ lapic_initialize()
bool lapic_initialize |
( |
void |
| ) |
|
Initializes the Local APIC by hardware and software enabling it.
Initializes the Local APIC by hardware and software enabling it, and sets up the amd64_lapic_base pointer that can be used as a 32-bit addressable array to access Local APIC registers.
- Returns
- true if successful.
◆ lapic_timer_calc_ticks()
uint32_t lapic_timer_calc_ticks |
( |
uint64_t |
desired_freq_hz | ) |
|
Calculates the number of Local APIC timer ticks which can be used with lapic_timer_enable to set up a timer of given frequency.
- Parameters
-
desired_freq_hz | The frequency in Hz. |
- Returns
- The number of Local APIC timer ticks.
◆ lapic_timer_enable()
void lapic_timer_enable |
( |
uint32_t |
reload_value | ) |
|
Enables the Local APIC timer.
- Parameters
-
reload_value | Number of ticks per interrupt. |