summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-09-30SE/FS: Remove System::platform and Platform::intrFrequency.Gabe Black
In order for a system object to work in SE mode and FS mode, it has to either always require a platform object even in SE mode, or get rid of the requirement all together. Making SE mode carry around unnecessary/unused bits of FS seems less than ideal, so I decided to go with the second option. The platform pointer in the System class was used for exactly one purpose, a path for the Alpha Linux system object to get to the real time clock and read its frequency so that it could short cut the loops_per_jiffy calculation. There was also a copy and pasted implementation in MIPS, but since it was only there because it was there in Alpha I still count that as one use. This change reverses the mechanism that communicates the RTC frequency so that the Tsunami platform object pushes it up to the AlphaSystem object. This is slightly less specific than it could be because really only the AlphaLinuxSystem uses it. Because the intrFrequency function on the Platform class was no longer necessary (and unimplemented on anything but Alpha) it was eliminated. After this change, a platform will need to have a system, but a system won't have to have a platform.
2011-09-30X86: Remove FULL_SYSTEM from the x86 faults.Gabe Black
2011-09-30SE/FS: Build the devices in SE mode.Gabe Black
2011-09-30SE/FS: Use the new FullSystem constant where possible.Gabe Black
2011-09-27O3: Tidy up some DPRINTFs in the LSQ.Gabe Black
2011-09-27Faults: Replace calls to genMachineCheckFault with M5PanicFault.Gabe Black
2011-09-27Faults: Add in generic faults that work like panics, warns, etc.Gabe Black
These faults take varargs to their constructors which they print into a string and pass to the M5DebugFault base class. They are basically faults wrapped around panics, faults, warns, and warnonce-es so that they happen only at commit.
2011-09-27Faults: Make the generic faults more consistent between SE and FS.Gabe Black
All of the classes will now be available in both modes, and only GenericPageTableFault will continue to check the mode for conditional compilation. It uses a process object to handle the fault in SE mode, and for now those aren't available in FS mode.
2011-09-26ISA parser: Use '_' instead of '.' to delimit type modifiers on operands.Gabe Black
By using an underscore, the "." is still available and can unambiguously be used to refer to members of a structure if an operand is a structure, class, etc. This change mostly just replaces the appropriate "."s with "_"s, but there were also a few places where the ISA descriptions where handling the extensions themselves and had their own regular expressions to update. The regular expressions in the isa parser were updated as well. It also now looks for one of the defined type extensions specifically after connecting "_" where before it would look for any sequence of characters after a "." following an operand name and try to use it as the extension. This helps to disambiguate cases where a "_" may legitimately be part of an operand name but not separate the name from the type suffix. Because leaving the "_" and suffix on the variable name still leaves a valid C++ identifier and all extensions need to be consistent in a given context, I considered leaving them on as a breadcrumb that would show what the intended type was for that operand. Unfortunately the operands can be referred to in code templates, the Mem operand in particular, and since the exact type of Mem can be different for different uses of the same template, that broke things.
2011-09-26LSQ: Moved a couple of lines to enable O3 + RubyNilay Vaish
This patch makes O3 CPU work along with the Ruby memory model. Ruby overwrites the senderState pointer with another pointer. The pointer is restored only when Ruby gets done with the packet. LSQ makes use of senderState just after sendTiming() returns. But the dynamic_cast returns a NULL pointer since Ruby's senderState pointer is from a different class. Storing the senderState pointer before calling sendTiming() does away with the problem.
2011-09-26SE/FS: Define a const bool FullSystem which will equal FULL_SYSTEM.Gabe Black
This constant will have the same value as FULL_SYSTEM but will not be usable by the preprocessor. It can be substituted into places where FULL_SYSTEM is used in a C++ context and will make it easier to find which parts of the simulator still use FULL_SYSTEM with the preprocessor using grep.
2011-09-24SCons: Add a comment I forgot to add in earlier.Gabe Black
This comment was supposed to be added to an earlier change as part of review feedback, but I accidentally left it out when I pushed. Add it in now.
2011-09-24SCons: Make the ISA parser a source for its output files like the comments say.Gabe Black
There was a change a while ago that refactored some scons stuff which got rid of cpu_models.py but also accidentally got rid of the ISA parser as a source for its target files. That meant that changes which affected the parser wouldn't cause a rebuild unless they also changed one of the description files. This change fixes that.
2011-09-23X86: Move the MSR lookup table out of the TLB and into its own file.Gabe Black
Translating MSR addresses into MSR register indices took a lot of space in the TLB source and made looking around in that file awkward. This change moves the lookup into its own file to get it out of the way. It also changes it from a switch statement to a hash map which should hopefully be a little more efficient.
2011-09-22event: minor cleanupSteve Reinhardt
Initialize flags via the Event constructor instead of calling setFlags() in the body of the derived class's constructor. I forget exactly why, but this made life easier when implementing multi-queue support. Also rename Event::getFlags() to isFlagSet() to better match common usage, and get rid of some unused Event methods.
2011-09-22pseudo_inst: clean up workbegin/workend functionsSteve Reinhardt
Use exitSimLoop() function instead of explicitly scheduling on mainEventQueue (which won't work once we go to multiple event queues). Also introduced a local params variable to shorten a lot of expressions.
2011-09-22params.py: enhance IpAddress param handlingSteve Reinhardt
Print IpAddress params in dot notation for readability. Properly compare IpAddress objects (by value and not object identity). Also fix up derived param classes (IpNetmask and IpWithPort) similarly.
2011-09-19MIPS: Final overhaul of MIPS faults to kill #if FULL_SYSTEMGabe Black
This change is a significant reorganization of the MIPS fault code that gets rid of duplication, fixes some bugs, doubtlessly introduces others, and adds names for the exception code constants.
2011-09-19MIPS, faults: Update how the PC is set.Gabe Black
2011-09-19MIPS: Get rid of skipFaultInstruction and setRestartAddress.Gabe Black
Neither of these functions were used.
2011-09-19MIPS: Use inheritance to consolidate class definitions.Gabe Black
2011-09-19MIPS: Always compile in setExceptionState, including in SE mode.Gabe Black
Also fix the newly exposed and preexisting compile errors. This code hasn't been exposed in a while, and it's not up to date with the rest of gem5.
2011-09-19MIPS: Consolidate TLB related faults.Gabe Black
Pass in a bool to indicate if the fault is from a store instead of having two different classes. The classes were also misleadingly named since loads are also processed by the DTB but should return ITB faults since they aren't stores. The TLB may be returning the wrong fault in this case, but I haven't looked at it closely.
2011-09-19MIPS: Get rid of the unused "count" field in FaultVals.Gabe Black
2011-09-19MIPS: Move the genMachineCheckFault function near MachineCheckFault.Gabe Black
Since they're so closely linked, they should be next to each other in the file.
2011-09-19MIPS: Consolidate the two AddressErrorFault variants.Gabe Black
2011-09-19Faults: Get rid of the unused isAlignmentFault and isMachineCheckFault.Gabe Black
These functions aren't called anywhere and are probably only theoretically useful.
2011-09-19MIPS: Get rid of cruft in the fault classes.Gabe Black
Get rid of Fault classes left over from when this file was copied from Alpha, and rename ArithmeticOverflowFault to be IntegerOverflowFault and get rid of the old IntegerOverflowFault stub. The Integer version is what's actually in the manual, but the Arithmetic version had the implementation.
2011-09-19MIPS: Add constructors to the fault classes.Gabe Black
2011-09-19MIPS: Use the CRTP to streamline the Fault class definitions.Gabe Black
CRTP stands for the curiously recurring template pattern.
2011-09-19SPARC: Remove #if FULL_SYSTEMs from the ISA description.Gabe Black
2011-09-19MIPS: Get rid of #if style config checks in the ISA description.Gabe Black
2011-09-19MIPS: Guard SystemCallFault::invoke consistently.Gabe Black
Make sure it's declared iff it's also defined.
2011-09-19MIPS: Get rid of the unused (and partially defined) CacheError fault.Gabe Black
2011-09-19Endianness: Make it easier to check the compiled in guest endianness.Gabe Black
It was technically possible but clumsy to determine what endianness a guest was configured with using the state in byteswap.hh. This change makes that information available more directly. Also get rid of unused (and mildly redundant) ByteOrderDiffers constant.
2011-09-19Alpha: Get rid of some #if FULL_SYSTEMs in the Alpha ISA description.Gabe Black
The remaining ones are more complicated and may require adjustments in other parts of the simulator.
2011-09-19PseudoInst: Make all the pseudo insts available in SE and FS.Gabe Black
2011-09-19X86: Don't use "#if FULL_SYSTEM" in the X86 ISA description.Gabe Black
The decoder now checks the value of FULL_SYSTEM in a switch statement to decide whether to return a real syscall instruction or one that triggers syscall emulation (or a panic in FS mode). The switch statement should devolve into an if, and also should be optimized out since it's based on constant input.
2011-09-19Syscall: Make the syscall function available in both SE and FS modes.Gabe Black
In FS mode the syscall function will panic, but the interface will be consistent and code which calls syscall can be compiled in. This will allow, for instance, instructions that use syscall to be built unconditionally but then not returned by the decoder.
2011-09-19PseudoInst: Remove the now unnecessary #if FULL_SYSTEMs around pseudoinsts.Gabe Black
2011-09-18Pseudoinst: Add an initParam pseudo inst function.Gabe Black
2011-09-13IGbE: Clean up debug printing and proprly account for copied bytes.Ali Saidi
Some DPRINTFs were printing uninitalized values because the DPRINTFs were always being printed even when the features they were printing weren't being used. This change moves the DPRINTFs into the appropriate if blocks and initializes the state variables correctly. There also is a case where the offset into the packet could be calculated incorrectly during a DMA that is fixed.
2011-09-13ARM: update TLB to set request packet ASID fieldDaniel Johnson
2011-09-13Mem: Allow ASID to be set after request is created.Daniel Johnson
2011-09-13CP15 c15: enable execution with accesses to c15 registersChander Sudanthi
Previously, coprocessor accesses to CP15 c15 would fault. This patch enables accesses but prints out a warning, as the registers are not implemented.
2011-09-13ARM: Implement numcpus bits in L2CTLR register.Daniel Johnson
2011-09-13Prefetch: Don't prefetch if address is in the write queue.Ali Saidi
Check that we're not currently writing back an address the prefetcher is trying to prefetch before issuing it. We previously checked the mshrQueue and the cache itself, but forgot to check the writeBuffer. This fixes a memory corrucption issue with an L2 prefetcher.
2011-09-13LSQ: Only trigger a memory violation with a load/load if the value changes.Ali Saidi
Only create a memory ordering violation when the value could have changed between two subsequent loads, instead of just when loads go out-of-order to the same address. While not very common in the case of Alpha, with an architecture with a hardware table walker this can happen reasonably frequently beacuse a translation will miss and start a table walk and before the CPU re-schedules the faulting instruction another one will pass it to the same address (or cache block depending on the dendency checking). This patch has been tested with a couple of self-checking hand crafted programs to stress ordering between two cores. The performance improvement on SPEC benchmarks can be substantial (2-10%).
2011-09-10MIPS: Implement gem5/src/arch/mips/remote_gdb.cc.Deyuan Guo
So a mips-cross-gdb can connect with gem5(MIPS_SE), and do some remote debugging. Testing: Build gem5 for MIPS_SE and make gem5 wait at beginning: modify "rgdb_wait = -1" to "rgdb_wait = 0" in src/sim/system.cc; scons build/MIPS_SE/gem5.opt CPU_MODELS=O3CPU ---- Build GDB-7.3 mips-cross: ./configure --target=mips-linux-gnu --prefix=xxx/gdb-7.3-install/ make make install ---- Run: ./build/MIPS_SE/gem5.opt configs/example/se.py --detailed --caches ./mips-linux-gnu-gdb xxx/gem5/tests/test-progs/hello/bin/mips/linux/hello (gdb) target remote :7000 (gdb) info registers (gdb) disassemble (gdb) si (gdb) break main (gdb) c (gdb) quit Testing done.
2011-09-10PseudoInst: Add compiler guards to pseudo_inst.hh.Gabe Black