summaryrefslogtreecommitdiff
path: root/emulators/gxemul
diff options
context:
space:
mode:
authorhe <he>2006-09-17 16:38:12 +0000
committerhe <he>2006-09-17 16:38:12 +0000
commitb576aa0e185fa453fb6ada33e2a3325c79bf1cfa (patch)
tree412461e0891d12eadb3088dc458f2677e4dc664f /emulators/gxemul
parent5c1d7e0921d9138027360895411d235a514e5afb (diff)
downloadpkgsrc-b576aa0e185fa453fb6ada33e2a3325c79bf1cfa.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')
-rw-r--r--emulators/gxemul/distinfo3
-rw-r--r--emulators/gxemul/patches/patch-aa26
2 files changed, 28 insertions, 1 deletions
diff --git a/emulators/gxemul/distinfo b/emulators/gxemul/distinfo
index 2bbb0e44f8c..08572b95f12 100644
--- a/emulators/gxemul/distinfo
+++ b/emulators/gxemul/distinfo
@@ -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 --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;