From 22504f8b48978be286d98be0df72d015ab6ff559 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 1 Mar 2006 18:45:50 -0500 Subject: More progress toward actually running a program. See configs/test.py for test config (using simple binary in my home directory on zizzer). base/chunk_generator.hh: Fix assertion for chunkSize == 0 (not a power of 2) base/intmath.hh: Fix roundDown to take integer alignments. cpu/base.cc: Register exec contexts regardless of state (not sure why this check was in here in the first place). mem/physical.cc: Add breaks to switch. python/m5/objects/BaseCPU.py: Default mem to Parent.any (e.g. get from System). python/m5/objects/Ethernet.py: python/m5/objects/Root.py: HierParams is gone. python/m5/objects/PhysicalMemory.py: mmu param is full-system only. sim/process.cc: Stack mapping request must be page-aligned and page-sized. Don't delete objFile object in create since we are counting on it being around for startup(). --HG-- extra : convert_revision : 90c43ee927e7d82a045d6e10302d965797d006f7 --- base/chunk_generator.hh | 2 +- base/intmath.hh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'base') diff --git a/base/chunk_generator.hh b/base/chunk_generator.hh index afd577814..a584679d0 100644 --- a/base/chunk_generator.hh +++ b/base/chunk_generator.hh @@ -77,7 +77,7 @@ class ChunkGenerator : chunkSize(_chunkSize) { // chunkSize must be a power of two - assert(isPowerOf2(chunkSize)); + assert(chunkSize == 0 || isPowerOf2(chunkSize)); // set up initial chunk. curAddr = startAddr; diff --git a/base/intmath.hh b/base/intmath.hh index c8b9c5ec5..198278d6f 100644 --- a/base/intmath.hh +++ b/base/intmath.hh @@ -202,9 +202,9 @@ roundUp(T val, int align) template inline T -roundDown(T val, T align) +roundDown(T val, int align) { - T mask = align - 1; + T mask = (T)align - 1; return val & ~mask; } -- cgit v1.2.3