Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 2020 17:50:24 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r360612 - in stable/12/stand: efi/loader/arch/amd64 i386/libi386 userboot/userboot
Message-ID:  <202005031750.043HoOx6052220@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sun May  3 17:50:24 2020
New Revision: 360612
URL: https://svnweb.freebsd.org/changeset/base/360612

Log:
  MFC r360260:
  Stop setting PG_U in bootstrap mappings.

Modified:
  stable/12/stand/efi/loader/arch/amd64/elf64_freebsd.c
  stable/12/stand/i386/libi386/elf64_freebsd.c
  stable/12/stand/userboot/userboot/elf64_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/efi/loader/arch/amd64/elf64_freebsd.c
==============================================================================
--- stable/12/stand/efi/loader/arch/amd64/elf64_freebsd.c	Sun May  3 16:51:59 2020	(r360611)
+++ stable/12/stand/efi/loader/arch/amd64/elf64_freebsd.c	Sun May  3 17:50:24 2020	(r360612)
@@ -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: stable/12/stand/i386/libi386/elf64_freebsd.c
==============================================================================
--- stable/12/stand/i386/libi386/elf64_freebsd.c	Sun May  3 16:51:59 2020	(r360611)
+++ stable/12/stand/i386/libi386/elf64_freebsd.c	Sun May  3 17:50:24 2020	(r360612)
@@ -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: stable/12/stand/userboot/userboot/elf64_freebsd.c
==============================================================================
--- stable/12/stand/userboot/userboot/elf64_freebsd.c	Sun May  3 16:51:59 2020	(r360611)
+++ stable/12/stand/userboot/userboot/elf64_freebsd.c	Sun May  3 17:50:24 2020	(r360612)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005031750.043HoOx6052220>