mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 14:48:20 +00:00
platform_session: cache arg for alloc_dma_buffer
This patch extends the 'Platform_session::alloc_dma_buffer' interface with a 'Cache' argument that corresponds to the argument accepted by 'Ram_allocator::alloc', which is used by the platform driver under the hood. Since the x86 platform driver used to be hardwired to allocate DMA buffers as UNCACHED, I adjusted all drivers by specifying the UNCACHED argument. Right now, this is needed as a hint for core to steer the allocation of I/O page tables. Once we eliminate the need for such hints (by introducing an explicit 'Region_map::attach_dma' operation), we can revisit the drivers individually because cached DMA buffers should generally be fine on the x86 architecture. Issue #2243
This commit is contained in:
@ -138,7 +138,7 @@ class Pci_driver : public Bsd::Bus_driver
|
||||
return Genode::retry<Genode::Out_of_ram>(
|
||||
[&] () {
|
||||
return Genode::retry<Genode::Out_of_caps>(
|
||||
[&] () { return _pci.alloc_dma_buffer(size); },
|
||||
[&] () { return _pci.alloc_dma_buffer(size, Genode::UNCACHED); },
|
||||
[&] () { _pci.upgrade_caps(2); });
|
||||
},
|
||||
[&] () {
|
||||
|
Reference in New Issue
Block a user