genode/repos/dde_linux/src/lib/usb/include/arm/platform/lx_mem.h
Stefan Kalkowski 786fe805da base: introduce caching attributes (fix #1184)
On ARM it's relevant to not only distinguish between ordinary cached memory
and write-combined one, but also having non-cached memory too. To insert the
appropriated page table entries e.g.: in the base-hw kernel, we need to preserve
the information about the kind of memory from allocation until the pager
resolves a page fault. Therefore, this commit introduces a new Cache_attribute
type, and replaces the write_combined boolean with the new type where necessary.
2014-06-26 10:57:26 +02:00

34 lines
792 B
C++

/*
* \brief Platform specific part of memory allocation
* \author Alexander Boettcher
* \date 2013-03-18
*/
/*
* Copyright (C) 2013-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _ARM__PLATFORM__LX_MEM_
#define _ARM__PLATFORM__LX_MEM_
#include <base/cache.h>
class Backend_memory {
public:
static Genode::Ram_dataspace_capability alloc(Genode::addr_t size,
Genode::Cache_attribute c)
{
return Genode::env()->ram_session()->alloc(size, c);
}
static void free(Genode::Ram_dataspace_capability cap) {
return Genode::env()->ram_session()->free(cap); }
};
#endif /* _ARM__PLATFORM__LX_MEM_ */