* [Qemu-devel] Sparc32 bash problem solved
@ 2006-05-27 19:30 Blue Swirl
2006-05-27 20:21 ` Joerg Platte
0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2006-05-27 19:30 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
For some reason, bash and strace didn't work inside Sparc32 system emulator.
I finally found the reason by observing strange Linux behaviour relating to
MMU no-fault mode. No fault mode seems to apply only to supervisor accesses,
not user ones. The logic was not described like this in the manual, thank
you very much.
Patched Qemu version can run several distro installers which crashed very
early before. Bash and strace are okay.
There are still some bugs in the SCSI code, some installers didn't detect
the drives or got the size wrong.
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/
[-- Attachment #2: qemu-sparc.patch-56.bz2 --]
[-- Type: application/octet-stream, Size: 367 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Sparc32 bash problem solved
2006-05-27 19:30 [Qemu-devel] Sparc32 bash problem solved Blue Swirl
@ 2006-05-27 20:21 ` Joerg Platte
2006-05-27 22:14 ` Joerg Platte
2006-05-28 8:19 ` Blue Swirl
0 siblings, 2 replies; 4+ messages in thread
From: Joerg Platte @ 2006-05-27 20:21 UTC (permalink / raw)
To: qemu-devel
Am Samstag, 27. Mai 2006 21:30 schrieb Blue Swirl:
> For some reason, bash and strace didn't work inside Sparc32 system
> emulator. I finally found the reason by observing strange Linux behaviour
> relating to MMU no-fault mode. No fault mode seems to apply only to
> supervisor accesses, not user ones. The logic was not described like this
> in the manual, thank you very much.
How did you find it?
> Patched Qemu version can run several distro installers which crashed very
> early before. Bash and strace are okay.
Yes, booting a small system with udev works! qemu in graphical mode boots up
to the login prompt. But unfortunately each character i tried to type in is
corrupt. Hence, its not possible to log in. In console mode getty causes a
kernel oops. But it works now much better than before. Many thanks!
regards,
Jörg
INIT: version 2.86 booting
Mounting a tmpfs over /dev...done.
Creating initial device nodes...done.
Activating swap.
System time was Mon May 27 22:12:09 UTC 1974.
Setting the System Clock using the Hardware Clock as reference...
System Clock set. System local time is now Mon May 27 22:12:12 UTC 1974.
Checking all file systems...
fsck 1.37 (21-Mar-2005)
WARNING: Your /etc/fstab does not contain the fsck passno
field. I will kludge around things for you, but you
should fix your /etc/fstab file as soon as you can.
Setting kernel variables ...
... done.
Mounting local filesystems...
Cleaning /tmp /var/run /var/lock.
Starting hotplug subsystem:
pci
cat: /sys/bus/pci/devices/*/class: No such file or directory
cat: /sys/bus/pci/devices/*/vendor: No such file or directory
cat: /sys/bus/pci/devices/*/device: No such file or directory
cat: /sys/bus/pci/devices/*/subsystem_vendor: No such file or directory
cat: /sys/bus/pci/devices/*/subsystem_device: No such file or directory
Bad PCI agent invocation
pci [success]
usb
usb [success]
isapnp
isapnp [success]
ide
ide [success]
input
input [success]
scsi
modprobe: Can't open dependencies file /lib/modules/2.6.13-sam/modules.dep (No
such file or directory)
sd_mod: can't be loaded (for disk)
modprobe: Can't open dependencies file /lib/modules/2.6.13-sam/modules.dep (No
such file or directory)
sd_mod: can't be loaded (for disk)
modprobe: Can't open dependencies file /lib/modules/2.6.13-sam/modules.dep (No
such file or directory)
sr_mod: can't be loaded (for cdrom)
modprobe: Can't open dependencies file /lib/modules/2.6.13-sam/modules.dep (No
such file or directory)
sg: can't be loaded (for cdrom)
scsi [success]
done.
Setting the System Clock using the Hardware Clock as reference...
System Clock set. Local time: Mon May 27 22:12:19 UTC 1974
Initializing random number generator...done.
Setting audio parameters...none.
INIT: Entering runlevel: 2
Unable to handle kernel NULL pointer dereference
tsk->{mm,active_mm}->context = 00000085
tsk->{mm,active_mm}->pgd = fc00bc00
\|/ ____ \|/
"@'/ ,. \`@"
/_| \__/ |_\
\__U_/
getty(1041): Oops [#1]
PSR: 040000c4 PC: f01290f0 NPC: f01290f4 Y: 00000000 Not tainted
PC: <tty_wakeup+0x4/0x64>
%G: 00000002 f0036e18 00000001 044000e6 f0036dbc 00000000 fb820000 00000001
%O: ffffffff 00000000 00000000 fb821bf8 00000018 00000007 fb8217c0 f001bb5c
RPC: <__udelay+0x1c/0x24>
%L: ffd0d000 ffd01754 ffd01758 00000020 00000000 ffffffff fb820000 80028668
%I: 00000000 00066400 fb821924 fb821c10 ff3b373b 00000001 fb821828 f0036e18
Caller[f0036e18]: tasklet_action+0x6c/0xb8
Caller[f0036acc]: __do_softirq+0xa0/0xc4
Caller[f0036b30]: do_softirq+0x40/0x54
Caller[f0005e0c]: t_sec_trap_start_interrupt+0x38/0x5c
Caller[f01096c4]: prom_nbputchar+0xa0/0xb0
Caller[f0109700]: prom_putchar+0x8/0x24
Caller[f0109f6c]: prom_write+0x2c/0x58
Caller[f0109fcc]: prom_printf+0x34/0x48
Caller[f011a298]: promcon_cursor+0xa0/0xdc
Caller[f0138fc8]: set_cursor+0x84/0xb0
Caller[f013c5c8]: con_flush_chars+0x3c/0x50
Caller[f013c3e0]: con_write+0x1c/0x2c
Caller[f012f578]: write_chan+0x228/0x268
Caller[f0129a88]: tty_write+0x16c/0x258
Caller[f006d130]: vfs_write+0xa8/0x11c
Caller[f006d238]: sys_write+0x30/0x64
Caller[f001b83c]: syscall_is_too_hard+0x34/0x40
Caller[00011cd8]: 0x11cd8
Instruction DUMP: 81c3e008 90023fe7 9de3bf98 <c20620b8> 80886020 12800006
b2102001 b0062934 b4102001
Kernel panic - not syncing: Aiee, killing interrupt handler!
<0>Rebooting in 10 seconds..<1>Unable to handle kernel NULL pointer
dereference
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Sparc32 bash problem solved
2006-05-27 20:21 ` Joerg Platte
@ 2006-05-27 22:14 ` Joerg Platte
2006-05-28 8:19 ` Blue Swirl
1 sibling, 0 replies; 4+ messages in thread
From: Joerg Platte @ 2006-05-27 22:14 UTC (permalink / raw)
To: qemu-devel
Am Samstag, 27. Mai 2006 22:21 schrieb Joerg Platte:
> Yes, booting a small system with udev works! qemu in graphical mode boots
> up to the login prompt. But unfortunately each character i tried to type in
> is corrupt. Hence, its not possible to log in. In console mode getty causes
> a kernel oops. But it works now much better than before. Many thanks!
The oops and the corrupted characters are caused by the console-tools. After
removing them everything works as expected! I was able to boot from the same
image I used on a real 32 bit SPARC! I can log in and even log in again via
ssh to localhost :-). Great work!
regards,
Jörg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Sparc32 bash problem solved
2006-05-27 20:21 ` Joerg Platte
2006-05-27 22:14 ` Joerg Platte
@ 2006-05-28 8:19 ` Blue Swirl
1 sibling, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2006-05-28 8:19 UTC (permalink / raw)
To: jplatte; +Cc: qemu-devel
> > emulator. I finally found the reason by observing strange Linux
>behaviour
> > relating to MMU no-fault mode. No fault mode seems to apply only to
> > supervisor accesses, not user ones. The logic was not described like
>this
> > in the manual, thank you very much.
>
>How did you find it?
I looked at qemu.log to find the faulting location in bash. I enabled
DEBUG_MMU in helper.c and op_helper.c to see if the MMU mappings are
correct, generating some 400 megs of logs. The instruction was load and the
data being accessed was not mapped. Then I attached gdb to emulator and set
a breakpoint to the faulting address and also to Linux fault handler. I
noticed that the fault kept repeating forever, as if Linux didn't realise
that any fault has happened. Then I got the idea to try this change. I think
the logic is that it is not safe to allow user to override the MMU mappings.
What an exciting story to tell your grandchildren, don't you think?
>Caller[f0005e0c]: t_sec_trap_start_interrupt+0x38/0x5c
>Caller[f01096c4]: prom_nbputchar+0xa0/0xb0
Maybe there is something wrong with Proll putchar function, or Proll's data
areas are overwritten.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-28 8:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27 19:30 [Qemu-devel] Sparc32 bash problem solved Blue Swirl
2006-05-27 20:21 ` Joerg Platte
2006-05-27 22:14 ` Joerg Platte
2006-05-28 8:19 ` Blue Swirl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.