All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Move BSD and multiboot boot helper out of the kernel to their respective modules
Date: Sat, 7 Feb 2009 23:14:58 +0100	[thread overview]
Message-ID: <20090207221458.GM6343@thorin> (raw)
In-Reply-To: <4981D1D4.2080102@gmail.com>

On Thu, Jan 29, 2009 at 04:57:08PM +0100, phcoder wrote:
> Index: loader/i386/bsd_helper.S
> ===================================================================
> --- loader/i386/bsd_helper.S	(revision 0)
> +++ loader/i386/bsd_helper.S	(revision 0)
> @@ -0,0 +1,26 @@
> +#include <grub/symbol.h>
> +	
> +	.p2align	2	/* force 4-byte alignment */
> +
> +/*
> + * Use cdecl calling convention for *BSD kernels.
> + */
> +
> +FUNCTION(grub_unix_real_boot)
> +
> +        call    EXT_C(grub_stop_floppy)
> +
> +	/* Interrupts should be disabled.  */
> +        cli
> +
> +	/* Discard `grub_unix_real_boot' return address.  */
> +        popl    %eax
> +
> +        /* Fetch `entry' address ...  */
> +        popl	%eax
> +
> +        /*
> +         * ... and put our return address in its place. The kernel will
> +         * ignore it, but it expects %esp to point to it.
> +         */
> +        call	*%eax

This is small enough that it could make sense to use inline asm instead,
so we can avoid a separate file.  What do you think?

Also, it'd be better if you can submit two separate patches, one for BSD
and one for Multiboot.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



  parent reply	other threads:[~2009-02-07 22:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 15:57 Move BSD and multiboot boot helper out of the kernel to their respective modules phcoder
2009-02-04 12:08 ` phcoder
2009-02-07 22:20   ` Robert Millan
2009-02-07 23:12     ` phcoder
2009-02-07 22:14 ` Robert Millan [this message]
2009-02-07 23:05   ` phcoder

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=20090207221458.GM6343@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.