u-boot/arch/mips/lib
Daniel Schwierzeck 6806a133cd mips: fix change_k0_cca()
The intention of change_k0_cca() is to read the C0.Config register into
register $t0, update $t0 with the new cache coherency mode passed in $a0
and write back $t0 to C0.Config. With MIPS32 R2 or later instruction
sets, this can be achieved with a single instruction with INS. The
source and destination register of the INS instruction is passed as
first parameter. In case of change_k0_cca() it is register $t0. But
for writing back the updated value to C0.Config, the incorrect $a0
register is used. This is only correct in the MIPS32 R1 code path.

Fix the `mtc0` instruction to write back the value of the $t0 register.
Fix the MIPS32 R1 code path to also store the updated value in $t0.

Reported by user ddqxy138 on Github.
b838586086

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2024-03-13 21:15:40 +01:00
..
ashldi3.c dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
ashrdi3.c dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
asm-offsets.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
boot.c mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
bootm.c bootm: Rename do_bootm_states() to bootm_run_states() 2023-12-21 16:07:52 -05:00
cache.c mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
cache_init.S mips: fix change_k0_cca() 2024-03-13 21:15:40 +01:00
genex.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
libgcc.h dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
lshrdi3.c dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
Makefile mips: implement __udivdi3 2024-03-13 21:15:40 +01:00
reloc.c mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
spl.c mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
stack.c mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
traps.c mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
udivdi3.c mips: implement __udivdi3 2024-03-13 21:15:40 +01:00