• Home
  • Raw
  • Download

Lines Matching refs:sd

68 	struct vb2_shared_data *sd = vb2_get_sd(ctx);  in vb2_fail()  local
71 if (!(sd->status & VB2_SD_STATUS_NV_INIT)) in vb2_fail()
75 if (sd->status & VB2_SD_STATUS_CHOSE_SLOT) { in vb2_fail()
88 vb2_nv_set(ctx, VB2_NV_TRY_NEXT, 1 - sd->fw_slot); in vb2_fail()
94 if (sd->last_fw_slot != 1 - sd->fw_slot || in vb2_fail()
95 sd->last_fw_result != VB2_FW_RESULT_FAILURE) in vb2_fail()
117 struct vb2_shared_data *sd = vb2_get_sd(ctx); in vb2_init_context() local
128 if (ctx->workbuf_size < sizeof(*sd)) in vb2_init_context()
134 memset(sd, 0, sizeof(*sd)); in vb2_init_context()
135 ctx->workbuf_used = sizeof(*sd); in vb2_init_context()
141 struct vb2_shared_data *sd = vb2_get_sd(ctx); in vb2_check_recovery() local
147 if (!sd->recovery_reason) in vb2_check_recovery()
148 sd->recovery_reason = vb2_nv_get(ctx, VB2_NV_RECOVERY_REQUEST); in vb2_check_recovery()
151 if (sd->recovery_reason) { in vb2_check_recovery()
164 sd->recovery_reason = VB2_RECOVERY_RO_MANUAL; in vb2_check_recovery()
165 sd->flags |= VB2_SD_FLAG_MANUAL_RECOVERY; in vb2_check_recovery()
169 if (sd->recovery_reason) { in vb2_check_recovery()
172 sd->recovery_reason, in vb2_check_recovery()
179 struct vb2_shared_data *sd = vb2_get_sd(ctx); in vb2_fw_parse_gbb() local
196 sd->gbb_flags = gbb->flags; in vb2_fw_parse_gbb()
197 sd->gbb_rootkey_offset = gbb->rootkey_offset; in vb2_fw_parse_gbb()
198 sd->gbb_rootkey_size = gbb->rootkey_size; in vb2_fw_parse_gbb()
199 memcpy(sd->gbb_hwid_digest, gbb->hwid_digest, VB2_GBB_HWID_DIGEST_SIZE); in vb2_fw_parse_gbb()
206 struct vb2_shared_data *sd = vb2_get_sd(ctx); in vb2_check_dev_switch() local
236 if (sd->gbb_flags & VB2_GBB_FLAG_FORCE_DEV_SWITCH_ON) in vb2_check_dev_switch()
242 sd->flags |= VB2_SD_DEV_MODE_ENABLED; in vb2_check_dev_switch()
317 struct vb2_shared_data *sd = vb2_get_sd(ctx); in vb2_select_fw_slot() local
321 sd->last_fw_slot = vb2_nv_get(ctx, VB2_NV_FW_TRIED); in vb2_select_fw_slot()
322 sd->last_fw_result = vb2_nv_get(ctx, VB2_NV_FW_RESULT); in vb2_select_fw_slot()
325 vb2_nv_set(ctx, VB2_NV_FW_PREV_TRIED, sd->last_fw_slot); in vb2_select_fw_slot()
326 vb2_nv_set(ctx, VB2_NV_FW_PREV_RESULT, sd->last_fw_result); in vb2_select_fw_slot()
332 sd->fw_slot = vb2_nv_get(ctx, VB2_NV_TRY_NEXT); in vb2_select_fw_slot()
337 if (sd->last_fw_result == VB2_FW_RESULT_TRYING && in vb2_select_fw_slot()
338 sd->last_fw_slot == sd->fw_slot && in vb2_select_fw_slot()
344 sd->fw_slot = 1 - sd->fw_slot; in vb2_select_fw_slot()
345 vb2_nv_set(ctx, VB2_NV_TRY_NEXT, sd->fw_slot); in vb2_select_fw_slot()
357 vb2_nv_set(ctx, VB2_NV_FW_TRIED, sd->fw_slot); in vb2_select_fw_slot()
360 if (sd->fw_slot) in vb2_select_fw_slot()
364 sd->status |= VB2_SD_STATUS_CHOSE_SLOT; in vb2_select_fw_slot()