mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-19 13:11:30 +00:00
arm/lib/bootm.c: keep ARM v7M in thumb mode during boot_jump_linux()
On ARM v7M, the processor will return to ARM mode when executing
a blx instruction with bit 0 of the address == 0. Always set it
to 1 to stay in thumb mode.
Tested on STM32f746-disco board
Similar commit:
f99993c108
Author: Matt Porter <mporter@konsulko.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
parent
a93fbf4a78
commit
dc89c6fb77
1 changed files with 4 additions and 1 deletions
|
@ -356,7 +356,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
|
||||||
int fake = (flag & BOOTM_STATE_OS_FAKE_GO);
|
int fake = (flag & BOOTM_STATE_OS_FAKE_GO);
|
||||||
|
|
||||||
kernel_entry = (void (*)(int, int, uint))images->ep;
|
kernel_entry = (void (*)(int, int, uint))images->ep;
|
||||||
|
#ifdef CONFIG_CPU_V7M
|
||||||
|
ulong addr = (ulong)kernel_entry | 1;
|
||||||
|
kernel_entry = (void *)addr;
|
||||||
|
#endif
|
||||||
s = getenv("machid");
|
s = getenv("machid");
|
||||||
if (s) {
|
if (s) {
|
||||||
if (strict_strtoul(s, 16, &machid) < 0) {
|
if (strict_strtoul(s, 16, &machid) < 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue