From owner-svn-src-all@freebsd.org Sat Nov 25 22:10:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63AE4DF1B37; Sat, 25 Nov 2017 22:10:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DBD771238; Sat, 25 Nov 2017 22:10:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAPMABh5060439; Sat, 25 Nov 2017 22:10:11 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAPMABET060438; Sat, 25 Nov 2017 22:10:11 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201711252210.vAPMABET060438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 25 Nov 2017 22:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326211 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 326211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Nov 2017 22:10:12 -0000 Author: nwhitehorn Date: Sat Nov 25 22:10:10 2017 New Revision: 326211 URL: https://svnweb.freebsd.org/changeset/base/326211 Log: Invalidate TLB at boot using the correct IS settings on newer-than-POWER5 CPUs. MFC after: 3 weeks Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Sat Nov 25 22:08:40 2017 (r326210) +++ head/sys/powerpc/aim/moea64_native.c Sat Nov 25 22:10:10 2017 (r326211) @@ -382,7 +382,7 @@ moea64_cpu_bootstrap_native(mmu_t mmup, int ap) __asm __volatile ("slbmfee %0,%1; slbie %0;" : "=r"(seg0) : "r"(0)); - for (i = 0; i < 64; i++) { + for (i = 0; i < n_slbs; i++) { if (!(slb[i].slbe & SLBE_VALID)) continue; @@ -465,9 +465,23 @@ tlbia(void) register_t msr, scratch; #endif + i = 0xc00; /* IS = 11 */ + switch (mfpvr() >> 16) { + case IBM970: + case IBM970FX: + case IBM970MP: + case IBM970GX: + case IBMPOWER4: + case IBMPOWER4PLUS: + case IBMPOWER5: + case IBMPOWER5PLUS: + i = 0; /* IS not supported */ + break; + } + TLBSYNC(); - for (i = 0; i < 0xFF000; i += 0x00001000) { + for (; i < 0x200000; i += 0x00001000) { #ifdef __powerpc64__ __asm __volatile("tlbiel %0" :: "r"(i)); #else