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:
> Holm Tiffe wrote:
>
> > Anders Magnusson wrote:
> >
> > > On 01/12/2013 11:53 PM, Holm Tiffe wrote:
> > > >[..]
> > > >
> > > >I'm no on that point, weher I should be able to talk with the UART.
> > > >
> > > >The machine boots int my (incomplete) scncnprobe().
> > > >
> > > >void
> > > >scncnprobe(struct consdev *cn)
> > > >{
> > > >
> > > >//static vaddr_t dz_regs;
> > > >
> > > > extern vaddr_t iospace;
> > > > vaddr_t * du_base;
> > > > int diagcons;
> > > > paddr_t ioaddr = 0x20100000;
> > > > extern const struct cdevsw scn_cdevsw;
> > > >
> > > > switch(vax_boardtype) {
> > > > case VAX_BTYP_RT300:
> > > > diagcons = 0;
> > > > break;
> > > > default:
> > > > cn->cn_pri = CN_DEAD;
> > > > return;
> > > > }
> > > > if (diagcons)
> > > > cn->cn_pri = CN_REMOTE;
> > > > else
> > > > cn->cn_pri = CN_NORMAL;
> > > > cn->cn_dev = makedev(cdevsw_lookup_major(&scn_cdevsw),
> > > > diagcons);
> > > > du_base = (void *)iospace;
> > > > ioaccess(iospace, ioaddr, 1);
> > > > du_base[0xc]=0xa;
> > > > DELAY(10000);
> > > > du_base[0xc]=(u_char)0x42;
> > > > DELAY(10000);
> > > > __asm("halt");
> > > >
> > > >}
> > > >
> > > The code above is correct. iospace is set to a hole in the virtual
> > > address space already, ioaccess() just maps ioaddr to that hole.
> > >
> > > If it just ends with this halt (no machine checks) then there is
> > > something where you write, and the most likely error is that you are not
> > > writing correctly to the UART :-)
> > >
> > > You can try from the console to get it output something maybe, like
> > > >>> D/P/B 2010000C 42
> >
> > That works, no problem.
> > >
> > > or whatever syntax the UART has.
> > >
> > > -- Ragge
> >
> > I swa the first character appering when I changed vaddr_t du_base to
> > volatile u_char * du_base.
> >
> > In the meantime I got a lot more:
> >
> > Using IP address: 192.168.50.20
> > myip: rtvax (192.168.50.20)
> > root addr=192.168.50.50 path=/data/home/exports/rtvax
> > 2070876+92264 [155104+148119]=0x25a65c
> >
> > scncprobe passed.
> > 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) #156: Sun Jan 13 12:48:13 CET 2013
> >
> > holm%beast.freibergnet.de@localhost:/home/holm/tmp/netbsd/root6/usr/src/sys/arch/vax/compile/RTVAX
> > VAXstation RTVAX
> > total memory = 16380 KB
> > avail memory = 13064 KB
> > r0=00000000 r1=00000005 r2=00000000 r3=00000018 r4=802f1800 r5=00000000
> > r6=8025ae00 r7=8007fdc8
> > r8=00400c3c r9=8025a65c r10=00000000 r11=00000003
> > ap=8025c790 fp=8025c77c sp=ffffffff pc=80001293
> > panic: SEGV in kernel mode: pc 0x80001293 addr 0x201ffffc
> > ý
> >
> > I'm curios about that "VAXstation RTVAX" thing is coming from, at least the
> > first part of it, and I don't think taht there are 16MB of memory at all.
> > Interresting is the panic, sine there is the LED Register address involved.
> > I'll try to look from where that comes, must be one of my experiments..
> >
> >
> > At least that kernel just saying "Hello " as you wrote..
> >
> >
> > Regards,
> >
> > Holm
> >
> > --
>
> Ok, after a bit cleaning of LED Register stuff and some __asm("halts")
> it ends now here:
>
> 2070876+92264 [155104+148119]=0x25a65c
>
> scncprobe passed.
> 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) #158: Sun Jan 13 13:01:32 CET 2013
>
> holm%beast.freibergnet.de@localhost:/home/holm/tmp/netbsd/root6/usr/src/sys/arch/vax/compile/RTVAX
> VAXstation RTVAX
> total memory = 16380 KB
> avail memory = 13064 KB
> mainbus0 (root)
> cpu0 at mainbus0: RTVAX300, CVAX microcode rev 6 Firmware rev 17
> rtvbus0 at mainbus0
> r0=81800e00 r1=00000001 r2=8028c820 r3=00010080 r4=00000001 r5=00000200
> r6=80fdf640 r7=801ee848
> r8=801fff68 r9=801ee848 r10=80fcd900 r11=8025c68c
> ap=8025c4e0 fp=8025c4b4 sp=ffffffff pc=800f104c
> panic: SEGV in kernel mode: pc 0x800f104c addr 0
> ý
>
> ..which is in my cloned rtvbus.c file, in rtvbus_dma_start():
>
> void
> rtvbus_dma_start(struct rtvbus_dma *vd)
> {
>
> SIMPLEQ_INSERT_TAIL(&rtvbus_dma, vd, vd_q);
>
> if (rtvbus_active == 0)
> rtvbus_dma_intr();
> }
>
> Don't know what this stuff is doing at all..
>
> I'm going into the kitchen now, helping my wife a little..
> I'm back in about a hour I think.
>
> Regards,
>
> Holm
> --
Ok, I'm back.
Fixed that VAXstation Thing in locore.c:
Is it ok this way?
NetBSD 6.0 (RTVAX300-test) #171: Sun Jan 13 14:07:20 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 = 13064 KB
Now about the memory, that is from machdep.c:
/*
* Good {morning,afternoon,evening,night}.
* Also call CPU init on systems that need that.
*/
printf("%s%s", copyright, version);
printf("%s\n", cpu_model);
if (dep_call->cpu_conf)
(*dep_call->cpu_conf)();
format_bytes(pbuf, sizeof(pbuf), avail_end);
printf("total memory = %s\n", pbuf);
panicstr = NULL;
mtpr(AST_NO, PR_ASTLVL);
and since I have
#if RTVAX300 || VAXANY
case VAX_BTYP_RT300:
dep_call = &ka650_calls;
strcat(cpu_model, "rtVAX 300");
/* Diplay '1' on TIL311 */
*(int *)(0x201ffffc)=(0xf-1)<<16;
break;
#endif
in locore.c, this should come from the ka650_conf()
where we have some ugly memory mapped "misc cpu registers" again:
void
ka650_conf(void)
{
/*
* MicroVAX III: We map in memory error registers,
* cache control registers, SSC registers,
* interprocessor registers and cache diag space.
*/
ka650merr_ptr = (void *)vax_map_physmem(KA650_MERR, 1);
ka650cbd_ptr = (void *)vax_map_physmem(KA650_CBD, 1);
ka650ssc_ptr = (void *)vax_map_physmem(KA650_SSC, 3);
ka650ipcr_ptr = (void *)vax_map_physmem(KA650_IPCR, 1);
KA650_CACHE_ptr = (void *)vax_map_physmem(KA650_CACHE,
(KA650_CACHESIZE/VAX_NBPG));
ka650setcache(CACHEON);
if (ctob(physmem) > ka650merr_ptr->merr_qbmbr) {
printf("physmem(0x%x) > qbmbr(0x%x)\n",
ctob(physmem), (int)ka650merr_ptr->merr_qbmbr);
panic("qbus map unprotected");
}
if (mfpr(PR_TODR) == 0)
mtpr(1, PR_TODR);
}
Some memory error and cache control hardware exists on the rtVAX too,
but does anyone know how exactly here gets a memory wsize calculated?
I think as long as is detects 4 * the amount of installed memory, I don't
have to wonder about panics with SIGSEGVs..
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