Annotation of 3BSD/sys/stand/uba.c, revision 1.1.1.1

1.1       root        1: #include "../h/param.h"
                      2: #include "../h/inode.h"
                      3: #include "../h/pte.h"
                      4: #include "../h/uba.h"
                      5: #include "../h/vm.h"
                      6: #include "saio.h"
                      7: 
                      8: ubasetup(io, bdp)
                      9: register struct iob *io;
                     10: {
                     11:        register int i;
                     12:        int npf;
                     13:        unsigned v;
                     14:        register struct pte *pte;
                     15:        int o, vaddr, temp;
                     16: 
                     17:        v = btop(io->i_ma);
                     18:        o = (int)io->i_ma & PGOFSET;
                     19:        npf = btoc(io->i_cc + o) +1;
                     20:        pte = &(((struct uba_regs *)PHYSUBA0)->uba_map[0]);
                     21:        temp = (bdp << 21) | MRV;
                     22:        if (bdp && (o & 01))
                     23:                temp |= BO;
                     24:        v &= 0x1fffff;                  /* drop to physical addr */
                     25:        while (--npf != 0)
                     26:                *(int *)pte++ = v++ | temp;
                     27:        *(int *)pte++ = 0;
                     28:        return ((bdp << 28) | o);
                     29: }
                     30: 
                     31: ubafree(mr)
                     32:        int mr;
                     33: {
                     34:        register int bdp, reg, npf, a;
                     35:  
                     36:        bdp = (mr >> 28) & 0x0f;
                     37:        if (bdp)
                     38:                ((struct uba_regs *)PHYSUBA0)->uba_dpr[bdp] |= BNE;
                     39: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.