<p>Duncan Laurie has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/29118">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/google/wilco: Report BIOS progress to the EC<br><br>The EC expects to receive updates about the BIOS boot progress.  This is<br>used for the EC logging to track system boot completeness.  If the EC is<br>not informed about BIOS progress it will turn the system off 30 seconds<br>after the boot starts.<br><br>Change-Id: I693c3930117db2b69a119aee0380d6f303c4881c<br>Signed-off-by: Duncan Laurie <dlaurie@google.com><br>---<br>M src/ec/google/wilco/chip.c<br>M src/ec/google/wilco/commands.h<br>2 files changed, 31 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/18/29118/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c</span><br><span>index 4e6f4af..fe4ef6a 100644</span><br><span>--- a/src/ec/google/wilco/chip.c</span><br><span>+++ b/src/ec/google/wilco/chip.c</span><br><span>@@ -13,6 +13,7 @@</span><br><span>  * GNU General Public License for more details.</span><br><span>  */</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <bootstate.h></span><br><span> #include <device/pnp.h></span><br><span> #include <pc80/keyboard.h></span><br><span> #include <stdint.h></span><br><span>@@ -22,6 +23,27 @@</span><br><span> #include "ec.h"</span><br><span> #include "chip.h"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static void wilco_ec_post_complete(void *unused)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_POST_COMPLETE);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT,</span><br><span style="color: hsl(120, 100%, 40%);">+                wilco_ec_post_complete, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void wilco_ec_post_memory_init(void *unused)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_MEMORY_INIT);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_EXIT,</span><br><span style="color: hsl(120, 100%, 40%);">+                    wilco_ec_post_memory_init, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void wilco_ec_post_video_init(void *unused)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+      wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_VIDEO_INIT);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT,</span><br><span style="color: hsl(120, 100%, 40%);">+               wilco_ec_post_video_init, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static void wilco_ec_init(struct device *dev)</span><br><span> {</span><br><span>       if (!dev->enabled)</span><br><span>diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h</span><br><span>index c277d83..a74e1b2 100644</span><br><span>--- a/src/ec/google/wilco/commands.h</span><br><span>+++ b/src/ec/google/wilco/commands.h</span><br><span>@@ -33,6 +33,8 @@</span><br><span>       KB_POWER_BUTTON_TO_HOST = 0x3e,</span><br><span>      /* Inform the EC that the host is about to enter S3 */</span><br><span>       KB_SLP_EN = 0x64,</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Inform the EC about BIOS boot progress */</span><br><span style="color: hsl(120, 100%, 40%);">+  KB_BIOS_PROGRESS = 0xc2,</span><br><span> };</span><br><span> </span><br><span> enum set_acpi_mode_cmd {</span><br><span>@@ -40,6 +42,13 @@</span><br><span>  ACPI_ON</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+enum bios_progress_code {</span><br><span style="color: hsl(120, 100%, 40%);">+  BIOS_PROGRESS_MEMORY_INIT = 0x01,</span><br><span style="color: hsl(120, 100%, 40%);">+     BIOS_PROGRESS_VIDEO_INIT = 0x02,</span><br><span style="color: hsl(120, 100%, 40%);">+      BIOS_PROGRESS_LOGO_DISPLAYED = 0x03,</span><br><span style="color: hsl(120, 100%, 40%);">+  BIOS_PROGRESS_POST_COMPLETE = 0x04,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*</span><br><span>  * EC Information</span><br><span>  */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/29118">change 29118</a>. To unsubscribe, or for help writing mail filters, 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/29118"/><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: I693c3930117db2b69a119aee0380d6f303c4881c </div>
<div style="display:none"> Gerrit-Change-Number: 29118 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Duncan Laurie <dlaurie@chromium.org> </div>