Skip to content

Commit

Permalink
Improved handling of unavailable harts
Browse files Browse the repository at this point in the history
Added more handling of unexamined harts

Added even more handling of unexamined harts

Added cleaner handling of unexamined harts

Fixing halt_set_dcsr_ebreak not setting hart explicitly enough

Adding riscv013_halt_current_hart function

Handling harts becoming available when halted

Extending handling of unavailable harts

Ensuring target is selected when resuming it

Making halt_set_dcsr_ebreak more robust

OK if target is unavailble after waiting for halt

Can also use progbuf only for dcsr_ebreak

Using progbuf for set_dcsr_break now works

Handle unavailability when deasserting reset
  • Loading branch information
cgsfv committed May 6, 2024
1 parent 87331a8 commit 0c748e5
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 208 deletions.
12 changes: 12 additions & 0 deletions src/target/riscv/opcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ static uint32_t jal(unsigned int rd, uint32_t imm)
return imm_j(imm) | inst_rd(rd) | MATCH_JAL;
}

static uint32_t csrci(unsigned int csr, uint16_t imm) __attribute__ ((unused));
static uint32_t csrci(unsigned int csr, uint16_t imm)
{
return imm_i(csr) | inst_rs1(imm) | MATCH_CSRRCI;
}

static uint32_t csrsi(unsigned int csr, uint16_t imm) __attribute__ ((unused));
static uint32_t csrsi(unsigned int csr, uint16_t imm)
{
Expand Down Expand Up @@ -143,6 +149,12 @@ static uint32_t csrr(unsigned int rd, unsigned int csr)
return imm_i(csr) | inst_rd(rd) | MATCH_CSRRS;
}

static uint32_t csrrc(unsigned int rd, unsigned int rs, unsigned int csr) __attribute__ ((unused));
static uint32_t csrrc(unsigned int rd, unsigned int rs, unsigned int csr)
{
return imm_i(csr) | inst_rs1(rs) | inst_rd(rd) | MATCH_CSRRC;
}

static uint32_t csrrs(unsigned int rd, unsigned int rs, unsigned int csr) __attribute__ ((unused));
static uint32_t csrrs(unsigned int rd, unsigned int rs, unsigned int csr)
{
Expand Down
Loading

0 comments on commit 0c748e5

Please sign in to comment.