diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-02-28 16:36:38 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-02-28 16:36:38 +0000 |
commit | 29e5df890d9512a6a2c726dcb4ee46b92ac4cb22 (patch) | |
tree | 4858cf8e087521bba01ad78783a5f4a768b5ab26 /src/cpu | |
parent | 99948060b2863b37c0db5e6b609ff7ff30de6d1b (diff) | |
download | gem5-29e5df890d9512a6a2c726dcb4ee46b92ac4cb22.tar.xz |
Make trap instructions always generate TrapInstruction Fault objects which call into the Process object to handle system calls. Refactored the Process objects, and move the handler code into it's own file, and add some syscalls which are used in a natively compiled hello world. Software traps with trap number 3 (not syscall number 3) are supposed to cause the register windows to be flushed but are ignored right now. Finally, made uname for SPARC report a 2.6.12 kernel which is what m22-018.pool happens to be running.
--HG--
extra : convert_revision : ea873f01c62234c0542f310cc143c6a7c76ade94
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/thread_context.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index 16e491fd3..a24dc49da 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -254,6 +254,8 @@ class ThreadContext // Same with st cond failures. virtual Counter readFuncExeInst() = 0; + virtual void syscall(int64_t callnum) = 0; + // This function exits the thread context in the CPU and returns // 1 if the CPU has no more active threads (meaning it's OK to exit); // Used in syscall-emulation mode when a thread calls the exit syscall. @@ -441,6 +443,9 @@ class ProxyThreadContext : public ThreadContext void setSyscallReturn(SyscallReturn return_value) { actualTC->setSyscallReturn(return_value); } + void syscall(int64_t callnum) + { actualTC->syscall(callnum); } + Counter readFuncExeInst() { return actualTC->readFuncExeInst(); } #endif |