~ubuntu-branches/ubuntu/trusty/grub2/trusty

« back to all changes in this revision

Viewing changes to grub-core/kern/arm/cache_armv6.S

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  GRUB  --  GRand Unified Bootloader
 
3
 *  Copyright (C) 2013  Free Software Foundation, Inc.
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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/>.
 
17
 */
 
18
 
 
19
#include <grub/symbol.h>
 
20
 
 
21
        .file   "cache_armv6.S"
 
22
        .text
 
23
        .syntax unified
 
24
        .arm
 
25
        .arch   armv6
 
26
 
 
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
 
30
#define ARMV6 1
 
31
 
 
32
clean_invalidate_dcache:
 
33
        mcr     p15, 0, r0, c7, c14, 0  @ Clean/Invalidate D-cache
 
34
        bx      lr
 
35
 
 
36
#include "cache.S"
 
37
 
 
38
FUNCTION(grub_arm_main_id)
 
39
        mrc     p15, 0, r0, c0, c0, 0
 
40
        bx lr
 
41
 
 
42
FUNCTION(grub_arm_cache_type)
 
43
        mrc     p15, 0, r0, c0, c0, 1
 
44
        bx lr
 
45
 
 
46
FUNCTION(grub_arm_clear_mmu_v6)
 
47
        mov     r0, #0
 
48
        mcr     p15, 0, r0, c2, c0, 2
 
49
        bx      lr
 
50
 
 
51
FUNCTION(grub_arm_enable_mmu)
 
52
        mcr     p15, 0, r0, c2, c0, 0
 
53
 
 
54
        mvn     r0, #0
 
55
        mcr     p15, 0, r0, c3, c0, 0
 
56
 
 
57
        mrc     p15, 0, r0, c1, c0, 0
 
58
        bic     r0, r0, #(1 << 23)
 
59
        mcr     p15, 0, r0, c1, c0, 0
 
60
 
 
61
        mrc     p15, 0, r0, c1, c0, 0
 
62
        orr     r0, r0, #(1 << 0)
 
63
        mcr     p15, 0, r0, c1, c0, 0
 
64
 
 
65
        mrc     p15, 0, r0, c1, c0, 0
 
66
        orr     r0, r0, #(1 << 2)
 
67
        mcr     p15, 0, r0, c1, c0, 0
 
68
 
 
69
        mrc     p15, 0, r0, c1, c0, 0
 
70
        orr     r0, r0, #(1 << 12)
 
71
        mcr     p15, 0, r0, c1, c0, 0
 
72
 
 
73
        bx      lr