Commit fbcd053c authored by kalyanic's avatar kalyanic Committed by Manish Pandey
Browse files

Tegra: verify platform compatibility



This patch verifies that the binary image is compatible with
chip ID of the platform.

Change-Id: I28db221b4442aa8827a092faadf32f110d7c5cb4
Signed-off-by: default avatarkalyanic <kalyanic@nvidia.com>
parent 2b4103f7
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
#include <arch_helpers.h> #include <arch_helpers.h>
#include <assert.h>
#include <common/bl_common.h> #include <common/bl_common.h>
#include <drivers/console.h> #include <drivers/console.h>
#include <lib/xlat_tables/xlat_tables_v2.h> #include <lib/xlat_tables/xlat_tables_v2.h>
...@@ -144,7 +145,8 @@ plat_params_from_bl2_t *plat_get_bl31_plat_params(void) ...@@ -144,7 +145,8 @@ plat_params_from_bl2_t *plat_get_bl31_plat_params(void)
******************************************************************************/ ******************************************************************************/
void plat_early_platform_setup(void) void plat_early_platform_setup(void)
{ {
; /* do nothing */ /* Verify chip id is t132 */
assert(tegra_chipid_is_t132());
} }
/******************************************************************************* /*******************************************************************************
......
...@@ -186,6 +186,9 @@ void plat_early_platform_setup(void) ...@@ -186,6 +186,9 @@ void plat_early_platform_setup(void)
uint64_t impl, val; uint64_t impl, val;
const plat_params_from_bl2_t *plat_params = bl31_get_plat_params(); const plat_params_from_bl2_t *plat_params = bl31_get_plat_params();
/* Verify chip id is t186 */
assert(tegra_chipid_is_t186());
/* sanity check MCE firmware compatibility */ /* sanity check MCE firmware compatibility */
mce_verify_firmware_version(); mce_verify_firmware_version();
......
...@@ -205,6 +205,9 @@ void plat_early_platform_setup(void) ...@@ -205,6 +205,9 @@ void plat_early_platform_setup(void)
uint8_t enable_ccplex_lock_step = params_from_bl2->enable_ccplex_lock_step; uint8_t enable_ccplex_lock_step = params_from_bl2->enable_ccplex_lock_step;
uint64_t actlr_elx; uint64_t actlr_elx;
/* Verify chip id is t194 */
assert(tegra_chipid_is_t194());
/* sanity check MCE firmware compatibility */ /* sanity check MCE firmware compatibility */
mce_verify_firmware_version(); mce_verify_firmware_version();
......
...@@ -165,6 +165,9 @@ void plat_early_platform_setup(void) ...@@ -165,6 +165,9 @@ void plat_early_platform_setup(void)
const plat_params_from_bl2_t *plat_params = bl31_get_plat_params(); const plat_params_from_bl2_t *plat_params = bl31_get_plat_params();
uint64_t val; uint64_t val;
/* Verify chip id is t210 */
assert(tegra_chipid_is_t210());
/* platform parameter passed by the previous bootloader */ /* platform parameter passed by the previous bootloader */
if (plat_params->l2_ecc_parity_prot_dis != 1) { if (plat_params->l2_ecc_parity_prot_dis != 1) {
/* Enable ECC Parity Protection for Cortex-A57 CPUs */ /* Enable ECC Parity Protection for Cortex-A57 CPUs */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment