From owner-svn-src-all@freebsd.org Fri Apr 24 13:53:41 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 D41FE2B5CFD; Fri, 24 Apr 2020 13:53:41 +0000 (UTC) (envelope-from markj@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 497wcj3sppz4PGs; Fri, 24 Apr 2020 13:53:41 +0000 (UTC) (envelope-from markj@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 7FBE81EEC0; Fri, 24 Apr 2020 13:53:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODrf73094668; Fri, 24 Apr 2020 13:53:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODrepp094665; Fri, 24 Apr 2020 13:53:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241353.03ODrepp094665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360260 - in head/stand: efi/loader/arch/amd64 i386/libi386 userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/stand: efi/loader/arch/amd64 i386/libi386 userboot/userboot X-SVN-Commit-Revision: 360260 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.29 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: Fri, 24 Apr 2020 13:53:41 -0000 Author: markj Date: Fri Apr 24 13:53:40 2020 New Revision: 360260 URL: https://svnweb.freebsd.org/changeset/base/360260 Log: Stop setting PG_U in bootstrap mappings. These mappings are never visible to userspace as they get replaced when the amd64 pmap is bootstrapped, but there is no need to set PG_U in the first place. Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24547 Modified: head/stand/efi/loader/arch/amd64/elf64_freebsd.c head/stand/i386/libi386/elf64_freebsd.c head/stand/userboot/userboot/elf64_freebsd.c Modified: head/stand/efi/loader/arch/amd64/elf64_freebsd.c ============================================================================== --- head/stand/efi/loader/arch/amd64/elf64_freebsd.c Fri Apr 24 13:49:51 2020 (r360259) +++ head/stand/efi/loader/arch/amd64/elf64_freebsd.c Fri Apr 24 13:53:40 2020 (r360260) @@ -172,15 +172,15 @@ elf64_exec(struct preloaded_file *fp) for (i = 0; i < 512; i++) { /* Each slot of the L4 pages points to the same L3 page. */ PT4[i] = (pml4_entry_t)PT3; - PT4[i] |= PG_V | PG_RW | PG_U; + PT4[i] |= PG_V | PG_RW; /* Each slot of the L3 pages points to the same L2 page. */ PT3[i] = (pdp_entry_t)PT2; - PT3[i] |= PG_V | PG_RW | PG_U; + PT3[i] |= PG_V | PG_RW; /* The L2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); - PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; + PT2[i] |= PG_V | PG_RW | PG_PS; } printf("Start @ 0x%lx ...\n", ehdr->e_entry); Modified: head/stand/i386/libi386/elf64_freebsd.c ============================================================================== --- head/stand/i386/libi386/elf64_freebsd.c Fri Apr 24 13:49:51 2020 (r360259) +++ head/stand/i386/libi386/elf64_freebsd.c Fri Apr 24 13:53:40 2020 (r360260) @@ -48,7 +48,6 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfil #define PG_V 0x001 #define PG_RW 0x002 -#define PG_U 0x004 #define PG_PS 0x080 typedef uint64_t p4_entry_t; @@ -96,15 +95,15 @@ elf64_exec(struct preloaded_file *fp) for (i = 0; i < 512; i++) { /* Each slot of the level 4 pages points to the same level 3 page */ PT4[i] = (p4_entry_t)VTOP((uintptr_t)&PT3[0]); - PT4[i] |= PG_V | PG_RW | PG_U; + PT4[i] |= PG_V | PG_RW; /* Each slot of the level 3 pages points to the same level 2 page */ PT3[i] = (p3_entry_t)VTOP((uintptr_t)&PT2[0]); - PT3[i] |= PG_V | PG_RW | PG_U; + PT3[i] |= PG_V | PG_RW; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); - PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; + PT2[i] |= PG_V | PG_RW | PG_PS; } entry_lo = ehdr->e_entry & 0xffffffff; Modified: head/stand/userboot/userboot/elf64_freebsd.c ============================================================================== --- head/stand/userboot/userboot/elf64_freebsd.c Fri Apr 24 13:49:51 2020 (r360259) +++ head/stand/userboot/userboot/elf64_freebsd.c Fri Apr 24 13:53:40 2020 (r360260) @@ -60,7 +60,6 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfil #define PG_V 0x001 #define PG_RW 0x002 -#define PG_U 0x004 #define PG_PS 0x080 typedef uint64_t p4_entry_t; @@ -127,15 +126,15 @@ elf64_exec(struct preloaded_file *fp) for (i = 0; i < 512; i++) { /* Each slot of the level 4 pages points to the same level 3 page */ PT4[i] = (p4_entry_t) 0x3000; - PT4[i] |= PG_V | PG_RW | PG_U; + PT4[i] |= PG_V | PG_RW; /* Each slot of the level 3 pages points to the same level 2 page */ PT3[i] = (p3_entry_t) 0x4000; - PT3[i] |= PG_V | PG_RW | PG_U; + PT3[i] |= PG_V | PG_RW; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); - PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; + PT2[i] |= PG_V | PG_RW | PG_PS; } #ifdef DEBUG