diff --git a/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h b/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h index 3eebd3fa19d1149..4a614cfdbcd5329 100644 --- a/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h +++ b/subsys/mgmt/mcumgr/grp/os_mgmt/include/os_mgmt_processor.h @@ -126,6 +126,8 @@ extern "C" { #define PROCESSOR_NAME "riscv" #elif defined(CONFIG_XTENSA) #define PROCESSOR_NAME "xtensa" +#elif defined(CONFIG_MICROBLAZE) +#define PROCESSOR_NAME "microblaze" #endif #ifndef PROCESSOR_NAME diff --git a/tests/kernel/context/src/main.c b/tests/kernel/context/src/main.c index 0a99e4ccb526377..1d344b53fecaa77 100644 --- a/tests/kernel/context/src/main.c +++ b/tests/kernel/context/src/main.c @@ -65,6 +65,8 @@ * unless TICK_IRQ is defined here for them */ #endif /* defined(CONFIG_ARCH_POSIX) */ +#elif defined(CONFIG_MICROBLAZE) && defined(CONFIG_XLNX_TMRCTR) +#define TICK_IRQ DT_IRQN(DT_INST(CONFIG_XLNX_TMRCTR_TIMER_INDEX, xlnx_tmrctr)) #else extern const int32_t z_sys_timer_irq_for_test; @@ -72,10 +74,10 @@ extern const int32_t z_sys_timer_irq_for_test; #endif -/* Cortex-M1, Nios II, and RISCV without CONFIG_RISCV_HAS_CPU_IDLE +/* Cortex-M1, Nios II, MicroBlaze, and RISCV without CONFIG_RISCV_HAS_CPU_IDLE * do have a power saving instruction, so k_cpu_idle() returns immediately */ -#if !defined(CONFIG_CPU_CORTEX_M1) && !defined(CONFIG_NIOS2) && \ +#if !defined(CONFIG_CPU_CORTEX_M1) && !defined(CONFIG_NIOS2) && !defined(CONFIG_MICROBLAZE) && \ (!defined(CONFIG_RISCV) || defined(CONFIG_RISCV_HAS_CPU_IDLE)) #define HAS_POWERSAVE_INSTRUCTION #endif diff --git a/tests/kernel/fatal/exception/src/main.c b/tests/kernel/fatal/exception/src/main.c index 51b338183e6d61d..f5a2cc895370d2d 100644 --- a/tests/kernel/fatal/exception/src/main.c +++ b/tests/kernel/fatal/exception/src/main.c @@ -87,7 +87,8 @@ void entry_cpu_exception(void *p1, void *p2, void *p3) __asm__ volatile (".word 0x77777777"); #else /* Triggers usage fault on ARM, illegal instruction on - * xtensa, TLB exception (instruction fetch) on MIPS. + * xtensa, TLB exception (instruction fetch) on MIPS, + * illegal op-code instruction on microblaze */ { volatile long illegal = 0; @@ -445,6 +446,11 @@ ZTEST(fatal_exception, test_fatal) static void *fatal_setup(void) { + +#if defined(CONFIG_MICROBLAZE) + microblaze_enable_exceptions(); +#endif + #if defined(CONFIG_DEMAND_PAGING) && \ !defined(CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT) uintptr_t pin_addr; diff --git a/tests/kernel/interrupt/src/interrupt_offload.c b/tests/kernel/interrupt/src/interrupt_offload.c index f025cbc42614802..d23a8aaa2c16902 100644 --- a/tests/kernel/interrupt/src/interrupt_offload.c +++ b/tests/kernel/interrupt/src/interrupt_offload.c @@ -91,6 +91,8 @@ void isr_handler(const void *param) #elif defined(CONFIG_ARCH_POSIX) #define TEST_IRQ_DYN_LINE 5 +#elif defined(CONFIG_MICROBLAZE) +#define TEST_IRQ_DYN_LINE 1 #else #define TEST_IRQ_DYN_LINE 0 #endif diff --git a/tests/kernel/mem_protect/stackprot/testcase.yaml b/tests/kernel/mem_protect/stackprot/testcase.yaml index 70fefcf85c9a9d6..1218b29c9659014 100644 --- a/tests/kernel/mem_protect/stackprot/testcase.yaml +++ b/tests/kernel/mem_protect/stackprot/testcase.yaml @@ -5,6 +5,7 @@ tests: - xtensa - posix - sparc + - microblaze tags: - kernel - userspace diff --git a/tests/lib/cpp/libcxx/src/main.cpp b/tests/lib/cpp/libcxx/src/main.cpp index 3151aaae892d0f7..be77002748b2169 100644 --- a/tests/lib/cpp/libcxx/src/main.cpp +++ b/tests/lib/cpp/libcxx/src/main.cpp @@ -67,7 +67,7 @@ ZTEST(libcxx_tests, test_make_unique) zassert_equal(make_unique_data::dtors, 1, "dtor count not incremented"); } -#if defined(CONFIG_CPP_EXCEPTIONS) && !defined(CONFIG_BOARD_M2GL025_MIV) +#if defined(CONFIG_CPP_EXCEPTIONS) && !defined(CONFIG_BOARD_M2GL025_MIV) && !defined(CONFIG_MICROBLAZE) static void throw_exception(void) { throw 42;