process.cc (12458:8de44b407db4) | process.cc (12460:0f221912b014) |
---|---|
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 | 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 |
|
99X86Process::X86Process(ProcessParams *params, ObjectFile *objFile, 100 SyscallDesc *_syscallDescs, int _numSyscallDescs) 101 : Process(params, params->useArchPT ? 102 static_cast<EmulationPageTable *>( | 108X86Process::X86Process(ProcessParams *params, ObjectFile *objFile, 109 SyscallDesc *_syscallDescs, int _numSyscallDescs) 110 : Process(params, params->useArchPT ? 111 static_cast<EmulationPageTable *>( |
103 new ArchPageTable( 104 params->name, params->pid, 105 params->system, PageBytes, 106 PageTableLayout)) : | 112 new ArchPageTable(params->name, params->pid, 113 params->system, PageBytes)) : |
107 new EmulationPageTable(params->name, params->pid, 108 PageBytes), 109 objFile), 110 syscallDescs(_syscallDescs), numSyscallDescs(_numSyscallDescs) 111{ 112} 113 114void X86Process::clone(ThreadContext *old_tc, ThreadContext *new_tc, --- 423 unchanged lines hidden (view full) --- 538 // add $0x8, %rsp # skip error 539 0x48, 0x83, 0xc4, 0x08, 540 // iretq 541 0x48, 0xcf 542 }; 543 544 physProxy.writeBlob(pfHandlerPhysAddr, faultBlob, sizeof(faultBlob)); 545 | 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 |
546 MultiLevelPageTable<PageTableOps> *pt = 547 dynamic_cast<MultiLevelPageTable<PageTableOps> *>(pTable); 548 | |
549 /* Syscall handler */ | 553 /* Syscall handler */ |
550 pt->map(syscallCodeVirtAddr, syscallCodePhysAddr, PageBytes, false); | 554 pTable->map(syscallCodeVirtAddr, syscallCodePhysAddr, 555 PageBytes, false); |
551 /* GDT */ | 556 /* GDT */ |
552 pt->map(GDTVirtAddr, gdtPhysAddr, PageBytes, false); | 557 pTable->map(GDTVirtAddr, gdtPhysAddr, PageBytes, false); |
553 /* IDT */ | 558 /* IDT */ |
554 pt->map(IDTVirtAddr, idtPhysAddr, PageBytes, false); | 559 pTable->map(IDTVirtAddr, idtPhysAddr, PageBytes, false); |
555 /* TSS */ | 560 /* TSS */ |
556 pt->map(TSSVirtAddr, tssPhysAddr, PageBytes, false); | 561 pTable->map(TSSVirtAddr, tssPhysAddr, PageBytes, false); |
557 /* IST */ | 562 /* IST */ |
558 pt->map(ISTVirtAddr, istPhysAddr, PageBytes, false); | 563 pTable->map(ISTVirtAddr, istPhysAddr, PageBytes, false); |
559 /* PF handler */ | 564 /* PF handler */ |
560 pt->map(PFHandlerVirtAddr, pfHandlerPhysAddr, PageBytes, false); | 565 pTable->map(PFHandlerVirtAddr, pfHandlerPhysAddr, PageBytes, false); |
561 /* MMIO region for m5ops */ | 566 /* MMIO region for m5ops */ |
562 pt->map(MMIORegionVirtAddr, MMIORegionPhysAddr, 16*PageBytes, false); | 567 pTable->map(MMIORegionVirtAddr, MMIORegionPhysAddr, 568 16 * PageBytes, false); |
563 } else { 564 for (int i = 0; i < contextIds.size(); i++) { 565 ThreadContext * tc = system->getThreadContext(contextIds[i]); 566 567 SegAttr dataAttr = 0; 568 dataAttr.dpl = 3; 569 dataAttr.unusable = 0; 570 dataAttr.defaultSize = 1; --- 556 unchanged lines hidden --- | 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 --- |