mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-10-06 14:22:18 +00:00
ppc/85xx,86xx: Handling Unknown SOC version
Incase the system is detected with Unknown SVR, let the system boot with a default value and a proper message. Now with dynamic detection of SOC properties from SVR, this is necessary to prevent a crash. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
865f24dc92
commit
ea8be4a65b
4 changed files with 9 additions and 13 deletions
|
@ -69,13 +69,9 @@ int checkcpu (void)
|
||||||
|
|
||||||
cpu = gd->cpu;
|
cpu = gd->cpu;
|
||||||
|
|
||||||
if (cpu->name) {
|
puts(cpu->name);
|
||||||
puts(cpu->name);
|
if (IS_E_PROCESSOR(svr))
|
||||||
if (IS_E_PROCESSOR(svr))
|
puts("E");
|
||||||
puts("E");
|
|
||||||
} else {
|
|
||||||
puts("Unknown");
|
|
||||||
}
|
|
||||||
|
|
||||||
printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr);
|
printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr);
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,7 @@ checkcpu(void)
|
||||||
|
|
||||||
cpu = gd->cpu;
|
cpu = gd->cpu;
|
||||||
|
|
||||||
if (cpu->name)
|
puts(cpu->name);
|
||||||
puts(cpu->name);
|
|
||||||
else
|
|
||||||
puts("Unknown");
|
|
||||||
|
|
||||||
printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr);
|
printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr);
|
||||||
puts("Core: ");
|
puts("Core: ");
|
||||||
|
|
|
@ -79,6 +79,8 @@ struct cpu_type cpu_type_list [] = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct cpu_type cpu_type_unknown = CPU_TYPE_ENTRY(Unknown, Unknown, 1);
|
||||||
|
|
||||||
struct cpu_type *identify_cpu(u32 ver)
|
struct cpu_type *identify_cpu(u32 ver)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -86,8 +88,7 @@ struct cpu_type *identify_cpu(u32 ver)
|
||||||
if (cpu_type_list[i].soc_ver == ver)
|
if (cpu_type_list[i].soc_ver == ver)
|
||||||
return &cpu_type_list[i];
|
return &cpu_type_list[i];
|
||||||
}
|
}
|
||||||
|
return &cpu_type_unknown;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cpu_numcores() {
|
int cpu_numcores() {
|
||||||
|
|
|
@ -1034,6 +1034,8 @@
|
||||||
#define SVR_8641 0x809000
|
#define SVR_8641 0x809000
|
||||||
#define SVR_8641D 0x809001
|
#define SVR_8641D 0x809001
|
||||||
|
|
||||||
|
#define SVR_Unknown 0xFFFFFF
|
||||||
|
|
||||||
#define _GLOBAL(n)\
|
#define _GLOBAL(n)\
|
||||||
.globl n;\
|
.globl n;\
|
||||||
n:
|
n:
|
||||||
|
|
Loading…
Reference in a new issue