[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sendkey patch
From: |
phcoder |
Subject: |
Re: Sendkey patch |
Date: |
Wed, 03 Sep 2008 19:48:13 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080724) |
Hello. In this case we can transfer the whole functionality located in
kern/loader.c to a dedicated module boot.mod. This module will also
register "boot" command. In this way the encapsulation won't be broken
and kernel will become even smaller.
Vladimir 'phcoder' Serbinenko
Vesa Jääskeläinen wrote:
> Hi,
>
> How about following (may not be syntaxically correct):
>
> In kernel:
>
> /* Variable holding pointer to preboot hook function. */
> preboot_hook:
> .long 0
>
> ...
> /* Check if there is preboot hook installed. */
> movl preboot_hook, %eax
> testl %eax, %eax
> jne 1f
> call %eax
> 1:
> /* Continue boot. */
>
>
> Then in module code:
>
> void grub_preboot_hook_handler(void)
> {
> /* Process list of registered preboot hooks. */
> }
>
> void grub_preboot_register_hook(...);
> void grub_preboot_unregister_hook(...);
>
> GRUB_MOD_INIT(preboot)
> {
> preboot_hook = grub_preboot_hook_handler;
> }
>
> GRUB_MOD_FINI(preboot)
> {
> preboot_hook = 0;
> }
>
> If preboot.mod gets loaded then it goes and registers preboot handler to
> kernel to do its tricks. Other modules then would use preboot.mod to
> register their own handlers.
>
> This would have minimal impact for kernel.
>
> Thanks,
> Vesa Jääskeläinen
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
- Re: Sendkey patch, (continued)
- Re: Sendkey patch, Javier Martín, 2008/09/02
- Re: Sendkey patch, phcoder, 2008/09/02
- Re: Sendkey patch, Javier Martín, 2008/09/02
- Re: Sendkey patch, phcoder, 2008/09/03
- Re: Sendkey patch, Javier Martín, 2008/09/03
- Re: Sendkey patch, bitbucket, 2008/09/03
- Re: Sendkey patch, Felix Zielcke, 2008/09/03
- Re: Sendkey patch, Vesa Jääskeläinen, 2008/09/03
- Re: Sendkey patch, Javier Martín, 2008/09/03
- Re: Sendkey patch, Felix Zielcke, 2008/09/03
- Re: Sendkey patch,
phcoder <=
- Re: Sendkey patch, Vesa Jääskeläinen, 2008/09/03
- Re: Sendkey patch, phcoder, 2008/09/03
- Re: Sendkey patch, Javier Martín, 2008/09/04
- [PATCH] Move kern/loader.c to boot.mod and add preboot_support (was Re: Sendkey patch), phcoder, 2008/09/05
- Re: [PATCH] Move kern/loader.c to boot.mod and add preboot_support (was Re: Sendkey patch), Javier Martín, 2008/09/05
- Re: [PATCH] Move kern/loader.c to boot.mod and add preboot_support (was Re: Sendkey patch), Vesa Jääskeläinen, 2008/09/08
- Re: [PATCH] Move kern/loader.c to boot.mod and add preboot_support (was Re: Sendkey patch), Javier Martín, 2008/09/08
- Re: [PATCH] Move kern/loader.c to boot.mod and add preboot_support (was Re: Sendkey patch), Vesa Jääskeläinen, 2008/09/08
- Re: [PATCH] Move kern/loader.c to boot.mod and add preboot_support (was Re: Sendkey patch), Javier Martín, 2008/09/08