4 #include <soc/addressmap.h>
7 #include <bdk-coreboot.h>
39 asm(
"mrs %0, MPIDR_EL1\n\t" :
"=r" (mpidr_el1) ::
"memory");
43 core_num = mpidr_el1 & 0xf;
44 core_num |= (mpidr_el1 & 0xff00) >> 4;
54 size_t start_cpu(
size_t cpu,
void (*entry_64)(
size_t core_id))
56 const uint64_t coremask = 1ULL << cpu;
71 if ((CONFIG_STACK_SIZE * cpu) >
REGION_SIZE(stack_sec))
101 "pending to clear.");
void write64(void *addr, uint64_t val)
uint64_t read64(const void *addr)
#define printk(level,...)
#define REGION_SIZE(name)
static int stopwatch_expired(struct stopwatch *sw)
static void stopwatch_init_usecs_expire(struct stopwatch *sw, long us)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
static size_t secondary_booted
uint64_t cpu_get_available_core_mask(void)
Return the mask of available cores.
size_t start_cpu(size_t cpu, void(*entry_64)(size_t core_id))
Init secondary core and call the provided entry for given core.
void secondary_cpu_init(size_t core_id)
Secondary CPU C entry point.
static void(* secondary_c_entry)(size_t core_id)
size_t cpu_get_num_available_cores(void)
Return the number of cores available in the chip.
size_t cpu_self_get_core_id(void)
Number of the Core on which the program is currently running.
uint64_t cpu_self_get_core_mask(void)
Return a mask representing this core in a 64bit bitmask.
void secondary_init(void)
Secondary ASM CPU entry point.
unsigned long long uint64_t
static void __noreturn reset(void)
typedef void(X86APIP X86EMU_intrFuncs)(int num)