Skip to contentSkip to conversation

target/microblaze: Fix mfs from EDR

PATCH In review Edgar E. Iglesias 2 participants 3 messages May 12, 2020 – May 13, 2020

lore
Share & tools
lore
#0 lore raw

cover target/microblaze: Fix mfs from EDR

From: "Edgar E. Iglesias" <[email protected]>

We're missing mfs from EDR support, this adds it.
Showed up in Xilinx Versal PLM code.

Cheers,
Edgar

Tong Ho (1):
target/microblaze: Add MFS Rd,EDR translation

 target/microblaze/translate.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 target/microblaze: Add MFS Rd,EDR translation

From: Tong Ho <[email protected]>

This is to fix cpu-abort with 'qemu: fatal: unknown mfs reg d' (in the default case) when microblaze guest issues 'MFS Rd,EDR' instruction.

Since embeddedsw release 2019.2, XPlm_ExceptionHandler() issues the instruction on exception, and microblaze model aborts when PLM firmware guest encounters an exception.

---
 target/microblaze/translate.c | 1 +
 1 file changed, 1 insertion(+)
target/microblaze/translate.c +1 -0
index 20b7427811..92b3630804 100644
@@ -581,6 +581,7 @@ static void dec_msr(DisasContext *dc)
             case SR_ESR:
             case SR_FSR:
             case SR_BTR:
+            case SR_EDR:
                 tcg_gen_extrl_i64_i32(cpu_R[dc->rd], cpu_SR[sr]);
                 break;
             case 0x800:
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH v1 1/1] target/microblaze: Add MFS Rd,EDR translation

Quoted 6 lines · Edgar E. Iglesias

From: Tong Ho <[email protected]>

This is to fix cpu-abort with 'qemu: fatal: unknown mfs reg d' (in the default case) when microblaze guest issues 'MFS Rd,EDR' instruction.

Quoted 7 lines

Since embeddedsw release 2019.2, XPlm_ExceptionHandler() issues the instruction on exception, and microblaze model aborts when PLM firmware guest encounters an exception.

Quoted 17 lines
---
 target/microblaze/translate.c | 1 +
 1 file changed, 1 insertion(+)
target/microblaze/translate.c +1 -0
index 20b7427811..92b3630804 100644
@@ -581,6 +581,7 @@ static void dec_msr(DisasContext *dc)
             case SR_ESR:
             case SR_FSR:
             case SR_BTR:
+            case SR_EDR:
                 tcg_gen_extrl_i64_i32(cpu_R[dc->rd], cpu_SR[sr]);
                 break;
             case 0x800: