[OpenBIOS] [Qemu-ppc] Changing CD-ROM path

Amadeusz Sławiński amade at asmblr.net
Mon Jun 24 18:15:44 CEST 2013


On Mon, Jun 24, 2013 at 04:25:19PM +0100, Mark Cave-Ayland wrote:
> On 22/06/13 22:47, Programmingkid wrote:
> 
> >> Paths also depend on how you pass boot device:
> >>
> >> For example with
> >> -drive file=/path/to/cdrom.iso,media=cdrom,index=0,if=ide
> >>
> >> I get
> >> ide0 "/pci at 80000000/mac-io at 3/ata-1/cdrom"
> >> cd "/pci at 80000000/mac-io at 3/ata-1/cdrom"
> >> cdrom "/pci at 80000000/mac-io at 3/ata-1/cdrom"
> >> ide1 "/pci at 80000000/pci-ata at 4/ata-2/cdrom"
> >>
> >> (also now that I look at it should this ide1 even be here?)
> >>
> >> and with -cdrom /path/to/cdrom.iso
> >>
> >> ide0 "/pci at 80000000/pci-ata at 4/ata-2/cdrom"
> >> cdrom "/pci at 80000000/pci-ata at 4/ata-2/cdrom"
> >> cd "/pci at 80000000/pci-ata at 4/ata-2/cdrom"
> >>
> >
> > Thank you sooo much for this information. With it was able to go further
> > than before in the boot process! This day was definitely a step forward
> > in making Mac OS X boot in QEMU. The Mac OS 10.2 cd stopped after the
> > COLOR display text, but the darwin 8 cd was able to boot considerably
> > further than before.
> >
> > Before I would only see up to this in on the screen:
> > IOService:/GossamerPE/pci at 80000000/AppleGracklePCI/pci-ata at 4/CMD646Root/cdrom at 0
> 
> Hmmmm last time I tried I couldn't even get the IOService to match - 
> maybe some of the recent IDE fixes in QEMU have got this to work?
> 

Probably the BSY flag fix

> > After using your command line suggestion, I see this in QEMU when
> > booting Darwin 8 (core of Mac OS X):
> > IOService:/GossamerPE/pci at 80000000/AppleGracklePCI/mac-io at 3/Heathrow/ata-1 at 20000/HeathrowATA/ATADeviceNub at 0/IOATAPIProtocolTransport/IOSCSIPeripheralDevieNub/IOSCSIPeripheralDeviceType05/IODVDServices/IODVDBlockStorageDriver/QEMU
> > QEMU DVD-ROM Media
> >
> > A lot more than before!
> 
> Excellent :)
> 
> > This is what I see on a real Beige G3:
> > IOService:/GossamerPE/pci at 80000000/AppleGracklePCI/mac-io at 10/Heathrow/ide at 21000/HeathrowATA/ATADeviceNub at 0/ATAPIProtocolTransport/IOSCSIPeripheralDeviceNub/IOSCSIPeripheralDeviceType05/IODVDServices/IODVDBlockStorageDriver/HL-DT-ST
> > DVD-RW GCA-4020B Media/IOCDPartitionScheme/Untitled
> > 1 at 1/IOApplePartititionScheme/Mac_OS_X at 9
> >
> > So what's next is making the IOCDPartitionScheme show up.
> 
> Have you had a look at the Darwin source to see how this is actually 
> detected?
> 

probably this one:

OSDictionary * IODiskMatching( const char * path, char * buf, int maxLen) 
...

    // scan the tail of the path for "@unit:partition"
        do {
	        // Have to get the full path to the controller - an
		// alias may
		        // tell us next to nothing, like "hd:8"
...

in iokit/bsddev/IOKitBSDInit.cpp

> > This path change definitely needs to be made to QEMU.
> 
> There seems to have been a lot to this thread over the weekend, however 
> am I right in guessing that the primary change is switching the CDROM 
> over from the CMD646 IDE bus to the MacIO IDE bus?
> 

It always seemed to work better for me, so I'm in favor of changing
default if possible.

> > If anyone wants to help but don't have Mac OS X, you can download the
> > free Darwin 8 cd image here: darwinppc-801.cdr.gz
> > <http://www.opensource.apple.com/static/iso/darwinppc-801.cdr.gz>.
> 
> Will this actually work? Last I remember from Alex was that the Mac 
> device model generated by QEMU would only work with MacOS <= 10.3, and 
> the release notes in the same directory indicate that 801 is equivalent 
> to the kernel for MacOS 10.4. It's for this reason that I've been using 
> darwinppc-602.cdr.gz for all my tests here.
> 
> Also Amadeusz, didn't you have some extra patches for -M mac99 Darwin 
> boot that still need to be reviewed by Alex?
> 

I will be done with exams in few days, I will resend them then.

Amadeusz



More information about the OpenBIOS mailing list