Skip to content
Snippets Groups Projects
Commit 2f1712b2 authored by York Sun's avatar York Sun Committed by Andy Fleming
Browse files

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: default avatarYork Sun <yorksun@freescale.com>
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
parent f77329cf
No related branches found
No related tags found
No related merge requests found
...@@ -127,6 +127,11 @@ int checkcpu (void) ...@@ -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:");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment