lkml.org 
[lkml]   [2011]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.39.1 immediately reboots/resets on EFI system
On Wed, Jun 08, 2011 at 02:06:21PM -0700, Linus Torvalds wrote:
> On Wed, Jun 8, 2011 at 1:42 PM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > On Wed, Jun 08, 2011 at 01:36:57PM -0700, Yinghai Lu wrote:
> >
> >> or just let bootloader to mark those boot services just like run-time services in e820 table or setupdata?
> >
> > That was my original approach, but if there's boot services code at the
> > top of RAM it means that max_pfn is wrong and it's difficult to recover
> > the memory.
>
> WHO CARES if the memory is difficult to recover? Just let it be. EFI
> is an abomination in the eyes of God, and we sure as hell shouldn't
> bend over backwards over the stupidities in it. If it means that you
> lose a meg of RAM when you use EFI, that's the least of our problems.

Boot services data includes everything that was allocated by the EFI
memory allocator. Depending on what the system decided to do before
deigning to run our code, that might be a meg - or it might be several
hundred. And in the process it's probably fragmented RAM into god knows
how many small chunks.

E820 limits us to 128 ranges, and systems I'm looking at right now are
already using over 140 boot services regions. Some of them are
contiguous and we could just merge them for e820, but that leaves us at
the whim of whoever wrote the allocator for the firmware. And do you
want to bet on them having done this sanely?

--
Matthew Garrett | mjg59@srcf.ucam.org

\
 
 \ /
  Last update: 2011-06-08 23:31    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean