limine/common/sys/smp.h

36 lines
1.0 KiB
C
Raw Normal View History

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
#if defined (__x86_64__) || defined (__i386__)
2022-09-14 15:54:55 +03:00
struct limine_smp_info *init_smp(size_t *cpu_count,
uint32_t *_bsp_lapic_id,
2020-09-18 15:39:29 +03:00
bool longmode,
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,
bool wp);
2020-09-18 15:39:29 +03:00
#elif defined (__aarch64__)
2022-09-14 15:54:55 +03:00
struct limine_smp_info *init_smp(size_t *cpu_count,
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