summaryrefslogtreecommitdiff
path: root/src/arch-mips.h
blob: 02ca3476fa259e37ef5ae9618dfcf16261efac00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
 * Enhanced Seccomp MIPS Specific Code
 *
 * Copyright (c) 2014 Imagination Technologies Ltd.
 * Author: Markos Chandras <markos.chandras@imgtec.com>
 *
 */

/*
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of version 2.1 of the GNU Lesser General Public License as
 * published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, see <http://www.gnu.org/licenses>.
 */

#ifndef _ARCH_MIPS_H
#define _ARCH_MIPS_H

#include <inttypes.h>

#include "arch.h"
#include "system.h"

#define mips_arg_count_max		6

extern const struct arch_def arch_def_mips;
extern const struct arch_def arch_def_mipsel;

#define mips_arg_offset(x)	(offsetof(struct seccomp_data, args[x]) + 4)
#define mipsel_arg_offset(x)	(offsetof(struct seccomp_data, args[x]))

int mips_syscall_resolve_name(const char *name);
const char *mips_syscall_resolve_num(int num);

const char *mips_syscall_iterate_name(unsigned int spot);

#endif