NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-ofppc/58909: model_init not called / defaults not set
>Number: 58909
>Category: port-ofppc
>Synopsis: model_init not called / defaults not set
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-ofppc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 15 22:35:00 +0000 2024
>Originator: Jack Dunn
>Release: current
>Organization:
>Environment:
NetBSD bull 10.99.12 NetBSD 10.99.12 (ESCALA) #3: Tue Dec 10 11:01:11 GMT 2024 jack@eclipse:/home/jack/bull_build/sys/arch/ofppc/compile/ESCALA ofppc
>Description:
In NetBSD 9.4 model_init() was called if the system had either a "name" or "model" property in the OpenFirmware root node. In commit v1.118 of sys/arch/ofppc/ofppc/machdep.c the code was slightly modified which results in model_init() only being called if the system has both a "name" and "model" property.
model_init() sets a few defaults which (for my system at least) are required for later stages of the boot process.
Since model_init() sets defaults for a few parameters it appears that it should be called regardless of the system having a model/name string.
>How-To-Repeat:
Boot a machine which has an OpenFirmware "model" prop but no "name" prop. Defaults such as ranges_offset and pciiodata will not be set resulting in failures further in the boot process.
>Fix:
Always call model_init() even if the system does not have a model/name to allow defaults to be set.
Here is a patch that always calls model_init.
--- a/sys/arch/ofppc/ofppc/machdep.c
+++ b/sys/arch/ofppc/ofppc/machdep.c
@@ -136,9 +136,9 @@ initppc(u_int startkernel, u_int endkernel, char *args)
if (i == -1) {
OF_getprop(node, "name", model_name,
sizeof(model_name));
- model_init();
}
}
+ model_init();
if ((oeacpufeat & OEACPU_NOBAT) == 0) {
node = OF_finddevice("/");
Tested on my Bull Escala T604.
Home |
Main Index |
Thread Index |
Old Index