paul@324 | 1 | /* |
paul@324 | 2 | * Capability mapping between tasks. |
paul@324 | 3 | * |
paul@500 | 4 | * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk> |
paul@324 | 5 | * |
paul@324 | 6 | * This program is free software; you can redistribute it and/or |
paul@324 | 7 | * modify it under the terms of the GNU General Public License as |
paul@324 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@324 | 9 | * the License, or (at your option) any later version. |
paul@324 | 10 | * |
paul@324 | 11 | * This program is distributed in the hope that it will be useful, |
paul@324 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@324 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@324 | 14 | * GNU General Public License for more details. |
paul@324 | 15 | * |
paul@324 | 16 | * You should have received a copy of the GNU General Public License |
paul@324 | 17 | * along with this program; if not, write to the Free Software |
paul@324 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@324 | 19 | * Boston, MA 02110-1301, USA |
paul@324 | 20 | */ |
paul@324 | 21 | |
paul@324 | 22 | #pragma once |
paul@324 | 23 | |
paul@324 | 24 | #include <l4/sys/types.h> |
paul@324 | 25 | |
paul@324 | 26 | EXTERN_C_BEGIN |
paul@324 | 27 | |
paul@324 | 28 | struct ipc_mapped_cap |
paul@324 | 29 | { |
paul@376 | 30 | l4_cap_idx_t mapped_cap; |
paul@324 | 31 | l4_cap_idx_t cap; |
paul@324 | 32 | unsigned char rights; |
paul@376 | 33 | l4_umword_t obj_rights; |
paul@324 | 34 | }; |
paul@324 | 35 | |
paul@324 | 36 | long ipc_map_capability(l4_cap_idx_t task, struct ipc_mapped_cap mapped_cap); |
paul@324 | 37 | |
paul@365 | 38 | long ipc_map_capabilities(l4_cap_idx_t task, struct ipc_mapped_cap mapped_caps[], |
paul@365 | 39 | unsigned int *count); |
paul@324 | 40 | |
paul@500 | 41 | long ipc_unmap_capability(l4_cap_idx_t task, l4_cap_idx_t mapped_cap); |
paul@500 | 42 | |
paul@324 | 43 | EXTERN_C_END |
paul@365 | 44 | |
paul@365 | 45 | /* vim: tabstop=2 expandtab shiftwidth=2 |
paul@365 | 46 | */ |