diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa_traits.hh | 10 | ||||
-rw-r--r-- | src/arch/x86/process.cc | 14 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/arch/x86/isa_traits.hh b/src/arch/x86/isa_traits.hh index 27f20e9b2..a9e274ecc 100644 --- a/src/arch/x86/isa_traits.hh +++ b/src/arch/x86/isa_traits.hh @@ -59,14 +59,8 @@ namespace X86ISA //XXX This needs to be set to an intermediate instruction struct //which encodes this instruction - //4k. This value is not constant on x86. - const int LogVMPageSize = 12; - const int VMPageSize = (1 << LogVMPageSize); - - const int PageShift = 12; - const int PageBytes = 1ULL << PageShift; - - const int BranchPredAddrShiftAmt = 0; + const Addr PageShift = 12; + const Addr PageBytes = ULL(1) << PageShift; // Memory accesses can be unaligned const bool HasUnalignedMemAcc = true; diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc index 95a7f9998..fc5a88888 100644 --- a/src/arch/x86/process.cc +++ b/src/arch/x86/process.cc @@ -86,7 +86,7 @@ X86LiveProcess::X86LiveProcess(LiveProcessParams * params, ObjectFile *objFile, numSyscallDescs(_numSyscallDescs) { brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize(); - brk_point = roundUp(brk_point, VMPageSize); + brk_point = roundUp(brk_point, PageBytes); } X86_64LiveProcess::X86_64LiveProcess(LiveProcessParams *params, @@ -96,7 +96,7 @@ X86_64LiveProcess::X86_64LiveProcess(LiveProcessParams *params, { vsyscallPage.base = 0xffffffffff600000ULL; - vsyscallPage.size = VMPageSize; + vsyscallPage.size = PageBytes; vsyscallPage.vtimeOffset = 0x400; vsyscallPage.vgettimeofdayOffset = 0x0; @@ -133,10 +133,10 @@ I386LiveProcess::I386LiveProcess(LiveProcessParams *params, X86LiveProcess(params, objFile, _syscallDescs, _numSyscallDescs) { _gdtStart = ULL(0xffffd000); - _gdtSize = VMPageSize; + _gdtSize = PageBytes; vsyscallPage.base = 0xffffe000ULL; - vsyscallPage.size = VMPageSize; + vsyscallPage.size = PageBytes; vsyscallPage.vsyscallOffset = 0x400; vsyscallPage.vsysexitOffset = 0x410; @@ -163,7 +163,7 @@ X86_64LiveProcess::initState() { X86LiveProcess::initState(); - argsInit(sizeof(uint64_t), VMPageSize); + argsInit(sizeof(uint64_t), PageBytes); // Set up the vsyscall page for this process. allocateMem(vsyscallPage.base, vsyscallPage.size); @@ -258,7 +258,7 @@ I386LiveProcess::initState() { X86LiveProcess::initState(); - argsInit(sizeof(uint32_t), VMPageSize); + argsInit(sizeof(uint32_t), PageBytes); /* * Set up a GDT for this process. The whole GDT wouldn't really be for @@ -474,7 +474,7 @@ X86LiveProcess::argsInit(int pageSize, //XXX Figure out what these should be auxv.push_back(auxv_t(M5_AT_HWCAP, features)); //The system page size - auxv.push_back(auxv_t(M5_AT_PAGESZ, X86ISA::VMPageSize)); + auxv.push_back(auxv_t(M5_AT_PAGESZ, X86ISA::PageBytes)); //Frequency at which times() increments //Defined to be 100 in the kernel source. auxv.push_back(auxv_t(M5_AT_CLKTCK, 100)); |