mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-08-28 16:33:34 -04:00
powerpc/mpc85xx: check number of cores
Panic if the number of cores is more than CONFIG_MAX_CPUS because it will surely overflow gd structure. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
This commit is contained in:
parent
f77329cfcf
commit
2f1712b275
@ -127,6 +127,11 @@ int checkcpu (void)
|
|||||||
|
|
||||||
printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr);
|
printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr);
|
||||||
|
|
||||||
|
if (nr_cores > CONFIG_MAX_CPUS) {
|
||||||
|
panic("\nUnexpected number of cores: %d, max is %d\n",
|
||||||
|
nr_cores, CONFIG_MAX_CPUS);
|
||||||
|
}
|
||||||
|
|
||||||
get_sys_info(&sysinfo);
|
get_sys_info(&sysinfo);
|
||||||
|
|
||||||
puts("Clock Configuration:");
|
puts("Clock Configuration:");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user