sept: validate ccplex reset vector

This commit is contained in:
Michael Scire
2019-06-19 00:32:04 -07:00
parent 6829572556
commit b82d8aaba9
4 changed files with 29 additions and 68 deletions

View File

@@ -22,6 +22,7 @@
#include "se.h"
#include "pmc.h"
#include "emc.h"
#include "sysreg.h"
#include "key_derivation.h"
#include "timers.h"
#include "fs_utils.h"
@@ -96,9 +97,6 @@ static void setup_env(void) {
/* Initialize hardware. */
nx_hwinit();
/* Check for panics. */
check_and_display_panic();
/* Zero-fill the framebuffer and register it as printk provider. */
video_init(g_framebuffer);
@@ -141,6 +139,11 @@ int sept_main(uint32_t version) {
uint32_t stage2_version = 0;
ScreenLogLevel log_level = SCREEN_LOG_LEVEL_NONE;
/* Validate that we can safely boot the CCPLEX. */
if (SB_CSR_0 & 2) {
generic_panic();
}
/* Extract keys from the security engine, which TSEC FW locked down. */
exfiltrate_keys_and_reboot_if_needed(version);