public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] context switching for sparc hal
@ 2007-10-23  8:13 Yi Tang
  0 siblings, 0 replies; only message in thread
From: Yi Tang @ 2007-10-23  8:13 UTC (permalink / raw)
  To: ecos-discuss; +Cc: nickg

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-23  8:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-23  8:13 [ECOS] context switching for sparc hal Yi Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).