<br><font size=2 face="sans-serif">I like this approach because it seems
like we should be able to quickly finalize and publish the systemsim-add-bogusnet
patch (which is currently my main focus).</font>
<br>
<br><font size=2 face="sans-serif">Regarding the systemsim-add-systemsim.h
patch, I notice that the XLC forms (which are available in callthru_config.h)
are not in the proposed systemsim.h file. &nbsp;It would be nice to have
these, protected by the appropriate ifdefs of course, to enable application
development with XLC. &nbsp;Otherwise, we'll need to continue to ship callthru_config.h
with Mambo and point users to this if they want to use XLC.</font>
<br>
<br><font size=2 face="sans-serif">Regards,</font>
<br><font size=2 face="sans-serif">Mike</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Arnd Bergmann &lt;arnd@arndb.de&gt;</b></font>
<p><font size=1 face="sans-serif">01/06/2006 08:02 PM</font>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
&nbsp; &nbsp; &nbsp; &nbsp;Eric V Van hensbergen/Austin/IBM@IBMUS</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
&nbsp; &nbsp; &nbsp; &nbsp;David Woodhouse &lt;dwmw2@infradead.org&gt;,
Mike Kistler/Austin/IBM@IBMUS, Patrick Bohrer/Austin/IBM@IBMUS, rsa@us.ltcfwd.linux.ibm.com,
linuxppc64-dev@ozlabs.org, ericvh@gmail.com</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
&nbsp; &nbsp; &nbsp; &nbsp;Re: Support for Bogus Net</font></table>
<br>
<br>
<br><font size=2><tt>[added linuxppc64-dev to Cc:]<br>
<br>
On Friday 06 January 2006 23:49, Eric V Van hensbergen wrote:<br>
&gt; Okay, I'll merge it up to 2.6.15, remove the bogus halt and console
stuff<br>
&gt; and send it out to this list. &nbsp;We can either merge it with the
other<br>
&gt; &quot;stuff&quot; (the console stuff with systemsim.h in it), or submit
it after that<br>
&gt; patch gets submitted mainline.<br>
<br>
How about if we make an extra patch for the systemsim.h file? I find it<br>
hard to tell which of the patches (console or the others) is more likely<br>
to go in soon, so maybe it works best to have patches like this:<br>
<br>
[patches from eric]<br>
systemsim-add-systemsim.h.diff<br>
systemsim-add-bogusdisk.diff<br>
systemsim-add-bogusnet.diff<br>
<br>
[patches from ryan]<br>
hvc-cleanups.diff<br>
hvc-more-changes.diff<br>
hvc-add-rtas.diff<br>
hvc-add-systemsim.diff<br>
<br>
with the hvc-add-systemsim.diff depending on systemsim-add-systemsim.h.diff<br>
to be applied first. For reference, I've added my last version of that
patch<br>
this mail, so we have the same base (and can get comments on it).<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Arnd &lt;&gt;&lt;<br>
<br>
Index: linux-2.6.15-rc/include/asm-powerpc/systemsim.h<br>
===================================================================<br>
--- /dev/null<br>
+++ linux-2.6.15-rc/include/asm-powerpc/systemsim.h<br>
@@ -0,0 +1,132 @@<br>
+/*<br>
+ *<br>
+ * Copyright (C) 2001, 2005 IBM<br>
+ *<br>
+ * Filename &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
: systemsim.h<br>
+ *<br>
+ * Originator &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; : Patrick Bohrer and Charles Lefurgy<br>
+ * Modified By &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; : Eric Van Hensbegren &lt;ericvh@gmail.com&gt;<br>
+ *<br>
+ * Purpose &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
:<br>
+ *<br>
+ * &nbsp; This file is compiled with programs that are run under the<br>
+ * &nbsp; PowerPC Full System simulator. &nbsp;For example, stand-alone
programs<br>
+ * &nbsp; or operating systems. &nbsp;The programs call the callthru wrapper<br>
+ * &nbsp; functions which use an illegal PowerPC instruction to signal
the<br>
+ * &nbsp; simulator to emulate special support.<br>
+ *<br>
+ */<br>
+<br>
+#ifndef _SYSTEMSIM_CONFIG_H_<br>
+#define _SYSTEMSIM_CONFIG_H_<br>
+#ifdef __KERNEL__<br>
+<br>
+/* The functions callthru0 to callthru5 setup up the arguments for the<br>
+ * simulator callthru and then use the callthru instruction. &nbsp;Note
that<br>
+ * 0-5 specify the number of arguments after the command */<br>
+<br>
+/* Note: Arguments are cast as void* to prevent casting by the<br>
+ &nbsp; compiler. &nbsp;This way, you can pass pointers, integers, etc.
in<br>
+ &nbsp; machine register and have the simulator interpret what the<br>
+ &nbsp; register is supposed to be. &nbsp;To help with typing errors when
using<br>
+ &nbsp; callthrus, we provide wrapper functions for each callthru. &nbsp;The<br>
+ &nbsp; wrappers cast all arguments to void*. &nbsp;Unfortunately, this
results<br>
+ &nbsp; in a lot of compiler warnings that I do not know how to remove.
&nbsp;If<br>
+ &nbsp; you modify this code, be aware that we are trying to pick a type<br>
+ &nbsp; that is the size of the registers (32-bit or 64-bit) and that
is<br>
+ &nbsp; why are choosing to cast to a void* (it should be the size of
a<br>
+ &nbsp; machine register) */<br>
+<br>
+static inline int callthru0(int command)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return (c);<br>
+}<br>
+static inline int callthru1(int command, unsigned long arg1)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+static inline int callthru2(int command, unsigned long arg1, unsigned
long arg2)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a2 asm(&quot;r5&quot;) = arg2;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1), &quot;r&quot;(a2));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+static inline int callthru3(int command, unsigned long arg1, unsigned
long arg2,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg3)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a2 asm(&quot;r5&quot;) = arg2;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a3 asm(&quot;r6&quot;) = arg3;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1), &quot;r&quot;(a2),<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;&quot;r&quot;(a3));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+static inline int callthru4(int command, unsigned long arg1, unsigned
long arg2,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg3, unsigned long arg4)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a2 asm(&quot;r5&quot;) = arg2;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a3 asm(&quot;r6&quot;) = arg3;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a4 asm(&quot;r7&quot;) = arg4;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1), &quot;r&quot;(a2),<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;&quot;r&quot;(a3), &quot;r&quot;(a4));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+static inline int callthru5(int command, unsigned long arg1, unsigned
long arg2,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg3, unsigned long arg4,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg5)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a2 asm(&quot;r5&quot;) = arg2;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a3 asm(&quot;r6&quot;) = arg3;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a4 asm(&quot;r7&quot;) = arg4;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a5 asm(&quot;r8&quot;) = arg5;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1), &quot;r&quot;(a2),<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;&quot;r&quot;(a3), &quot;r&quot;(a4), &quot;r&quot;(a5));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+static inline int callthru6(int command, unsigned long arg1, unsigned
long arg2,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg3, unsigned long arg4,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg5, unsigned long arg6)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a2 asm(&quot;r5&quot;) = arg2;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a3 asm(&quot;r6&quot;) = arg3;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a4 asm(&quot;r7&quot;) = arg4;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a5 asm(&quot;r8&quot;) = arg5;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a6 asm(&quot;r9&quot;) = arg6;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1), &quot;r&quot;(a2),<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;&quot;r&quot;(a3), &quot;r&quot;(a4), &quot;r&quot;(a5),
&quot;r&quot;(a6));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+static inline int callthru7(int command, unsigned long arg1, unsigned
long arg2,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg3, unsigned long arg4,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg5, unsigned long arg6,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; unsigned long arg7)<br>
+{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register int c asm(&quot;r3&quot;) = command;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a1 asm(&quot;r4&quot;) = arg1;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a2 asm(&quot;r5&quot;) = arg2;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a3 asm(&quot;r6&quot;) = arg3;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a4 asm(&quot;r7&quot;) = arg4;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a5 asm(&quot;r8&quot;) = arg5;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a6 asm(&quot;r9&quot;) = arg6;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
register unsigned long a7 asm(&quot;r10&quot;) = arg7;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
asm volatile (&quot;.long 0x000eaeb0&quot;:&quot;=r&quot; (c):&quot;r&quot;(c),
&quot;r&quot;(a1), &quot;r&quot;(a2),<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;&quot;r&quot;(a3), &quot;r&quot;(a4), &quot;r&quot;(a5),
&quot;r&quot;(a6), &quot;r&quot;(a7));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
return c;<br>
+}<br>
+<br>
+#endif /* __KERNEL__ */<br>
+#endif/* _SYSTEMSIM_CONFIG_H_ */<br>
</tt></font>
<br>