[OpenBIOS] [commit] r1317 - trunk/openbios-devel/arch/sparc64

repository service svn at openbios.org
Wed Sep 24 20:03:49 CEST 2014


Author: mcayland
Date: Wed Sep 24 20:03:48 2014
New Revision: 1317
URL: http://tracker.coreboot.org/trac/openbios/changeset/1317

Log:
SPARC64: configure the Sabre PCI TAS register

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>

Modified:
   trunk/openbios-devel/arch/sparc64/openbios.c

Modified: trunk/openbios-devel/arch/sparc64/openbios.c
==============================================================================
--- trunk/openbios-devel/arch/sparc64/openbios.c	Mon Aug 25 15:08:08 2014	(r1316)
+++ trunk/openbios-devel/arch/sparc64/openbios.c	Wed Sep 24 20:03:48 2014	(r1317)
@@ -116,6 +116,20 @@
         : : "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 @@
 	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();



More information about the OpenBIOS mailing list