blob: 9deecdf11cc15462d60bc26a6f45ac31e070c45c [file] [log] [blame]
/*
* Copyright (c) 2019 Lexmark International, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <kernel.h>
#include <device.h>
#include <init.h>
/**
*
* @brief Perform basic hardware initialization
*
* @return 0
*/
static int soc_init(struct device *arg)
{
ARG_UNUSED(arg);
/* Install default handler that simply resets the CPU
* if configured in the kernel, NOP otherwise
*/
NMI_INIT();
return 0;
}
SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
void z_platform_init(void)
{
/*
* Use normal exception vectors address range (0x0-0x1C).
*/
__asm__ volatile(
"mrc p15, 0, r0, c1, c0, 0;" /* SCTLR */
"bic r0, r0, #" TOSTR(HIVECS) ";" /* Clear HIVECS */
"mcr p15, 0, r0, c1, c0, 0;"
: : : "memory");
}