o Add system versions for the P4040(E) and P4080(E).

o   In bare_probe(), change the logic that determines the maximum
    number of processors/cores into a switch statement and take
    advantage of the fact that bit 3 of the SVR value indicates
    whether we're running on a security enabled version. Since we
    don't care about that here, mask the bit. All -E versions
    are taken care of automatically.
This commit is contained in:
Marcel Moolenaar 2011-05-29 00:27:42 +00:00
parent 76355edba5
commit ebfbeb83f6
2 changed files with 18 additions and 5 deletions

View file

@ -104,13 +104,22 @@ bare_probe(platform_t plat)
int i, law_max, tgt;
ver = SVR_VER(mfspr(SPR_SVR));
if (ver == SVR_MPC8572E || ver == SVR_MPC8572 ||
ver == SVR_P1020E || ver == SVR_P1020 ||
ver == SVR_P2020E || ver == SVR_P2020)
switch (ver & ~0x0008) { /* Mask Security Enabled bit */
case SVR_P4080:
maxcpu = 8;
break;
case SVR_P4040:
maxcpu = 4;
break;
case SVR_MPC8572:
case SVR_P1020:
case SVR_P2020:
maxcpu = 2;
else
break;
default:
maxcpu = 1;
break;
}
/*
* Clear local access windows. Skip DRAM entries, so we don't shoot

View file

@ -662,6 +662,10 @@
#define SVR_P2010E 0x80eb
#define SVR_P2020 0x80e2
#define SVR_P2020E 0x80ea
#define SVR_P4040 0x8200
#define SVR_P4040E 0x8208
#define SVR_P4080 0x8201
#define SVR_P4080E 0x8209
#define SVR_VER(svr) (((svr) >> 16) & 0xffff)
#define SPR_PID0 0x030 /* ..8 Process ID Register 0 */