linux.hh (11759:deaf82fd2e7c) | linux.hh (13536:77e19417e723) |
---|---|
1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 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 --- 26 unchanged lines hidden (view full) --- 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 * 37 * Authors: Gabe Black 38 */ 39 40#ifndef __ARCH_X86_LINUX_LINUX_HH__ 41#define __ARCH_X86_LINUX_LINUX_HH__ 42 | 1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 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 --- 26 unchanged lines hidden (view full) --- 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 * 37 * Authors: Gabe Black 38 */ 39 40#ifndef __ARCH_X86_LINUX_LINUX_HH__ 41#define __ARCH_X86_LINUX_LINUX_HH__ 42 |
43#include "arch/x86/utility.hh" |
|
43#include "kern/linux/linux.hh" 44 | 44#include "kern/linux/linux.hh" 45 |
45class X86Linux64 : public Linux | 46class X86Linux : public Linux |
46{ 47 public: | 47{ 48 public: |
49 static void 50 archClone(uint64_t flags, 51 Process *pp, Process *cp, 52 ThreadContext *ptc, ThreadContext *ctc, 53 uint64_t stack, uint64_t tls) 54 { 55 X86ISA::copyRegs(ptc, ctc); |
|
48 | 56 |
57 if (flags & TGT_CLONE_SETTLS) { 58 ctc->setMiscRegNoEffect(X86ISA::MISCREG_FS_BASE, tls); 59 ctc->setMiscRegNoEffect(X86ISA::MISCREG_FS_EFF_BASE, tls); 60 } 61 62 if (stack) 63 ctc->setIntReg(X86ISA::StackPointerReg, stack); 64 } 65}; 66 67class X86Linux64 : public X86Linux 68{ 69 public: 70 |
|
49 typedef struct { 50 uint64_t st_dev; 51 uint64_t st_ino; 52 uint64_t st_nlink; 53 uint32_t st_mode; 54 uint32_t st_uid; 55 uint32_t st_gid; 56 uint32_t __pad0; --- 123 unchanged lines hidden (view full) --- 180 uint16_t procs; /* Number of current processes */ 181 uint64_t totalhigh; /* Total high memory size */ 182 uint64_t freehigh; /* Available high memory size */ 183 uint64_t mem_unit; /* Memory unit size in bytes */ 184 } tgt_sysinfo; 185 186}; 187 | 71 typedef struct { 72 uint64_t st_dev; 73 uint64_t st_ino; 74 uint64_t st_nlink; 75 uint32_t st_mode; 76 uint32_t st_uid; 77 uint32_t st_gid; 78 uint32_t __pad0; --- 123 unchanged lines hidden (view full) --- 202 uint16_t procs; /* Number of current processes */ 203 uint64_t totalhigh; /* Total high memory size */ 204 uint64_t freehigh; /* Available high memory size */ 205 uint64_t mem_unit; /* Memory unit size in bytes */ 206 } tgt_sysinfo; 207 208}; 209 |
188class X86Linux32 : public Linux | 210class X86Linux32 : public X86Linux |
189{ 190 public: 191 192 typedef struct { 193 uint64_t st_dev; 194 uint8_t __pad0[4]; 195 uint32_t __st_ino; 196 uint32_t st_mode; --- 114 unchanged lines hidden --- | 211{ 212 public: 213 214 typedef struct { 215 uint64_t st_dev; 216 uint8_t __pad0[4]; 217 uint32_t __st_ino; 218 uint32_t st_mode; --- 114 unchanged lines hidden --- |