PERFORCE change 89494 for review
Kip Macy
kmacy at FreeBSD.org
Tue Jan 10 23:12:55 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=89494
Change 89494 by kmacy at kmacy:freebsd7_xen3 on 2006/01/11 07:12:28
re-enable i686_mem.c
initialize phys_avail from xen maps in machdep.c
Affected files ...
.. //depot/projects/xen3/src/sys/i386-xen/i386-xen/machdep.c#6 edit
.. //depot/projects/xen3/src/sys/i386/i386/i686_mem.c#3 edit
Differences ...
==== //depot/projects/xen3/src/sys/i386-xen/i386-xen/machdep.c#6 (text+ko) ====
@@ -1718,12 +1718,19 @@
if (map[i].end > 0x100000000ULL)
continue;
+ /* XXXEN need to handle reserved */
+ phys_avail[2*i] = map[i].start;
+ phys_avail[2*i + 1] = map[i].end;
+ PANIC_IF(i*2 >= PHYSMAP_SIZE);
+
+#if 0
res = bootmem_alloc(sizeof(struct resource));
res->name = map[i].is_ram ? "System RAM" : "reserved";
res->start = map[i].start;
res->end = map[i].end - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
request_resource(&iomem_resource, res);
+#endif
}
bootmem_free(map, PAGE_SIZE);
@@ -1736,12 +1743,13 @@
* like " + (gapsize >> 3)" in there too?). We now have the
* technology.
*/
+#ifdef notyet
pci_mem_start = (gapstart + 0xfffff) & ~0xfffff;
printk("Allocating PCI resources starting at %08lx (gap: %08lx:%08lx)\n",
pci_mem_start, gapstart, gapsize);
+#endif
-
#elif defined(XEN)
Maxmem = xen_start_info->nr_pages - init_first;
pmap_bootstrap((init_first << PAGE_SHIFT), 0);
@@ -1749,6 +1757,7 @@
phys_avail[i] = 0;
physmem = Maxmem;
avail_end = ptoa(Maxmem) - round_page(MSGBUF_SIZE);
+ basemem = 0;
phys_avail[0] = init_first << PAGE_SHIFT;
phys_avail[1] = avail_end;
return;
==== //depot/projects/xen3/src/sys/i386/i386/i686_mem.c#3 (text+ko) ====
@@ -609,16 +609,12 @@
i686_mem_drvinit(void *unused)
{
/* Try for i686 MTRRs */
-#ifndef XEN
if (!mtrrs_disabled && (cpu_feature & CPUID_MTRR) &&
((cpu_id & 0xf00) == 0x600 || (cpu_id & 0xf00) == 0xf00) &&
((strcmp(cpu_vendor, "GenuineIntel") == 0) ||
(strcmp(cpu_vendor, "AuthenticAMD") == 0))) {
mem_range_softc.mr_op = &i686_mrops;
}
-#else
- i686_mrops.init = NULL; /* XXX make "defined but not used" warning go away */
-#endif
}
SYSINIT(i686memdev,SI_SUB_DRIVERS,SI_ORDER_FIRST,i686_mem_drvinit,NULL)
More information about the p4-projects
mailing list