Subversion Repositories HelenOS-historic

Rev

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

Rev 1187 Rev 1398
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 ppc64 specific tasks needed before the new task is run. */
35
/** Perform ppc64 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 ppc64 specific tasks needed before the new thread is scheduled. */
40
/** Perform ppc64 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
    pht_init();
-
 
44
    tlb_invalidate_all();
-
 
45
    asm volatile (
-
 
46
        "mtsprg0 %0\n"
-
 
47
        :
45
    supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA];
48
        : "r" (KA2PA(&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]))
46
    supervisor_sp_physical = KA2PA(supervisor_sp_physical);
-
 
-
 
49
    );
47
}
50
}
48
 
51
 
49
void after_thread_ran_arch(void)
52
void after_thread_ran_arch(void)
50
{
53
{
51
}
54
}