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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [glue/] [arm/] [mapping.h] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Generic mapping operations
3
 *
4
 * Operations on address space mappings that
5
 * all subarchitectures support generically.
6
 *
7
 * Copyright (C) 2008 - 2010 B Labs Ltd.
8
 * Written by Bahadir Balban
9
 */
10
 
11
#ifndef __ARM_GLUE_MAPPING_H__
12
#define __ARM_GLUE_MAPPING_H__
13
 
14
#include INC_SUBARCH(mm.h)
15
 
16
#define TASK_PGD(x)             (x)->space->pgd
17
 
18
unsigned int space_flags_to_ptflags(unsigned int flags);
19
 
20
void add_mapping_pgd(unsigned long paddr, unsigned long vaddr,
21
                     unsigned int size, unsigned int flags,
22
                     pgd_table_t *pgd);
23
 
24
void add_mapping(unsigned long paddr, unsigned long vaddr,
25
                 unsigned int size, unsigned int flags);
26
 
27
void add_boot_mapping(unsigned long paddr, unsigned long vaddr,
28
                      unsigned int size, unsigned int flags);
29
 
30
int remove_mapping(unsigned long vaddr);
31
int remove_mapping_pgd(pgd_table_t *pgd, unsigned long vaddr);
32
void remove_mapping_pgd_all_user(pgd_table_t *pgd);
33
 
34
int check_mapping_pgd(unsigned long vaddr, unsigned long size,
35
                      unsigned int flags, pgd_table_t *pgd);
36
 
37
int check_mapping(unsigned long vaddr, unsigned long size,
38
                  unsigned int flags);
39
 
40
void copy_pgd_kern_all(pgd_table_t *);
41
 
42
struct address_space;
43
int delete_page_tables(struct address_space *space);
44
int copy_user_tables(struct address_space *new, struct address_space *orig);
45
void remap_as_pages(void *vstart, void *vend);
46
 
47
void copy_pgds_by_vrange(pgd_table_t *to, pgd_table_t *from,
48
                         unsigned long start, unsigned long end);
49
 
50
/*
51
 * TODO: Some of these may be made inline by
52
 * removing their signature from here completely
53
 * and creating an arch-specific mapping.h which
54
 * has inline definitions or just signatures.
55
 */
56
 
57
pte_t virt_to_pte(unsigned long vaddr);
58
pte_t *virt_to_ptep(unsigned long vaddr);
59
pte_t virt_to_pte_from_pgd(pgd_table_t *pgd, unsigned long vaddr);
60
unsigned long virt_to_phys_by_pgd(pgd_table_t *pgd, unsigned long vaddr);
61
 
62
void arch_prepare_pte(u32 paddr, u32 vaddr, unsigned int flags,
63
                      pte_t *ptep);
64
 
65
void arch_write_pte(pte_t *ptep, pte_t pte, u32 vaddr);
66
 
67
void arch_prepare_write_pte(u32 paddr, u32 vaddr,
68
                            unsigned int flags, pte_t *ptep);
69
 
70
pmd_t *arch_pick_pmd(pgd_table_t *pgd, unsigned long vaddr);
71
 
72
void arch_write_pmd(pmd_t *pmd_entry, u32 pmd_phys, u32 vaddr);
73
 
74
int arch_check_pte_access_perms(pte_t pte, unsigned int flags);
75
 
76
pgd_table_t *arch_realloc_page_tables(void);
77
 
78
void arch_copy_pgd_kernel_entries(pgd_table_t *to);
79
 
80
int is_global_pgdi(int i);
81
 
82
struct ktcb;
83
void arch_space_switch(struct ktcb *task);
84
 
85
int pgd_count_boot_pmds();
86
 
87
void idle_task(void);
88
 
89
#endif /* __ARM_GLUE_MAPPING_H__ */

powered by: WebSVN 2.1.0

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