Changeset 8442d10 in mainline for uspace/srv


Ignore:
Timestamp:
2013-09-09T21:48:12Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c67dbd6
Parents:
2e2c18a1
Message:

improve the API of physmem_map(), dmamem_map() and dmamem_map_anonymous()
the "constraint" argument of dmamem_map_anonymous() should be used to specify bits disallowed in the physical frame address

Location:
uspace/srv
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/rd/rd.c

    r2e2c18a1 r8442d10  
    165165            AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE;
    166166       
    167         ret = physmem_map((void *) addr_phys,
     167        ret = physmem_map(addr_phys,
    168168            ALIGN_UP(rd_size, PAGE_SIZE) >> PAGE_WIDTH, flags, &rd_addr);
    169169        if (ret != EOK) {
  • uspace/srv/hid/input/port/niagara.c

    r2e2c18a1 r8442d10  
    9797                return -1;
    9898       
    99         int rc = physmem_map((void *) paddr, 1,
    100             AS_AREA_READ | AS_AREA_WRITE, (void *) &input_buffer);
     99        int rc = physmem_map(paddr, 1, AS_AREA_READ | AS_AREA_WRITE,
     100            (void *) &input_buffer);
    101101        if (rc != 0) {
    102102                printf("Niagara: uspace driver couldn't map physical memory: %d\n",
  • uspace/srv/hid/output/port/ega.c

    r2e2c18a1 r8442d10  
    216216        ega.size = (ega.cols * ega.rows) << 1;
    217217       
    218         rc = physmem_map((void *) paddr,
     218        rc = physmem_map(paddr,
    219219            ALIGN_UP(ega.size, PAGE_SIZE) >> PAGE_WIDTH,
    220220            AS_AREA_READ | AS_AREA_WRITE, (void *) &ega.addr);
  • uspace/srv/hid/output/port/kchar.c

    r2e2c18a1 r8442d10  
    8484                return rc;
    8585       
    86         rc = physmem_map((void *) paddr,
     86        rc = physmem_map(paddr,
    8787            ALIGN_UP(1, PAGE_SIZE) >> PAGE_WIDTH,
    8888            AS_AREA_READ | AS_AREA_WRITE, (void *) &kchar.addr);
  • uspace/srv/hid/output/port/niagara.c

    r2e2c18a1 r8442d10  
    104104                return rc;
    105105       
    106         rc = physmem_map((void *) paddr, 1,
    107             AS_AREA_READ | AS_AREA_WRITE, (void *) &niagara.fifo);
     106        rc = physmem_map(paddr, 1, AS_AREA_READ | AS_AREA_WRITE,
     107            (void *) &niagara.fifo);
    108108        if (rc != EOK)
    109109                return rc;
  • uspace/srv/hw/irc/obio/obio.c

    r2e2c18a1 r8442d10  
    6969#define INO_MASK        0x1f
    7070
    71 static void *base_phys;
     71static uintptr_t base_phys;
    7272static volatile uint64_t *base_virt;
    7373
     
    123123        }
    124124       
    125         base_phys = (void *) paddr;
     125        base_phys = (uintptr_t) paddr;
    126126       
    127127        int flags = AS_AREA_READ | AS_AREA_WRITE;
     
    135135        }
    136136       
    137         printf("%s: OBIO registers with base at %p\n", NAME, base_phys);
     137        printf("%s: OBIO registers with base at %zu\n", NAME, base_phys);
    138138       
    139139        async_set_client_connection(obio_connection);
Note: See TracChangeset for help on using the changeset viewer.