On Wednesday 30 November 2005 04:12 am, Nate Lawson wrote:
> John Baldwin wrote:
> > On Nov 29, 2005, at 10:50 PM, David Kelly wrote:
> >> On Nov 29, 2005, at 5:10 PM, Alex Zbyslaw wrote:
> >>> David Kelly wrote:
> >>>> Could I
> >>>> boot a 5.4 CDROM to test ACPI?
> >>> Yes you could. I did this the other day on a machine that doesn't
> >>> even have a disk yet ;-) acpidump is there. Select fixit then live
> >>> file system (if memory serves) but you probably knew that !
> >> Problem solved, but I've been working on it too hard not to share the
> >> story which might be useful:
> >> Without hw.physmem="2G" its now finding the full memory load so I
> >> don't know what was happening previously.
> > Actually, this is the second report I've had that setting hw.physmem
> > interacts badly with ACPI. The other report I had resulted in a kernel
> > panic if it was set to 3G.
> I suspect mapping the memory to read the FACS is failing for the
> hw.physmem case. His machine probably has tables at 2G (highmem). A
> common location (other than < 1MB) is top of memory minus 16 MB. I
> don't know what setting hw.physmem actually does -- does it change how
> we can map high memory?
Well, it can override what the SMAP tells us such that we can extend the last
* Maxmem isn't the "maximum memory", it's one larger than the
* highest page of the physical address space. It should be
* called something like "Maxphyspage". We may adjust this
* based on ``hw.physmem'' and the results of the memory test.
Maxmem = atop(physmap[physmap_idx + 1]);
Maxmem = MAXMEM / 4;
if (TUNABLE_ULONG_FETCH("hw.physmem", &physmem_tunable))
Maxmem = atop(physmem_tunable);
if (atop(physmap[physmap_idx + 1]) != Maxmem &&
(boothowto & RB_VERBOSE))
printf("Physical memory use set to %ldK\n", Maxmem * 4);
* If Maxmem has been increased beyond what the system has detected,
* extend the last memory segment to the new limit.
if (atop(physmap[physmap_idx + 1]) < Maxmem)
physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem);
This would force the memory up to 2g to be included as pages and I think we
zero out pages to test them before adding them to the VM. Extending Maxmem
might have forced the pages holding his ACPI tables to be added to the valid
pages resulting in those pages being overwritten. David, can you use a
serial console to grab a boot -v output that includes the SMAP output? Also,
the boot -v output might also provide the PA of FACS (or maybe acpidump -t
would have that?) which would also be useful.
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org