Subversion Repositories HelenOS

Rev

Rev 4153 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4153 Rev 4581
Line 80... Line 80...
80
{
80
{
81
    elf_header_t *elf = area->backend_data.elf;
81
    elf_header_t *elf = area->backend_data.elf;
82
    elf_segment_header_t *entry = area->backend_data.segment;
82
    elf_segment_header_t *entry = area->backend_data.segment;
83
    btree_node_t *leaf;
83
    btree_node_t *leaf;
84
    uintptr_t base, frame, page, start_anon;
84
    uintptr_t base, frame, page, start_anon;
85
    index_t i;
85
    size_t i;
86
    bool dirty = false;
86
    bool dirty = false;
87
 
87
 
88
    if (!as_area_check_access(area, access))
88
    if (!as_area_check_access(area, access))
89
        return AS_PF_FAULT;
89
        return AS_PF_FAULT;
90
 
90
 
Line 232... Line 232...
232
void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
232
void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
233
{
233
{
234
    elf_header_t *elf = area->backend_data.elf;
234
    elf_header_t *elf = area->backend_data.elf;
235
    elf_segment_header_t *entry = area->backend_data.segment;
235
    elf_segment_header_t *entry = area->backend_data.segment;
236
    uintptr_t base, start_anon;
236
    uintptr_t base, start_anon;
237
    index_t i;
237
    size_t i;
238
 
238
 
239
    ASSERT((page >= ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) &&
239
    ASSERT((page >= ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) &&
240
        (page < entry->p_vaddr + entry->p_memsz));
240
        (page < entry->p_vaddr + entry->p_memsz));
241
    i = (page - ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) >> PAGE_WIDTH;
241
    i = (page - ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) >> PAGE_WIDTH;
242
    base = (uintptr_t) (((void *) elf) +
242
    base = (uintptr_t) (((void *) elf) +
Line 302... Line 302...
302
       
302
       
303
        node = list_get_instance(cur, btree_node_t, leaf_link);
303
        node = list_get_instance(cur, btree_node_t, leaf_link);
304
       
304
       
305
        for (i = 0; i < node->keys; i++) {
305
        for (i = 0; i < node->keys; i++) {
306
            uintptr_t base = node->key[i];
306
            uintptr_t base = node->key[i];
307
            count_t count = (count_t) node->value[i];
307
            size_t count = (size_t) node->value[i];
308
            unsigned int j;
308
            unsigned int j;
309
           
309
           
310
            /*
310
            /*
311
             * Skip read-only areas of used space that are backed
311
             * Skip read-only areas of used space that are backed
312
             * by the ELF image.
312
             * by the ELF image.