Deleted Added
sdiff udiff text old ( 12458:8de44b407db4 ) new ( 12460:0f221912b014 )
full compact
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2007 The Hewlett-Packard Development Company
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

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

91 INTREG_ESI,
92 INTREG_EDI,
93 INTREG_EBP
94};
95
96static const int NumArgumentRegs32 M5_VAR_USED =
97 sizeof(ArgumentReg) / sizeof(const int);
98
99template class MultiLevelPageTable<LongModePTE<47, 39>,
100 LongModePTE<38, 30>,
101 LongModePTE<29, 21>,
102 LongModePTE<20, 12> >;
103typedef MultiLevelPageTable<LongModePTE<47, 39>,
104 LongModePTE<38, 30>,
105 LongModePTE<29, 21>,
106 LongModePTE<20, 12> > ArchPageTable;
107
108X86Process::X86Process(ProcessParams *params, ObjectFile *objFile,
109 SyscallDesc *_syscallDescs, int _numSyscallDescs)
110 : Process(params, params->useArchPT ?
111 static_cast<EmulationPageTable *>(
112 new ArchPageTable(params->name, params->pid,
113 params->system, PageBytes)) :
114 new EmulationPageTable(params->name, params->pid,
115 PageBytes),
116 objFile),
117 syscallDescs(_syscallDescs), numSyscallDescs(_numSyscallDescs)
118{
119}
120
121void X86Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,

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

545 // add $0x8, %rsp # skip error
546 0x48, 0x83, 0xc4, 0x08,
547 // iretq
548 0x48, 0xcf
549 };
550
551 physProxy.writeBlob(pfHandlerPhysAddr, faultBlob, sizeof(faultBlob));
552
553 /* Syscall handler */
554 pTable->map(syscallCodeVirtAddr, syscallCodePhysAddr,
555 PageBytes, false);
556 /* GDT */
557 pTable->map(GDTVirtAddr, gdtPhysAddr, PageBytes, false);
558 /* IDT */
559 pTable->map(IDTVirtAddr, idtPhysAddr, PageBytes, false);
560 /* TSS */
561 pTable->map(TSSVirtAddr, tssPhysAddr, PageBytes, false);
562 /* IST */
563 pTable->map(ISTVirtAddr, istPhysAddr, PageBytes, false);
564 /* PF handler */
565 pTable->map(PFHandlerVirtAddr, pfHandlerPhysAddr, PageBytes, false);
566 /* MMIO region for m5ops */
567 pTable->map(MMIORegionVirtAddr, MMIORegionPhysAddr,
568 16 * PageBytes, false);
569 } else {
570 for (int i = 0; i < contextIds.size(); i++) {
571 ThreadContext * tc = system->getThreadContext(contextIds[i]);
572
573 SegAttr dataAttr = 0;
574 dataAttr.dpl = 3;
575 dataAttr.unusable = 0;
576 dataAttr.defaultSize = 1;

--- 556 unchanged lines hidden ---