Ignore:
Timestamp:
2013-11-01T20:28:13Z (11 years ago)
Author:
Jakub Klama <jakub.klama@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3f596c9
Parents:
e6a3bfee
Message:

Fixed moving from/to invalid window and register window corruption in
preemptible_trap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc32/src/proc/scheduler.c

    re6a3bfee rbbb94545  
    4444void before_thread_runs_arch(void)
    4545{
    46         uint32_t kernel_sp = (uint32_t) THREAD->kstack + STACK_SIZE;
    47         uint32_t uspace_wbuf = (uint32_t) THREAD->arch.uspace_window_buffer;
    48         write_to_invalid(kernel_sp, uspace_wbuf, 0xdeadbeef);
     46        printf("before_thread_runs_arch(uspace=%d, kernel_sp=0x%08x\n", THREAD->uspace, (uintptr_t)THREAD->kstack + STACK_SIZE);
     47        if (THREAD->uspace) {
     48                uint32_t kernel_sp = (uint32_t) THREAD->kstack + STACK_SIZE - 8;
     49                uint32_t uspace_wbuf = (uint32_t) THREAD->arch.uspace_window_buffer;
     50                write_to_invalid(kernel_sp, uspace_wbuf, 0);
     51        }
    4952}
    5053
Note: See TracChangeset for help on using the changeset viewer.