#ifndef __ARCH_GENERIC_MEMHELPERS_HH__
#define __ARCH_GENERIC_MEMHELPERS_HH__
-#include "arch/isa_traits.hh"
#include "base/types.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
#include "arch/generic/types.hh"
#include "arch/generic/vec_pred_reg.hh"
#include "arch/generic/vec_reg.hh"
-#include "arch/isa_traits.hh"
#include "arch/riscv/generated/max_inst_regs.hh"
#include "base/types.hh"
#include "arch/null/cpu_dummy.hh"
#else
#include "arch/generic/interrupts.hh"
-#include "arch/isa_traits.hh"
#include "base/statistics.hh"
#include "mem/port_proxy.hh"
#include "sim/clocked_object.hh"
#include <list>
#include <string>
-#include "arch/isa_traits.hh"
#include "base/refcnt.hh"
#include "config/the_isa.hh"
#include "cpu/base_dyn_inst.hh"
#include <iomanip>
#include <sstream>
-#include "arch/isa_traits.hh"
#include "arch/utility.hh"
#include "base/loader/symtab.hh"
#include "config/the_isa.hh"
#include <array>
-#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
#include "cpu/o3/cpu.hh"
#include "cpu/o3/isa_specific.hh"
#include <queue>
#include "arch/generic/tlb.hh"
-#include "arch/isa_traits.hh"
#include "arch/utility.hh"
#include "base/random.hh"
#include "base/types.hh"
#ifndef __CPU_O3_IMPL_HH__
#define __CPU_O3_IMPL_HH__
-#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
#include "cpu/o3/cpu_policy.hh"
#include "arch/generic/debugfaults.hh"
#include "arch/generic/vec_reg.hh"
-#include "arch/isa_traits.hh"
#include "arch/locked_mem.hh"
#include "config/the_isa.hh"
#include "cpu/inst_seq.hh"
#include <vector>
-#include "arch/isa_traits.hh"
#include "arch/types.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
#include <list>
-#include "arch/isa_traits.hh"
#include "arch/registers.hh"
#include "config/the_isa.hh"
#include "cpu/o3/rename.hh"
#include <algorithm>
-#include "arch/isa_traits.hh"
#include "arch/types.hh"
#include "arch/utility.hh"
#include "base/trace.hh"
#include <deque>
-#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
#include "cpu/inst_seq.hh"
#include "cpu/pred/indirect.hh"
#include <string>
-#include "arch/isa_traits.hh"
#include "arch/utility.hh"
#include "base/callback.hh"
#include "base/compiler.hh"
#include "arch/decoder.hh"
#include "arch/generic/tlb.hh"
#include "arch/isa.hh"
-#include "arch/isa_traits.hh"
#include "arch/registers.hh"
#include "arch/types.hh"
#include "base/types.hh"
#include <deque>
#include <string>
-#include "arch/isa_traits.hh"
#include "base/chunk_generator.hh"
#include "base/cprintf.hh" // csprintf
#include "base/trace.hh"
#include <functional>
-#include "arch/isa_traits.hh"
#include "base/bitunion.hh"
#include "dev/virtio/virtio_ring.h"
#include "mem/port_proxy.hh"
#include <limits>
+#include "arch/x86/isa_traits.hh"
#include "base/output.hh"
#include "debug/GPUDisp.hh"
#include "debug/GPUExec.hh"
#include "arch/x86/faults.hh"
#include "arch/x86/insts/microldstop.hh"
+#include "arch/x86/isa_traits.hh"
#include "arch/x86/pagetable.hh"
#include "arch/x86/pagetable_walker.hh"
#include "arch/x86/regs/misc.hh"
#include <limits>
+#include "arch/x86/isa_traits.hh"
#include "arch/x86/linux/linux.hh"
#include "base/chunk_generator.hh"
#include "debug/GPUDisp.hh"
#include <string>
#include "arch/isa.hh"
-#include "arch/isa_traits.hh"
#include "base/types.hh"
#include "cpu/simple/atomic.hh"
#include "cpu/simple/timing.hh"
#include <cstring>
+#include "arch/x86/isa_traits.hh"
#include "base/logging.hh"
#include "debug/GPUTLB.hh"
#include "sim/process.hh"
#include "arch/generic/tlb.hh"
#include "arch/isa.hh"
-#include "arch/isa_traits.hh"
#include "arch/x86/pagetable.hh"
#include "arch/x86/regs/segment.hh"
#include "base/logging.hh"
#include "kern/linux/helpers.hh"
-#include "arch/isa_traits.hh"
#include "config/the_isa.hh"
#include "cpu/thread_context.hh"
#include "mem/port_proxy.hh"
#include <cstdint>
-#include "arch/isa_traits.hh"
#include "arch/generic/tlb.hh"
#include "base/statistics.hh"
#include "base/types.hh"
#include "sim/faults.hh"
-#include "arch/isa_traits.hh"
#include "base/logging.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
void
Process::allocateMem(Addr vaddr, int64_t size, bool clobber)
{
- int npages = divCeil(size, (int64_t)PageBytes);
+ int npages = divCeil(size, (int64_t)system->getPageBytes());
Addr paddr = system->allocPhysPages(npages);
pTable->map(vaddr, paddr, size,
clobber ? EmulationPageTable::Clobber :
new_paddr = system->allocPhysPages(1);
// Read from old physical page.
- uint8_t *buf_p = new uint8_t[PageBytes];
- old_tc->getVirtProxy().readBlob(vaddr, buf_p, PageBytes);
+ uint8_t *buf_p = new uint8_t[system->getPageBytes()];
+ old_tc->getVirtProxy().readBlob(vaddr, buf_p, system->getPageBytes());
// Create new mapping in process address space by clobbering existing
// mapping (if any existed) and then write to the new physical page.
bool clobber = true;
- pTable->map(vaddr, new_paddr, PageBytes, clobber);
- new_tc->getVirtProxy().writeBlob(vaddr, buf_p, PageBytes);
+ pTable->map(vaddr, new_paddr, system->getPageBytes(), clobber);
+ new_tc->getVirtProxy().writeBlob(vaddr, buf_p, system->getPageBytes());
delete[] buf_p;
}
// Determine how large the interpreters footprint will be in the process
// address space.
- Addr interp_mapsize = roundUp(interp->mapSize(), TheISA::PageBytes);
+ Addr interp_mapsize = roundUp(interp->mapSize(), system->getPageBytes());
// We are allocating the memory area; set the bias to the lowest address
// in the allocated memory region.
SyscallReturn
getpagesizeFunc(SyscallDesc *desc, ThreadContext *tc)
{
- return (int)PageBytes;
+ return (int)tc->getSystemPtr()->getPageBytes();
}