1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 31 unchanged lines hidden (view full) --- 40#include "sim/syscall_emul.hh" 41 42using namespace std; 43using namespace SparcISA; 44 45 46/// Target uname() handler. 47static SyscallReturn |
48unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, |
49 ThreadContext *tc) 50{ 51 TypedBufferArg<Solaris::utsname> name(tc->getSyscallArg(0)); 52 53 strcpy(name->sysname, "SunOS"); 54 strcpy(name->nodename, "m5.eecs.umich.edu"); 55 strcpy(name->release, "5.9"); //?? do we want this or something newer? 56 strcpy(name->version, "Generic_118558-21"); --- 266 unchanged lines hidden (view full) --- 323 324SparcSolarisProcess::SparcSolarisProcess(const std::string &name, 325 ObjectFile *objFile, 326 System * system, 327 int stdin_fd, 328 int stdout_fd, 329 int stderr_fd, 330 std::vector<std::string> &argv, |
331 std::vector<std::string> &envp, 332 uint64_t _uid, 333 uint64_t _euid, 334 uint64_t _gid, 335 uint64_t _egid, 336 uint64_t _pid, 337 uint64_t _ppid) |
338 : SparcLiveProcess(name, objFile, system, |
339 stdin_fd, stdout_fd, stderr_fd, argv, envp, 340 _uid, _euid, _gid, _egid, _pid, _ppid), |
341 Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)) 342{ 343 // The sparc syscall table must be <= 284 entries because that is all there 344 // is space for. 345 assert(Num_Syscall_Descs <= 284); 346} 347 348 349 350SyscallDesc* 351SparcSolarisProcess::getDesc(int callnum) 352{ 353 if (callnum < 0 || callnum > Num_Syscall_Descs) 354 return NULL; 355 return &syscallDescs[callnum]; 356} |