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 --- 397 unchanged lines hidden (view full) --- 406 /* 341 */ SyscallDesc("arm_sync_file_range", unimplementedFunc), 407 /* 342 */ SyscallDesc("tee", unimplementedFunc), 408 /* 343 */ SyscallDesc("vmsplice", unimplementedFunc), 409 /* 344 */ SyscallDesc("move_pages", unimplementedFunc), 410 /* 345 */ SyscallDesc("getcpu", unimplementedFunc), 411 /* 346 */ SyscallDesc("epoll_pwait", unimplementedFunc), 412}; 413 |
414SyscallDesc ArmLinuxProcess::privSyscallDescs[] = { 415 /* 1 */ SyscallDesc("breakpoint", unimplementedFunc), 416 /* 2 */ SyscallDesc("cacheflush", unimplementedFunc), 417 /* 3 */ SyscallDesc("usr26", unimplementedFunc), 418 /* 4 */ SyscallDesc("usr32", unimplementedFunc), 419 /* 5 */ SyscallDesc("set_tls", unimplementedFunc) 420}; 421 |
422ArmLinuxProcess::ArmLinuxProcess(LiveProcessParams * params, 423 ObjectFile *objFile) 424 : ArmLiveProcess(params, objFile), |
425 Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)), 426 Num_Priv_Syscall_Descs(sizeof(privSyscallDescs) / sizeof(SyscallDesc)) |
427{ } 428 429SyscallDesc* 430ArmLinuxProcess::getDesc(int callnum) 431{ 432 // Angel SWI syscalls are unsupported in this release |
433 if (callnum == 0x123456) { |
434 panic("Attempt to execute an ANGEL_SWI system call (newlib-related)"); |
435 } else if ((callnum & 0x00f00000) == 0x00900000) { |
436 callnum &= 0x000fffff; |
437 if ((callnum & 0x0f0000) == 0xf0000) { 438 callnum -= 0x0f0001; 439 if (callnum < 0 || callnum > Num_Priv_Syscall_Descs) 440 return NULL; 441 return &privSyscallDescs[callnum]; 442 } 443 } |
444 // Linux syscalls have to strip off the 0x00900000 445 446 if (callnum < 0 || callnum > Num_Syscall_Descs) 447 return NULL; 448 449 return &syscallDescs[callnum]; 450} |