Changeset 6aeca0d in mainline
- Timestamp:
- 2016-08-28T11:27:42Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2c3fed
- Parents:
- 1e5d01b
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
r1e5d01b r6aeca0d 298 298 299 299 /* Address space area related syscalls. */ 300 extern sysarg_t sys_as_area_create(uintptr_t, size_t, unsigned int, uintptr_t); 300 extern sysarg_t sys_as_area_create(uintptr_t, size_t, unsigned int, uintptr_t, 301 int); 301 302 extern sysarg_t sys_as_area_resize(uintptr_t, size_t, unsigned int); 302 303 extern sysarg_t sys_as_area_change_flags(uintptr_t, unsigned int); -
kernel/generic/src/mm/as.c
r1e5d01b r6aeca0d 2182 2182 2183 2183 sysarg_t sys_as_area_create(uintptr_t base, size_t size, unsigned int flags, 2184 uintptr_t bound )2184 uintptr_t bound, int pager) 2185 2185 { 2186 2186 uintptr_t virt = base; -
uspace/app/tester/mm/common.c
r1e5d01b r6aeca0d 341 341 342 342 area->addr = as_area_create(AS_AREA_ANY, size, 343 AS_AREA_WRITE | AS_AREA_READ | AS_AREA_CACHEABLE); 343 AS_AREA_WRITE | AS_AREA_READ | AS_AREA_CACHEABLE, 344 AS_AREA_UNPAGED); 344 345 if (area->addr == AS_MAP_FAILED) { 345 346 free(area); -
uspace/app/tester/mm/mapping1.c
r1e5d01b r6aeca0d 43 43 44 44 void *result = as_area_create(AS_AREA_ANY, size, 45 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE );45 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, AS_AREA_UNPAGED); 46 46 if (result == AS_MAP_FAILED) 47 47 return NULL; -
uspace/lib/c/generic/as.c
r1e5d01b r6aeca0d 50 50 * @param size Size of the area. 51 51 * @param flags Flags describing type of the area. 52 * @param pager If non-negative, phone to the external pager backing the area. 53 * If AS_AREA_UNPAGED (-1), the area is anonymous. 52 54 * 53 55 * @return Starting virtual address of the created area on success. … … 55 57 * 56 58 */ 57 void *as_area_create(void *base, size_t size, unsigned int flags )59 void *as_area_create(void *base, size_t size, unsigned int flags, int pager) 58 60 { 59 return (void *) __SYSCALL4(SYS_AS_AREA_CREATE, (sysarg_t) base, 60 (sysarg_t) size, (sysarg_t) flags, (sysarg_t) __entry); 61 return (void *) __SYSCALL5(SYS_AS_AREA_CREATE, (sysarg_t) base, 62 (sysarg_t) size, (sysarg_t) flags, (sysarg_t) __entry, 63 (sysarg_t) pager); 61 64 } 62 65 -
uspace/lib/c/generic/elf/elf_mod.c
r1e5d01b r6aeca0d 370 370 */ 371 371 a = as_area_create((uint8_t *) base + bias, mem_sz, 372 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 372 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, 373 AS_AREA_UNPAGED); 373 374 if (a == AS_MAP_FAILED) { 374 375 DPRINTF("memory mapping failed (%p, %zu)\n", -
uspace/lib/c/generic/fibril.c
r1e5d01b r6aeca0d 279 279 size_t stack_size = (stksz == FIBRIL_DFLT_STK_SIZE) ? 280 280 stack_size_get() : stksz; 281 fibril->stack = as_area_create( (void *) -1, stack_size,281 fibril->stack = as_area_create(AS_AREA_ANY, stack_size, 282 282 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD | 283 AS_AREA_LATE_RESERVE );283 AS_AREA_LATE_RESERVE, AS_AREA_UNPAGED); 284 284 if (fibril->stack == (void *) -1) { 285 285 fibril_teardown(fibril, false); -
uspace/lib/c/generic/io/chargrid.c
r1e5d01b r6aeca0d 60 60 if ((flags & CHARGRID_FLAG_SHARED) == CHARGRID_FLAG_SHARED) { 61 61 scrbuf = (chargrid_t *) as_area_create(AS_AREA_ANY, size, 62 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 62 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, 63 AS_AREA_UNPAGED); 63 64 if (scrbuf == AS_MAP_FAILED) 64 65 return NULL; -
uspace/lib/c/generic/malloc.c
r1e5d01b r6aeca0d 354 354 size_t asize = ALIGN_UP(size, PAGE_SIZE); 355 355 void *astart = as_area_create(AS_AREA_ANY, asize, 356 AS_AREA_WRITE | AS_AREA_READ | AS_AREA_CACHEABLE );356 AS_AREA_WRITE | AS_AREA_READ | AS_AREA_CACHEABLE, AS_AREA_UNPAGED); 357 357 if (astart == AS_MAP_FAILED) 358 358 return false; -
uspace/lib/c/generic/thread.c
r1e5d01b r6aeca0d 116 116 void *stack = as_area_create(AS_AREA_ANY, stack_size, 117 117 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE | AS_AREA_GUARD | 118 AS_AREA_LATE_RESERVE );118 AS_AREA_LATE_RESERVE, AS_AREA_UNPAGED); 119 119 if (stack == AS_MAP_FAILED) { 120 120 free(uarg); -
uspace/lib/c/include/as.h
r1e5d01b r6aeca0d 44 44 #define AS_MAP_FAILED ((void *) -1) 45 45 46 #define AS_AREA_UNPAGED -1 47 46 48 static inline size_t SIZE2PAGES(size_t size) 47 49 { … … 57 59 } 58 60 59 extern void *as_area_create(void *, size_t, unsigned int );61 extern void *as_area_create(void *, size_t, unsigned int, int); 60 62 extern int as_area_resize(void *, size_t, unsigned int); 61 63 extern int as_area_change_flags(void *, unsigned int); -
uspace/lib/draw/surface.c
r1e5d01b r6aeca0d 64 64 if (!pixbuf) { 65 65 if ((flags & SURFACE_FLAG_SHARED) == SURFACE_FLAG_SHARED) { 66 pixbuf = (pixel_t *) as_area_create(AS_AREA_ANY, pixbuf_size, 67 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 66 pixbuf = (pixel_t *) as_area_create(AS_AREA_ANY, 67 pixbuf_size, 68 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, 69 AS_AREA_UNPAGED); 68 70 if (pixbuf == AS_MAP_FAILED) { 69 71 free(surface); -
uspace/lib/posix/source/sys/mman.c
r1e5d01b r6aeca0d 54 54 return MAP_FAILED; 55 55 56 return as_area_create(start, length, prot );56 return as_area_create(start, length, prot, AS_AREA_UNPAGED); 57 57 } 58 58 -
uspace/srv/vfs/vfs.c
r1e5d01b r6aeca0d 165 165 */ 166 166 plb = as_area_create(AS_AREA_ANY, PLB_SIZE, 167 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE );167 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, AS_AREA_UNPAGED); 168 168 if (plb == AS_MAP_FAILED) { 169 169 printf("%s: Cannot create address space area\n", NAME);
Note:
See TracChangeset
for help on using the changeset viewer.