mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-13 18:17:17 +03:00
e1f6ac8860
* Initial aarch64 port * Enable chainload on aarch64 No changes necessary since it's all UEFI anyway. * Add specification for Limine protocol for aarch64 * PROTOCOL: Specify state of information in DT /chosen node * common: Add spinup code for aarch64 * common: Port elf and term to aarch64 * common: Port vmm to aarch64 Also prepare to drop VMM_FLAG_PRESENT on x86. * protos: Port limine boot protocol to aarch64 Also drop VMM_FLAG_PRESENT since we never unmap pages anyway. * test: Add DTB request * PROTOCOL: Port SMP request to aarch64 * cpu: Add cache maintenance functions for aarch64 * protos/limine, sys: Port SMP to aarch64 Also move common asm macros into a header file. * test: Start up APs * vmm: Unify get_next_level and implement large page splitting * protos/limine: Map framebuffer using correct caching mode on AArch64 * CI: Fix GCC build for aarch64 * entry, menu: Replace uses of naked attribute with separate asm file GCC does not understand the naked attribute on aarch64, and didn't understand it for x86 in older versions.
55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
#ifndef __SYS__SMP_H__
|
|
#define __SYS__SMP_H__
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
#include <mm/vmm.h>
|
|
|
|
#if defined (__x86_64__) || defined (__i386__)
|
|
|
|
struct smp_information {
|
|
uint32_t acpi_processor_uid;
|
|
uint32_t lapic_id;
|
|
uint64_t stack_addr;
|
|
uint64_t goto_address;
|
|
uint64_t extra_argument;
|
|
} __attribute__((packed));
|
|
|
|
struct smp_information *init_smp(size_t header_hack_size,
|
|
void **header_ptr,
|
|
size_t *cpu_count,
|
|
uint32_t *_bsp_lapic_id,
|
|
bool longmode,
|
|
bool lv5,
|
|
pagemap_t pagemap,
|
|
bool x2apic,
|
|
bool nx,
|
|
uint64_t hhdm,
|
|
bool wp);
|
|
|
|
#elif defined (__aarch64__)
|
|
|
|
struct smp_information {
|
|
uint32_t acpi_processor_uid;
|
|
uint32_t gic_iface_no;
|
|
uint64_t mpidr;
|
|
uint64_t stack_addr;
|
|
uint64_t goto_address;
|
|
uint64_t extra_argument;
|
|
} __attribute__((packed));
|
|
|
|
struct smp_information *init_smp(size_t header_hack_size,
|
|
void **header_ptr,
|
|
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
|
|
|
|
#endif
|