This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
context switching for sparc hal
- From: "Yi Tang" <yitang at itee dot uq dot edu dot au>
- To: <ecos-discuss at sourceware dot org>
- Cc: <nickg at ecoscentric dot com>
- Date: Tue, 23 Oct 2007 18:13:02 +1000
- Subject: [ECOS] context switching for sparc hal
- Reply-to: <yitang at itee dot uq dot edu dot au>
Hi,
I have got a question for the context switching used in sparc hal.
Refer to the sparc manual, a complete context switching should have the
following steps:
1. execute NWINDOWS-2 save instructions to flush all the active register
window of the process to the stack
2. execute NWINDOWS-2 restore instructions to move the CWP back to the
original windows.
However, in the context.s for sparc hal. I can only find the first step:
In macro: hal_thread_load_context (line 163)
#if !defined(CYGHWR_HAL_SPARC_FLAT) ! allow multiple reg window
.rept __WINSIZE-2
! call WIM overflow trap to store window reg to stack
save %sp, -16 * 4, %sp
.endr
#endif
But I can't find any restore code in the following of this file.
Does that mean in the ecos context switching, you simply omit the restore
process and let all the window reg remain in the stack?
I'm currently doing some test on the context switching part and have been
stuck on this for several days. And I really appreciate if someone can help
me through this.
Thanks and Regards,
Yi Tang
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss