svn commit: r222433 - in head/sys/powerpc: booke include
Marcel Moolenaar
marcel at FreeBSD.org
Sun May 29 00:27:43 UTC 2011
Author: marcel
Date: Sun May 29 00:27:42 2011
New Revision: 222433
URL: http://svn.freebsd.org/changeset/base/222433
Log:
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.
Modified:
head/sys/powerpc/booke/platform_bare.c
head/sys/powerpc/include/spr.h
Modified: head/sys/powerpc/booke/platform_bare.c
==============================================================================
--- head/sys/powerpc/booke/platform_bare.c Sun May 29 00:17:13 2011 (r222432)
+++ head/sys/powerpc/booke/platform_bare.c Sun May 29 00:27:42 2011 (r222433)
@@ -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
Modified: head/sys/powerpc/include/spr.h
==============================================================================
--- head/sys/powerpc/include/spr.h Sun May 29 00:17:13 2011 (r222432)
+++ head/sys/powerpc/include/spr.h Sun May 29 00:27:42 2011 (r222433)
@@ -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 */
More information about the svn-src-all
mailing list