mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-30 16:40:44 +09:00
Pull request for UEFI sub-system for efi-2021-01-rc5
* In the Standalone MM based implementation of UEFI variables check the internal OP-TEE return code -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl/nI30ACgkQxIHbvCwF GsRmxRAAidqMs2iLFE+Q0hulVD7wk0Wo1c+NfkT/ivO76Ea6vwq02d4sIvzz1c3J L+YFzsmOQ0HzT80EYQF7l2eIzKeCebzQMygAQMAo4ZZl7HuMJXGV1z63JrTrHPMa YdzKz6Ogvsv90c5GYCVPMd9p3kfEBQ9IPrSZHDOK0XC4V4Qk1g9PKoF0sQOrtDuw ESkf1wCkoLdqrAIL77pfvraUUt3V7NY4LrHy9AbNj+uh2VIZLQiV0rfg4LzYhEsz NFZawHRYT+Hle3GbA3O+hhIH404/ltoen6ERalfa8JNWpnOOgrW/MGkwtYbG1BE7 Fqthiun6Snko/Do5KjlH4LxHXgIWB2QMJjj3VUsX/GQDTharHOVn0ZBkj6ZKun/p jiqh8Mhxr5OmcLjWM3I+2/N0BY7Y0KnAi8Ny1V49L6aEJSnNWmDQl54LA3f9wEKB d3a3+wW+0WjjfstICier21XSiANm+AUnW8lMUnHT/QHKtoETp4Ui/q9LNisJHUBz JnIPbeAhxdvEL/GRurCESFFVavZ7rajvaJ7V0sHrU2ANejVRhWUd7u0PgNNL2yiy 0r7dhM/xe/ecb8jH1iAV5hbY1Q9xtDSxUMBUAB06IlNojePZ9jW/xbti/yJ5R+ec fmwglVYQxSOxGU3dd/U430kEfCfvP+5qykv+GTz6nRBNSUz2eGQ= =yIz4 -----END PGP SIGNATURE----- Merge tag 'efi-2021-01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-01-rc5 * In the Standalone MM based implementation of UEFI variables check the internal OP-TEE return code
This commit is contained in:
commit
e426e2d936
@ -36,20 +36,29 @@ static int get_connection(struct mm_connection *conn)
|
||||
static const struct tee_optee_ta_uuid uuid = PTA_STMM_UUID;
|
||||
struct udevice *tee = NULL;
|
||||
struct tee_open_session_arg arg;
|
||||
int rc;
|
||||
int rc = -ENODEV;
|
||||
|
||||
tee = tee_find_device(tee, NULL, NULL, NULL);
|
||||
if (!tee)
|
||||
return -ENODEV;
|
||||
goto out;
|
||||
|
||||
memset(&arg, 0, sizeof(arg));
|
||||
tee_optee_ta_uuid_to_octets(arg.uuid, &uuid);
|
||||
rc = tee_open_session(tee, &arg, 0, NULL);
|
||||
if (!rc) {
|
||||
conn->tee = tee;
|
||||
conn->session = arg.session;
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
/* Check the internal OP-TEE result */
|
||||
if (arg.ret != TEE_SUCCESS) {
|
||||
rc = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
conn->tee = tee;
|
||||
conn->session = arg.session;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -88,6 +97,7 @@ static efi_status_t optee_mm_communicate(void *comm_buf, ulong dsize)
|
||||
|
||||
if (tee_shm_register(conn.tee, comm_buf, buf_size, 0, &shm)) {
|
||||
log_err("Unable to register shared memory\n");
|
||||
tee_close_session(conn.tee, conn.session);
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user