};
ArmLinuxProcess::ArmLinuxProcess(LiveProcessParams * params,
- ObjectFile *objFile)
- : ArmLiveProcess(params, objFile),
+ ObjectFile *objFile, ObjectFile::Arch _arch)
+ : ArmLiveProcess(params, objFile, _arch),
Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)),
Num_Priv_Syscall_Descs(sizeof(privSyscallDescs) / sizeof(SyscallDesc))
{ }
class ArmLinuxProcess : public ArmLiveProcess
{
public:
- ArmLinuxProcess(LiveProcessParams * params, ObjectFile *objFile);
+ ArmLinuxProcess(LiveProcessParams * params, ObjectFile *objFile,
+ ObjectFile::Arch _arch);
virtual SyscallDesc* getDesc(int callnum);
using namespace std;
using namespace ArmISA;
-ArmLiveProcess::ArmLiveProcess(LiveProcessParams *params, ObjectFile *objFile)
- : LiveProcess(params, objFile)
+ArmLiveProcess::ArmLiveProcess(LiveProcessParams *params, ObjectFile *objFile,
+ ObjectFile::Arch _arch)
+ : LiveProcess(params, objFile), arch(_arch)
{
stack_base = 0xbf000000L;
}
Addr prog_entry = objFile->entryPoint();
+ if (arch == ObjectFile::Thumb)
+ prog_entry = (prog_entry & ~mask(1)) | (ULL(1) << PcTBitShift);
tc->setPC(prog_entry);
tc->setNextPC(prog_entry + sizeof(MachInst));
#include <string>
#include <vector>
+#include "base/loader/object_file.hh"
#include "sim/process.hh"
class LiveProcess;
class ArmLiveProcess : public LiveProcess
{
protected:
- ArmLiveProcess(LiveProcessParams * params, ObjectFile *objFile);
+ ObjectFile::Arch arch;
+ ArmLiveProcess(LiveProcessParams * params, ObjectFile *objFile,
+ ObjectFile::Arch _arch);
void startup();
warn("Unknown operating system; assuming Linux.");
// fall through
case ObjectFile::Linux:
- if (objFile->getArch() == ObjectFile::Thumb)
- panic("Thumb processes not yet supported.\n");
- else
- process = new ArmLinuxProcess(params, objFile);
+ process = new ArmLinuxProcess(params, objFile, objFile->getArch());
break;
case ObjectFile::LinuxArmOABI:
fatal("M5 does not support ARM OABI binaries. Please recompile with an"