[OpenBIOS] [PATCH] SPARC64: configure the Sabre PCI TAS register

Peter Firmstone peter.firmstone at zeus.net.au
Sat Sep 13 13:45:45 CEST 2014


Anyone know if OpenBios works with Sun's Hypervisor (also free software) on it's Niagara servers?

Wondering if it's feasible to use this for vga bios emulation for 3d graphics support with Gentoo linux?

Cheers,

Pete.

----- Original message -----
> Make sure that we declare the same range available as set by the
> virtual-dma properties hardcoded in sabre_configure().
> 
> This register is checked by FreeBSD during boot which panics if it finds
> a default (zero) value.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
> ---
>   openbios-devel/arch/sparc64/openbios.c |     18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/openbios-devel/arch/sparc64/openbios.c
> b/openbios-devel/arch/sparc64/openbios.c index 9cc1ac2..3a36146 100644
> --- a/openbios-devel/arch/sparc64/openbios.c
> +++ b/openbios-devel/arch/sparc64/openbios.c
> @@ -116,6 +116,20 @@ sparc64_reset_all(void)
>                   : : "r" (val), "r" (addr) : "memory");
>   }
>   
> +/* PCI Target Address Space Register (see UltraSPARC IIi User's Manual
> +   section 19.3.0.4) */
> +#define PBM_PCI_TARGET_AS                           0x2028
> +#define PBM_PCI_TARGET_AS_CD_ENABLE       0x40
> +
> +static void
> +sparc64_set_tas_register(unsigned long val)
> +{
> +       unsigned long addr = APB_SPECIAL_BASE + PBM_PCI_TARGET_AS;
> +
> +       asm("stxa %0, [%1] 0x15\n\t"
> +               : : "r" (val), "r" (addr) : "memory");
> +}
> +
>   static void cpu_generic_init(const struct cpudef *cpu, uint32_t
> clock_frequency) {
>           unsigned long iu_version;
> @@ -574,6 +588,10 @@ arch_init( void )
>       modules_init();
>   #ifdef CONFIG_DRIVER_PCI
>                   ob_pci_init();
> +
> +               /* Set TAS register to match the virtual-dma properties
> +                     set during sabre configure */
> +               sparc64_set_tas_register(PBM_PCI_TARGET_AS_CD_ENABLE);
>   #endif
>                   nvconf_init();
>                   device_end();
> -- 
> 1.7.10.4
> 
> 
> -- 
> OpenBIOS                                 http://openbios.org/
> Mailinglist:   http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.openfirmware.info/pipermail/openbios/attachments/20140913/b3e88a0e/attachment.html>


More information about the OpenBIOS mailing list