Ignore:
Timestamp:
2014-10-30T12:48:50Z (10 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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/sun4v/tlb.c

    raef669b rcade9c1  
    208208
    209209/** ITLB miss handler. */
    210 void fast_instruction_access_mmu_miss(sysarg_t unused, istate_t *istate)
     210void fast_instruction_access_mmu_miss(unsigned int tt, istate_t *istate)
    211211{
    212212        uintptr_t va = ALIGN_DOWN(istate->tpc, PAGE_SIZE);
     
    239239 * low-level, assembly language part of the fast_data_access_mmu_miss handler.
    240240 *
    241  * @param page_and_ctx  A 64-bit value describing the fault. The most
    242  *                      significant 51 bits of the value contain the virtual
    243  *                      address which caused the fault truncated to the page
    244  *                      boundary. The least significant 13 bits of the value
    245  *                      contain the number of the context in which the fault
    246  *                      occurred.
     241 * @param tt            Trap type.
    247242 * @param istate        Interrupted state saved on the stack.
    248243 */
    249 void fast_data_access_mmu_miss(uint64_t page_and_ctx, istate_t *istate)
     244void fast_data_access_mmu_miss(unsigned int tt, istate_t *istate)
    250245{
    251246        pte_t *t;
    252         uintptr_t va = DMISS_ADDRESS(page_and_ctx);
    253         uint16_t ctx = DMISS_CONTEXT(page_and_ctx);
     247        uintptr_t va = DMISS_ADDRESS(istate->tlb_tag_access);
     248        uint16_t ctx = DMISS_CONTEXT(istate->tlb_tag_access);
    254249        as_t *as = AS;
    255250
     
    288283/** DTLB protection fault handler.
    289284 *
    290  * @param page_and_ctx  A 64-bit value describing the fault. The most
    291  *                      significant 51 bits of the value contain the virtual
    292  *                      address which caused the fault truncated to the page
    293  *                      boundary. The least significant 13 bits of the value
    294  *                      contain the number of the context in which the fault
    295  *                      occurred.
     285 * @param tt            Trap type.
    296286 * @param istate        Interrupted state saved on the stack.
    297287 */
    298 void fast_data_access_protection(uint64_t page_and_ctx, istate_t *istate)
     288void fast_data_access_protection(unsigned int tt, istate_t *istate)
    299289{
    300290        pte_t *t;
    301         uintptr_t va = DMISS_ADDRESS(page_and_ctx);
    302         uint16_t ctx = DMISS_CONTEXT(page_and_ctx);
     291        uintptr_t va = DMISS_ADDRESS(istate->tlb_tag_access);
     292        uint16_t ctx = DMISS_CONTEXT(istate->tlb_tag_access);
    303293        as_t *as = AS;
    304294
Note: See TracChangeset for help on using the changeset viewer.