All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* find the OF boot-device
@ 2000-02-01 21:51 Olaf Hering
  2000-02-01 22:04 ` Olaf Hering
  2000-02-01 22:55 ` BenH
  0 siblings, 2 replies; 5+ messages in thread
From: Olaf Hering @ 2000-02-01 21:51 UTC (permalink / raw
  To: linuxppc-dev


Hi,

we need an app to tell us the OF device path to a file. I'm working on
that but I have a strange problem with a G4 400 AGP:

There are 3 entries /proc/device-tree/pci and all of them have the same
inode number:

4189 dr-xr-xr-x   3 root     root   0 Feb  1 22:36 openprom/
4215 dr-xr-xr-x   2 root     root   0 Feb  1 22:36 options/
4297 dr-xr-xr-x  21 root     root   0 Feb  1 22:36 packages/
4405 dr-xr-xr-x   4 root     root   0 Feb  1 22:36 pci/
4405 dr-xr-xr-x   4 root     root   0 Feb  1 22:36 pci/
4405 dr-xr-xr-x   4 root     root   0 Feb  1 22:36 pci/
4339 dr-xr-xr-x   4 root     root   0 Feb  1 22:36 psuedo-hid/
4197 dr-xr-xr-x   4 root     root   0 Feb  1 22:36 rom/
4355 dr-xr-xr-x   2 root     root   0 Feb  1 22:36 rtas/


The hd alias ist /pci@f2000000/@d/mac-io@7/ata-4@1f000/disk@0 so I guess
there must be something wrong. The first pci directory contains only the
AGP card. I'm unable to enter the other directories.

On a newer G4 400 (with gmac ethernet) everything has a symlink:

4207 dr-xr-xr-x   2 root     root     0 Feb  1 22:46 options/
4289 dr-xr-xr-x  21 root     root     0 Feb  1 22:46 packages/
4468 lr-xr-xr-x   1 root     root     0 Feb  1 22:46 pci -> pci@f0000000/
4397 dr-xr-xr-x   4 root     root     0 Feb  1 22:46 pci@f0000000/
4470 dr-xr-xr-x   3 root     root     0 Feb  1 22:46 pci@f2000000/
4897 dr-xr-xr-x   3 root     root     0 Feb  1 22:46 pci@f4000000/
4331 dr-xr-xr-x   4 root     root     0 Feb  1 22:46 psuedo-hid/
4205 lr-xr-xr-x   1 root     root     0 Feb  1 22:46 rom -> rom@ff800000/
4187 dr-xr-xr-x   4 root     root     0 Feb  1 22:46 rom@ff800000/

The kernel is a 2.2.14.
Is there a bug in the OF or in the kernel?


Gruss Olaf

--
 $ man 1 current_release

BUGS
       Users never read manuals...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: find the OF boot-device
  2000-02-01 21:51 find the OF boot-device Olaf Hering
@ 2000-02-01 22:04 ` Olaf Hering
  2000-02-01 22:55 ` BenH
  1 sibling, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2000-02-01 22:04 UTC (permalink / raw
  To: linuxppc-dev


On Tue, Feb 01, Olaf Hering wrote:

> we need an app to tell us the OF device path to a file. I'm working on
> that but I have a strange problem with a G4 400 AGP:
>
> There are 3 entries /proc/device-tree/pci and all of them have the same
> inode number:

It is fixed with the latest Kernel from Benh.


Gruss Olaf

--
 $ man 1 current_release

BUGS
       Users never read manuals...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: find the OF boot-device
  2000-02-01 21:51 find the OF boot-device Olaf Hering
  2000-02-01 22:04 ` Olaf Hering
@ 2000-02-01 22:55 ` BenH
  2000-02-01 23:23   ` Olaf Hering
  1 sibling, 1 reply; 5+ messages in thread
From: BenH @ 2000-02-01 22:55 UTC (permalink / raw
  To: linuxppc-dev, olh


On Tue, Feb 1, 2000, Olaf Hering <olh@suse.de> wrote:

>The kernel is a 2.2.14.
>Is there a bug in the OF or in the kernel?

It's a "feature" of MacOS when using BootX. MacOS discards the
"@xxxxxxxx" portion of the OF path, so the device tree built by BootX is
missing those. They can be rebuilt using the OF "reg" property, I have to
figure out the proper algorithm but this could (should) be done in the
kernel or in BootX itself before passing the tree to the kernel.

How do you plan to match the device to the OF node ? I've looked into
this issue for some time now, but I don't really see a valid way to know
that a given Linux device (/dev/xxx) corresponds to a given OF node.
Especially when using PCI SCSI cards. Is there a way from userland to
retreive PCI infos of a controller from it's /dev/sdXX node ?

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: find the OF boot-device
  2000-02-01 22:55 ` BenH
@ 2000-02-01 23:23   ` Olaf Hering
  2000-02-03  6:53     ` Takashi Oe
  0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2000-02-01 23:23 UTC (permalink / raw
  To: BenH; +Cc: linuxppc-dev, linuxppc-users


On Tue, Feb 01, BenH wrote:

> On Tue, Feb 1, 2000, Olaf Hering <olh@suse.de> wrote:
> How do you plan to match the device to the OF node ? I've looked into
> this issue for some time now, but I don't really see a valid way to know
> that a given Linux device (/dev/xxx) corresponds to a given OF node.
> Especially when using PCI SCSI cards. Is there a way from userland to
> retreive PCI infos of a controller from it's /dev/sdXX node ?

It is a little harder. There is no way to see which drive is connected
to a controller. If you have an Adaptec you can parse something in
/proc/scsi/aic78xxx and scsi. The symbios logic driver gives you no
hint. The same problem with the IDE drives.

But what do we really need?

OF can only boot from known devices, I can't boot from an old adaptec
2940 or any symbios logic adapter.
And if you have an PCI IDE controller then the OF won't boot from
that unknown device.
This reduces the possible boot-devices:

We can boot from some Adaptec controllers, we can boot from every IDE
drive. Maybe there are some other controllers, I don't know.

And we are talking about "colored" Macs.

The drive /dev/hda and /dev/hdb is usualy connected to
/pci/*/ata-4/disk{0,1}, so you can search for that.
/dev/hdc and /dev/hdd is connected to ata-3.

If you have a supported Adaptec then you can parse /proc/scsi/aic78xxx
and /proc/scsi/scsi.

I will implement this in my script, the preview on the ftp server works
only with one card right now. I will add the IDE stuff in the next days.

It would be nice to know what I can expect under /proc.
There is a little hardware "detection" script
ftp://ftp.suse.com/pub/suse/ppc/update/BETA/suse_hw_info.sh

Please start it with . ./suse_hw_info.sh and mail us the tar.gz file.
It would be nice to have this for every possible machine, I will make
the infos available to the public.


Gruss Olaf

--
 $ man 1 current_release

BUGS
       Users never read manuals...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: find the OF boot-device
  2000-02-01 23:23   ` Olaf Hering
@ 2000-02-03  6:53     ` Takashi Oe
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Oe @ 2000-02-03  6:53 UTC (permalink / raw
  To: Olaf Hering; +Cc: linuxppc-dev


On Wed, 2 Feb 2000, Olaf Hering wrote:

> We can boot from some Adaptec controllers, we can boot from every IDE
> drive. Maybe there are some other controllers, I don't know.

Some symbios logic cotrollers among others.

> And we are talking about "colored" Macs.

MESH for all "uncolored" ones (just to be complete).


Takashi Oe


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-02-03  6:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-01 21:51 find the OF boot-device Olaf Hering
2000-02-01 22:04 ` Olaf Hering
2000-02-01 22:55 ` BenH
2000-02-01 23:23   ` Olaf Hering
2000-02-03  6:53     ` Takashi Oe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.