From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: embedding filesystems in core image (Re: moving ata initialisation to a command)
Date: Mon, 24 Dec 2007 17:24:54 +0100 [thread overview]
Message-ID: <20071224162453.GA28603@thorin> (raw)
In-Reply-To: <ca0f59980712240527q43edeeb8k90d1195e9844950d@mail.gmail.com>
On Mon, Dec 24, 2007 at 09:27:05PM +0800, Bean wrote:
> On Dec 24, 2007 9:09 PM, Robert Millan <rmh@aybabtu.com> wrote:
> > I was thinking in moving it to malloc'ed memory, which has the advantage that
> > you no longer need to remember a particular region is hardcoded for memdisk
> > (also, it hinders portability on platforms where top of memory is reserved).
> >
> > but this doesn't solve the problem about its original region being corrupted
> > (by payload loaders) before we have a chance to copy it.
>
> In that case, you can copy the memdisk back to conventional memory,
> alongside with modules.
> In startup.S:
>
> codestart:
> ...
> /* copy modules before cleaning out the bss */
> movl EXT_C(grub_total_module_size), %ecx
> movl EXT_C(grub_kernel_image_size), %esi
> addl %ecx, %esi
>
> ->
> movl EXT_C(grub_total_module_size), %ecx
> + addl EXT_C(grub_memdisk_image_size), %ecx
> movl EXT_C(grub_kernel_image_size), %esi
> addl %ecx, %esi
Doesn't this add a restriction on the maximum usable size, when it collides
with the assorted amenities in the 640 kiB / 1024 kiB area ?
> > > I also recommend to add a variable grub_memdisk_image_base in
> > > startup.S, normally, this value will be zero,
> >
> > That's in my patch already. Or did you mean something else?
>
> But i only see the grub_memdisk_image_size, not the base address.
Ah right; well it's still there, just not directly:
+ return 0x100000 + (grub_kernel_image_size - GRUB_KERNEL_MACHINE_RAW_SIZE) + grub_total_module_size;
those two variables are from startup.S as well, IIRC. Although it might make
sense to move them as a precalculated address. The code to compute it probably
takes more kernel space than the address itself..
--
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:[~2007-12-24 16:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-16 15:30 moving ata initialisation to a command Robert Millan
2007-12-16 15:58 ` Christian Franke
2007-12-16 16:06 ` Vesa Jääskeläinen
2007-12-16 16:19 ` Robert Millan
2007-12-17 15:52 ` Marco Gerards
2007-12-17 16:01 ` Marco Gerards
2007-12-17 18:26 ` Pavel Roskin
2007-12-17 19:01 ` Marco Gerards
2007-12-20 17:38 ` Robert Millan
2007-12-20 17:36 ` Robert Millan
2007-12-21 16:47 ` Marco Gerards
2007-12-21 18:04 ` Robert Millan
2007-12-21 20:54 ` embedding filesystems in core image (Re: moving ata initialisation to a command) Robert Millan
2007-12-22 4:28 ` Bean
2007-12-22 11:24 ` Robert Millan
2007-12-22 12:27 ` Yoshinori K. Okuji
2007-12-22 12:18 ` Robert Millan
2007-12-22 12:24 ` Yoshinori K. Okuji
2007-12-23 18:44 ` Robert Millan
2008-01-16 20:10 ` Marco Gerards
2008-01-20 23:21 ` Robert Millan
2007-12-24 8:29 ` Bean
2007-12-24 13:09 ` Robert Millan
2007-12-24 13:27 ` Bean
2007-12-24 16:24 ` Robert Millan [this message]
2007-12-24 16:44 ` Bean
2008-01-02 19:56 ` Robert Millan
2007-12-26 8:00 ` embedding data in ELF " Robert Millan
2008-01-02 18:21 ` Pavel Roskin
2007-12-26 7:57 ` avoid firmware in grub-mkrescue " 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=20071224162453.GA28603@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox