-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Olof Johansson
committed
Dec 16, 2011
1 parent
c125a6a
commit 5e710e6
Showing
65 changed files
with
1,437 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 705eb64e2ed78c63b9e2b6002b029ce8710ff7cf | ||
refs/heads/master: 58c017750dc00793cf9ee292a5ce4df1748e852f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef __ASM_IDMAP_H | ||
#define __ASM_IDMAP_H | ||
|
||
#include <linux/compiler.h> | ||
#include <asm/pgtable.h> | ||
|
||
/* Tag a function as requiring to be executed via an identity mapping. */ | ||
#define __idmap __section(.idmap.text) noinline notrace | ||
|
||
extern pgd_t *idmap_pgd; | ||
|
||
void setup_mm_for_reboot(void); | ||
|
||
#endif /* __ASM_IDMAP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* arch/arm/include/asm/pgtable-3level-hwdef.h | ||
* | ||
* Copyright (C) 2011 ARM Ltd. | ||
* Author: Catalin Marinas <catalin.marinas@arm.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
#ifndef _ASM_PGTABLE_3LEVEL_HWDEF_H | ||
#define _ASM_PGTABLE_3LEVEL_HWDEF_H | ||
|
||
/* | ||
* Hardware page table definitions. | ||
* | ||
* + Level 1/2 descriptor | ||
* - common | ||
*/ | ||
#define PMD_TYPE_MASK (_AT(pmdval_t, 3) << 0) | ||
#define PMD_TYPE_FAULT (_AT(pmdval_t, 0) << 0) | ||
#define PMD_TYPE_TABLE (_AT(pmdval_t, 3) << 0) | ||
#define PMD_TYPE_SECT (_AT(pmdval_t, 1) << 0) | ||
#define PMD_BIT4 (_AT(pmdval_t, 0)) | ||
#define PMD_DOMAIN(x) (_AT(pmdval_t, 0)) | ||
|
||
/* | ||
* - section | ||
*/ | ||
#define PMD_SECT_BUFFERABLE (_AT(pmdval_t, 1) << 2) | ||
#define PMD_SECT_CACHEABLE (_AT(pmdval_t, 1) << 3) | ||
#define PMD_SECT_S (_AT(pmdval_t, 3) << 8) | ||
#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10) | ||
#define PMD_SECT_nG (_AT(pmdval_t, 1) << 11) | ||
#define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) | ||
#define PMD_SECT_AP_WRITE (_AT(pmdval_t, 0)) | ||
#define PMD_SECT_AP_READ (_AT(pmdval_t, 0)) | ||
#define PMD_SECT_TEX(x) (_AT(pmdval_t, 0)) | ||
|
||
/* | ||
* AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). | ||
*/ | ||
#define PMD_SECT_UNCACHED (_AT(pmdval_t, 0) << 2) /* strongly ordered */ | ||
#define PMD_SECT_BUFFERED (_AT(pmdval_t, 1) << 2) /* normal non-cacheable */ | ||
#define PMD_SECT_WT (_AT(pmdval_t, 2) << 2) /* normal inner write-through */ | ||
#define PMD_SECT_WB (_AT(pmdval_t, 3) << 2) /* normal inner write-back */ | ||
#define PMD_SECT_WBWA (_AT(pmdval_t, 7) << 2) /* normal inner write-alloc */ | ||
|
||
/* | ||
* + Level 3 descriptor (PTE) | ||
*/ | ||
#define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) | ||
#define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) | ||
#define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0) | ||
#define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ | ||
#define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ | ||
#define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ | ||
#define PTE_EXT_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ | ||
#define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* nG */ | ||
#define PTE_EXT_XN (_AT(pteval_t, 1) << 54) /* XN */ | ||
|
||
/* | ||
* 40-bit physical address supported. | ||
*/ | ||
#define PHYS_MASK_SHIFT (40) | ||
#define PHYS_MASK ((1ULL << PHYS_MASK_SHIFT) - 1) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* arch/arm/include/asm/pgtable-3level-types.h | ||
* | ||
* Copyright (C) 2011 ARM Ltd. | ||
* Author: Catalin Marinas <catalin.marinas@arm.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
#ifndef _ASM_PGTABLE_3LEVEL_TYPES_H | ||
#define _ASM_PGTABLE_3LEVEL_TYPES_H | ||
|
||
#include <asm/types.h> | ||
|
||
typedef u64 pteval_t; | ||
typedef u64 pmdval_t; | ||
typedef u64 pgdval_t; | ||
|
||
#undef STRICT_MM_TYPECHECKS | ||
|
||
#ifdef STRICT_MM_TYPECHECKS | ||
|
||
/* | ||
* These are used to make use of C type-checking.. | ||
*/ | ||
typedef struct { pteval_t pte; } pte_t; | ||
typedef struct { pmdval_t pmd; } pmd_t; | ||
typedef struct { pgdval_t pgd; } pgd_t; | ||
typedef struct { pteval_t pgprot; } pgprot_t; | ||
|
||
#define pte_val(x) ((x).pte) | ||
#define pmd_val(x) ((x).pmd) | ||
#define pgd_val(x) ((x).pgd) | ||
#define pgprot_val(x) ((x).pgprot) | ||
|
||
#define __pte(x) ((pte_t) { (x) } ) | ||
#define __pmd(x) ((pmd_t) { (x) } ) | ||
#define __pgd(x) ((pgd_t) { (x) } ) | ||
#define __pgprot(x) ((pgprot_t) { (x) } ) | ||
|
||
#else /* !STRICT_MM_TYPECHECKS */ | ||
|
||
typedef pteval_t pte_t; | ||
typedef pmdval_t pmd_t; | ||
typedef pgdval_t pgd_t; | ||
typedef pteval_t pgprot_t; | ||
|
||
#define pte_val(x) (x) | ||
#define pmd_val(x) (x) | ||
#define pgd_val(x) (x) | ||
#define pgprot_val(x) (x) | ||
|
||
#define __pte(x) (x) | ||
#define __pmd(x) (x) | ||
#define __pgd(x) (x) | ||
#define __pgprot(x) (x) | ||
|
||
#endif /* STRICT_MM_TYPECHECKS */ | ||
|
||
#endif /* _ASM_PGTABLE_3LEVEL_TYPES_H */ |
Oops, something went wrong.