Ignore:
Timestamp:
2006-08-31T18:53:14Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6767c1d
Parents:
e0b241f
Message:

A lot of untested sparc64 stuff:

  • Write ASID to hardware when a thread is about to run in userspace.
  • Add userspace() and switch_to_userspace() functions.
  • Handle special cases when the userspace spill/fill handler causes MMU trap.
  • Resolve some TODOs in the existing sparc64 code.
  • sparc64 has now C99 compliant header guards.
  • Formatting and indentation fixes.
File:
1 edited

Legend:

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

    re0b241f red166f7  
    9292                 * in the userspace window buffer to %g7 in the alternate and interrupt sets.
    9393                 */
    94                 write_to_ig_g6((uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS);
    95                 write_to_ag_g6((uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS);
     94                uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE
     95                        - (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT));
     96                write_to_ig_g6(sp);
     97                write_to_ag_g6(sp);
    9698                write_to_ag_g7((uintptr_t) THREAD->arch.uspace_window_buffer);
    9799        }
Note: See TracChangeset for help on using the changeset viewer.