process.cc (7087:fb8d5786ff30) process.cc (7532:3f6413fc37a2)
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

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

152X86LiveProcess::getDesc(int callnum)
153{
154 if (callnum < 0 || callnum >= numSyscallDescs)
155 return NULL;
156 return &syscallDescs[callnum];
157}
158
159void
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

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

152X86LiveProcess::getDesc(int callnum)
153{
154 if (callnum < 0 || callnum >= numSyscallDescs)
155 return NULL;
156 return &syscallDescs[callnum];
157}
158
159void
160X86_64LiveProcess::startup()
160X86_64LiveProcess::initState()
161{
161{
162 LiveProcess::startup();
162 X86LiveProcess::initState();
163
163
164 if (checkpointRestored)
165 return;
166
167 argsInit(sizeof(uint64_t), VMPageSize);
168
169 // Set up the vsyscall page for this process.
170 pTable->allocate(vsyscallPage.base, vsyscallPage.size);
171 uint8_t vtimeBlob[] = {
172 0x48,0xc7,0xc0,0xc9,0x00,0x00,0x00, // mov $0xc9,%rax
173 0x0f,0x05, // syscall
174 0xc3 // retq

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

250 cr0.pe = 1; // We're definitely in protected mode.
251 tc->setMiscReg(MISCREG_CR0, cr0);
252
253 tc->setMiscReg(MISCREG_MXCSR, 0x1f80);
254 }
255}
256
257void
164 argsInit(sizeof(uint64_t), VMPageSize);
165
166 // Set up the vsyscall page for this process.
167 pTable->allocate(vsyscallPage.base, vsyscallPage.size);
168 uint8_t vtimeBlob[] = {
169 0x48,0xc7,0xc0,0xc9,0x00,0x00,0x00, // mov $0xc9,%rax
170 0x0f,0x05, // syscall
171 0xc3 // retq

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

247 cr0.pe = 1; // We're definitely in protected mode.
248 tc->setMiscReg(MISCREG_CR0, cr0);
249
250 tc->setMiscReg(MISCREG_MXCSR, 0x1f80);
251 }
252}
253
254void
258I386LiveProcess::startup()
255I386LiveProcess::initState()
259{
256{
260 LiveProcess::startup();
257 X86LiveProcess::initState();
261
258
262 if (checkpointRestored)
263 return;
264
265 argsInit(sizeof(uint32_t), VMPageSize);
266
267 /*
268 * Set up a GDT for this process. The whole GDT wouldn't really be for
269 * this process, but the only parts we care about are.
270 */
271 pTable->allocate(_gdtStart, _gdtSize);
272 uint64_t zero = 0;

--- 458 unchanged lines hidden ---
259 argsInit(sizeof(uint32_t), VMPageSize);
260
261 /*
262 * Set up a GDT for this process. The whole GDT wouldn't really be for
263 * this process, but the only parts we care about are.
264 */
265 pTable->allocate(_gdtStart, _gdtSize);
266 uint64_t zero = 0;

--- 458 unchanged lines hidden ---