<p>Paul Kocialkowski has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22562">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">nvramtool: Add dummy cmos-hw-unix accessor implementation for non-x86<br><br>The default implementation uses inb/outb, that is not available on ARM<br>platforms and others. A dummy implementation allows building nvramtool<br>on these platforms.<br><br>Change-Id: I75e4a1a0cbd35ca40f7b108658686839ccf9784a<br>Signed-off-by: Paul Kocialkowski <contact@paulk.fr><br>---<br>M util/nvramtool/accessors/cmos-hw-unix.c<br>1 file changed, 29 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/22562/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/util/nvramtool/accessors/cmos-hw-unix.c b/util/nvramtool/accessors/cmos-hw-unix.c<br>index acefdf7..33d6994 100644<br>--- a/util/nvramtool/accessors/cmos-hw-unix.c<br>+++ b/util/nvramtool/accessors/cmos-hw-unix.c<br>@@ -11,7 +11,7 @@<br> #define INW(x) __extension__ ({ u_int tmp = (x); inw(tmp); })<br> #define INL(x) __extension__ ({ u_int tmp = (x); inl(tmp); })<br> #else<br>-#if defined(__GLIBC__)<br>+#if defined(__GLIBC__) && (defined(__i386__) || defined(__x86_64__))<br> #include <sys/io.h><br> #endif<br> #if (defined(__MACH__) && defined(__APPLE__))<br>@@ -76,6 +76,8 @@<br> static unsigned char cmos_hal_read(unsigned addr);<br> static void cmos_hal_write(unsigned addr, unsigned char value);<br> static void cmos_set_iopl(int level);<br>+<br>+#if defined(__i386__) || defined(__x86_64__)<br> <br> /* no need to initialize anything */<br> static void cmos_hal_init(__attribute__((unused)) void *data)<br>@@ -160,6 +162,32 @@<br> #endif<br> }<br> <br>+#else<br>+<br>+/* no need to initialize anything */<br>+static void cmos_hal_init(__attribute__((unused)) void *data)<br>+{<br>+       return;<br>+}<br>+<br>+static unsigned char cmos_hal_read(__attribute__((unused)) unsigned index)<br>+{<br>+      return;<br>+}<br>+<br>+static void cmos_hal_write(__attribute__((unused)) unsigned index,<br>+                     __attribute__((unused)) unsigned char value)<br>+{<br>+  return;<br>+}<br>+<br>+static void cmos_set_iopl(__attribute__((unused)) int level)<br>+{<br>+    return;<br>+}<br>+<br>+#endif<br>+<br> cmos_access_t cmos_hal = {<br>       .init = cmos_hal_init,<br>        .read = cmos_hal_read,<br></pre><p>To view, visit <a href="https://review.coreboot.org/22562">change 22562</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/22562"/><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: I75e4a1a0cbd35ca40f7b108658686839ccf9784a </div>
<div style="display:none"> Gerrit-Change-Number: 22562 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Paul Kocialkowski <contact@paulk.fr> </div>