<p>Lijian Zhao has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20581">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/cannonlake: Call into FSP siliconinit<br><br>The following changes can make system call into FSP siliconinit and exit<br>from that until payloads.<br>1. Add frame to call fspsinit.<br>2. Temporary clear all the USB OC pin to 0 to pass FSP siliconinit.<br><br>Change-Id: I1c9c35ececf3c28d7a024f10a5d326700cc8ac49<br>Signed-off-by: Lijian Zhao <lijian.zhao@intel.com><br>---<br>M src/soc/intel/cannonlake/Makefile.inc<br>A src/soc/intel/cannonlake/chip.c<br>A src/soc/intel/cannonlake/chip.h<br>A src/soc/intel/cannonlake/include/soc/ramstage.h<br>4 files changed, 121 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/20581/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc<br>index a5cb463..2b5bd1c 100644<br>--- a/src/soc/intel/cannonlake/Makefile.inc<br>+++ b/src/soc/intel/cannonlake/Makefile.inc<br>@@ -16,6 +16,7 @@<br> romstage-y += reset.c<br> romstage-$(CONFIG_DRIVERS_UART_8250MEM) += uart.c<br> <br>+ramstage-y += chip.c<br> ramstage-y += memmap.c<br> ramstage-$(CONFIG_PLATFORM_USES_FSP2_0) += reset.c<br> ramstage-$(CONFIG_DRIVERS_UART_8250MEM) += uart.c<br>diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c<br>new file mode 100644<br>index 0000000..70b4718<br>--- /dev/null<br>+++ b/src/soc/intel/cannonlake/chip.c<br>@@ -0,0 +1,61 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2016-2017 Intel Corporation.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <chip.h><br>+#include <console/console.h><br>+#include <device/pci.h><br>+#include <fsp/api.h><br>+#include <fsp/api.h><br>+#include <fsp/util.h><br>+#include <romstage_handoff.h><br>+#include <soc/ramstage.h><br>+#include <string.h><br>+<br>+void soc_init_pre_device(void *chip_info)<br>+{<br>+    /* Perform silicon specific init. */<br>+ fsp_silicon_init(romstage_handoff_is_resume());<br>+}<br>+<br>+struct chip_operations soc_intel_cannonlake_ops = {<br>+ CHIP_NAME("Intel Cannonlake")<br>+      .init           = &soc_init_pre_device,<br>+};<br>+<br>+/* UPD parameters to be initialized before SiliconInit */<br>+void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)<br>+{<br>+       int i;<br>+       FSP_S_CONFIG *params = &supd->FspsConfig;<br>+<br>+  /* Set USB OC pin to 0 first */<br>+      for (i = 0; i < 16; i++) {<br>+                params->Usb2OverCurrentPin[i] =<br>+                           0;<br>+   }<br>+<br>+ for (i = 0; i < 8; i++) {<br>+         params->Usb3OverCurrentPin[i] =<br>+                           0;<br>+   }<br>+<br>+ mainboard_silicon_init_params(params);<br>+}<br>+<br>+/* Mainboard GPIO Configuration */<br>+__attribute__((weak)) void mainboard_silicon_init_params(FSP_S_CONFIG *params)<br>+{<br>+      printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);<br>+}<br>diff --git a/src/soc/intel/cannonlake/chip.h b/src/soc/intel/cannonlake/chip.h<br>new file mode 100644<br>index 0000000..0219556<br>--- /dev/null<br>+++ b/src/soc/intel/cannonlake/chip.h<br>@@ -0,0 +1,29 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2007-2008 coresystems GmbH<br>+ * Copyright (C) 2014 Google Inc.<br>+ * Copyright (C) 2017 Intel Corporation.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#ifndef _SOC_CHIP_H_<br>+#define _SOC_CHIP_H_<br>+<br>+#include <stdint.h><br>+struct soc_intel_cannonlake_config {<br>+};<br>+<br>+typedef struct soc_intel_cannonlake_config config_t;<br>+<br>+<br>+#endif<br>+<br>diff --git a/src/soc/intel/cannonlake/include/soc/ramstage.h b/src/soc/intel/cannonlake/include/soc/ramstage.h<br>new file mode 100644<br>index 0000000..2927f37<br>--- /dev/null<br>+++ b/src/soc/intel/cannonlake/include/soc/ramstage.h<br>@@ -0,0 +1,30 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2014 Google Inc.<br>+ * Copyright (C) 2015-2017 Intel Corporation.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#ifndef _SOC_RAMSTAGE_H_<br>+#define _SOC_RAMSTAGE_H_<br>+<br>+#include <chip.h><br>+#include <device/device.h><br>+#include <fsp/api.h><br>+#include <fsp/util.h><br>+<br>+#define FSP_SIL_UPD FSP_S_CONFIG<br>+<br>+void mainboard_silicon_init_params(FSP_S_CONFIG *params);<br>+void soc_init_pre_device(void *chip_info);<br>+<br>+#endif<br></pre><p>To view, visit <a href="https://review.coreboot.org/20581">change 20581</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20581"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1c9c35ececf3c28d7a024f10a5d326700cc8ac49 </div>
<div style="display:none"> Gerrit-Change-Number: 20581 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Lijian Zhao <lijian.zhao@intel.com> </div>