/* * Flag indicating that the kernel was not entered in the same mode on every * CPU. The zImage loader stashes this value in an SPSR, so we need an * architecturally defined flag bit here.
*/ #define BOOT_CPU_MODE_MISMATCH PSR_N_BIT
#ifndef __ASSEMBLY__ #include <asm/cacheflush.h>
#ifdef CONFIG_ARM_VIRT_EXT /* * __boot_cpu_mode records what mode the primary CPU was booted in. * A correctly-implemented bootloader must start all CPUs in the same mode: * if it fails to do this, the flag BOOT_CPU_MODE_MISMATCH is set to indicate * that some CPU(s) were booted in a different mode. * * This allows the kernel to flag an error when the secondaries have come up.
*/ externint __boot_cpu_mode;
staticinlinevoid sync_boot_mode(void)
{ /* * As secondaries write to __boot_cpu_mode with caches disabled, we * must flush the corresponding cache entries to ensure the visibility * of their writes.
*/
sync_cache_r(&__boot_cpu_mode);
}
/* Check if the bootloader has booted CPUs in different modes */ staticinlinebool is_hyp_mode_mismatched(void)
{ return !!(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.