Update Ficl in Bootloader - Final Status

Colin D. Lord cdlord2 at illinois.edu
Fri Aug 28 18:21:10 UTC 2015


Hi everyone,

Here's the current status of my project to update the Ficl version in
the bootloader.

When the summer began, I had two main goals for this project. The first
was to get a working implementation of the bootloader running Ficl 4 in
"compatibility mode", which would allow the FreeBSD Ficl customizations
to carry over to Ficl 4, ideally without too much modification. The
second goal was to remove the compatibility mode setting, which would
require all of the FreeBSD customizations to be remade to use the Ficl 4
api. Turning off compatibility mode would offer the benefits of cleaner
code and ease of future maintenance and understandability.

I had initially expected to get a working bootloader by the middle of
the summer. However, I hit many roadblocks and that timeline did not end
up working out. While the bootloader currently builds, due to a bug
related to the Ficl stack, it does not get very far through the boot
process.

So currently the Ficl 4 userland interpreter can be built and used, and
the bootloader should build, but until the bug in Ficl is fixed, it will
not run correctly. I expect the bootloader to work once that bug is
fixed though. I put a few days of dedicated effort into finding the bug,
but was unsuccessful in fixing it before time ran out.

In a little more detail, the bug in the Ficl stack was that the stack
simply did not grow, ie pushing an element, and then viewing the
contents of the stack, resulted in the Ficl interpreter saying it had no
items on the stack. While debugging, it appeared to me that while one
item could be inserted, when accessing the item the pointer to the top
of the stack would for some reason be reset to its initial value, making
it appear as though the stack was empty. This bug also appears in the
ports version of Ficl 4 (lang/ficl, port version 4.1.0_2), which is why
we believe it is a bug in Ficl and not a result of a mistake while
importing Ficl.

The next steps therefore consist of fixing the Ficl stack to get a
functioning loader, and then removing compatibility mode can be a
consideration.

Many thanks to Devin for helping me when I got stuck and providing
guidance about all my questions, and also to Pedro for dropping in every
once in a while to check on me.

Colin


More information about the soc-status mailing list