From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmpT3-0006MT-Mz for qemu-devel@nongnu.org; Wed, 21 Sep 2016 17:54:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmpT2-0004Tw-Pl for qemu-devel@nongnu.org; Wed, 21 Sep 2016 17:54:13 -0400 Message-ID: <1474494834.2857.145.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Thu, 22 Sep 2016 07:53:54 +1000 In-Reply-To: <3E9DEC73-4C39-450A-9DAF-9EF17B0B0FB0@gmail.com> References: <5766C91B-319D-46CD-9020-19EB5299DF99@gmail.com> <1474266273.2857.11.camel@kernel.crashing.org> <852E4EA6-522A-499D-88DE-A1955D938D6D@gmail.com> <1474325083.2857.35.camel@kernel.crashing.org> <1474417098.2857.96.camel@kernel.crashing.org> <149AE2FD-4392-4F5F-A0AD-6613F5C47168@gmail.com> <1474418502.2857.97.camel@kernel.crashing.org> <1474448505.2857.116.camel@kernel.crashing.org> <3E9DEC73-4C39-450A-9DAF-9EF17B0B0FB0@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Add resolutions via the command-line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: G 3 Cc: The OpenBIOS Mailinglist , qemu-devel qemu-devel , "list@suse.de:PowerPC list:PowerPC" On Wed, 2016-09-21 at 14:26 -0400, G 3 wrote: >=20 > Nodes like chose, aliases, openprom are of class IOService. options=C2=A0= =C2=A0 > is of class IODTNVRAM. It looks like this class has problems. I'm=C2=A0= =C2=A0 > thinking since Alexander Graf did work in the mac_nvram.c file, he=C2=A0= =C2=A0 > might know what is wrong. What is wrong is purely that MacOS X limits how you do things on that node. Have a look at the OS X kernel source :-) The implementation of the support libraries to run NDRVs is all there (module IOGraphicsFamily iirc). > I found another way to access the options=C2=A0=C2=A0 > node in Mac OS X. Use this command: ioreg -c IODTNVRAM. It stops at=C2=A0= =C2=A0 > the options node and prints this error message: "ioreg: error: can't=C2= =A0=C2=A0 > obtain properties" in QEMU. On a real Power Mac the command prints=C2=A0= =C2=A0 > all the properties of the options node just fine. Correct, part of the problem is that I think we don't emulate the NVRAM in a format that OS X understands, a problem for another day. > I don't know about using binary. The way we do it now seems just fine. ASCII parsing in a driver sucks. > I just need to figure out how to write to the /chosen node from the=C2=A0= =C2=A0 > QEMU command line. I found a function called OpenBIOS_set_var() in=C2=A0= =C2=A0 > openbios_firmware_abi.h, but it would require an address to write to.=C2= =A0=C2=A0 > So where do I find the address of the /chosen node.... No, you don't. Do as I said. Have OpenBIOS construct the list of resolutions and put it in the node of the device itself. Cheers, Ben.