Subversion Repositories HelenOS

Rev

Rev 2071 | Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2076
Line 48... Line 48...
48
#include <align.h>
48
#include <align.h>
49
#include <memstr.h>
49
#include <memstr.h>
50
#include <macros.h>
50
#include <macros.h>
51
#include <arch.h>
51
#include <arch.h>
52
 
52
 
-
 
53
#ifdef CONFIG_VIRT_IDX_DCACHE
-
 
54
#include <arch/mm/cache.h>
-
 
55
#endif
-
 
56
 
53
static int elf_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
57
static int elf_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
54
static void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
58
static void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
55
static void elf_share(as_area_t *area);
59
static void elf_share(as_area_t *area);
56
 
60
 
57
mem_backend_t elf_backend = {
61
mem_backend_t elf_backend = {
Line 217... Line 221...
217
        if (entry->p_flags & PF_W) {
221
        if (entry->p_flags & PF_W) {
218
            /*
222
            /*
219
             * Free the frame with the copy of writable segment data.
223
             * Free the frame with the copy of writable segment data.
220
             */
224
             */
221
            frame_free(frame);
225
            frame_free(frame);
-
 
226
#ifdef CONFIG_VIRT_IDX_DCACHE
-
 
227
                dcache_flush_frame(page, frame);
-
 
228
#endif
222
        }
229
        }
223
    } else {
230
    } else {
224
        /*
231
        /*
225
         * The frame is either anonymous memory or the mixed case (i.e. lower
232
         * The frame is either anonymous memory or the mixed case (i.e. lower
226
         * part is backed by the ELF image and the upper is anonymous).
233
         * part is backed by the ELF image and the upper is anonymous).
227
         * In any case, a frame needs to be freed.
234
         * In any case, a frame needs to be freed.
228
         */
235
         */
229
        frame_free(frame);
236
        frame_free(frame);
-
 
237
#ifdef CONFIG_VIRT_IDX_DCACHE
-
 
238
            dcache_flush_frame(page, frame);
-
 
239
#endif
230
    }
240
    }
231
}
241
}
232
 
242
 
233
/** Share ELF image backed address space area.
243
/** Share ELF image backed address space area.
234
 *
244
 *