diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-01-22 16:23:11 -0600 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-04-19 22:13:22 -0500 |
commit | 8d76447a1cb7b2e74ac40383d97a92d28b3d2ede (patch) | |
tree | baf3bfed1974b47311e7901291de8c2f3158b9d3 | |
parent | 2e67622ecbba8d559d26b5a5be6b2588f321c6ad (diff) | |
download | talos-skiboot-8d76447a1cb7b2e74ac40383d97a92d28b3d2ede.tar.gz talos-skiboot-8d76447a1cb7b2e74ac40383d97a92d28b3d2ede.zip |
Signal skiboot completion to BMC when done
-rw-r--r-- | core/init.c | 10 | ||||
-rw-r--r-- | include/ast.h | 1 |
2 files changed, 11 insertions, 0 deletions
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 <libstb/trustedboot.h> #include <phys-map.h> #include <imc.h> +#include <ast.h> 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)); 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) |