u-boot/arch/mips
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
..
cpu mips: Add a reset_cpu() function 2023-12-21 16:07:52 -05:00
dts bmips: Add Inteno XG6846 board 2023-11-06 10:20:21 -05:00
include/asm global: Rework architecture global_data.h to include <linux/types.h> 2023-12-21 08:54:37 -05:00
lib mips: fix change_k0_cca() 2024-03-13 21:15:40 +01:00
mach-ath79 mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
mach-bmips bmips: Add Inteno XG6846 board 2023-11-06 10:20:21 -05:00
mach-jz47xx mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
mach-mscc mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
mach-mtmips mips: Remove common.h usage 2023-10-24 16:34:45 -04:00
mach-octeon common: return type board_get_usable_ram_top 2023-08-15 18:21:17 +02:00
mach-pic32 treewide: Remove clk_free 2024-01-29 22:35:02 -05:00
config.mk Convert CONFIG_STANDALONE_LOAD_ADDR to Kconfig 2022-12-22 10:31:48 -05:00
Kconfig mtd: Make CONFIG_MTD be the gate symbol for the menu 2024-01-22 14:18:54 -05:00
Makefile mips: mtmips: add support for MediaTek MT7621 SoC 2022-07-13 23:03:37 +02:00
Makefile.postlink SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00