This patchset is loosely based on earlier work by BALATON Zoltan <balaton(a)eik.bme.hu>
and provides basic infrastructure to allow OpenBIOS to enable PCI device
bus mastering.
Following on from discussions on the QEMU mailing list, it seems that Apple's OF
enables bus mastering for some PCI devices by default, and as a result some buggy
drivers forget to explicitly enable it and hence these devices fail under QEMU's
emulation.
The first 3 patches add the basic support routines while the last 2 patches enable
bus mastering for the rtl8139 card on Apple PPC machines which is required for
OS X and MorphOS.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Mark Cave-Ayland (5):
pci: introduce ob_pci_enable_bus_master() function
pci: introduce ob_pci_is_bus_master_capable() function
pci: add PCI database entry for rtl8139 network card
pci: add rtl8139_config_cb() to configure rtl8139 network cards
ppc: mark PCI slots 0-2 for Apple PPC machies as bus master capable
openbios-devel/arch/ppc/qemu/init.c | 9 ++++---
openbios-devel/drivers/pci.c | 44 +++++++++++++++++++++++++++++++++
openbios-devel/drivers/pci_database.c | 6 +++++
openbios-devel/drivers/pci_database.h | 4 +++
openbios-devel/include/drivers/pci.h | 2 ++
5 files changed, 62 insertions(+), 3 deletions(-)
--
1.7.10.4
On 21/01/16 14:12, Peter Lemenkov wrote:
> Hello All!
> Sorry for the delayed answer.
>
> 2016-01-18 14:53 GMT+01:00 Segher Boessenkool <segher(a)kernel.crashing.org>:
>
>> Why not? Manual says to do just this; and I tested it just now to make
>> sure I am not imagining things, and it works fine. So what is unusual
>> in your setup?
>
> I accidentally confused you - everything works fine if I pass
> variables like you suggested. But I'd like to add possibility to
> override variables using envronment variables.
>
> This is exactly how various Linux distros' buildsystems are working.
> So being able to setup variables system-wide would be helpful!
If you're trying to override DESTDIR then you'd already need something
that executes "make DESTDIR=/path/to/destdir" so if this works as Segher
suggests then can you not do "make DESTDIR=$DESTDIR" or similar?
ATB,
Mark.
On Mon, Jan 18, 2016 at 01:38:04PM +0100, Peter Lemenkov wrote:
> >> > But why do you need it? Why doesn't e.g.
> >> >
> >> > make DESTDIR=/opt/bla
> >> >
> >> > work for you as-is? Or do you need those vars to be passed in via the
> >> > environment?
> >>
> >> Unfortunately this DESTDIR trick won't work. Explicitly stated
> >> variables from the Makefile itself have preference over the
> >> environment variables unless they stated with "?=". At least this is
> >> how GNU make works.
> >
> > But this is *not* an environment variable!
>
> Yes, sorry. Anyway we can't override Makefile-variables that way
> unless we allow it.
Why not? Manual says to do just this; and I tested it just now to make
sure I am not imagining things, and it works fine. So what is unusual
in your setup?
Segher
On Mon, Jan 18, 2016 at 11:04:34AM +0100, Peter Lemenkov wrote:
> Hello All!
>
> 2016-01-18 7:50 GMT+01:00 Segher Boessenkool <segher(a)kernel.crashing.org>:
>
> > It probably works fine. "?=" can be problematic with e.g. recursive
> > makefiles, but you don't have those here.
>
> Also it's already used within the Makefiles to override C-compiler, so
> my patch won't change the current situation.
>
> > But why do you need it? Why doesn't e.g.
> >
> > make DESTDIR=/opt/bla
> >
> > work for you as-is? Or do you need those vars to be passed in via the
> > environment?
>
> Unfortunately this DESTDIR trick won't work. Explicitly stated
> variables from the Makefile itself have preference over the
> environment variables unless they stated with "?=". At least this is
> how GNU make works.
But this is *not* an environment variable!
Segher
Wondering if there have been any recent developments getting OpenBIOS + Qemu working for the Sparc64 platform? I have a couple of legacy applications that require 64-bit Sparc support that would nice to have running on here. Anything I can do to help debug issues? I have ISOs for 64-bit Solaris 8, 9, 10, and 11, and am happy to test stuff out.
-Nick
==
This e-mail may contain SEAKR Engineering (SEAKR) Confidential and Proprietary Information. If this message is not intended for you, you are strictly prohibited from using this message, its contents or attachments in any way. If you have received this message in error, please delete the message from your mailbox. This e-mail may contain export-controlled material and should be handled accordingly.
Author: mcayland
Date: Fri Jan 8 13:09:46 2016
New Revision: 1376
URL: http://tracker.coreboot.org/trac/openbios/changeset/1376
Log:
pci: remove the configuration space range from the PCI host bridge by default
While the configuration space range appears in real SPARC device trees, it
isn't mentioned in the IEEE-1275 PCI bindings and in fact causes Darwin/OS X
to calculate PCI address spaces incorrectly.
Disable this range in the PCI host bridge by default, except for SPARC64
where it can evidently still appear.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Reviewed-by: Alexander Graf <agraf(a)suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/drivers/pci.c
Modified: trunk/openbios-devel/drivers/pci.c
==============================================================================
--- trunk/openbios-devel/drivers/pci.c Fri Jan 8 13:09:44 2016 (r1375)
+++ trunk/openbios-devel/drivers/pci.c Fri Jan 8 13:09:46 2016 (r1376)
@@ -460,13 +460,18 @@
int ncells;
ncells = 0;
- /* first encode PCI configuration space */
- {
- ncells += pci_encode_phys_addr(props + ncells, 0, CONFIGURATION_SPACE,
+
+#ifdef CONFIG_SPARC64
+ /* While configuration space isn't mentioned in the IEEE-1275 PCI
+ bindings, it appears in the PCI host bridge ranges property in
+ real device trees. Hence we disable this range for all host
+ bridges except for SPARC, particularly as it causes Darwin/OS X
+ to incorrectly calculated PCI memory space ranges on PPC. */
+ ncells += pci_encode_phys_addr(props + ncells, 0, CONFIGURATION_SPACE,
config->dev, 0, 0);
ncells += host_encode_phys_addr(props + ncells, arch->cfg_addr);
ncells += pci_encode_size(props + ncells, arch->cfg_len);
- }
+#endif
if (arch->io_base) {
ncells += pci_encode_phys_addr(props + ncells, 0, IO_SPACE,