From owner-freebsd-ppc@freebsd.org Fri Oct 30 15:29:28 2020 Return-Path: Delivered-To: freebsd-ppc@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E757454346 for ; Fri, 30 Oct 2020 15:29:28 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CN5p02JdYz46KY for ; Fri, 30 Oct 2020 15:29:28 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 2BC5E2EBF2 for ; Fri, 30 Oct 2020 15:29:28 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 1D3D327C005A for ; Fri, 30 Oct 2020 11:29:28 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Fri, 30 Oct 2020 11:29:28 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleehgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddutddmnecujfgurhepofgfgg fkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdeurhgrnhguohhnuceuvghr ghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtth gvrhhnpeevkefhtdevhedtkedutefhffduueevleefgfffleffleeivddvffdvgeeujefg ieenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhfrhgvvggsshgurdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghho nhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqud ekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id DA288C200A6; Fri, 30 Oct 2020 11:29:27 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <88d23ee0-765d-1b82-4318-2c8359018b1a@freebsd.org> <0f4a1ee8-a37f-ea3d-6807-bb2431235a82@gmail.com> Date: Fri, 30 Oct 2020 10:29:08 -0500 From: "Brandon Bergren" To: "FreeBSD PowerPC ML" Subject: Re: Question about xserve G5 Content-Type: text/plain X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 15:29:28 -0000 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" > -- Brandon Bergren bdragon@FreeBSD.org