Browse Source

Plan 9 from Bell Labs 2006-07-18

David du Colombier 15 years ago
parent
commit
cdbeefe2e3
6 changed files with 63 additions and 15 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 8 1
      sys/man/8/plan9.ini
  5. 35 1
      sys/src/9/pc/memory.c
  6. 14 9
      sys/src/9/pc/mp.h

+ 2 - 2
dist/replica/_plan9.db

@@ -7730,7 +7730,7 @@ sys/man/8/nfsserver - 664 sys sys 1142693998 3585
 sys/man/8/pcmcia - 664 sys sys 944959679 408
 sys/man/8/pem - 664 sys sys 1060263669 1189
 sys/man/8/ping - 664 sys sys 1139667147 3489
-sys/man/8/plan9.ini - 664 sys sys 1131294569 22077
+sys/man/8/plan9.ini - 664 sys sys 1153172733 22284
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
 sys/man/8/ppp - 664 sys sys 1125530075 4414
 sys/man/8/prep - 664 sys sys 1152729153 14013
@@ -7996,7 +7996,7 @@ sys/src/9/pc/kbd.c - 664 sys sys 1132574883 12365
 sys/src/9/pc/l.s - 664 sys sys 1143129925 28552
 sys/src/9/pc/main.c - 664 sys sys 1142958321 15304
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
-sys/src/9/pc/memory.c - 664 sys sys 1131573303 18191
+sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
 sys/src/9/pc/mkfile - 664 sys sys 1142960857 3804
 sys/src/9/pc/mmu.c - 664 sys sys 1147098958 24086
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057

+ 2 - 2
dist/replica/plan9.db

@@ -7730,7 +7730,7 @@ sys/man/8/nfsserver - 664 sys sys 1142693998 3585
 sys/man/8/pcmcia - 664 sys sys 944959679 408
 sys/man/8/pem - 664 sys sys 1060263669 1189
 sys/man/8/ping - 664 sys sys 1139667147 3489
-sys/man/8/plan9.ini - 664 sys sys 1131294569 22077
+sys/man/8/plan9.ini - 664 sys sys 1153172733 22284
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
 sys/man/8/ppp - 664 sys sys 1125530075 4414
 sys/man/8/prep - 664 sys sys 1152729153 14013
@@ -7996,7 +7996,7 @@ sys/src/9/pc/kbd.c - 664 sys sys 1132574883 12365
 sys/src/9/pc/l.s - 664 sys sys 1143129925 28552
 sys/src/9/pc/main.c - 664 sys sys 1142958321 15304
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
-sys/src/9/pc/memory.c - 664 sys sys 1131573303 18191
+sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
 sys/src/9/pc/mkfile - 664 sys sys 1142960857 3804
 sys/src/9/pc/mmu.c - 664 sys sys 1147098958 24086
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057

+ 2 - 0
dist/replica/plan9.log

@@ -30205,3 +30205,5 @@
 1153083605 1 c sys/src/9/pc/ether82557.c - 664 sys sys 1153082663 30197
 1153083605 2 c sys/src/9/pc/fns.h - 664 sys sys 1153082883 4564
 1153083605 3 c sys/src/9/pc/pci.c - 664 sys sys 1153082883 26859
+1153173604 0 c sys/man/8/plan9.ini - 664 sys sys 1153172733 22284
+1153173604 1 c sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773

+ 8 - 1
sys/man/8/plan9.ini

@@ -631,12 +631,19 @@ otherwise the textual information about the panic may scroll off.
 .\" .SS \fL*nobios=\fP
 .\" what does this do?  something with pci
 .SS \fLioexclude=value\fP
-Specifies a list of ranges I/O ports to exclude from use by drivers.
+Specifies a list of ranges of I/O ports to exclude from use by drivers.
 Ranges are inclusive on both ends and separated by commas.
 For example:
 .EX
     ioexclude=0x330-0x337,0x430-0x43F
 .EE
+.SS \fLumbexclude=value\fP
+Specifies a list of ranges of UMB to exclude from use by drivers.
+Ranges are inclusive on both ends and separated by commas.
+For example:
+.EX
+    umbexclude=0xD1800-0xD3FFF
+.EE
 .SS \fLapm0=\fP
 This enables the ``advanced power management'' interface
 as described in

+ 35 - 1
sys/src/9/pc/memory.c

@@ -22,7 +22,7 @@ enum {
 	KB		= 1024,
 
 	MemMinMB	= 4,		/* minimum physical memory (<=4MB) */
-	MemMaxMB	= 3*1024+768,		/* maximum physical memory to check */
+	MemMaxMB	= 3*1024+768,	/* maximum physical memory to check */
 
 	NMemBase	= 10,
 };
@@ -226,6 +226,38 @@ rampage(void)
 	return KADDR(m);
 }
 
+static void
+umbexclude(void)
+{
+	int size;
+	ulong addr;
+	char *op, *p, *rptr;
+
+	if((p = getconf("umbexclude")) == nil)
+		return;
+
+	while(p && *p != '\0' && *p != '\n'){
+		op = p;
+		addr = strtoul(p, &rptr, 0);
+		if(rptr == nil || rptr == p || *rptr != '-'){
+			print("umbexclude: invalid argument <%s>\n", op);
+			break;
+		}
+		p = rptr+1;
+
+		size = strtoul(p, &rptr, 0) - addr + 1;
+		if(size <= 0){
+			print("umbexclude: bad range <%s>\n", op);
+			break;
+		}
+		if(rptr != nil && *rptr == ',')
+			*rptr++ = '\0';
+		p = rptr;
+
+		mapalloc(&rmapumb, addr, size, 0);
+	}
+}
+
 static void
 umbscan(void)
 {
@@ -283,6 +315,8 @@ umbscan(void)
 		if(p[0] != 0xCC && p[64*KB-1] != 0xCC)
 			mapfree(&rmapumb, PADDR(p), 64*KB);
 	}
+
+	umbexclude();
 }
 
 static void

+ 14 - 9
sys/src/9/pc/mp.h

@@ -207,22 +207,27 @@ enum {
 	ApicIMASK	= 0x00010000,	/* [16] Interrupt Mask */
 };
 
+extern void ioapicinit(Apic*, int);
 extern void ioapicrdtr(Apic*, int, int*, int*);
 extern void ioapicrdtw(Apic*, int, int, int);
-extern void ioapicinit(Apic*, int);
-extern void lapiconline(void);
-extern void lapicinit(Apic*);
-extern void lapicstartap(Apic*, int);
-extern void lapicerror(Ureg*, void*);
-extern void lapicspurious(Ureg*, void*);
-extern int lapicisr(int);
+
+extern void lapicclock(Ureg*, void*);
 extern int lapiceoi(int);
+extern void lapicerror(Ureg*, void*);
 extern void lapicicrw(int, int);
-extern void lapicintron(void);
+extern void lapicinit(Apic*);
 extern void lapicintroff(void);
+extern void lapicintron(void);
+extern int lapicisr(int);
+extern void lapicnmidisable(void);
+extern void lapicnmienable(void);
+extern void lapiconline(void);
+extern void lapicspurious(Ureg*, void*);
+extern void lapicstartap(Apic*, int);
+extern void lapictimerset(uvlong);
 
 extern void mpinit(void);
-extern void mpshutdown(void);
 extern int mpintrenable(Vctl*);
+extern void mpshutdown(void);
 
 extern _MP_ *_mp_;