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

Artyom Tarasenko atar4qemu at gmail.com
Sat Sep 13 19:35:10 CEST 2014


Acked-by: Artyom Tarasenko <atar4qemu at gmail.com>

On Sat, Sep 13, 2014 at 10:15 AM, Mark Cave-Ayland
<mark.cave-ayland at ilande.co.uk> wrote:
> 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
>



-- 
Regards,
Artyom Tarasenko

linux/sparc and solaris/sparc under qemu blog:
http://tyom.blogspot.com/search/label/qemu



More information about the OpenBIOS mailing list