summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/aarch64/aarch64/machdep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/arch/aarch64/aarch64/machdep.c b/sys/arch/aarch64/aarch64/machdep.c
index 33d7c42..9a96cbb 100644
--- a/sys/arch/aarch64/aarch64/machdep.c
+++ b/sys/arch/aarch64/aarch64/machdep.c
@@ -31,6 +31,7 @@
#include <sys/panic.h>
#include <machine/cpu.h>
#include <machine/sync.h>
+#include <machine/board.h>
struct cpu_info g_bsp_ci = {0};
@@ -98,3 +99,13 @@ cpu_startup(struct cpu_info *ci)
__ASMV("msr tpidr_el1, %0" :: "r" (ci));
md_cpu_init();
}
+
+void
+md_get_board(struct board_info *res)
+{
+ uint64_t midr_el1;
+
+ __ASMV("mrs %0, midr_el1" : "=r" (midr_el1));
+ res->partno = (midr_el1 >> 4) & 0xFFF;
+ res->implementer = (midr_el1 >> 24) & 0xFF;
+}