process.cc (4856:2bd640bcb025) process.cc (4863:b6dacc9a39ff)
1/*
2 * Copyright (c) 2003-2006 The Regents of The University of Michigan
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;

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

83 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
84 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
85 *
86 * Authors: Gabe Black
87 */
88
89#include "arch/x86/isa_traits.hh"
90#include "arch/x86/process.hh"
1/*
2 * Copyright (c) 2003-2006 The Regents of The University of Michigan
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;

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

83 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
84 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
85 *
86 * Authors: Gabe Black
87 */
88
89#include "arch/x86/isa_traits.hh"
90#include "arch/x86/process.hh"
91#include "arch/x86/segmentregs.hh"
91#include "arch/x86/types.hh"
92#include "base/loader/object_file.hh"
93#include "base/loader/elf_object.hh"
94#include "base/misc.hh"
95#include "cpu/thread_context.hh"
96#include "mem/page_table.hh"
97#include "mem/translating_port.hh"
98#include "sim/process_impl.hh"

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

140 panic("Unimplemented trap to operating system: trap number %#x.\n", trapNum);
141 }
142}
143
144void
145X86LiveProcess::startup()
146{
147 argsInit(sizeof(IntReg), VMPageSize);
92#include "arch/x86/types.hh"
93#include "base/loader/object_file.hh"
94#include "base/loader/elf_object.hh"
95#include "base/misc.hh"
96#include "cpu/thread_context.hh"
97#include "mem/page_table.hh"
98#include "mem/translating_port.hh"
99#include "sim/process_impl.hh"

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

141 panic("Unimplemented trap to operating system: trap number %#x.\n", trapNum);
142 }
143}
144
145void
146X86LiveProcess::startup()
147{
148 argsInit(sizeof(IntReg), VMPageSize);
148
149 //The AMD64 abi says that only rsp and rdx are defined at process
150 //startup. rsp will be set by argsInit, and I don't understand what
151 //rdx should be set to. The other floating point and integer registers
152 //will be zeroed by the register file constructors, but control registers
153 //should be initialized here. Since none of those are implemented, there
154 //isn't anything here.
149 for(int i = 0; i < NUM_SEGMENTREGS; i++)
150 threadContexts[0]->setMiscRegNoEffect(MISCREG_ES_BASE + i, 0);
155}
156
157void
158X86LiveProcess::argsInit(int intSize, int pageSize)
159{
160 typedef M5_64_auxv_t auxv_t;
161 Process::startup();
162

--- 262 unchanged lines hidden ---
151}
152
153void
154X86LiveProcess::argsInit(int intSize, int pageSize)
155{
156 typedef M5_64_auxv_t auxv_t;
157 Process::startup();
158

--- 262 unchanged lines hidden ---