From: Anton Blanchard Date: Mon, 8 Aug 2022 21:08:02 +0000 (+1000) Subject: tests/trace: Test trace vs system call interrupt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c27abcc4060589773522e6b32e9156663e3d7b0;p=microwatt.git tests/trace: Test trace vs system call interrupt Signed-off-by: Anton Blanchard --- diff --git a/tests/test_trace.bin b/tests/test_trace.bin index 61fa48b..3c7c7bc 100755 Binary files a/tests/test_trace.bin and b/tests/test_trace.bin differ diff --git a/tests/test_trace.console_out b/tests/test_trace.console_out index 25e791c..2fe36d2 100644 --- a/tests/test_trace.console_out +++ b/tests/test_trace.console_out @@ -6,3 +6,4 @@ test 05:PASS test 06:PASS test 07:PASS test 08:PASS +test 09:PASS diff --git a/tests/trace/head.S b/tests/trace/head.S index 778baaa..cd57e3a 100644 --- a/tests/trace/head.S +++ b/tests/trace/head.S @@ -219,3 +219,8 @@ test7: test8: lfd %f0,0(%r3) blr + + .global test9 +test9: + sc + blr diff --git a/tests/trace/trace.c b/tests/trace/trace.c index a859f4e..908d299 100644 --- a/tests/trace/trace.c +++ b/tests/trace/trace.c @@ -205,6 +205,19 @@ int trace_test_8(void) return 0; } +extern unsigned long test9(unsigned long, unsigned long); + +int trace_test_9(void) +{ + unsigned long ret; + unsigned long regs[2]; + + ret = callit(0, 0, test9, mfmsr() | MSR_SE, regs); + if (ret != 0xc00) + return ret + 1; + return 0; +} + int fail = 0; void do_test(int num, int (*test)(void)) @@ -235,6 +248,7 @@ int main(void) do_test(6, trace_test_6); do_test(7, trace_test_7); do_test(8, trace_test_8); + do_test(9, trace_test_9); return fail; }