summaryrefslogtreecommitdiff
path: root/src/arch/x86/linux/linux.hh
AgeCommit message (Collapse)Author
2019-01-10sim-se: Refactor clone to avoid most ifdefsAndreas Sandberg
Some parts of clone are architecture dependent. In some cases, we are able to use architecture-specific helper functions or register aliases. However, there is still some architecture-specific that is protected by ifdefs in the common clone implementation. Move these architecture-specific bits to the architecture-specific OS class instead to avoid these ifdefs and make the code a bit more readable. Change-Id: Ia0903d738d0ba890863bddfa77e3b717db7f45de Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15435 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2016-12-15syscall_emul: add support for x86 statfs system callsBrandon Potter
2016-04-01syscall_emul: remove mmapFlagTableSteve Reinhardt
After all this it turns out we don't even use it.
2016-03-17syscall_emul: move mmapGrowsDown() to LiveProcessSteve Reinhardt
The mmapGrowsDown() method was a static method on the OperatingSystem class (and derived classes), which worked OK for the templated syscall emulation methods, but made it hard to access elsewhere. This patch moves the method to be a virtual function on the LiveProcess method, where it can be overridden for specific platforms (for now, Alpha). This patch also changes the value of mmapGrowsDown() from being false by default and true only on X86Linux32 to being true by default and false only on Alpha, which seems closer to reality (though in reality most people use ASLR and this doesn't really matter anymore). In the process, also got rid of the unused mmap_start field on LiveProcess and OperatingSystem mmapGrowsUp variable.
2016-03-17syscall_emul: extend mmap system call to support file backed mmapsBrandon Potter
For O3, which has a stat that counts reg reads, there is an additional reg read per mmap() call since there's an arg we no longer ignore. Otherwise, stats should not be affected.
2016-03-17syscall_emul: add many Linux kernel flagsBrandon Potter
2016-03-17syscall_emul: rename OpenFlagTransTable structBrandon Potter
The structure definition only had the open system call flag set in mind when it was named, so we rename it here with the intention of using it to define additional tables to translate flags for other system calls in the future.
2012-04-29X86: Fix up the open system call's flags.Vince Weaver
2012-02-12X86: open flags: Another patch from Vince WeaverGabe Black
2011-10-22syscall_emul: implement MAP_FIXED option to mmap()Steve Reinhardt
2010-05-23copyright: Change HP copyright on x86 code to be more friendlyNathan Binkert
2009-10-20Fix stat64 structure on 32-bit X86_SEVince Weaver
The st_size entry was in the wrong place (see linux-2.6.29/arch/x86/include/asm/stat.h ) Also, the packed attribute is needed when compiling on a 64-bit machine, otherwise gcc adds extra padding that break the layout of the structure.
2009-10-02X86: Make successive anonymous mmaps move down in 32 bit SE mode Linux.Gabe Black
2009-09-15Syscalls: Implement sysinfo() syscall.Vince Weaver
2009-02-27X86: Add a structure to allow mapping between the host and guest fstat formats.Gabe Black
2009-02-27X86: Add a 32 bit mmap2 system call.Gabe Black
2009-02-27X86: Install some 32 bit system calls.Gabe Black
2008-09-10style: Remove non-leading tabs everywhere they shouldn't be. Developers ↵Ali Saidi
should configure their editors to not insert tabs
2008-06-11X86: Fix building on *BSD hostsAli Saidi
2007-08-04X86: Make the open flags correct.Gabe Black
--HG-- extra : convert_revision : 2dc81345176d1de247a567d1f748e2b2bd05f829
2007-07-30X86: __pad0 should be a 4 byte pad, not a 4 long array of 4 byte pads.Gabe Black
--HG-- extra : convert_revision : e0d5ab617bc95d5d714fa9fcdf0a448874aef886
2007-07-30X86: Fix up the stat structure. This probably still isn't right.Gabe Black
--HG-- extra : convert_revision : 2e2a22cdf3abe648c9e1309b9070cfd10fc4a8b8
2007-07-24Add a tgt_iovec structure to support writev, change the name of X86Linux to ↵Gabe Black
X86Linux64, add some syscalls. --HG-- extra : convert_revision : 9c13e9c68f331fe6c4a9abd96f7aee0f064101fc
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