[Skiboot] [PATCH 1/3] core/init: add per_thread_sanity_checks()
Oliver O'Halloran
oohall at gmail.com
Mon Sep 5 15:26:08 AEST 2016
This patch adds a function that is called early in the primary thread
and secondary thread init paths. No actual checks are added in this
patch. It just provides a sensible place to add them.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
core/init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/core/init.c b/core/init.c
index 821094fed1c1..79aa048e9e2c 100644
--- a/core/init.c
+++ b/core/init.c
@@ -619,6 +619,11 @@ static void copy_exception_vectors(void)
memcpy((void *)0x100, (void *)(SKIBOOT_BASE + 0x100), 0x1f00);
sync_icache();
}
+
+static void per_thread_sanity_checks(void)
+{
+}
+
/* Called from head.S, thus no prototype. */
void main_cpu_entry(const void *fdt, u32 master_cpu);
@@ -692,6 +697,9 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt, u32 master_cpu)
dt_expand(fdt);
}
+ /* Now that we have a full devicetree, verify that we aren't on fire. */
+ per_thread_sanity_checks();
+
/*
* From there, we follow a fairly strict initialization order.
*
@@ -903,6 +911,8 @@ void __noreturn __nomcount secondary_cpu_entry(void)
{
struct cpu_thread *cpu = this_cpu();
+ per_thread_sanity_checks();
+
prlog(PR_DEBUG, "INIT: CPU PIR 0x%04x called in\n", cpu->pir);
__secondary_cpu_entry();
--
2.5.5
More information about the Skiboot
mailing list