)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c64393b23bd305cf3137667877b10fef7abd7d1f","unresolved":true,"context_lines":[{"line_number":10,"context_line":"Add CPx register definitions for target configuration."},{"line_number":11,"context_line":"Add instructions for more flexibility on controlling target."},{"line_number":12,"context_line":"Add FPU/DSP instr for accessing  their registers."},{"line_number":13,"context_line":"Checkpatch-ignore: MACRO_ARG_REUSE, CAMELCASE"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I59c1f4cc4020db8a78e8d79f7421b87382fa1709"},{"line_number":16,"context_line":"Signed-off-by: Walter Ji \u003cwalter.ji@oss.cipunited.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"afbce178_af79b0fd","line":13,"updated":"2023-08-28 09:59:53.000000000","message":"Thanks for the patch.\n\nI think I can accept MACRO_ARG_REUSE, but only because the whole file mips32.h suffers for such issue and this patch simply keeps going with the old incorrect style.\n\nBut I strongly disagree about using CAMELCASE. Coding style reports:\n- most identifiers must use lower-case letters (and digits) only.\n- macros must use upper-case letters (and digits) only.\n- OpenOCD identifiers should NEVER use @c MixedCaps.\n\nIt misses \"enum values\", that should follow macro\u0027s style. I will send out a fix for the documentation.\n\nCamelCase identifiers has been almost fully dropped in last 2 years; I\u0027m not going to accept new ones.","commit_id":"f71aee3afd604b194b6c6ac2e7afa02438cb809d"},{"author":{"_account_id":1002186,"name":"Walter J.","display_name":"Walter Ji","email":"walter.ji@oss.cipunited.com","username":"709924470","status":"Currently working at CIP United Co., Ltd."},"change_message_id":"80ccf55dd3de6e9651cca7062259b86ac38c0f54","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Add CPx register definitions for target configuration."},{"line_number":11,"context_line":"Add instructions for more flexibility on controlling target."},{"line_number":12,"context_line":"Add FPU/DSP instr for accessing  their registers."},{"line_number":13,"context_line":"Checkpatch-ignore: MACRO_ARG_REUSE, CAMELCASE"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I59c1f4cc4020db8a78e8d79f7421b87382fa1709"},{"line_number":16,"context_line":"Signed-off-by: Walter Ji \u003cwalter.ji@oss.cipunited.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d76c8620_a2d401a7","line":13,"in_reply_to":"afbce178_af79b0fd","updated":"2023-09-22 06:48:53.000000000","message":"Done","commit_id":"f71aee3afd604b194b6c6ac2e7afa02438cb809d"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1002186,"name":"Walter J.","display_name":"Walter Ji","email":"walter.ji@oss.cipunited.com","username":"709924470","status":"Currently working at CIP United Co., Ltd."},"change_message_id":"dc047522c209b2b59b8ddb88350d88692bd83a23","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7a79ef8e_28d50db0","updated":"2023-08-29 10:05:31.000000000","message":"Hi! Thanks for the quick reply!\n\nSorry about the camel case naming option and the late reply, I was fixing all the CI fails of each patch in the chain, and I have managed to rename all the fields to snake case with either all capitals or lowercases.","commit_id":"73237cd4324cfd802d067f20e01f3ac74413d8c6"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"042be33a304534295fdc1a9a8436613b72299372","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"a396e06f_feaaed46","updated":"2023-09-15 08:33:01.000000000","message":"Pin it for my self to review it later","commit_id":"73237cd4324cfd802d067f20e01f3ac74413d8c6"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"993f2d5b2ba0f3a5c127e0e2d22ed181c60583b9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0484fb86_90bf8f45","updated":"2023-09-15 18:05:46.000000000","message":"This commit is huge, It is not just doing renaming of defines, but introduce a lot of new code. Pleas split it to meaningful parts.","commit_id":"73237cd4324cfd802d067f20e01f3ac74413d8c6"},{"author":{"_account_id":1002186,"name":"Walter J.","display_name":"Walter Ji","email":"walter.ji@oss.cipunited.com","username":"709924470","status":"Currently working at CIP United Co., Ltd."},"change_message_id":"f1e39bc5b14fa6a5f41f795b1e7afbc50111cdba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5238acad_99f06ea1","in_reply_to":"0484fb86_90bf8f45","updated":"2023-09-22 06:47:27.000000000","message":"Sorry for the late upadte, its a little hard while decoupling the code for core registers, serval parts depends on each other and I had to introduce meaningless code in the chain in order to split them...\n\nAnyway, I have managed to use as little TODOs and other tricks to split it into little patches, let me know if the patch is still unclear. Thanks!","commit_id":"73237cd4324cfd802d067f20e01f3ac74413d8c6"},{"author":{"_account_id":1002186,"name":"Walter J.","display_name":"Walter Ji","email":"walter.ji@oss.cipunited.com","username":"709924470","status":"Currently working at CIP United Co., Ltd."},"change_message_id":"80ccf55dd3de6e9651cca7062259b86ac38c0f54","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"96d2a6ef_084e4e20","in_reply_to":"7a79ef8e_28d50db0","updated":"2023-09-22 06:48:53.000000000","message":"Done","commit_id":"73237cd4324cfd802d067f20e01f3ac74413d8c6"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"66ed675c_afad57e6","updated":"2023-09-23 09:49:41.000000000","message":"As general comment. Thank you for your work. We will still need some rounds but we are on the good way! :)\nPlease try to avoid spaghetti code, it makes reviewing a horror.\nPlease add comments, as many as possible. Not to explain C, but to explain MIPS specific parts","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"5f3b6c4f_d1648501","updated":"2023-09-27 18:20:54.000000000","message":"Looks good now. Please address following comments and we are ready to go with this patch.","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"fb8eea48bc4327f507ec5dba933ae302d4f425dd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"769c7719_32778983","updated":"2023-10-14 16:08:54.000000000","message":"Thanks for the big effort to clean up this patch set.\nI don\u0027t master MIPS target enough to add any comment on the functionality.\nI see something questionable in the way the patch is written, but that\u0027s mainly keeping the same style of the rest of the file, so it should be ok!\nThanks Oleksij for your review!","commit_id":"19a4da1cc609c2f2436fa60fb96cba777b9687ad"}],"src/target/mips32.c":[{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":139,"context_line":"\t{ MIPS32_REGLIST_FP_INDEX + 30, \"f30\", REG_TYPE_IEEE_DOUBLE, NULL,"},{"line_number":140,"context_line":"\t\t\"org.gnu.gdb.mips.fpu\", MIPS32_GDB_FP_REG },"},{"line_number":141,"context_line":"\t{ MIPS32_REGLIST_FP_INDEX + 31, \"f31\", REG_TYPE_IEEE_DOUBLE, NULL,"},{"line_number":142,"context_line":"\t\t\"org.gnu.gdb.mips.fpu\", MIPS32_GDB_FP_REG },"},{"line_number":143,"context_line":"\t{ MIPS32_REGLIST_FPC_INDEX + 0, \"fcsr\", REG_TYPE_INT, \"float\","},{"line_number":144,"context_line":"\t\t\"org.gnu.gdb.mips.fpu\", 0 },"},{"line_number":145,"context_line":"\t{ MIPS32_REGLIST_FPC_INDEX + 1, \"fir\", REG_TYPE_INT, \"float\","}],"source_content_type":"text/x-csrc","patch_set":6,"id":"fcd3182f_5e7fb209","line":142,"updated":"2023-09-23 09:49:41.000000000","message":"please add new line here, it is separate group","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":149,"context_line":"\t{ MIPS32_REGLIST_C0_INDEX + 1, \"badvaddr\", REG_TYPE_INT, NULL, \"org.gnu.gdb.mips.cp0\", 0 },"},{"line_number":150,"context_line":"\t{ MIPS32_REGLIST_C0_INDEX + 2, \"cause\", REG_TYPE_INT, NULL, \"org.gnu.gdb.mips.cp0\", 0 },"},{"line_number":151,"context_line":"\t{ MIPS32_REGLIST_C0_INDEX + 3, \"pc\", REG_TYPE_INT, NULL, \"org.gnu.gdb.mips.cpu\", 0 },"},{"line_number":152,"context_line":"\t{ MIPS32_REGLIST_C0_INDEX + 4, \"guestCtl1\", REG_TYPE_INT, NULL, \"org.gnu.gdb.mips.cp0\", 0 },"},{"line_number":153,"context_line":"};"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"#define MIPS32_NUM_REGS ARRAY_SIZE(mips32_regs)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"717776c7_6b8ad686","line":152,"updated":"2023-09-23 09:49:41.000000000","message":"Please use here:\nMIPS32_REGLIST_C0_STATUS_INDEX\nMIPS32_REGLIST_C0_BADVADDR_INDEX\nMIPS32_REGLIST_C0_CAUSE_INDEX\t\nMIPS32_REGLIST_C0_PC_INDEX\t\nMIPS32_REGLIST_C0_GUESTCTL1_INDEX","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":221,"context_line":"\t\treg_value \u003d mips32-\u003ecore_regs.fpr[cnum];"},{"line_number":222,"context_line":"\t\tbuf_set_u64(mips32-\u003ecore_cache-\u003ereg_list[num].value, 0, 64, reg_value);"},{"line_number":223,"context_line":"\t} else {"},{"line_number":224,"context_line":"\t\t/* GPR */"},{"line_number":225,"context_line":"\t\tcnum \u003d num - 0;"},{"line_number":226,"context_line":"\t\treg_value \u003d mips32-\u003ecore_regs.gpr[cnum];"},{"line_number":227,"context_line":"\t\tbuf_set_u32(mips32-\u003ecore_cache-\u003ereg_list[num].value, 0, 32, reg_value);"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"876d2d60_45ac859d","line":224,"updated":"2023-09-23 09:49:41.000000000","message":"Please use MIPS32_REGLIST_GP_INDEX for consistency","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":false,"context_lines":[{"line_number":221,"context_line":"\t\treg_value \u003d mips32-\u003ecore_regs.fpr[cnum];"},{"line_number":222,"context_line":"\t\tbuf_set_u64(mips32-\u003ecore_cache-\u003ereg_list[num].value, 0, 64, reg_value);"},{"line_number":223,"context_line":"\t} else {"},{"line_number":224,"context_line":"\t\t/* GPR */"},{"line_number":225,"context_line":"\t\tcnum \u003d num - 0;"},{"line_number":226,"context_line":"\t\treg_value \u003d mips32-\u003ecore_regs.gpr[cnum];"},{"line_number":227,"context_line":"\t\tbuf_set_u32(mips32-\u003ecore_cache-\u003ereg_list[num].value, 0, 32, reg_value);"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"3b51eee8_cf8b870b","line":224,"in_reply_to":"876d2d60_45ac859d","updated":"2023-09-27 18:20:54.000000000","message":"Done","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":263,"context_line":"\t\tmips32-\u003ecore_regs.fpr[cnum] \u003d reg_value;"},{"line_number":264,"context_line":"\t} else {"},{"line_number":265,"context_line":"\t\t/* GPR */"},{"line_number":266,"context_line":"\t\tcnum \u003d num - 0;"},{"line_number":267,"context_line":"\t\treg_value \u003d buf_get_u32(mips32-\u003ecore_cache-\u003ereg_list[num].value, 0, 32);"},{"line_number":268,"context_line":"\t\tmips32-\u003ecore_regs.gpr[cnum] \u003d (uint32_t)reg_value;"},{"line_number":269,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"bb960c17_2efce2e9","line":266,"updated":"2023-09-23 09:49:41.000000000","message":"MIPS32_REGLIST_GP_INDEX","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":263,"context_line":"\t\tmips32-\u003ecore_regs.fpr[cnum] \u003d reg_value;"},{"line_number":264,"context_line":"\t} else {"},{"line_number":265,"context_line":"\t\t/* GPR */"},{"line_number":266,"context_line":"\t\tcnum \u003d num - 0;"},{"line_number":267,"context_line":"\t\treg_value \u003d buf_get_u32(mips32-\u003ecore_cache-\u003ereg_list[num].value, 0, 32);"},{"line_number":268,"context_line":"\t\tmips32-\u003ecore_regs.gpr[cnum] \u003d (uint32_t)reg_value;"},{"line_number":269,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"4a0208d9_35aea6f1","line":266,"in_reply_to":"bb960c17_2efce2e9","updated":"2023-09-27 18:20:54.000000000","message":"Still not resolved. cnum \u003d num - MIPS32_REGLIST_GP_INDEX","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":300,"context_line":"\tstruct mips32_common *mips32 \u003d target_to_mips32(target);"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"\t/* read core registers */"},{"line_number":303,"context_line":"\tmips32_pracc_read_regs(mips32);"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"\tfor (i \u003d 0; i \u003c MIPS32_NUM_REGS; i++) {"},{"line_number":306,"context_line":"\t\tif (!mips32-\u003ecore_cache-\u003ereg_list[i].valid)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"71f0505a_297566a1","line":303,"updated":"2023-09-23 09:49:41.000000000","message":"mips32_pracc_read_regs() and mips32_pracc_write_regs() may return error. It is out of scope for this patch, but it will be nice if you can check for error in a separate patch.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":372,"context_line":"\t\tarch_info[i].mips32_common \u003d mips32;"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"\t\treg_list[i].name \u003d mips32_regs[i].name;"},{"line_number":375,"context_line":"\t\treg_list[i].size \u003d mips32_regs[i].flag ? 64 : 32;"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"\t\treg_list[i].value \u003d mips32_regs[i].flag ? calloc(1, 8) : calloc(1, 4);"},{"line_number":378,"context_line":"\t\treg_list[i].valid \u003d false;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"acf27cba_0cbc9fc2","line":375,"updated":"2023-09-23 09:49:41.000000000","message":"Usually variables with names flag or flags are used as bit fields. This one is used as enum signaling MIPS register type. But actually needed infrormation is size. Please rename flag to size.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":795,"context_line":"\treturn ERROR_OK;"},{"line_number":796,"context_line":"}"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"static uint32_t mips32_determine_cputype_from_prid(uint32_t prid, uint32_t config, uint32_t config1)"},{"line_number":799,"context_line":"{"},{"line_number":800,"context_line":"\tuint32_t cpu_type;"},{"line_number":801,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":6,"id":"09b6937f_3371767e","line":798,"updated":"2023-09-23 09:49:41.000000000","message":"This part should go to a separate patch. There is already mips32_cpu_probe() function partially ported from linux kernel","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":812,"context_line":"\t\t/* Lexra */"},{"line_number":813,"context_line":"\t\treturn (uint32_t)MIPS32_CPU_LEXRA;"},{"line_number":814,"context_line":""},{"line_number":815,"context_line":"\tif ((prid \u0026 PRID_COMP_MASK) \u003d\u003d PRID_COMP_ALCHEMY) {"},{"line_number":816,"context_line":"\t\t/* AMD Alchemy processors */"},{"line_number":817,"context_line":"\t\tswitch ((prid \u003e\u003e 24) \u0026 0xff) {"},{"line_number":818,"context_line":"\t\t\tcase 0x00:"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"f1e8c28d_67da7416","line":815,"updated":"2023-09-23 09:49:41.000000000","message":"please move this scope to a separate function","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":843,"context_line":"\t\treturn cpu_type;"},{"line_number":844,"context_line":"\t}"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"\tswitch ((prid \u003e\u003e 8) \u0026 0xff) {\t/* MIPS Technologies cores */"},{"line_number":847,"context_line":"\t\tcase 0x80:"},{"line_number":848,"context_line":"\t\t\tcpu_type \u003d MIPS32_CPU_4KC;"},{"line_number":849,"context_line":"\t\t\tbreak;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"80f16ebf_18e3b54e","line":846,"updated":"2023-09-23 09:49:41.000000000","message":"please move this scope to a separate function too.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":1032,"context_line":"{"},{"line_number":1033,"context_line":"\tstruct mips32_common *mips32 \u003d target_to_mips32(target);"},{"line_number":1034,"context_line":"\tstruct mips_ejtag *ejtag_info \u003d \u0026mips32-\u003eejtag_info;"},{"line_number":1035,"context_line":"\tchar buf[128] \u003d {0};"},{"line_number":1036,"context_line":"\tint retval;"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"\tif (ejtag_info-\u003econfig_regs \u003d\u003d 0)"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"3274fdec_4b2901c0","line":1035,"updated":"2023-09-23 09:49:41.000000000","message":"please use define or comment explaining why we have magic 128 size of buffer.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":1051,"context_line":"\t\treturn ERROR_OK;\t/* already successfully read */"},{"line_number":1052,"context_line":""},{"line_number":1053,"context_line":"\tLOG_DEBUG(\"read  %\"PRIu32\" config registers\", ejtag_info-\u003econfig_regs);"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"\tmips32-\u003eisa_rel \u003d (ejtag_info-\u003econfig[0] \u0026 MIPS32_CONFIG0_AR_MASK) \u003e\u003e MIPS32_CONFIG0_AR_SHIFT;"},{"line_number":1056,"context_line":"\tsprintf(buf, \", release %s(AR\u003d%d)\","},{"line_number":1057,"context_line":"\t\t\tmips32-\u003eisa_rel \u003d\u003d MIPS32_RELEASE_1 ? \"1\""}],"source_content_type":"text/x-csrc","patch_set":6,"id":"4ef2f198_bbf53963","line":1054,"updated":"2023-09-23 09:49:41.000000000","message":"It is not your fault, but name of this function and things which are here done do not really fit to each other. Since you already reworking it, please keep pnly config register reading part here and move config detection part to the mips32_cpu_probe. Please try to split this code to separate functions.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":1053,"context_line":"\tLOG_DEBUG(\"read  %\"PRIu32\" config registers\", ejtag_info-\u003econfig_regs);"},{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"\tmips32-\u003eisa_rel \u003d (ejtag_info-\u003econfig[0] \u0026 MIPS32_CONFIG0_AR_MASK) \u003e\u003e MIPS32_CONFIG0_AR_SHIFT;"},{"line_number":1056,"context_line":"\tsprintf(buf, \", release %s(AR\u003d%d)\","},{"line_number":1057,"context_line":"\t\t\tmips32-\u003eisa_rel \u003d\u003d MIPS32_RELEASE_1 ? \"1\""},{"line_number":1058,"context_line":"\t\t\t: mips32-\u003eisa_rel \u003d\u003d MIPS32_RELEASE_2 ? \"2\""},{"line_number":1059,"context_line":"\t\t\t: mips32-\u003eisa_rel \u003d\u003d MIPS32_RELEASE_6 ? \"6\""}],"source_content_type":"text/x-csrc","patch_set":6,"id":"8aa928fd_42ce6d16","line":1056,"updated":"2023-09-23 09:49:41.000000000","message":"Never trust sprintf(), please use snprintf() instead.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":1134,"context_line":"\t\tLOG_ERROR(\"failed to read EJTAG_DCR register\");"},{"line_number":1135,"context_line":"\t\treturn retval;"},{"line_number":1136,"context_line":"\t}"},{"line_number":1137,"context_line":""},{"line_number":1138,"context_line":"\tif ((((dcr \u003e\u003e 18) \u0026 0x1) \u003d\u003d 1) \u0026\u0026 ((ejtag_info-\u003econfig[3] \u0026 0x00000008) !\u003d 0)) {"},{"line_number":1139,"context_line":"\t\tmips32-\u003efdc \u003d 1;"},{"line_number":1140,"context_line":"\t\tmips32-\u003esemihosting \u003d 1;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"d19a6171_bdf10635","line":1137,"updated":"2023-09-23 09:49:41.000000000","message":"please use defines where possible","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"}],"src/target/mips32.h":[{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":224,"context_line":"#define MIPS32_REG_C0_PC_INDEX\t\t\t3"},{"line_number":225,"context_line":"#define MIPS32_REG_C0_GUESTCTL1_INDEX\t\t4"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"#define MIPS32NUMDSPREGS 9"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"enum mips32_isa_mode {"},{"line_number":230,"context_line":"\tMIPS32_ISA_MIPS32 \u003d 0,"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"261246de_ef0ea39a","line":227,"updated":"2023-09-27 18:20:54.000000000","message":"Not used","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"}],"src/target/mips32_pracc.c":[{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":856,"context_line":"\t\tc0rs[3],"},{"line_number":857,"context_line":"\t};"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"\t/* write CP0 first because the user can request a change to status.{fr,cu1} */"},{"line_number":860,"context_line":"\tfor (int i \u003d 0; i !\u003d 6; i++) {"},{"line_number":861,"context_line":"\t\t/* load CP0 value in $1 */"},{"line_number":862,"context_line":"\t\tpracc_add_li32(\u0026ctx, 1, cp0_write_data[i], 0);"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"b6efecf3_87e3ce42","line":859,"updated":"2023-09-23 09:49:41.000000000","message":"This reordering seems to address some separate issue. Can you please move it in the separate patch previous to this one and explain what issues it is trying to fix.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"793c8539f5701631afce50bd7b2b5d4eb9b72100","unresolved":true,"context_lines":[{"line_number":857,"context_line":"\t};"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"\t/* write CP0 first because the user can request a change to status.{fr,cu1} */"},{"line_number":860,"context_line":"\tfor (int i \u003d 0; i !\u003d 6; i++) {"},{"line_number":861,"context_line":"\t\t/* load CP0 value in $1 */"},{"line_number":862,"context_line":"\t\tpracc_add_li32(\u0026ctx, 1, cp0_write_data[i], 0);"},{"line_number":863,"context_line":"\t\t/* write value from $1 to CP0 register */"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"60ca05ef_3fbe8968","line":860,"updated":"2023-09-23 09:49:41.000000000","message":"Not introduced by you, but can be fixed. I assume\ni !\u003d 6 can be replaced by i \u003c ARRAY_SIZE(cp0_write_code) in this patch.","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"08adc66a025d8add449715dcfc0d09999f0dc5a8","unresolved":true,"context_lines":[{"line_number":902,"context_line":"\t * Step 1: Read everything except CP1 stuff"},{"line_number":903,"context_line":"\t * Step 2: Read CP1 stuff if FP is implemented"},{"line_number":904,"context_line":"\t */"},{"line_number":905,"context_line":""},{"line_number":906,"context_line":"begin_pracc:"},{"line_number":907,"context_line":"\tpracc_queue_init(\u0026ctx);"},{"line_number":908,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":6,"id":"1e803abf_203910a7","line":905,"updated":"2023-09-23 10:10:34.000000000","message":"please split this function.\nLines 921 - 925 mips32_pracc_set_base_addr?\nLines 926 -950 - mips32_pracc_store_regs_gpr, mips32_pracc_store_regs_lohi, mips32_pracc_store_regs_cp0\nlines 955 - 966 - mips32_pracc_save_restore_reg1?\nlines 974 - mips32_pracc_is_fp_accessible()?","commit_id":"c0062505381e0408b8ae1c55c4737c973755bf5e"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":884,"context_line":"\treturn ctx.retval;"},{"line_number":885,"context_line":"}"},{"line_number":886,"context_line":""},{"line_number":887,"context_line":"// Saves content in `$1` to `DeSave(cp0.31.0)` and loads `MIPS32_PRACC_BASE_ADDR` into `$1`"},{"line_number":888,"context_line":"static void mips32_pracc_store_regs_set_base_addr(struct pracc_queue_info *ctx)"},{"line_number":889,"context_line":"{"},{"line_number":890,"context_line":"\t/* move $1 to COP0 DeSave */"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"6c84fa7a_79638e75","line":887,"updated":"2023-09-27 18:20:54.000000000","message":"Please use /* .. */ style comments","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":894,"context_line":"}"},{"line_number":895,"context_line":""},{"line_number":896,"context_line":"// This function assumes the address for saving is stored in `$1`."},{"line_number":897,"context_line":"// And that action is performed in `mips32_pracc_set_save_base_addr`."},{"line_number":898,"context_line":"static void mips32_pracc_store_regs_gpr(struct pracc_queue_info *ctx, unsigned int offset_gpr)"},{"line_number":899,"context_line":"{"},{"line_number":900,"context_line":"\tfor (int i \u003d 2; i !\u003d 32; i++)"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"6ae13aae_978d2d23","line":897,"updated":"2023-09-27 18:20:54.000000000","message":"Same here:\n/*\n *\n */","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":919,"context_line":"\t}"},{"line_number":920,"context_line":"}"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"// Saves CP0 registers [status, badvaddr, cause, depc]"},{"line_number":923,"context_line":"static void mips32_pracc_store_regs_cp0_context(struct pracc_queue_info *ctx, unsigned int offset_cp0)"},{"line_number":924,"context_line":"{"},{"line_number":925,"context_line":"\tuint32_t cp0_read_code[] \u003d {"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"e182c17b_053fbcb7","line":922,"updated":"2023-09-27 18:20:54.000000000","message":"And here","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":943,"context_line":""},{"line_number":944,"context_line":"// Loads original content of $1 into $8,"},{"line_number":945,"context_line":"// then store it to the batch data access address."},{"line_number":946,"context_line":"// After that, restores $1 from DeSave."},{"line_number":947,"context_line":"static void mips32_pracc_store_regs_restore(struct pracc_queue_info *ctx)"},{"line_number":948,"context_line":"{"},{"line_number":949,"context_line":"\t/* move DeSave to $8, reg1 value */"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"fd0b51e5_c373d28a","line":946,"updated":"2023-09-27 18:20:54.000000000","message":"same here","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"},{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"4f2c9b8c34491d39a7f6163db9f30e68ba2a711e","unresolved":true,"context_lines":[{"line_number":1007,"context_line":"\t/* now we know what\u0027s in cp0.status */"},{"line_number":1008,"context_line":"\tstatus_cu1 \u003d (mips32-\u003ecore_regs.cp0[0] \u003e\u003e MIPS32_CP0_STATUS_CU1_SHIFT) \u0026 0x1;"},{"line_number":1009,"context_line":"\tif (status_cu1) {"},{"line_number":1010,"context_line":"\t\t// pracc_queue_init(\u0026ctx);"},{"line_number":1011,"context_line":"\t\t// TODO: store FPRs"},{"line_number":1012,"context_line":"\t\t// pracc_queue_free(\u0026ctx);"},{"line_number":1013,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":8,"id":"254ce1b4_aeab6b25","line":1010,"updated":"2023-09-27 18:20:54.000000000","message":"This part is not implemented in this patch, please move it to separate one","commit_id":"7c348cced7fe8c824fdf5623c24eeb2038036646"}]}
