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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips64/] [kernel/] [r4k_genex.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * This file is subject to the terms and conditions of the GNU General Public
3
 * License.  See the file "COPYING" in the main directory of this archive
4
 * for more details.
5
 *
6
 * Copyright (C) 1994 - 1999 by Ralf Baechle
7
 * Copyright (C) 1999 Silicon Graphics
8
 * Copyright (C) 2002  Maciej W. Rozycki
9
 *
10
 * Low level exception handling
11
 */
12
#include 
13
#include 
14
#include 
15
#include 
16
#include 
17
#include 
18
#include 
19
#include 
20
#include 
21
 
22
        BUILD_HANDLER adel ade ade silent               /* #4  */
23
        BUILD_HANDLER ades ade ade silent               /* #5  */
24
        BUILD_HANDLER ibe be cli silent                 /* #6  */
25
        BUILD_HANDLER dbe be cli silent                 /* #7  */
26
        BUILD_HANDLER bp bp sti silent                  /* #9  */
27
        BUILD_HANDLER ri ri sti silent                  /* #10 */
28
        BUILD_HANDLER cpu cpu sti silent                /* #11 */
29
        BUILD_HANDLER ov ov sti silent                  /* #12 */
30
        BUILD_HANDLER tr tr sti silent                  /* #13 */
31
        BUILD_HANDLER fpe fpe fpe silent                /* #15 */
32
        BUILD_HANDLER mdmx mdmx sti silent              /* #22 */
33
        BUILD_HANDLER watch watch sti verbose           /* #23 */
34
        BUILD_HANDLER mcheck mcheck cli verbose         /* #24 */
35
        BUILD_HANDLER reserved reserved sti verbose     /* others */
36
 
37
 
38
        __INIT
39
 
40
/* A temporary overflow handler used by check_daddi(). */
41
 
42
        BUILD_HANDLER  daddi_ov daddi_ov none silent    /* #12 */
43
 
44
 
45
/* General exception handler for CPUs with virtual coherency exception.
46
 *
47
 * Be careful when changing this, it has to be at most 256 (as a special
48
 * exception) bytes to fit into space reserved for the exception handler.
49
 */
50
        .set    push
51
        .set    noat
52
NESTED(except_vec3_r4000, 0, sp)
53
        mfc0    k1, CP0_CAUSE
54
        li      k0, 31<<2
55
        andi    k1, k1, 0x7c
56
        .set    push
57
        .set    noreorder
58
        .set    nomacro
59
        beq     k1, k0, handle_vced
60
         li     k0, 14<<2
61
        beq     k1, k0, handle_vcei
62
         dsll   k1, k1, 1
63
        .set    pop
64
        ld      k0, exception_handlers(k1)
65
        jr      k0
66
 
67
/*
68
 * Big shit, we now may have two dirty primary cache lines for the same
69
 * physical address.  We can savely invalidate the line pointed to by
70
 * c0_badvaddr because after return from this exception handler the load /
71
 * store will be re-executed.
72
 */
73
handle_vced:
74
        dmfc0   k0, CP0_BADVADDR
75
        li      k1, -4                                  # Is this ...
76
        and     k0, k1                                  # ... really needed?
77
        mtc0    zero, CP0_TAGLO
78
        cache   Index_Store_Tag_D,(k0)
79
        cache   Hit_Writeback_Inv_SD,(k0)
80
        dla     k0, vced_count
81
        lw      k1, (k0)
82
        addiu   k1, 1
83
        sw      k1, (k0)
84
        eret
85
 
86
handle_vcei:
87
        dmfc0   k0, CP0_BADVADDR
88
        cache   Hit_Writeback_Inv_SD,(k0)               # also cleans pi
89
        dla     k0, vcei_count
90
        lw      k1, (k0)
91
        addiu   k1, 1
92
        sw      k1, (k0)
93
        eret
94
END(except_vec3_r4000)
95
        .set    pop
96
 
97
 
98
/* General exception vector for all other CPUs.
99
 *
100
 * Be careful when changing this, it has to be at most 128 bytes
101
 * to fit into space reserved for the exception handler.
102
 */
103
        .set    push
104
        .set    noat
105
NESTED(except_vec3_generic, 0, sp)
106
#if R5432_CP0_INTERRUPT_WAR
107
        mfc0    k0, CP0_INDEX
108
#endif
109
        mfc0    k1, CP0_CAUSE
110
        andi    k1, k1, 0x7c
111
        dsll    k1, k1, 1
112
        ld      k0, exception_handlers(k1)
113
        jr      k0
114
END(except_vec3_generic)
115
        .set    pop
116
 
117
 
118
/*
119
 * Special interrupt vector for MIPS64 ISA & embedded MIPS processors.
120
 * This is a dedicated interrupt exception vector which reduces the
121
 * interrupt processing overhead.  The jump instruction will be replaced
122
 * at the initialization time.
123
 *
124
 * Be careful when changing this, it has to be at most 128 bytes
125
 * to fit into space reserved for the exception handler.
126
 */
127
NESTED(except_vec4, 0, sp)
128
1:      j       1b                      /* Dummy, will be replaced */
129
END(except_vec4)
130
 
131
        __FINIT

powered by: WebSVN 2.1.0

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