qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] How to generate custom fw paths for IDE de


From: Mark Cave-Ayland
Subject: Re: [Qemu-devel] [Qemu-block] How to generate custom fw paths for IDE devices?
Date: Fri, 27 Jul 2018 11:43:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 25/07/18 14:03, Paolo Bonzini wrote:

It's possible as long as you don't add any members.  You can add a new
const char* argument to ide_bus_new, and call it from cmd646.

However, another possibility is to implement the FWPathProvider
interface in the sun4u machine type.  See hw/ppc/spapr.c for an example.

The FWPathProvider approach seems to be working much better, however I'm still a bit stuck trying to set the bootindex for the in-built IDE interface. Normally I would use -hda for the internal IDE hd and -cdrom for the CDROM, but to support bootindex then I need to use -drive.

On PPC macio has 2 IDE interfaces at 0x20000 and 0x21000 and from reading the manual I can see that the following works as expected for index between 0 and 2:

$ ./qemu-system-ppc -drive id=cd,file=MacOS921-macsbug.iso,if=ide,index=0 -nographic -prom-env 'auto-boot?=false'

Setting index=3 does something a little more strange compared to using plain -cdrom:

$ ./qemu-system-ppc -drive id=cd,file=MacOS921-macsbug.iso,if=ide,media=cdrom,index=3 -nographic -prom-env 'auto-boot?=false'

0 > show-devs

fff8990c /address@hidden/address@hidden/address@hidden (ata)
fff89c98 /address@hidden/address@hidden/address@hidden (ata)
fff8a024 /address@hidden/address@hidden/address@hidden/address@hidden (block)
fff8a4fc 
/address@hidden/address@hidden/address@hidden/address@hidden/address@hidden 
(block)

The issue here seems to be that according to "info qtree" there is *always* an ide-cd device plugged into the location equivalent to that of -cdrom, and so with the above command QEMU ends up adding a second ide-cd device to the ide.1 bus which confuses OpenBIOS. Is this deliberate behaviour?

Finally it seems I can't set bootindex with if=ide:

$ ./qemu-system-ppc -drive id=cd,file=MacOS921-macsbug.iso,if=ide,index=0 -device ide-cd,drive=cd,bootindex=0 -nographic -prom-env 'auto-boot?=false'

qemu-system-ppc: -device ide-cd,drive=cd,bootindex=0: Drive 'cd' is already in use because it has been automatically connected to another device (did you need 'if=none' in the drive options?)

And if I try if=none as suggested then according to "info qtree" the drive never gets attached to the in-built ide.0 bus in the first place:

$ ./qemu-system-ppc -drive id=cd,file=MacOS921-macsbug.iso,if=none,index=0 -device ide-cd,drive=cd,bootindex=0 -nographic -prom-env 'auto-boot?=false'

I'm sure that I'm missing something really obvious here related to in-built devices but I can't quite see it at the moment...


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]