Changeset 0ee077ee in mainline for generic/src/ddi/ddi.c


Ignore:
Timestamp:
2006-05-27T17:50:30Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
127c957b
Parents:
fb84455
Message:

Move the sharing functionality to address space area backends.
Add backend for continuous regions of physical memory.
Sharing for these areas works automagically now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/ddi/ddi.c

    rfb84455 r0ee077ee  
    6666        task_t *t;
    6767        int flags;
    68         count_t i;
     68        mem_backend_data_t backend_data = { .d1 = (__native) pf, .d2 = (__native) pages };
    6969       
    7070        /*
     
    9999        spinlock_unlock(&tasks_lock);
    100100       
    101         flags = AS_AREA_DEVICE | AS_AREA_READ;
     101        flags = AS_AREA_READ;
    102102        if (writable)
    103103                flags |= AS_AREA_WRITE;
    104         if (!as_area_create(t->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE, NULL, NULL)) {
     104        if (!as_area_create(t->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE,
     105                &phys_backend, &backend_data)) {
    105106                /*
    106107                 * The address space area could not have been created.
     
    112113        }
    113114       
    114         /* Initialize page tables. */
    115         for (i = 0; i < pages; i++)
    116                 as_set_mapping(t->as, vp + i * PAGE_SIZE, pf + i * FRAME_SIZE);
    117 
     115        /*
     116         * Mapping is created on-demand during page fault.
     117         */
     118       
    118119        spinlock_unlock(&t->lock);
    119120        interrupts_restore(ipl);
Note: See TracChangeset for help on using the changeset viewer.