/* * Support for MicroBlaze PVR (processor version register) * * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu> * Copyright (C) 2007-2009 PetaLogix * Copyright (C) 2007 John Williams <john.williams@petalogix.com> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details.
*/
/* * Does the CPU support the PVR register? * return value: * 0: no PVR * 1: simple PVR * 2: full PVR * * This must work on all CPU versions, including those before the * PVR was even an option.
*/
int cpu_has_pvr(void)
{ unsignedlong flags; unsigned pvr0;
local_save_flags(flags);
/* PVR bit in MSR tells us if there is any support */ if (!(flags & PVR_MSR_BIT)) return 0;
get_single_pvr(0, pvr0);
pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0);
if (pvr0 & PVR0_PVR_FULL_MASK) return 1;
/* for partial PVR use static cpuinfo */ return 2;
}
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.