Question about xserve G5

Brandon Bergren bdragon at FreeBSD.org
Fri Oct 30 15:29:28 UTC 2020


In any case, without the interpreter, what we have to do on a per model basis is manually decode the platform functions from a dumped device tree and do the same sequences in C, and then run that code when encountering that model.

On Fri, Oct 30, 2020, at 10:25 AM, Brandon Bergren wrote:
> 
> 
> On Fri, Oct 30, 2020, at 10:02 AM, Javi Hotmail wrote:
> > Is there any documentation that I could read about this? Also why is not
> > possible from the kernel to run functions from the DT?. I just started
> > looking at the code now; It seems to me that depends on some sort of
> > openfirmware functionality. Why is this?
> > 
> > Regards,
> > 
> 
> It's not possible because we don't have an implementation of the 
> platform function interpreter written.
> 
> If someone were to write a BSD-licensed platform function interpreter, 
> it would be pretty easy to hook it in.
> 
> The (GPL) linux interpreter is an example of a platform function 
> interpreter. 
> https://github.com/torvalds/linux/blob/master/arch/powerpc/platforms/powermac/pfunc_core.c
> 
> Darwin has one as well but when I looked at it it was a bunch of 
> Objective C that would be less work to just reimplement rather than 
> trying to use. (I think the license wasn't BSD either)
> 
> The device tree has a series of platform functions that contain 
> bytecode that the kernel runs to do a function like change the cpu 
> clockrate, etc. It's done this way so it can be run without having to 
> context-switch, and have platform drivers that automatically work on 
> all Mac99 machines.
> 
> I'm not sure off the top of my head what documentation there is available.
> _______________________________________________
> freebsd-ppc at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
> To unsubscribe, send any mail to "freebsd-ppc-unsubscribe at freebsd.org"
>

-- 
  Brandon Bergren
  bdragon at FreeBSD.org


More information about the freebsd-ppc mailing list