process.cc (6701:4842482e1bd1) process.cc (7096:e81026b9dfe0)
1/*
2 * Copyright (c) 2007-2008 The Florida State University
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 29 unchanged lines hidden (view full) ---

38#include "mem/page_table.hh"
39#include "mem/translating_port.hh"
40#include "sim/process_impl.hh"
41#include "sim/system.hh"
42
43using namespace std;
44using namespace ArmISA;
45
1/*
2 * Copyright (c) 2007-2008 The Florida State University
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 29 unchanged lines hidden (view full) ---

38#include "mem/page_table.hh"
39#include "mem/translating_port.hh"
40#include "sim/process_impl.hh"
41#include "sim/system.hh"
42
43using namespace std;
44using namespace ArmISA;
45
46ArmLiveProcess::ArmLiveProcess(LiveProcessParams *params, ObjectFile *objFile)
47 : LiveProcess(params, objFile)
46ArmLiveProcess::ArmLiveProcess(LiveProcessParams *params, ObjectFile *objFile,
47 ObjectFile::Arch _arch)
48 : LiveProcess(params, objFile), arch(_arch)
48{
49 stack_base = 0xbf000000L;
50
51 // Set pointer for next thread stack. Reserve 8M for main stack.
52 next_thread_stack_base = stack_base - (8 * 1024 * 1024);
53
54 // Set up break point (Top of Heap)
55 brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();

--- 255 unchanged lines hidden (view full) ---

311 if (envp.size() > 0) {
312 tc->setIntReg(ArgumentReg2, env_data_base + env_data_size -
313 envp[envp.size() - 1].size() - 1);
314 } else {
315 tc->setIntReg(ArgumentReg2, 0);
316 }
317
318 Addr prog_entry = objFile->entryPoint();
49{
50 stack_base = 0xbf000000L;
51
52 // Set pointer for next thread stack. Reserve 8M for main stack.
53 next_thread_stack_base = stack_base - (8 * 1024 * 1024);
54
55 // Set up break point (Top of Heap)
56 brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();

--- 255 unchanged lines hidden (view full) ---

312 if (envp.size() > 0) {
313 tc->setIntReg(ArgumentReg2, env_data_base + env_data_size -
314 envp[envp.size() - 1].size() - 1);
315 } else {
316 tc->setIntReg(ArgumentReg2, 0);
317 }
318
319 Addr prog_entry = objFile->entryPoint();
320 if (arch == ObjectFile::Thumb)
321 prog_entry = (prog_entry & ~mask(1)) | (ULL(1) << PcTBitShift);
319 tc->setPC(prog_entry);
320 tc->setNextPC(prog_entry + sizeof(MachInst));
321
322 //Align the "stack_min" to a page boundary.
323 stack_min = roundDown(stack_min, pageSize);
324}
325
326ArmISA::IntReg

--- 20 unchanged lines hidden ---
322 tc->setPC(prog_entry);
323 tc->setNextPC(prog_entry + sizeof(MachInst));
324
325 //Align the "stack_min" to a page boundary.
326 stack_min = roundDown(stack_min, pageSize);
327}
328
329ArmISA::IntReg

--- 20 unchanged lines hidden ---