From 42c422e767f80f6e086c67feeb464f4cda891ae9 Mon Sep 17 00:00:00 2001 From: stone3311 Date: Sun, 9 Jul 2023 19:16:06 +0200 Subject: [PATCH] cores/arm: Fix computed goto in boot helpers --- litex/soc/cores/cpu/cortex_m1/boot-helper.c | 2 +- litex/soc/cores/cpu/cortex_m3/boot-helper.c | 2 +- litex/soc/cores/cpu/eos_s3/boot-helper.c | 2 +- litex/soc/cores/cpu/gowin_emcu/boot-helper.c | 2 +- litex/soc/cores/cpu/zynq7000/boot-helper.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/litex/soc/cores/cpu/cortex_m1/boot-helper.c b/litex/soc/cores/cpu/cortex_m1/boot-helper.c index 4dd8ae2d3..f16e05298 100644 --- a/litex/soc/cores/cpu/cortex_m1/boot-helper.c +++ b/litex/soc/cores/cpu/cortex_m1/boot-helper.c @@ -1,5 +1,5 @@ void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr); void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr) { - goto *addr; + goto *(void*)addr; } diff --git a/litex/soc/cores/cpu/cortex_m3/boot-helper.c b/litex/soc/cores/cpu/cortex_m3/boot-helper.c index 4dd8ae2d3..f16e05298 100644 --- a/litex/soc/cores/cpu/cortex_m3/boot-helper.c +++ b/litex/soc/cores/cpu/cortex_m3/boot-helper.c @@ -1,5 +1,5 @@ void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr); void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr) { - goto *addr; + goto *(void*)addr; } diff --git a/litex/soc/cores/cpu/eos_s3/boot-helper.c b/litex/soc/cores/cpu/eos_s3/boot-helper.c index 4dd8ae2d3..f16e05298 100644 --- a/litex/soc/cores/cpu/eos_s3/boot-helper.c +++ b/litex/soc/cores/cpu/eos_s3/boot-helper.c @@ -1,5 +1,5 @@ void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr); void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr) { - goto *addr; + goto *(void*)addr; } diff --git a/litex/soc/cores/cpu/gowin_emcu/boot-helper.c b/litex/soc/cores/cpu/gowin_emcu/boot-helper.c index 4dd8ae2d3..f16e05298 100644 --- a/litex/soc/cores/cpu/gowin_emcu/boot-helper.c +++ b/litex/soc/cores/cpu/gowin_emcu/boot-helper.c @@ -1,5 +1,5 @@ void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr); void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr) { - goto *addr; + goto *(void*)addr; } diff --git a/litex/soc/cores/cpu/zynq7000/boot-helper.c b/litex/soc/cores/cpu/zynq7000/boot-helper.c index 4dd8ae2d3..f16e05298 100644 --- a/litex/soc/cores/cpu/zynq7000/boot-helper.c +++ b/litex/soc/cores/cpu/zynq7000/boot-helper.c @@ -1,5 +1,5 @@ void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr); void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr) { - goto *addr; + goto *(void*)addr; }