genode/repos/base-hw/src/core/include/spec/x86_64/mtc_util.h
Norman Feske 2e701f9afa base: update include guards
This patch cleans up the include guards, assisted by the
tool/fix_include_ifndef script.
2016-03-07 12:34:45 +01:00

37 lines
846 B
C++

/*
* \brief x86 utility functions
* \author Reto Buerki
* \date 2015-02-27
*/
/*
* 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__SPEC__X86_64__MTC_UTIL_H_
#define _CORE__INCLUDE__SPEC__X86_64__MTC_UTIL_H_
#include <base/stdint.h>
extern int _mt_begin;
namespace Genode
{
/**
* Return virtual mtc address of the given label for the specified
* virtual mode transition base.
*
* \param virt_base virtual base of the mode transition pages
*/
static addr_t _virt_mtc_addr(addr_t const virt_base, addr_t const label)
{
addr_t const phys_base = (addr_t)&_mt_begin;
return virt_base + (label - phys_base);
}
}
#endif /* _CORE__INCLUDE__SPEC__X86_64__MTC_UTIL_H_ */