diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:38 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:38 -0400 |
commit | db8b1e4b78b7f51b673f80d4f2a1e5f5c86d4446 (patch) | |
tree | ca55fe420ad974c39432eab352147f52c23e7f48 /src/cpu/inorder/cpu.hh | |
parent | c95fe261abab85bee247737a3d171378689891e0 (diff) | |
download | gem5-db8b1e4b78b7f51b673f80d4f2a1e5f5c86d4446.tar.xz |
inorder: treat SE mode syscalls as a trapping instruction
define a syscallContext to schedule the syscall and then use syscall() to actually perform the action
Diffstat (limited to 'src/cpu/inorder/cpu.hh')
-rw-r--r-- | src/cpu/inorder/cpu.hh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index c8ac33a89..a87030828 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -182,7 +182,7 @@ class InOrderCPU : public BaseCPU HaltThread, SuspendThread, Trap, - InstGraduated, + Syscall, SquashFromMemStall, UpdatePCs, NumCPUEvents @@ -192,6 +192,7 @@ class InOrderCPU : public BaseCPU enum CPUEventPri { InOrderCPU_Pri = Event::CPU_Tick_Pri, + Syscall_Pri = Event::CPU_Tick_Pri + 9, ActivateNextReadyThread_Pri = Event::CPU_Tick_Pri + 10 }; @@ -207,6 +208,7 @@ class InOrderCPU : public BaseCPU DynInstPtr inst; Fault fault; unsigned vpe; + short syscall_num; public: /** Constructs a CPU event. */ @@ -436,6 +438,13 @@ class InOrderCPU : public BaseCPU /** Check if this address is a valid data address. */ bool validDataAddr(Addr addr) { return true; } +#else + /** Schedule a syscall on the CPU */ + void syscallContext(Fault fault, ThreadID tid, DynInstPtr inst, + int delay = 0); + + /** Executes a syscall.*/ + void syscall(int64_t callnum, ThreadID tid); #endif /** Schedule a trap on the CPU */ @@ -650,9 +659,6 @@ class InOrderCPU : public BaseCPU Fault write(DynInstPtr inst, uint8_t *data, unsigned size, Addr addr, unsigned flags, uint64_t *write_res = NULL); - /** Executes a syscall.*/ - void syscall(int64_t callnum, ThreadID tid); - public: /** Per-Thread List of all the instructions in flight. */ std::list<DynInstPtr> instList[ThePipeline::MaxThreads]; |