process.cc (6231:8130f3faa584) | process.cc (6232:e0ea733d2105) |
---|---|
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 | 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 |
|
414ArmLinuxProcess::ArmLinuxProcess(LiveProcessParams * params, 415 ObjectFile *objFile) 416 : ArmLiveProcess(params, objFile), | 422ArmLinuxProcess::ArmLinuxProcess(LiveProcessParams * params, 423 ObjectFile *objFile) 424 : ArmLiveProcess(params, objFile), |
417 Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)) | 425 Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)), 426 Num_Priv_Syscall_Descs(sizeof(privSyscallDescs) / sizeof(SyscallDesc)) |
418{ } 419 420SyscallDesc* 421ArmLinuxProcess::getDesc(int callnum) 422{ 423 // Angel SWI syscalls are unsupported in this release | 427{ } 428 429SyscallDesc* 430ArmLinuxProcess::getDesc(int callnum) 431{ 432 // Angel SWI syscalls are unsupported in this release |
424 if (callnum == 0x123456) | 433 if (callnum == 0x123456) { |
425 panic("Attempt to execute an ANGEL_SWI system call (newlib-related)"); | 434 panic("Attempt to execute an ANGEL_SWI system call (newlib-related)"); |
426 else if ((callnum & 0x00f00000) == 0x00900000) | 435 } else if ((callnum & 0x00f00000) == 0x00900000) { |
427 callnum &= 0x000fffff; | 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 } |
|
428 // Linux syscalls have to strip off the 0x00900000 429 430 if (callnum < 0 || callnum > Num_Syscall_Descs) 431 return NULL; 432 433 return &syscallDescs[callnum]; 434} | 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} |