Changeset a218709 in mainline for kernel/arch/sparc32/src/exception.c


Ignore:
Timestamp:
2013-12-02T23:45:45Z (10 years ago)
Author:
Jakub Klama <jakub.klama@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2955bb9
Parents:
3bc42bd
Message:

Implement new userspace window trap mechanism, which utilizes MMU probe
to choose between slow (preemptive, involving inserting stack page mapping)
and fast (direct) handlers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc32/src/exception.c

    r3bc42bd ra218709  
    3939#include <arch/istate.h>
    4040#include <arch/exception.h>
     41#include <arch/regwin.h>
    4142#include <syscall/syscall.h>
    4243#include <interrupt.h>
    4344#include <arch/asm.h>
     45#include <mm/frame.h>
     46#include <mm/page.h>
     47#include <mm/as.h>
     48#include <memstr.h>
    4449#include <debug.h>
    4550#include <print.h>
     
    142147sysarg_t syscall(sysarg_t a1, sysarg_t a2, sysarg_t a3, sysarg_t a4, sysarg_t a5, sysarg_t a6, sysarg_t id)
    143148{
    144         printf("syscall %d\n", id);
    145         printf("args: 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", a1, a2, a3, a4, a5, a6);
     149//      printf("syscall %d\n", id);
     150//      printf("args: 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", a1, a2, a3, a4, a5, a6);
     151        if (id == 0x4f) {
     152            flush_windows();
     153            return 0;
     154        }
     155   
    146156        return syscall_handler(a1, a2, a3, a4, a5, a6, id);
     157}
     158
     159void preemptible_save_uspace(uintptr_t sp, istate_t *istate)
     160{
     161        as_page_fault(sp, PF_ACCESS_WRITE, istate);
     162}
     163
     164void preemptible_restore_uspace(uintptr_t sp, istate_t *istate)
     165{
     166        as_page_fault(sp, PF_ACCESS_WRITE, istate);
    147167}
    148168
Note: See TracChangeset for help on using the changeset viewer.