Changeset 72d120e in mainline for kernel/generic/src/ddi/ddi.c


Ignore:
Timestamp:
2014-06-16T20:17:44Z (10 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a78e4e
Parents:
9d653e3 (diff), 334bf28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Integrate from mainline.

File:
1 edited

Legend:

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

    r9d653e3 r72d120e  
    229229    void *virt_ptr, uintptr_t bound)
    230230{
    231         uintptr_t virt = (uintptr_t) -1;
    232         int rc = physmem_map(ALIGN_DOWN(phys, FRAME_SIZE), pages, flags,
    233             &virt, bound);
     231        uintptr_t virt;
     232        int rc = copy_from_uspace(&virt, virt_ptr, sizeof(virt));
     233        if (rc != EOK)
     234                return rc;
     235       
     236        rc = physmem_map(ALIGN_DOWN(phys, FRAME_SIZE), pages, flags, &virt,
     237            bound);
    234238        if (rc != EOK)
    235239                return rc;
     
    390394                        return rc;
    391395               
     396                uintptr_t virt;
     397                rc = copy_from_uspace(&virt, virt_ptr, sizeof(virt));
     398                if (rc != EOK)
     399                        return rc;
     400               
    392401                uintptr_t phys;
    393                 uintptr_t virt = (uintptr_t) -1;
    394402                rc = dmamem_map_anonymous(size, constraint, map_flags, flags,
    395403                    &phys, &virt, bound);
Note: See TracChangeset for help on using the changeset viewer.