[OpenBIOS] [PATCH 4/5] pci: enable AAPL, address property for all Apple PPC machines

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Jan 4 10:54:26 CET 2016

On 04/01/16 08:20, Alexander Graf wrote:

> On 04.01.16 02:57, BALATON Zoltan wrote:
>> On Sun, 3 Jan 2016, Mark Cave-Ayland wrote:
>>> On 02/01/16 22:56, Mark Cave-Ayland wrote:
>>>> On 02/01/16 22:41, BALATON Zoltan wrote:
>>>>> On Sat, 2 Jan 2016, Mark Cave-Ayland wrote:
>>>>>> The property appears in device trees for both Old World and New World
>>>>>> Macs
>>>>>> so let's do the same.
>>>>>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
>>>>>> ---
>>>>>> openbios-devel/drivers/pci.c |    5 ++++-
>>>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>> diff --git a/openbios-devel/drivers/pci.c
>>>>>> b/openbios-devel/drivers/pci.c
>>>>>> index 45e954b..65f5fe9 100644
>>>>>> --- a/openbios-devel/drivers/pci.c
>>>>>> +++ b/openbios-devel/drivers/pci.c
>>>>>> @@ -1017,7 +1017,10 @@ static void ob_pci_add_properties(phandle_t
>>>>>> phandle,
>>>>>>     }
>>>>>>     pci_set_assigned_addresses(phandle, config, num_bars);
>>>>>> -    OLDWORLD(pci_set_AAPL_address(config));
>>>>>> +
>>>>>> +    if (is_apple()) {
>>>>>> +        OLDWORLD(pci_set_AAPL_address(config));
>>>>> The commit message suggests you intend to add it to New World machines
>>>>> too but it is still enclosed in OLDWORLD() after this patch. Is that
>>>>> correct? I think you wanted to replace OLDWORLD() with if(is_apple()).
>>>> Ah yes, and in fact the fix is to remove the surrounding OLDWORLD()
>>>> macro completely. Thanks for the review - I don't suppose it makes any
>>>> difference to MorphOS at all?
>>> Actually this may be a red herring, since the AAPL,address properties
>>> are present in the G4 AGP device trees but not the G4 PCI device trees.
>>> So unless G4 AGP are old world then this patch might be a red herring.
>>> Alex?
>> I think all G4 Macs are New World as it started somewhere around G3 and
>> all later models had New World ROM (that is OpenFirmware without
>> Toolbox). So I'm not sure why you don't see these in G4 PCI or if you do
>> it's not because of Old World ROM.
>> The model id we have now (PowerMac3,1) is corresponding to the G4 AGP
>> and I've picked this because it is the minimum required by MorphOS.
>> Previously it was probably some PCI model but the set of devices
>> currently emulated by QEMU may not really correspond to any of these
>> real machines.
> Yeah, my guess is that they left the legacy AAPL, bits in for Mac OS 9
> compatibility in systems where they cared about it. Since it is present
> in real world DTs, I think it's perfectly valid to expose it in OpenBIOS
> as well.

In the examples I've looked at, AAPL,address isn't included in all
devices on the G4 PCI so I suspect it may be generated by older FCode
ROMs for cards that can work on both old world and new world Macs.



More information about the OpenBIOS mailing list