RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Functions | Variables
apic.c File Reference

APIC implementation. More...

#include <acpi/acpi.h>
#include <apic.h>
#include <assert.h>
#include <bsp.h>
#include <pic.h>
#include <rtems/score/idt.h>

Functions

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.
 

Variables

volatile uint32_t * amd64_lapic_base
 

Detailed Description

APIC implementation.

Function Documentation

◆ 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_hzThe 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_valueNumber of ticks per interrupt.