foc: map uncached normal memory bufferable

Mapping normal memory bufferable restores support for unaligned reads on
DMA memory and prevents the following errors on imx6q_sabrelite.

  KERNEL0: alignment error at 18003061 (PC: 0102e3f8, SP: 401ffb18, FSR: 90000001, PSR: 20000110)

Issue #4094
Issue #4157
This commit is contained in:
Christian Helmuth 2021-05-18 11:54:22 +02:00
parent dd587c6712
commit 9166a75f2c

View File

@ -103,12 +103,12 @@ void Ipc_pager::reply_and_wait_for_fault()
l4_utcb_mr()->mr[0] = _reply_mapping.dst_addr | L4_ITEM_MAP;
l4_fpage_cacheability_opt_t
cacheability = _reply_mapping.cached ? L4_FPAGE_CACHEABLE
: L4_FPAGE_UNCACHEABLE;
bool const bufferable = !_reply_mapping.io_mem || _reply_mapping.write_combined;
if (_reply_mapping.write_combined)
cacheability= L4_FPAGE_BUFFERABLE;
l4_fpage_cacheability_opt_t const
cacheability = _reply_mapping.cached ? L4_FPAGE_CACHEABLE
: bufferable ? L4_FPAGE_BUFFERABLE
: L4_FPAGE_UNCACHEABLE;
l4_utcb_mr()->mr[0] |= cacheability << 4;