mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
hw: prevent alignment faults in bootstrap
Either enable strict-alignment or disable FPU code generation by gcc regarding bootstrap code, which cannot handle alignment faults during initialization properly. Ref genodelabs/genode#4827
This commit is contained in:
parent
37d1855907
commit
5e0a9052d2
@ -1,11 +1,7 @@
|
||||
REP_INC_DIR += src/bootstrap/board/imx53_qsb
|
||||
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a8_mmu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/imx_tzic.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
@ -1,12 +1,8 @@
|
||||
REP_INC_DIR += src/bootstrap/board/imx6q_sabrelite
|
||||
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
SRC_CC += bootstrap/spec/arm/cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a9_mmu.cc
|
||||
SRC_CC += bootstrap/spec/arm/gicv2.cc
|
||||
SRC_CC += bootstrap/spec/arm/imx6_platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
@ -3,14 +3,11 @@ REP_INC_DIR += src/bootstrap/board/imx7d_sabre
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a15_cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/gicv2.cc
|
||||
SRC_CC += bootstrap/board/imx7d_sabre/platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
||||
#
|
||||
# we need more specific compiler hints for some 'special' assembly code
|
||||
# override -march=armv7-a because it conflicts with -mcpu=cortex-a7
|
||||
#
|
||||
CC_MARCH = -mcpu=cortex-a7 -mfpu=vfpv3 -mfloat-abi=softfp
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
CC_MARCH = -mcpu=cortex-a7+nofp -mfpu=vfpv3
|
||||
|
@ -1,12 +1,8 @@
|
||||
REP_INC_DIR += src/bootstrap/board/nit6_solox
|
||||
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
SRC_CC += bootstrap/spec/arm/cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a9_mmu.cc
|
||||
SRC_CC += bootstrap/spec/arm/gicv2.cc
|
||||
SRC_CC += bootstrap/spec/arm/imx6_platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
@ -1,12 +1,8 @@
|
||||
REP_INC_DIR += src/bootstrap/board/pbxa9
|
||||
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
SRC_CC += bootstrap/spec/arm/cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a9_mmu.cc
|
||||
SRC_CC += bootstrap/spec/arm/gicv2.cc
|
||||
SRC_CC += bootstrap/board/pbxa9/platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
@ -1,12 +1,8 @@
|
||||
REP_INC_DIR += src/bootstrap/board/usb_armory
|
||||
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
SRC_CC += bootstrap/board/usb_armory/platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a8_mmu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/imx_tzic.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
@ -1,12 +1,9 @@
|
||||
REP_INC_DIR += src/bootstrap/board/virt_qemu_arm_v7a
|
||||
|
||||
SRC_CC += bootstrap/board/virt_qemu_arm_v7a/platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a15_cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/gicv2.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
CC_MARCH = -march=armv7ve -mtune=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
CC_MARCH = -march=armv7ve+nofp -mtune=cortex-a15 -mfpu=vfpv3
|
||||
|
@ -1,12 +1,8 @@
|
||||
REP_INC_DIR += src/bootstrap/board/wand_quad
|
||||
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
SRC_CC += bootstrap/spec/arm/cpu.cc
|
||||
SRC_CC += bootstrap/spec/arm/cortex_a9_mmu.cc
|
||||
SRC_CC += bootstrap/spec/arm/gicv2.cc
|
||||
SRC_CC += bootstrap/spec/arm/imx6_platform.cc
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw.inc)
|
||||
|
11
repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw.inc
Normal file
11
repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw.inc
Normal file
@ -0,0 +1,11 @@
|
||||
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
|
||||
SRC_CC += hw/spec/32bit/memory_map.cc
|
||||
SRC_S += bootstrap/spec/arm/crt0.s
|
||||
|
||||
#
|
||||
# Disable FPU instructions generated by GCC until MMU is enabled
|
||||
# and alignment restrictions are relaxed
|
||||
#
|
||||
CC_MARCH = -march=armv7-a+nofp -mfpu=vfpv3
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
@ -3,10 +3,5 @@ REP_INC_DIR += src/bootstrap/board/virt_qemu_arm_v8a
|
||||
SRC_CC += bootstrap/spec/arm/gicv3.cc
|
||||
SRC_CC += bootstrap/spec/arm_64/cortex_a53_mmu.cc
|
||||
SRC_CC += bootstrap/board/virt_qemu_arm_v8a/platform.cc
|
||||
SRC_CC += lib/base/arm_64/kernel/interface.cc
|
||||
SRC_CC += spec/64bit/memory_map.cc
|
||||
SRC_S += bootstrap/spec/arm_64/crt0.s
|
||||
|
||||
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
||||
include $(call select_from_repositories,lib/mk/spec/arm_v8/bootstrap-hw.inc)
|
||||
|
9
repos/base-hw/lib/mk/spec/arm_v8/bootstrap-hw.inc
Normal file
9
repos/base-hw/lib/mk/spec/arm_v8/bootstrap-hw.inc
Normal file
@ -0,0 +1,9 @@
|
||||
CC_MARCH = -march=armv8-a -mstrict-align
|
||||
|
||||
SRC_CC += lib/base/arm_64/kernel/interface.cc
|
||||
SRC_CC += spec/64bit/memory_map.cc
|
||||
SRC_S += bootstrap/spec/arm_64/crt0.s
|
||||
|
||||
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
|
||||
|
||||
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
|
Loading…
x
Reference in New Issue
Block a user