The following patch improves ISA IDE discovery. On a modern system those devices will probably be the same as under pci-ide tree of devices.
* Discover up to 4 IDE devices * Fix "Unimplemented package interface procedure" message during "Probe IDE"
Before patch:
show-devs
/pci/isa@1/ide-controller@i1f0/ide@1 /pci/isa@1/ide-controller@i1f0/ide@0 /pci/isa@1/ide-controller@i1f0/ide@0/<Unnamed>@0
ok select /pci/isa@1/ide-controller@i1f0/ide@0/<Unnamed>@0 Invalid ihandle
After patch:
/pci/isa@1/ide-controller@i1f0/ide@1 /pci/isa@1/ide-controller@i1f0/ide@0 /pci/isa@1/ide-controller@i1f0/ide@1/cdrom@2 /pci/isa@1/ide-controller@i1f0/ide@0/disk@1 /pci/isa@1/ide-controller@i1f0/ide@0/disk@0
Open issues:
ok select /pci/isa@1/ide-controller@i1f0/ide@1/cdrom@2 IDE data error: 0 Can't open deblocker package ok
It does not matter whether Qemu's CDROM device is attached or not. (For /pci/pci-ide@1,1/ide@1/cdrom@0 works when attached).
What is file /dev/ide/node.fc binary?
Marcin
Index: dev/ide/idenode.fth =================================================================== --- dev/ide/idenode.fth (revision 3784) +++ dev/ide/idenode.fth (working copy) @@ -22,6 +22,7 @@
: any-blocks? " any-blocks?" $call-parent ; : cdrom? " cdrom?" $call-parent ; +: node-fcode " node-fcode" $call-parent ;
: set-address ( unit -- dummy unit )
@@ -65,7 +66,7 @@ finish-device ( ) ;
-: probe ( -- ) 2 0 do i probe-child loop ; +: probe ( -- ) 3 0 do i probe-child loop ;
headers \ LICENSE_BEGIN
On Fri, 2 Oct 2015, Marcin Cieslak wrote:
The following patch improves ISA IDE discovery. On a modern system those devices will probably be the same as under pci-ide tree of devices.
This part is somewhat bogus:
- Discover up to 4 IDE devices
-: probe ( -- ) 2 0 do i probe-child loop ; +: probe ( -- ) 3 0 do i probe-child loop ;
This causes "ghost" CD-ROMs to be added. The reason my virtual CD-ROMs on a second IDE channel do not get probed is that blocks/ seems to be zero for them.
Marcin
So, for now I would propose only this patch to fix the <Unnamed>@0 device issue.
Initial research about why CDROM does not get detected on the legay ISA controller indicates that this might be qemu issue.
Index: dev/ide/idenode.fth =================================================================== --- dev/ide/idenode.fth (revision 3784) +++ dev/ide/idenode.fth (working copy) @@ -22,6 +22,7 @@
: any-blocks? " any-blocks?" $call-parent ; : cdrom? " cdrom?" $call-parent ; +: node-fcode " node-fcode" $call-parent ;
: set-address ( unit -- dummy unit )
Committed r3786.
openfirmware@openfirmware.info