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.
--HG--
extra : convert_revision : f22919e010c07aeaf5757dca054d9877a537fd08
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
#elif THE_ISA == MIPS_ISA
|
||||
#include "arch/mips/linux/process.hh"
|
||||
#elif THE_ISA == X86_ISA
|
||||
//XXX There are no x86 processes yet
|
||||
#include "arch/x86/linux/process.hh"
|
||||
#else
|
||||
#error "THE_ISA not set"
|
||||
#endif
|
||||
@@ -490,15 +490,15 @@ LiveProcess::create(const std::string &nm, System *system, int stdin_fd,
|
||||
}
|
||||
#elif THE_ISA == X86_ISA
|
||||
if (objFile->getArch() != ObjectFile::X86)
|
||||
fatal("Object file architecture does not match compiled ISA (SPARC).");
|
||||
panic("There are no implemented x86 processes!\n");
|
||||
fatal("Object file architecture does not match compiled ISA (x86).");
|
||||
switch (objFile->getOpSys()) {
|
||||
/*case ObjectFile::Linux:
|
||||
case ObjectFile::Linux:
|
||||
process = new X86LinuxProcess(nm, objFile, system,
|
||||
stdin_fd, stdout_fd, stderr_fd,
|
||||
argv, envp, cwd,
|
||||
_uid, _euid, _gid,
|
||||
_egid, _pid, _ppid);*/
|
||||
_egid, _pid, _ppid);
|
||||
break;
|
||||
default:
|
||||
fatal("Unknown/unsupported operating system.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user