grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] rough Mac OS X loader


From: Marco Gerards
Subject: Re: [patch] rough Mac OS X loader
Date: Mon, 02 Jan 2006 19:02:17 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Hollis Blanchard <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]