Changeset fbcdeb8 in mainline for uspace/srv
- Timestamp:
- 2011-12-19T17:30:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 58f6229
- Parents:
- 24cf31f1
- Location:
- uspace/srv
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/ata_bd/ata_bd.c
r24cf31f1 rfbcdeb8 309 309 } 310 310 311 fs_va = as_get_mappable_page(comm_size);312 if (fs_va == NULL) {311 (void) async_share_out_finalize(callid, &fs_va); 312 if (fs_va == (void *) -1) { 313 313 async_answer_0(callid, EHANGUP); 314 314 return; 315 315 } 316 317 (void) async_share_out_finalize(callid, fs_va);318 316 319 317 while (true) { -
uspace/srv/bd/file_bd/file_bd.c
r24cf31f1 rfbcdeb8 190 190 } 191 191 192 fs_va = as_get_mappable_page(comm_size);193 if (fs_va == NULL) {192 (void) async_share_out_finalize(callid, &fs_va); 193 if (fs_va == (void *) -1) { 194 194 async_answer_0(callid, EHANGUP); 195 195 return; 196 196 } 197 198 (void) async_share_out_finalize(callid, fs_va);199 197 200 198 while (true) { -
uspace/srv/bd/gxe_bd/gxe_bd.c
r24cf31f1 rfbcdeb8 193 193 } 194 194 195 fs_va = as_get_mappable_page(comm_size);196 if (fs_va == NULL) {195 (void) async_share_out_finalize(callid, &fs_va); 196 if (fs_va == (void *) -1) { 197 197 async_answer_0(callid, EHANGUP); 198 198 return; 199 199 } 200 201 (void) async_share_out_finalize(callid, fs_va);202 200 203 201 while (true) { -
uspace/srv/bd/part/guid_part/guid_part.c
r24cf31f1 rfbcdeb8 348 348 } 349 349 350 fs_va = as_get_mappable_page(comm_size);351 if (fs_va == NULL) {350 (void) async_share_out_finalize(callid, &fs_va); 351 if (fs_va == (void *) -1) { 352 352 async_answer_0(callid, EHANGUP); 353 353 return; 354 354 } 355 356 (void) async_share_out_finalize(callid, fs_va);357 355 358 356 while (true) { -
uspace/srv/bd/part/mbr_part/mbr_part.c
r24cf31f1 rfbcdeb8 425 425 } 426 426 427 fs_va = as_get_mappable_page(comm_size);428 if (fs_va == NULL) {427 (void) async_share_out_finalize(callid, &fs_va); 428 if (fs_va == (void *) -1) { 429 429 async_answer_0(callid, EHANGUP); 430 430 return; 431 431 } 432 433 (void) async_share_out_finalize(callid, fs_va);434 432 435 433 while (1) { -
uspace/srv/bd/rd/rd.c
r24cf31f1 rfbcdeb8 105 105 unsigned int flags; 106 106 if (async_share_out_receive(&callid, &comm_size, &flags)) { 107 fs_va = as_get_mappable_page(comm_size); 108 if (fs_va) { 109 (void) async_share_out_finalize(callid, fs_va); 110 } else { 107 (void) async_share_out_finalize(callid, &fs_va); 108 if (fs_va == (void *) -1) { 111 109 async_answer_0(callid, EHANGUP); 112 110 return; … … 224 222 225 223 rd_size = ALIGN_UP(size, block_size); 226 rd_addr = as_get_mappable_page(rd_size);227 228 224 unsigned int flags = 229 225 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE; 230 ret = physmem_map((void *) addr_phys, rd_addr, 231 ALIGN_UP(rd_size, PAGE_SIZE) >> PAGE_WIDTH, flags); 232 if (ret < 0) { 226 227 ret = physmem_map((void *) addr_phys, 228 ALIGN_UP(rd_size, PAGE_SIZE) >> PAGE_WIDTH, flags, &rd_addr); 229 if (ret != EOK) { 233 230 printf("%s: Error mapping RAM disk\n", NAME); 234 231 return false; -
uspace/srv/hid/fb/fb.c
r24cf31f1 rfbcdeb8 304 304 } 305 305 306 frontbuf->data = as_get_mappable_page(frontbuf->size); 307 int rc = async_answer_1(callid, EOK, (sysarg_t) frontbuf->data); 308 if (rc != EOK) { 306 int rc = async_share_out_finalize(callid, &frontbuf->data); 307 if ((rc != EOK) || (frontbuf->data == (void *) -1)) { 309 308 free(frontbuf); 310 309 async_answer_0(iid, ENOMEM); … … 348 347 } 349 348 350 imagemap->data = as_get_mappable_page(imagemap->size); 351 int rc = async_answer_1(callid, EOK, (sysarg_t) imagemap->data); 352 if (rc != EOK) { 349 int rc = async_share_out_finalize(callid, &imagemap->data); 350 if ((rc != EOK) || (imagemap->data == (void *) -1)) { 353 351 free(imagemap); 354 352 async_answer_0(iid, ENOMEM); -
uspace/srv/hid/fb/port/ega.c
r24cf31f1 rfbcdeb8 280 280 281 281 ega.size = (width * height) << 1; 282 ega.addr = as_get_mappable_page(ega.size); 283 if (ega.addr == NULL) 284 return ENOMEM; 285 286 rc = physmem_map((void *) paddr, ega.addr, 287 ALIGN_UP(ega.size, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE); 282 283 rc = physmem_map((void *) paddr, 284 ALIGN_UP(ega.size, PAGE_SIZE) >> PAGE_WIDTH, 285 AS_AREA_READ | AS_AREA_WRITE, (void *) &ega.addr); 288 286 if (rc != EOK) 289 287 return rc; -
uspace/srv/hid/fb/port/kchar.c
r24cf31f1 rfbcdeb8 83 83 return rc; 84 84 85 kchar.addr = as_get_mappable_page(1); 86 if (kchar.addr == NULL) 87 return ENOMEM; 88 89 rc = physmem_map((void *) paddr, kchar.addr, 90 ALIGN_UP(1, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE); 85 rc = physmem_map((void *) paddr, 86 ALIGN_UP(1, PAGE_SIZE) >> PAGE_WIDTH, 87 AS_AREA_READ | AS_AREA_WRITE, (void *) &kchar.addr); 91 88 if (rc != EOK) 92 89 return rc; -
uspace/srv/hid/fb/port/kfb.c
r24cf31f1 rfbcdeb8 756 756 757 757 kfb.size = scanline * height; 758 kfb.addr = as_get_mappable_page(kfb.size); 759 if (kfb.addr == NULL) { 760 free(kfb.glyphs); 761 return ENOMEM; 762 } 763 764 rc = physmem_map((void *) paddr + offset, kfb.addr, 765 ALIGN_UP(kfb.size, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE); 758 759 rc = physmem_map((void *) paddr + offset, 760 ALIGN_UP(kfb.size, PAGE_SIZE) >> PAGE_WIDTH, 761 AS_AREA_READ | AS_AREA_WRITE, (void *) &kfb.addr); 766 762 if (rc != EOK) { 767 763 free(kfb.glyphs); -
uspace/srv/hid/fb/port/niagara.c
r24cf31f1 rfbcdeb8 103 103 return rc; 104 104 105 niagara.fifo = 106 (output_fifo_t *) as_get_mappable_page(sizeof(output_fifo_t)); 107 if (niagara.fifo == NULL) 108 return ENOMEM; 109 110 rc = physmem_map((void *) paddr, (void *) niagara.fifo, 1, 111 AS_AREA_READ | AS_AREA_WRITE); 105 rc = physmem_map((void *) paddr, 1, 106 AS_AREA_READ | AS_AREA_WRITE, (void *) &niagara.fifo); 112 107 if (rc != EOK) 113 108 return rc; -
uspace/srv/hid/input/port/niagara.c
r24cf31f1 rfbcdeb8 63 63 #define POLL_INTERVAL 10000 64 64 65 /**66 * Virtual address mapped to the buffer shared with the kernel counterpart.67 */68 static uintptr_t input_buffer_addr;69 70 65 /* 71 66 * Kernel counterpart of the driver pushes characters (it has read) here. … … 102 97 return -1; 103 98 104 input_buffer_addr = (uintptr_t) as_get_mappable_page(PAGE_SIZE); 105 int rc = physmem_map((void *) paddr, (void *) input_buffer_addr, 106 1, AS_AREA_READ | AS_AREA_WRITE); 107 99 int rc = physmem_map((void *) paddr, 1, 100 AS_AREA_READ | AS_AREA_WRITE, (void *) &input_buffer); 108 101 if (rc != 0) { 109 102 printf("Niagara: uspace driver couldn't map physical memory: %d\n", … … 111 104 return rc; 112 105 } 113 114 input_buffer = (input_buffer_t) input_buffer_addr;115 106 116 107 thread_id_t tid; -
uspace/srv/hw/irc/obio/obio.c
r24cf31f1 rfbcdeb8 124 124 125 125 base_phys = (void *) paddr; 126 base_virt = as_get_mappable_page(OBIO_SIZE);127 126 128 127 int flags = AS_AREA_READ | AS_AREA_WRITE; 129 int retval = physmem_map(base_phys, (void *) base_virt,130 ALIGN_UP(OBIO_SIZE, PAGE_SIZE) >> PAGE_WIDTH, flags );128 int retval = physmem_map(base_phys, 129 ALIGN_UP(OBIO_SIZE, PAGE_SIZE) >> PAGE_WIDTH, flags, &base_virt); 131 130 132 131 if (retval < 0) { -
uspace/srv/vfs/vfs.c
r24cf31f1 rfbcdeb8 172 172 * Allocate and initialize the Path Lookup Buffer. 173 173 */ 174 plb = as_get_mappable_page(PLB_SIZE); 175 if (!plb) { 176 printf(NAME ": Cannot allocate a mappable piece of address space\n"); 177 return ENOMEM; 178 } 179 180 if (as_area_create(plb, PLB_SIZE, AS_AREA_READ | AS_AREA_WRITE | 181 AS_AREA_CACHEABLE) != plb) { 174 plb = as_area_create((void *) -1, PLB_SIZE, 175 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 176 if (plb == (void *) -1) { 182 177 printf(NAME ": Cannot create address space area\n"); 183 178 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.