Port-vax archive

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

Re: About support for rtVAX300



Holm Tiffe wrote:

> [..]
> 
> We made some progress guys :-)
> 
> That is the current stand of things:
> 
> 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.0 (RTVAX300-test) #179: Sun Jan 13 18:21:03 CET 2013
> 
> holm%beast.freibergnet.de@localhost:/home/holm/tmp/netbsd/root6/usr/src/sys/arch/vax/compile/RTVAX
> Embedded VAX rtVAX 300
> total memory = 16380 KB
> avail memory = 13068 KB
> mainbus0 (root)
> cpu0 at mainbus0: RTVAX300, CVAX microcode rev 6 Firmware rev 17
> ze at mainbus0 not configured
> lance at mainbus0 not configured
> uba at mainbus0 not configured
> boot device: <unknown>
> root device: 
> ... here it sits and waits, should provice a getchar() maybe..
> 
> I've removed the entire rtvbus from the configuration so the devices should
> be attached to the mainbus0 now.
> In the case of the ze0 it seems I can only reach this, when I hack the
> "ze" in to the following line in ka650.c:
> 
> static const char * const ka650_devs[] = { "cpu", "ze", "lance", "uba", NULL 
> };
> This is why lance and uba are displayed here too (no problem).
> 
> There are now some questions again:
> 
> I know from the Hardware manual that the SCN2681 should interrupt at IPL14
> and the SGEC at IPL15.
> 
> in scn.c I have to establish the interrupt for that chip somewhere,
> the original MIPS software has done this:
> 
> cpu_intr_establish(duartno, IPL_TTY, scnintr, duart);
> 
> I had, while using that rtvbus this:
> 
> rtv_intr_establish(&duartno, IPL_TTY, (void *)scnintr, duart, NULL);
> 
> ..which compiles flawlessly, but no I couldn't find where that IPL_TTY is
> defined? It may false...
> 
> Now I have looked at that dz_vsbus.c and there this looks like this:
> 
> scb_vecalloc(va->va_cvec, dzxint, sc, SCB_ISTACK, &sc->sc_tintrcnt);
> scb_vecalloc(va->va_cvec - 4, dzrint, sc, SCB_ISTACK, &sc->sc_rintrcnt);
> 
> therefore I'm trying to use this:
> 
> scb_vecalloc(IPL_TTY, (void (*)(void *)) scnintr, sc, SCB_ISTACK, 
> &sc->sc_intrcnt);
> 
> 
> Is this correct so far? That IPL_TTY for sure not, what is the correct
> value for this? ( I'm crossbuilding on FreeBSD, have no netbsd manuals on
> that system, maybe I can find what this functions want in the source or on
> the web, but ...)
> 
> The next thing is, that the ze0 soesn't get attached, there are the values
> looking like this:
> 
> #define SGECADDR        0x20008000
> #define NISA_ROM        0x20084000
> #define NISA_ROM_VXT    0x200c4000
> #define NISA_ROM_VSBUS  0x27800000
> #define NISA_ROM_RTVAX  0x20010000
> #define SGECVEC         0x108
> 
> static int      ze_mainbus_match(device_t, cfdata_t, void *);
> static void     ze_mainbus_attach(device_t, device_t, void *);
> 
> static const struct sgec_data {
>         uint32_t sd_boardtype;
>         bus_addr_t sd_addr;
>         bus_addr_t sd_rom;
>         uint16_t sd_intvec;
>         uint8_t sd_romshift;
> } sgec_data[] = {
>         { VAX_BTYP_660, SGECADDR, NISA_ROM, SGECVEC, 24, },
> #if VXT2000 || VAXANY
>         { VAX_BTYP_VXT, SGECADDR, NISA_ROM_VXT, 0x200, 0, },
> #endif
> #if RTVAX || VAXANY
>         { VAX_BTYP_RTVAX300, SGECADDR, NISA_ROM_RTVAX, 0x108, 24, },
> #endif
>         { VAX_BTYP_670, SGECADDR, NISA_ROM, SGECVEC, 8, },
>         { VAX_BTYP_680, SGECADDR, NISA_ROM, SGECVEC, 8, },
>         { VAX_BTYP_681, SGECADDR, NISA_ROM, SGECVEC, 8, },
>         { VAX_BTYP_48, SGECADDR, NISA_ROM_VSBUS, SGECVEC, 0, },
>         { VAX_BTYP_49, SGECADDR, NISA_ROM_VSBUS, SGECVEC, 0, },
>         { VAX_BTYP_53, SGECADDR, NISA_ROM, SGECVEC, 8, },
> 
> .. I've corrected that NISA_ROM and the Address for the SGEC is ok.
> SGECVEC is defined in this file as 0x108, tried that 0x200 from the VS2000
> also..but this where a strange coincidence if it qould fit.
> 
> What are the correct values for the both int vecs?
> (..and whow they are calculated?)
> 
> Regards,
> 
> Holm
> -- 

little more progress:

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.0 (RTVAX300-test) #193: Sun Jan 13 20:06:29 CET 2013

holm%beast.freibergnet.de@localhost:/home/holm/tmp/netbsd/root6/usr/src/sys/arch/vax/compile/RTVAX
Embedded VAX rtVAX 300
total memory = 16380 KB
avail memory = 13068 KB
mainbus0 (root)
cpu0 at mainbus0: RTVAX300, CVAX microcode rev 6 Firmware rev 17
ze0 at mainbus0
ze0: hardware address 00:00:f8:50:93:14
lance at mainbus0 not configured
uba at mainbus0 not configured
boot device: ze0
root on ze0
nfs_boot: trying DHCP/BOOTP

..at first, tcpdump says that it isn't doing anything after that, it is not
trying bootp..

Interestingly  I had to put "sgec" instead of "ze0" into the device string
in ka650.c since the ze_mainbus_match() routine is somewhat simple:
         */
        if (strcmp(ma->ma_type, "sgec"))
                return 0;

        return ze_find() != NULL;

Ok.

If found out that interrupts with the SGEC are a bit of special thing,
since the vector is to be placed in the nicr0 Register of that chip.
Nevertheless the vector is in ze_mainbus_attach installed with the same
function as I tried with the SCN2681:

       scb_vecalloc(sc->sc_intvec, (void (*)(void *)) sgec_intr, sc,
            SCB_ISTACK, &sc->sc_intrcnt);

I'm now really unshure how this may work together.
I found an vector specification for the SCN2681 for 0x2c0 in the manual,
how this is related with the IPL14? Can please someone try to enlighten me?

Regards,

Holm
-- 
      Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, 
     Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583
  www.tsht.de, info%tsht.de@localhost, Fax +49 3731 74200, Mobil: 0172 8790 741



Home | Main Index | Thread Index | Old Index