OS/2 PPC booting making some progress
2. Booted with qemu-system-ppc -dummy-net -nographic -prep -cdrom os2.iso (and giving boot device ide_cdrom2 + filesystem FAT_HARDDISK)
Boot: 00ec0500 47ff0800 00000000 00000000
Bootinfos at : 200000
Now boot it... (0)
stack: 5bfff70 malloc_base: 0 0x05800000 0x06000000 PREP boot... 15ea00 100000
inb: port=0x0010
ERROR: unaffected IO port: 0814 read Entering Little Endian mode...
outb: port=0x0280 data=0xc0
IBM Microkernel Bootloader (Power PC, Little Endian) Press ENTER for manual boot...........pci_config_read: PREP PCI Bridge: addr=10 val=c0000000 len=4
dma: read_chan 0x4 -> 0
dma: read_chan 0x4 -> 28672
dma: read_chan 0x4 -> 14336
dma: read_chan 0x4 -> 14336
dma: write_cont: nport 0x0008, ichan 0, val 000000
dma: write_cont: nport 0x00d0, ichan 0, val 000000 Unknown device: automatic
[PN_BOOT_DEV="automatic"] ide_cdrom2
ide: read addr=0x177 val=40
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa1
ide: CMD=a1
ide: read addr=0x177 val=48
dma: read_chan 0x4 -> 14336
dma: read_chan 0x4 -> 14336
ide: write control addr=0x376 val=08
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 00 00 00 00 00 00 00 00 00 00 00 00
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03 [PN_BOOT_FS="automatic"] FAT_HARDDISK
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 28 00 00 00 00 00 00 00 01 00 00 00
read: LBA=0 nb_sectors=1
reply: tx_size=2048 elem_tx_size=0 index=2048 byte_count_limit=2048
status=0x48
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=48
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=02
ide: read addr=0x174 val=00
ide: read addr=0x175 val=08
reply: tx_size=0 elem_tx_size=0 index=2048 status=0x40
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03
we did NOT read the MBR!
Bootloader: *** Reserved Exception (0x0) ***
srr0 = 0x15f068
srr1 = 0x2031
dsisr= 0x0
dar = 0x0
Bootloader: Entering infinite loop.
2. Booted with qemu-system-ppc -dummy-net -nographic -prep -cdrom os2.iso (and giving boot device ide_cdrom2 + filesystem FAT_HARDDISK)
Boot: 00ec0500 47ff0800 00000000 00000000
Bootinfos at : 200000
Now boot it... (0)
stack: 5bfff70 malloc_base: 0 0x05800000 0x06000000 PREP boot... 15ea00 100000
inb: port=0x0010
ERROR: unaffected IO port: 0814 read Entering Little Endian mode...
outb: port=0x0280 data=0xc0
IBM Microkernel Bootloader (Power PC, Little Endian) Press ENTER for manual boot...........pci_config_read: PREP PCI Bridge: addr=10 val=c0000000 len=4
dma: read_chan 0x4 -> 0
dma: read_chan 0x4 -> 28672
dma: read_chan 0x4 -> 14336
dma: read_chan 0x4 -> 14336
dma: write_cont: nport 0x0008, ichan 0, val 000000
dma: write_cont: nport 0x00d0, ichan 0, val 000000 Unknown device: automatic
[PN_BOOT_DEV="automatic"] ide_cdrom2
ide: read addr=0x177 val=40
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa1
ide: CMD=a1
ide: read addr=0x177 val=48
dma: read_chan 0x4 -> 14336
dma: read_chan 0x4 -> 14336
ide: write control addr=0x376 val=08
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 00 00 00 00 00 00 00 00 00 00 00 00
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03 [PN_BOOT_FS="automatic"] FAT_HARDDISK
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 28 00 00 00 00 00 00 00 01 00 00 00
read: LBA=0 nb_sectors=1
reply: tx_size=2048 elem_tx_size=0 index=2048 byte_count_limit=2048
status=0x48
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=48
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=02
ide: read addr=0x174 val=00
ide: read addr=0x175 val=08
reply: tx_size=0 elem_tx_size=0 index=2048 status=0x40
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03
we did NOT read the MBR!
Bootloader: *** Reserved Exception (0x0) ***
srr0 = 0x15f068
srr1 = 0x2031
dsisr= 0x0
dar = 0x0
Bootloader: Entering infinite loop.
Hi,
I have made some modifications to PPC PREP booting to get OS/2
bootloader working. Now I hopefully have made some progress (it isn't working yet but has gone forward on my opinion). So I have few questions at the moment:
1. on debug 1. Is the opcode really invalid or just unsupported one?
2. on debug 2. What is this unaffected IO port 838 it tries to read &
write ?
3. Might that unsupported ioport prevent booting?
1. Booted with qemu-system-ppc -dummy-net -nographic -prep -cdrom os2.iso
(and giving boot device ide_cdrom0)
Boot: 00ec0500 47ff0800 00000000 00000000
Bootinfos at : 200000
Now boot it... (0)
stack: 5bfff70 malloc_base: 0 0x05800000 0x06000000 PREP boot... 15ea00 100000
inb: port=0x0010
ERROR: unaffected IO port: 0814 read Entering Little Endian mode...
outb: port=0x0280 data=0xc0
IBM Microkernel Bootloader (Power PC, Little Endian)
Press ENTER for manual boot...........
[PN_BOOT_DEV="automatic"] ide_cdrom0 (gave this device manually) ide: read addr=0x1f7 val=00
IDE: write addr=0x1f6 val=0xa0
IDE: write addr=0x1f7 val=0xa1
ide: CMD=a1
ide: read addr=0x1f7 val=00
Device initialization failed
invalid/unsupported opcode: 02 - 04 - 01 (08000048) 0x00000300 0 invalid/unsupported opcode: 02 - 04 - 01 (08000048) 0x00000700 0
Crashed!!
2. This works better(because ide_cdrom is actully there)
2. Booted with qemu-system-ppc -dummy-net -nographic -prep -cdrom os2.iso (and giving boot device ide_cdrom2 + filesystem FAT_HARDDISK)
Boot: 00ec0500 47ff0800 00000000 00000000
Bootinfos at : 200000
Now boot it... (0)
stack: 5bfff70 malloc_base: 0 0x05800000 0x06000000 PREP boot... 15ea00 100000
inb: port=0x0010
ERROR: unaffected IO port: 0814 read Entering Little Endian mode...
outb: port=0x0280 data=0xc0
IBM Microkernel Bootloader (Power PC, Little Endian)
Press ENTER for manual boot...........
[PN_BOOT_DEV="automatic"] ide_cdrom2 (gave this manually)
ide: read addr=0x177 val=40
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa1
ide: CMD=a1
ide: read addr=0x177 val=48
dma: read_chan 0x4 -> 14336
dma: read_chan 0x4 -> 14336
ide: write control addr=0x376 val=08
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 00 00 00 00 00 00 00 00 00 00 00 00
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03
[PN_BOOT_FS="automatic"] FAT_HARDDISK (gave this manually but should be automatically regognized other option is FAT_FLOPPY)
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 28 00 00 00 00 00 00 00 01 00 00 00
read: LBA=0 nb_sectors=1
reply: tx_size=2048 elem_tx_size=0 index=2048
byte_count_limit=2048
status=0x48
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=48
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=02
ide: read addr=0x174 val=00
ide: read addr=0x175 val=08
reply: tx_size=0 elem_tx_size=0 index=2048
status=0x40
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03
we did NOT read the MBR!
Bootloader: *** Reserved Exception (0x0) ***
srr0 = 0x15f068
srr1 = 0x2031
dsisr= 0x0
dar = 0x0
Bootloader: Entering infinite loop.
Tero
Re: [Qemu-devel] OS/2 PPC booting making some progress(sorry this has correct entry point :)
Quoted 136 lines
Hi,
I have made some modifications to PPC PREP booting to get OS/2
bootloader working. Now I hopefully have made some progress (it isn't working yet but has gone forward on my opinion). So I have few questions at the moment:1. on debug 1. Is the opcode really invalid or just unsupported one?
2. on debug 2. What is this unaffected IO port 838 it tries to read
& write ?
3. Might that unsupported ioport prevent booting?
1. Booted with qemu-system-ppc -dummy-net -nographic -prep -cdrom
os2.iso
(and giving boot deviceide_cdrom0)Boot:
00ec050047ff080000000000 00000000
Bootinfos at : 200000Now boot it... (0)
stack: 5bfff70
malloc_base: 00x058000000x06000000PREP boot... 15ea00 100000
inb: port=0x0010
ERROR: unaffected IO port: 0814 read Entering Little Endian mode...
outb: port=0x0280 data=0xc0IBM Microkernel Bootloader (Power PC, Little Endian)
Press ENTER for manual boot...........
[PN_BOOT_DEV="automatic"]ide_cdrom0(gave this device manually) ide: read addr=0x1f7 val=00
IDE: write addr=0x1f6 val=0xa0
IDE: write addr=0x1f7 val=0xa1
ide: CMD=a1
ide: read addr=0x1f7 val=00
Device initialization failed
invalid/unsupported opcode: 02 - 04 - 01 (08000048)0x000003000 invalid/unsupported opcode: 02 - 04 - 01 (08000048)0x000007000Crashed!!
2. This works
better(because ide_cdrom is actully there)
2. Booted with qemu-system-ppc -dummy-net -nographic -prep -cdrom os2.iso (and giving boot deviceide_cdrom2+ filesystemFAT_HARDDISK)Boot:
00ec050047ff080000000000 00000000
Bootinfos at : 200000Now boot it... (0)
stack: 5bfff70
malloc_base: 00x058000000x06000000PREP boot... 15ea00 100000
inb: port=0x0010
ERROR: unaffected IO port: 0814 read Entering Little Endian mode...
outb: port=0x0280 data=0xc0IBM Microkernel Bootloader (Power PC, Little Endian)
Press ENTER for manual boot...........
[PN_BOOT_DEV="automatic"]ide_cdrom2(gave this manually)
ide: read addr=0x177 val=40
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa1
ide: CMD=a1
ide: read addr=0x177 val=48
dma:read_chan0x4-> 14336
dma:read_chan0x4-> 14336
ide: write control addr=0x376 val=08
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 00 00 00 00 00 00 00 00 00 00 00 00
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03
[PN_BOOT_FS="automatic"]FAT_HARDDISK(gave this manually but should be automatically regognized other option isFAT_FLOPPY)
ide: read addr=0x177 val=40
ide: read addr=0x177 val=40
IDE: write addr=0x171 val=0x00
IDE: write addr=0x174 val=0x00
IDE: write addr=0x175 val=0x08
IDE: write addr=0x176 val=0xa0
IDE: write addr=0x177 val=0xa0
ide: CMD=a0
ide: read addr=0x177 val=48
ide: read addr=0x172 val=01
ide: read addr=0x177 val=48
ATAPI limit=0x800 packet: 28 00 00 00 00 00 00 00 01 00 00 00
read: LBA=0 nb_sectors=1
reply: tx_size=2048 elem_tx_size=0 index=2048
byte_count_limit=2048
status=0x48
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=48
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=02
ide: read addr=0x174 val=00
ide: read addr=0x175 val=08
reply: tx_size=0 elem_tx_size=0 index=2048
status=0x40
ERROR: unaffected IO port: 0838 read
ide: read addr=0x177 val=40
ERROR: unaffected IO port: 0838 read
ERROR: unaffected IO port write: 0838 => fd
ide: read addr=0x172 val=03
we did NOT read the MBR!Bootloader: *** Reserved Exception (
0x0) ***srr0 =
0x15f068
srr1 =0x2031
dsisr=0x0
dar =0x0Bootloader: Entering infinite loop.
Tero
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
On Sat, 2005-05-21 at 11:25 +0300, Tero Kaarlela wrote:
[...]
Quoted 8 lines
Hi,
I have made some modifications to PPC PREP booting to get OS/2
bootloader working. Now I hopefully have made some progress (it isn't working yet but has gone forward on my opinion). So I have few questions at the moment:1. on debug 1. Is the opcode really invalid or just unsupported one?
Yes. The endianness is wrong: if you reverse this opcode, you've got a valid one.
There may have been a jump to a random place...
Quoted 2 lines
2. on debug 2. What is this unaffected IO port 838 it tries to read &
write ?
This port is not documented in the PREP specification. You should check in the Linux kernel to see if this port seems important. Or you may take a look to Motorola PowerStack documentation: those boards are well documented and OS/2 is supposed to know how to boot on it.
Quoted 1 line
3. Might that unsupported ioport prevent booting?
Can be possible...
Have to check the code that uses that I/O port...
[...]
Signature · 2 lines
J. Mayer <[email protected]> Never organized
Quoted 11 lines · J. Mayer
Quoted 4 lines
2. on debug 2. What is this unaffected IO port 838 it tries to read &
write ?This port is not documented in the PREP specification. You should check in the Linux kernel to see if this port seems important. Or you may take a look to Motorola PowerStack documentation: those boards are well documented and OS/2 is supposed to know how to boot on it.
Hmmm I found following info from OS/2 stanza files(files describing
hardware to bootloader:
rdf.stz
planar_ide_0:
dev_class = IDE
adap_name = "IDE Disk Controller"
setting = "io:ide_int_reg:838" <=
setting = "io:ide_ctrl:3f6-3f7"
setting = "io:ide_cmd:1f0-1f7"
setting = "irq:ide_irq:d"
setting = "arb:ide_arb:6"
setting = "intrtn:ide_rtn:0"So port 0838 is ide_int_reg
and from ppc_info.stz:
#Delmar/SouthWind
6050:
name = "IBM Delmar / South Wind PowerPC Platform"
pci_config_space = 0x80800000
bus = isa:4
bus = pci:4
built_in = planar_kbd
built_in = planar_mouse
built_in = planar_floppy
built_in = ppc_planar_parallel
built_in = COM1
built_in = COM2
built_in = CMOS_type1
built_in = planar_ide_0
built_in = planar_ide_1
So my guess is that OS/2 ppc reads machine configuration from these files instead of residual data.
Quoted 13 lines
Quoted 5 lines
3. Might that unsupported ioport prevent booting?
Can be possible...
Have to check the code that uses that I/O port...[...]
Hmmm... i succeeded to make it go further with following options:
boot-device ide_cdrom2
boot-fs cdrom
then it works and loads boot.cfg from cd-image
shows all lines from boot.cfg (and I have option to uncomment/change all these)
loads kernel & device drivers into memory(as defined in boot.cfg)
but after boot.cfg has been completely read and real boot should start it gives me invalid/unsupported opcodes again.
Tero
Quoted 17 lines · Tero Kaarlela
Quoted 11 lines · J. Mayer
Quoted 4 lines
2. on debug 2. What is this unaffected IO port 838 it tries to read &
write ?This port is not documented in the PREP specification. You should check in the Linux kernel to see if this port seems important. Or you may take a look to Motorola PowerStack documentation: those boards are well documented and OS/2 is supposed to know how to boot on it.
Hmmm I found following info from OS/2 stanza files(files describing
hardware to bootloader:
Quoted 6 lines
rdf.stz
planar_ide_0:dev_class = IDE adap_name = "IDE Disk Controller" setting = "io:ide_int_reg:838" <=
Hum, something else I forgot in my previous message:
I took a look into residual data of a real PREP machine (ie IBM 7420) and ioport 838 is used for Power Management as you can see. Then, I don't know what is really in use in PREP machine that OS/2 can boot on.
ResidualLength =
27148
Version =
0
Revision =
1
EC =
0
VPD
PrintableModel =
IBM
FirmwareSupplier =
IBMFirmware
FirmwareSupports =0x00000fc5
:
Conventional
:
Diagnostics
:
Hex41
:
FAT
:
ISO9660
:
SCSI_InitiatorID_Override
:
Tape_Boot
:FW_Boot_Path
NvramSize =
8192
NumSIMMSlots =
6
EndianSwitchMethod =
UsePort92
SpreadIOMethod =
Unknown
SmpIar =
0
RAMErrLogOffset =
0
ProcessorHz =
232649620
ProcessorBusHz =
66471369
TimeBaseDivisor =
4000
WordWidth =
32
PageSize =
4096
CoherenceBlockSize =
32
GranuleSize =
32
L1 Cache
variables
CacheSize =
64
CacheAttrib = Split
cache
CacheAssoc =
0
CacheLineSize =
0
[...]
13:
DEVICE_ID
Flags =0x00002800
:
Static
:Integrated
BaseType = SystemPeripheral
(8)
SubType = PowerManagement
(6)
Interface = GeneralPowerManagement
(0)
BUS_ACCESS
info0 =
0
info1 =0
AllocatedOffset =0x0000068e
LargeVendorItem:
0e 02 00 0e
00
IOPort:
0x82a-0x82b
IOPort:0x838
IOPort:0x860
IOPort:0x862
SmallVendorItem:
IBM
01 24 4d 01
83
LargeVendorItem:
08 51 1a 00
00
PossibleOffset =0x000006c5
CompatibleOffset =0x000006c6
Signature · 2 lines
J. Mayer <[email protected]> Never organized
Quoted 17 lines · Tero Kaarlela
Quoted 11 lines · J. Mayer
Quoted 4 lines
2. on debug 2. What is this unaffected IO port 838 it tries to read &
write ?This port is not documented in the PREP specification. You should check in the Linux kernel to see if this port seems important. Or you may take a look to Motorola PowerStack documentation: those boards are well documented and OS/2 is supposed to know how to boot on it.
Hmmm I found following info from OS/2 stanza files(files describing
hardware to bootloader:
Quoted 6 lines
rdf.stz
planar_ide_0:dev_class = IDE adap_name = "IDE Disk Controller" setting = "io:ide_int_reg:838" <=
This gives no information of what this register is.
Maybe those informations are used if residual data are not correct (which is the case with Open Hack'Ware: there are no devices descriptions).
Or maybe you should try to tell OS/2 the platform is one that support only ISA IDE.
Signature · 2 lines
J. Mayer <[email protected]> Never organized