Deleted Added
sdiff udiff text old ( 6232:e0ea733d2105 ) new ( 6233:014ae6da6c2a )
full compact
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

--- 26 unchanged lines hidden (view full) ---

35#include "arch/arm/isa_traits.hh"
36
37#include "base/trace.hh"
38#include "cpu/thread_context.hh"
39#include "kern/linux/linux.hh"
40
41#include "sim/process.hh"
42#include "sim/syscall_emul.hh"
43
44using namespace std;
45using namespace ArmISA;
46
47/// Target uname() handler.
48static SyscallReturn
49unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
50 ThreadContext *tc)

--- 355 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;

--- 6 unchanged lines hidden (view full) ---

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}