mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-02 05:06:59 +03:00
9274ee656e
* initial riscv64 port * enable Paging Mode feature for all architectures * riscv: add missing protocol docs * riscv: fix tests * docs: clarify `LIMINE_PAGING_MODE_DEFAULT` macro * build: fix whitespace in common/GNUmakefile * riscv: default to Sv48 paging when supported * vmm: make `VMM_MAX_LEVEL` 1-indexed * limine: do not call `reported_addr()` before finaling paging mode smp/riscv: do not overwrite the argument passed to APs * limine/riscv: update default paging mode in limine.h * test/riscv: pad OVMF.fd when downloading it
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
#ifndef __SYS__SMP_H__
|
|
#define __SYS__SMP_H__
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
#include <mm/vmm.h>
|
|
#define LIMINE_NO_POINTERS
|
|
#include <limine.h>
|
|
|
|
#if defined (__x86_64__) || defined (__i386__)
|
|
|
|
struct limine_smp_info *init_smp(size_t *cpu_count,
|
|
uint32_t *_bsp_lapic_id,
|
|
bool longmode,
|
|
int paging_mode,
|
|
pagemap_t pagemap,
|
|
bool x2apic,
|
|
bool nx,
|
|
uint64_t hhdm,
|
|
bool wp);
|
|
|
|
#elif defined (__aarch64__)
|
|
|
|
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);
|
|
|
|
#elif defined (__riscv64)
|
|
|
|
struct limine_smp_info *init_smp(size_t *cpu_count,
|
|
uint64_t bsp_hartid,
|
|
pagemap_t pagemap);
|
|
|
|
#else
|
|
#error Unknown architecture
|
|
#endif
|
|
|
|
#endif
|