ARMv8: setting global pointer in coredata struct
@@ -806,9 +806,9 @@ static struct sysret dispatcher_dump_ptables(
printf("kernel_dump_ptables\n");
- struct dcb *dispatcher = to->u.dispatcher.dcb;
+ // struct dcb *dispatcher = to->u.dispatcher.dcb;
- paging_dump_tables(dispatcher);
+ // paging_dump_tables(dispatcher);
return SYSRET(SYS_ERR_OK);
}
@@ -1163,6 +1163,7 @@ static struct sysret handle_debug_syscall(int msg)
#include <psci.h>
#include <barrelfish_kpi/arm_core_data.h>
+#include <arch/armv8/global.h>
/* XXX - function documentation is inconsistent. */
/**
@@ -1240,6 +1241,10 @@ void sys_syscall(uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3,
printf("Invoking PSCI on: cpu=%lx, entry=%lx, context=%lx\n", a2, a3, a4);
struct armv8_core_data *cd = (struct armv8_core_data *)local_phys_to_mem(a4);
cd->kernel_l0_pagetable = sysreg_read_ttbr1_el1();
+ cd->kernel_global = (uintptr_t)global;
+ __asm volatile("dsb sy\n"
+ "dmb sy\n"
+ "isb \n");
r.error = psci_cpu_on(a2, a3, a4);
break;
}
