Date: Sun, 29 May 2011 00:27:43 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222433 - in head/sys/powerpc: booke include Message-ID: <201105290027.p4T0Rh1Y006686@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105290027.p4T0Rh1Y006686>