[SLOF] [PATCH] base: increase catpad buffer
Segher Boessenkool
segher at kernel.crashing.org
Fri Dec 1 03:12:22 AEDT 2017
Hi!
On Thu, Nov 30, 2017 at 10:53:57AM +0530, Nikunj A Dadhania wrote:
> >> Thats where we are hitting the limit. Maybe we can allocate and copy
> >> both these strings without using the catpad?
> >
> > Do you need to at all? parse-load wants to have the $bootdev string
> > as input buffer, so you can do
> >
> > : load
> > [...]
> > set-boot-args
> > save-source -1 to source-id
> > $boot-dev dup #ib ! span ! to ib
> > ['] parse-load catch restore-source throw ;
>
> Had to add " 0 >in !" as used in interpret. Works after that, need your
Ah, that makes sense yes.
> input if the below is correct?
>
> diff --git a/slof/fs/boot.fs b/slof/fs/boot.fs
> index 1fd7439..c2b7551 100644
> --- a/slof/fs/boot.fs
> +++ b/slof/fs/boot.fs
> @@ -221,7 +221,11 @@ defer go ( -- )
> ELSE
> drop
> THEN
> - set-boot-args s" parse-load " $bootdev $cat strdup evaluate
> + set-boot-args
> + save-source -1 to source-id
> + $bootdev dup #ib ! span ! to ib
> + 0 >in !
> + ['] parse-load catch restore-source throw
> ;
Sure, looks fine... The better factored thing would be nicer, have
all the things that dig deep in the interpreter's innards separate.
But your 0 >in ! thing is correct.
Segher
More information about the SLOF
mailing list