[OpenBIOS] [PATCH] mac: Don't set APPL, address properties on NewWorld

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu Aug 4 21:30:55 CEST 2016


On 04/08/16 02:16, Benjamin Herrenschmidt wrote:

> They are created by the MacOS ROM and in some cases MacOS X to contain
> the *virtual* addresses of the BARs as mapped by the kernel.
> 
> Having these already there with the wrong values causes the hangs
> with MacOS X 10.5 and the video driver.
> 
> The reason is that the IONDRVFramebuffer code in OS X 10.5 won't replace
> those properties if they already exist, so the driver ends up accessing
> the addresses put in there by OpenBIOS which aren't valid mapped virtual
> addresses under OS X.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
>  drivers/pci.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci.c b/drivers/pci.c
> index 0cdf0bf..9813086 100644
> --- a/drivers/pci.c
> +++ b/drivers/pci.c
> @@ -1029,10 +1029,9 @@ static void ob_pci_add_properties(phandle_t phandle,
>  	}
>  
>  	pci_set_assigned_addresses(phandle, config, num_bars);
> -	
> -	if (is_apple()) {
> +
> +	if (is_apple() && is_oldworld())
>  		pci_set_AAPL_address(config);
> -	}
>  
>  	PCI_DPRINTF("\n");
>  }

Yeah this looks entirely sensible.

I've applied this to my next branch (with a typo fix-up in the subject)
- thanks a lot!


ATB,

Mark.




More information about the OpenBIOS mailing list