Subject: OpenBOOT 2.x vs. OpenBOOT 3.x vs. OpenFirmware
To: None <port-sparc@netbsd.org>
From: Michael <macallan18@earthlink.net>
List: port-sparc
Date: 03/07/2005 08:13:54
--Signature=_Mon__7_Mar_2005_08_13_54_-0500_4dU5ISSiW_fB/+FW
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Hello,

just a bunch of questions I ran into...
OBP 3.x and OpenFirmware seem very similar, in fact similar enough that macppc and sparc64 can share some drivers which need limited OF/OBP access, things like width/height/linebytes/depth/address exist as properties for most framebuffer device nodes on both platforms - enough for wsdisplay. Now that I'm hacking the pnozz driver ( got the blitter running, finally ) I found that it has hard-coded values for display width and height, but if I remember correctly there's at least one SPARCbook model with a 640x480 panel on a p9100 and probably one with 1024x768. Anyway, in my naivety I assumed I could just do something like
OF_getprop(sc->sc_node, "width", &width, 4)
to figure out what the firmware thinks about display width, but this leads to a kernel trap. The firmware itself ( OBP 2.something ) seems a little different too, the command to list device properties is apparently different ( .properties doesn't work ). For pnozz I could extract the correct values from the graphics chip so it would always use whatever it finds, but just out of curiosity:
- how can I access device properties from the OBP 2.x prompt?
- for cgsix ( more hard-coded geometry, I've seen more than one cgsix running in something else than 1152x900 so we should probably get rid of this ) - which forth words/properties return display geometry information and exist on both OBP2 and 3?
- what exactly is the difference between prom_getprop() and OF_getprop()? The latter works on sparc64 and macppc, the former apparently on sparc and sparc64 - is there something that works on all three?

have fun
Michael

--Signature=_Mon__7_Mar_2005_08_13_54_-0500_4dU5ISSiW_fB/+FW
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBQixTkspnzkX8Yg2nAQKnHwgAismcOfN+Nqa0F9VNQUrEDlbcCNrUKA2U
7z9H1AHWkgpfVlOOnxv6aZdo52gfQwuvtPYybe1+b1bhxsPSFOJGFMcK8QuVDFzu
8Di8nfpC6ezIyhB/fd+l98sNB0RgzeUpRvVHBDDyCM/+TgEucVrbHreyMDQEFwib
P5NXZQksVCXYkSOwEIpi2jw8lEwsenVi230T1OnKZquM66VXVdYP+gqhwMMggSHt
JBSOSxCH7ywPezy5mVrPgpnS5ojXE6IKglqR/YVgC7RWyttIeRJvFkjVdYyN1IPl
5RbE/CTKB6YT0sqVNmSpWlQjoAOD8743YlyfVqprf3WIjZ5q+nuyvA==
=sul6
-----END PGP SIGNATURE-----

--Signature=_Mon__7_Mar_2005_08_13_54_-0500_4dU5ISSiW_fB/+FW--