aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2023-11-23 16:21:33 +0000
committerKyle Evans <kevans@FreeBSD.org>2023-12-15 00:59:09 +0000
commit6a415720f54df09aff13fc991c9937cef986674f (patch)
tree7000ea5df1ec9451970568929638df4100ff1d16
parent73f87b9725f8f5f4ff226e60b42dbc8c3c5ea70d (diff)
downloadsrc-6a415720f54df09aff13fc991c9937cef986674f.tar.gz
src-6a415720f54df09aff13fc991c9937cef986674f.zip
arm64: lop off another 24MB of KVA for early device mappings
This grows the block enough to fit a 4K 32-bit depth framebuffer; some firmware would present smaller GOP modes to be able to boot with a smaller framebuffer on these devices, but the Windows Devkit firmware is simply not that nice. Instead, it offers exactly one GOP mode that matches the current resolution of the attached display, so with limited control over resolution on most of my displays it'd be nice if we could Just Work(TM) at 4K. andrew notes that he has some ideas for removing PMAP_MAPDEV_EARLY_SIZE entirely, so this limitation could end up removed altogether in the future. Reviewed by: andrew, emaste (cherry picked from commit a3ceeef26bc880b86f4e181bddd9924a2b5e0691)
-rw-r--r--sys/arm64/include/pte.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h
index f1b11c3a0189..478bd85aa2e2 100644
--- a/sys/arm64/include/pte.h
+++ b/sys/arm64/include/pte.h
@@ -143,7 +143,11 @@ typedef uint64_t pt_entry_t; /* page table entry */
/* 0x2 also marks an invalid address */
#define L3_PAGE 0x3
-#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 8)
+/*
+ * A substantial portion of this is to make sure that we can cope with 4K
+ * framebuffers in early boot, assuming a common 4K resolution @ 32-bit depth.
+ */
+#define PMAP_MAPDEV_EARLY_SIZE (L2_SIZE * 20)
#define L0_ENTRIES_SHIFT 9
#define L0_ENTRIES (1 << L0_ENTRIES_SHIFT)