[OpenBIOS] [PATCH] Introduce forth_init() for trampoline initialization
blauwirbel at gmail.com
Tue Nov 9 19:57:45 CET 2010
On Tue, Nov 9, 2010 at 6:38 PM, Andreas Färber <andreas.faerber at web.de> wrote:
> Am 09.11.2010 um 19:07 schrieb Blue Swirl:
>> On Mon, Nov 8, 2010 at 11:20 PM, Andreas Färber <andreas.faerber at web.de>
>>> Move trampoline variable initialization to init_trampoline(),
>>> like in kernel/bootstrap.c.
>>> Add calls to a new forth_init() function for each architecture
>>> to invoke it. Idea courtesy of Blue.
>> Looks OK. I tried a slightly different approach (attached). I added
>> Mark's excellent analysis as a comment.
> General setup_trampoline() idea is fine with me. Please avoid indentation
> changes though, you're replacing single tabs with 8 spaces.
I've always used spaces. Actually I'd like to switch to QEMU coding
style with 4 spaces, this is how Sparc files are formatted.
> Are you sure it doesn't need to be initialized from anywhere else, like
> load_dictionary() or forth_init(), for the initialization to take effect
> 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.
>> However, ppc64 does not build for me:
>> GEN bootstrap.dict
>> panic: segmentation violation at 0xccbd062c
>> dict=0x2aecccbd0010 here=0x2aecccbd0638(dict+0x628)
>> dstackcnt=0 rstackcnt=0 instruction=deadbeef
>> dstack: 0x0
>> rstack: 0x0
>> Writing dictionary core file
> Will check.
> You are aware that there is no dependency rule for internal.c since it is
> #included from primitives.c? You either need to do `make clean` first or
> reconfigure for changes to take effect.
Yes, the dependencies are far from complete. The problem is that
rules.mak is autogenerated, so the dependencies should be added to
build.xml files or some magic added to use gcc -MMD flags.
Including a .c file from another is not so great idea, this happens in
a few places.
More information about the OpenBIOS