diff options
Diffstat (limited to 'meta/recipes-devtools/qemu')
3 files changed, 75 insertions, 1 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch new file mode 100644 index 0000000000..530736c4ca --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-fix-oneshot-mode.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From a9cf98d939c4f6539fad7e7d812ea16d96ba3dc9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rabin Vincent <rabin@rab.in> | ||
3 | Date: Sun, 2 May 2010 15:20:52 +0530 | ||
4 | Subject: [PATCH] arm_timer: fix oneshot mode | ||
5 | |||
6 | commit id: a9cf98d939c4f6539fad7e7d812ea16d96ba3dc9 in git://git.sv.gnu.org/qemu.git | ||
7 | |||
8 | In oneshot mode, the delta needs to come from the TimerLoad register, | ||
9 | not the maximum limit. | ||
10 | |||
11 | Signed-off-by: Rabin Vincent <rabin@rab.in> | ||
12 | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> | ||
13 | --- | ||
14 | hw/arm_timer.c | 2 +- | ||
15 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
16 | |||
17 | diff --git a/hw/arm_timer.c b/hw/arm_timer.c | ||
18 | index 5b6947a..9073ffc 100644 | ||
19 | --- a/hw/arm_timer.c | ||
20 | +++ b/hw/arm_timer.c | ||
21 | @@ -71,7 +71,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload) | ||
22 | { | ||
23 | uint32_t limit; | ||
24 | |||
25 | - if ((s->control & TIMER_CTRL_PERIODIC) == 0) { | ||
26 | + if ((s->control & (TIMER_CTRL_PERIODIC | TIMER_CTRL_ONESHOT)) == 0) { | ||
27 | /* Free running. */ | ||
28 | if (s->control & TIMER_CTRL_32BIT) | ||
29 | limit = 0xffffffff; | ||
30 | -- | ||
31 | 1.6.5.2 | ||
32 | |||
diff --git a/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-reload-timer-when-enabled.patch b/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-reload-timer-when-enabled.patch new file mode 100644 index 0000000000..1890e21e60 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-0.12.4/arm_timer-reload-timer-when-enabled.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From d6759902cb467c002086853d2eb38fb969c29f7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Rabin Vincent <rabin@rab.in> | ||
3 | Date: Sun, 2 May 2010 15:20:51 +0530 | ||
4 | Subject: [PATCH] arm_timer: reload timer when enabled | ||
5 | |||
6 | commit id: d6759902cb467c002086853d2eb38fb969c29f7f in git://git.sv.gnu.org/qemu.git | ||
7 | |||
8 | Reload the timer when TimerControl is written, if the timer is to be | ||
9 | enabled. Otherwise, if an earlier write to TimerLoad was done while | ||
10 | periodic mode was not set, s->delta may incorrectly still have the value | ||
11 | of the maximum limit instead of the value written to TimerLoad. | ||
12 | |||
13 | This problem is evident on versatileap on current linux-next, which | ||
14 | enables TIMER_CTRL_32BIT before writing to TimerLoad and then enabling | ||
15 | periodic mode and starting the timer. This causes the first periodic | ||
16 | tick to be scheduled to occur after 0xffffffff periods, leading to a | ||
17 | perceived hang while the kernel waits for the first timer tick. | ||
18 | |||
19 | Signed-off-by: Rabin Vincent <rabin@rab.in> | ||
20 | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> | ||
21 | --- | ||
22 | hw/arm_timer.c | 2 +- | ||
23 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
24 | |||
25 | diff --git a/hw/arm_timer.c b/hw/arm_timer.c | ||
26 | index 9fef191..5b6947a 100644 | ||
27 | --- a/hw/arm_timer.c | ||
28 | +++ b/hw/arm_timer.c | ||
29 | @@ -113,7 +113,7 @@ static void arm_timer_write(void *opaque, target_phys_addr_t offset, | ||
30 | case 1: freq >>= 4; break; | ||
31 | case 2: freq >>= 8; break; | ||
32 | } | ||
33 | - arm_timer_recalibrate(s, 0); | ||
34 | + arm_timer_recalibrate(s, s->control & TIMER_CTRL_ENABLE); | ||
35 | ptimer_set_freq(s->timer, freq); | ||
36 | if (s->control & TIMER_CTRL_ENABLE) { | ||
37 | /* Restart the timer if still enabled. */ | ||
38 | -- | ||
39 | 1.6.5.2 | ||
40 | |||
diff --git a/meta/recipes-devtools/qemu/qemu_0.12.4.bb b/meta/recipes-devtools/qemu/qemu_0.12.4.bb index 04526d12ed..6125bca0d1 100644 --- a/meta/recipes-devtools/qemu/qemu_0.12.4.bb +++ b/meta/recipes-devtools/qemu/qemu_0.12.4.bb | |||
@@ -25,7 +25,9 @@ SRC_URI = "\ | |||
25 | file://cursor-shadow-fix.patch \ | 25 | file://cursor-shadow-fix.patch \ |
26 | file://vmware-vga-fifo-rewind.patch \ | 26 | file://vmware-vga-fifo-rewind.patch \ |
27 | file://fix-configure-checks.patch \ | 27 | file://fix-configure-checks.patch \ |
28 | file://powerpc_rom.bin" | 28 | file://powerpc_rom.bin \ |
29 | file://arm_timer-fix-oneshot-mode.patch \ | ||
30 | file://arm_timer-reload-timer-when-enabled.patch" | ||
29 | 31 | ||
30 | SRC_URI[md5sum] = "93e6b134dff89b2799f57b7d9e0e0fc5" | 32 | SRC_URI[md5sum] = "93e6b134dff89b2799f57b7d9e0e0fc5" |
31 | SRC_URI[sha256sum] = "1a29a5b5151162d1de035c4926d1a1dbffee4a145ef61ee865d6b82aaea0602e" | 33 | SRC_URI[sha256sum] = "1a29a5b5151162d1de035c4926d1a1dbffee4a145ef61ee865d6b82aaea0602e" |