From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFT5E-0003HZ-TT for qemu-devel@nongnu.org; Sat, 02 Jan 2016 15:47:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFT5B-0003hK-HM for qemu-devel@nongnu.org; Sat, 02 Jan 2016 15:47:28 -0500 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:53405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFT5B-0003gb-Al for qemu-devel@nongnu.org; Sat, 02 Jan 2016 15:47:25 -0500 References: <5682F552.90305@ilande.co.uk> <9C26B2B6-1384-437E-B60F-8CC452F2F159@gmail.com> <5683E43A.9040203@ilande.co.uk> <96B9267A-2429-4C38-B187-0A8F68B5A991@gmail.com> <56840D2B.7020908@ilande.co.uk> <251F828B-25A7-41D1-B536-4CEC57A02EDE@gmail.com> <56852C68.9050509@ilande.co.uk> <56857A42.8050903@ilande.co.uk> <697CCE7B-D01D-4009-9203-6D319A60AE77@gmail.com> <56879ABD.9020607@ilande.co.uk> <37C0F0B1-54C0-4AED-ABEE-5312C396AE98@gmail.com> From: Mark Cave-Ayland Message-ID: <56883740.6080400@ilande.co.uk> Date: Sat, 2 Jan 2016 20:46:56 +0000 MIME-Version: 1.0 In-Reply-To: <37C0F0B1-54C0-4AED-ABEE-5312C396AE98@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Paolo Bonzini , jasowang@redhat.com, qemu-devel qemu-devel On 02/01/16 17:08, Programmingkid wrote: >> After some head scratching chasing this through for several hours >> yesterday, I've worked out what is happening and have a patchset for >> OpenBIOS which should fix the issue (will post later along with some >> other PCI fixes for testing). >> >> This is actually a bug in Darwin in that it doesn't parse the address >> space part of the "ranges" property for the /pci node. OpenBIOS adds all >> 3 spaces to the "ranges" - configuration, I/O and memory compared to >> real Macs which only add I/O and memory. Which is generally fine because >> each entry contains a 2-bit indicator so that the OS knows which entry >> represents each address space. >> >> Except that Darwin evidently doesn't bother parsing the address space >> from each "range" entry and blindly assumes that entry 0 is I/O space >> and entry 1 is memory space as would be found in a real Mac device tree. >> The result of this is that currently I/O accesses go to entry 0 (config >> space) and memory accesses go to entry 1 (I/O space) which is why the >> RTL8139 happens to work with your patch to force bus mastering. >> >> AFAICT with basic testing here, forcing the /pci node to mimic that of a >> real Mac by omitting the configuration space entry seems to fix all PCI >> accesses (or at least they get routed to the correct address spaces), I >> see an attempt to set the bus master bit in the command register, and I >> don't get a reset timeout on startup for the RTL8139 anymore. > > > Wow, you figure out stuff fast! Will be waiting for your patches. I've just posted the OpenBIOS patches to the list (see http://www.openfirmware.info/pipermail/openbios/2016-January/008959.html). Please test and let me know if this solves your networking problems against a vanilla QEMU git master checkout - it looks good in the logs, but I can't quite figure out how to manually bring up a new en0 interface in Darwin from the command line. ATB, Mark.