2020-09-21 13:15:55 +03:00
|
|
|
#ifndef __SYS__SMP_H__
|
|
|
|
#define __SYS__SMP_H__
|
2020-09-18 15:39:29 +03:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdbool.h>
|
2020-09-21 13:15:55 +03:00
|
|
|
#include <mm/vmm.h>
|
2020-09-18 15:39:29 +03:00
|
|
|
|
|
|
|
struct smp_information {
|
2020-09-18 20:26:17 +03:00
|
|
|
uint32_t acpi_processor_uid;
|
2020-09-18 15:39:29 +03:00
|
|
|
uint32_t lapic_id;
|
2020-09-18 20:02:47 +03:00
|
|
|
uint64_t stack_addr;
|
2020-09-18 15:39:29 +03:00
|
|
|
uint64_t goto_address;
|
2020-09-19 01:50:16 +03:00
|
|
|
uint64_t extra_argument;
|
2020-09-18 15:39:29 +03:00
|
|
|
} __attribute__((packed));
|
|
|
|
|
2020-10-25 14:41:13 +03:00
|
|
|
struct smp_information *init_smp(size_t header_hack_size,
|
|
|
|
void **header_ptr,
|
|
|
|
size_t *cpu_count,
|
2020-10-25 06:58:53 +03:00
|
|
|
uint32_t *_bsp_lapic_id,
|
2020-09-18 15:39:29 +03:00
|
|
|
bool longmode,
|
2020-09-18 21:21:16 +03:00
|
|
|
bool lv5,
|
2020-09-18 15:39:29 +03:00
|
|
|
pagemap_t pagemap,
|
2021-07-15 17:20:29 +03:00
|
|
|
bool x2apic,
|
2022-03-18 03:47:04 +03:00
|
|
|
bool nx,
|
|
|
|
uint64_t hhdm);
|
2020-09-18 15:39:29 +03:00
|
|
|
|
|
|
|
#endif
|