summaryrefslogtreecommitdiff
path: root/arch/xtensa/boot
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2021-07-26 07:25:28 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2021-10-18 22:19:35 -0700
commit09af39f649dac66c2681ca53977275fe876690cc (patch)
tree07db54073ea470f28a96ece0b383a836a20b2c81 /arch/xtensa/boot
parent0b5372570b1f3fcb35255d28e707846e613c27f2 (diff)
xtensa: use register window specific opcodes only when present
xtensa core may be configured without register windows support, don't use register window specific opcodes in that case. Use window register specific opcodes to initialize hardware or reset core to a known state regardless of the chosen ABI. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/boot')
-rw-r--r--arch/xtensa/boot/boot-elf/bootstrap.S2
-rw-r--r--arch/xtensa/boot/boot-redboot/bootstrap.S4
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S
index 99e98c9bae41..2dd28931d699 100644
--- a/arch/xtensa/boot/boot-elf/bootstrap.S
+++ b/arch/xtensa/boot/boot-elf/bootstrap.S
@@ -42,12 +42,14 @@ _bootparam:
.align 4
_SetupMMU:
+#if XCHAL_HAVE_WINDOWED
movi a0, 0
wsr a0, windowbase
rsync
movi a0, 1
wsr a0, windowstart
rsync
+#endif
movi a0, 0x1F
wsr a0, ps
rsync
diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S
index 51e8f3b88e82..3ed94ad35000 100644
--- a/arch/xtensa/boot/boot-redboot/bootstrap.S
+++ b/arch/xtensa/boot/boot-redboot/bootstrap.S
@@ -56,13 +56,13 @@ _start:
movi a4, 1
wsr a4, ps
rsync
-
+#if XCHAL_HAVE_WINDOWED
rsr a5, windowbase
ssl a5
sll a4, a4
wsr a4, windowstart
rsync
-
+#endif
movi a4, KERNEL_PS_WOE_MASK
wsr a4, ps
rsync