gem5/src
Brandon Potter 7b6cf951e2 sparc: fix bugs caused by cd7f3a1dbf55
Turns out that SPARC SE mode relied on M5_pid being "0" in
all cases. The entries in the SPARC TLBs are accessed with
M5_pid as their context. This is buggy in the sense that it
will never work with more than one process or any
initialization that doesn't have the M5_pid value passed in
as "0".

cd7f3a1dbf55 broke the SPARC build because it deletes M5_pid
and uses a _pid with a default of "100" instead. This caused
the SPARC TLB to never return any valid lookups for any
request; the program never moved past the first instruction
with SPARC SE in the regression tester.

The solution proposed in this changeset is to initialize
the address space identification register with the PID value
that is passed into the process class as a parameter from
Python. This should return the correct responses from the TLB
since the insertions and lookups into the page table will be
using the same PID.

Furthermore, there are corner cases in the code which elevate
privileges and revert to using context "0" as the context in
the TLB. I believe that these are related to kernel level
traps and hypervisor privilege escalations, but I'm not
completely sure. I've tried to address the corner cases
properly, but it would be beneficial to have someone who is
familiar with the SPARC architecture to take a look at this
fix.
2017-02-17 12:01:51 -05:00
..
arch sparc: fix bugs caused by cd7f3a1dbf55 2017-02-17 12:01:51 -05:00
base mem, stats: fix typos in CommMonitor and Stats 2017-02-15 14:59:06 -06:00
cpu sim, kvm: make KvmVM a System parameter 2017-02-14 15:09:18 -06:00
dev arm, kvm: Automatically use the MuxingKvmGic 2017-02-14 15:09:18 -06:00
doc sim: Adding support for power models 2016-06-06 17:16:44 +01:00
doxygen MEM: Put memory system document into doxygen 2012-09-25 11:49:41 -05:00
gpu-compute style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
kern style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
mem mem, stats: fix typos in CommMonitor and Stats 2017-02-15 14:59:06 -06:00
proto proto: Fix warnings for protoc v3 2017-01-27 15:07:20 -06:00
python misc: Add Python.h header to pyevents.hh 2017-02-10 10:00:18 -05:00
sim sim: fix out-of-bounds error in syscall_desc 2017-02-17 12:01:50 -05:00
unittest misc: Update #!env calls for python to explicit version 2017-02-10 10:00:18 -05:00
Doxyfile Doxygen: Update the version of the Doxyfile 2012-10-11 06:38:42 -04:00
SConscript python: Move native wrappers to the _m5 namespace 2017-01-27 12:40:01 +00:00