This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

context switching for sparc hal


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]