2
* GRUB -- GRand Unified Bootloader
3
* Copyright (C) 2013 Free Software Foundation, Inc.
5
* GRUB is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
10
* GRUB is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19
#include <grub/symbol.h>
27
# define DMB mcr p15, 0, r0, c7, c10, 5
28
# define DSB mcr p15, 0, r0, c7, c10, 4
29
# define ISB mcr p15, 0, r0, c7, c5, 4
32
clean_invalidate_dcache:
33
mcr p15, 0, r0, c7, c14, 0 @ Clean/Invalidate D-cache
38
FUNCTION(grub_arm_main_id)
39
mrc p15, 0, r0, c0, c0, 0
42
FUNCTION(grub_arm_cache_type)
43
mrc p15, 0, r0, c0, c0, 1
46
FUNCTION(grub_arm_clear_mmu_v6)
48
mcr p15, 0, r0, c2, c0, 2
51
FUNCTION(grub_arm_enable_mmu)
52
mcr p15, 0, r0, c2, c0, 0
55
mcr p15, 0, r0, c3, c0, 0
57
mrc p15, 0, r0, c1, c0, 0
58
bic r0, r0, #(1 << 23)
59
mcr p15, 0, r0, c1, c0, 0
61
mrc p15, 0, r0, c1, c0, 0
63
mcr p15, 0, r0, c1, c0, 0
65
mrc p15, 0, r0, c1, c0, 0
67
mcr p15, 0, r0, c1, c0, 0
69
mrc p15, 0, r0, c1, c0, 0
70
orr r0, r0, #(1 << 12)
71
mcr p15, 0, r0, c1, c0, 0