NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/57394: CPU unable to attach mainbus on NetBSD 10.0_BETA(Current?) on Power Macintosh 9600(G2)



The following reply was made to PR port-macppc/57394; it has been noted by GNATS.

From: Michael <macallan1888%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-macppc/57394: CPU unable to attach mainbus on NetBSD
 10.0_BETA(Current?) on Power Macintosh 9600(G2)
Date: Tue, 9 May 2023 04:50:22 -0400

 >  > OF_finddevice("/cpus") function return -1 on G2 Mac...   
 >  
 >  -1 is the expected error message everwhere, and != 0 is just a bogus
 >  test. Furthermore the sign of the handle should not matter, so > 0 is
 >  clearly wrong.
 >  
 >  The test should be != -1, see
 >  https://nxr.netbsd.org/xref/src/sys/arch/powerpc/powerpc/openfirm.c#345
 
 I dimly remember some Apple OF variants returning 0 on (some) errors,
 there was a reason why checks for 0 or -1 are littered all over the
 place other than my forgetfulness.
 Time to check on my oddball collection, I'd expect something like that
 to pop in one of the 2.0x variants.
 
 have fun
 Michael
  
 


Home | Main Index | Thread Index | Old Index