HomeFreeBSD

i386: Always bounce DMA requests above 4G for !PAE kernels

Description

i386: Always bounce DMA requests above 4G for !PAE kernels

i386 kernels without 'options PAE' will still use PAE page tables if
the CPU supports PAE both to support larger amounts of RAM and for
PG_NX permissions. However, to avoid changing the API, bus_addr_t and
related constants (e.g. BUS_SPACE_MAXADDR) are still limited to
32 bits.

To cope with this, the x86 bus_dma code included an extra check to
bounce requests for addresses above BUS_SPACE_MAXADDR. This check was
elided (probably because it looks always-true on its face and had no
comment explaining its purpose) in recent refactoring. To fix,
restore a custom address-validation function for i386 kernels without
options PAE that includes this check.

Reported by: ci.freebsd.org
Reviewed by: markj
Fixes: 3933ff56f9b6 busdma: tidy bus_dma_run_filter() functions
Differential Revision: https://reviews.freebsd.org/D43277

Details