Hello, I would like to help debug booting AIX with qemu-system-ppc. Here is what I have so far, please let me know what further information I should provide to aid in pinpointing where the following hang occurs:
====================================================
Booting AIX in QEMU+OpenBIOS (CPU type PowerPC,750)
====================================================
-------------------------------------------------------------------------------
Welcome to AIX.
boot image timestamp: 00:39 35/2D
The current time and date: 01:10:58 04/25/2011
processor count: 1; memory size: 2047MB; kernel size: 2293829
boot device: cd:\ppc\chrp\bootfile.exe
[hangs here...]
============
Environment
============
OpenBIOS: SVN snapshot as of 2011-04-25
QEMU: Git snapshot as of 2011-04-25
Host OS: GNU/Linux x86_64
Guest OS: AIX V6.1
Cross-Compiler: powerpc-unknown-linux-gnu-gcc (GCC) 4.6.0
=================
OpenBIOS config
=================
<!-- Kernel Debugging -->
<option name="CONFIG_DEBUG" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/>
<option name="CONFIG_SERIAL_PORT" type="integer" value="0"/>
<option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/>
<option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_OFMEM" type="boolean" value="false"/>
<!-- Module Configuration -->
<option name="CONFIG_CMDLINE" type="boolean" value="true"/>
<option name="CONFIG_DEBLOCKER" type="boolean" value="true"/>
<option name="CONFIG_FONT_8X8" type="boolean" value="true"/>
<option name="CONFIG_FONT_8X16" type="boolean" value="false"/>
<option name="CONFIG_OFMEM" type="boolean" value="true"/>
<option name="CONFIG_OFMEM_MALLOC_ALIGN" type="integer" value="4"/>
<option name="CONFIG_VGA_WIDTH" type="integer" value="800"/>
<option name="CONFIG_VGA_HEIGHT" type="integer" value="600"/>
<option name="CONFIG_VGA_DEPTH" type="integer" value="8"/>
<option name="CONFIG_LOADER_AOUT" type="boolean" value="false"/>
<option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="true"/>
<option name="CONFIG_LOADER_ELF" type="boolean" value="true"/>
<option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/>
<option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/>
<option name="CONFIG_LOADER_XCOFF" type="boolean" value="true"/>
<!-- Filesystem Configuration -->
<option name="CONFIG_DISK_LABEL" type="boolean" value="true"/>
<option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/>
<option name="CONFIG_MAC_PARTS" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/>
<option name="CONFIG_PC_PARTS" type="boolean" value="true"/>
<option name="CONFIG_HFS" type="boolean" value="true"/>
<option name="CONFIG_HFSP" type="boolean" value="true"/>
<option name="CONFIG_ISO9660" type="boolean" value="true"/>
<option name="CONFIG_EXT2" type="boolean" value="true"/>
<option name="CONFIG_GRUBFS" type="boolean" value="true"/>
<option name="CONFIG_FSYS_EXT2FS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_FAT" type="boolean" value="false"/>
<option name="CONFIG_FSYS_JFS" type="boolean" value="true"/>
<option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/>
<option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_XFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_UFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_ISO9660" type="boolean" value="false"/>
<option name="CONFIG_FSYS_FFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/>
<option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/>
<option name="CONFIG_DEBUG_FS" type="boolean" value="false"/>
<!-- Miscellaneous -->
<option name="CONFIG_PPC_64BITSUPPORT" type="boolean" value="true"/>
<option name="CONFIG_LINUXBIOS" type="boolean" value="false"/>
<option name="CONFIG_RTAS" type="boolean" value="true"/>
<!-- Drivers -->
<option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
<option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
<option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
<option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>
<option name="CONFIG_IDE_DEV_NAME" type="string" value="ata-%d"/>
<option name="CONFIG_IDE_DEV_TYPE" type="string" value="ata"/>
<option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/>
<option name="CONFIG_DRIVER_ADB" type="boolean" value="true"/>
<option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/>
<option name="CONFIG_DRIVER_MACIO" type="boolean" value="true"/>
<option name="CONFIG_DRIVER_ESCC" type="boolean" value="true"/>
<option name="CONFIG_DRIVER_FW_CFG" type="boolean" value="true"/>
<option name="CONFIG_FW_CFG_ADDR" type="integer" value="0xf0000510"/>
===========================================
OpenBIOS debug (built with CONFIG_DEBUG_*)
===========================================
>> >R: 7fb5bc80
>> >R: 7fb5bc24
>> >R: 7fb5bba0
>> >R: 7fb5bbd8
>> IDE - ob_ide_read_blocks: ob_ide_read_blocks 7fb9f0a8 block=0 n=1
>> IDE - ob_ide_read_sectors: ob_ide_read_sectors: block=0 sectors=1
>> IDE - ob_ide_atapi_drive_ready: ob_ide_atapi_drive_ready
>> R>: 7fb5bbd8
>> R>: 7fb5bba0
>> R>: 7fb5bc24
>> R>: 7fb5bc80
>> R>: 0
>> R>: 14
>> R>: 4
>> R>: 0
>> >R: fff5648c
>> >R: b
>> R>: b
>> R>: fff5648c
>> >R: fff5646c
>> >R: 9
>> R>: 9
>> R>: fff5646c
>> >R: fff56344
>> >R: c
>> R>: c
>> R>: fff56344
>> >R: fff56324
>> >R: 7
>> R>: 7
>> R>: fff56324
>> >R: fff4fd44
>> >R: b
>> R>: b
>> R>: fff4fd44
>> >R: fff4fd14
>> >R: 4
>> R>: 4
>> R>: fff4fd14
>> >R: fff4fcd4
>> >R: 9
>> R>: 9
>> R>: fff4fcd4
>> >R: fff4fca8
>> >R: c
>> R>: c
>> R>: fff4fca8
>> >R: fff4fc1c
>> >R: 9
>> R>: 9
>> R>: fff4fc1c
>> >R: fff4fbf0
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff3df68
>> R>: 1
>> R>: 5
>> >R: fff3df68
>> R>: fff4fbf0
>> >R: fff4fbc8
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff3df68
>> R>: 0
>> R>: 5
>> >R: fff3df68
>> R>: fff4fbc8
>> >R: fff4fba4
>> >R: 4
>> R>: 4
>> R>: fff4fba4
>> >R: fff4fb50
>> >R: 7
>> R>: 7
>> R>: fff4fb50
>> >R: fff4faf4
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff3df68
>> R>: 2
>> R>: 5
>> >R: fff3df68
>> R>: fff4faf4
>> >R: fff4faa4
>> >R: 4
>> R>: 4
>> R>: fff4faa4
>> >R: fff4fa44
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff3df68
>> R>: 0
>> R>: 5
>> >R: fff3df68
>> R>: fff4fa44
>> >R: fff4f9e8
>> >R: 4
>> R>: 4
>> R>: fff4f9e8
>> >R: fff4f9d0
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff4f9d0
>> >R: 0
>> >R: 2
>> >R: 14
>> R>: fff440e4
>> >R: fff440f0
>> >R: 0
>> >R: 6
>> >R: 28
>> >R: 7fb5bc80
>> >R: fff52d18
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff52d18
>> R>: 7fb5bc80
>> >R: 0
>> R>: 0
>> R>: 28
>> R>: 6
>> R>: 0
>> >R: 7fb980ac
>> R>: 7fb980ac
>> >R: 0
>> R>: 0
>> R>: fff3d44c
>> R>: fff440e4
>> >R: fff440f0
>> >R: 0
>> >R: 6
>> >R: 28
>> >R: 7fb5bc24
>> >R: fff51cb0
>> >R: 3
>> R>: 3
>> R>: fff51cb0
>> >R: fff51c84
>> >R: 4
>> R>: 4
>> R>: fff51c84
>> >R: fff51c58
>> >R: 4
>> R>: 4
>> R>: fff51c58
>> >R: fff51c2c
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff3df68
>> R>: 0
>> R>: 5
>> >R: fff3df68
>> R>: fff51c2c
>> >R: fff51c00
>> >R: 4
>> R>: 4
>> R>: fff51c00
>> >R: fff51bd4
>> >R: 4
>> R>: 4
>> R>: fff51bd4
>> >R: fff51ba8
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff51ba8
>> R>: 7fb5bc24
>> >R: 0
>> R>: 0
>> R>: 28
>> R>: 6
>> R>: 0
>> >R: 7fb980ac
>> R>: 7fb980ac
>> >R: 0
>> R>: 0
>> R>: fff3d614
>> R>: fff3d44c
>> R>: fff440e4
>> >R: fff440f0
>> >R: 0
>> >R: 6
>> >R: 28
>> >R: 7fb5bba0
>> >R: fff54120
>> >R: c
>> R>: c
>> R>: fff54120
>> >R: fff540ec
>> >R: a
>> R>: a
>> R>: fff540ec
>> >R: fff540bc
>> >R: b
>> R>: b
>> R>: fff540bc
>> >R: fff54088
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff54088
>> R>: 7fb5bba0
>> >R: 0
>> R>: fff440e4
>> >R: fff440f0
>> >R: 7fb5bba0
>> >R: 7
>> >R: 30
>> >R: 7fb5bbd8
>> >R: fff51b10
>> >R: 4
>> R>: 4
>> R>: fff51b10
>> >R: fff51ae4
>> >R: 4
>> R>: 4
>> R>: fff51ae4
>> >R: fff51ab8
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff3df68
>> R>: 0
>> R>: 5
>> >R: fff3df68
>> R>: fff51ab8
>> >R: fff51a8c
>> >R: 4
>> R>: 4
>> R>: fff51a8c
>> >R: fff51a60
>> >R: 5
>> R>: 5
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> >R: 7b
>> R>: 7b
>> R>: fff51a60
>> R>: 7fb5bbd8
>> >R: 7fb5bba0
======================
QEMU debug
======================
(qemu) info registers
info registers
NIP fff1086c LR fff10844 CTR fff122bc XER 00000000
MSR 00003032 HID0 00000000 HF 00002000 idx 1
TB 00000000 3720793498 DECR 574173816
GPR00 000000007fb9f0a0 000000007fcf7790 0000000000000000 000000007fba29b4
GPR04 000000000000000d 0000000000000000 0000000000000000 0000000000000000
GPR08 0000000000000000 000000007fba29b4 000000000000000c 0000000000000820
GPR12 0000000000000000 0000000000000000 00000000fff393aa 00000000fff3a137
GPR16 00000000fff3741e 0000000004000000 00000000fffbc6cc 00000000fffbcecc
GPR20 00000000000030ec 00000000fff37204 00000000fff371f2 00000000fff37172
GPR24 00000000fff371fa 00000000fffbc630 0000000000000001 00000000000444a0
GPR28 0000000000000036 00000000fffc0000 00000000fffc0000 000000007fb9f0a8
CR 48000084 [ G L - - - - L G ] RES ffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
SRR0 fff2bdcc SRR1 00003032 SDR1 7fd00000
(qemu) info cpus
info cpus
* CPU #0: nip=0xfff1086c thread_id=7838
(qemu) x/20i $pc-4
x/20i $pc-4
0xfff10710: beq- cr7,0xfff10724
0xfff10714: lwz r10,4(r9)
0xfff10718: lwz r11,-4(r31)
0xfff1071c: cmplw cr7,r10,r11
0xfff10720: blt+ cr7,0xfff10704
0xfff10724: stw r9,-8(r31)
0xfff10728: stw r0,0(r3)
0xfff1072c: addi r11,r1,16
0xfff10730: b 0xfff2cb10
0xfff10734: stwu r1,-32(r1)
0xfff10738: mflr r0
0xfff1073c: stmw r29,20(r1)
0xfff10740: mr. r30,r3
0xfff10744: mr r29,r4
0xfff10748: stw r0,36(r1)
0xfff1074c: bne+ 0xfff10760
0xfff10750: mr r3,r4
0xfff10754: bl 0xfff08498
0xfff10758: mr r31,r3
0xfff1075c: b 0xfff107ac
IN: deblk_close
0xfff122bc: stwu r1,-16(r1)
0xfff122c0: mflr r0
0xfff122c4: stw r0,20(r1)
0xfff122c8: lwz r3,24(r3)
0xfff122cc: bl 0xfff084b8
OP:
---- 0xfff122bc
movi_i32 access_type,$0x20
movi_i32 tmp1,$0xfffffff0
add_i32 tmp0,r1,tmp1
qemu_st32 r1,tmp0,$0x1
mov_i32 r1,tmp0
---- 0xfff122c0
mov_i32 r0,lr
---- 0xfff122c4
movi_i32 tmp1,$0x14
add_i32 tmp0,r1,tmp1
qemu_st32 r0,tmp0,$0x1
---- 0xfff122c8
movi_i32 tmp1,$0x18
add_i32 tmp0,r3,tmp1
qemu_ld32 r3,tmp0,$0x1
---- 0xfff122cc
movi_i32 lr,$0xfff122d0
movi_i32 nip,$0xfff084b8
exit_tb $0x0
OP after liveness analysis:
---- 0xfff122bc
movi_i32 access_type,$0x20
movi_i32 tmp1,$0xfffffff0
add_i32 tmp0,r1,tmp1
qemu_st32 r1,tmp0,$0x1
mov_i32 r1,tmp0
---- 0xfff122c0
mov_i32 r0,lr
---- 0xfff122c4
movi_i32 tmp1,$0x14
add_i32 tmp0,r1,tmp1
qemu_st32 r0,tmp0,$0x1
---- 0xfff122c8
movi_i32 tmp1,$0x18
add_i32 tmp0,r3,tmp1
qemu_ld32 r3,tmp0,$0x1
---- 0xfff122cc
movi_i32 lr,$0xfff122d0
movi_i32 nip,$0xfff084b8
exit_tb $0x0
end
OUT: [size=252]
0x400eb320: mov 0x4(%r14),%ebp
0x400eb324: lea -0x10(%rbp),%ebx
0x400eb327: mov $0x20,%r12d
0x400eb32d: mov %r12d,0x260(%r14)
0x400eb334: mov %ebx,%esi
0x400eb336: mov %ebx,%edi
0x400eb338: shr $0x7,%esi
0x400eb33b: and $0xfffff003,%edi
0x400eb341: and $0x1fe0,%esi
0x400eb347: lea 0x228c(%r14,%rsi,1),%rsi
0x400eb34f: cmp (%rsi),%edi
0x400eb351: mov %ebx,%edi
0x400eb353: jne 0x400eb361
0x400eb355: add 0xc(%rsi),%rdi
0x400eb359: mov %ebp,%esi
0x400eb35b: bswap %esi
0x400eb35d: mov %esi,(%rdi)
0x400eb35f: jmp 0x400eb36d
0x400eb361: mov %ebp,%esi
0x400eb363: mov $0x1,%edx
0x400eb368: callq 0x57ffa9
0x400eb36d: mov 0x100(%r14),%ebp
0x400eb374: lea 0x14(%rbx),%r12d
0x400eb378: mov %ebp,(%r14)
0x400eb37b: mov %ebx,0x4(%r14)
0x400eb37f: mov %r12d,%esi
0x400eb382: mov %r12d,%edi
0x400eb385: shr $0x7,%esi
0x400eb388: and $0xfffff003,%edi
0x400eb38e: and $0x1fe0,%esi
0x400eb394: lea 0x228c(%r14,%rsi,1),%rsi
0x400eb39c: cmp (%rsi),%edi
0x400eb39e: mov %r12d,%edi
0x400eb3a1: jne 0x400eb3af
0x400eb3a3: add 0xc(%rsi),%rdi
0x400eb3a7: mov %ebp,%esi
0x400eb3a9: bswap %esi
0x400eb3ab: mov %esi,(%rdi)
0x400eb3ad: jmp 0x400eb3bb
0x400eb3af: mov %ebp,%esi
0x400eb3b1: mov $0x1,%edx
0x400eb3b6: callq 0x57ffa9
0x400eb3bb: mov 0xc(%r14),%ebp
0x400eb3bf: lea 0x18(%rbp),%ebx
0x400eb3c2: mov %ebx,%esi
0x400eb3c4: mov %ebx,%edi
0x400eb3c6: shr $0x7,%esi
0x400eb3c9: and $0xfffff003,%edi
0x400eb3cf: and $0x1fe0,%esi
0x400eb3d5: lea 0x2288(%r14,%rsi,1),%rsi
0x400eb3dd: cmp (%rsi),%edi
0x400eb3df: mov %ebx,%edi
0x400eb3e1: jne 0x400eb3ed
0x400eb3e3: add 0x10(%rsi),%rdi
0x400eb3e7: mov (%rdi),%ebp
0x400eb3e9: bswap %ebp
0x400eb3eb: jmp 0x400eb3f9
0x400eb3ed: mov $0x1,%esi
0x400eb3f2: callq 0x57fb92
0x400eb3f7: mov %eax,%ebp
0x400eb3f9: mov %ebp,0xc(%r14)
0x400eb3fd: mov $0xfff084b8,%ebp
0x400eb402: mov %ebp,0x25c(%r14)
0x400eb409: mov $0xfff122d0,%ebp
0x400eb40e: mov %ebp,0x100(%r14)
0x400eb415: xor %eax,%eax
0x400eb417: jmpq 0x11c2bce
=============================================
gdb: qemu vl.c
=============================================
1946 const char *gdbstub_dev = NULL;
1947 int i;
1948 int snapshot, linux_boot;
1949 const char *icount_option = NULL;
1950 const char *initrd_filename;
1951 const char *kernel_filename, *kernel_cmdline;
1952 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
1953 DisplayState *ds;
1954 DisplayChangeListener *dcl;
1955 int cyls, heads, secs, translation;
1956 QemuOpts *hda_opts = NULL, *opts;
1957 QemuOptsList *olist;
1958 int optind;
1959 const char *optarg;
1960 const char *loadvm = NULL;
1961 QEMUMachine *machine;
1962 const char *cpu_model;
1963 int tb_size;
1964 const char *pid_file = NULL;
1965 const char *incoming = NULL;
Thank you!
Ken