PERFORCE change 31040 for review
Juli Mallett
jmallett at FreeBSD.org
Mon May 12 17:43:22 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31040
Change 31040 by jmallett at jmallett_dalek on 2003/05/12 17:42:23
Cheatingly do things in KSEG0. Instead of fooling with
physmem in sgimips_machdep, fool with physsz, and convert
and print it as physmem in pmap_bootstrap, as a placeholder
for using this variable. Cheat and run with what we've
got to work with from ARCS.
Affected files ...
.. //depot/projects/mips/sys/mips/include/pmap.h#8 edit
.. //depot/projects/mips/sys/mips/mips/pmap.c#12 edit
.. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#15 edit
Differences ...
==== //depot/projects/mips/sys/mips/include/pmap.h#8 (text+ko) ====
@@ -52,6 +52,7 @@
extern vm_offset_t avail_start;
extern vm_offset_t avail_end;
extern vm_offset_t phys_avail[];
+extern vm_size_t physsz;
extern vm_offset_t virtual_avail;
extern vm_offset_t virtual_end;
extern struct segtab *segbase;
==== //depot/projects/mips/sys/mips/mips/pmap.c#12 (text+ko) ====
@@ -55,6 +55,7 @@
vm_offset_t avail_start;
vm_offset_t avail_end;
vm_offset_t phys_avail[10]; /* XXX this is wrong */
+vm_size_t physsz;
vm_offset_t virtual_avail;
vm_offset_t virtual_end;
@@ -177,7 +178,7 @@
vm_offset_t
pmap_map(vm_offset_t *va, vm_offset_t start, vm_offset_t end, int prot)
{
- return (MIPS_PHYS_TO_KSEG1(start));
+ return (MIPS_PHYS_TO_KSEG0(start));
}
int
@@ -344,6 +345,9 @@
{
int i;
+ printf("Bootstrapping with %lu bytes of physical memory\n", physsz);
+ physmem = btoc(physsz);
+
kptemapsize = PAGE_SIZE; /* XXX placeholder */
kptemap = pmap_steal_memory(sizeof *kptemap * kptemapsize);
@@ -364,8 +368,9 @@
/*
* Set the start and end of kva.
*/
- virtual_avail = VM_MIN_KERNEL_ADDRESS;
- virtual_end = VM_MAX_KERNEL_ADDRESS;
+ virtual_avail = avail_start;
+ virtual_end = avail_end;
+ kernel_vm_end = virtual_end;
}
/*
==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#15 (text+ko) ====
@@ -29,18 +29,19 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <vm/vm.h>
+#include <vm/vm_page.h>
+
#include <machine/cpufunc.h>
#include <machine/cpuregs.h>
#include <machine/hwfunc.h>
#include <machine/md_var.h>
+#include <machine/pmap.h>
#include <platform/intr.h>
#include <platform/models.h>
#include <platform/sysconf.h>
-#include <vm/vm.h>
-#include <vm/vm_page.h>
-
#include <dev/arcbios/arcbios.h>
#include <dev/arcbios/arcbiosvar.h>
@@ -143,10 +144,8 @@
first, last, mem->Type);
break;
}
- physmem += btoc(size);
+ physsz += size;
}
- printf("total memory = %ld (%ld MB)\n", ctob(physmem),
- ctob(physmem) / (1024 * 1024));
printf("ARCS memory = %d (%d KB)\n", ctob(arcsmem),
ctob(arcsmem) / 1024);
printf("avail memory = %d (%d MB)\n", ctob(availmem),
More information about the p4-projects
mailing list