-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpi3: Add support for Trusted Board Boot
This patch adds support for TBB to rpi3. The ROTPK is generated at build time and is included into BL1/BL2. The key and content certificates are read over semihosting. Tested-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
- Loading branch information
Showing
5 changed files
with
130 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
.global rpi3_rotpk_hash | ||
.global rpi3_rotpk_hash_end | ||
rpi3_rotpk_hash: | ||
/* DER header */ | ||
.byte 0x30, 0x31, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, 0x48 | ||
.byte 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20 | ||
/* SHA256 */ | ||
.incbin ROTPK_HASH | ||
rpi3_rotpk_hash_end: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include <platform.h> | ||
|
||
extern char rpi3_rotpk_hash[], rpi3_rotpk_hash_end[]; | ||
|
||
int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len, | ||
unsigned int *flags) | ||
{ | ||
*key_ptr = rpi3_rotpk_hash; | ||
*key_len = rpi3_rotpk_hash_end - rpi3_rotpk_hash; | ||
*flags = ROTPK_IS_HASH; | ||
|
||
return 0; | ||
} | ||
|
||
int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr) | ||
{ | ||
*nv_ctr = 0; | ||
|
||
return 0; | ||
} | ||
|
||
int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr) | ||
{ | ||
return 1; | ||
} |