Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-02 Thread Mark Cave-Ayland
On 02/01/16 04:00, Programmingkid wrote: >> Well they are returning non-zero values, so that's good. After a bit >> more poking, something doesn't make sense - in that same file >> RTL8139::initPCIConfigSpace() claims to set the bus master bit, but if I >> add tracing to hw/pci/pci-host.c then I

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-02 Thread Programmingkid
On Jan 2, 2016, at 4:39 AM, Mark Cave-Ayland wrote: > On 02/01/16 04:00, Programmingkid wrote: > >>> Well they are returning non-zero values, so that's good. After a bit >>> more poking, something doesn't make sense - in that same file >>> RTL8139::initPCIConfigSpace() claims to set the bus

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-02 Thread Mark Cave-Ayland
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

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Paolo Bonzini
On 30/12/2015 01:35, Programmingkid wrote: > After a lot of stepping thru code using gdb, I found out that a > MemoryRegions's enabled member variable was set to false, causing a zero > value being returned every time. When I set the value to true, that is > when the magic started happening. For

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Programmingkid
On Jan 1, 2016, at 5:36 PM, Paolo Bonzini wrote: > > > On 01/01/2016 21:42, Programmingkid wrote: >>> In other words, the driver is buggy and presumably would have never >>> worked on real hardware? >> >> I can't say that for sure. I would need an actual RTL8139 nic with a >> PowerMac

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Programmingkid
On Jan 1, 2016, at 4:36 PM, Paolo Bonzini wrote: > > > On 30/12/2015 01:35, Programmingkid wrote: >> After a lot of stepping thru code using gdb, I found out that a >> MemoryRegions's enabled member variable was set to false, causing a zero >> value being returned every time. When I set the

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Paolo Bonzini
On 29/12/2015 18:59, Programmingkid wrote: > @@ -699,6 +699,7 @@ static inline int pci_dma_rw(PCIDevice *dev, dma_addr_t > addr, > static inline int pci_dma_read(PCIDevice *dev, dma_addr_t addr, > void *buf, dma_addr_t len) > { > +

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Programmingkid
On Jan 1, 2016, at 3:32 PM, Paolo Bonzini wrote: > > > On 29/12/2015 18:59, Programmingkid wrote: >> @@ -699,6 +699,7 @@ static inline int pci_dma_rw(PCIDevice *dev, dma_addr_t >> addr, >> static inline int pci_dma_read(PCIDevice *dev, dma_addr_t addr, >>void

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Programmingkid
On Dec 31, 2015, at 1:56 PM, Mark Cave-Ayland wrote: > On 31/12/15 18:26, Programmingkid wrote: > >>> Yeah, I see that too. Given that you have the source to the Apple >>> RTL8139 driver at hand, can you try with a patched OpenBIOS using the >>> bus master patchset on the mailing list and also

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2016-01-01 Thread Paolo Bonzini
On 01/01/2016 21:42, Programmingkid wrote: > > In other words, the driver is buggy and presumably would have never > > worked on real hardware? > > I can't say that for sure. I would need an actual RTL8139 nic with a PowerMac > running > Mac OS 10.4 to answer that question. Is there anyone on

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Mark Cave-Ayland
On 30/12/15 17:50, Programmingkid wrote: >> Okay. I've just posted a revised patchset to the OpenBIOS list which may >> (or may not) help, so please test with that aswell to see if it makes a >> difference. > > I have test your patch set. First I disabled my change to the pci_dma_read() >

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Programmingkid
On Dec 31, 2015, at 8:23 AM, Mark Cave-Ayland wrote: > On 30/12/15 17:50, Programmingkid wrote: > >>> Okay. I've just posted a revised patchset to the OpenBIOS list which may >>> (or may not) help, so please test with that aswell to see if it makes a >>> difference. >> >> I have test your

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Mark Cave-Ayland
On 31/12/15 18:26, Programmingkid wrote: >> Yeah, I see that too. Given that you have the source to the Apple >> RTL8139 driver at hand, can you try with a patched OpenBIOS using the >> bus master patchset on the mailing list and also add some debugging to >> your copy of >>

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-31 Thread Programmingkid
On Dec 31, 2015, at 1:56 PM, Mark Cave-Ayland wrote: > On 31/12/15 18:26, Programmingkid wrote: > >>> Yeah, I see that too. Given that you have the source to the Apple >>> RTL8139 driver at hand, can you try with a patched OpenBIOS using the >>> bus master patchset on the mailing list and also

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-30 Thread Mark Cave-Ayland
On 30/12/15 16:47, Programmingkid wrote: > I did disable the change I made to the pci_dma_read() function and applied > this > patch to OpenBIOS. It makes Mac OS X stop booting. This is the message it is > stuck at when Zoltan's patch is applied: > mig_table_max_displ = 70 > > I even removed

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-30 Thread Programmingkid
On Dec 30, 2015, at 9:03 AM, Mark Cave-Ayland wrote: > On 30/12/15 00:35, Programmingkid wrote: > >> On Dec 29, 2015, at 7:05 PM, Programmingkid wrote: >> >>> >>> On Dec 29, 2015, at 4:04 PM, Mark Cave-Ayland wrote: >>> On 29/12/15 17:59, Programmingkid wrote: > This patch

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-30 Thread Programmingkid
On Dec 30, 2015, at 11:58 AM, Mark Cave-Ayland wrote: > On 30/12/15 16:47, Programmingkid wrote: > >> I did disable the change I made to the pci_dma_read() function and applied >> this >> patch to OpenBIOS. It makes Mac OS X stop booting. This is the message it is >> stuck at when Zoltan's

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-30 Thread Mark Cave-Ayland
On 30/12/15 00:35, Programmingkid wrote: > On Dec 29, 2015, at 7:05 PM, Programmingkid wrote: > >> >> On Dec 29, 2015, at 4:04 PM, Mark Cave-Ayland wrote: >> >>> On 29/12/15 17:59, Programmingkid wrote: >>> This patch solves the few problems that needed to be solved in order for a Mac

[Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-29 Thread Programmingkid
This patch solves the few problems that needed to be solved in order for a Mac OS 10.4 guest to use the rtl8139 nic. The pci_dma_read() function would only return zero when a MemoryRegion object was not enabled. Enabling the object makes the pci_dma_read() function work correctly. The Linux

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-29 Thread Programmingkid
On Dec 29, 2015, at 7:05 PM, Programmingkid wrote: > > On Dec 29, 2015, at 4:04 PM, Mark Cave-Ayland wrote: > >> On 29/12/15 17:59, Programmingkid wrote: >> >>> This patch solves the few problems that needed to be solved in order for a >>> Mac OS 10.4 guest to use the rtl8139 nic. >>> >>>

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-29 Thread Programmingkid
On Dec 29, 2015, at 4:04 PM, Mark Cave-Ayland wrote: > On 29/12/15 17:59, Programmingkid wrote: > >> This patch solves the few problems that needed to be solved in order for a >> Mac OS 10.4 guest to use the rtl8139 nic. >> >> The pci_dma_read() function would only return zero when a

Re: [Qemu-devel] [PATCH] Make rtl8139 network interface card compatible with Mac OS 10.4

2015-12-29 Thread Mark Cave-Ayland
On 29/12/15 17:59, Programmingkid wrote: > This patch solves the few problems that needed to be solved in order for a > Mac OS 10.4 guest to use the rtl8139 nic. > > The pci_dma_read() function would only return zero when a MemoryRegion object > was not enabled. Enabling the object makes the