Skip to contentSkip to conversation

arm, mips and mipsel broken

Qemu-devel Aurelien Jarno 5 participants 11 messages Nov 10, 2009 – Nov 12, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

commit c169998802505c244b8bcad562633f29de7d74a4

Author: Glauber Costa <[email protected]>
Date:   Thu Nov 5 16:05:15 2009 -0200

v3: don't call reset functions on cpu initialization

There is absolutely no need to call reset functions when initializing devices. Since we are already registering them, calling qemu_system_reset() should suffice. Actually, it is what happens when we reboot the machine, and using the same process instead of a special case semantics will even allow us to find bugs easier.

Furthermore, the fact that we initialize things like the cpu quite early, leads to the need to introduce synchronization stuff like qemu_system_cond. This patch removes it entirely. All we need to do is call qemu_system_reset() only when we're already sure the system is up and running

I tested it with qemu (with and without io-thread) and qemu-kvm, and it seems to be doing okay - although qemu-kvm uses a slightly different patch.

[ v2: user mode still needs cpu_reset, so put it in ifdef. ] [ v3: leave qemu_system_cond for now. ]

Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
#1 lore raw
Quoted 2 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC) #endif
until the devices have been fixed.

#2 lore raw
Quoted 9 lines · Blue Swirl
Quoted 2 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

Quoted 5 lines

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC) #endif
until the devices have been fixed.

I'll try to have a closer look at the problem tomorrow, if I can't find the problem, it's what I'll commit.

Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
#3 lore raw
Quoted 2 lines · Aurelien Jarno
Quoted 1 line · Blue Swirl

On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <[email protected]>

Quoted 10 lines · wrote:
Quoted 7 lines
Quoted 2 lines

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

I'll try to have a closer look at the problem tomorrow, if I can't find the problem, it's what I'll commit.

This is latent breakage introduced by 45a50b1.
See commits 97fe84f5 (makes breakage obvious) and f2d7497 (fixed ARM). MIPS still needs fixing.

Paul

#4 lore raw
Quoted 12 lines · Paul Brook
Quoted 2 lines · Aurelien Jarno
Quoted 1 line · Blue Swirl

On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <[email protected]>

Quoted 8 lines · wrote:
Quoted 7 lines
Quoted 2 lines

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

Quoted 6 lines
Quoted 2 lines

I'll try to have a closer look at the problem tomorrow, if I can't find the problem, it's what I'll commit.

This is latent breakage introduced by 45a50b1.
See commits 97fe84f5 (makes breakage obvious) and f2d7497 (fixed ARM). MIPS still needs fixing.

I can't find 97fe84f5 or f2d7497, what commits are those?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 10 lines · Juan Quintela
Quoted 9 lines · Blue Swirl
Quoted 2 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

Quoted 8 lines
Quoted 4 lines

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC) #endif
until the devices have been fixed.

That call also breaks loadvm from the command line on x86_64. If I revert the rest of the patch except that line, I still get breakage on rtl8139.

Sigh. I'll leave only Sparc for now. Sorry for the trouble.

#8 lore raw
Quoted 16 lines · Blue Swirl
Quoted 15 lines · Juan Quintela
Quoted 13 lines · Blue Swirl
Quoted 2 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC) #endif
until the devices have been fixed.

Quoted 6 lines
Quoted 3 lines

That call also breaks loadvm from the command line on x86_64. If I revert the rest of the patch except that line, I still get breakage on rtl8139.

Sigh. I'll leave only Sparc for now. Sorry for the trouble.

In fact it's easier to revert all commits and commit later one architecture at a time.

#9 lore raw
In reply to Blue Swirl
Quoted 9 lines · Blue Swirl
Quoted 2 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

Quoted 4 lines

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC) #endif
until the devices have been fixed.

if we don't call that, how can we be sure that the devices are in fact reset?

We need a call to qemu_system_reset somewhere before we can start the machine

Quoted 2 lines
#10 lore raw
Quoted 10 lines · Glauber Costa
Quoted 9 lines · Blue Swirl
Quoted 2 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by these targets, the breakage comes from just the single new call to qemu_system_reset in vl.c. This means that the reset functions for those boards and devices must be awfully buggy.

Quoted 8 lines
Quoted 4 lines

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC) #endif
until the devices have been fixed.

if we don't call that, how can we be sure that the devices are in fact reset?

We need a call to qemu_system_reset somewhere before we can start the machine

Strange, reverting the commits make PPC crash on boot, but system_reset starts the system:
qemu: warning: could not load VGA bios 'video.x' invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000000 0 invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000700 0 QEMU 0.11.50 monitor - type 'help' for more information (qemu) system_reset
(qemu)

Quoted 7 lines
Quoted 7 lines

=============================================================
OpenBIOS 1.0 [Oct 18 2009 12:04] Configuration device id QEMU version 1 machine id 2
CPUs: 1
Memory: 128M
UUID: 00000000-0000-0000-0000-000000000000 CPU type PowerPC,750

Welcome to OpenBIOS v1.0 built on Oct 18 2009 12:04

I'm not sure how to fix this.

#11 lore raw
In reply to Aurelien Jarno
Quoted 9 lines · Aurelien Jarno

Please note that at least qemu-system-arm, qemu-system-mips and qemu-system-mipsel are broken by this commit:

commit c169998802505c244b8bcad562633f29de7d74a4
Author: Glauber Costa <[email protected]>
Date: Thu Nov 5 16:05:15 2009 -0200

v3: don't call reset functions on cpu initialization
...

Hi,

at least for MIPS Malta, cirrus vga is broken, too.

I see unassigned memory writes in low memory when linux tries to blink the soft cursor, and there is no output on the vga display.

The reset problem can be fixed partially with a simple code
change: removing load_kernel() in function main_cpu_reset allows malta to boot again (only serial console, see above). Reboot from linux does not work.

Regards,
Stefan