From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Fix eisa_mmap evaluation, add memory existence check
Date: Tue, 1 Jan 2008 18:44:34 +0100 [thread overview]
Message-ID: <20080101174434.GB3440@thorin> (raw)
In-Reply-To: <477A77D9.9020607@t-online.de>
On Tue, Jan 01, 2008 at 06:26:49PM +0100, Christian Franke wrote:
> >>--- grub2.orig/kern/i386/pc/init.c 2007-10-22 22:22:51.359375000 +0200
> >>+++ grub2/kern/i386/pc/init.c 2007-12-31 16:05:59.953125000 +0100
> >>@@ -199,13 +199,8 @@ grub_machine_init (void)
> >>
> >> if (eisa_mmap)
> >> {
> >>- if ((eisa_mmap & 0xFFFF) == 0x3C00)
> >>- add_mem_region (0x100000, (eisa_mmap << 16) + 0x100000 * 15);
> >>- else
> >>- {
> >>- add_mem_region (0x100000, (eisa_mmap & 0xFFFF) << 10);
> >>- add_mem_region (0x1000000, eisa_mmap << 16);
> >>- }
> >>+ add_mem_region (0x100000, (eisa_mmap & 0xFFFF) << 10);
> >>+ add_mem_region (0x1000000, eisa_mmap & ~0xFFFF);
> >> }
> >> else
> >> add_mem_region (0x100000, grub_get_memsize (1) << 10);
> >>
> >
> >Ok, as it seems, this comes from:
> >
> > * grub_get_eisa_mmap() : return packed EISA memory map, lower 16 bits is
> > * memory between 1M and 16M in 1K parts, upper 16 bits is
> > * memory above 16M in 64K parts. If error, return zero.
> >
> >So the replacement of "eisa_mmap << 16" seems obviously correct, but the
> >"0x3C00" part you removed is completely misterious to me. Can you explain
> >what was it supposed to be doing or why you removed it?
> >
> >
>
> This part is intended to handle the (normal) case of one continuous
> region with not gap between 1M and 16M:
> (0x3C00 << 10) = 0x100000 * 15 = 15M
> But this part does not work due to the same bug.
>
> It is IMO not necessary to make this distinction. The function
> compact_mem_regions() called a few lines later joins the two regions anyway.
Ah, ok. Have you verified that this is so? (setting debug=mem variable
during init might help on that).
Sorry for being so inquisitive, but I need to understand things well before
touching this part of GRUB, which as I said I'm not very familiar with.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
next prev parent reply other threads:[~2008-01-01 17:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 19:06 [PATCH] Fix eisa_mmap evaluation, add memory existence check Christian Franke
2007-10-23 20:18 ` Robert Millan
2007-10-23 20:36 ` Christian Franke
2007-11-09 14:17 ` Marco Gerards
2007-11-09 23:12 ` Christian Franke
2007-11-10 15:59 ` Marco Gerards
2007-11-10 19:53 ` Christian Franke
2007-11-09 20:51 ` Robert Millan
2007-11-09 21:53 ` Christian Franke
2007-11-09 22:51 ` Robert Millan
2007-11-18 11:09 ` Marco Gerards
2007-11-18 11:21 ` Robert Millan
2007-11-18 11:27 ` Robert Millan
2007-11-18 12:26 ` Robert Millan
2007-11-19 21:40 ` Christian Franke
2007-12-31 15:40 ` Christian Franke
2008-01-01 11:16 ` Robert Millan
2008-01-01 17:26 ` Christian Franke
2008-01-01 17:44 ` Robert Millan [this message]
2008-01-01 18:03 ` Christian Franke
2008-01-01 18:33 ` Robert Millan
2008-01-04 11:49 ` Robert Millan
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=20080101174434.GB3440@thorin \
--to=rmh@aybabtu.com \
--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.