aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2019-07-01 22:11:56 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2019-07-01 22:11:56 +0000
commit6c4395e3b55b6b69c533f6878497151d7e9f4285 (patch)
tree248864b586bef39ab24cd503f1d91a54b70bb588
parent9167705c8ce7d27a02cbb3e758cba3635910a430 (diff)
downloadsrc-6c4395e3b55b6b69c533f6878497151d7e9f4285.tar.gz
src-6c4395e3b55b6b69c533f6878497151d7e9f4285.zip
arm64: efi: Map memory IO region as device
Reviewed by: andrew Sponsored by: Ampere Computing, LLC
Notes
Notes: svn path=/head/; revision=349588
-rw-r--r--sys/arm64/arm64/efirt_machdep.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/arm64/arm64/efirt_machdep.c b/sys/arm64/arm64/efirt_machdep.c
index 545d93b66ed0..50de8a4d343c 100644
--- a/sys/arm64/arm64/efirt_machdep.c
+++ b/sys/arm64/arm64/efirt_machdep.c
@@ -208,20 +208,14 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
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);