HomeFreeBSD

efifb: add a tunable to select the framebuffer cache attribute

Description

efifb: add a tunable to select the framebuffer cache attribute

Mapping the framebuffer with WC (Write Combined) memory type can, in
practice, cause some memory transactions to be rate-limited at a
fraction of the fb write rate. WC allows one core to queue up many
globally visible write transactions, and in the process some unrelated
transactions may end up having to wait for all of the queued up PCI
writes to be flushed.

Add an hw.efifb.cache_attr tunable to allow mapping the framebuffer as
uncacheable instead. We should likely be taking a more careful approach
of checking the memory map to determine which cacheability attributes
are feasible, but the knob lets us use our historically functional
behavior while offering a convenient way to switch on a stock kernel.

The only valid values for hw.efifb.cache_attr at this time are "uc" and
"wc".

Original patch by Marc De La Gueronniere <mdelagueronniere@verisign.com>
along with previous testing.

Reviewed by: imp
Sponsored by: Verisign, Inc.
Sponsored by: Klara, Inc.

(cherry picked from commit 8dff0b6761407357c5bb42ee799c5c9f465557a3)

Details

Provenance
kevansAuthored on Mar 1 2023, 6:04 AM
Parents
rG04accaacd45a: i18n: csmapper: hook up the top-level .src files to the build
Branches
Unknown
Tags
Unknown