NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-alpha/48148: NetBSD/alpha fails to install on AlphaStaion DS15



>Number:         48148
>Category:       port-alpha
>Synopsis:       NetBSD/alpha fails to install on AlphaStaion DS15
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 22 18:40:00 +0000 2013
>Originator:     nullnilaki
>Release:        NetBSD 6.1.1
>Organization:
Japan
>Environment:
NetBSD HARUTE 6.1.1 NetBSD 6.1.1 (GENERIC-$Revision: 1.343 $) #41: Thu Aug 22 
15:51:20 UTC 2013  naruaki@:/usr/obj.alpha/sys/arch/alpha/compile/GENERIC alpha
>Description:
NetBSD/alpha fails to install on AlphaStaion DS15
=======================================================================
AlphaStation DS15 Console V7.2-2, built on Jun 9 2006 at 15:45:46
>>>boot dqa0
(boot dqa0.0.0.13.0 -flags a)
block 0 of dqa0.0.0.13.0 is a valid boot block
reading 13 blocks from dqa0.0.0.13.0
bootstrap code read in
base = 2be000, image_start = 0, image_bytes = 1a00(6656)
initializing HWRPB at 2000
initializing page table at 1fff0000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code
 
NetBSD/alpha 6.1.1 ISO 9660 Primary Bootstrap
Jumping to entry point...
 
NetBSD/alpha 6.1.1 Secondary Bootstrap, Revision 1.13
 
VMS PAL rev: 0x1000700010162
OSF PAL rev: 0x100070002015c
Switch to OSF PAL code succeeded.
 
Boot flags: a
10205376+201944=0x9ed480
 
Entering netbsd at 0xfffffc0000431230...
 
NetBSD does not yet support system type 38 (???).
 
panic: platform not supported
Stopped in pid 0.1 (system) at fffffc0000496e18: ret zero,(ra)
db>
========================================================================
>How-To-Repeat:

>Fix:
Ported from OpenBSD:
========================================================================
diff -Narbu alpha.orig/alpha/.DS_Store alpha/alpha/.DS_Store
diff -Narbu alpha.orig/alpha/cpuconf.c alpha/alpha/cpuconf.c
--- alpha.orig/alpha/cpuconf.c  2012-02-06 02:14:10.000000000 +0000
+++ alpha/alpha/cpuconf.c       2013-08-22 22:16:00.000000000 +0000
@@ -233,6 +233,7 @@
        cpu_notsupp(ST_DEC_EV56_PBP, "EV56 Passive Backplane Board"),
        cpu_notsupp(ST_DEC_ALPHAVME_320, "AlphaVME 320"),
        cpu_init(ST_DEC_6600, dec_6600_init, "DEC_6600"),
+       cpu_init(ST_DEC_TITAN, dec_6600_init, "DEC_6600"), 
        cpu_init(ST_API_NAUTILUS, api_up1000_init, "API_UP1000"),
 };
 static const int ncpuinit = (sizeof(cpuinit) / sizeof(cpuinit[0]));
diff -Narbu alpha.orig/include/rpb.h alpha/include/rpb.h
--- alpha.orig/include/rpb.h    2012-02-06 02:14:13.000000000 +0000
+++ alpha/include/rpb.h 2013-08-22 22:21:48.000000000 +0000
@@ -452,7 +452,7 @@
                u_long          mddt_p_bitaddr; /*  20: bitmap phys addr */
                int64_t         mddt_bit_cksum; /*  28: bitmap checksum */
 
-#define        MDDT_NONVOLATILE                0x10    /* cluster is 
non-volatile */
+#define MDDT_NONVOLATILE               0x02    /* cluster is non-volatile */ 
 #define        MDDT_PALCODE                    0x01    /* console and PAL only 
*/
 #define        MDDT_SYSTEM                     0x00    /* system software only 
*/
 #define        MDDT_mbz          0xfffffffffffffffc    /* 2:63 -- must be zero 
*/
diff -Narbu alpha.orig/pci/tsc.c alpha/pci/tsc.c
--- alpha.orig/pci/tsc.c        2011-05-17 17:34:47.000000000 +0000
+++ alpha/pci/tsc.c     2013-08-22 22:46:14.000000000 +0000
@@ -66,7 +66,7 @@
 
 extern struct cfdriver tsc_cd;
 
-struct tsp_config tsp_configuration[2];
+struct tsp_config tsp_configuration[4];
 
 static int tscprint(void *, const char *pnp);
 
@@ -91,9 +91,15 @@
 {
        struct mainbus_attach_args *ma = aux;
 
-       return cputype == ST_DEC_6600
-           && strcmp(ma->ma_name, tsc_cd.cd_name) == 0
-           && !tscfound;
+       switch (cputype) {
+       case ST_DEC_6600:
+       case ST_DEC_TITAN:
+               return strcmp(ma->ma_name, tsc_cd.cd_name) == 0 && !tscfound;
+       default:
+               return 0;
+       }
+       
+
 }
 
 static void
@@ -104,15 +110,17 @@
        uint64_t csc, aar;
        struct tsp_attach_args tsp;
        struct mainbus_attach_args *ma = aux;
+       int titan = cputype == ST_DEC_TITAN;
+
 
        tscfound = 1;
 
        csc = LDQP(TS_C_CSC);
 
        nbus = 1 + (CSC_BC(csc) >= 2);
-       printf(": 21272 Core Logic Chipset, Cchip rev %d\n"
+       printf(": 2127%c Core Logic Chipset, Cchip rev %d\n"
                "%s%d: %c Dchips, %d memory bus%s of %d bytes\n",
-               (int)MISC_REV(LDQP(TS_C_MISC)),
+               titan ? '4' : '2', (int)MISC_REV(LDQP(TS_C_MISC)),
                ma->ma_name, ma->ma_slot, "2448"[CSC_BC(csc)],
                nbus, nbus > 1 ? "es" : "", 16 + 16 * ((csc & CSC_AW) != 0));
        printf("%s%d: arrays present: ", ma->ma_name, ma->ma_slot);
@@ -123,20 +131,29 @@
        }
        printf(", Dchip 0 rev %d\n", (int)LDQP(TS_D_DREV) & 0xf);
 
-       memset(&tsp, 0, sizeof tsp);
        tsp.tsp_name = "tsp";
-       config_found(self, &tsp, NULL);
+       tsp.tsp_slot = 0; 
+       
+       config_found(self, &tsp, tscprint);
+       if (titan) {
+               tsp.tsp_slot += 2;
+               config_found(self, &tsp, tscprint);
+       }
 
-       if(LDQP(TS_C_CSC) & CSC_P1P) {
-               ++tsp.tsp_slot;
+        if (csc & CSC_P1P) {
+               tsp.tsp_slot = 1;
+               config_found(self, &tsp, tscprint);
+               if (titan) {
+                       tsp.tsp_slot += 2;
                config_found(self, &tsp, tscprint);
        }
+       }
 }
 
 static int
 tscprint(void *aux, const char *p)
 {
-       register struct tsp_attach_args *tsp = aux;
+       struct tsp_attach_args *tsp = aux;
 
        if(p)
                aprint_normal("%s%d at %s", tsp->tsp_name, tsp->tsp_slot, p);
@@ -150,8 +167,13 @@
 {
        struct tsp_attach_args *t = aux;
 
-       return  cputype == ST_DEC_6600
-           && strcmp(t->tsp_name, tsp_cd.cd_name) == 0;
+       switch (cputype) {
+       case ST_DEC_6600:
+       case ST_DEC_TITAN:
+               return strcmp(t->tsp_name, tsp_cd.cd_name) == 0;
+       default:
+               return 0;
+       }
 }
 
 static void
@@ -193,12 +215,24 @@
        /* n:    Pchip number */
 {
        struct tsp_config *pcp;
+       int titan = cputype == ST_DEC_TITAN;
 
-       KASSERT((n | 1) == 1);
+       KASSERT(n >= 0 && n < nitems(tsp_configuration));
        pcp = &tsp_configuration[n];
        pcp->pc_pslot = n;
        pcp->pc_iobase = TS_Pn(n, 0);
-       pcp->pc_csr = S_PAGE(TS_Pn(n, P_CSRBASE));
+       pcp->pc_csr = S_PAGE(TS_Pn(n & 1, P_CSRBASE));
+       if (n & 2) {
+               /* `A' port of PA Chip */
+               pcp->pc_csr++;
+       }
+       if (titan) {
+               /* same address on G and A ports */
+               pcp->pc_tlbia = &pcp->pc_csr->port.g.tsp_tlbia.tsg_r;
+       } else {
+               pcp->pc_tlbia = &pcp->pc_csr->port.p.tsp_tlbia.tsg_r;
+       }
+
        if (!pcp->pc_initted) {
                tsp_bus_io_init(&pcp->pc_iot, pcp);
                tsp_bus_mem_init(&pcp->pc_memt, pcp);
diff -Narbu alpha.orig/pci/tsp_dma.c alpha/pci/tsp_dma.c
--- alpha.orig/pci/tsp_dma.c    2012-02-06 02:14:15.000000000 +0000
+++ alpha/pci/tsp_dma.c 2013-08-22 22:51:42.000000000 +0000
@@ -118,10 +118,10 @@
        static struct map_expected {
                uint32_t base, mask, enables;
        } premap[4] = {
-               { 0x800000,                0x700000, WSBA_ENA | WSBA_SG },
-               { 0x80000000 | WSBA_ENA, 0x3ff00000, WSBA_ENA           },
-               { 0, 0 },
-               { 0, 0 }
+               { 0x00800000, 0x00700000, WSBA_ENA | WSBA_SG },
+               { 0x80000000, 0x3ff00000, WSBA_ENA           },
+               { 0, 0, 0 },
+               { 0, 0, 0 }
        };
 
        alpha_mb();
@@ -207,6 +207,14 @@
        alpha_mb();
 
        /*
+        * Enable window 1 in direct mode.
+        */
+       alpha_mb();
+       pccsr->tsp_wsba[1].tsg_r =
+           (pccsr->tsp_wsba[1].tsg_r & ~WSBA_SG) | WSBA_ENA;
+       alpha_mb();
+
+       /*
         * Check windows for sanity, especially if we later decide to
         * use the firmware's initialization in some cases.
         */
@@ -354,6 +362,6 @@
 {
 
        alpha_mb();
-       pcp->pc_csr->tsp_tlbia.tsg_r = 0;
+       *pcp->pc_tlbia = 0;
        alpha_mb();
 }
diff -Narbu alpha.orig/pci/tsreg.h alpha/pci/tsreg.h
--- alpha.orig/pci/tsreg.h      2012-02-06 02:14:15.000000000 +0000
+++ alpha/pci/tsreg.h   2013-08-22 22:56:40.000000000 +0000
@@ -186,7 +186,7 @@
  */
 
 #define        P_CSRBASE        0x001##8000##0000UL
-#define        P_PCI_MEM        0
+#define        P_PCI_MEM        0x800##0000##0000UL
 #define        P_PCI_IO         0x001##fc00##0000UL
 #define        P_PCI_CONFIG     0x001##fe00##0000UL
 
@@ -198,6 +198,7 @@
 #define        TS_P1(offs)     (0x102##0000##0000UL + (offs))
 #define        TS_Pn(n, offs)  (0x100##0000##0000UL + 0x2##0000##0000UL * (n) 
+ (offs))
 
+
 /*
  * Tsunami Generic Register Type
  */
@@ -209,15 +210,8 @@
 /*
  * Tsunami Pchip
  */
-struct ts_pchip {
-       TS_GR   tsp_wsba[4];    /* Window Space Base Address */
-
-       TS_GR   tsp_wsm[4];     /* Window Space Mask */
-
-       TS_GR   tsp_tba[4];     /* Translated Base Address */
 
-       TS_GR   tsp_pctl;       /* Pchip Control */
-       TS_GR   tsp_plat;       /* Pchip Latency */
+struct ts_pport {
        TS_GR   tsp_resA;
        TS_GR   tsp_error;      /* Pchip Error */
 
@@ -232,6 +226,56 @@
        TS_GR   tsp_resC;
 
        TS_GR   tsp_resD_K[8];
+};
+
+struct ts_gport {
+       TS_GR   tsp_resA[2];
+       TS_GR   tsp_serror;
+       TS_GR   tsp_serrmask;
+       TS_GR   tsp_serrset;
+       TS_GR   tsp_resB;
+       TS_GR   tsp_gperrmask;
+       TS_GR   tsp_gperren;
+       TS_GR   tsp_gperrset;
+       TS_GR   tsp_resC;
+       TS_GR   tsp_tlbiv;
+       TS_GR   tsp_tlbia;
+       TS_GR   tsp_resD[2];
+       TS_GR   tsp_sctl;
+       TS_GR   tsp_resE[3];
+};
+
+struct ts_aport {
+       TS_GR   tsp_resA[2];
+       TS_GR   tsp_agperror;
+       TS_GR   tsp_agperrmask;
+       TS_GR   tsp_agperrset;
+       TS_GR   tsp_agplastwr;
+       TS_GR   tsp_aperror;
+       TS_GR   tsp_aperrmask;
+       TS_GR   tsp_aperrset;
+       TS_GR   tsp_resB;
+       TS_GR   tsp_tlbiv;
+       TS_GR   tsp_tlbia;
+       TS_GR   tsp_resC[6];
+};
+
+struct ts_pchip {
+       TS_GR   tsp_wsba[4];    /* Window Space Base Address */
+
+       TS_GR   tsp_wsm[4];     /* Window Space Mask */
+
+       TS_GR   tsp_tba[4];     /* Translated Base Address */
+
+       TS_GR   tsp_pctl;       /* Pchip Control */
+       TS_GR   tsp_plat;       /* Pchip Latency */
+
+       union {
+               struct ts_pport p;
+               struct ts_gport g;
+               struct ts_aport a;
+       } port;
 
        TS_GR   tsp_sprts;      /* ??? */
+       TS_GR   tsp_res[31];
 };
diff -Narbu alpha.orig/pci/tsvar.h alpha/pci/tsvar.h
--- alpha.orig/pci/tsvar.h      2012-02-06 02:14:15.000000000 +0000
+++ alpha/pci/tsvar.h   2013-08-22 22:57:50.000000000 +0000
@@ -44,6 +44,7 @@
        int     pc_initted;             /* Initialized */
        uint64_t pc_iobase;             /* All Pchip space starts here */
        struct  ts_pchip *pc_csr;       /* Pchip CSR space starts here */
+       volatile uint64_t *pc_tlbia;    /* Pchip TLBIA register address */ 
 
        struct  alpha_bus_space pc_iot, pc_memt;
        struct  alpha_pci_chipset pc_pc;
========================================================================
Taking a picture(NetBSD 6.1):
http://twitpic.com/d92b4e
========================================================================
Boot log:
>>>boot dka0
(boot dka0.0.0.8.0 -flags a)
block 0 of dka0.0.0.8.0 is a valid boot block
reading 13 blocks from dka0.0.0.8.0
bootstrap code read in
base = 2be000, image_start = 0, image_bytes = 1a00(6656)
initializing HWRPB at 2000
initializing page table at 1fff0000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code

NetBSD/alpha 6.1.1 FFS Primary Bootstrap
Jumping to entry point...

NetBSD/alpha 6.1.1 Secondary Bootstrap, Revision 1.13 (Thu Aug 22 15:43:13 UTC 
2013)

VMS PAL rev: 0x1000700010162
OSF PAL rev: 0x100070002015c
Switch to OSF PAL code succeeded.

Boot flags: a
10392704+285360 [570384+380142]=0xb17830

Entering netbsd at 0xfffffc0000431230...
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 6.1.1 (GENERIC-$Revision: 1.343 $) #43: Thu Aug 22 17:37:31 UTC 2013
        naruaki@:/usr/obj.alpha/sys/arch/alpha/compile/GENERIC
AlphaStation DS15, 1000MHz, s/n AY42501857
8192 byte page size, 1 processor.
total memory = 512 MB
(2880 KB reserved for PROM, 509 MB used by NetBSD)
avail memory = 490 MB
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21264C-6
cpu0: Architecture extensions: 0x1307<PAT,MVI,CIX,FIX,BWX>
tsc0 at mainbus0: 21274 Core Logic Chipset, Cchip rev 0
tsc0: 2 Dchips, 1 memory bus of 16 bytes
tsc0: arrays present: 512MB, 0MB, 0MB, 0MB, Dchip 0 rev 1
tsp0 at tsc0
pci0 at tsp0 bus 0
sio0 at pci0 dev 7 function 0: Acer Labs M1533 PCI-ISA Bridge (rev. 0xc3)
ahc0 at pci0 dev 8 function 0: Adaptec aic7899 Ultra160 SCSI adapter
ahc0: interrupting at dec 6600 irq 13
ahc0: aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
scsibus0 at ahc0: 16 targets, 8 luns per target
ahc1 at pci0 dev 8 function 1: Adaptec aic7899 Ultra160 SCSI adapter
ahc1: interrupting at dec 6600 irq 12
ahc1: aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs
scsibus1 at ahc1: 16 targets, 8 luns per target
fxp0 at pci0 dev 9 function 0: Intel i82559ER Ethernet (rev. 0x09)
fxp0: interrupting at dec 6600 irq 28
fxp0: Ethernet address 00:0f:20:2b:e1:24
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1 at pci0 dev 10 function 0: Intel i82559ER Ethernet (rev. 0x09)
fxp1: interrupting at dec 6600 irq 4
fxp1: Ethernet address 00:0f:20:2b:e1:23
inphy1 at fxp1 phy 1: i82555 10/100 media interface, rev. 4
inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
aceride0 at pci0 dev 13 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 
0xc1)
aceride0: primary channel interrupting at isa irq 14
atabus0 at aceride0 channel 0
aceride0: secondary channel interrupting at isa irq 15
atabus1 at aceride0 channel 1
isa0 at sio0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
attimer0 at isa0 port 0x40-0x43
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
attimer0: attached to pcppi0
tsp1 at tsc0
pci1 at tsp1 bus 0
radeonfb0 at pci1 dev 7 function 0: ATI Technologies Radeon 7500 QW (rev. 0x00)
radeonfb0: 64 MB aperture at 0x40000000, 64 KB registers at 0x01020000
radeonfb0: display 0: initial virtual resolution 640x480 at 8 bpp
radeonfb0: port 0: physical 1024x768 60Hz
radeonfb0: port 1: physical 1024x768 60Hz
wsdisplay0 at radeonfb0 kbdmux 1
drm at radeonfb0 not configured
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-ST RW/DVD GCC-4480B, , 2.06> cdrom removable
sd0 at scsibus0 target 0 lun 0: <FUJITSU, MAU3073NP, 3502> disk fixed
sd0: 70007 MB, 49158 cyl, 4 head, 729 sec, 512 bytes/sect x 143374744 sectors
sd0: sync (12.50ns offset 127), 16-bit (160.000MB/s) transfers, tagged queueing
root on sd0a dumps on sd0b
root file system type: ffs
Fri Aug 23 02:47:30 JST 2013
Starting root file system check:
/dev/rsd0a: file system is clean; not checking
swapctl: setting dump device to /dev/sd0b
swapctl: adding /dev/sd0b as swap device at priority 0
Starting file system checks:
Setting tty flags.
Setting sysctl variables:
ddb.onpanic: 1 -> 0
Starting network.
Hostname: HARUTE
IPv6 mode: host
Configuring network interfaces: fxp0.
Adding interface aliases:.
add net default: gateway 192.168.1.1
Building databases: devcprng sysctl: WARNING pseudorandom rekeying.
, utmp, utmpx.
Starting syslogd.
Mounting all filesystems...
Clearing temporary files.
Updating fontconfig cache: done.
Checking quotas: done.
Loaded entropy from disk.
Setting securelevel: kern.securelevel: 0 -> 1
swapctl: setting dump device to /dev/sd0b
Starting virecover.
Checking for core dump...
savecore: no core dump
Starting local daemons:.
Updating motd.
Starting inetd.
Starting cron.
Fri Aug 23 02:47:42 JST 2013

NetBSD/alpha (HARUTE) (console)

login:
========================================================================
Build pkgsrc:
bootstrap-mk-files-20130727 *.mk files for the bootstrap bmake utility
bmake-20110606nb1   Portable (autoconf) version of NetBSD 'make' utility
pkg_install-20130131nb1 Package management and administration tools for pkgsrc
digest-20121220     Message digest wrapper utility
libtool-base-2.4.2nb4 Generic shared library support script (the script itself)
libyaml-0.1.4       YAML 1.1 parser and emitter written in C
ruby193-base-1.9.3p448nb3 Ruby 1.9.3 release minimum base package
ruby193-args_parser-0.1.4 Parse ARGV from command line with DSL
ruby193-parallel-0.6.4 Run any kind of code in parallel processes
ruby193-rainbow-1.1.4 Extends ruby String class enabling coloring text on ANSI 
terminals
ruby193-simple_oauth-0.2.0 Simple builds and verifies OAuth headers
ruby193-multi_json-1.7.0 General-purpose swappable JSON backend library
ruby193-multipart-post-1.2.0 Multipart form post accessory for Net::HTTP
ruby193-faraday-0.8.8 HTTP/REST API client library
ruby193-twitter-4.6.2 Ruby interface to the Twitter API
ruby193-hashie-1.2.0 Small collection of tools that make hashes more powerful
ruby193-oauth-0.4.7 OAuth Core Ruby implementation
ruby193-yajl-1.1.0  Ruby C binding to YAJL JSON library
ruby193-userstream-1.3.0 Simple twitter userstream library
ruby193-json-1.8.0  Native extension implementation of JSON for Ruby
ruby193-tw-0.4.2    CUI Twitter Client
========================================================================
Notice!:
Do not use radeonfb because Display blackout and panic.
========================================================================

That's very nice of you!



Home | Main Index | Thread Index | Old Index