diff options
author | he <he@pkgsrc.org> | 2006-09-17 16:38:12 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2006-09-17 16:38:12 +0000 |
commit | 015eb6cf0a373037a391efae4e4a946a17dc97f9 (patch) | |
tree | 412461e0891d12eadb3088dc458f2677e4dc664f /emulators/gxemul/patches | |
parent | 4e66b15e02f00884ae685d0204959f980fe3ca95 (diff) | |
download | pkgsrc-015eb6cf0a373037a391efae4e4a946a17dc97f9.tar.gz |
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 (limited to 'emulators/gxemul/patches')
-rw-r--r-- | emulators/gxemul/patches/patch-aa | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/emulators/gxemul/patches/patch-aa b/emulators/gxemul/patches/patch-aa new file mode 100644 index 00000000000..2420e42b7d8 --- /dev/null +++ b/emulators/gxemul/patches/patch-aa @@ -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; |