This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: support return to redboot from go
- From: Mark Salter <msalter at redhat dot com>
- To: brian at murphy dot dk
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 4 Feb 2003 16:31:17 -0500 (EST)
- Subject: Re: support return to redboot from go
- References: <20030131164616.C582B7884D@deneb.localdomain> <3E402E7A.5080605@murphy.dk>
>>>>> Brian Murphy writes:
> Not really sure what all of the patch does but it at least needs this
> change to compile on mips:
Interesting. What was the compiler error message?
> diff -u -r1.38 main.c
> --- packages/redboot//current/src/main.c 31 Jan 2003 16:46:01
> -0000 1.38
> +++ packages/redboot//current/src/main.c 4 Feb 2003 21:15:33 -0000
> @@ -411,6 +411,7 @@
> go_return_status = status;
> HAL_THREAD_LOAD_CONTEXT(&go_saved_context);
> // never returns
> + CYGARC_HAL_RESTORE_GP();
> }
I'll add it in for completeness although it never gets executed.
> void
> Although if the comment is correct why the CYGARC_HAL_SAVE_GP ?
The caller of this function may be another program with its own $gp.
On mips, SAVE_GP saves the caller $gp register and sets up $gp to the
value RedBoot expects. The RESTORE_GP reverses this on function exit.
SAVE_GP needs to be there because go_return_status or go_saved_context
could be referenced relative to $gp.
Thanks for reporting this.
--Mark