Ignore:
Timestamp:
2009-04-14T15:50:56Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
Children:
47a6708
Parents:
577b531
Message:

On sparc64, do fast indentity mapping only for physical memory.
For addresses above physical memory, such as I/O devices,
fall through to the C miss handler and map the memory noncacheably.
Replace deprecated Bicc instructions with proper Bcc instructions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/trap/mmu.h

    r577b531 r2bf4936  
    104104         */
    1051050:
    106         mov VA_DMMU_TAG_ACCESS, %g1
    107         ldxa [%g1] ASI_DMMU, %g1                        ! read the faulting Context and VPN
     106        sethi %hi(fast_data_access_mmu_miss_data_hi), %g7
     107        wr %g0, ASI_DMMU, %asi
     108        ldxa [VA_DMMU_TAG_ACCESS] %asi, %g1             ! read the faulting Context and VPN
    108109        set TLB_TAG_ACCESS_CONTEXT_MASK, %g2
    109110        andcc %g1, %g2, %g3                             ! get Context
    110         bnz 0f                                          ! Context is non-zero
     111        bnz %xcc, 0f                                    ! Context is non-zero
    111112        andncc %g1, %g2, %g3                            ! get page address into %g3
    112         bz 0f                                           ! page address is zero
     113        bz  %xcc, 0f                                    ! page address is zero
     114        ldx [%g7 + %lo(end_of_identity)], %g4
     115        cmp %g3, %g4
     116        bgeu %xcc, 0f
    113117
    114         sethi %hi(kernel_8k_tlb_data_template), %g2
    115         ldx [%g2 + %lo(kernel_8k_tlb_data_template)], %g2
     118        ldx [%g7 + %lo(kernel_8k_tlb_data_template)], %g2
    116119        or %g3, %g2, %g2
    117120        stxa %g2, [%g0] ASI_DTLB_DATA_IN_REG            ! identity map the kernel page
     
    139142         * This is necessary to survive nested DTLB misses.
    140143         */     
    141         mov VA_DMMU_TAG_ACCESS, %g2
    142         ldxa [%g2] ASI_DMMU, %g2
     144        ldxa [VA_DMMU_TAG_ACCESS] %asi, %g2
    143145
    144146        /*
Note: See TracChangeset for help on using the changeset viewer.