Changeset ed166f7 in mainline for kernel/arch/sparc64/src/sparc64.c


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/sparc64.c

    re0b241f red166f7  
    3535#include <arch.h>
    3636#include <debug.h>
     37#include <config.h>
    3738#include <arch/trap/trap.h>
    3839#include <arch/console.h>
     
    4243#include <arch/boot/boot.h>
    4344#include <arch/arch.h>
    44 #include <arch/mm/tlb.h>
    45 #include <mm/asid.h>
     45#include <arch/mm/page.h>
     46#include <arch/stack.h>
     47#include <userspace.h>
    4648
    4749bootinfo_t bootinfo;
     
    9294}
    9395
     96/** Switch to userspace. */
     97void userspace(uspace_arg_t *kernel_uarg)
     98{
     99        switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry,
     100                ((uintptr_t) kernel_uarg->uspace_stack) + STACK_SIZE
     101                - (ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_BIAS));
     102
     103        for (;;)
     104                ;
     105        /* not reached */
     106}
     107
    94108/** @}
    95109 */
Note: See TracChangeset for help on using the changeset viewer.