process.cc (11794:97eebddaae84) | process.cc (11851:824055fe6b30) |
---|---|
1/* 2 * Copyright (c) 2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * Copyright (c) 2016 The University of Virginia 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 39 unchanged lines hidden (view full) --- 48#include "sim/syscall_emul.hh" 49#include "sim/system.hh" 50 51using namespace std; 52using namespace RiscvISA; 53 54/// Target uname() handler. 55static SyscallReturn | 1/* 2 * Copyright (c) 2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * Copyright (c) 2016 The University of Virginia 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 39 unchanged lines hidden (view full) --- 48#include "sim/syscall_emul.hh" 49#include "sim/system.hh" 50 51using namespace std; 52using namespace RiscvISA; 53 54/// Target uname() handler. 55static SyscallReturn |
56unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, | 56unameFunc(SyscallDesc *desc, int callnum, Process *process, |
57 ThreadContext *tc) 58{ 59 int index = 0; 60 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 61 62 strcpy(name->sysname, "Linux"); 63 strcpy(name->nodename,"sim.gem5.org"); 64 strcpy(name->release, "3.0.0"); --- 56 unchanged lines hidden (view full) --- 121 {1030, SyscallDesc("mkdir", mkdirFunc)}, 122 {1033, SyscallDesc("access", accessFunc)}, 123 {1038, SyscallDesc("stat", stat64Func<RiscvLinux>)}, 124 {1039, SyscallDesc("lstat", lstat64Func<RiscvLinux>)}, 125 {1062, SyscallDesc("time", timeFunc<RiscvLinux>)}, 126 {2011, SyscallDesc("getmainvars", unimplementedFunc)}, 127}; 128 | 57 ThreadContext *tc) 58{ 59 int index = 0; 60 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 61 62 strcpy(name->sysname, "Linux"); 63 strcpy(name->nodename,"sim.gem5.org"); 64 strcpy(name->release, "3.0.0"); --- 56 unchanged lines hidden (view full) --- 121 {1030, SyscallDesc("mkdir", mkdirFunc)}, 122 {1033, SyscallDesc("access", accessFunc)}, 123 {1038, SyscallDesc("stat", stat64Func<RiscvLinux>)}, 124 {1039, SyscallDesc("lstat", lstat64Func<RiscvLinux>)}, 125 {1062, SyscallDesc("time", timeFunc<RiscvLinux>)}, 126 {2011, SyscallDesc("getmainvars", unimplementedFunc)}, 127}; 128 |
129RiscvLinuxProcess::RiscvLinuxProcess(LiveProcessParams * params, 130 ObjectFile *objFile) : RiscvLiveProcess(params, objFile) | 129RiscvLinuxProcess::RiscvLinuxProcess(ProcessParams * params, 130 ObjectFile *objFile) : RiscvProcess(params, objFile) |
131{} 132 133SyscallDesc* 134RiscvLinuxProcess::getDesc(int callnum) 135{ 136 return syscallDescs.find(callnum) != syscallDescs.end() ? 137 &syscallDescs.at(callnum) : nullptr; 138} | 131{} 132 133SyscallDesc* 134RiscvLinuxProcess::getDesc(int callnum) 135{ 136 return syscallDescs.find(callnum) != syscallDescs.end() ? 137 &syscallDescs.at(callnum) : nullptr; 138} |