[SLOF] RFC: cp codes

Thomas Huth thuth at redhat.com
Tue Feb 9 04:50:05 AEDT 2016

On 08.02.2016 15:10, Dinar Valeev wrote:
> Hi,
> I have long standing issue with SLOF. During start SLOF prints cp
> codes with backspace:
> https://github.com/aik/SLOF/blob/master/lib/libbootmsg/bootmsg_lvl.S#L61-L64
> We start a VM and record log, this is fine. But then when we look at
> the log through WebUI, because of backspace, Mozilla thinks this is a
> binary file.
> At devconf I discussed this with Thomas, and he proposed to use nvram
> variable here. But it seems QEMU's --prom-env seems to be OpenBIOS
> specific.
> Any comments for bring --prom-env support to SLOF? Or are there other
> options I can use,
> to change libbootmsg behaviour?

You actually can use the "-pflash" option to save and restore the NVRAM
contents to/from a persistent file (see the following URL for details:

So I'd suggest to introduce a new environment variable into
slof/fs/envvar_defaults.fs and then check the contents of the variable
during the "cp" Forth function, so that it only prints the backslashes
if the envvar has the right value.

By the way, seems like the assembler function bootmsg_cp is only called
via the wrapper in bootmsg.code nowadays ... IIRC we once also called it
from the llfw (low-level firmware), that's why it had been written in
assembler once. However, since this is not the case anymore, I think it
should also be fine to simply rewrite this function in Forth instead, so
you could check the envvar more easily.


More information about the SLOF mailing list