hw/intc: If mmsiaddrcfgh.L == 1, smsiaddrcfg and smsiaddrcfgh are read-only.
PATCH 1/1 hw/intc: If mmsiaddrcfgh.L == 1, smsiaddrcfg and smsiaddrcfgh are read-only.
According to the The RISC-V Advanced Interrupt Architecture document, if register mmsiaddrcfgh of the domain has bit L set to one, then smsiaddrcfg and smsiaddrcfgh are locked as read-only alongside mmsiaddrcfg and mmsiaddrcfgh.
--- hw/intc/riscv_aplic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/intc/riscv_aplic.c +2 -2
@@ -688,13 +688,13 @@ static void riscv_aplic_write(void *opaque, hwaddr addr, uint64_t value,* domains). */ if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddr = value; } }else if (aplic->mmode && aplic->msimode && (addr ==APLIC_SMSICFGADDRH )) {if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddrH = value & APLIC_xMSICFGADDRH_VALID_MASK; } } else if ((APLIC_SETIP_BASE <= addr) &&
Signature · 1 line
2.31.1
Quoted 8 lines · Tommy Wu
According to the
The RISC-V Advanced Interrupt Architecturedocument, if registermmsiaddrcfghof the domain has bit L set to one, thensmsiaddrcfgandsmsiaddrcfghare locked as read-only alongsidemmsiaddrcfgandmmsiaddrcfgh.Signed-off-by Tommy Wu <[email protected]>Reviewed-by Frank Chang <[email protected]>
Alistair
Quoted 28 lines
--- hw/intc/riscv_aplic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/intc/riscv_aplic.c +2
-3@@ -688,13 +688,13 @@ static void riscv_aplic_write(void *opaque, hwaddr addr, uint64_t value,* domains). */ if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddr = value; } }else if (aplic->mmode && aplic->msimode && (addr ==APLIC_SMSICFGADDRH )) {if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddrH = value & APLIC_xMSICFGADDRH_VALID_MASK; } } else if ((APLIC_SETIP_BASE <= addr) && --2.31.1
Quoted 8 lines · Tommy Wu
According to the
The RISC-V Advanced Interrupt Architecturedocument, if registermmsiaddrcfghof the domain has bit L set to one, thensmsiaddrcfgandsmsiaddrcfghare locked as read-only alongsidemmsiaddrcfgandmmsiaddrcfgh.Signed-off-by Tommy Wu <[email protected]>Reviewed-by Frank Chang <[email protected]>
Looks good to me.
Quoted 27 lines
--- hw/intc/riscv_aplic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/intc/riscv_aplic.c +2
-3@@ -688,13 +688,13 @@ static void riscv_aplic_write(void *opaque, hwaddr addr, uint64_t value,* domains). */ if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddr = value; } }else if (aplic->mmode && aplic->msimode && (addr ==APLIC_SMSICFGADDRH )) {if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddrH = value & APLIC_xMSICFGADDRH_VALID_MASK; } } else if ((APLIC_SETIP_BASE <= addr) && --2.31.1
Alistair Francis
AppliedQuoted 8 lines · Tommy Wu
According to the
The RISC-V Advanced Interrupt Architecturedocument, if registermmsiaddrcfghof the domain has bit L set to one, thensmsiaddrcfgandsmsiaddrcfghare locked as read-only alongsidemmsiaddrcfgandmmsiaddrcfgh.Signed-off-by Tommy Wu <[email protected]>Reviewed-by Frank Chang <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 28 lines
--- hw/intc/riscv_aplic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/intc/riscv_aplic.c +2
-3@@ -688,13 +688,13 @@ static void riscv_aplic_write(void *opaque, hwaddr addr, uint64_t value,* domains). */ if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddr = value; } }else if (aplic->mmode && aplic->msimode && (addr ==APLIC_SMSICFGADDRH )) {if (aplic->num_children && - !(aplic->smsicfgaddrH & APLIC_xMSICFGADDRH_L)) { + !(aplic->mmsicfgaddrH & APLIC_xMSICFGADDRH_L)) { aplic->smsicfgaddrH = value & APLIC_xMSICFGADDRH_VALID_MASK; } } else if ((APLIC_SETIP_BASE <= addr) && --2.31.1
Quoted 8 lines · Alistair Francis
Quoted 6 lines · Tommy Wu
According to the
The RISC-V Advanced Interrupt Architecturedocument, if registermmsiaddrcfghof the domain has bit L set to one, thensmsiaddrcfgandsmsiaddrcfghare locked as read-only alongsidemmsiaddrcfgandmmsiaddrcfgh.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Tommy Wu <[email protected]>Reviewed-by Frank Chang <[email protected]>Thanks!
Applied to riscv-to-apply.next
If it hasn't gone in already, would you mind tweaking the subject line so that it says which interrupt controller the change is for ? (ie "hw/intc/riscv_aplic", not just "hw/intc".)
thanks
-- PMM
Quoted 13 lines · Peter Maydell
Quoted 11 lines · Alistair Francis
Quoted 8 lines · Tommy Wu
According to the
The RISC-V Advanced Interrupt Architecturedocument, if registermmsiaddrcfghof the domain has bit L set to one, thensmsiaddrcfgandsmsiaddrcfghare locked as read-only alongsidemmsiaddrcfgandmmsiaddrcfgh.Signed-off-by Tommy Wu <[email protected]>Reviewed-by Frank Chang <[email protected]>
Quoted 7 lines
Quoted 3 lines
Thanks!
Applied to riscv-to-apply.next
If it hasn't gone in already, would you mind tweaking the subject line so that it says which interrupt controller the change is for ? (ie "hw/intc/riscv_aplic", not just "hw/intc".)
Sorry Peter, it's already in. I'll try to keep a closer eye on the commit titles in future
Alistair
Quoted 3 lines
thanks
-- PMM