Lines Matching refs:error

90     int error;
104 error = allocman_create(alloc, mspace_dual_pool_make_interface(mspace));
105 if (error) {
138 int error;
139 bootstrap_info_t *bs = allocman_mspace_alloc(alloc, sizeof(bootstrap_info_t), &error);
140 if (error) {
156 int error;
157 new_uts = allocman_mspace_alloc(bs->alloc, sizeof(cspacepath_t) * (bs->num_uts + 1), &error);
158 if (error) {
160 return error;
162 new_size_bits = allocman_mspace_alloc(bs->alloc, sizeof(size_t) * (bs->num_uts + 1), &error);
163 if (error) {
165 return error;
167 new_paddr = allocman_mspace_alloc(bs->alloc, sizeof(uintptr_t) * (bs->num_uts + 1), &error);
168 if (error) {
170 return error;
172 new_isDevice = allocman_mspace_alloc(bs->alloc, sizeof(bool) * (bs->num_uts + 1), &error);
173 if (error) {
175 return error;
201 int error;
203 error = _add_ut(bs, uts[i], size_bits[i], paddr ? paddr[i] : ALLOCMAN_NO_PADDR, isDevice);
204 if (error) {
205 return error;
212 int error;
224 error = _add_ut(bs, slot, size_bits, paddr, bi->untypedList[index].isDevice);
225 if (error) {
226 return error;
235 int error;
248 error = _add_ut(bs, slot, size_bits, paddr, device);
249 if (error) {
250 return error;
263 int error;
271 new_uts = allocman_mspace_alloc(bs->alloc, sizeof(cspacepath_t) * (bs->num_uts - 1), &error);
272 if (error) {
273 return error;
275 new_size_bits = allocman_mspace_alloc(bs->alloc, sizeof(size_t) * (bs->num_uts - 1), & error);
276 if (error) {
277 return error;
279 new_paddr = allocman_mspace_alloc(bs->alloc, sizeof(uintptr_t) * (bs->num_uts - 1), & error);
280 if (error) {
281 return error;
283 new_isDevice = allocman_mspace_alloc(bs->alloc, sizeof(bool) * (bs->num_uts - 1), &error);
284 if (error) {
285 return error;
309 int error;
310 error = seL4_Untyped_Retype(ut.capPtr, seL4_UntypedObject, size, p1.root, p1.dest, p1.destDepth, p1.offset, 1);
311 if (error != seL4_NoError) {
314 error = seL4_Untyped_Retype(ut.capPtr, seL4_UntypedObject, size, p2.root, p2.dest, p2.destDepth, p2.offset, 1);
315 if (error != seL4_NoError) {
322 int error;
323 error = seL4_Untyped_Retype(ut.capPtr, seL4_CapTableObject, sel4_size,
325 if (error != seL4_NoError) {
338 int error;
359 error = _remove_ut(bs, best);
360 if (error) {
361 return error;
367 error = bs->boot_cspace.alloc(bs->alloc, bs->boot_cspace.cspace, &slot1);
368 if (error) {
369 return error;
371 error = bs->boot_cspace.alloc(bs->alloc, bs->boot_cspace.cspace, &slot2);
372 if (error) {
373 return error;
375 error = _split_ut(bs, best_path, slot1, slot2, best_size - 1);
376 if (error) {
377 return error;
383 error = bootstrap_add_untypeds(bs, 1, &slot1, &temp_size, &best_paddr, best_isDevice);
384 if (error) {
385 return error;
391 error = bs->boot_cspace.alloc(bs->alloc, bs->boot_cspace.cspace, slot);
392 if (error) {
393 return error;
395 error = _retype_cnode(bs, best_path, *slot, size);
396 return error;
400 int error;
401 error = allocman_attach_cspace(bs->alloc, cspace);
402 if (error) {
403 return error;
412 int error;
413 cspace = allocman_mspace_alloc(bs->alloc, sizeof(*cspace), &error);
414 if (error) {
416 return error;
418 error = cspace_single_level_create(bs->alloc, cspace, (struct cspace_single_level_config){
425 if (error) {
427 return error;
429 error = bootstrap_use_current_cspace(bs, cspace_single_level_make_interface(cspace));
430 if (error) {
433 return error;
439 int error;
441 error = bootstrap_allocate_cnode(bs, size, &node);
442 if (error) {
443 return error;
447 error = seL4_CNode_Mint(
451 if (error != seL4_NoError) {
456 error = seL4_CNode_Copy(
460 if (error != seL4_NoError) {
464 error = api_tcb_set_space(bs->tcb.capPtr, 0,
468 if (error != seL4_NoError) {
472 cspace = allocman_mspace_alloc(bs->alloc, sizeof(*cspace), &error);
473 if (error) {
474 return error;
476 error = cspace_single_level_create(bs->alloc, cspace, (struct cspace_single_level_config){
482 if (error) {
483 return error;
485 error = allocman_attach_cspace(bs->alloc, cspace_single_level_make_interface(cspace));
486 if (error) {
487 return error;
499 int error;
525 error = seL4_CNode_Copy(slot.root, pos, slot.capDepth,
529 error = seL4_CNode_Move(
533 if (error != seL4_NoError) {
544 int error;
549 error = bootstrap_allocate_cnode(bs, l1size, &l1node);
550 if (error) {
551 return error;
553 error = bootstrap_allocate_cnode(bs, l2size, &l2node);
554 if (error) {
555 return error;
558 error = seL4_CNode_Mint(
562 if (error != seL4_NoError) {
568 error = bootstrap_allocate_cnode(bs, l2size, &l2node);
569 if(error) {
570 return error;
579 error = seL4_CNode_Copy(
583 if (error != seL4_NoError) {
590 error = seL4_CNode_Copy(
594 if (error != seL4_NoError) {
598 error = api_tcb_set_space(bs->tcb.capPtr, 0,
602 if (error != seL4_NoError) {
606 cspace = allocman_mspace_alloc(bs->alloc, sizeof(*cspace), &error);
607 if (error) {
608 return error;
610 error = cspace_two_level_create(bs->alloc, cspace, (struct cspace_two_level_config){
621 if (error) {
622 return error;
624 error = allocman_attach_cspace(bs->alloc, cspace_two_level_make_interface(cspace));
625 if (error) {
626 return error;
656 int error;
659 error = allocman_cspace_alloc(bs->alloc, &slot);
660 if (error) {
661 return error;
663 error = vka_cnode_move(&slot, &bs->uts[i]);
664 if (error != seL4_NoError) {
674 int error;
677 utspace = allocman_mspace_alloc(bs->alloc, sizeof(*utspace), &error);
678 if (error) {
680 return error;
684 error = allocman_attach_utspace(bs->alloc, UTMAN_MAKE_INTERFACE(utspace));
685 if (error) {
686 return error;
690 error = UTMAN_ADD_UTS(bs->alloc, utspace, 1, &bs->uts[i], &bs->ut_size_bits[i], &bs->ut_paddr[i], bs->ut_isDevice[i] ? ALLOCMAN_UT_DEV : ALLOCMAN_UT_KERNEL);
691 if (error) {
693 return error;
716 int error;
719 error = allocman_configure_max_freed_slots(alloc, 10);
720 if (error) {
721 return error;
723 error = allocman_configure_max_freed_memory_chunks(alloc, 20);
724 if (error) {
725 return error;
727 error = allocman_configure_max_freed_untyped_chunks(alloc, 10);
728 if (error) {
729 return error;
731 error = allocman_configure_cspace_reserve(alloc, 30);
732 if (error) {
733 return error;
745 int error;
754 error = bootstrap_use_current_1level_cspace(info, root_cnode, cnode_size, start_slot, end_slot);
755 if (error) {
762 error = bootstrap_create_utspace(info);
763 if (error) {
769 error = _slot_memory_reservations(info->alloc);
770 if (error) {
782 int error;
786 error = bootstrap_move_untypeds(info);
787 if (error) {
791 error = bootstrap_create_utspace(info);
792 if (error) {
797 error = _slot_memory_reservations(info->alloc);
798 if (error) {
812 int error;
816 error = bootstrap_new_1level_cspace(info, cnode_size);
817 if (error) {
826 int error;
838 error = bootstrap_new_2level_cspace(info, l1size, l2size, 2, to_slot.capPtr, total_caps);
841 error = bootstrap_new_2level_cspace(info, l1size, l2size, 2, 1, total_caps);
843 if (error) {
852 error = _cnode_reservation(alloc, l2size);
853 if (error) {
878 int error;
886 error = bootstrap_create_temp_bootinfo_cspace(info, bi);
887 if (error) {
891 error = bootstrap_add_untypeds_from_bootinfo(info, bi);
892 if (error) {
899 int error;
903 *old_cspace = allocman_mspace_alloc(info->alloc, sizeof(**old_cspace), &error);
904 if (error) {
985 int error = allocman_cspace_alloc(alloc, &path);
986 ZF_LOGF_IF(error, "allocman_cspace_alloc failed");
988 ut_space->alloc(alloc, token, next_size_bits, seL4_UntypedObject, &path, base, true, &error);
989 ZF_LOGF_IF(error, "ut_space.alloc failed");
991 error = allocman_utspace_add_uts(alloc, 1, &path, &next_size_bits, &base, untyped_type);
992 ZF_LOGF_IF(error, "allocman_utspace_add_uts failed");
1008 * @return 0 for success, otherwise error.
1012 int error;
1050 error = allocman_utspace_add_uts(alloc, 1, path, &size_bits, &paddr, ALLOCMAN_UT_DEV);
1051 ZF_LOGF_IF(error, "allocman_utspace_add_uts failed");
1086 * @return 0 for success, otherwise error.
1089 int error;
1090 add_untypeds_state_t *state = allocman_mspace_alloc(alloc, sizeof(add_untypeds_state_t), &error);
1091 ZF_LOGF_IF(error, "Failed to allocate add_untypeds_state_t");
1103 state->regions = allocman_mspace_alloc(alloc, sizeof(pmem_region_t) * num_regions, &error);
1117 int error = prepare_handle_device_untyped_cap(alloc, simple, &state, num_regions, region_list);
1118 ZF_LOGF_IF(error, "bootstrap_prepare_handle_device_untyped_cap Failed");
1131 error = allocman_utspace_add_uts(alloc, 1, &path, &size_bits, &paddr, dev_type);
1132 ZF_LOGF_IF(error, "Could not add kernel untyped.");
1135 error = handle_device_untyped_cap(state, paddr, size_bits, &path, alloc);
1136 ZF_LOGF_IF(error, "bootstrap_arch_handle_device_untyped_cap failed.");
1151 int error;
1158 error = allocman_add_simple_untypeds(allocman, simple);
1159 if (error) {
1169 int error;
1208 error = bootstrap_transfer_caps_simple(bootstrap, simple, levels);
1209 if(error) {
1229 int error;
1238 error = allocman_utspace_add_uts(alloc, 1, &slot, &size_bits, &paddr, bi->untypedList[index].isDevice ? ALLOCMAN_UT_DEV : ALLOCMAN_UT_KERNEL);
1239 if (error) {
1240 return error;
1248 int error;
1260 error = allocman_add_bootinfo_untypeds(alloc, bi);
1261 if (error) {