Repository navigation
Expand file tree
/
Copy pathmemory_asm.S
More file actions
75 lines (62 loc) · 1.49 KB
/
Copy pathmemory_asm.S
File metadata and controls
75 lines (62 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
memory management, MMU, caches, and flushing
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
# This code is licensed to you under the terms of the GNU GPL, version 2;
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
*/
.arm
.globl _dc_inval_entries
.type _dc_inval_entries, %function
.globl _dc_flush_entries
.type _dc_flush_entries, %function
.globl _dc_flush
.type _dc_flush, %function
.globl _dc_inval
.type _dc_inval, %function
.globl _ic_inval
.type _ic_inval, %function
.globl _drain_write_buffer
.type _drain_write_buffer, %function
.globl _tlb_inval
.type _tlb_inval, %function
.text
_dc_inval_entries:
mcr p15, 0, r0, c7, c6, 1
add r0, #0x20
subs r1, #1
bne _dc_inval_entries
bx lr
.size _dc_inval_entries, . - _dc_inval_entries
_dc_flush_entries:
mcr p15, 0, r0, c7, c10, 1
add r0, #0x20
subs r1, #1
bne _dc_flush_entries
bx lr
.size _dc_flush_entries, . - _dc_flush_entries
_dc_flush:
mrc p15, 0, pc, c7, c10, 3
bne _dc_flush
bx lr
.size _dc_flush, . - _dc_flush
_dc_inval:
mov r0, #0
mcr p15, 0, r0, c7, c6, 0
bx lr
.size _dc_inval, . - _dc_inval
_ic_inval:
mov r0, #0
mcr p15, 0, r0, c7, c5, 0
bx lr
.size _ic_inval, . - _ic_inval
_drain_write_buffer:
mov r0, #0
mcr p15, 0, r0, c7, c10, 4
bx lr
.size _drain_write_buffer, . - _drain_write_buffer
_tlb_inval:
mov r0, #0
mcr p15, 0, r0, c8, c7
bx lr
.size _tlb_inval, . - _tlb_inval