We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f4dc80 commit 6be0d41Copy full SHA for 6be0d41
arch/microblaze/core/reboot.c
@@ -0,0 +1,25 @@
1
+/*
2
+ * Copyright (c) 2023 Advanced Micro Devices, Inc. (AMD)
3
+ * Copyright (c) 2023 Alp Sayin <alpsayin@gmail.com>
4
+ *
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+
8
+#include <zephyr/arch/cpu.h>
9
+#include <zephyr/kernel.h>
10
+#include <zephyr/sys/util.h>
11
12
+/**
13
+ * @brief Reset the system
14
15
+ * This is stub function to avoid build error with CONFIG_REBOOT=y
16
+ * MicroBlaze, being a soft core cannot define a reboot routine.
17
+ * Each SoC designer should implement their own reboot if needed.
18
19
20
+void __weak sys_arch_reboot(int type)
21
+{
22
+ printk("__weak reboot called with %d in %s\n", type, __FILE__);
23
+ __asm__ volatile("\tbraid _start\n"
24
+ "\tmts rmsr, r0\n");
25
+}
0 commit comments