process.cc (11794:97eebddaae84) process.cc (11851:824055fe6b30)
1/*
2 * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * This software was developed by the University of Cambridge Computer
6 * Laboratory as part of the CTSRD Project, with support from the UK Higher
7 * Education Innovation Fund (HEIF).
8 *

--- 39 unchanged lines hidden (view full) ---

48#include "sim/syscall_desc.hh"
49#include "sim/syscall_emul.hh"
50#include "sim/system.hh"
51
52using namespace std;
53using namespace ArmISA;
54
55static SyscallReturn
1/*
2 * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * This software was developed by the University of Cambridge Computer
6 * Laboratory as part of the CTSRD Project, with support from the UK Higher
7 * Education Innovation Fund (HEIF).
8 *

--- 39 unchanged lines hidden (view full) ---

48#include "sim/syscall_desc.hh"
49#include "sim/syscall_emul.hh"
50#include "sim/system.hh"
51
52using namespace std;
53using namespace ArmISA;
54
55static SyscallReturn
56issetugidFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
56issetugidFunc(SyscallDesc *desc, int callnum, Process *process,
57 ThreadContext *tc)
58{
59
60 return 0;
61}
62
63static SyscallReturn
57 ThreadContext *tc)
58{
59
60 return 0;
61}
62
63static SyscallReturn
64sysctlFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
64sysctlFunc(SyscallDesc *desc, int callnum, Process *process,
65 ThreadContext *tc)
66{
67 int index = 0;
68 uint64_t ret;
69
70 Addr namep = process->getSyscallArg(tc, index);
71 size_t namelen = process->getSyscallArg(tc, index);
72 Addr oldp = process->getSyscallArg(tc, index);

--- 1128 unchanged lines hidden (view full) ---

1201 /* 542 */ SyscallDesc("unused#542", unimplementedFunc),
1202 /* 543 */ SyscallDesc("unused#543", unimplementedFunc),
1203 /* 544 */ SyscallDesc("unused#544", unimplementedFunc),
1204 /* 545 */ SyscallDesc("unused#545", unimplementedFunc),
1205 /* 546 */ SyscallDesc("unused#546", unimplementedFunc),
1206 /* 547 */ SyscallDesc("unused#547", unimplementedFunc),
1207};
1208
65 ThreadContext *tc)
66{
67 int index = 0;
68 uint64_t ret;
69
70 Addr namep = process->getSyscallArg(tc, index);
71 size_t namelen = process->getSyscallArg(tc, index);
72 Addr oldp = process->getSyscallArg(tc, index);

--- 1128 unchanged lines hidden (view full) ---

1201 /* 542 */ SyscallDesc("unused#542", unimplementedFunc),
1202 /* 543 */ SyscallDesc("unused#543", unimplementedFunc),
1203 /* 544 */ SyscallDesc("unused#544", unimplementedFunc),
1204 /* 545 */ SyscallDesc("unused#545", unimplementedFunc),
1205 /* 546 */ SyscallDesc("unused#546", unimplementedFunc),
1206 /* 547 */ SyscallDesc("unused#547", unimplementedFunc),
1207};
1208
1209ArmFreebsdProcess32::ArmFreebsdProcess32(LiveProcessParams * params,
1209ArmFreebsdProcess32::ArmFreebsdProcess32(ProcessParams * params,
1210 ObjectFile *objFile, ObjectFile::Arch _arch)
1210 ObjectFile *objFile, ObjectFile::Arch _arch)
1211 : ArmLiveProcess32(params, objFile, _arch)
1211 : ArmProcess32(params, objFile, _arch)
1212{
1213 SyscallTable table;
1214
1215 table.descs = syscallDescs32;
1216 table.size = sizeof(syscallDescs32) / sizeof(SyscallDesc);
1217 table.base = 0;
1218 syscallTables.push_back(table);
1219}
1220
1212{
1213 SyscallTable table;
1214
1215 table.descs = syscallDescs32;
1216 table.size = sizeof(syscallDescs32) / sizeof(SyscallDesc);
1217 table.base = 0;
1218 syscallTables.push_back(table);
1219}
1220
1221ArmFreebsdProcess64::ArmFreebsdProcess64(LiveProcessParams * params,
1221ArmFreebsdProcess64::ArmFreebsdProcess64(ProcessParams * params,
1222 ObjectFile *objFile, ObjectFile::Arch _arch)
1222 ObjectFile *objFile, ObjectFile::Arch _arch)
1223 : ArmLiveProcess64(params, objFile, _arch)
1223 : ArmProcess64(params, objFile, _arch)
1224{
1225 SyscallTable table;
1226
1227 table.descs = syscallDescs64;
1228 table.size = sizeof(syscallDescs64) / sizeof(SyscallDesc);
1229 table.base = 0;
1230 syscallTables.push_back(table);
1231}

--- 32 unchanged lines hidden (view full) ---

1264{
1265
1266 return getFreebsdDesc(callnum);
1267}
1268
1269void
1270ArmFreebsdProcess32::initState()
1271{
1224{
1225 SyscallTable table;
1226
1227 table.descs = syscallDescs64;
1228 table.size = sizeof(syscallDescs64) / sizeof(SyscallDesc);
1229 table.base = 0;
1230 syscallTables.push_back(table);
1231}

--- 32 unchanged lines hidden (view full) ---

1264{
1265
1266 return getFreebsdDesc(callnum);
1267}
1268
1269void
1270ArmFreebsdProcess32::initState()
1271{
1272 ArmLiveProcess32::initState();
1272 ArmProcess32::initState();
1273 // The 32 bit equivalent of the comm page would be set up here.
1274}
1275
1276void
1277ArmFreebsdProcess64::initState()
1278{
1273 // The 32 bit equivalent of the comm page would be set up here.
1274}
1275
1276void
1277ArmFreebsdProcess64::initState()
1278{
1279 ArmLiveProcess64::initState();
1279 ArmProcess64::initState();
1280 // The 64 bit equivalent of the comm page would be set up here.
1281}
1280 // The 64 bit equivalent of the comm page would be set up here.
1281}