svn commit: r349588 - head/sys/arm64/arm64

Emmanuel Vadot manu at FreeBSD.org
Tue Jul 2 02:15:22 UTC 2019


Author: manu
Date: Mon Jul  1 22:11:56 2019
New Revision: 349588
URL: https://svnweb.freebsd.org/changeset/base/349588

Log:
  arm64: efi: Map memory IO region as device
  
  Reviewed by:	andrew
  Sponsored by:	Ampere Computing, LLC

Modified:
  head/sys/arm64/arm64/efirt_machdep.c

Modified: head/sys/arm64/arm64/efirt_machdep.c
==============================================================================
--- head/sys/arm64/arm64/efirt_machdep.c	Mon Jul  1 22:06:36 2019	(r349587)
+++ head/sys/arm64/arm64/efirt_machdep.c	Mon Jul  1 22:11:56 2019	(r349588)
@@ -208,20 +208,14 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int 
 			mode = VM_MEMATTR_WRITE_THROUGH;
 		else if ((p->md_attr & EFI_MD_ATTR_WC) != 0)
 			mode = VM_MEMATTR_WRITE_COMBINING;
-		else if ((p->md_attr & EFI_MD_ATTR_UC) != 0)
+		else
 			mode = VM_MEMATTR_DEVICE;
-		else {
-			if (bootverbose)
-				printf("EFI Runtime entry %d mapping "
-				    "attributes unsupported\n", i);
-			mode = VM_MEMATTR_UNCACHEABLE;
-		}
 
 		printf("MAP %lx mode %x pages %lu\n", p->md_phys, mode, p->md_pages);
 
 		l3_attr = ATTR_DEFAULT | ATTR_IDX(mode) | ATTR_AP(ATTR_AP_RW) |
 		    L3_PAGE;
-		if (mode == VM_MEMATTR_DEVICE)
+		if (mode == VM_MEMATTR_DEVICE || p->md_attr & EFI_MD_ATTR_XP)
 			l3_attr |= ATTR_UXN | ATTR_PXN;
 
 		VM_OBJECT_WLOCK(obj_1t1_pt);


More information about the svn-src-all mailing list