Port-vax archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Using simh anyone?
Dave McGuire <mcguire%neurotica.com@localhost> wrote:
> On 02/26/2012 03:02 PM, Valeriy E. Ushakov wrote:
>>> Is anyone using simh (heavily) for vax hacking?
>>>
>>> I have tried to use simh-vax on both 32 and 64-bit Ubuntu, but the
>>> simulator crashes as soon
>>> as the qe adapter is used more heavily, somewhere deep in the emulator
>>> routines.
>>>
>>> Anyone got some experience to share?
>>
>> I run NetBSD/vax (5.x) under simh on my corporate Windows 7 laptop. I
>> only hacked the kernel a bit to use SPL 1 for idle since that's what
>> simh uses to detect idle for NetBSD.
>
> I'm very much interested in learning more about that patch, if you
> have a moment.
Must be this one
Index: sys/kern/kern_idle.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_idle.c,v
retrieving revision 1.21
diff -u -p -r1.21 kern_idle.c
--- sys/kern/kern_idle.c 11 Jun 2008 13:42:02 -0000 1.21
+++ sys/kern/kern_idle.c 27 Feb 2012 01:32:14 -0000
@@ -64,6 +64,10 @@ idle_loop(void *dummy)
KERNEL_UNLOCK_ALL(l, NULL);
l->l_stat = LSONPROC;
+
+#ifdef __vax__
+ s = splraiseipl(makeiplcookie(1)); /* for SIMH idle detection */
+#endif
for (;;) {
LOCKDEBUG_BARRIER(NULL, 0);
KASSERT((l->l_flag & LW_IDLE) != 0);
@@ -85,11 +89,18 @@ idle_loop(void *dummy)
}
}
}
+
+#ifdef __vax__
+ splx(s);
+#endif
KASSERT(l->l_mutex == l->l_cpu->ci_schedstate.spc_lwplock);
lwp_lock(l);
mi_switch(l);
KASSERT(curlwp == l);
KASSERT(l->l_stat == LSONPROC);
+#ifdef __vax__
+ s = splraiseipl(makeiplcookie(1)); /* for SIMH idle detection */
+#endif
}
}
-uwe
Home |
Main Index |
Thread Index |
Old Index