genode/repos/ports/src/app/gdb_monitor/ram_session_component.cc
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

68 lines
1.4 KiB
C++

/*
* \brief Implementation of the RAM session interface
* \author Christian Prochaska
* \date 2011-05-06
*/
/*
* Copyright (C) 2011-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.
*/
/* Genode includes */
#include <base/env.h>
#include <base/printf.h>
#include "ram_session_component.h"
using namespace Genode;
Ram_session_component::Ram_session_component(const char *args)
: _parent_ram_session(env()->parent()->session<Ram_session>(args))
{ }
Ram_session_component::~Ram_session_component()
{ }
Ram_dataspace_capability Ram_session_component::alloc(size_t ds_size, Cache_attribute cached)
{
return _parent_ram_session.alloc(ds_size, cached);
}
void Ram_session_component::free(Ram_dataspace_capability ds_cap)
{
_parent_ram_session.free(ds_cap);
}
int Ram_session_component::ref_account(Ram_session_capability ram_session_cap)
{
return _parent_ram_session.ref_account(ram_session_cap);
}
int Ram_session_component::transfer_quota(Ram_session_capability ram_session_cap,
size_t amount)
{
return _parent_ram_session.transfer_quota(ram_session_cap, amount);
}
size_t Ram_session_component::quota()
{
return _parent_ram_session.quota();
}
size_t Ram_session_component::used()
{
return _parent_ram_session.used();
}