Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F81969640
D17884.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17884.diff
View Options
diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c
--- a/sys/dev/vt/hw/efifb/efifb.c
+++ b/sys/dev/vt/hw/efifb/efifb.c
@@ -103,7 +103,32 @@
struct fb_info *info;
struct efi_fb *efifb;
caddr_t kmdp;
+ int memattr;
int roff, goff, boff;
+ char attr[16];
+
+ /*
+ * XXX TODO: I think there's more nuance here than we're acknowledging,
+ * and we should look into it. It may be that the framebuffer lives in
+ * a segment of memory that doesn't support one or both of these. We
+ * should likely be consulting the memory map for any applicable
+ * cacheability attributes before making a final decision.
+ */
+ memattr = VM_MEMATTR_WRITE_COMBINING;
+ if (TUNABLE_STR_FETCH("hw.efifb.cache_attr", attr, sizeof(attr))) {
+ /*
+ * We'll allow WC but it's currently the default, UC is the only
+ * other tested one at this time.
+ */
+ if (strcasecmp(attr, "wc") != 0 &&
+ strcasecmp(attr, "uc") != 0) {
+ printf("efifb: unsupported cache attr specified: %s\n",
+ attr);
+ printf("efifb: expected \"wc\" or \"uc\"\n");
+ } else if (strcasecmp(attr, "uc") == 0) {
+ memattr = VM_MEMATTR_UNCACHEABLE;
+ }
+ }
info = vd->vd_softc;
if (info == NULL)
@@ -141,7 +166,7 @@
info->fb_size = info->fb_height * info->fb_stride;
info->fb_pbase = efifb->fb_addr;
info->fb_vbase = (intptr_t)pmap_mapdev_attr(info->fb_pbase,
- info->fb_size, VM_MEMATTR_WRITE_COMBINING);
+ info->fb_size, memattr);
vt_fb_init(vd);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 15, 7:51 AM (9 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9091560
Default Alt Text
D17884.diff (1 KB)
Attached To
Mode
D17884: efifb: add a tunable to select the framebuffer cache attribute
Attached
Detach File
Event Timeline
Log In to Comment