Skip to content

Commit b10781b

Browse files
maass-hamburgkartben
authored andcommitted
arch: common: be able to use ROM_START_OFFSET on RISCV
be able to use ROM_START_OFFSET on RISCV. Signed-off-by: Fin Maaß <[email protected]>
1 parent 26edfea commit b10781b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

arch/common/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
7676
nocache.ld
7777
)
7878

79-
# Only ARM, X86 and OPENISA_RV32M1_RISCV32 use ROM_START_OFFSET.
80-
if (DEFINED CONFIG_ARM OR DEFINED CONFIG_X86 OR DEFINED CONFIG_ARM64
81-
OR DEFINED CONFIG_SOC_OPENISA_RV32M1)
79+
# Only ARM, X86 and RISCV use ROM_START_OFFSET.
80+
if (DEFINED CONFIG_ARM OR DEFINED CONFIG_X86 OR DEFINED CONFIG_ARM64 OR DEFINED CONFIG_RISCV)
8281
# Exclamation mark is printable character with lowest number in ASCII table.
8382
# We are sure that this file will be included as a first.
8483
zephyr_linker_sources(ROM_START SORT_KEY ! rom_start_address.ld)

soc/lowrisc/opentitan/Kconfig.defconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ config 2ND_LVL_INTR_00_OFFSET
1818
config NUM_IRQS
1919
default 256
2020

21+
# The OpenTitan SoC requires a manifest in front of the
22+
# application binary.
23+
config ROM_START_OFFSET
24+
default 0x404
25+
2126
endif # SOC_OPENTITAN

tests/kernel/smp/testcase.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ tests:
3131
- smp
3232
ignore_faults: true
3333
filter: (CONFIG_MP_MAX_NUM_CPUS > 1)
34+
platform_exclude:
35+
- qemu_riscv64/qemu_virt_riscv64/smp # qemu_riscv64 doesn't support custom ROM offset
36+
- qemu_riscv32/qemu_virt_riscv32/smp # qemu_riscv32 doesn't support custom ROM offset
3437
extra_configs:
3538
- CONFIG_SCHED_CPU_MASK=y
3639
- CONFIG_ROM_START_OFFSET=0x80

0 commit comments

Comments
 (0)