All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <mgerards@xs4all.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [patch] rough Mac OS X loader
Date: Mon, 02 Jan 2006 19:02:17 +0100	[thread overview]
Message-ID: <877j9i5x06.fsf@xs4all.nl> (raw)
In-Reply-To: <5a9811b68c26fe828d35b0de819dc6a7@penguinppc.org> (Hollis Blanchard's message of "Mon, 2 Jan 2006 11:50:31 -0600")

Hollis Blanchard <hollis@penguinppc.org> writes:

>>> +void EXPORT_FUNC (grub_jump) (unsigned long text, unsigned long
>>> stack,
>>> +			      unsigned long arg1, unsigned long arg2);
>>
>> Shouldn't a pointer be used here?
>
> Used where?

For grub_jump's arguments.  It jumps to some address, right?

>>> +/* BootX, the Mac OS X bootloader, is an XCOFF executable with a
>>> CHRP script
>>> + * prepended to it.  We skip the script and load the XCOFF file.  */
>>
>> What is in this script?  Are you completely sure it can be skipped?
>
> It loads the XCOFF into memory. Yes.

Ah! :)

>>> +static grub_err_t
>>> +grub_macosx_release_mem (void)
>>> +{
>>> +  /* XXX write me */
>>
>> I assume you encountered a bug in the firmware while writing this
>> function? :-)
>
> No, just haven't written it yet. :) I think the XCOFF sections in
> BootX are contiguous though, so if that's true it should not be
> difficult.

Oh, ok.  In that case please add it to the to do list after this patch
is committed.

>>> +/* Find NULL-terminated `needle' in non-terminated `haystack'.  */
>>> +static void *
>>> +grub_memstr (void *haystack, int len, char *needle)
>>
>> Perhaps it is better to move this to kern/misc.c?
>
> I had that thought, but "memstr" is not a standard POSIX function so I
> wasn't sure.

It's looks like a useful function to me.  We can always move it back
if it turns out no one uses it...

Thanks,
Marco




  reply	other threads:[~2006-01-02 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-02  0:38 [patch] rough Mac OS X loader Hollis Blanchard
2006-01-02 17:29 ` Marco Gerards
2006-01-02 17:50   ` Hollis Blanchard
2006-01-02 18:02     ` Marco Gerards [this message]
2006-01-03  0:39       ` Hollis Blanchard
2006-01-03 18:02         ` Marco Gerards

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=877j9i5x06.fsf@xs4all.nl \
    --to=mgerards@xs4all.nl \
    --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.