summaryrefslogtreecommitdiff
path: root/src/arch/x86/process.cc
AgeCommit message (Collapse)Author
2010-08-23X86: Create a directory for files that define register indexes.Gabe Black
This is to help tidy up arch/x86. These files should not be used external to the ISA. --HG-- rename : src/arch/x86/apicregs.hh => src/arch/x86/regs/apic.hh rename : src/arch/x86/floatregs.hh => src/arch/x86/regs/float.hh rename : src/arch/x86/intregs.hh => src/arch/x86/regs/int.hh rename : src/arch/x86/miscregs.hh => src/arch/x86/regs/misc.hh rename : src/arch/x86/segmentregs.hh => src/arch/x86/regs/segment.hh
2010-08-17sim: revamp unserialization procedureSteve Reinhardt
Replace direct call to unserialize() on each SimObject with a pair of calls for better control over initialization in both ckpt and non-ckpt cases. If restoring from a checkpoint, loadState(ckpt) is called on each SimObject. The default implementation simply calls unserialize() if there is a corresponding checkpoint section, so we get backward compatibility for existing objects. However, objects can override loadState() to get other behaviors, e.g., doing other programmed initializations after unserialize(), or complaining if no checkpoint section is found. (Note that the default warning for a missing checkpoint section is now gone.) If not restoring from a checkpoint, we call the new initState() method on each SimObject instead. This provides a hook for state initializations that are only required when *not* restoring from a checkpoint. Given this new framework, do some cleanup of LiveProcess subclasses and X86System, which were (in some cases) emulating initState() behavior in startup via a local flag or (in other cases) erroneously doing initializations in startup() that clobbered state loaded earlier by unserialize().
2010-05-23copyright: Change HP copyright on x86 code to be more friendlyNathan Binkert
2010-05-03X86: Update the base aux vector X86 processes install.Gabe Black
2009-11-08compile: wrap 64bit numbers with ULL() so 32bit compiles workNathan Binkert
In the isa_parser, we need to check case statements.
2009-11-04X86: Enable x86_64 vsyscall supportVince Weaver
64-bit vsyscall is different than 32-bit. There are only two syscalls, time and gettimeofday. On a real system, there is complicated code that implements these without entering the kernel. That would be complicated to implement in m5. Instead we just place code that calls the regular syscalls (this is how tools such as valgrind handle this case). This is needed for the perlbmk spec2k benchmark.
2009-10-30Syscalls: Make system calls access arguments like a stack, not an array.Gabe Black
When accessing arguments for a syscall, the position of an argument depends on the policies of the ISA, how much space preceding arguments took up, and the "alignment" of the index for this particular argument into the number of possible storate locations. This change adjusts getSyscallArg to take its index parameter by reference instead of value and to adjust it to point to the possible location of the next argument on the stack, basically just after the current one. This way, the rules for the new argument can be applied locally without knowing about other arguments since those have already been taken into account implicitly. All system calls have also been changed to reflect the new interface. In a number of cases this made the implementation clearer since it encourages arguments to be collected in one place in order and then used as necessary later, as opposed to scattering them throughout the function or using them in place in long expressions. It also discourages using getSyscallArg over and over to retrieve the same value when a temporary would do the job.
2009-10-02X86: Make successive anonymous mmaps move down in 32 bit SE mode Linux.Gabe Black
2009-08-17X86: Initialize the MXCSR in SE mode.Gabe Black
2009-07-19X86: Move a displaced comment back to where it goes.Gabe Black
2009-07-08Registers: Add an ISA object which replaces the MiscRegFile.Gabe Black
This object encapsulates (or will eventually) the identity and characteristics of the ISA in the CPU.
2009-05-28X86: Keep track of more descriptor state to accomodate KVM.Gabe Black
2009-04-26X86: Centralize updates to the handy M5 reg.Gabe Black
2009-04-21syscall: Resolve conflicts between m5threads and Gabe's recent SE changes.Steve Reinhardt
2009-02-27X86: Add a vsyscall page for 32 bit processes to use.Gabe Black
2009-02-27X86: Set an initial value for the LDT selector.Gabe Black
2009-02-27X86: Set up a space for a GDT in SE so we can set up TLS or LDT segments.Gabe Black
2009-02-27X86: Handle 32 bit system call arguments.Gabe Black
2009-02-27Processes: Make getting and setting system call arguments part of a process ↵Gabe Black
object.
2009-02-27X86: Distinguish the width of values on the stack between 32 and 64 bit ↵Gabe Black
processes.
2009-02-25ISA: Use the "Stack" traceflag for DPRINTFs about the initial stack frame.Gabe Black
2008-12-07imported patch aux-fix.patchLisa Hsu
2008-12-04This patch pulls out the auxiliary vector struct from individual ISALisa Hsu
LiveProcesses to the base LiveProcess definition so anyone can use them.
2008-11-02Make it so that all thread contexts are registered with the System, even inLisa Hsu
SE. Process still keeps track of the tc's it owns, but registration occurs with the System, this eases the way for system-wide context Ids based on registration.
2008-09-27arch: TheISA shouldn't really ever be used in the arch directory.Nathan Binkert
We should always refer to the specific ISA in that arch directory. This is especially necessary if we're ever going to make it to the point where we actually have heterogeneous systems.
2007-12-01X86: Separate the effective seg base and the "hidden" seg base.Gabe Black
--HG-- extra : convert_revision : 5fcb8d94dbab7a7d6fe797277a5856903c885ad4
2007-11-13X86: Make microcode use presegmentation RIPs and the rest of m5 use post ↵Gabe Black
segmentation RIPS. --HG-- extra : convert_revision : d8cda7c8b9a2afb8a9d601b6d61529a96c5f87fe
2007-10-30X86: Compile fixes for 32 bit/debug/opt.Gabe Black
--HG-- extra : convert_revision : 591fffb316830fca5792666c8df12abd4e7c551b
2007-10-25SE: Fix page table and system serialization, don't reinit process if this is ↵Ali Saidi
a checkpoint restore. --HG-- extra : convert_revision : 03dcf3c088e57b7abab60efe700d947117888306
2007-10-16Make the process objects use the Params structs in their constructors, and ↵Gabe Black
use a limit to check if access are on the stack. --HG-- extra : convert_revision : af40a7acf424c4c4f62d0d76db1001a714ae0474
2007-10-07X86: Work on the x86 tlb.Gabe Black
--HG-- extra : convert_revision : a08a5cb049a6030ba9fd56a89383d56026238dbf
2007-08-26Address translation: Make the page table more flexible.Gabe Black
The page table now stores actual page table entries. It is still a templated class here, but this will be corrected in the near future. --HG-- extra : convert_revision : 804dcc6320414c2b3ab76a74a15295bd24e1d13d
2007-08-04X86: Start implementing segmentation support.Gabe Black
Make instructions observe segment prefixes, default segment rules, segment base addresses. Also fix some microcode and add sib and riprel "keywords" to the x86 specialization of the microassembler. --HG-- extra : convert_revision : be5a3b33d33f243ed6e1ad63faea8495e46d0ac9
2007-08-02X86: Get rid of some debug warnings.Gabe Black
Get rid of some warnings that were accidentally committed. --HG-- extra : convert_revision : e800dbce253f6ba759932ca47d64bf98129e4177
2007-08-02X86: Finally get the x86 initial stack frame right.Gabe Black
After very carefully reading through the Linux source, I'm pretty confident I now know -exactly- how the initial stack frame is constructed, filled, and aligned. --HG-- extra : convert_revision : 3c654ade7e458bdd5445026860f11175f383a65f
2007-08-01Fix how the "cmd" parameter is set in se.py and remove hack in x86 process ↵Gabe Black
initialization code. --HG-- extra : convert_revision : 1fc741eea956ebfa4cef488eef4333d1f50617a6
2007-08-01X86: Get rid of initialization of R11Gabe Black
R11 is just junk after the start of exectuion because we're "returning" from an execve call and linux destroys the contents of rcx and r11 on system calls. --HG-- extra : convert_revision : 6bf69a50ce56e0355dfdd41524163874340beec0
2007-07-30X86: Use an mmap base address that matches what an actual machine uses.Gabe Black
--HG-- extra : convert_revision : 98521797bbc6360301b3c6a6b1b8e28236ef570e
2007-07-29X86: Initial stack frame fixes and constant shuffling.Gabe Black
The initial stack frame for x86 is now substantially more correct. The fixes made here can be back ported to SPARC and possible the other ISAs as well. The auxiliary vector types were moved to the LiveProcess base class because they are independent of ISA. Some of the types may only apply to Linux, though, so they may have to be moved. --HG-- extra : convert_revision : 89ace35fcc8eb9586d2fee8eeccbc3686499ef24
2007-07-28X86: Fix a comment and adjust the stack base address.Gabe Black
The stack base on my development machine starts one page below where it needs to. I don't know why it does, but I've duplicated it in m5. --HG-- extra : convert_revision : c4783ba885b90f17e843f61e07af0bc3330a74bc
2007-07-28X86: Fix up auxiliary vectors.Gabe Black
The type constants should go into an architecture independent spot since they are universal to all Linux elf binaries. The right value for some of the vectors needs to be determined. Also, x86 does not store argc or argv_array_base in registers like some other architectures. --HG-- extra : convert_revision : 8d3f6a3e028d881d3c41e8ddf4f29d25738b529c
2007-07-26X86: Fix argument register indexing.Gabe Black
Code was assuming that all argument registers followed in order from ArgumentReg0. There is now an ArgumentReg array which is indexed to find the right index. There is a constant, NumArgumentRegs, which can be used to protect against using an invalid ArgumentReg. --HG-- extra : convert_revision : f448a3ca4d6adc3fc3323562870f70eec05a8a1f
2007-06-20X86 probably doesn't need a window save area.Gabe Black
--HG-- extra : convert_revision : c4a76262d4396f5f5b96b1c9e751014c2abbd78a
2007-05-09fix the translating ports so it can add a page on a faultAli Saidi
--HG-- extra : convert_revision : 56f6f2cbf4e92b7f2dd8c9453831fab86d83ef80
2007-03-06Get X86 to load an elf and start a process for it.Gabe Black
src/arch/x86/SConscript: Add in process source files. src/arch/x86/isa_traits.hh: Replace magic constant numbers with the x86 register names. src/arch/x86/miscregfile.cc: Make clear the miscreg file succeed. There aren't any misc regs, so clearing them is very easy. src/arch/x86/process.hh: An X86 process class. src/base/loader/elf_object.cc: Add in code to recognize x86 as an architecture. src/base/traceflags.py: Add an x86 traceflag src/sim/process.cc: Add in code to create an x86 process. src/arch/x86/intregs.hh: A file which declares names for the integer register indices. src/arch/x86/linux/linux.cc: src/arch/x86/linux/linux.hh: A very simple translation of SPARC's linux.cc and linux.hh. It's probably not correct for x86, but it might not be correct for SPARC either. src/arch/x86/linux/process.cc: src/arch/x86/linux/process.hh: An x86 linux process. The syscall table is split out into it's own file. src/arch/x86/linux/syscalls.cc: The x86 Linux syscall table and the uname function. src/arch/x86/process.cc: The x86 process base class. tests/test-progs/hello/bin/x86/linux/hello: An x86 hello world test binary. --HG-- extra : convert_revision : f22919e010c07aeaf5757dca054d9877a537fd08