3 * \ingroup l4util_kip_api
6 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
7 * Alexander Warg <warg@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
9 * This file is part of TUD:OS and distributed under the terms of the
10 * GNU Lesser General Public License 2.1.
11 * Please see the COPYING-LGPL-2.1 file for details.
16 #include <l4/sys/kip.h>
17 #include <l4/sys/compiler.h>
20 * \defgroup l4util_kip_api Kernel Interface Page API
29 * \brief Return whether the kernel is running native or under UX.
31 * Returns whether the kernel is running natively or under UX. The KIP will
32 * be mapped if not already mapped. The KIP will not be unmapped again.
34 * \return 1 when running under UX, 0 if not running under UX
36 L4_CV int l4util_kip_kernel_is_ux(l4_kernel_info_t *);
39 * \brief Check if kernel supports a feature.
41 * \param str Feature name to check.
43 * \return 1 if the kernel supports the feature, 0 if not.
45 * Checks the feature field in the KIP for the given string. The KIP will be
46 * mapped if not already mapped. The KIP will not be unmapped again.
48 L4_CV int l4util_kip_kernel_has_feature(l4_kernel_info_t *, const char *str);
51 * \brief Return kernel ABI version.
53 * \return Kernel ABI version.
55 L4_CV unsigned long l4util_kip_kernel_abi_version(l4_kernel_info_t *);
58 * \brief Return end of virtual memory.
59 * \ingroup l4util_memdesc
61 * \return 0 if memory descriptor could not be found,
62 * last address of address space otherwise
64 L4_CV l4_addr_t l4util_memdesc_vm_high(l4_kernel_info_t *kinfo);
69 * \brief Cycle through kernel features given in the KIP.
71 * Cycles through all KIP kernel feature strings. s must be a character
72 * pointer (char *) initialized with l4util_kip_version_string().
74 #define l4util_kip_for_each_feature(s) \
75 for (s += strlen(s) + 1; *s; s += strlen(s) + 1)