/* Return a 32-bit mask indicating which cores are present on this SOC.  */
__weak u32 cpu_mask(void)
/* Return a 32-bit mask indicating which cores are present on this SOC.  */
__weak u32 cpu_mask(void)
{
	ccsr_pic_t __iomem *pic = (void *)CONFIG_SYS_MPC8xxx_PIC_ADDR;
	struct cpu_type *cpu = gd->arch.cpu;
	if (cpu == &cpu_type_unknown)
	return ((in_be32(&pic->frr) & MPC8xxx_PICFRR_NCPU_MASK) >>
			MPC8xxx_PICFRR_NCPU_SHIFT) + 1;
	if (cpu->num_cores == 0)
		return compute_ppc_cpumask();
	return cpu->mask;
}