Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit a3f2ad1

Browse files
author
ALTracer
committed
riscv_debug: Preserve already set hart flags when enabling SysBus
1 parent d16b5e0 commit a3f2ad1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/target/riscv_debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ static void riscv_hart_memory_access_type(target_s *const target)
10241024
!(sysbus_status & RV_DM_SYSBUS_STATUS_ADDR_WIDTH_MASK))
10251025
return;
10261026
/* If all the checks passed, we now have a valid system bus so can proceed with using it for memory access */
1027-
hart->flags = RV_HART_FLAG_MEMORY_SYSBUS | (sysbus_status & RV_HART_FLAG_ACCESS_WIDTH_MASK);
1027+
hart->flags |= RV_HART_FLAG_MEMORY_SYSBUS | (sysbus_status & RV_HART_FLAG_ACCESS_WIDTH_MASK);
10281028
/* System Bus also means the target can have memory read without halting */
10291029
target->target_options |= TOPT_NON_HALTING_MEM_IO;
10301030
/* Make sure the system bus is not in any kind of error state */

0 commit comments

Comments
 (0)