* SCTLR register definitions made 64-bit * isb added after writing to SCTLR, to ensure we don't execute instructions requiring the MMU prior to the MMU being enabled * GICv2 has per-cpu registers for IRQs < 32, so enabling or disabling those IRQs needs to be done on all cores * MMU setup code in kernel and bootloader made per-cpu * Signiture of arch_smp_boot_other_cpus is now the same on all architectures, with an addr_t page table Change-Id: I13bef7ca4efc5504d643833664560a9a6a6a6964 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10649 Reviewed-by: waddlesplash <[email protected]>
45 lines
1016 B
C
45 lines
1016 B
C
/*
|
|
* Copyright 2013-2022 Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef KERNEL_BOOT_PLATFORM_EFI_ARCH_SMP_H
|
|
#define KERNEL_BOOT_PLATFORM_EFI_ARCH_SMP_H
|
|
|
|
|
|
#include <boot/menu.h>
|
|
|
|
|
|
#if defined(__riscv)
|
|
struct platform_cpu_info {
|
|
uint32 id;
|
|
uint32 phandle;
|
|
uint32 plicContext;
|
|
};
|
|
|
|
extern uint32 gBootHart;
|
|
void arch_smp_register_cpu(platform_cpu_info** cpu);
|
|
platform_cpu_info* arch_smp_find_cpu(uint32 phandle);
|
|
#elif defined(__ARM__)
|
|
struct platform_cpu_info {
|
|
uint32 id;
|
|
};
|
|
|
|
void arch_smp_register_cpu(platform_cpu_info** cpu);
|
|
#elif defined(__aarch64__)
|
|
struct platform_cpu_info {
|
|
uint32 id;
|
|
uint64 mpidr;
|
|
};
|
|
|
|
void arch_smp_register_cpu(platform_cpu_info** cpu);
|
|
#endif
|
|
|
|
int arch_smp_get_current_cpu(void);
|
|
void arch_smp_init_other_cpus(void);
|
|
void arch_smp_boot_other_cpus(addr_t pageTable, uint64 kernelEntry, addr_t virtKernelArgs);
|
|
void arch_smp_add_safemode_menus(Menu *menu);
|
|
void arch_smp_init(void);
|
|
|
|
|
|
#endif /* KERNEL_BOOT_PLATFORM_EFI_ARCH_SMP_H */
|