39 LOG_INFO(
"other cpus already started\n");
52 LOG_INFO(
"bootstrap cpu already started\n");
#define assert(expression)
void interrupt_disable(void)
Disable interrupts and increment the disableDepth.
void interrupt_enable(void)
Decrement the CLI depth and enable interrupts if depth reaches zero and interrupts were previously en...
static cpu_t * cpu_get_unsafe(void)
Gets the current CPU structure without disabling interrupts.
static uint16_t cpu_amount(void)
Gets the number of identified CPUs.
#define CPU_ID_BOOTSTRAP
ID of the bootstrap CPU.
NORETURN void panic(const interrupt_frame_t *frame, const char *format,...)
Panic the kernel, printing a message and halting.
#define LOG_INFO(format,...)
#define LOG_DEBUG(format,...)
void * vmm_alloc(space_t *space, void *virtAddr, size_t length, pml_flags_t pmlFlags, vmm_alloc_flags_t allocFlags)
Allocates and maps virtual memory in a given address space.
@ VMM_ALLOC_OVERWRITE
If any page is already mapped, overwrite the mapping.
#define MODULE_INFO(_name, _author, _description, _version, _licence, _deviceTypes)
Macro to define module information.
#define NULL
Pointer error value.
#define ERR
Integer error value.
#define PROCESSOR_LOCAL_APIC_ENABLED
#define INTERRUPT_CONTROLLER_PROCESSOR_LOCAL_APIC
sdt_header_t * acpi_tables_lookup(const char *signature, uint64_t minSize, uint64_t n)
Lookup the n'th table matching the signature.
#define MADT_FOR_EACH(madt, ic)
Iterate over all MADT interrupt controllers.
#define MADT_SIGNATURE
MADT table signature.
lapic_t * lapic_get(uint32_t cpuId)
Get the lapic data for the specified CPU.
void trampoline_send_startup_ipi(cpu_t *cpu, lapic_id_t lapicId)
Sends the startup IPI to a CPU to start it up.
void trampoline_deinit(void)
Deinitializes the trampoline by restoring the original contents of the trampoline memory location.
uint64_t trampoline_wait_ready(clock_t timeout)
Waits for the currently starting CPU to signal that it is ready.
void trampoline_init(void)
Initializes the trampoline by copying the trampoline code to its designated memory location.
static void smp_start_others(void)
Starts the other CPUs in the system.
uint64_t _module_procedure(const module_event_t *event)
_PUBLIC void * memset(void *s, int c, size_t n)
Multiple APIC Description Table.