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>
|
2022-09-14 15:54:55 +03:00
|
|
|
#define LIMINE_NO_POINTERS
|
|
|
|
#include <limine.h>
|
2020-09-18 15:39:29 +03:00
|
|
|
|
2022-08-18 18:32:54 +03:00
|
|
|
#if defined (__x86_64__) || defined (__i386__)
|
|
|
|
|
2022-09-14 15:54:55 +03:00
|
|
|
struct limine_smp_info *init_smp(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,
|
2022-03-31 14:33:18 +03:00
|
|
|
uint64_t hhdm,
|
|
|
|
bool wp);
|
2020-09-18 15:39:29 +03:00
|
|
|
|
2022-08-18 18:32:54 +03:00
|
|
|
#elif defined (__aarch64__)
|
|
|
|
|
2022-09-14 15:54:55 +03:00
|
|
|
struct limine_smp_info *init_smp(size_t *cpu_count,
|
2022-08-18 18:32:54 +03:00
|
|
|
uint64_t *bsp_mpidr,
|
|
|
|
pagemap_t pagemap,
|
|
|
|
uint64_t mair,
|
|
|
|
uint64_t tcr,
|
|
|
|
uint64_t sctlr);
|
|
|
|
#else
|
|
|
|
#error Unknown architecture
|
|
|
|
#endif
|
|
|
|
|
2020-09-18 15:39:29 +03:00
|
|
|
#endif
|