Port-vax archive

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

Re: About support for rtVAX300



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

or whatever syntax the UART has.

-- Ragge


Home | Main Index | Thread Index | Old Index