History log of /gem5/src/arch/x86/linux/linux.hh
Revision Date Author Comments
# 13536:77e19417e723 09-Jan-2019 Andreas Sandberg <andreas.sandberg@arm.com>

sim-se: Refactor clone to avoid most ifdefs

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>


# 11759:deaf82fd2e7c 15-Dec-2016 Brandon Potter <brandon.potter@amd.com>

syscall_emul: add support for x86 statfs system calls


# 11414:cfad34a15729 01-Apr-2016 Steve Reinhardt <steve.reinhardt@amd.com>

syscall_emul: remove mmapFlagTable

After all this it turns out we don't even use it.


# 11386:94c09b607a84 17-Mar-2016 Steve Reinhardt <steve.reinhardt@amd.com>

syscall_emul: move mmapGrowsDown() to LiveProcess

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.


# 11383:5ac090acd180 17-Mar-2016 Brandon Potter <brandon.potter@amd.com>

syscall_emul: extend mmap system call to support file backed mmaps

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.


# 11382:654272b82e94 17-Mar-2016 Brandon Potter <brandon.potter@amd.com>

syscall_emul: add many Linux kernel flags


# 11381:516213d2f0cf 17-Mar-2016 Brandon Potter <brandon.potter@amd.com>

syscall_emul: rename OpenFlagTransTable struct

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.


# 8972:9403273a3b46 29-Apr-2012 Vince Weaver <vince@csl.cornell.edu>

X86: Fix up the open system call's flags.


# 8837:d492e0bb7e95 12-Feb-2012 Gabe Black <gblack@eecs.umich.edu>

X86: open flags: Another patch from Vince Weaver


# 8600:b0d7c64ada19 23-Oct-2011 Steve Reinhardt <steve.reinhardt@amd.com>

syscall_emul: implement MAP_FIXED option to mmap()


# 7087:fb8d5786ff30 24-May-2010 Nathan Binkert <nate@binkert.org>

copyright: Change HP copyright on x86 code to be more friendly


# 6693:ce63047d1bd9 20-Oct-2009 Vince Weaver <vince@csl.cornell.edu>

Fix stat64 structure on 32-bit X86_SE

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.


# 6673:f8453ff56966 02-Oct-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Make successive anonymous mmaps move down in 32 bit SE mode Linux.


# 6640:30d92d2b66a1 16-Sep-2009 Vince Weaver <vince@csl.cornell.edu>

Syscalls: Implement sysinfo() syscall.


# 5976:536125d85fa3 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Add a structure to allow mapping between the host and guest fstat formats.


# 5971:9c6391381323 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Add a 32 bit mmap2 system call.


# 5960:c9c465241d3b 27-Feb-2009 Gabe Black <gblack@eecs.umich.edu>

X86: Install some 32 bit system calls.


# 5543:3af77710f397 10-Sep-2008 Ali Saidi <saidi@eecs.umich.edu>

style: Remove non-leading tabs everywhere they shouldn't be. Developers should configure their editors to not insert tabs


# 5407:c121bb9e86eb 11-Jun-2008 Ali Saidi <saidi@eecs.umich.edu>

X86: Fix building on *BSD hosts


# 4866:9adc60769aed 04-Aug-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Make the open flags correct.


# 4822:14be2bcab3b3 30-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: __pad0 should be a 4 byte pad, not a 4 long array of 4 byte pads.


# 4815:137ad0e13d3a 30-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

X86: Fix up the stat structure. This probably still isn't right.


# 4759:60e820a327db 24-Jul-2007 Gabe Black <gblack@eecs.umich.edu>

Add a tgt_iovec structure to support writev, change the name of X86Linux to X86Linux64, add some syscalls.


# 4166:ecebe3ac19b4 06-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Get X86 to load an elf and start a process for it.

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.