Home
last modified time | relevance | path

Searched refs:rmem (Results 1 – 3 of 3) sorted by relevance

/device/linaro/dragonboard/shared/utils/rmtfs/
Dsharedmem.c20 static int rmtfs_mem_enumerate(struct rmtfs_mem *rmem);
53 static int rmtfs_mem_open_rfsa(struct rmtfs_mem *rmem, int client_id) in rmtfs_mem_open_rfsa() argument
71 rmem->fd = fd; in rmtfs_mem_open_rfsa()
95 ret = parse_hex_sysattr(dev, "phys_addr", &rmem->address); in rmtfs_mem_open_rfsa()
102 ret = parse_hex_sysattr(dev, "size", &rmem->size); in rmtfs_mem_open_rfsa()
123 static int rmtfs_mem_open_uio(struct rmtfs_mem *rmem, int client_id) in rmtfs_mem_open_uio() argument
141 rmem->fd = fd; in rmtfs_mem_open_uio()
165 ret = parse_hex_sysattr(dev, "maps/map0/addr", &rmem->address); in rmtfs_mem_open_uio()
172 ret = parse_hex_sysattr(dev, "maps/map0/size", &rmem->size); in rmtfs_mem_open_uio()
179 rmem->base = mmap(0, rmem->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in rmtfs_mem_open_uio()
[all …]
Drmtfs.h20 void rmtfs_mem_close(struct rmtfs_mem *rmem);
21 int64_t rmtfs_mem_alloc(struct rmtfs_mem *rmem, size_t size);
22 void rmtfs_mem_free(struct rmtfs_mem *rmem);
23 ssize_t rmtfs_mem_read(struct rmtfs_mem *rmem, unsigned long phys_address, void *buf, ssize_t len);
24 ssize_t rmtfs_mem_write(struct rmtfs_mem *rmem, unsigned long phys_address, const void *buf, ssize_…
Drmtfs.c28 static struct rmtfs_mem *rmem; variable
126 rmtfs_mem_free(rmem); in rmtfs_close()
197 n = rmtfs_mem_read(rmem, phys_base + offset, buf, SECTOR_SIZE); in rmtfs_iovec()
205 n = rmtfs_mem_write(rmem, phys_base + offset, buf, SECTOR_SIZE); in rmtfs_iovec()
272 address = rmtfs_mem_alloc(rmem, alloc_size); in rmtfs_alloc_buf()
556 rmem = rmtfs_mem_open(); in main()
557 if (!rmem) in main()
572 rmtfs_mem_close(rmem); in main()