Changeset 127c957b in mainline
- Timestamp:
- 2006-05-27T20:02:27Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 00b595b
- Parents:
- 0ee077ee
- Location:
- generic
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/elf.h
r0ee077ee r127c957b 32 32 #include <arch/elf.h> 33 33 #include <arch/types.h> 34 #include < mm/as.h>34 #include <typedefs.h> 35 35 36 36 /** -
generic/include/mm/as.h
r0ee077ee r127c957b 47 47 #include <adt/list.h> 48 48 #include <adt/btree.h> 49 #include <elf.h> 49 50 50 51 /** Defined to be true if user address space and kernel address space shadow each other. */ … … 119 120 120 121 /** Backend data stored in address space area. */ 121 typedef struct backend_data { 122 __native d1; 123 __native d2; 122 typedef union { 123 struct { /**< elf_backend members */ 124 elf_header_t *elf; 125 elf_segment_header_t *segment; 126 }; 127 struct { /**< phys_backend members */ 128 __address base; 129 count_t frames; 130 }; 124 131 } mem_backend_data_t; 125 132 -
generic/src/ddi/ddi.c
r0ee077ee r127c957b 66 66 task_t *t; 67 67 int flags; 68 mem_backend_data_t backend_data = { .d1 = (__native) pf, .d2 = (__native) pages }; 68 mem_backend_data_t backend_data; 69 70 backend_data.base = pf; 71 backend_data.frames = pages; 69 72 70 73 /* -
generic/src/lib/elf.c
r0ee077ee r127c957b 163 163 as_area_t *a; 164 164 int flags = 0; 165 mem_backend_data_t backend_data = { .d1 = (__native) elf, .d2 = (__native) entry }; 165 mem_backend_data_t backend_data; 166 167 backend_data.elf = elf; 168 backend_data.segment = entry; 166 169 167 170 if (entry->p_align > 1) { -
generic/src/mm/backend_anon.c
r0ee077ee r127c957b 52 52 static void anon_share(as_area_t *area); 53 53 54 /*55 * Anonymous memory backend.56 */57 54 mem_backend_t anon_backend = { 58 55 .page_fault = anon_page_fault, -
generic/src/mm/backend_elf.c
r0ee077ee r127c957b 65 65 int elf_page_fault(as_area_t *area, __address addr, pf_access_t access) 66 66 { 67 elf_header_t *elf = (elf_header_t *) area->backend_data.d1;68 elf_segment_header_t *entry = (elf_segment_header_t *) area->backend_data.d2;67 elf_header_t *elf = area->backend_data.elf; 68 elf_segment_header_t *entry = area->backend_data.segment; 69 69 __address base, frame; 70 70 index_t i; … … 133 133 void elf_frame_free(as_area_t *area, __address page, __address frame) 134 134 { 135 elf_header_t *elf = (elf_header_t *) area->backend_data.d1;136 elf_segment_header_t *entry = (elf_segment_header_t *) area->backend_data.d2;135 elf_header_t *elf = area->backend_data.elf; 136 elf_segment_header_t *entry = area->backend_data.segment; 137 137 __address base; 138 138 index_t i; -
generic/src/mm/backend_phys.c
r0ee077ee r127c957b 64 64 int phys_page_fault(as_area_t *area, __address addr, pf_access_t access) 65 65 { 66 __address base = (__address) area->backend_data.d1;67 count_t frames = (count_t) area->backend_data.d2;66 __address base = area->backend_data.base; 67 count_t frames = area->backend_data.frames; 68 68 69 69 if (!as_area_check_access(area, access))
Note:
See TracChangeset
for help on using the changeset viewer.