Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 975491be authored by Wenhao Wang's avatar Wenhao Wang
Browse files

rpmb_dev: Fix RPMB_REQ_DATA_READ command

Add ".check_key_programmed = true." for RPMB_REQ_DATA_READ such that
we can check whether the rpmb key has been programmed before executing
RPMB_REQ_DATA_READ command.

"JEDEC STANDARD Universal Flash Storage (UFS) Version 3.0" specifies
that data access before the key has been programmed should return
“Authentication Key not yet programmed” (0007h)..

Bug: 152901318
Test: Trusty storage tests
Change-Id: I4759fbce5f37234090a22a1d9dc3b38072f6ecaf
parent fcaed0ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -283,6 +283,7 @@ static struct rpmb_dev_cmd rpmb_dev_cmd_table[] = {
                {
                        .func = rpmb_dev_data_read,
                        .resp = RPMB_RESP_DATA_READ,
                        .check_key_programmed = true,
                        .check_addr = true,
                        .multi_packet_res = true,
                        .res_mac = true,