diff --git a/soc/arm/xilinx_zynqmp/soc.c b/soc/arm/xilinx_zynqmp/soc.c index 9f069e6ed41e9f..20e9a2a01dae73 100644 --- a/soc/arm/xilinx_zynqmp/soc.c +++ b/soc/arm/xilinx_zynqmp/soc.c @@ -9,6 +9,8 @@ #include #include +#include + /** * * @brief Perform basic hardware initialization @@ -31,9 +33,7 @@ SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); void z_platform_init(void) { - __asm__ volatile( - "mrc p15, 0, r0, c1, c0, 0;" /* SCTLR */ - "bic r0, r0, #" TOSTR(HIVECS) ";" /* Vector table at 0 */ - "mcr p15, 0, r0, c1, c0, 0;" - : : : "memory"); + unsigned int sctlr = __get_SCTLR(); + sctlr &= ~SCTLR_V_Msk; + __set_SCTLR(sctlr); } diff --git a/soc/arm/xilinx_zynqmp/soc.h b/soc/arm/xilinx_zynqmp/soc.h index 6df67841233435..528a82a650d036 100644 --- a/soc/arm/xilinx_zynqmp/soc.h +++ b/soc/arm/xilinx_zynqmp/soc.h @@ -8,12 +8,10 @@ #ifndef _BOARD__H_ #define _BOARD__H_ -#include - #ifndef _ASMLANGUAGE -#include -#include +/* Define CMSIS configurations */ +#define __CR_REV 1U #endif /* !_ASMLANGUAGE */