From: openocd-gerrit <ope...@us...> - 2023-12-01 22:22:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 15038ab51a3c5811f7ff95c1f995c6e9dfe7d3d0 (commit) from 7ac389cf47463cc35667659804d939015a4815e5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 15038ab51a3c5811f7ff95c1f995c6e9dfe7d3d0 Author: Walter Ji <wal...@os...> Date: Fri Nov 17 11:27:09 2023 +0800 target/mips32: pracc write cp0 status register first When user requested a change on cp0 status register, it may contain changes on EXL/ERL bits, and changes on these bits could lead to differnt behaviours on writing to other cp0 registers. Change-Id: Ic83039988c29c06ee134226b52de943c46d19da2 Signed-off-by: Walter Ji <wal...@os...> Reviewed-on: https://review.openocd.org/c/openocd/+/7914 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 9f0d87cd9..db50ef928 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -842,12 +842,12 @@ int mips32_pracc_write_regs(struct mips32_common *mips32) }; uint32_t cp0_write_data[] = { + /* status */ + c0rs[0], /* lo */ gprs[32], /* hi */ gprs[33], - /* status */ - c0rs[0], /* badvaddr */ c0rs[1], /* cause */ @@ -856,6 +856,9 @@ int mips32_pracc_write_regs(struct mips32_common *mips32) c0rs[3], }; + /* Write CP0 Status Register first, changes on EXL or ERL bits + * may lead to different behaviour on writing to other CP0 registers. + */ for (size_t i = 0; i < ARRAY_SIZE(cp0_write_code); i++) { /* load CP0 value in $1 */ pracc_add_li32(&ctx, 1, cp0_write_data[i], 0); ----------------------------------------------------------------------- Summary of changes: src/target/mips32_pracc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |