#include <stdint.h>
#include "smp.h"
#include "uart.h"
#define SPIN 0x00000100
int get_core_id(void){ uint64_t v; asm("mrs %0,MPIDR_EL1":"=r"(v)); return v&0xFF; }
void smp_init(void){
   uart_puts("[SMP] release\n");


    for(int i=1;i<4;i++)
        ((volatile uint64_t*)(SPIN+i*8))[0]=(uint64_t)0x40001000;
    asm volatile("sev");
}