genode/repos/base-hw/src/core/include/translation_table_allocator.h
Stefan Kalkowski 8abd70e6e7 hw: allocate core's page-tables outside of binary
Moreover, be strict when calculating the page-table requirements of
core, which is architecture specific, and declare the virtual memory
requirements of core architecture-wise.

Ref #1588
2015-07-01 14:46:17 +02:00

48 lines
1000 B
C++

/*
* \brief Translation table allocator
* \author Stefan Kalkowski
* \date 2015-06-10
*/
/*
* Copyright (C) 2015 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__TRANSLATION_TABLE_ALLOCATOR_H_
#define _CORE__INCLUDE__TRANSLATION_TABLE_ALLOCATOR_H_
#include <base/allocator.h>
namespace Genode {
/**
* Translation table allocator interface
*/
class Translation_table_allocator;
}
class Genode::Translation_table_allocator : public Genode::Allocator
{
public:
/**
* Return physical address of given virtual page address
*
* \param addr virtual page address
*/
virtual void * phys_addr(void * addr) = 0;
/**
* Return virtual address of given physical page address
*
* \param addr physical page address
*/
virtual void * virt_addr(void * addr) = 0;
};
#endif /* _CORE__INCLUDE__TRANSLATION_TABLE_ALLOCATOR_H_ */