From owner-svn-src-stable@freebsd.org Thu Jan 3 00:36:34 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2188143667C; Thu, 3 Jan 2019 00:36:34 +0000 (UTC) (envelope-from kib@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) server-signature RSA-PSS (4096 bits) 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 67A7880605; Thu, 3 Jan 2019 00:36:34 +0000 (UTC) (envelope-from kib@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 5525719833; Thu, 3 Jan 2019 00:36:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x030aYPV039989; Thu, 3 Jan 2019 00:36:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x030aYAE039987; Thu, 3 Jan 2019 00:36:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901030036.x030aYAE039987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 3 Jan 2019 00:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342710 - in stable/12/sys/i386: i386 include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/i386: i386 include X-SVN-Commit-Revision: 342710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 67A7880605 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2019 00:36:35 -0000 Author: kib Date: Thu Jan 3 00:36:33 2019 New Revision: 342710 URL: https://svnweb.freebsd.org/changeset/base/342710 Log: MFC r342653, r342654: Update comments: paging is initialized in pmap_cold(). Modified: stable/12/sys/i386/i386/pmap.c stable/12/sys/i386/include/pmap.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/i386/i386/pmap.c ============================================================================== --- stable/12/sys/i386/i386/pmap.c Wed Jan 2 23:57:37 2019 (r342709) +++ stable/12/sys/i386/i386/pmap.c Thu Jan 3 00:36:33 2019 (r342710) @@ -569,9 +569,9 @@ pmap_cold(void) /* * Bootstrap the system enough to run with virtual memory. * - * On the i386 this is called after mapping has already been enabled - * in locore.s with the page table created in pmap_cold(), - * and just syncs the pmap module with what has already been done. + * On the i386 this is called after pmap_cold() created intial + * kernel page table and enabled paging, and just syncs the pmap + * module with what has already been done. */ void pmap_bootstrap(vm_paddr_t firstaddr) @@ -594,11 +594,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) vm_phys_add_seg(KPTphys, KPTphys + ptoa(nkpt)); /* - * Initialize the first available kernel virtual address. However, - * using "firstaddr" may waste a few pages of the kernel virtual - * address space, because locore may not have mapped every physical - * page that it allocated. Preferably, locore would provide a first - * unused virtual address in addition to "firstaddr". + * Initialize the first available kernel virtual address. + * However, using "firstaddr" may waste a few pages of the + * kernel virtual address space, because pmap_cold() may not + * have mapped every physical page that it allocated. + * Preferably, pmap_cold() would provide a first unused + * virtual address in addition to "firstaddr". */ virtual_avail = (vm_offset_t)firstaddr; virtual_end = VM_MAX_KERNEL_ADDRESS; @@ -665,7 +666,7 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * KPTmap is used by pmap_kextract(). * - * KPTmap is first initialized by locore. However, that initial + * KPTmap is first initialized by pmap_cold(). However, that initial * KPTmap can only support NKPT page table pages. Here, a larger * KPTmap is created that can support KVA_PAGES page table pages. */ Modified: stable/12/sys/i386/include/pmap.h ============================================================================== --- stable/12/sys/i386/include/pmap.h Wed Jan 2 23:57:37 2019 (r342709) +++ stable/12/sys/i386/include/pmap.h Thu Jan 3 00:36:33 2019 (r342710) @@ -125,7 +125,7 @@ /* * The initial number of kernel page table pages that are constructed - * by locore must be sufficient to map vm_page_array. That number can + * by pmap_cold() must be sufficient to map vm_page_array[]. That number can * be calculated as follows: * max_phys / PAGE_SIZE * sizeof(struct vm_page) / NBPDR * PAE: max_phys 16G, sizeof(vm_page) 76, NBPDR 2M, 152 page table pages. @@ -228,7 +228,7 @@ extern pd_entry_t *IdlePTD; /* physical address of "Id * a kernel page table page after the corresponding virtual addresses have * been promoted to a 2/4MB page mapping. * - * KPTmap is first initialized by locore to support just NPKT page table + * KPTmap is first initialized by pmap_cold() to support just NPKT page table * pages. Later, it is reinitialized by pmap_bootstrap() to allow for * expansion of the kernel page table. */