Rev 1229 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1229 | Rev 1248 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /* |
29 | /** |
- | 30 | * @file page.c |
|
30 | * Virtual Address Translation subsystem. |
31 | * @brief Virtual Address Translation subsystem. |
- | 32 | * |
|
- | 33 | * This file contains code for creating, destroying and searching |
|
- | 34 | * mappings between virtual addresses and physical addresses. |
|
- | 35 | * Functions here are mere wrappers that call the real implementation. |
|
- | 36 | * They however, define the single interface. |
|
31 | */ |
37 | */ |
32 | 38 | ||
33 | #include <mm/page.h> |
39 | #include <mm/page.h> |
34 | #include <arch/mm/page.h> |
40 | #include <arch/mm/page.h> |
35 | #include <arch/mm/asid.h> |
41 | #include <arch/mm/asid.h> |
Line 71... | Line 77... | ||
71 | 77 | ||
72 | } |
78 | } |
73 | 79 | ||
74 | /** Insert mapping of page to frame. |
80 | /** Insert mapping of page to frame. |
75 | * |
81 | * |
76 | * Map virtual address @page to physical address @frame |
82 | * Map virtual address page to physical address frame |
77 | * using @flags. Allocate and setup any missing page tables. |
83 | * using flags. Allocate and setup any missing page tables. |
78 | * |
84 | * |
79 | * The page table must be locked and interrupts must be disabled. |
85 | * The page table must be locked and interrupts must be disabled. |
80 | * |
86 | * |
81 | * @param as Address space to wich page belongs. |
87 | * @param as Address space to wich page belongs. |
82 | * @param page Virtual address of the page to be mapped. |
88 | * @param page Virtual address of the page to be mapped. |
Line 91... | Line 97... | ||
91 | page_mapping_operations->mapping_insert(as, page, frame, flags); |
97 | page_mapping_operations->mapping_insert(as, page, frame, flags); |
92 | } |
98 | } |
93 | 99 | ||
94 | /** Remove mapping of page. |
100 | /** Remove mapping of page. |
95 | * |
101 | * |
96 | * Remove any mapping of @page within address space @as. |
102 | * Remove any mapping of page within address space as. |
97 | * TLB shootdown should follow in order to make effects of |
103 | * TLB shootdown should follow in order to make effects of |
98 | * this call visible. |
104 | * this call visible. |
99 | * |
105 | * |
100 | * The page table must be locked and interrupts must be disabled. |
106 | * The page table must be locked and interrupts must be disabled. |
101 | * |
107 | * |