diff --git a/cmake-tool/helpers/simulation.cmake b/cmake-tool/helpers/simulation.cmake index cf38b557..6e308a3e 100644 --- a/cmake-tool/helpers/simulation.cmake +++ b/cmake-tool/helpers/simulation.cmake @@ -152,6 +152,12 @@ function(GenerateSimulateScript) set(sim_graphic_opt "-nographic") set(sim_cpu "${KernelArmCPU}") SetDefaultMemSize("${QEMU_MEMORY}") + elseif(KernelPlatformMorelloQEMU) + set(QemuBinaryMachine "qemu-system-${QEMU_ARCH}") + set(sim_machine "virt,gic-version=2") + set(sim_graphic_opt "-nographic") + set(sim_cpu "morello") + SetDefaultMemSize("2048") elseif(KernelPlatformQEMURiscVVirt) set(QemuBinaryMachine "qemu-system-${KernelSel4Arch}") set(sim_machine "virt") diff --git a/elfloader-tool/src/plat/morello-qemu/platform_init.c b/elfloader-tool/src/plat/morello-qemu/platform_init.c new file mode 100644 index 00000000..42dabfa0 --- /dev/null +++ b/elfloader-tool/src/plat/morello-qemu/platform_init.c @@ -0,0 +1,21 @@ +/* + * Copyright 2021, Data61, CSIRO (ABN 41 687 119 230) + * + * SPDX-License-Identifier: GPL-2.0-only + */ + +#include +#include + +/* Reset the virtual offset for the platform timer to 0 */ +void platform_init(void) +{ + reset_cntvoff(); +} + +#if CONFIG_MAX_NUM_NODES > 1 +void non_boot_init(void) +{ + reset_cntvoff(); +} +#endif