On 24.12.15 20:53, Mark Cave-Ayland wrote:
Further work on Darwin/OS X shows that IOKit expects both the hard disk and cdrom to be attached to the ata-3 controller for QEMU's mac99 machine.
Currently OpenBIOS generates an ata-3 and an ata-4 controller (and by default attaches the cdrom to the ata-4 controller) meaning that IOKit would fail to locate and mount the cdrom on boot. Resolve this by instantiating 2 ata-3 controller nodes instead which also is a better match for a real device tree.
The relevant changes to the device tree are shown below:
Before:
fff542a8 /pci@80000000/mac-io@3/ata-3@20000 (ata) fff54540 /pci@80000000/mac-io@3/ata-4@21000 (ata) fff547d8 /pci@80000000/mac-io@3/ata-4@21000/cdrom@0 (block)
After:
fff542a8 /pci@80000000/mac-io@3/ata-3@20000 (ata) fff54540 /pci@80000000/mac-io@3/ata-3@21000 (ata) fff547d8 /pci@80000000/mac-io@3/ata-3@21000/cdrom@0 (block)
The OpenBIOS IDE code currently works by using the device name internally to reference the controller node, which of course breaks when 2 nodes are given the same name property. Patches 1-4 switch the OpenBIOS IDE code over to reference controller nodes by phandle rather than name, while patch 5 does the actual switch from 1 ata-3 and 1 ata-4 controller to 2 ata-3 controllers.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Reviewed-by: Alexander Graf agraf@suse.de
Alex