mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-21 03:54:34 +00:00

Use full include paths like it is done for common includes. This cleanup was started in commit d40e0e08283a ("Sanitise includes across codebase"), but it only cleaned common files and drivers. This patch does the same to Arm platforms. Change-Id: If982e6450bbe84dceb56d464e282bcf5d6d9ab9b Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
56 lines
1.1 KiB
C
56 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <errno.h>
|
|
#include <stdint.h>
|
|
|
|
#include <platform_def.h>
|
|
|
|
#include <arch_helpers.h>
|
|
#include <common/debug.h>
|
|
#include <drivers/cfi/v2m_flash.h>
|
|
#include <drivers/console.h>
|
|
#include <plat/arm/common/plat_arm.h>
|
|
#include <plat/common/platform.h>
|
|
|
|
#pragma weak plat_arm_error_handler
|
|
|
|
/*
|
|
* ARM common implementation for error handler
|
|
*/
|
|
void __dead2 plat_arm_error_handler(int err)
|
|
{
|
|
int ret;
|
|
|
|
switch (err) {
|
|
case -ENOENT:
|
|
case -EAUTH:
|
|
/* Image load or authentication error. Erase the ToC */
|
|
INFO("Erasing FIP ToC from flash...\n");
|
|
(void)nor_unlock(PLAT_ARM_FIP_BASE);
|
|
ret = nor_word_program(PLAT_ARM_FIP_BASE, 0);
|
|
if (ret != 0) {
|
|
ERROR("Cannot erase ToC\n");
|
|
} else {
|
|
INFO("Done\n");
|
|
}
|
|
break;
|
|
default:
|
|
/* Unexpected error */
|
|
break;
|
|
}
|
|
|
|
(void)console_flush();
|
|
|
|
/* Loop until the watchdog resets the system */
|
|
for (;;)
|
|
wfi();
|
|
}
|
|
|
|
void __dead2 plat_error_handler(int err)
|
|
{
|
|
plat_arm_error_handler(err);
|
|
}
|