Skip to content

Commit 5365eb2

Browse files
committed
fix(sepsim): my get_nonce_word was incomplete, whoops. :-(
1 parent 61d5d2e commit 5365eb2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

hw/arm/apple-silicon/sep-sim.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,11 @@ static void apple_sep_sim_handle_bootstrap_msg(AppleSEPSimState *s,
527527
break;
528528
case BOOTSTRAP_OP_GET_NONCE_WORD:
529529
qemu_log_mask(LOG_GUEST_ERROR, "EP_BOOTSTRAP: GET_NONCE_WORD\n");
530+
// param is the index (not offset), and needs to be returned
530531

531532
qemu_guest_getrandom(&randval, sizeof(randval), NULL);
532533
apple_sep_sim_send_message(s, EP_BOOTSTRAP, msg->tag,
533-
BOOTSTRAP_OP_NONCE_WORD_REPLY, 0, randval);
534+
BOOTSTRAP_OP_NONCE_WORD_REPLY, msg->param, randval);
534535
break;
535536
case BOOTSTRAP_OP_CHECK_TZ0:
536537
qemu_log_mask(LOG_GUEST_ERROR, "EP_BOOTSTRAP: CHECK_TZ0\n");

0 commit comments

Comments
 (0)