process.hh revision 9552
16019Shines@cs.fsu.edu/*
26019Shines@cs.fsu.edu * Copyright (c) 2007-2008 The Florida State University
36019Shines@cs.fsu.edu * All rights reserved.
46019Shines@cs.fsu.edu *
56019Shines@cs.fsu.edu * Redistribution and use in source and binary forms, with or without
66019Shines@cs.fsu.edu * modification, are permitted provided that the following conditions are
76019Shines@cs.fsu.edu * met: redistributions of source code must retain the above copyright
86019Shines@cs.fsu.edu * notice, this list of conditions and the following disclaimer;
96019Shines@cs.fsu.edu * redistributions in binary form must reproduce the above copyright
106019Shines@cs.fsu.edu * notice, this list of conditions and the following disclaimer in the
116019Shines@cs.fsu.edu * documentation and/or other materials provided with the distribution;
126019Shines@cs.fsu.edu * neither the name of the copyright holders nor the names of its
136019Shines@cs.fsu.edu * contributors may be used to endorse or promote products derived from
146019Shines@cs.fsu.edu * this software without specific prior written permission.
156019Shines@cs.fsu.edu *
166019Shines@cs.fsu.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176019Shines@cs.fsu.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186019Shines@cs.fsu.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196019Shines@cs.fsu.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206019Shines@cs.fsu.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216019Shines@cs.fsu.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226019Shines@cs.fsu.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236019Shines@cs.fsu.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246019Shines@cs.fsu.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256019Shines@cs.fsu.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266019Shines@cs.fsu.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276019Shines@cs.fsu.edu *
286019Shines@cs.fsu.edu * Authors: Stephen Hines
296019Shines@cs.fsu.edu */
306019Shines@cs.fsu.edu
316019Shines@cs.fsu.edu#ifndef __ARM_LINUX_PROCESS_HH__
326019Shines@cs.fsu.edu#define __ARM_LINUX_PROCESS_HH__
336019Shines@cs.fsu.edu
346019Shines@cs.fsu.edu#include "arch/arm/process.hh"
356019Shines@cs.fsu.edu
366019Shines@cs.fsu.edu/// A process with emulated Arm/Linux syscalls.
376019Shines@cs.fsu.educlass ArmLinuxProcess : public ArmLiveProcess
386019Shines@cs.fsu.edu{
396019Shines@cs.fsu.edu  public:
407096Sgblack@eecs.umich.edu    ArmLinuxProcess(LiveProcessParams * params, ObjectFile *objFile,
417096Sgblack@eecs.umich.edu                    ObjectFile::Arch _arch);
426019Shines@cs.fsu.edu
436019Shines@cs.fsu.edu    virtual SyscallDesc* getDesc(int callnum);
446019Shines@cs.fsu.edu
458216Ssaidi@eecs.umich.edu    void initState();
466233Sgblack@eecs.umich.edu
476701Sgblack@eecs.umich.edu    ArmISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
489552Sandreas.hansson@arm.com    /// Explicitly import the otherwise hidden getSyscallArg
499552Sandreas.hansson@arm.com    using ArmLiveProcess::getSyscallArg;
506236Sgblack@eecs.umich.edu    void setSyscallArg(ThreadContext *tc, int i, ArmISA::IntReg val);
516236Sgblack@eecs.umich.edu
526019Shines@cs.fsu.edu    /// The target system's hostname.
536019Shines@cs.fsu.edu    static const char *hostname;
546019Shines@cs.fsu.edu
556233Sgblack@eecs.umich.edu    /// A page to hold "kernel" provided functions. The name might be wrong.
566233Sgblack@eecs.umich.edu    static const Addr commPage;
576233Sgblack@eecs.umich.edu
586232Sgblack@eecs.umich.edu    /// Array of syscall descriptors, indexed by call number.
596019Shines@cs.fsu.edu    static SyscallDesc syscallDescs[];
606019Shines@cs.fsu.edu
616232Sgblack@eecs.umich.edu    /// Array of "arm private" syscall descriptors.
626232Sgblack@eecs.umich.edu    static SyscallDesc privSyscallDescs[];
636232Sgblack@eecs.umich.edu
646019Shines@cs.fsu.edu    const int Num_Syscall_Descs;
656232Sgblack@eecs.umich.edu
666232Sgblack@eecs.umich.edu    const int Num_Priv_Syscall_Descs;
676019Shines@cs.fsu.edu};
686019Shines@cs.fsu.edu
696019Shines@cs.fsu.edu#endif // __ARM_LINUX_PROCESS_HH__
70