Changeset cfa70add in mainline for kernel/arch/sparc64/include


Ignore:
Timestamp:
2006-09-03T23:37:14Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fd85ae5
Parents:
002e613
Message:

sparc64 update.

  • Prototype userspace layer implementation that at least relates to sparc64 and compiles cleanly.
  • Fixes for kernel's preemptible_handler and code related to running userspace.
  • Enable userspace. Several dozen instructions are now run in userspace! We are pretty near the userspace milestone for sparc64.
Location:
kernel/arch/sparc64/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/asm.h

    r002e613 rcfa70add  
    331331extern void write_to_ig_g6(uint64_t val);
    332332
    333 extern void switch_to_userspace(uint64_t pc, uint64_t sp);
     333extern void switch_to_userspace(uint64_t pc, uint64_t sp, uint64_t uarg);
    334334
    335335#endif
  • kernel/arch/sparc64/include/mm/as.h

    r002e613 rcfa70add  
    4343#define USER_ADDRESS_SPACE_END_ARCH             (unsigned long) 0xffffffffffffffff
    4444
    45 #define USTACK_ADDRESS_ARCH     (0x7fffffffffffffff-(PAGE_SIZE-1))
     45#define USTACK_ADDRESS_ARCH     (0xffffffffffffffffULL-(PAGE_SIZE-1))
    4646
    4747extern void as_arch_init(void);
  • kernel/arch/sparc64/include/mm/tlb.h

    r002e613 rcfa70add  
    180180static inline void mmu_secondary_context_write(uint64_t v)
    181181{
    182         asi_u64_write(ASI_DMMU, VA_PRIMARY_CONTEXT_REG, v);
     182        asi_u64_write(ASI_DMMU, VA_SECONDARY_CONTEXT_REG, v);
    183183        flush();
    184184}
  • kernel/arch/sparc64/include/trap/mmu.h

    r002e613 rcfa70add  
    128128.macro HANDLE_MMU_TRAPS_FROM_SPILL_OR_FILL
    129129        rdpr %tl, %g1
    130         dec %g1
    131         brz %g1, 0f                     ! if TL was 1, skip
     130        sub %g1, 1, %g2
     131        brz %g2, 0f                     ! if TL was 1, skip
    132132        nop
    133         wrpr %g1, 0, %tl                ! TL--
    134         rdpr %tt, %g2
    135         cmp %g2, TT_SPILL_1_NORMAL
    136         be 0f                           ! trap from spill_1_normal
    137         cmp %g2, TT_FILL_1_NORMAL
    138         be 0f                           ! trap from fill_1_normal
    139         inc %g1
    140         wrpr %g1, 0, %tl                ! another trap, TL++
     133        wrpr %g2, 0, %tl                ! TL--
     134        rdpr %tt, %g3
     135        cmp %g3, TT_SPILL_1_NORMAL
     136        be 0f                           ! trap from spill_1_normal?
     137        cmp %g3, TT_FILL_1_NORMAL
     138        bne,a 0f                        ! trap from fill_1_normal? (negated condition)
     139        wrpr %g1, 0, %tl                ! TL++
    1411400:
    142141.endm
Note: See TracChangeset for help on using the changeset viewer.