process.cc (6235:33adfb8af4c0) | process.cc (6236:9c0f2130478b) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007-2008 The Florida State University 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 241 unchanged lines hidden (view full) --- 250 /* 184 */ SyscallDesc("capget", unimplementedFunc), 251 /* 185 */ SyscallDesc("capset", unimplementedFunc), 252 /* 186 */ SyscallDesc("sigaltstack", unimplementedFunc), 253 /* 187 */ SyscallDesc("sendfile", unimplementedFunc), 254 /* 188 */ SyscallDesc("getpmsg", unimplementedFunc), 255 /* 189 */ SyscallDesc("putpmsg", unimplementedFunc), 256 /* 190 */ SyscallDesc("vfork", unimplementedFunc), 257 /* 191 */ SyscallDesc("getrlimit", unimplementedFunc), | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007-2008 The Florida State University 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 241 unchanged lines hidden (view full) --- 250 /* 184 */ SyscallDesc("capget", unimplementedFunc), 251 /* 185 */ SyscallDesc("capset", unimplementedFunc), 252 /* 186 */ SyscallDesc("sigaltstack", unimplementedFunc), 253 /* 187 */ SyscallDesc("sendfile", unimplementedFunc), 254 /* 188 */ SyscallDesc("getpmsg", unimplementedFunc), 255 /* 189 */ SyscallDesc("putpmsg", unimplementedFunc), 256 /* 190 */ SyscallDesc("vfork", unimplementedFunc), 257 /* 191 */ SyscallDesc("getrlimit", unimplementedFunc), |
258 /* 192 */ SyscallDesc("mmap2", unimplementedFunc), | 258 /* 192 */ SyscallDesc("mmap2", mmapFunc<ArmLinux>), |
259 /* 193 */ SyscallDesc("truncate64", unimplementedFunc), 260 /* 194 */ SyscallDesc("ftruncate64", unimplementedFunc), 261 /* 195 */ SyscallDesc("stat64", unimplementedFunc), 262 /* 196 */ SyscallDesc("lstat64", lstat64Func<ArmLinux>), 263 /* 197 */ SyscallDesc("fstat64", fstatFunc<ArmLinux>), 264 /* 198 */ SyscallDesc("lchown", unimplementedFunc), 265 /* 199 */ SyscallDesc("getuid", getuidFunc), 266 /* 200 */ SyscallDesc("getgid", getgidFunc), --- 237 unchanged lines hidden (view full) --- 504 505 uint8_t get_tls[] = 506 { 507 0x08, 0x00, 0x9f, 0xe5, //ldr r0, [pc, #(16 - 8)] 508 0x0e, 0xf0, 0xa0, 0xe1 //usr_ret lr 509 }; 510 tc->getMemPort()->writeBlob(commPage + 0x0fe0, get_tls, sizeof(get_tls)); 511} | 259 /* 193 */ SyscallDesc("truncate64", unimplementedFunc), 260 /* 194 */ SyscallDesc("ftruncate64", unimplementedFunc), 261 /* 195 */ SyscallDesc("stat64", unimplementedFunc), 262 /* 196 */ SyscallDesc("lstat64", lstat64Func<ArmLinux>), 263 /* 197 */ SyscallDesc("fstat64", fstatFunc<ArmLinux>), 264 /* 198 */ SyscallDesc("lchown", unimplementedFunc), 265 /* 199 */ SyscallDesc("getuid", getuidFunc), 266 /* 200 */ SyscallDesc("getgid", getgidFunc), --- 237 unchanged lines hidden (view full) --- 504 505 uint8_t get_tls[] = 506 { 507 0x08, 0x00, 0x9f, 0xe5, //ldr r0, [pc, #(16 - 8)] 508 0x0e, 0xf0, 0xa0, 0xe1 //usr_ret lr 509 }; 510 tc->getMemPort()->writeBlob(commPage + 0x0fe0, get_tls, sizeof(get_tls)); 511} |
512 513ArmISA::IntReg 514ArmLinuxProcess::getSyscallArg(ThreadContext *tc, int i) 515{ 516 // Linux apparently allows more parameter than the ABI says it should. 517 // This limit may need to be increased even further. 518 assert(i < 6); 519 return tc->readIntReg(ArgumentReg0 + i); 520} 521 522void 523ArmLinuxProcess::setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val) 524{ 525 // Linux apparently allows more parameter than the ABI says it should. 526 // This limit may need to be increased even further. 527 assert(i < 6); 528 tc->setIntReg(ArgumentReg0 + i, val); 529} |
|