/* * \brief Access to kernel info page (KIP) * \author Julian Stecklina * \date 2008-02-20 */ /* * Copyright (C) 2008-2011 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 _INCLUDE__PISTACHIO__KIP_H_ #define _INCLUDE__PISTACHIO__KIP_H_ namespace Pistachio { #include #include /** * Return a pointer to the kernel info page */ void *get_kip(); unsigned int get_page_size_log2(); L4_Word_t get_page_mask(); inline L4_Word_t get_page_size() { return 1<ThreadInfo.X.UserBase, 1); } inline unsigned int get_user_base() { return ((L4_KernelInterfacePage_t *)get_kip())->ThreadInfo.X.UserBase; } inline unsigned int get_threadno_bits() { #ifdef L4_32BIT return 18; #else #error "Unsupported architecture." #endif } } #endif /* _INCLUDE__PISTACHIO__KIP_H_ */