From 8d76447a1cb7b2e74ac40383d97a92d28b3d2ede Mon Sep 17 00:00:00 2001 From: Raptor Engineering Development Team Date: Mon, 22 Jan 2018 16:23:11 -0600 Subject: Signal skiboot completion to BMC when done --- core/init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/init.c') diff --git a/core/init.c b/core/init.c index b91e34b3..a4898be8 100644 --- a/core/init.c +++ b/core/init.c @@ -50,6 +50,7 @@ #include #include #include +#include enum proc_gen proc_gen; unsigned int pcie_max_link_speed; @@ -568,6 +569,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)); -- cgit v1.2.1