Commit fd2b83defa3657086ed4db59a027779f7fe6db82

Authored by Yu Shan
Committed by Ji Luo
1 parent 4ecf3a4c27

[iot] No touch RPMB when use Trusty

Since Trusty OS will hand RPMB so no touch
the RPMB partition.

Change-Id: I07ed0e4a024171f6b353b038723ccd6e66a00d54
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

lib/avb/fsl/fsl_avbkey.c
... ... @@ -279,6 +279,7 @@
279 279 static int rpmb_read(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_t offset);
280 280 static int rpmb_write(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_t offset);
281 281  
  282 +#ifndef CONFIG_IMX_TRUSTY_OS
282 283 static int rpmb_init(void) {
283 284 int i;
284 285 kblb_hdr_t hdr;
... ... @@ -353,6 +354,7 @@
353 354  
354 355 return 0;
355 356 }
  357 +#endif
356 358  
357 359 static void fill_secure_keyslot_package(struct keyslot_package *kp) {
358 360  
359 361  
... ... @@ -518,8 +520,10 @@
518 520 printf("keyslot package magic error. Will generate new one\n");
519 521 gen_rpmb_key(&kp);
520 522 }
  523 +#ifndef CONFIG_IMX_TRUSTY_OS
521 524 if (rpmb_init())
522 525 return RESULT_ERROR;
  526 +#endif
523 527 #if defined(CONFIG_AVB_ATX) && !defined(CONFIG_IMX_TRUSTY_OS)
524 528 if (init_permanent_attributes_fuse())
525 529 return RESULT_ERROR;