Skip to content

Commit e008f7b

Browse files
committed
fixes clicintctl addr range matching
1 parent 5f47d84 commit e008f7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/iss/mem/clic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ template <typename WORD_TYPE> iss::status clic<WORD_TYPE>::read_clic(uint64_t ad
272272
return iss::Ok;
273273
#endif
274274
} else if(addr >= (cfg.clic_base + 0x1000) &&
275-
addr <= (cfg.clic_base + 0x1000 + cfg.clic_num_irq * 4)) { // clicintip/clicintie/clicintattr/clicintctl
275+
addr < (cfg.clic_base + 0x1000 + cfg.clic_num_irq * 4)) { // clicintip/clicintie/clicintattr/clicintctl
276276
auto offset = ((addr & 0x7fff) - 0x1000) / 4;
277277
read_reg_with_offset(clic_int_reg[offset].raw, addr & 0x3, data, length);
278278
return iss::Ok;
@@ -294,7 +294,7 @@ template <typename WORD_TYPE> iss::status clic<WORD_TYPE>::write_clic(uint64_t a
294294
return iss::Ok;
295295
#endif
296296
} else if(addr >= (cfg.clic_base + 0x1000) &&
297-
addr <= (cfg.clic_base + 0x1000 + cfg.clic_num_irq * 4)) { // clicintip/clicintie/clicintattr/clicintctl
297+
addr < (cfg.clic_base + 0x1000 + cfg.clic_num_irq * 4)) { // clicintip/clicintie/clicintattr/clicintctl
298298
auto offset = ((addr & 0x7fff) - 0x1000) / 4;
299299
write_reg_with_offset(clic_int_reg[offset].raw, addr & 0x3, data, length);
300300
clic_int_reg[offset].raw &= 0xf0c70101; // clicIntCtlBits->0xf0, clicintattr->0xc7, clicintie->0x1, clicintip->0x1

0 commit comments

Comments
 (0)