Ignore:
Timestamp:
2006-08-31T18:53:14Z (19 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/include/interrupt.h

    re0b241f red166f7  
    3434 */
    3535
    36 #ifndef __sparc64_INTERRUPT_H__
    37 #define __sparc64_INTERRUPT_H__
     36#ifndef KERN_sparc64_INTERRUPT_H_
     37#define KERN_sparc64_INTERRUPT_H_
    3838
    3939#include <typedefs.h>
    4040#include <arch/types.h>
     41#include <arch/regdef.h>
    4142
    4243#define IRQ_COUNT       1       /* TODO */
     
    5354static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
    5455{
    55         /* TODO */
     56        istate->tpc = retaddr;
    5657}
     58
    5759static inline int istate_from_uspace(istate_t *istate)
    5860{
    59         /* TODO */
    60         return 0;
     61        return !(istate->tstate & TSTATE_PRIV_BIT);
    6162}
     63
    6264static inline unative_t istate_get_pc(istate_t *istate)
    6365{
    64         /* TODO */
    65         return 0;
     66        return istate->tpc;
    6667}
    6768
Note: See TracChangeset for help on using the changeset viewer.