/seL4-refos-master/apps/file_server/src/ |
H A D | dataspace.c | 42 @param oat The parent struct fs_dataspace_table structure of dspace object being created. 88 @param oat The parent struct fs_dataspace_table structure of dspace object being deleted. 95 struct fs_dataspace *dspace = (struct fs_dataspace *) obj; local 96 assert(dspace && dspace->magic == FS_DATASPACE_MAGIC); 97 dprintf("Deleting dataspace ID %d\n", dspace->dID); 99 assert(dspace->dataspaceCap); 100 seL4_CNode_Revoke(REFOS_CSPACE, dspace->dataspaceCap, REFOS_CDEPTH); 101 csfree_delete(dspace->dataspaceCap); 104 free(dspace); [all...] |
/seL4-refos-master/apps/file_server/src/dispatchers/ |
H A D | cpio_dspace.c | 172 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_dspace_fd); local 173 if (!dspace) { 177 assert(dspace->magic == FS_DATASPACE_MAGIC); 178 assert(dspace->fileData); 180 if (rpc_offset >= dspace->fileDataSize) { 183 uint32_t count = MIN(dspace->fileDataSize - rpc_offset, rpc_buf.count); 184 memcpy(rpc_buf.data, dspace->fileData + rpc_offset, count); 203 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_dspace_fd); local 204 if (!dspace) { 208 assert(dspace 262 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_dspace_fd); local 294 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, dataspaceBadge); local 382 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_srcDataspace); local [all...] |
H A D | fault_notify.c | 76 struct fs_dataspace* dspace = dspace_get(&fileServ.dspaceTable, dwa->dataspaceID); local 77 if (!dspace) { 97 if (dspace->fileData) { 151 dspace->fileDataSize - dataspaceSkipWinOffset - dwa->dataspaceOffset); 155 if ((dspace->fileDataSize - dataspaceSkipWinOffset - dwa->dataspaceOffset > 156 dspace->fileDataSize) || 157 (dspace->fileDataSize - dataspaceSkipWinOffset > dspace->fileDataSize) || 158 (dspace->fileDataSize - dwa->dataspaceOffset > dspace 221 struct fs_dataspace* dspace = dspace_get(&fileServ.dspaceTable, dda->dataspaceID); local [all...] |
/seL4-refos-master/apps/process_server/src/dispatchers/ |
H A D | data_syscall.c | 97 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 98 if (!dspace) { 104 w_purge_dspace(&procServ.windowList, dspace); 107 pid_iterate(&procServ.PIDList, proc_dspace_delete_callback, (void*) dspace); 110 if (dspace->ref != 1) { 111 ROS_WARNING("Dataspace reference is %d and not 1.", dspace->ref); 116 ram_dspace_unref(&procServ.dspaceList, dspace->ID); 147 ROS_ERROR("bad dspace capability.\n"); 156 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 157 if (!dspace) { 181 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 217 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 307 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 368 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local [all...] |
H A D | fault_handler.c | 137 struct ram_dspace *dspace = window->ramDataspace; local 138 assert(dspace && dspace->magic == RAM_DATASPACE_MAGIC); 140 dvprintf("# PID %d VM fault ������������������ anon RAM dspace %d\n", f->pcb->pid, dspace->ID); 142 if (dspace->contentInitEnabled) { 144 int contentInitState = ram_dspace_need_content_init(dspace, dspaceOffset); 157 assert(dspace->contentInitPID != PID_NULL); 158 struct proc_pcb* cinitPCB = pid_get_pcb(&procServ.PIDList, dspace->contentInitPID); 163 if (!dspace [all...] |
H A D | mem_syscall.c | 292 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dataspace); local 293 if (!dspace) { 298 return proc_set_notificationbuffer(pcb, dspace);
|
/seL4-refos-master/apps/process_server/src/system/memserv/ |
H A D | dataspace.c | 104 find any windows associated with this dspace, and unmap it and set back to EMPTY. 115 assert(!"RAM dspace hanging reference. Process server bug."); 211 struct ram_dspace *dspace = ram_dspace_get(rdslist, i); local 212 if (dspace) { 213 assert(dspace->magic == RAM_DATASPACE_MAGIC); 214 dspace->ref--; 225 struct ram_dspace *dspace= NULL; local 229 int ID = coat_alloc(&rdslist->allocTable, arg, (cvector_item_t *) &dspace); 234 assert(dspace && dspace 241 struct ram_dspace *dspace = ram_dspace_get(rdslist, ID); local 254 struct ram_dspace *dspace = ram_dspace_get(rdslist, ID); local 319 struct ram_dspace* dspace = (struct ram_dspace*) coat_get(&rdslist->allocTable, ID); local [all...] |
H A D | window.c | 228 w_set_anon_dspace(struct w_window *window, struct ram_dspace *dspace, vaddr_t offset) argument 231 if (!dspace) { 235 assert(dspace->magic = RAM_DATASPACE_MAGIC); 237 window->ramDataspace = dspace; 239 ram_dspace_ref(dspace->parentList, dspace->ID); 243 w_purge_dspace(struct w_list *wlist, struct ram_dspace *dspace) argument 250 if (window->ramDataspace == dspace || (window->ramDataspace->parentList == 251 dspace->parentList && window->ramDataspace->ID == dspace [all...] |
H A D | window.h | 204 @param dspace The internal RAM dataspace to set the window to (Shares ownership). 209 void w_set_anon_dspace(struct w_window *window, struct ram_dspace *dspace, vaddr_t offset); 218 @param dspace The internal RAM dataspace to purge all references to. (No ownership) 220 void w_purge_dspace(struct w_list *wlist, struct ram_dspace *dspace);
|
/seL4-refos-master/apps/process_server/src/system/process/ |
H A D | process.c | 483 struct ram_dspace *dspace = (struct ram_dspace *) cookie; local 484 assert(dspace && dspace->magic == RAM_DATASPACE_MAGIC); 487 if (p->paramBuffer == dspace || (p->paramBuffer->parentList == dspace->parentList && 488 p->paramBuffer->ID == dspace->ID)) { 496 if (p->notificationBuffer->dataspace == dspace || 497 (p->notificationBuffer->dataspace->parentList == dspace->parentList && 498 p->notificationBuffer->dataspace->ID == dspace->ID) ) {
|
/seL4-refos-master/apps/process_server/src/test/ |
H A D | test_memserv.c | 190 tvprintf(" Testing that dspace ID %d get still works...\n", testDSpace[i]->ID); 198 tvprintf(" Testing that dspace ID %d get returns NULL...\n", i + 1); 366 struct ram_dspace *dspace = ram_dspace_create(&rlist, npages * REFOS_PAGE_SIZE); local 367 test_assert(dspace != NULL); 368 test_assert(dspace->magic == RAM_DATASPACE_MAGIC); 370 int error = ram_dspace_need_content_init(dspace, 0x1000); 374 error = ram_dspace_content_init(dspace, dummyEP, 0x54); 378 error = ram_dspace_need_content_init(dspace, npages * REFOS_PAGE_SIZE + 0x35); 381 int val = ram_dspace_need_content_init(dspace, i * REFOS_PAGE_SIZE); 383 ram_dspace_set_content_init_provided(dspace, [all...] |
/seL4-refos-master/apps/test_os/src/ |
H A D | test_fileserv.c | 71 test_start("fs cpio dspace datamap"); 89 seL4_CPtr dspace = data_open(fileservSession, "hello.txt", 0, O_RDWR, 0, &error); local 90 test_assert(dspace && error == ESUCCESS); 93 error = data_datamap(fileservSession, dspace, tempWindow, 3); 101 test_start("fs cpio dspace init_data"); 108 error = data_init_data(fileservSession, anonDS, dspace , 3);
|
/seL4-refos-master/libs/librefossys/src/refos-io/ |
H A D | filetable.c | 41 seL4_CPtr dspace; member in struct:fd_table_entry_dataspace_s 94 if (e->connection.serverSession && e->dspace) { 95 refos_err_t error = data_close(e->connection.serverSession, e->dspace); 97 printf("filetable_oat_delete error: couldn't close dspace.\n"); 100 csfree_delete(e->dspace); 101 e->dspace = 0; 174 e->dspace = data_open(e->connection.serverSession, 176 if (error || !e->dspace) { 181 e->dspaceSize = data_get_size(e->connection.serverSession, e->dspace); 301 assert(fdEntry->dspace); [all...] |
H A D | mmap_segment.c | 68 seL4_DebugPrintf("mmap_segment_fill: Could not create anon dspace.\n"); 76 seL4_DebugPrintf("mmap_segment_fill: Could not map anon dspace.\n"); 129 seL4_CPtr dspace = proc_get_mem_window_dspace(window, &refos_err); local 134 if (dspace) { 135 int error = data_close(REFOS_PROCSERV_EP, dspace); 139 csfree_delete(dspace);
|
/seL4-refos-master/projects/refos/impl/apps/file_server/src/ |
H A D | dataspace.c | 42 @param oat The parent struct fs_dataspace_table structure of dspace object being created. 88 @param oat The parent struct fs_dataspace_table structure of dspace object being deleted. 95 struct fs_dataspace *dspace = (struct fs_dataspace *) obj; local 96 assert(dspace && dspace->magic == FS_DATASPACE_MAGIC); 97 dprintf("Deleting dataspace ID %d\n", dspace->dID); 99 assert(dspace->dataspaceCap); 100 seL4_CNode_Revoke(REFOS_CSPACE, dspace->dataspaceCap, REFOS_CDEPTH); 101 csfree_delete(dspace->dataspaceCap); 104 free(dspace); [all...] |
/seL4-refos-master/projects/refos/impl/apps/file_server/src/dispatchers/ |
H A D | cpio_dspace.c | 172 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_dspace_fd); local 173 if (!dspace) { 177 assert(dspace->magic == FS_DATASPACE_MAGIC); 178 assert(dspace->fileData); 180 if (rpc_offset >= dspace->fileDataSize) { 183 uint32_t count = MIN(dspace->fileDataSize - rpc_offset, rpc_buf.count); 184 memcpy(rpc_buf.data, dspace->fileData + rpc_offset, count); 203 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_dspace_fd); local 204 if (!dspace) { 208 assert(dspace 262 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_dspace_fd); local 294 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, dataspaceBadge); local 382 struct fs_dataspace* dspace = dspace_get_badge(&fileServ.dspaceTable, rpc_srcDataspace); local [all...] |
H A D | fault_notify.c | 76 struct fs_dataspace* dspace = dspace_get(&fileServ.dspaceTable, dwa->dataspaceID); local 77 if (!dspace) { 97 if (dspace->fileData) { 151 dspace->fileDataSize - dataspaceSkipWinOffset - dwa->dataspaceOffset); 155 if ((dspace->fileDataSize - dataspaceSkipWinOffset - dwa->dataspaceOffset > 156 dspace->fileDataSize) || 157 (dspace->fileDataSize - dataspaceSkipWinOffset > dspace->fileDataSize) || 158 (dspace->fileDataSize - dwa->dataspaceOffset > dspace 221 struct fs_dataspace* dspace = dspace_get(&fileServ.dspaceTable, dda->dataspaceID); local [all...] |
/seL4-refos-master/projects/refos/impl/apps/process_server/src/dispatchers/ |
H A D | data_syscall.c | 97 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 98 if (!dspace) { 104 w_purge_dspace(&procServ.windowList, dspace); 107 pid_iterate(&procServ.PIDList, proc_dspace_delete_callback, (void*) dspace); 110 if (dspace->ref != 1) { 111 ROS_WARNING("Dataspace reference is %d and not 1.", dspace->ref); 116 ram_dspace_unref(&procServ.dspaceList, dspace->ID); 147 ROS_ERROR("bad dspace capability.\n"); 156 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 157 if (!dspace) { 181 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 217 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 307 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local 368 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dspace_fd); local [all...] |
H A D | fault_handler.c | 137 struct ram_dspace *dspace = window->ramDataspace; local 138 assert(dspace && dspace->magic == RAM_DATASPACE_MAGIC); 140 dvprintf("# PID %d VM fault ������������������ anon RAM dspace %d\n", f->pcb->pid, dspace->ID); 142 if (dspace->contentInitEnabled) { 144 int contentInitState = ram_dspace_need_content_init(dspace, dspaceOffset); 157 assert(dspace->contentInitPID != PID_NULL); 158 struct proc_pcb* cinitPCB = pid_get_pcb(&procServ.PIDList, dspace->contentInitPID); 163 if (!dspace [all...] |
H A D | mem_syscall.c | 292 struct ram_dspace *dspace = ram_dspace_get_badge(&procServ.dspaceList, rpc_dataspace); local 293 if (!dspace) { 298 return proc_set_notificationbuffer(pcb, dspace);
|
/seL4-refos-master/projects/refos/impl/apps/process_server/src/system/memserv/ |
H A D | dataspace.c | 104 find any windows associated with this dspace, and unmap it and set back to EMPTY. 115 assert(!"RAM dspace hanging reference. Process server bug."); 211 struct ram_dspace *dspace = ram_dspace_get(rdslist, i); local 212 if (dspace) { 213 assert(dspace->magic == RAM_DATASPACE_MAGIC); 214 dspace->ref--; 225 struct ram_dspace *dspace= NULL; local 229 int ID = coat_alloc(&rdslist->allocTable, arg, (cvector_item_t *) &dspace); 234 assert(dspace && dspace 241 struct ram_dspace *dspace = ram_dspace_get(rdslist, ID); local 254 struct ram_dspace *dspace = ram_dspace_get(rdslist, ID); local 319 struct ram_dspace* dspace = (struct ram_dspace*) coat_get(&rdslist->allocTable, ID); local [all...] |
H A D | window.c | 228 w_set_anon_dspace(struct w_window *window, struct ram_dspace *dspace, vaddr_t offset) argument 231 if (!dspace) { 235 assert(dspace->magic = RAM_DATASPACE_MAGIC); 237 window->ramDataspace = dspace; 239 ram_dspace_ref(dspace->parentList, dspace->ID); 243 w_purge_dspace(struct w_list *wlist, struct ram_dspace *dspace) argument 250 if (window->ramDataspace == dspace || (window->ramDataspace->parentList == 251 dspace->parentList && window->ramDataspace->ID == dspace [all...] |
H A D | window.h | 204 @param dspace The internal RAM dataspace to set the window to (Shares ownership). 209 void w_set_anon_dspace(struct w_window *window, struct ram_dspace *dspace, vaddr_t offset); 218 @param dspace The internal RAM dataspace to purge all references to. (No ownership) 220 void w_purge_dspace(struct w_list *wlist, struct ram_dspace *dspace);
|
/seL4-refos-master/projects/refos/impl/apps/process_server/src/system/process/ |
H A D | process.c | 483 struct ram_dspace *dspace = (struct ram_dspace *) cookie; local 484 assert(dspace && dspace->magic == RAM_DATASPACE_MAGIC); 487 if (p->paramBuffer == dspace || (p->paramBuffer->parentList == dspace->parentList && 488 p->paramBuffer->ID == dspace->ID)) { 496 if (p->notificationBuffer->dataspace == dspace || 497 (p->notificationBuffer->dataspace->parentList == dspace->parentList && 498 p->notificationBuffer->dataspace->ID == dspace->ID) ) {
|
/seL4-refos-master/projects/refos/impl/apps/process_server/src/test/ |
H A D | test_memserv.c | 190 tvprintf(" Testing that dspace ID %d get still works...\n", testDSpace[i]->ID); 198 tvprintf(" Testing that dspace ID %d get returns NULL...\n", i + 1); 366 struct ram_dspace *dspace = ram_dspace_create(&rlist, npages * REFOS_PAGE_SIZE); local 367 test_assert(dspace != NULL); 368 test_assert(dspace->magic == RAM_DATASPACE_MAGIC); 370 int error = ram_dspace_need_content_init(dspace, 0x1000); 374 error = ram_dspace_content_init(dspace, dummyEP, 0x54); 378 error = ram_dspace_need_content_init(dspace, npages * REFOS_PAGE_SIZE + 0x35); 381 int val = ram_dspace_need_content_init(dspace, i * REFOS_PAGE_SIZE); 383 ram_dspace_set_content_init_provided(dspace, [all...] |