qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Openbios upgrade broke sparc32 linux.


From: Rob Landley
Subject: Re: [Qemu-devel] Openbios upgrade broke sparc32 linux.
Date: Sat, 06 Jul 2013 12:08:36 -0500

On 07/04/2013 04:52:45 PM, Olivier Danet wrote:
On 29/06/2013 22:29, Olivier Danet wrote:
On 28/06/2013 23:44, Mark Cave-Ayland wrote:
On 28/06/13 03:08, Rob Landley wrote:

Commit 467b34689d27 upgraded the openbios image, and ever since my linux system images hang about the time they try to initialize interrupts.

http://landley.net/aboriginal/bin/system-image-sparc.tar.bz2

Extract that and "./run-emulator.sh" in the tarball. Using qemu 1.2.0
for example works fine, you get a shell prompt. Using 1.5.0 hangs.
...
Hello
I think I have found the problem.

Each SPARC CPU model use different MMU TLB management functions.
For Linux, the callbacks are set in arch/sparc/mm/srmmu.c : xxx_flush_tlb_all, xxx_flush_tlb_mm, xxx_flush_tlb_range, xxx_flush_tlb_page. The assembly code used for the MicroSparcII is arch/sparc/mm/swift.S. This code accesses the vm_mm member of vm_area_struct (include/linux/mm_types.h)

The position of the vm_mm field in the structure was modified recently, and the assembly
was not adjusted accordingly.
(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/linux/mm_types.h?id=e4c6bfd2d79d063017ab19a18915f0bc759f32d9)

The bug was introduced in Linux 3.8

Here is a patch for swift, there are also issues in hypersparc.S, viking.S, tsunami.S ...:
[snip patch that wasn't sent to linux-kernel]
For a cleaner fix, arch/sparc/kernel/asm_offsets.c should be modified.

Huh, confirming that my old linux 3.5 image does boot under current qemu. (I only tested back to 3.8, which worked before the qemu change for some reason.)

In the meantime, the -cpu "fujitsu thx1138" workaround is working for me, well enough to ship the 3.10 images as soon as I get arm working again. (Or just go "use qemu 1.2.0 for arm" and punt until next time...)

Rob


reply via email to

[Prev in Thread] Current Thread [Next in Thread]