lkml.org 
[lkml]   [2007]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] trim memory not covered by WB MTRRs
Date
On Wednesday, June 27, 2007 10:02:35 Pim Zandbergen wrote:
> Jesse Barnes wrote:
> > It looks like end_pfn might be ~0UL now... can you print that out
> > in your configuration?
>
> Er, do you need the value of end_pfn ?
> Here's what I changed:
>
> if ((highest_addr >> PAGE_SHIFT) != end_pfn) {
> printk(KERN_WARNING "***************\n");
> printk(KERN_WARNING "**** WARNING: likely BIOS bug\n");
> printk(KERN_WARNING "**** MTRRs don't cover all of "
> "memory, trimmed %lu pages\n", end_pfn -
> (highest_addr >> PAGE_SHIFT));
> printk(KERN_WARNING "**** end_pfn before = %lu\n", end_pfn);
> end_pfn = highest_addr >> PAGE_SHIFT;
> printk(KERN_WARNING "**** end_pfn after = %lu\n", end_pfn);
> printk(KERN_WARNING "***************\n");
> }
>
> Here's the result:
> ***************
> **** WARNING: likely BIOS bug
> **** MTRRs don't cover all of memory, trimmed 18446744073709486080
> pages **** end_pfn before = 2293760
> **** end_pfn after = 2359296
> ***************
>
> Hope that's what you needed.

Yeah, that's what I needed. end_pfn looks ok, but I guess my test is a
little too precise. It should be if ((highest_addr >> PAGE_SHIFT) <
end_pfn) rather than !=. That should keep it from trying to extend
your memory with bogus math. I thought that the two values should
always match, but I guess slightly different memory configurations
might break that assumption.

Thanks,
Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-27 19:09    [W:0.046 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site