pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/gxemul Add a patch which implements free-run...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9c8818b54337
branches:  trunk
changeset: 518780:9c8818b54337
user:      he <he%pkgsrc.org@localhost>
date:      Sun Sep 17 16:38:12 2006 +0000

description:
Add a patch which implements free-running timers on footbridge, as
found on cats and netwinder.  This gets a NetBSD/cats -current
install kernel booting again after the move to timecounters.  Before
this change, the emulated kernel would loop during the tlp0
attachment, inside delay().

Note, I'm guessing that a free-running timer should not generate
an interrupt on wrap (I don't have the hardware documentation).

Patch sent upstream.

diffstat:

 emulators/gxemul/distinfo         |   3 ++-
 emulators/gxemul/patches/patch-aa |  26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r fde42cb0dbb2 -r 9c8818b54337 emulators/gxemul/distinfo
--- a/emulators/gxemul/distinfo Sun Sep 17 15:59:44 2006 +0000
+++ b/emulators/gxemul/distinfo Sun Sep 17 16:38:12 2006 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.14 2006/08/20 16:27:44 xtraeme Exp $
+$NetBSD: distinfo,v 1.15 2006/09/17 16:38:12 he Exp $
 
 SHA1 (gxemul-0.4.2.tar.gz) = d912b4a38cf892d6f3e89c71195d6c52bb3718ca
 RMD160 (gxemul-0.4.2.tar.gz) = dcffd9a3d8de93e935a0f2802c1a0aa60c462693
 Size (gxemul-0.4.2.tar.gz) = 1909826 bytes
+SHA1 (patch-aa) = d320c625149490ec190b1201bfe94e4ee3692bbf
diff -r fde42cb0dbb2 -r 9c8818b54337 emulators/gxemul/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gxemul/patches/patch-aa Sun Sep 17 16:38:12 2006 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-aa,v 1.3 2006/09/17 16:38:12 he Exp $
+
+--- src/devices/dev_footbridge.c.orig  2006-02-09 21:07:12.000000000 +0100
++++ src/devices/dev_footbridge.c
+@@ -85,10 +85,18 @@ void dev_footbridge_tick(struct cpu *cpu
+ 
+               if (d->timer_value[i] > amount)
+                       d->timer_value[i] -= amount;
+-              else
+-                      d->timer_value[i] = 0;
++              else {
++                      if (d->timer_control[i] & TIMER_MODE_PERIODIC)
++                              d->timer_value[i] = 0;
++                      else {
++                              /* free-running timer */
++                              d->timer_value[i] -= amount;
++                              d->timer_value[i] &= TIMER_MAX_VAL;
++                      }
++              }
+ 
+-              if (d->timer_value[i] == 0) {
++              if ((d->timer_control[i] & TIMER_MODE_PERIODIC) &&
++                  (d->timer_value[i] == 0)) {
+                       d->timer_tick_countdown[i] --;
+                       if (d->timer_tick_countdown[i] > 0)
+                               continue;



Home | Main Index | Thread Index | Old Index