Fix handling of cache attribute with RAM

Adapt drivers for Exynos5 and PandaBoard to cache attribute changes in
786fe80.

Fixes #1301.
This commit is contained in:
Christian Helmuth 2014-11-25 21:00:45 +01:00
parent 8f9355b360
commit dfe95b26c8
6 changed files with 8 additions and 8 deletions

View File

@ -910,7 +910,7 @@ struct Sata_ahci : Attached_mmio
*/
Sata_ahci()
: Attached_mmio(0x122f0000, 0x10000),
ds(env()->ram_session()->alloc(0x20000, 0)),
ds(env()->ram_session()->alloc(0x20000, Genode::UNCACHED)),
cl_phys(Dataspace_client(ds).phys_addr()),
cl_virt(env()->rm_session()->attach(ds)),
fb_phys(cl_phys + CMD_LIST_SIZE),
@ -1223,7 +1223,7 @@ struct Sata_ahci : Attached_mmio
};
/* create receive buffer DMA */
Ram_dataspace_capability dev_id_ds = env()->ram_session()->alloc(0x1000, 0);;
Ram_dataspace_capability dev_id_ds = env()->ram_session()->alloc(0x1000, Genode::UNCACHED);;
addr_t dev_id_virt = (addr_t)env()->rm_session()->attach(dev_id_ds);
addr_t dev_id_phys = Dataspace_client(dev_id_ds).phys_addr();

View File

@ -57,7 +57,7 @@ class Ahci_driver : public Block::Driver
bool dma_enabled() { return true; }
Genode::Ram_dataspace_capability alloc_dma_buffer(Genode::size_t size) {
return Genode::env()->ram_session()->alloc(size, UNCACHED); }
return Genode::env()->ram_session()->alloc(size, Genode::UNCACHED); }
void free_dma_buffer(Genode::Ram_dataspace_capability c) {
return Genode::env()->ram_session()->free(c); }

View File

@ -134,7 +134,7 @@ int main(int argc, char **argv)
size_t const buffer_size = 1024*1024;
/* allocate read/write buffer */
static Attached_ram_dataspace buffer(env()->ram_session(), buffer_size, false);
static Attached_ram_dataspace buffer(env()->ram_session(), buffer_size, Genode::UNCACHED);
char * const buffer_virt = buffer.local_addr<char>();
addr_t const buffer_phys = Dataspace_client(buffer.cap()).phys_addr();

View File

@ -500,7 +500,7 @@ struct Exynos5_msh_controller : private Dwmmc, Sd_card::Host_controller
: Dwmmc(mmio_base),
_idmac_desc_ds(Genode::env()->ram_session(),
IDMAC_DESC_MAX_ENTRIES*sizeof(Idmac_desc),
false),
Genode::UNCACHED),
_idmac_desc(_idmac_desc_ds.local_addr<Idmac_desc>()),
_idmac_desc_phys(Genode::Dataspace_client(_idmac_desc_ds.cap()).phys_addr()),
_delayer(delayer), _card_info(_init()), _irq(IRQ_NUMBER)
@ -602,7 +602,7 @@ struct Exynos5_msh_controller : private Dwmmc, Sd_card::Host_controller
size_t _read_ext_csd()
{
using namespace Genode;
Attached_ram_dataspace ds(env()->ram_session(), 0x1000, false);
Attached_ram_dataspace ds(env()->ram_session(), 0x1000, UNCACHED);
addr_t phys = Genode::Dataspace_client(ds.cap()).phys_addr();
_setup_idmac_descriptor_table(1, phys);

View File

@ -96,7 +96,7 @@ int main(int argc, char **argv)
size_t const buffer_size = 10*1024*1024;
/* allocate read/write buffer */
static Attached_ram_dataspace buffer(env()->ram_session(), buffer_size, false);
static Attached_ram_dataspace buffer(env()->ram_session(), buffer_size, Genode::UNCACHED);
char * const buffer_virt = buffer.local_addr<char>();
addr_t const buffer_phys = Dataspace_client(buffer.cap()).phys_addr();

View File

@ -764,7 +764,7 @@ struct Omap4_hsmmc_controller : private Mmchs, public Sd_card::Host_controller
_use_dma(use_dma),
_adma_desc_ds(Genode::env()->ram_session(),
ADMA_DESC_MAX_ENTRIES*sizeof(Adma_desc::access_t),
false),
Genode::UNCACHED),
_adma_desc(_adma_desc_ds.local_addr<Adma_desc::access_t>()),
_adma_desc_phys(Genode::Dataspace_client(_adma_desc_ds.cap()).phys_addr()),
_irq(IRQ_NUMBER)