Port-prep archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Issue with determining boot device using NVRAM
Alright, figured it out. The ?bH sections were other buses that needed
to be captured and assigned blank names. I could not get the ISA NIC
(ep0) to work with the fw-path, because there is an issue with the spec
that requires special handling of the integrated card. I don't think
it's even possible to do a remote boot off of it anyway (needs to be a
PCI NIC that's recognized by the firmware). There might be additional
buses that need to be captured for other PReP models, but these where
all the relevant ones on my machine. Here is the patch and dmesg output:
--- /usr/src/sys/arch/prep/prep/autoconf.c 2020-02-24
02:34:49.760979074 -0700
+++ /usr/src/sys/arch/prep/prep/autoconf.c 2020-02-24
02:30:18.387739603 -0700
@@ -117,7 +117,9 @@
device_is_a(dev, "pckbc") || device_is_a(dev, "pckbd") ||
device_is_a(dev, "vga") || device_is_a(dev, "wsdisplay") ||
device_is_a(dev, "wskbd") || device_is_a(dev, "wsmouse") ||
- device_is_a(dev, "pms") || device_is_a(dev, "cpu"))
+ device_is_a(dev, "pms") || device_is_a(dev, "cpu") ||
+ device_is_a(dev, "nvram") || device_is_a(dev, "isabeep") ||
+ device_is_a(dev, "audio"))
return;
if (device_is_a(dev, "pchb")) {
@@ -218,6 +220,11 @@
n += snprintf(devpath + n, sizeof(devpath) - n, "%d",
device_unit(dev));
}
+ /* Catch buses so they do not show up in the fw-path. DV_BUS? */
+ if (device_is_a(dev, "isa") || device_is_a(dev, "isapnp") ||
+ device_is_a(dev, "scsibus") || device_is_a(dev, "umass") ||
+ device_is_a(dev, "usb") || device_is_a(dev, "uhub"))
+ n = snprintf(devpath, sizeof(devpath), "");
str1 = prop_string_create_cstring(devpath);
KASSERT(str1 != NULL);
===dmesg===
...
pci0 devpath: /+pci@80000000 == /pci@80000000
pcib0 devpath: /pci@80000000+pci1014,a@b,0 == /pci@80000000/pci1014,a@b,0
isa0 devpath: /pci@80000000/pci1014,a@b,0+ == /pci@80000000/pci1014,a@b,0
fdc0 devpath: /pci@80000000/pci1014,a@b,0+PNP0700@3f0 ==
/pci@80000000/pci1014,a@b,0/PNP0700@3f0
pchb0 devpath: /pci@80000000+pci1057,1@0,0 == /pci@80000000/pci1057,1@0,0
pcn0 devpath: /pci@80000000+pci1022,2000@c,0: ==
/pci@80000000/pci1022,2000@c,0:
siop0 devpath: /pci@80000000+pci1000,1@10,0 == /pci@80000000/pci1000,1@10,0
pdcsata0 devpath: /pci@80000000+pci105a,3515@12,0 ==
/pci@80000000/pci105a,3515@12,0
ohci0 devpath: /pci@80000000+pci1033,35@16,0 ==
/pci@80000000/pci1033,35@16,0
ohci1 devpath: /pci@80000000+pci1033,35@16,1 ==
/pci@80000000/pci1033,35@16,1
ehci0 devpath: /pci@80000000+pci1033,e0@16,2 ==
/pci@80000000/pci1033,e0@16,2
scsibus0 devpath: /pci@80000000/pci1000,1@10,0+ ==
/pci@80000000/pci1000,1@10,0
atabus0 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
atabus1 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
atabus2 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
atabus3 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
usb0 devpath: /pci@80000000/pci1033,35@16,0+ ==
/pci@80000000/pci1033,35@16,0
usb1 devpath: /pci@80000000/pci1033,35@16,1+ ==
/pci@80000000/pci1033,35@16,1
usb2 devpath: /pci@80000000/pci1033,e0@16,2+ ==
/pci@80000000/pci1033,e0@16,2
fd0 devpath: /pci@80000000/pci1014,a@b,0/PNP0700@3f0+harddisk@0 ==
/pci@80000000/pci1014,a@b,0/PNP0700@3f0/harddisk@0
fd1 devpath: /pci@80000000/pci1014,a@b,0/PNP0700@3f0+harddisk@1 ==
/pci@80000000/pci1014,a@b,0/PNP0700@3f0/harddisk@1
isapnp0 devpath: /pci@80000000/pci1014,a@b,0+ == /pci@80000000/pci1014,a@b,0
uhub0 devpath: /pci@80000000/pci1033,35@16,0+ ==
/pci@80000000/pci1033,35@16,0
uhub1 devpath: /pci@80000000/pci1033,35@16,1+ ==
/pci@80000000/pci1033,35@16,1
uhub2 devpath: /pci@80000000/pci1033,e0@16,2+ ==
/pci@80000000/pci1033,e0@16,2
wd0 devpath: /pci@80000000/pci105a,3515@12,0+harddisk@0 ==
/pci@80000000/pci105a,3515@12,0/harddisk@0
sd0 devpath: /pci@80000000/pci1000,1@10,0+harddisk@0,0 ==
/pci@80000000/pci1000,1@10,0/harddisk@0,0
cd0 devpath: /pci@80000000/pci1000,1@10,0+cdrom@1,0 ==
/pci@80000000/pci1000,1@10,0/cdrom@1,0
cd1 devpath: /pci@80000000/pci1000,1@10,0+cdrom@6,0 ==
/pci@80000000/pci1000,1@10,0/cdrom@6,0
ep0 devpath: /pci@80000000/pci1014,a@b,0+: == /pci@80000000/pci1014,a@b,0/:
uhub3 devpath: /pci@80000000/pci1033,e0@16,2+ ==
/pci@80000000/pci1033,e0@16,2
uhidev0 devpath: /pci@80000000/pci1033,e0@16,2+ ==
/pci@80000000/pci1033,e0@16,2
umass0 devpath: /pci@80000000/pci1033,e0@16,2+ ==
/pci@80000000/pci1033,e0@16,2
ums0 devpath: /pci@80000000/pci1033,e0@16,2+0bH ==
/pci@80000000/pci1033,e0@16,2/0bH
scsibus1 devpath: /pci@80000000/pci1033,e0@16,2+ ==
/pci@80000000/pci1033,e0@16,2
sd1 devpath: /pci@80000000/pci1033,e0@16,2+harddisk@0,0 ==
/pci@80000000/pci1033,e0@16,2/harddisk@0,0
Modified bootpath: /pci@80000000/pci1000,1@10,0/harddisk@0,0
dev mainbus0: fw-path: /
dev pnpbus0: fw-path: /pci@80000000/pci1014,a@b,0
dev pci0: fw-path: /pci@80000000
dev fdc0: fw-path: /pci@80000000/pci1014,a@b,0/PNP0700@3f0
dev pchb0: fw-path: /pci@80000000/pci1057,1@0,0
dev pcib0: fw-path: /pci@80000000/pci1014,a@b,0
dev pcn0: fw-path: /pci@80000000/pci1022,2000@c,0:
dev siop0: fw-path: /pci@80000000/pci1000,1@10,0
dev pdcsata0: fw-path: /pci@80000000/pci105a,3515@12,0
dev ohci0: fw-path: /pci@80000000/pci1033,35@16,0
dev ohci1: fw-path: /pci@80000000/pci1033,35@16,1
dev ehci0: fw-path: /pci@80000000/pci1033,e0@16,2
dev scsibus0: fw-path: /pci@80000000/pci1000,1@10,0
dev atabus0: fw-path: /pci@80000000/pci105a,3515@12,0
dev atabus1: fw-path: /pci@80000000/pci105a,3515@12,0
dev atabus2: fw-path: /pci@80000000/pci105a,3515@12,0
dev atabus3: fw-path: /pci@80000000/pci105a,3515@12,0
dev usb0: fw-path: /pci@80000000/pci1033,35@16,0
dev usb1: fw-path: /pci@80000000/pci1033,35@16,1
dev usb2: fw-path: /pci@80000000/pci1033,e0@16,2
dev isa0: fw-path: /pci@80000000/pci1014,a@b,0
dev fd0: fw-path: /pci@80000000/pci1014,a@b,0/PNP0700@3f0/harddisk@0
dev fd1: fw-path: /pci@80000000/pci1014,a@b,0/PNP0700@3f0/harddisk@1
dev isapnp0: fw-path: /pci@80000000/pci1014,a@b,0
dev uhub0: fw-path: /pci@80000000/pci1033,35@16,0
dev uhub1: fw-path: /pci@80000000/pci1033,35@16,1
dev uhub2: fw-path: /pci@80000000/pci1033,e0@16,2
dev wd0: fw-path: /pci@80000000/pci105a,3515@12,0/harddisk@0
dev sd0: fw-path: /pci@80000000/pci1000,1@10,0/harddisk@0,0
boot device: sd0
root on wd0a dumps on wd0b
...
================
On 2/23/20 7:38 PM, T wrote:
Hello, I have had a consistent problem on this 43p 7248-132 where the
kernel fails to determine the boot device. It's been possible to work
around this issue by setting the kernel root file system path in the
kernel config and building a custom kernel to use. The current
hardware configuration of the system requires me to build a kernel, so
it's not a critical issue, but my curiosity of the root cause led me
to investigate it. Having reviewed some available dmesg outputs on the
web from similar machines, this issue does not look to have affected
those systems. Those machines do look to be running older versions of
NetBSD, mine is using 8.1_STABLE, so it's uncertain if this is an
issue specific to my machine. The source code that handles this
process is located in:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/prep/prep/autoconf.c
Using the kernel option "NVRAM_DUMP" and reviewing the the resulting
dmesg output has revealed devpath(and derived fw-path) strings with
extra characters that look as though they should not be there. The
PReP NVRAM specification for how these strings should be formatted is
located here:
ftp://ftp.software.ibm.com/rs6000/technology/spec/nvram_p.ps
In that document, section 1.2.3 provides example fw-paths, and they do
not have the extra segments, e.g. "0bH", "1bH", "2bH".
Can anyone else confirm that the "NVRAM_DUMP" dmesg output of their
machine looks similar to mine or if they have a similar problem with
boot device matching? I'll continue to look through the source code to
see if I can figure out what is occurring.
===excerpt from dmesg===
nvram0 at pnpbus0: port 0x74-0x75 0x76
nvram0: Read 3118 bytes from nvram of size 4096
Boot device: /pci@80000000/pci1000,1@10,0/harddisk@0,0
...
pci0 devpath: /+pci@80000000 == /pci@80000000
pcib0 devpath: /pci@80000000+pci1014,a@b,0 == /pci@80000000/pci1014,a@b,0
isa0 devpath: /pci@80000000/pci1014,a@b,0+0bH ==
/pci@80000000/pci1014,a@b,0/0bH
fdc0 devpath: /pci@80000000/pci1014,a@b,0/0bH+PNP0700@3f0 ==
/pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0
nvram0 devpath: /pci@80000000/pci1014,a@b,0/0bH+IBM0008@74 ==
/pci@80000000/pci1014,a@b,0/0bH/IBM0008@74
pchb0 devpath: /pci@80000000+pci1057,1@0,0 == /pci@80000000/pci1057,1@0,0
pcn0 devpath: /pci@80000000+pci1022,2000@c,0: ==
/pci@80000000/pci1022,2000@c,0:
siop0 devpath: /pci@80000000+pci1000,1@10,0 ==
/pci@80000000/pci1000,1@10,0
pdcsata0 devpath: /pci@80000000+pci105a,3515@12,0 ==
/pci@80000000/pci105a,3515@12,0
ohci0 devpath: /pci@80000000+pci1033,35@16,0 ==
/pci@80000000/pci1033,35@16,0
ohci1 devpath: /pci@80000000+pci1033,35@16,1 ==
/pci@80000000/pci1033,35@16,1
ehci0 devpath: /pci@80000000+pci1033,e0@16,2 ==
/pci@80000000/pci1033,e0@16,2
scsibus0 devpath: /pci@80000000/pci1000,1@10,0+0bH ==
/pci@80000000/pci1000,1@10,0/0bH
atabus0 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
atabus1 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
atabus2 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
atabus3 devpath: /pci@80000000/pci105a,3515@12,0+ ==
/pci@80000000/pci105a,3515@12,0
usb0 devpath: /pci@80000000/pci1033,35@16,0+0bH ==
/pci@80000000/pci1033,35@16,0/0bH
usb1 devpath: /pci@80000000/pci1033,35@16,1+1bH ==
/pci@80000000/pci1033,35@16,1/1bH
usb2 devpath: /pci@80000000/pci1033,e0@16,2+0bH ==
/pci@80000000/pci1033,e0@16,2/0bH
fd0 devpath: /pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0+harddisk@0 ==
/pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0/harddisk@0
fd1 devpath: /pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0+harddisk@1 ==
/pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0/harddisk@1
isapnp0 devpath: /pci@80000000/pci1014,a@b,0/0bH+0bH ==
/pci@80000000/pci1014,a@b,0/0bH/0bH
uhub0 devpath: /pci@80000000/pci1033,35@16,0/0bH+0bH ==
/pci@80000000/pci1033,35@16,0/0bH/0bH
uhub1 devpath: /pci@80000000/pci1033,35@16,1/1bH+1bH ==
/pci@80000000/pci1033,35@16,1/1bH/1bH
uhub2 devpath: /pci@80000000/pci1033,e0@16,2/0bH+2bH ==
/pci@80000000/pci1033,e0@16,2/0bH/2bH
wd0 devpath: /pci@80000000/pci105a,3515@12,0+harddisk@0 ==
/pci@80000000/pci105a,3515@12,0/harddisk@0
sd0 devpath: /pci@80000000/pci1000,1@10,0/0bH+harddisk@0,0 ==
/pci@80000000/pci1000,1@10,0/0bH/harddisk@0,0
cd0 devpath: /pci@80000000/pci1000,1@10,0/0bH+cdrom@1,0 ==
/pci@80000000/pci1000,1@10,0/0bH/cdrom@1,0
cd1 devpath: /pci@80000000/pci1000,1@10,0/0bH+cdrom@6,0 ==
/pci@80000000/pci1000,1@10,0/0bH/cdrom@6,0
ep0 devpath: /pci@80000000/pci1014,a@b,0/0bH/0bH+: ==
/pci@80000000/pci1014,a@b,0/0bH/0bH/:
uhub3 devpath: /pci@80000000/pci1033,e0@16,2/0bH/2bH+2bH ==
/pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH
nsphy0 devpath: /pci@80000000/pci1014,a@b,0/0bH/0bH/:+ ==
/pci@80000000/pci1014,a@b,0/0bH/0bH/:
umass0 devpath: /pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH+ ==
/pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH
scsibus1 devpath: /pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH+0bH ==
/pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH/0bH
sd1 devpath:
/pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH/0bH+harddisk@0,0 ==
/pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH/0bH/harddisk@0,0
Modified bootpath: /pci@80000000/pci1000,1@10,0/harddisk@0,0
dev mainbus0: fw-path: /
dev pnpbus0: fw-path: /pci@80000000/pci1014,a@b,0/0bH
dev pci0: fw-path: /pci@80000000
dev fdc0: fw-path: /pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0
dev nvram0: fw-path: /pci@80000000/pci1014,a@b,0/0bH/IBM0008@74
dev pchb0: fw-path: /pci@80000000/pci1057,1@0,0
dev pcib0: fw-path: /pci@80000000/pci1014,a@b,0
dev pcn0: fw-path: /pci@80000000/pci1022,2000@c,0:
dev siop0: fw-path: /pci@80000000/pci1000,1@10,0
dev pdcsata0: fw-path: /pci@80000000/pci105a,3515@12,0
dev ohci0: fw-path: /pci@80000000/pci1033,35@16,0
dev ohci1: fw-path: /pci@80000000/pci1033,35@16,1
dev ehci0: fw-path: /pci@80000000/pci1033,e0@16,2
dev scsibus0: fw-path: /pci@80000000/pci1000,1@10,0/0bH
dev atabus0: fw-path: /pci@80000000/pci105a,3515@12,0
dev atabus1: fw-path: /pci@80000000/pci105a,3515@12,0
dev atabus2: fw-path: /pci@80000000/pci105a,3515@12,0
dev atabus3: fw-path: /pci@80000000/pci105a,3515@12,0
dev usb0: fw-path: /pci@80000000/pci1033,35@16,0/0bH
dev usb1: fw-path: /pci@80000000/pci1033,35@16,1/1bH
dev usb2: fw-path: /pci@80000000/pci1033,e0@16,2/0bH
dev isa0: fw-path: /pci@80000000/pci1014,a@b,0/0bH
dev fd0: fw-path: /pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0/harddisk@0
dev fd1: fw-path: /pci@80000000/pci1014,a@b,0/0bH/PNP0700@3f0/harddisk@1
dev isapnp0: fw-path: /pci@80000000/pci1014,a@b,0/0bH/0bH
dev uhub0: fw-path: /pci@80000000/pci1033,35@16,0/0bH/0bH
dev uhub1: fw-path: /pci@80000000/pci1033,35@16,1/1bH/1bH
dev uhub2: fw-path: /pci@80000000/pci1033,e0@16,2/0bH/2bH
dev wd0: fw-path: /pci@80000000/pci105a,3515@12,0/harddisk@0
dev sd0: fw-path: /pci@80000000/pci1000,1@10,0/0bH/harddisk@0,0
/* not in dmesg /pci@80000000/pci1000,1@10,0/harddisk@0,0 */
dev cd0: fw-path: /pci@80000000/pci1000,1@10,0/0bH/cdrom@1,0
dev cd1: fw-path: /pci@80000000/pci1000,1@10,0/0bH/cdrom@6,0
dev ep0: fw-path: /pci@80000000/pci1014,a@b,0/0bH/0bH/:
dev uhub3: fw-path: /pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH
dev nsphy0: fw-path: /pci@80000000/pci1014,a@b,0/0bH/0bH/:
dev umass0: fw-path: /pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH
dev scsibus1: fw-path: /pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH/0bH
dev sd1: fw-path:
/pci@80000000/pci1033,e0@16,2/0bH/2bH/2bH/0bH/harddisk@0,0
boot device: <unknown>
...
==================
Home |
Main Index |
Thread Index |
Old Index