From a291bddcc1aee884f834b3a9d2cc34159b100e44 Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Tue, 30 Jul 2019 02:16:25 +0200 Subject: [PATCH] thermosphere: enable traps, works around qemu brk bug --- thermosphere/Makefile | 2 +- thermosphere/src/main.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/thermosphere/Makefile b/thermosphere/Makefile index b7d655ca2..ca20bad90 100644 --- a/thermosphere/Makefile +++ b/thermosphere/Makefile @@ -133,7 +133,7 @@ all: $(BUILD) ifeq ($(PLATFORM), qemu) QEMUFLAGS := -nographic -machine virt,secure=on,virtualization=on,gic-version=2 -cpu cortex-a57 -smp 4 -m 1024\ - -bios bl1.bin -d unimp -semihosting-config enable,target=native -serial mon:stdio + -bios bl1.bin -d unimp,int -semihosting-config enable,target=native -serial mon:stdio # NOTE: copy bl1.bin, bl2.bin, bl31.bin from your own build of Arm Trusted Firmware! diff --git a/thermosphere/src/main.c b/thermosphere/src/main.c index cd07962dc..ebad686e8 100644 --- a/thermosphere/src/main.c +++ b/thermosphere/src/main.c @@ -2,15 +2,17 @@ #include "core_ctx.h" #include "log.h" #include "platform/uart.h" +#include "traps.h" int main(void) { + enableTraps(); + if (currentCoreCtx->coreId == 0) { uartInit(115200); serialLog("Hello from Thermosphere!\n"); __builtin_trap(); } - else { serialLog("Core %u booted\n", currentCoreCtx->coreId); }