| 1 | #ifndef SYS__SMP_H__ |
| 2 | #define SYS__SMP_H__ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | #include <stddef.h> |
| 6 | #include <stdbool.h> |
| 7 | #include <mm/vmm.h> |
| 8 | #define LIMINE_NO_POINTERS |
| 9 | #include <limine.h> |
| 10 | |
| 11 | #if defined (__x86_64__) || defined (__i386__) |
| 12 | |
| 13 | extern bool smp_configure_apic; |
| 14 | |
| 15 | struct limine_mp_info *init_smp(size_t *cpu_count, |
| 16 | uint32_t *_bsp_lapic_id, |
| 17 | int paging_mode, |
| 18 | pagemap_t pagemap, |
| 19 | bool x2apic, |
| 20 | bool nx, |
| 21 | uint64_t hhdm, |
| 22 | bool wp); |
| 23 | |
| 24 | #elif defined (__aarch64__) |
| 25 | |
| 26 | struct limine_mp_info *init_smp(const char *config, |
| 27 | size_t *cpu_count, |
| 28 | uint64_t *bsp_mpidr, |
| 29 | pagemap_t pagemap, |
| 30 | uint64_t mair, |
| 31 | uint64_t tcr, |
| 32 | uint64_t sctlr, |
| 33 | uint64_t hhdm_offset); |
| 34 | |
| 35 | #elif defined (__riscv) |
| 36 | |
| 37 | struct limine_mp_info *init_smp(size_t *cpu_count, |
| 38 | pagemap_t pagemap, |
| 39 | uint64_t hhdm_offset); |
| 40 | |
| 41 | #elif defined (__loongarch64) |
| 42 | |
| 43 | struct limine_mp_info *init_smp(size_t *cpu_count, uint32_t *bsp_phys_id, |
| 44 | pagemap_t pagemap, uint64_t hhdm_offset); |
| 45 | |
| 46 | #else |
| 47 | #error Unknown architecture |
| 48 | #endif |
| 49 | |
| 50 | #endif |