You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update baremetal-semihosting-aarch64 sample make.bat for qemu (#232) (#233)
This applies the change #227
Makefile to the Windows make.bat. The rest of the commit message is the
same as that PR.
Make a temporary fix to avoid a couple of problems with the startup code
on more recent qemu versions, such as the recent 9.2.2 release.
The first problem is that the thunk generated for the branch from _start
to _cstart loads the destination address from a literal. As this thunk
executes before the memory is set up we get an abort on the read. Fix
this by forcing the linker to use a position independent thunk that is
execute-only.
The second problem is that the picolibc startup code assumes that
qemu-system-aarch64 will start in EL1. This is not always the case. When
--kernel is an ELF file qemu will start in EL3, when --kernel is not ELF
then qemu will start in either EL2 (if implemented) or EL1, with EL2
preferred. When starting up in EL2 this means that the startup code
writing to EL1 system registers is not being used while still executing
in EL2, including enabling unaligned access. To work around this disable
unaligned accesses.
Ideally this needs fixing in the startup code. Which should test at run
time what exception level it starts in and switch to EL1 if not in EL1.
0 commit comments