Lines Matching refs:idx

124                     if (((bs->idx - BOOT_STATUS_IDX_0) > last_idx ||
125 ((bs->idx - BOOT_STATUS_IDX_0) == last_idx &&
134 if ((bs->idx - BOOT_STATUS_IDX_0) > last_idx ||
135 ((bs->idx - BOOT_STATUS_IDX_0) == last_idx &&
146 if ((bs->idx > BOOT_STATUS_IDX_0 ||
147 (bs->idx == BOOT_STATUS_IDX_0 && bs->state == BOOT_STATUS_STATE_1)) &&
148 bs->idx <= last_idx) {
156 if (bs->idx > BOOT_STATUS_IDX_0) {
294 bs->idx = (found_idx / BOOT_STATUS_SWAP_STATE_COUNT) + BOOT_STATUS_IDX_0;
307 off = (bs->idx - BOOT_STATUS_IDX_0) * idx_sz +
455 static void boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, argument
465 pri_off = boot_img_sector_off(state, BOOT_PRIMARY_SLOT, idx);
466 sec_off = boot_img_sector_off(state, BOOT_SECONDARY_SLOT, idx);
467 sec_up_off = boot_img_sector_off(state, BOOT_PRIMARY_SLOT, (idx + 1));
507 bs->idx++;
513 static void boot_swap_sectors_revert(int idx, uint32_t sz, struct boot_loader_state *state, argument
526 pri_off = boot_img_sector_off(state, BOOT_PRIMARY_SLOT, idx);
527 sec_off = boot_img_sector_off(state, BOOT_SECONDARY_SLOT, idx + 1);
528 sec_up_off = boot_img_sector_off(state, BOOT_PRIMARY_SLOT, idx);
568 bs->idx++;
596 bs->idx != BOOT_STATUS_IDX_0) {
622 uint32_t idx; local
673 if (bs->idx == BOOT_STATUS_IDX_0) {
689 idx = 0;
701 while (idx <= last_idx) {
702 if (idx >= (bs->idx - BOOT_STATUS_IDX_0)) {
703 uint32_t mirror_idx = last_idx - idx;
711 idx++;
724 while (idx <= last_idx) {
725 if (idx >= (bs->idx - BOOT_STATUS_IDX_0)) {
726 boot_swap_sectors(idx, sector_sz, state, bs, fap_pri, fap_sec,
727 (idx > used_sectors_pri ? true : false),
728 (idx > used_sectors_sec ? true : false));
731 idx++;