[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: embedding filesystems in core image (Re: moving ata initialisation t
From: |
Bean |
Subject: |
Re: embedding filesystems in core image (Re: moving ata initialisation to a command) |
Date: |
Tue, 25 Dec 2007 00:44:49 +0800 |
On Dec 25, 2007 12:24 AM, Robert Millan <address@hidden> wrote:
> 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 ?
yes, that's true. but i think the memdisk is not corrupted before
module initialization, so you can malloc and copy it safely in
grub_main:
void
grub_main (void)
{
/* First of all, initialize the machine. */
grub_machine_init ();
// malloc and copy memdisk
...
/* Load pre-loaded modules and free the space. */
grub_register_exported_symbols ();
grub_load_modules ();
..
}
>
> > > > 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..
What i mean is that you can add an variable grub_total_module_addr, if
grub_total_module_addr=0, calculate the addr using the above fomula,
and if it's not, use it directly as the base address of memdisk. The
reason for this extra variable is that you can set it in pre loader,
for example,
kernel grub2.bin
initrd memdisk
lnxboot can extract the address of initrd image, and set
grub_total_module_addr before jumping to core.img.
--
Bean
- Re: moving ata initialisation to a command, (continued)
- Re: moving ata initialisation to a command, Robert Millan, 2007/12/21
- embedding filesystems in core image (Re: moving ata initialisation to a command), Robert Millan, 2007/12/21
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Bean, 2007/12/21
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Robert Millan, 2007/12/22
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Yoshinori K. Okuji, 2007/12/22
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Robert Millan, 2007/12/23
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Bean, 2007/12/24
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Robert Millan, 2007/12/24
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Bean, 2007/12/24
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Robert Millan, 2007/12/24
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command),
Bean <=
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Robert Millan, 2007/12/22
- Re: embedding filesystems in core image (Re: moving ata initialisation to a command), Yoshinori K. Okuji, 2007/12/22
- embedding data in ELF (Re: moving ata initialisation to a command), Robert Millan, 2007/12/26
avoid firmware in grub-mkrescue (Re: moving ata initialisation to a command), Robert Millan, 2007/12/26