OpenCores
URL https://opencores.org/ocsvn/mips_enhanced/mips_enhanced/trunk

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [software/] [leon3/] [mmu_asm.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
#include "leon3.h"
2
#include "testmod.h"
3
#include "mmu.h"
4
 
5
        .seg    "text"
6
        .proc   0
7
        .align PAGE_SIZE
8
        .global mmu_func1
9
mmu_func1:
10
        save  %sp, -112, %sp
11
        ret
12
        restore
13
 
14
        .align 4
15
        .global mmu_double
16
mmu_double:
17
        save  %sp, -112, %sp
18
        save  %sp, -112, %sp
19
        save  %sp, -112, %sp
20
        save  %sp, -112, %sp
21
        save  %sp, -112, %sp
22
        save  %sp, -112, %sp
23
        set 0x11111111,%l0
24
        set 0x22222222,%l1
25
        set 0x33333333,%l2
26
        set 0x44444444,%l3
27
        set 0x55555555,%l4
28
        set 0x66666666,%l5
29
        set 0x77777777,%l6
30
        set 0x88888888,%l7
31
        set 0x40000000,%g0
32
        std %l0,[%fp-32]
33
        std %l2,[%fp-24]
34
        std %l4,[%fp-16]
35
        std %l6,[%fp-8]
36
        mov %fp,%g1
37
        sub %g1,32-4,%g1
38
        sta %g0, [%g1] 0xf
39
        sub %g1,8,%g1
40
        sta %g0, [%g1] 0xf
41
        sub %g1,8,%g1
42
        sta %g0, [%g1] 0xf
43
        sub %g1,8,%g1
44
        sta %g0, [%g1] 0xf
45
 
46
        sta %g0, [%g0] 0x11
47
        save  %sp, -112, %sp
48
        save  %sp, -112, %sp
49
        restore
50
        restore
51
        nop
52
        nop
53
        ldd [%fp-32],%l0
54
        ldd [%fp-24],%l2
55
        ldd [%fp-16],%l4
56
        ldd [%fp-8],%l6
57
        nop
58
        nop
59
        restore
60
        restore
61
        restore
62
        restore
63
        restore
64
        ret
65
        restore
66
 
67
/* SRMMU_TFAULT() SRMMU_DFAULT()
68
 * %l0 : %psr
69
 * %l1 = pc            :set by trap
70
 * %l2 = npc           :set by trap
71
 * %l3 : %wim
72
 * %l6 : 1 on inst, 0 on data
73
 */
74
        .global _srmmu_fault,_srmmu_fault_svt
75
_srmmu_fault_svt:
76
        rd      %wim, %l3
77
_srmmu_fault:
78
        mov     0x400, %l5
79
        mov     0x300, %l4
80
        lda     [%l5] ASI_M_MMUREGS, %l6        ! read sfar first
81
        lda     [%l4] ASI_M_MMUREGS, %l5        ! read sfsr last
82
 
83
        set     pth_addr,%l7                    ! repair pth
84
        ld    [%l7],%l7
85
        ld      [%l7],%l4
86
        ld      [%l7+4],%l5
87
        ld      [%l7+8],%l6
88
        or    %l6,0x0,%l6                               ! one page
89
        sta   %g0, [%l6] ASI_M_FLUSH_PROBE
90
 
91
        st      %l5,[%l4]
92
        inc   12,%l7
93
        set     pth_addr,%l5
94
        st    %l7,[%l5]
95
 
96
        jmp     %l1                             ! reexecute command
97
        rett    %l2
98
 
99
        .align 8
100
        .global pth_addr, pth_addr1
101
pth_addr:       .word 0
102
        .align 8
103
pth_addr1:      .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
104
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.