1 /*--------------------------------------------------------------------*/
2 /*--- L4 stuff pub_l4re.h ---*/
3 /*--------------------------------------------------------------------*/
6 This file is part of Valgrind, a dynamic binary instrumentation
9 Copyright (C) 2000-2008 Julian Seward
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation; either version 2 of the
15 License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 The GNU General Public License is contained in the file COPYING.
33 #include "pub_tool_basics.h"
34 //#include "pub_core_ume.h"
35 #include <l4/re/env.h>
37 #include <l4/sys/kdebug.h>
40 * Therefore coregrind knows which tool actually runs,
41 * every tool must export his name.
43 extern HChar *VG_(toolname);
46 * Function-Wrapping stuff
48 struct vg_l4re_capfunc_info {
49 void (*vg_cap_alloc)(ThreadId tid, long idx);
50 void (*vg_cap_free)(ThreadId tid, long idx);
53 void vg_cap_alloc(long, long);
54 void vg_cap_free(long, long);
56 /*--------------------------------------------------------------------*/
58 /*--------------------------------------------------------------------*/
60 extern l4_cap_idx_t l4_vcap_thread;
74 l4_addr_t offset_in_ds;
78 struct vrm_region_lists {
81 unsigned region_count;
83 struct vrm_region *regions;
84 struct vrm_area *areas;
88 void vrm_get_lists(struct vrm_region_lists *rlist, unsigned num_regions, unsigned num_areas);
91 * Start the L4Re vcap thread
93 void l4re_vcap_start_thread(void);
94 EXTERN_C void vcap_init(void);
97 * Instrument L4Re env with vcap modifications
99 * \param envp - old environment
100 * \return pointer to new environment
102 void *l4re_vcap_modify_env(struct ume_auxv *envp);
104 extern void *client_env;
105 extern unsigned int client_env_size;
107 #endif // __PUB_L4RE_H
109 /*--------------------------------------------------------------------*/
111 /*--------------------------------------------------------------------*/