From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Subject: [PATCH 2/3] Provide fallback if /memory/available is missing
Date: Sat, 26 Jan 2008 18:28:17 -0500 [thread overview]
Message-ID: <20080126232817.19279.56041.stgit@dv.roinet.com> (raw)
In-Reply-To: <20080126232811.19279.49191.stgit@dv.roinet.com>
* 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;
next prev parent reply other threads:[~2008-01-26 23:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-26 23:28 [PATCH 1/3] Implement grub-mkrescue for PowerMac and CHRP Pavel Roskin
2008-01-26 23:28 ` Pavel Roskin [this message]
2008-01-26 23:28 ` [PATCH 3/3] Work around "CLAIM failed" on PowerMac Pavel Roskin
2008-01-27 9:02 ` Robert Millan
2008-01-27 9:27 ` Pavel Roskin
2008-01-27 10:13 ` Robert Millan
2008-01-27 20:36 ` Pavel Roskin
2008-01-29 8:55 ` [PATCH 1/3] Implement grub-mkrescue for PowerMac and CHRP Marco Gerards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080126232817.19279.56041.stgit@dv.roinet.com \
--to=proski@gnu.org \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.