summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-01-22 16:23:11 -0600
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-05-30 16:37:04 -0500
commit7da47856e74e8357dc14e9280493fa22060a2d93 (patch)
tree64807027410959abd5dd7ff599d02629da145cba
parentac8f6b13c7c1346b2b95952eee8d1ada8dfcba01 (diff)
downloadtalos-skiboot-7da47856e74e8357dc14e9280493fa22060a2d93.tar.gz
talos-skiboot-7da47856e74e8357dc14e9280493fa22060a2d93.zip
Signal skiboot completion to BMC when done
-rw-r--r--core/init.c10
-rw-r--r--include/ast.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/core/init.c b/core/init.c
index 3b887a24..b73b709a 100644
--- a/core/init.c
+++ b/core/init.c
@@ -52,6 +52,7 @@
#include <imc.h>
#include <dts.h>
#include <sbe-p9.h>
+#include <ast.h>
enum proc_gen proc_gen;
unsigned int pcie_max_link_speed;
@@ -571,6 +572,15 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
stdoutp = dt_prop_get_def(dt_chosen, "linux,stdout-path", NULL);
prlog(PR_DEBUG, "INIT: stdout-path: %s\n", stdoutp ? stdoutp : "");
+ /* Indicate skiboot done */
+ /* HACK
+ * Ideally we'd update CFAM 0x283c with a new ISTEP (e.g. 22,0)
+ * here, but skiboot doesn't seem to have any existing methods
+ * to access the scratchpad data over FSI. Instead, we use BMC
+ * LPC scratch register 0x60 bit 2 (OEM1) to indicate skiboot
+ * has completed execution.
+ */
+ ast_ahb_writel(ast_ahb_readl(LPC_BTIMSR) | (0x1 << 2), LPC_BTIMSR);
printf("INIT: Starting kernel at 0x%llx, fdt at %p %u bytes\n",
kernel_entry, fdt, fdt_totalsize(fdt));
diff --git a/include/ast.h b/include/ast.h
index 414ff6a3..50e7dbef 100644
--- a/include/ast.h
+++ b/include/ast.h
@@ -36,6 +36,7 @@
/* LPC registers */
#define LPC_BASE 0x1e789000
+#define LPC_BTIMSR (LPC_BASE + 0x60)
#define LPC_HICR6 (LPC_BASE + 0x80)
#define LPC_HICR7 (LPC_BASE + 0x88)
#define LPC_HICR8 (LPC_BASE + 0x8c)
OpenPOWER on IntegriCloud