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_core_ume.h"
34 #include <l4/re/env.h>
38 #include <l4/sys/kdebug.h>
40 #include "pub_tool_basics.h"
42 * Therefore coregrind knows which tool actually runs,
43 * every tool must export his name.
45 extern HChar *VG_(toolname);
48 * Function-Wrapping stuff
50 struct vg_l4re_capfunc_info {
51 void (*vg_cap_alloc)(ThreadId tid, long idx);
52 void (*vg_cap_free)(ThreadId tid, long idx);
55 void vg_cap_alloc(long, long);
56 void vg_cap_free(long, long);
58 /*--------------------------------------------------------------------*/
60 /*--------------------------------------------------------------------*/
62 extern l4_cap_idx_t l4_vcap_thread;
76 l4_addr_t offset_in_ds;
80 struct vrm_region_lists {
83 unsigned region_count;
85 struct vrm_region *regions;
86 struct vrm_area *areas;
90 void vrm_get_lists(struct vrm_region_lists *rlist, unsigned num_regions, unsigned num_areas);
93 * Start the L4Re vcap thread
95 void l4re_vcap_start_thread(void);
96 EXTERN_C void vcap_init(void);
101 * Instrument L4Re env with vcap modifications
103 * \param envp - old environment
104 * \return pointer to new environment
106 void *l4re_vcap_modify_env(struct ume_auxv *envp, Addr client_l4re_env_addr);
108 extern void *client_env;
109 extern unsigned int client_env_size;
111 #endif // __PUB_L4RE_H
113 /*--------------------------------------------------------------------*/
115 /*--------------------------------------------------------------------*/