From 4fb307f1e4441b8fc3e24fa7dd0633b4572fe694 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 20 Jan 2022 20:30:05 +0000 Subject: [PATCH] fel: thunks: Use armv5te architecture for thunks Almost all thunks are already ARMv5 safe, so we can just require this architecture on the gas command line, to enforce compatibility with the F1Cx00 series. This prevents accidental changes in the future. The RMR thunk uses the ARMv7 only DSB/ISB instructions, but this runs on ARMv8 cores only anyway, so we just force ARMv7 for this file, and avoid code changes. Signed-off-by: Andre Przywara --- thunks/Makefile | 2 +- thunks/rmr-thunk.S | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/thunks/Makefile b/thunks/Makefile index 891ca1f..27ba55d 100644 --- a/thunks/Makefile +++ b/thunks/Makefile @@ -31,5 +31,5 @@ fel-to-spl-thunk.h: fel-to-spl-thunk.S FORCE $(OBJDUMP) -d $(subst .S,.o,$<) | $(AWK_O_TO_H) -v style=old > $@ $(THUNKS): %.h: %.S FORCE - $(AS) -o $(subst .S,.o,$<) $< + $(AS) -o $(subst .S,.o,$<) -march=armv5te $< $(OBJDUMP) -d $(subst .S,.o,$<) | $(AWK_O_TO_H) > $@ diff --git a/thunks/rmr-thunk.S b/thunks/rmr-thunk.S index 10429b5..7d67ccc 100644 --- a/thunks/rmr-thunk.S +++ b/thunks/rmr-thunk.S @@ -1,6 +1,8 @@ /* * Request AArch32/AArch64 warm reset, using RVBAR and Reset Management Register + * This is used on ARMv8 cores only, so force v7 code to allow dsb and isb. */ +.arch armv7-a rmr_request: ldr r0, 1f /* RVBAR register address */