genode/base/src/core/include/address_space.h
Norman Feske 21de42c45d core: Introduce 'Address_space' interface
The new core-internal 'Address_space' interface enables cores RM service
to flush mappings of a PD in which a given 'Rm_client' thread resides.
Prior this patch, each platform invented their own way to flush mappings
in the respective 'rm_session_support.cc' implementation. However, those
implementations used to deal poorly with some corner cases. In
particular, if a PD session was destroyed prior a RM session, the RM
session would try to use no longer existing PD session. The new
'Address_space' uses the just added weak-pointer mechanism to deal with
this issue.

Furthermore, the generic 'Rm_session_component::detach' function has
been improved to avoid duplicated unmap operations for platforms that
implement the 'Address_space' interface. Therefore, it is related to
issue #595. Right now, this is OKL4 only, but other platforms will follow.
2013-03-12 21:53:08 +01:00

34 lines
863 B
C++

/*
* \brief Interface for flushing mapping from a protection domain
* \author Norman Feske
* \date 2013-03-07
*/
/*
* Copyright (C) 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 _CORE__INCLUDE__ADDRESS_SPACE_H_
#define _CORE__INCLUDE__ADDRESS_SPACE_H_
#include <base/stdint.h>
#include <lifetime.h>
namespace Genode { struct Address_space; }
struct Genode::Address_space : Genode::Volatile_object<Genode::Address_space>
{
/**
* Flush memory mappings of virtual address range
*
* \param virt_addr start address of range to flush
* \param size size of range in bytes, must be a multiple of page size
*/
virtual void flush(addr_t virt_addr, size_t size) = 0;
};
#endif /* _CORE__INCLUDE__ADDRESS_SPACE_H_ */