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


Ignore:
Timestamp:
2014-10-30T12:48:50Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3579629
Parents:
aef669b
Message:

sparc64/sun4v trap overhaul.

  • Handle interrupt, MMU and other essential traps via exc_dispatch()
  • Handle data_access_exception on TL>1
  • Switch the sun4v code to the previously modified istate_t structure
Location:
kernel/arch/sparc64/include/arch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/arch/mm/sun4v/tlb.h

    raef669b rcade9c1  
    141141}
    142142
    143 extern void fast_instruction_access_mmu_miss(sysarg_t, istate_t *);
    144 extern void fast_data_access_mmu_miss(sysarg_t, istate_t *);
    145 extern void fast_data_access_protection(sysarg_t, istate_t *);
     143extern void fast_instruction_access_mmu_miss(unsigned int, istate_t *);
     144extern void fast_data_access_mmu_miss(unsigned int, istate_t *);
     145extern void fast_data_access_protection(unsigned int, istate_t *);
    146146
    147147extern void dtlb_insert_mapping(uintptr_t, uintptr_t, int, bool, bool);
  • kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h

    raef669b rcade9c1  
    4040#ifndef __ASM__
    4141
     42#include <arch/istate_struct.h>
     43
    4244extern void sun4v_ipi_init(void);
    43 extern void cpu_mondo(void);
     45extern void cpu_mondo(unsigned int, istate_t *);
    4446
    4547#endif
  • kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h

    raef669b rcade9c1  
    7373
    7474.macro FAST_INSTRUCTION_ACCESS_MMU_MISS_HANDLER
    75         PREEMPTIBLE_HANDLER fast_instruction_access_mmu_miss
     75        mov TT_FAST_INSTRUCTION_ACCESS_MMU_MISS, %g2
     76        clr %g5         ! XXX
     77        PREEMPTIBLE_HANDLER exc_dispatch
    7678.endm
    7779
     
    123125         * mapped. In such a case, this handler will be called from TL = 1.
    124126         * We handle the situation by pretending that the MMU miss occurred
    125          * on TL = 0. Once the MMU miss trap is services, the instruction which
     127         * on TL = 0. Once the MMU miss trap is serviced, the instruction which
    126128         * caused the spill/fill trap is restarted, the spill/fill trap occurs,
    127          * but this time its handler accesse memory which IS mapped.
     129         * but this time its handler accesses memory which is mapped.
    128130         */
    129131        .if (\tl > 0)
     
    131133        .endif
    132134
     135        mov TT_FAST_DATA_ACCESS_MMU_MISS, %g2
     136
    133137        /*
    134          * Save the faulting virtual page and faulting context to the %g2
    135          * register. The most significant 51 bits of the %g2 register will
     138         * Save the faulting virtual page and faulting context to the %g5
     139         * register. The most significant 51 bits of the %g5 register will
    136140         * contain the virtual address which caused the fault truncated to the
    137          * page boundary. The least significant 13 bits of the %g2 register
     141         * page boundary. The least significant 13 bits of the %g5 register
    138142         * will contain the number of the context in which the fault occurred.
    139          * The value of the %g2 register will be passed as a parameter to the
    140          * higher level service routine.
     143         * The value of the %g5 register will be stored in the istate structure
     144         * for inspeciton by the higher level service routine.
    141145         */
    142         or %g1, %g3, %g2
     146        or %g1, %g3, %g5
    143147
    144         PREEMPTIBLE_HANDLER fast_data_access_mmu_miss
     148        PREEMPTIBLE_HANDLER exc_dispatch
    145149.endm
    146150
     
    170174        sllx %g1, TTE_DATA_TADDR_OFFSET, %g1
    171175
     176        mov TT_FAST_DATA_ACCESS_PROTECTION, %g2
     177
    172178        /* the same as for FAST_DATA_ACCESS_MMU_MISS_HANDLER */
    173         or %g1, %g3, %g2
     179        or %g1, %g3, %g5
    174180
    175         PREEMPTIBLE_HANDLER fast_data_access_protection
     181        PREEMPTIBLE_HANDLER exc_dispatch
    176182.endm
    177183#endif /* __ASM__ */
Note: See TracChangeset for help on using the changeset viewer.