[OpenBIOS] [PATCH] Introduce forth_init() for trampoline initialization
blauwirbel at gmail.com
Sat Nov 13 11:04:22 CET 2010
On Sat, Nov 13, 2010 at 9:44 AM, Andreas Färber <andreas.faerber at web.de> wrote:
> Am 10.11.2010 um 18:27 schrieb Blue Swirl:
>> On Wed, Nov 10, 2010 at 10:52 AM, Mark Cave-Ayland
>> <mark.cave-ayland at siriusit.co.uk> wrote:
>>> Blue Swirl wrote:
>>>>> Are you sure it doesn't need to be initialized from anywhere else, like
>>>>> load_dictionary() or forth_init(), for the initialization to take
>>>>> before any of these?
>>>> Yes, since all uses of trampoline call setup_trampoline() before use.
>>>> I also renamed 't' to trampoline2 to catch all uses of it.
>>> I think I prefer Andreas' approach but with a slight modification -
>>> the signature of init_trampoline() from:
>>> static void init_trampoline(void)
>>> static void init_trampoline(ucell *t)
>>> This enables the caller to pass in a pointer to the base of the
>>> ucell array, and so should work correctly when compiled as part of both
>>> bootstrap.c (host target) and the OpenBIOS output target.
>> Yes, good idea. I still think that adding setup_trampoline() which
>> just does the assignment to trampoline would still be a small
>> cleanup, but it can be added later.
> Is anyone working on this or are you waiting for me to? I'm not sure I
> understand what exactly you want now...
I'd be fine with your patch with Mark's modification included.
> Mark, do you mean we should go with Blue's initial forth_init() suggestion?
> Or do you just mean splitting init_trampoline(ucell* t) from Blue's
That can be done later, or if you prefer, included into your patch.
> Either way, where would we put a unified init_trampoline()? Into
> kernel/kernel.h as inline function?
That should work.
More information about the OpenBIOS