[PATCH] validation: Add wrapped bsp_interrupt_dispatch for MicroBlaze

Alex White alex.white at oarcorp.com
Mon Oct 23 14:13:04 UTC 2023


This adds a MicroBlaze-specific bsp_interrupt_dispatch wrapper which
fixes a linker error.
---
 testsuites/validation/tc-score-isr.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/testsuites/validation/tc-score-isr.c b/testsuites/validation/tc-score-isr.c
index f29abbbfe8..9891829a84 100644
--- a/testsuites/validation/tc-score-isr.c
+++ b/testsuites/validation/tc-score-isr.c
@@ -128,6 +128,23 @@ void __wrap_bsp_interrupt_dispatch( void )
 }
 #endif
 
+#if defined(__microblaze__)
+void __real_bsp_interrupt_dispatch( uint32_t source );
+
+void __wrap_bsp_interrupt_dispatch( uint32_t source );
+
+void __wrap_bsp_interrupt_dispatch( uint32_t source )
+{
+  register uintptr_t sp __asm__( "1" );
+
+  if ( interrupted_stack_at_multitasking_start == 0 ) {
+    interrupted_stack_at_multitasking_start = sp;
+  }
+
+  __real_bsp_interrupt_dispatch( source );
+}
+#endif
+
 #if defined(__PPC__) || defined(__powerpc64__)
 void __real_bsp_interrupt_dispatch( void );
 
-- 
2.34.1



More information about the devel mailing list