Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JIuRh-0007Tx-M8 for mharc-grub-devel@gnu.org; Sat, 26 Jan 2008 18:28:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIuRg-0007TU-O0 for grub-devel@gnu.org; Sat, 26 Jan 2008 18:28:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIuRf-0007Sj-3i for grub-devel@gnu.org; Sat, 26 Jan 2008 18:28:20 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIuRe-0007Sb-Oi for grub-devel@gnu.org; Sat, 26 Jan 2008 18:28:18 -0500 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JIuRe-0006u6-IZ for grub-devel@gnu.org; Sat, 26 Jan 2008 18:28:18 -0500 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 26 Jan 2008 18:28:18 -0500 Received: from dv.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 3C40C618FE1 for ; Sat, 26 Jan 2008 18:28:18 -0500 (EST) From: Pavel Roskin To: grub-devel@gnu.org Date: Sat, 26 Jan 2008 18:28:17 -0500 Message-ID: <20080126232817.19279.56041.stgit@dv.roinet.com> In-Reply-To: <20080126232811.19279.49191.stgit@dv.roinet.com> References: <20080126232811.19279.49191.stgit@dv.roinet.com> User-Agent: StGIT/0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH 2/3] Provide fallback if /memory/available is missing 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: Sat, 26 Jan 2008 23:28:21 -0000 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Provide fallback if /memory/available is missing - try claiming memory between 3Mb and 4Mb. That's what yaboot does. --- kern/powerpc/ieee1275/openfw.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kern/powerpc/ieee1275/openfw.c b/kern/powerpc/ieee1275/openfw.c index 26ff3d5..c8b30e5 100644 --- a/kern/powerpc/ieee1275/openfw.c +++ b/kern/powerpc/ieee1275/openfw.c @@ -170,8 +170,13 @@ grub_err_t grub_available_iterate (int (*hook) (grub_uint64_t, grub_uint64_t)) "Couldn't find /memory node"); if (grub_ieee1275_get_integer_property (memory, "available", available, sizeof available, &available_size)) - return grub_error (GRUB_ERR_UNKNOWN_DEVICE, - "Couldn't examine /memory/available property"); + { + /* Fallback for Open Hack'Ware - try claiming memory between 3Mb + and 4Mb, just like yaboot would do. */ + hook (0x300000, 0x100000); + return grub_error (GRUB_ERR_UNKNOWN_DEVICE, + "Couldn't examine /memory/available property"); + } /* Decode each entry and call `hook'. */ i = 0;