process.cc (13678:1ad51de4cb42) | process.cc (13984:7200989d951c) |
---|---|
1/* 2 * Copyright (c) 2010-2013, 2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 36 unchanged lines hidden (view full) --- 45 */ 46 47#include "arch/arm/linux/process.hh" 48 49#include <sys/syscall.h> 50 51#include "arch/arm/isa_traits.hh" 52#include "arch/arm/linux/linux.hh" | 1/* 2 * Copyright (c) 2010-2013, 2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 36 unchanged lines hidden (view full) --- 45 */ 46 47#include "arch/arm/linux/process.hh" 48 49#include <sys/syscall.h> 50 51#include "arch/arm/isa_traits.hh" 52#include "arch/arm/linux/linux.hh" |
53#include "base/loader/object_file.hh" |
|
53#include "base/trace.hh" 54#include "cpu/thread_context.hh" 55#include "kern/linux/linux.hh" 56#include "sim/process.hh" 57#include "sim/syscall_desc.hh" 58#include "sim/syscall_emul.hh" 59#include "sim/system.hh" 60 61using namespace std; 62using namespace ArmISA; 63 | 54#include "base/trace.hh" 55#include "cpu/thread_context.hh" 56#include "kern/linux/linux.hh" 57#include "sim/process.hh" 58#include "sim/syscall_desc.hh" 59#include "sim/syscall_emul.hh" 60#include "sim/system.hh" 61 62using namespace std; 63using namespace ArmISA; 64 |
65namespace 66{ 67 68class ArmLinuxObjectFileLoader : public ObjectFile::Loader 69{ 70 public: 71 Process * 72 load(ProcessParams *params, ObjectFile *obj_file) override 73 { 74 auto arch = obj_file->getArch(); 75 auto opsys = obj_file->getOpSys(); 76 77 if (arch != ObjectFile::Arm && arch != ObjectFile::Thumb && 78 arch != ObjectFile::Arm64) { 79 return nullptr; 80 } 81 82 if (opsys == ObjectFile::UnknownOpSys) { 83 warn("Unknown operating system; assuming Linux."); 84 opsys = ObjectFile::Linux; 85 } 86 87 if (opsys == ObjectFile::LinuxArmOABI) { 88 fatal("gem5 does not support ARM OABI binaries. Please recompile " 89 "with an EABI compiler."); 90 } 91 92 if (opsys != ObjectFile::Linux) 93 return nullptr; 94 95 if (arch == ObjectFile::Arm64) 96 return new ArmLinuxProcess64(params, obj_file, arch); 97 else 98 return new ArmLinuxProcess32(params, obj_file, arch); 99 } 100}; 101 102ArmLinuxObjectFileLoader loader; 103 104} // anonymous namespace 105 |
|
64/// Target uname() handler. 65static SyscallReturn 66unameFunc32(SyscallDesc *desc, int callnum, Process *process, 67 ThreadContext *tc) 68{ 69 int index = 0; 70 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 71 --- 1666 unchanged lines hidden --- | 106/// Target uname() handler. 107static SyscallReturn 108unameFunc32(SyscallDesc *desc, int callnum, Process *process, 109 ThreadContext *tc) 110{ 111 int index = 0; 112 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); 113 --- 1666 unchanged lines hidden --- |