Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K8bDK-0006Va-JQ for mharc-grub-devel@gnu.org; Tue, 17 Jun 2008 09:27:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8bDI-0006UM-Jd for grub-devel@gnu.org; Tue, 17 Jun 2008 09:27:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8bDH-0006Tj-AW for grub-devel@gnu.org; Tue, 17 Jun 2008 09:27:07 -0400 Received: from [199.232.76.173] (port=38338 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8bDG-0006TK-S7 for grub-devel@gnu.org; Tue, 17 Jun 2008 09:27:06 -0400 Received: from yx-out-1718.google.com ([74.125.44.156]:57863) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K8bDF-0008Qe-MS for grub-devel@gnu.org; Tue, 17 Jun 2008 09:27:06 -0400 Received: by yx-out-1718.google.com with SMTP id 34so584110yxf.66 for ; Tue, 17 Jun 2008 06:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:mime-version:subject:date:references :x-mailer; bh=vSeRXHAA14wSEglkMx8JJQF+R8pn1t68k0PlissbwVg=; b=YnHvam2rpJbCVz5GUNYhctabwWWzn5jmQUG8BDyNsKensHKEWiV91DuDQUvNWnMBdH l8xp3tB2CWepL+9lxUroztoWdywVrLF1Q4gJH7RaKilHL7QAqsjOVTPlhfp2igFJ70/B AswG+c80Op7H0ePHlSR1NMam7SqgnM9hEoUxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=i+62IDZc875A3qWMkHN+gZ4nkqBbqPm7y2qDjduxQWpdJ5cqnrQYX5YAULwRJE3o7J VZd7L+TBGx3dDtdqAPd1jrgrP991NVS4UqHUdC00Bm3U1RI5F3DFRY/i/zvyJTGTUgsm 7JimcHvYciUbkA+QoChbWXgyBszEfNj/ns7lY= Received: by 10.151.12.4 with SMTP id p4mr12799319ybi.235.1213709222837; Tue, 17 Jun 2008 06:27:02 -0700 (PDT) Received: from ?10.0.1.200? ( [71.201.164.136]) by mx.google.com with ESMTPS id f78sm4010854pyh.34.2008.06.17.06.27.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Jun 2008 06:27:01 -0700 (PDT) Message-Id: <5919F2D2-3D60-4BB7-882D-C73D52078334@gmail.com> From: "Andrei E. Warkentin" To: The development of GRUB 2 In-Reply-To: <48577CA8.5000604@dholloway.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1--821184208 Mime-Version: 1.0 (Apple Message framework v919.2) Date: Tue, 17 Jun 2008 08:26:56 -0500 References: <200806170307.m5H37DjU073382@shoebox.dholloway.com> <48576165.1000002@dholloway.com> <48577CA8.5000604@dholloway.com> X-Mailer: Apple Mail (2.919.2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: grub EFI "too little memory" X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 13:27:08 -0000 --Apple-Mail-1--821184208 Content-Type: text/plain; charset=KOI8-R; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Straight from the public UEFI docs: If the MemoryMap buffer is too small, the EFI_BUFFER_TOO_SMALL error =20 code is returned and the MemoryMapSize value contains the size of the buffer needed to =20 contain the current memory map. The actual size of the buffer allocated for the consequent =20= call to GetMemoryMap() should be bigger then the value returned in MemoryMapSize, since =20 allocation of the new buffer may potentially increase memory map size. ...and of course you can use BootServices->AllocatePool to grab the =20 desired amount... 17.06.2008, =D7 3:58, David Holloway =CE=C1=D0=C9=D3=C1=CC(=C1): > David Holloway wrote: >> Intended for Robert Millan, et. al. >> >> I have an Intel 1U server board that fails with the current version =20= >> of grub with the message "too little memory", as in line 312 of CVS =20= >> version 1.4 of grub2/kern/efi/mm.c >> The board is described here: >> = http://www.intel.com/design/telecom/products/cbp/ipserver/9979/overview.ht= m >> >> I added some debug and I think "required_pages" at line 312 has a =20 >> value of 1MB (256 pages), consistent with MIN_HEAP. >> mmap from the EFI shell reports just 38 pages of LoaderData and =20 >> just 196 pages of LoaderCode. >> >> It's my intention to bone up on EFI, but I'm not there yet. >> >> The question: does just 38 pages of LoaderData make sense in this =20 >> implemetation? is MIN_HEAP too large or does this EFI =20 >> implementation provide too little memory to be practical? > > I diagnosed the root problem. > The NSW1U board requires 7872 bytes for its memory map during the =20 > EFI GetMemoryMap call, but only 4096 are supplied. > > Obviously my short term solution is to increase MEMORY_MAP_SIZE from =20= > 0x1000 to 0x2000, but one wonders what the robust solution should be =20= > instead. In fact, I now have the NSW1U server board working after =20 > this change. > > I'm now filing a bug report on the matter. > > https://savannah.gnu.org/bugs/index.php?23615 > > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --Apple-Mail-1--821184208 Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable
Straight from the public UEFI =  docs:

If the MemoryMap buffer is too small, the = EFI_BUFFER_TOO_SMALL error code is returned = and 
the MemoryMapSize value contains the size of the buffer = needed to contain the current 
memory map. The actual = size of the buffer allocated for the consequent call to GetMemoryMap() 
should be bigger = then the value returned in MemoryMapSize, since allocation of the new = buffer 
may potentially increase memory map = size. 

...and of course you = can use BootServices->AllocatePool to grab the desired = amount...

17.06.2008, =D7 3:58, = David Holloway =CE=C1=D0=C9=D3=C1=CC(=C1):

David = Holloway wrote:
Intended for Robert Millan, = et. al.

I have an Intel = 1U server board that fails with the current version of grub with the = message "too little memory", as in line 312 of CVS version 1.4 of = grub2/kern/efi/mm.c
The board = is described here:
http://www.intel.com/design/telecom/products/cbp/ipserver/9979/= overview.htm

I added some = debug and I think "required_pages" at line 312 has a value of 1MB (256 = pages), consistent with MIN_HEAP.
mmap from the EFI shell reports just 38 pages of = LoaderData and just 196 pages of LoaderCode.

It's my = intention to bone up on EFI, but I'm not there = yet.

The question: = does just 38 pages of LoaderData make sense in this implemetation? is = MIN_HEAP too large or does this EFI implementation provide too little = memory to be practical?

I diagnosed the root = problem.
The NSW1U board requires 7872 bytes for its memory map = during the EFI GetMemoryMap call, but only 4096 are = supplied.

Obviously my short term solution is to increase = MEMORY_MAP_SIZE from 0x1000 to 0x2000, but one wonders what the robust = solution should be instead.  In fact, I now have the NSW1U server = board working after this change.

I'm now filing a bug report on = the matter.

https://savannah.gn= u.org/bugs/index.php?23615




________________________= _______________________
Grub-devel mailing = list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-d= evel

= --Apple-Mail-1--821184208--