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 24, 2024
1 parent 0e18849 commit e912784
Show file tree
Hide file tree
Showing 16 changed files with 1,315 additions and 224 deletions.
266 changes: 104 additions & 162 deletions benchmark/benchmark.c

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions benchmark/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#define INIT 3
#define MAGIC_CYCLES 150

uintptr_t cyclecounters_vaddr;
struct bench *b;

void count_idle(void)
Expand Down Expand Up @@ -48,6 +47,5 @@ void notified(microkit_channel ch)

void init(void)
{
b = (void *)cyclecounters_vaddr;
return;
}
}
12 changes: 12 additions & 0 deletions examples/echo_server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,23 @@ ifeq ($(strip $(MICROKIT_BOARD)), odroidc4)
export UART_DRIV_DIR := meson
export TIMER_DRV_DIR := meson
export CPU := cortex-a55
else ifeq ($(strip $(MICROKIT_BOARD)), odroidc4_4_cores)
export DRIV_DIR := meson
export UART_DRIV_DIR := meson
export TIMER_DRV_DIR := meson
export CPU := cortex-a55
export CONFIG_INCLUDE_SMP := _smp
else ifneq ($(filter $(strip $(MICROKIT_BOARD)),imx8mm_evk imx8mp_evk maaxboard),)
export DRIV_DIR := imx
export UART_DRIV_DIR := imx
export TIMER_DRV_DIR := imx
export CPU := cortex-a53
else ifeq ($(strip $(MICROKIT_BOARD)), imx8mm_evk_4_cores)
export DRIV_DIR := imx
export UART_DRIV_DIR := imx
export TIMER_DRV_DIR := imx
export CPU := cortex-a53
export CONFIG_INCLUDE_SMP := _smp
else ifeq ($(strip $(MICROKIT_BOARD)), qemu_virt_aarch64)
export DRIV_DIR := virtio
export UART_DRIV_DIR := arm
Expand Down
14 changes: 7 additions & 7 deletions examples/echo_server/board/imx8mm_evk/echo_server.system
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<protection_domain name="benchIdle" priority="1" >
<program_image path="idle.elf" />
<!-- benchmark.c puts PMU data in here for lwip to collect -->
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="b" />
</protection_domain>

<protection_domain name="bench" priority="102" >
<protection_domain name="bench0" priority="102" >
<program_image path="benchmark.elf" />

<map mr="serial_tx_queue_client2" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
Expand Down Expand Up @@ -177,7 +177,7 @@
<map mr="serial_tx_queue_client0" vaddr="0x4_000_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
<map mr="serial_tx_data_client0" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_data" />

<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="idle_ccounts_vaddr" />
</protection_domain>

<protection_domain name="client1" priority="95" budget="20000" id="7">
Expand Down Expand Up @@ -219,7 +219,7 @@

<channel>
<end pd="serial_virt_tx" id="3"/>
<end pd="bench" id="0"/>
<end pd="bench0" id="0"/>
</channel>

<channel>
Expand Down Expand Up @@ -264,17 +264,17 @@

<channel>
<end pd="client0" id="4" /> <!-- start channel -->
<end pd="bench" id="1" />
<end pd="bench0" id="1" />
</channel>

<channel>
<end pd="client0" id="5" /> <!-- stop channel -->
<end pd="bench" id="2" />
<end pd="bench0" id="2" />
</channel>

<channel>
<end pd="benchIdle" id="3" /> <!-- bench init channel -->
<end pd="bench" id="3" />
<end pd="bench0" id="5" />
</channel>

<channel>
Expand Down
403 changes: 403 additions & 0 deletions examples/echo_server/board/imx8mm_evk_4_cores/echo_server.system

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions examples/echo_server/board/imx8mp_evk/echo_server.system
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<protection_domain name="benchIdle" priority="1" >
<program_image path="idle.elf" />
<!-- benchmark.c puts PMU data in here for lwip to collect -->
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="b" />
</protection_domain>

<protection_domain name="bench" priority="102" >
<protection_domain name="bench0" priority="102" >
<program_image path="benchmark.elf" />

<map mr="serial_tx_queue_client2" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
Expand Down Expand Up @@ -177,7 +177,7 @@
<map mr="serial_tx_queue_client0" vaddr="0x4_000_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
<map mr="serial_tx_data_client0" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_data" />

<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="idle_ccounts_vaddr" />
</protection_domain>

<protection_domain name="client1" priority="95" budget="20000" id="7">
Expand Down Expand Up @@ -219,7 +219,7 @@

<channel>
<end pd="serial_virt_tx" id="3"/>
<end pd="bench" id="0"/>
<end pd="bench0" id="0"/>
</channel>

<channel>
Expand Down Expand Up @@ -264,17 +264,17 @@

<channel>
<end pd="client0" id="4" /> <!-- start channel -->
<end pd="bench" id="1" />
<end pd="bench0" id="1" />
</channel>

<channel>
<end pd="client0" id="5" /> <!-- stop channel -->
<end pd="bench" id="2" />
<end pd="bench0" id="2" />
</channel>

<channel>
<end pd="benchIdle" id="3" /> <!-- bench init channel -->
<end pd="bench" id="3" />
<end pd="bench0" id="5" />
</channel>

<channel>
Expand Down
14 changes: 7 additions & 7 deletions examples/echo_server/board/maaxboard/echo_server.system
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<protection_domain name="benchIdle" priority="1" >
<program_image path="idle.elf" />
<!-- benchmark.c puts PMU data in here for lwip to collect -->
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="b" />
</protection_domain>

<protection_domain name="bench" priority="102" >
<protection_domain name="bench0" priority="102" >
<program_image path="benchmark.elf" />

<map mr="serial_tx_queue_client2" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
Expand Down Expand Up @@ -177,7 +177,7 @@
<map mr="serial_tx_queue_client0" vaddr="0x4_000_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
<map mr="serial_tx_data_client0" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_data" />

<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="idle_ccounts_vaddr" />
</protection_domain>

<protection_domain name="client1" priority="95" budget="20000" id="7">
Expand Down Expand Up @@ -219,7 +219,7 @@

<channel>
<end pd="serial_virt_tx" id="3"/>
<end pd="bench" id="0"/>
<end pd="bench0" id="0"/>
</channel>

<channel>
Expand Down Expand Up @@ -264,17 +264,17 @@

<channel>
<end pd="client0" id="4" /> <!-- start channel -->
<end pd="bench" id="1" />
<end pd="bench0" id="1" />
</channel>

<channel>
<end pd="client0" id="5" /> <!-- stop channel -->
<end pd="bench" id="2" />
<end pd="bench0" id="2" />
</channel>

<channel>
<end pd="benchIdle" id="3" /> <!-- bench init channel -->
<end pd="bench" id="3" />
<end pd="bench0" id="5" />
</channel>

<channel>
Expand Down
14 changes: 7 additions & 7 deletions examples/echo_server/board/odroidc4/echo_server.system
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<protection_domain name="benchIdle" priority="1" >
<program_image path="idle.elf" />
<!-- benchmark.c puts PMU data in here for lwip to collect -->
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="b" />
</protection_domain>

<protection_domain name="bench" priority="102" >
<protection_domain name="bench0" priority="102" >
<program_image path="benchmark.elf" />

<map mr="serial_tx_queue_client2" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
Expand Down Expand Up @@ -177,7 +177,7 @@
<map mr="serial_tx_queue_client0" vaddr="0x4_000_000" perms="rw" cached="true" setvar_vaddr="serial_tx_queue" />
<map mr="serial_tx_data_client0" vaddr="0x4_001_000" perms="rw" cached="true" setvar_vaddr="serial_tx_data" />

<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="cyclecounters_vaddr" />
<map mr="cyclecounters" vaddr="0x5_010_000" perms="rw" cached="true" setvar_vaddr="idle_ccounts_vaddr" />
</protection_domain>

<protection_domain name="client1" priority="95" budget="20000" id="7">
Expand Down Expand Up @@ -219,7 +219,7 @@

<channel>
<end pd="serial_virt_tx" id="3"/>
<end pd="bench" id="0"/>
<end pd="bench0" id="0"/>
</channel>

<channel>
Expand Down Expand Up @@ -264,17 +264,17 @@

<channel>
<end pd="client0" id="4" /> <!-- start channel -->
<end pd="bench" id="1" />
<end pd="bench0" id="1" />
</channel>

<channel>
<end pd="client0" id="5" /> <!-- stop channel -->
<end pd="bench" id="2" />
<end pd="bench0" id="2" />
</channel>

<channel>
<end pd="benchIdle" id="3" /> <!-- bench init channel -->
<end pd="bench" id="3" />
<end pd="bench0" id="5" />
</channel>

<channel>
Expand Down
Loading

0 comments on commit e912784

Please sign in to comment.