Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2022 10:05:30 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 8d1ea089800a - stable/13 - Support EFIRT on arm64 with a non 4k page size
Message-ID:  <202204191005.23JA5UEC012859@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=8d1ea089800a1fc61d18d75d6a7f46c94fa7626d

commit 8d1ea089800a1fc61d18d75d6a7f46c94fa7626d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-03-23 15:18:30 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-04-19 09:18:02 +0000

    Support EFIRT on arm64 with a non 4k page size
    
    When the page size the kernel is built for is not the same as
    EFI_PAGE_SIZE we need to increment the page index at a faster rate.
    
    Add this adjustment to the arm64 EFIRT support in preperation for
    experimental 16k PAGE_SIZE support.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 863f3220d09716ea2e570fadc6b19dcb6e4c2191)
---
 sys/arm64/arm64/efirt_machdep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/arm64/arm64/efirt_machdep.c b/sys/arm64/arm64/efirt_machdep.c
index cd4e5d7bae00..717b6cc86e17 100644
--- a/sys/arm64/arm64/efirt_machdep.c
+++ b/sys/arm64/arm64/efirt_machdep.c
@@ -221,8 +221,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz)
 			l3_attr |= ATTR_S1_XN;
 
 		VM_OBJECT_WLOCK(obj_1t1_pt);
-		for (va = p->md_phys, idx = 0; idx < p->md_pages; idx++,
-		    va += PAGE_SIZE) {
+		for (va = p->md_phys, idx = 0; idx < p->md_pages;
+		    idx += (PAGE_SIZE / EFI_PAGE_SIZE), va += PAGE_SIZE) {
 			l3 = efi_1t1_l3(va);
 			*l3 = va | l3_attr;
 		}



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