Subversion Repositories HelenOS-historic

Rev

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

Rev 35 Rev 68
Line 60... Line 60...
60
{
60
{
61
    pri_t pri;
61
    pri_t pri;
62
    vm_area_t *a;
62
    vm_area_t *a;
63
   
63
   
64
    if (addr % PAGE_SIZE)
64
    if (addr % PAGE_SIZE)
65
        panic(PANIC "addr not aligned to a page boundary");
65
        panic("addr not aligned to a page boundary");
66
   
66
   
67
    pri = cpu_priority_high();
67
    pri = cpu_priority_high();
68
    spinlock_lock(&m->lock);
68
    spinlock_lock(&m->lock);
69
   
69
   
70
    /*
70
    /*
Line 122... Line 122...
122
        case VMA_DATA:
122
        case VMA_DATA:
123
        case VMA_STACK:
123
        case VMA_STACK:
124
            flags = PAGE_READ | PAGE_WRITE | PAGE_USER | PAGE_PRESENT | PAGE_CACHEABLE;
124
            flags = PAGE_READ | PAGE_WRITE | PAGE_USER | PAGE_PRESENT | PAGE_CACHEABLE;
125
            break;
125
            break;
126
        default:
126
        default:
127
            panic(PANIC "unexpected vm_type_t %d", a->type);
127
            panic("unexpected vm_type_t %d", a->type);
128
    }
128
    }
129
   
129
   
130
    for (i=0; i<a->size; i++)
130
    for (i=0; i<a->size; i++)
131
        map_page_to_frame(a->address + i*PAGE_SIZE, a->mapping[i], flags, 0);
131
        map_page_to_frame(a->address + i*PAGE_SIZE, a->mapping[i], flags, 0);
132
       
132