Opened 6 years ago
Closed 6 years ago
#783 closed defect (fixed)
Uspace code targeted for ARMv4 contains ARMv5 instructions
Reported by: | Jakub Jermář | Owned by: | Jiří Zárevúcky |
---|---|---|---|
Priority: | major | Milestone: | 0.9.1 |
Component: | gcc/libgcc/arm32 | Version: | mainline |
Keywords: | gta02 | Cc: | |
Blocker for: | Depends on: | ||
See also: |
Description
As of commit 21374e03107e5b1bc843b1d8e853a323ab9db107, HelenOS fails to boot on the OpenMoko Freerunner GTA 02 phone like this:
HelenOS bootloader, release 0.7.2 (Boosted Effort), revision 21374e031 Built on 2018-12-17 22:54:28 for arm32 Copyright (c) 2001-2018 HelenOS project Boot loader: 0x30008000 -> 0x30015d3c Memory statistics 0x30015000|0x30015000: bootstrap stack 0x30010000|0x30010000: bootstrap page table 0x30015838|0x30015838: boot info structure 0xb0a08000|0x30a08000: kernel entry point Boot loader: 0x30008000 -> 0x30015d3c Payload: 0x30015d3c -> 0x309af53c Kernel load address: 0x30a08000 Kernel start: 0xb0a08000 RAM end: 0x31a08000 (16777216 bytes available) Inflating components ... 0xb0a08000|0x30a08000: kernel.elf image (616612/616612 bytes) 0xb0a9f000|0x30a9f000: ns image (110400/110400 bytes) 0xb0aba000|0x30aba000: loader image (110328/110328 bytes) 0xb0ad5000|0x30ad5000: init image (138192/138192 bytes) 0xb0af7000|0x30af7000: locsrv image (126016/126016 bytes) 0xb0b16000|0x30b16000: rd image (116756/116756 bytes) 0xb0b33000|0x30b33000: vfs image (140676/140676 bytes) 0xb0b56000|0x30b56000: logger image (122672/122672 bytes) 0xb0b74000|0x30b74000: ext4fs image (181492/181492 bytes) 0xb0ba1000|0x30ba1000: initrd.img image (8388608/8388608 bytes) Done. Booting the kernel... SPARTAN kernel, release 0.7.2 (Boosted Effort), revision 21374e031 Built on 2018-12-17 22:54:28 for arm32 Copyright (c) 2001-2018 HelenOS project Detected 1 CPU(s), 131040 KiB free memory ######> Kernel panic on cpu0 due to a failed assertion: <###### waitq_sleep_timeout() at generic/src/synch/waitq.c:241: (!PREEMPTION_DISABLED) || (PARAM_NON_BLOCKING(flags, usec)) CURRENT=0xb05f2000: pe=1 thread=0xb05f0000 task=0xb05ef000 cpu=0xb05eb008 as=0xb0009000 magic=0xfacefeed thread="kinit" task="kernel" 0xb05f3dfc: generic/src/debug/stacktrace.o:stack_trace()+0x0000001c 0xb05f3e2c: generic/src/debug/panic.o:panic_common()+0x00000178 0xb05f3e74: generic/src/synch/waitq.o:waitq_sleep_timeout()+0x00000104 0xb05f3e84: generic/src/synch/semaphore.o:_semaphore_down_timeout()+0x00000014 0xb05f3ed4: generic/src/synch/mutex.o:_mutex_lock_timeout()+0x00000044 0xb05f3f2c: generic/src/mm/as.o:as_page_fault()+0x00000060 0xb05f3f64: arch/arm32/src/mm/page_fault.o:data_abort()+0x00000240 0xb05f3f9c: generic/src/interrupt/interrupt.o:exc_dispatch()+0x000000cc 0xb05f3fb4: arch/arm32/src/ras.o:ras_check()+0x00000030 cpu0: halted
Change History (10)
comment:1 by , 6 years ago
comment:3 by , 6 years ago
Milestone: | 0.8.0 → 0.9.1 |
---|
comment:4 by , 6 years ago
This is my configuration:
$ /usr/local/cross/bin/arm-helenos-gcc --print-multi-lib .; thumb;@mthumb arm/autofp/v5te/fpu;@marm@mfpu=auto@march=armv5te+fp@mfloat-abi=hard arm/autofp/v7a/fpu;@marm@mfpu=auto@march=armv7-a+fp@mfloat-abi=hard thumb/autofp/v7a/fpu;@mthumb@mfpu=auto@march=armv7-a+fp@mfloat-abi=hard
comment:5 by , 6 years ago
Component: | helenos/kernel/arm32 → helenos/gcc/libgcc |
---|---|
Summary: | HelenOS does not boot on GTA02 → Uspace code targeted for AMRv4 contains ARMv5 instructions |
comment:6 by , 6 years ago
Summary: | Uspace code targeted for AMRv4 contains ARMv5 instructions → Uspace code targeted for ARMv4 contains ARMv5 instructions |
---|
comment:7 by , 6 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:8 by , 6 years ago
Somehow I omitted support for ARMv4 entirely — it defaulted to ARMv5.
It should be fixed now (9546de7).
comment:9 by , 6 years ago
Thanks for fixing this!
Successfully tested on gta02, rpi and bbone. Please feel free to close the ticket.
comment:10 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
After fixing the zeroed contex_t::cpu_mode in commit 336b7393ec3e072439a0e045724088e669be87d4, the boot now reaches userspace. However, some tasks crash:
The instruction before the reported address is in udivsi3:
CLZ is supported in ARMv5, but GTA02 is ARMv4 only.