Thread View: comp.bugs.2bsd
1 messages
1 total messages
Started by Steven M. Schultz
Sat, 18 May 1991 06:18
/boot,/mdec,[T]MSCP (Part 5 of 22)
Author: Steven M. Schultz
Date: Sat, 18 May 1991 06:18
Date: Sat, 18 May 1991 06:18
160 lines
4094 bytes
4094 bytes
Subject: Part 5 of 22 /boot,/mdec,[T]MSCP updates
Index: /sys/<many>, /usr/src/etc/<several> 2.11BSD
Description:
Repeat-By:
Fix:
See part 0 (the README) for the Description, the Reason and
the instructions on how update your system.
This is part 5 of 22
The external packet area for the [T]MSCP drivers is allocated here.
Enough room is allocated to handle 2 TMSCP plus 2 MSCP controllers.
The reference to 'ubmap' was removed, it's defined in uba.h.
*** /usr/src/sys/pdp/machdep2.c.old Thu May 31 14:00:35 1990
--- /usr/src/sys/pdp/machdep2.c Sat Apr 20 23:32:44 1991
***************
*** 3,9 ****
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
! * @(#)machdep.c 1.2 (2.10BSD Berkeley) 1/26/90
*/
#include "param.h"
--- 3,9 ----
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
! * @(#)machdep.c 2.0 (2.11BSD) 4/20/91
*/
#include "param.h"
***************
*** 27,32 ****
--- 27,34 ----
#include "ram.h"
#include "msgbuf.h"
#include "namei.h"
+ #include "ra.h"
+ #include "tms.h"
#ifdef QUOTA
#include "quota.h"
***************
*** 33,38 ****
--- 35,45 ----
#endif
size_t physmem; /* total amount of physical memory (for savecore) */
+ #if NRAC > 0 || NTMSCP > 0
+ memaddr _iostart, _iobase;
+ ubadr_t _ioumr;
+ u_short _iosize = 2 * (1928 + 1096 + 128); /* enough for 2 TMSCP and 2 MSCP */
+ #endif
#ifndef NOKA5
segm seg5; /* filled in by initialization */
***************
*** 172,177 ****
--- 179,216 ----
maxmem -= B;
}
+ #if NRAC > 0 || NTMSCP > 0
+ {
+ register int s, first;
+ register struct ubmap *ubp;
+ long paddr;
+
+ if ((_iobase = malloc(coremap, btoc(_iosize))) == 0)
+ panic("_iobase");
+ maxmem -= btoc(_iosize);
+ #ifdef UNIBUS_MAP
+ if (ubmap) {
+ _iostart = _iobase;
+ s = (int)btoub(_iosize);
+ /*
+ * this early in the system's life there had better be a UMR or two
+ * available!!
+ */
+ first = malloc(ub_map, s);
+ _ioumr = (ubadr_t)first << 13;
+ ubp = &UBMAP[first];
+ paddr = ctob((ubadr_t)_iostart);
+ while (s--) {
+ ubp->ub_lo = loint(paddr);
+ ubp->ub_hi = hiint(paddr);
+ ubp++;
+ paddr += (ubadr_t)UBPAGE;
+ }
+ }
+ #endif UNIBUS_MAP
+ }
+ #endif NRAC
+
#define B (size_t)(((long)nbuf * (MAXBSIZE)) / ctob(1))
if ((bpaddr = malloc(coremap, B)) == 0)
panic("buffers");
***************
*** 282,288 ****
#endif
#ifdef UNIBUS_MAP
- extern bool_t ubmap;
/*
* Re-initialize the Unibus map registers to statically map
--- 321,326 ----
***************
*** 363,369 ****
if (nbusy == 0)
break;
printf("%d ", nbusy);
! DELAY(40000L * iter);
}
}
printf("done\n");
--- 401,407 ----
if (nbusy == 0)
break;
printf("%d ", nbusy);
! delay(40000L * iter);
}
}
printf("done\n");
***************
*** 420,422 ****
--- 458,486 ----
}
}
}
+
+ #if NRAC > 0 || NTMSCP > 0
+ memaddr
+ _ioget(size)
+ u_int size;
+ {
+ register memaddr base;
+ register u_int csize;
+
+ csize = btoc(size);
+ size = ctob(csize);
+ if (size > _iosize)
+ return(0);
+ _iosize -= size;
+ base = _iobase;
+ _iobase += csize;
+ return(base);
+ }
+
+ ubadr_t
+ _iomap(addr)
+ register memaddr addr;
+ {
+ return(((ubadr_t)(addr - _iostart) << 6) + _ioumr);
+ }
+ #endif NRAC
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads