Subversion Repositories HelenOS-historic

Rev

Rev 1187 | Rev 1328 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1187 Rev 1267
Line 25... Line 25...
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
#include <arch/mm/page.h>
29
#include <arch/mm/page.h>
-
 
30
#include <arch/boot/boot.h>
30
#include <proc/scheduler.h>
31
#include <proc/scheduler.h>
31
#include <proc/thread.h>
32
#include <proc/thread.h>
32
#include <arch.h>
33
#include <arch.h>
33
 
34
 
34
__address supervisor_sp;
-
 
35
__address supervisor_sp_physical;
-
 
36
 
-
 
37
/** Perform ppc32 specific tasks needed before the new task is run. */
35
/** Perform ppc32 specific tasks needed before the new task is run. */
38
void before_task_runs_arch(void)
36
void before_task_runs_arch(void)
39
{
37
{
40
}
38
}
41
 
39
 
42
/** Perform ppc32 specific tasks needed before the new thread is scheduled. */
40
/** Perform ppc32 specific tasks needed before the new thread is scheduled. */
43
void before_thread_runs_arch(void)
41
void before_thread_runs_arch(void)
44
{
42
{
-
 
43
    asm volatile (
-
 
44
        "mtsprg0 %0\n"
-
 
45
        :
45
    supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA];
46
        : "r" (KA2PA(&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]))
46
    supervisor_sp_physical = KA2PA(supervisor_sp_physical);
-
 
-
 
47
    );
47
}
48
}
48
 
49
 
49
void after_thread_ran_arch(void)
50
void after_thread_ran_arch(void)
50
{
51
{
51
}
52
}