Skip to contentSkip to conversation

Sparc64 progress

Qemu-devel Blue Swirl 5 participants 9 messages Jul 15, 2008 – Jul 17, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Hi,

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio OpenBIOS for Sparc64
Initializing PCI devices...
ide0: [io ports 0x1f0-0x1f7,0x3f6]
ide1: [io ports 0x170-0x177,0x376]
drive0 [ATAPI cdrom]: QEMU DVD-ROM
floppy_init
FDC is a S82078B
floppy_reset
floppy_motor_off
SENSEI 20 00
status = 80, reply_buffer= 20 0
fdc_specify
FD_SPECIFY(c1, 11)
set_drive status = 80, new_dor = 10
floppy_recalibrate
fdc_state.version = 0062
Nvram id QEMU_BIOS, version 3
kernel addr 404000 size 4d4640
CPUs: 1 x SUNW,UltraSPARC-II
force boot
[sparc64] Kernel already loaded
NULL ihandleNULL ihandle
PROMLIB: Sun IEEE Boot Prom ''
PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

#1 lore raw
Quoted 4 lines · Blue Swirl

ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

Awwww... well, i think it shows some progresses.... I appreciate your work, BlueSwirl... too bad I already "abandoned" my Sun Solaris project.

regards,

Mulyadi.

#2 lore raw

I am almost given up on getting it to work on Sparc/Solaris since it still seems to core dump. :-(

jonathan

Quoted 16 lines · Mulyadi Santosa
Quoted 4 lines · Blue Swirl

ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

Awwww... well, i think it shows some progresses.... I appreciate your work, BlueSwirl... too bad I already "abandoned" my Sun Solaris project.

regards,

Mulyadi.

Signature · 7 lines
--
Jonathan Kalbfeld
ThoughtWave Technologies LLC
www.thoughtwave.com
+1 424 354 1814

Learn UNIX For Free at unixlessons.com
#3 lore raw
In reply to Blue Swirl
Quoted 27 lines · Blue Swirl

Hi,

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio OpenBIOS for Sparc64
Initializing PCI devices...
ide0: [io ports 0x1f0-0x1f7,0x3f6]
ide1: [io ports 0x170-0x177,0x376]
drive0 [ATAPI cdrom]: QEMU DVD-ROM
floppy_init
FDC is a S82078B
floppy_reset
floppy_motor_off
SENSEI 20 00
status = 80, reply_buffer= 20 0
fdc_specify
FD_SPECIFY(c1, 11)
set_drive status = 80, new_dor = 10
floppy_recalibrate
fdc_state.version = 0062
Nvram id QEMU_BIOS, version 3
kernel addr 404000 size 4d4640
CPUs: 1 x SUNW,UltraSPARC-II
force boot
[sparc64] Kernel already loaded
NULL ihandleNULL ihandle
PROMLIB: Sun IEEE Boot Prom ''

Quoted 9 lines

PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

Thanks for you work it's a huge progress.

I have just tried here, with a Debian Lenny kernel, and the kernel doesn't print anything. Would it be possible to share your kernel config?

It seems the "NULL ihandle" message is printed by OpenBios, so I guess the kernel simply exits because it does not find what it needs in the device tree.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
author
#4 lore raw
Quoted 40 lines · Aurelien Jarno
Quoted 27 lines · Blue Swirl

Hi,

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio OpenBIOS for Sparc64
Initializing PCI devices...
ide0: [io ports 0x1f0-0x1f7,0x3f6]
ide1: [io ports 0x170-0x177,0x376]
drive0 [ATAPI cdrom]: QEMU DVD-ROM
floppy_init
FDC is a S82078B
floppy_reset
floppy_motor_off
SENSEI 20 00
status = 80, reply_buffer= 20 0
fdc_specify
FD_SPECIFY(c1, 11)
set_drive status = 80, new_dor = 10
floppy_recalibrate
fdc_state.version = 0062
Nvram id QEMU_BIOS, version 3
kernel addr 404000 size 4d4640
CPUs: 1 x SUNW,UltraSPARC-II
force boot
[sparc64] Kernel already loaded
NULL ihandleNULL ihandle
PROMLIB: Sun IEEE Boot Prom ''

Quoted 9 lines

PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

Quoted 4 lines

Thanks for you work it's a huge progress.

I have just tried here, with a Debian Lenny kernel, and the kernel doesn't print anything. Would it be possible to share your kernel config?

Sure, attached. The kernel is unmodified 2.6.25.10 from kernel.org.

Quoted 3 lines

It seems the "NULL ihandle" message is printed by OpenBios, so I guess the kernel simply exits because it does not find what it needs in the device tree.

Yes, mmu node does not have "translate" and "SUNW,dtlb-load" methods. I'm working on it.

author
#5 lore raw
In reply to Aurelien Jarno
Quoted 40 lines · Aurelien Jarno
Quoted 27 lines · Blue Swirl

Hi,

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio OpenBIOS for Sparc64
Initializing PCI devices...
ide0: [io ports 0x1f0-0x1f7,0x3f6]
ide1: [io ports 0x170-0x177,0x376]
drive0 [ATAPI cdrom]: QEMU DVD-ROM
floppy_init
FDC is a S82078B
floppy_reset
floppy_motor_off
SENSEI 20 00
status = 80, reply_buffer= 20 0
fdc_specify
FD_SPECIFY(c1, 11)
set_drive status = 80, new_dor = 10
floppy_recalibrate
fdc_state.version = 0062
Nvram id QEMU_BIOS, version 3
kernel addr 404000 size 4d4640
CPUs: 1 x SUNW,UltraSPARC-II
force boot
[sparc64] Kernel already loaded
NULL ihandleNULL ihandle
PROMLIB: Sun IEEE Boot Prom ''

Quoted 9 lines

PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

Quoted 4 lines

Thanks for you work it's a huge progress.

I have just tried here, with a Debian Lenny kernel, and the kernel doesn't print anything. Would it be possible to share your kernel config?

Now with Qemu r4881 and OpenBIOS r204 I get:
[sparc64] Kernel already loaded

PROMLIB: Sun IEEE Boot Prom ''
PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... done.

Output with Lenny Beta 2 kernel 2.6.24-1-sparc64 (Debian 2.6.24-7):
[sparc64] Kernel already loaded

Remapping the kernel... done.

author
#6 lore raw
In reply to Aurelien Jarno
Quoted 40 lines · Aurelien Jarno
Quoted 27 lines · Blue Swirl

Hi,

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio OpenBIOS for Sparc64
Initializing PCI devices...
ide0: [io ports 0x1f0-0x1f7,0x3f6]
ide1: [io ports 0x170-0x177,0x376]
drive0 [ATAPI cdrom]: QEMU DVD-ROM
floppy_init
FDC is a S82078B
floppy_reset
floppy_motor_off
SENSEI 20 00
status = 80, reply_buffer= 20 0
fdc_specify
FD_SPECIFY(c1, 11)
set_drive status = 80, new_dor = 10
floppy_recalibrate
fdc_state.version = 0062
Nvram id QEMU_BIOS, version 3
kernel addr 404000 size 4d4640
CPUs: 1 x SUNW,UltraSPARC-II
force boot
[sparc64] Kernel already loaded
NULL ihandleNULL ihandle
PROMLIB: Sun IEEE Boot Prom ''

Quoted 9 lines

PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... NULL ihandleSegmentation fault

Quoted 8 lines

Thanks for you work it's a huge progress.

I have just tried here, with a Debian Lenny kernel, and the kernel doesn't print anything. Would it be possible to share your kernel config?

It seems the "NULL ihandle" message is printed by OpenBios, so I guess the kernel simply exits because it does not find what it needs in the device tree.

With Qemu r4883 and OpenBIOS r208 I get
[sparc64] Kernel already loaded

PROMLIB: Sun IEEE Boot Prom ''
PROMLIB: Root node compatible: sun4u
Linux version 2.6.25.10 (test@host) (gcc version 3.4.6 (Debian 3.4.6-5)) #4 Tue Jul 15 14:41:01 UTC 2008
console [earlyprom0] enabled
ARCH: SUN4U
Ethernet address: 52:54:00:12:34:56
Kernel: Using 2 locked TLB entries for main kernel image. Remapping the kernel... done.

Unable to handle kernel NULL pointer dereference
tsk->{mm,active_mm}->context = 0000000000000000
tsk->{mm,active_mm}->pgd = fffff80000891f98
              \|/ ____ \|/
              "@'/ .. \`@"
              /_| \__/ |_\
                 \__U_/

swapper(0): Oops [#1]
TSTATE: 0000000880f01606 TPC: 000000000059488c TNPC: 0000000000594890
Y: ffffffff Not tainted
TPC: <__bzero_tiny+0x8/0x10>
g0: 0000000000810000 g1: ffffffff00000000 g2: 0000000000819878 g3:
0000000000819878
g4: 00000000ffdd2418 g5: 0000000000000000 g6: 0000000000809480 g7:
0000000000000000
o0: fffff800008d6000 o1: 0000ffcff0000000 o2: ffffffffffffffff o3:
fffff800008d6000
o4: 0000000000819800 o5: 0000000000000040 sp: 000000000080c861 ret_pc:
0000000000869708
RPC: <init_bootmem_core+0xf0/0x100>
l0: 00000000008a1088 l1: 000000000088fa58 l2: 0000000000000002 l3:
0000000000000010
l4: fffffffffffffff0 l5: 0000000000000008 l6: 000000000080d1e0 l7:
000000000000000f
i0: 0000ffcff0000000 i1: fffff800008d6000 i2: 0000000000000000 i3:
0007fe7f80000000
i4: 0000ffcff0000000 i5: 0000000000000000 i6: 000000000080c921 i7:
0000000000867230
I7: <paging_init+0xc58/0x1040>
Caller[0000000000867230]: paging_init+0xc58/0x1040 Caller[000000000085f2e8]: setup_arch+0x3f0/0x400 Caller[000000000085854c]: start_kernel+0x74/0x320 Caller[0000000000749564]: tlb_fixup_done+0x88/0x9c Caller[00000000ffd0e9cc]: 0xffd0e9d4
Instruction DUMP: 90022008 02ca4006 01000000 <d42a2000> 92a26001 124ffffe 90022001 81c3e008 9010000b

Kernel panic - not syncing: Attempted to kill the idle task!

Press Stop-A (L1-A) to return to the boot prom

Booting from Debian 4.0r0 netinst CD:
[sparc64] Booting file '/pci/isa/ide1/cdrom@0,0:a' without parameters. Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
SIservice close: argument count error (0 0)
LO Version 1.4.13
\

Welcome to Debian GNU/Linux etch!

This is a Debian installation CDROM, built on 20070407-11:37. Keep it once you have installed your system, as you can boot from it to repair the system on your hard disk if that ever becomes necessary.

WARNING: You should completely back up all of your hard disks before
proceeding. The installation procedure can completely and irreversibly erase them! If you haven't made backups yet, remove the rescue CD from the drive and press L1-A to get back to the OpenBoot prompt.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

[ ENTER - Boot install ] [ Type "expert" - Boot into expert mode ]
[ Type "rescue" - Boot into rescue mode ]
boot: Unhandled Exception 0x0000000000000028
PC = 0x000000000038ac64 NPC = 0x000000000038ac68
Stopping execution

Aurora 2.0:
Jumping to entry point...
SILO Version 1.4.11

Decompression error: crc error

Internal error
EXIT
5 >

The above CRC error could indicate a bug in the CPU ALU.

#7 lore raw
In reply to Blue Swirl

Hi,

Quoted 3 lines

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio

nice progress. Sadly I can't reproduce it here (still ia32, gcc-3.4), gdb isn't really helpful for me:

| $ gdb qemu-system-sparc64
| (gdb) run -L . -kernel vmlinuz-2.6.18-6-sparc64-smp -serial stdio
| OpenBIOS for Sparc64
|
| Program received signal SIGSEGV, Segmentation fault.
| [Switching to Thread 0xb7b306b0 (LWP 7734)]
| 0x08146ea3 in ?? ()
| (gdb) bt
| #0  0x08146ea3 in ?? ()
| #1  0xab2a95a8 in ?? ()
| #2  0x0891f204 in ?? ()
| #3  0x00000000 in ?? ()
| (gdb) 

You may find a log with "-d op,exec,cpu,out_asm,in_asm,int" at
http://automagically.de/files/qemu-sparc64.log (~ 1.4 MB)

For the longer term, do you plan to add support for the SBus-based Sun4u machines? At least for the Ultra 1 most of the hardware is already emulated for Sun4m (esp, le, cg6...)... For the U1E/U2 isn't much needed either (hme, perhaps some fas bits in esp)... Just a lot of glue missing ;)

Markus

Signature · 2 lines
ubuntu is an ancient african word meaning "i can't install debian."
                                                         -- unknown
author
#8 lore raw
Quoted 24 lines · Markus Dahms

Hi,

Quoted 3 lines

With Qemu r4780 and OpenBIOS r201 I get the following output on serial console:
./qemu-system-sparc64 -L . -kernel vmlinux-2.6.25.10-sun4u -serial stdio

nice progress. Sadly I can't reproduce it here (still ia32, gcc-3.4), gdb
isn't really helpful for me:

 | $ gdb qemu-system-sparc64
 | (gdb) run -L . -kernel vmlinuz-2.6.18-6-sparc64-smp -serial stdio
 | OpenBIOS for Sparc64
 |
 | Program received signal SIGSEGV, Segmentation fault.
 | [Switching to Thread 0xb7b306b0 (LWP 7734)]
 | 0x08146ea3 in ?? ()
 | (gdb) bt
 | #0  0x08146ea3 in ?? ()
 | #1  0xab2a95a8 in ?? ()
 | #2  0x0891f204 in ?? ()
 | #3  0x00000000 in ?? ()
 | (gdb)
Quoted 8 lines

You may find a log with "-d op,exec,cpu,out_asm,in_asm,int" at
http://automagically.de/files/qemu-sparc64.log (~ 1.4 MB)

For the longer term, do you plan to add support for the SBus-based Sun4u machines? At least for the Ultra 1 most of the hardware is already emulated for Sun4m (esp, le, cg6...)... For the U1E/U2 isn't much needed either (hme, perhaps some fas bits in esp)... Just a lot of glue missing ;)

Well, for now I try to get things working on a maximally PC-like system (PCI, IDE, VGA, serial). After that (or if the approach fails) more machines could be added.