process.cc (13987:0b79ddd399a4) | process.cc (13995:5d459168a680) |
---|---|
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 --- 74 unchanged lines hidden (view full) --- 83}; 84 85RiscvLinuxObjectFileLoader loader; 86 87} // anonymous namespace 88 89/// Target uname() handler. 90static 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 --- 74 unchanged lines hidden (view full) --- 83}; 84 85RiscvLinuxObjectFileLoader loader; 86 87} // anonymous namespace 88 89/// Target uname() handler. 90static SyscallReturn |
91unameFunc64(SyscallDesc *desc, int callnum, Process *process, 92 ThreadContext *tc) | 91unameFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc) |
93{ 94 int index = 0; | 92{ 93 int index = 0; |
94 auto process = tc->getProcessPtr(); |
|
95 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 96 97 strcpy(name->sysname, "Linux"); 98 strcpy(name->nodename,"sim.gem5.org"); 99 strcpy(name->release, "3.0.0"); 100 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); 101 strcpy(name->machine, "riscv64"); 102 103 name.copyOut(tc->getMemProxy()); 104 return 0; 105} 106 107/// Target uname() handler. 108static SyscallReturn | 95 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 96 97 strcpy(name->sysname, "Linux"); 98 strcpy(name->nodename,"sim.gem5.org"); 99 strcpy(name->release, "3.0.0"); 100 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); 101 strcpy(name->machine, "riscv64"); 102 103 name.copyOut(tc->getMemProxy()); 104 return 0; 105} 106 107/// Target uname() handler. 108static SyscallReturn |
109unameFunc32(SyscallDesc *desc, int callnum, Process *process, 110 ThreadContext *tc) | 109unameFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc) |
111{ 112 int index = 0; | 110{ 111 int index = 0; |
112 auto process = tc->getProcessPtr(); |
|
113 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 114 115 strcpy(name->sysname, "Linux"); 116 strcpy(name->nodename,"sim.gem5.org"); 117 strcpy(name->release, "3.0.0"); 118 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); 119 strcpy(name->machine, "riscv32"); 120 --- 687 unchanged lines hidden --- | 113 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 114 115 strcpy(name->sysname, "Linux"); 116 strcpy(name->nodename,"sim.gem5.org"); 117 strcpy(name->release, "3.0.0"); 118 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); 119 strcpy(name->machine, "riscv32"); 120 --- 687 unchanged lines hidden --- |