From 23b183fb168a50e2e0599b4905bdcef1761e65db Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 16 Jan 2025 19:06:00 +1100 Subject: [PATCH] tests/reservation: Check that SRR0 is set correctly on alignment interrupt The tests that intentionally generate alignment interrupts now also check that SRR0 is pointing to a l*arx or st*cx instruction. Signed-off-by: Paul Mackerras --- tests/reservation/reservation.c | 7 +++++++ tests/test_reservation.bin | Bin 11588 -> 11692 bytes 2 files changed, 7 insertions(+) diff --git a/tests/reservation/reservation.c b/tests/reservation/reservation.c index 502b285..9ae2921 100644 --- a/tests/reservation/reservation.c +++ b/tests/reservation/reservation.c @@ -157,6 +157,7 @@ int resv_test_2(void) { unsigned long x[3]; unsigned long offset, j, size, ret; + unsigned int instr; x[0] = 1234; x[1] = x[2] = 0; @@ -169,6 +170,9 @@ int resv_test_2(void) if (ret == 0x600) { if ((offset & (size - 1)) == 0) return j + 0x10; + instr = *(unsigned int *)mfspr(SRR0); + if ((instr & 0xfc00073f) != 0x7c000028) + return j + 0x40; } else if (ret) return ret; ret = callit(size, (unsigned long)&x[0] + offset, do_stcx); @@ -177,6 +181,9 @@ int resv_test_2(void) if (ret == 0x600) { if ((offset & (size - 1)) == 0) return j + 0x30; + instr = *(unsigned int *)mfspr(SRR0); + if ((instr & 0xfc00033f) != 0x7c00012d) + return j + 0x50; } else if (ret) return ret; } diff --git a/tests/test_reservation.bin b/tests/test_reservation.bin index 9c9ad8f957c83a99af0adbe2666c392eeb2f3f6f..7d3f0a522263d2e076be74792f392e87d53bc9fa 100755 GIT binary patch delta 762 zcmZ8dT}V@57=FLgHl0pUTqM}Vw&Ui}9pOY>I8UiFi=jaavdp}g+Jz8-l@~`?J81?L zUIefGSgRI6G>A&{qSC^Px`{57%yF>sa*rL~4Xr$YcNqO`zQ3^p?6ke=YY?xs+F44}B{j-|N1)?8c5u%U~{x9T=5pr)OBuIJ_=?u7< z1C>%CU1sn|HNh6iM4UdXY_sw3O0nZMeCR4+FEQyl$eMANSip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