From owner-svn-src-all@freebsd.org Tue May 26 03:58:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A23D2DEEA5; Tue, 26 May 2020 03:58:20 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49WKv02jdtz4HVV; Tue, 26 May 2020 03:58:20 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 586BA1D568; Tue, 26 May 2020 03:58:20 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04Q3wKgY020176; Tue, 26 May 2020 03:58:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04Q3wKFo020175; Tue, 26 May 2020 03:58:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202005260358.04Q3wKFo020175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 26 May 2020 03:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361494 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 361494 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.33 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: Tue, 26 May 2020 03:58:20 -0000 Author: jhibbits Date: Tue May 26 03:58:19 2020 New Revision: 361494 URL: https://svnweb.freebsd.org/changeset/base/361494 Log: powerpc/booke pmap: Fix iteration for 64-bit kernel page table creation Kernel page tables actually start at index 4096, given kernel base address of 0xc008000000000000, not index 0, which would yield 0xc000000000000000. Fix this by indexing at the real base, instead of the assumed base. Modified: head/sys/powerpc/booke/pmap_64.c Modified: head/sys/powerpc/booke/pmap_64.c ============================================================================== --- head/sys/powerpc/booke/pmap_64.c Tue May 26 02:27:10 2020 (r361493) +++ head/sys/powerpc/booke/pmap_64.c Tue May 26 03:58:19 2020 (r361494) @@ -553,7 +553,8 @@ kernel_pte_alloc(vm_offset_t data_end, vm_offset_t add } va = VM_MIN_KERNEL_ADDRESS; - for (i = 0; i < pdir_l1s; i++, l1_va += PAGE_SIZE) { + for (i = PG_ROOT_IDX(va); i < PG_ROOT_IDX(va) + pdir_l1s; + i++, l1_va += PAGE_SIZE) { kernel_pmap->pm_root[i] = (pte_t ***)l1_va; for (j = 0; j < PDIR_L1_NENTRIES && va < VM_MAX_KERNEL_ADDRESS;