Skip to content

Commit

Permalink
Add multicore configuration of IMX and odroidc4
Browse files Browse the repository at this point in the history
Signed-off-by: Courtney Darville <[email protected]>
  • Loading branch information
Courtney3141 committed Sep 23, 2024
1 parent 5ecd421 commit 79c3fb7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions benchmark/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ static void benchmark_print_IPC_data(uint64_t *buffer, uint32_t id)
number_schedules = buffer[BENCHMARK_TCB_NUMBER_SCHEDULES];
kernel = buffer[BENCHMARK_TCB_KERNEL_UTILISATION];
entries = buffer[BENCHMARK_TCB_NUMBER_KERNEL_ENTRIES];
sddf_printf("Utilisation details for PD: %s (%x)\n", pd_id_to_name(id), id);
sddf_printf("Utilisation details for PD: %s (%x)\n",
pd_id_to_name(id), id);
}
sddf_printf("{\nKernelUtilisation: %lx\nKernelEntries: "
"%lx\nNumberSchedules: %lx\nTotalUtilisation: %lx\n}\n",
Expand All @@ -105,7 +106,6 @@ static void benchmark_stop_core()
seL4_BenchmarkFinalizeLog();
seL4_BenchmarkGetThreadUtilisation(TCB_CAP);
benchmark_print_IPC_data((uint64_t *)&seL4_GetIPCBuffer()->msg[0], TOTAL_ID);

for (uint32_t id = 1; id < core_config.max_core_id + 1; id++) {
if (core_config.core_bitmap & (1 << id)) {
seL4_BenchmarkGetThreadUtilisation(BASE_TCB_CAP + id);
Expand Down Expand Up @@ -219,7 +219,8 @@ void notified(microkit_channel ch)

void init(void)
{
serial_cli_queue_init_sys(microkit_name, NULL, NULL, NULL, &serial_tx_queue_handle, serial_tx_queue,
serial_cli_queue_init_sys(microkit_name, NULL, NULL, NULL,
&serial_tx_queue_handle, serial_tx_queue,
serial_tx_data);
serial_putchar_init(SERIAL_TX_CH, &serial_tx_queue_handle);

Expand Down Expand Up @@ -262,18 +263,20 @@ seL4_Bool fault(microkit_child id, microkit_msginfo msginfo, microkit_msginfo *r
sddf_printf("BENCH|LOG: Faulting PD %s (%x)\n", pd_id_to_name(id), id);

seL4_UserContext regs;
seL4_TCB_ReadRegisters(BASE_TCB_CAP + id, false, 0, sizeof(seL4_UserContext) / sizeof(seL4_Word), &regs);
seL4_TCB_ReadRegisters(BASE_TCB_CAP + id, false, 0,
sizeof(seL4_UserContext) / sizeof(seL4_Word), &regs);
sddf_printf("Registers: \npc : %lx\nspsr : %lx\nx0 : %lx\nx1 : %lx\n"
"x2 : %lx\nx3 : %lx\nx4 : %lx\nx5 : %lx\nx6 : %lx\nx7 : %lx\n",
regs.pc, regs.spsr, regs.x0, regs.x1, regs.x2, regs.x3, regs.x4, regs.x5, regs.x6, regs.x7);
regs.pc, regs.spsr, regs.x0, regs.x1, regs.x2, regs.x3,
regs.x4, regs.x5, regs.x6, regs.x7);

switch (microkit_msginfo_get_label(msginfo)) {
case seL4_Fault_CapFault: {
uint64_t ip = seL4_GetMR(seL4_CapFault_IP);
uint64_t fault_addr = seL4_GetMR(seL4_CapFault_Addr);
uint64_t in_recv_phase = seL4_GetMR(seL4_CapFault_InRecvPhase);
sddf_printf("CapFault: ip=%lx fault_addr=%lx in_recv_phase=%s\n", ip, fault_addr,
(in_recv_phase == 0 ? "false" : "true"));
sddf_printf("CapFault: ip=%lx fault_addr=%lx in_recv_phase=%s\n",
ip, fault_addr, (in_recv_phase == 0 ? "false" : "true"));
break;
}
case seL4_Fault_UserException: {
Expand All @@ -285,7 +288,8 @@ seL4_Bool fault(microkit_child id, microkit_msginfo msginfo, microkit_msginfo *r
uint64_t fault_addr = seL4_GetMR(seL4_VMFault_Addr);
uint64_t is_instruction = seL4_GetMR(seL4_VMFault_PrefetchFault);
uint64_t fsr = seL4_GetMR(seL4_VMFault_FSR);
sddf_printf("VMFault: ip=%lx fault_addr=%lx fsr=%lx %s\n", ip, fault_addr, fsr,
sddf_printf("VMFault: ip=%lx fault_addr=%lx fsr=%lx %s\n",
ip, fault_addr, fsr,
(is_instruction ? "(instruction fault)" : "(data fault)"));
break;
}
Expand Down

0 comments on commit 79c3fb7

Please sign in to comment.