Riscv software model now implement interrupt priority accordingly to 496c59d064 (diff-a38d447c5232bd448697af4c6c8adb1a)
changes
This commit is contained in:
parent
d7ca153c8b
commit
14efe6ffda
|
@ -637,15 +637,19 @@ public:
|
||||||
masked = getIp().raw & mideleg & -sEnabled & ie.raw & 0x333;
|
masked = getIp().raw & mideleg & -sEnabled & ie.raw & 0x333;
|
||||||
|
|
||||||
if (masked) {
|
if (masked) {
|
||||||
if (masked & (MIP_MEIP | MIP_SEIP))
|
if (masked & MIP_MEIP)
|
||||||
masked &= (MIP_MEIP | MIP_SEIP);
|
masked &= MIP_MEIP;
|
||||||
// software interrupts have next-highest priority
|
else if (masked & MIP_MSIP)
|
||||||
else if (masked & (MIP_MSIP | MIP_SSIP))
|
masked &= MIP_MSIP;
|
||||||
masked &= (MIP_MSIP | MIP_SSIP);
|
else if (masked & MIP_MTIP)
|
||||||
// timer interrupts have next-highest priority
|
masked &= MIP_MTIP;
|
||||||
else if (masked & (MIP_MTIP | MIP_STIP))
|
else if (masked & MIP_SEIP)
|
||||||
masked &= (MIP_MTIP | MIP_STIP);
|
masked &= MIP_SEIP;
|
||||||
else
|
else if (masked & MIP_SSIP)
|
||||||
|
masked &= MIP_SSIP;
|
||||||
|
else if (masked & MIP_STIP)
|
||||||
|
masked &= MIP_STIP;
|
||||||
|
else
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue