summaryrefslogtreecommitdiff
path: root/mem
AgeCommit message (Collapse)Author
2006-03-12Oops, this goes with the previous changeset!Steve Reinhardt
mem/mem_object.hh: Change getPort() to be anonymous by default. --HG-- extra : convert_revision : 6998885ddccfbf26bc470112f40c3f19913ba7e2
2006-03-12Replace Memory with MemObject; no need for two different levels of hierarchy ↵Steve Reinhardt
there. Get rid of addPort(). Change getPort() behavior on PhysicalMemory. SConscript: cpu/simple/cpu.hh: sim/system.cc: sim/system.hh: Replace Memory with MemObject. cpu/base.hh: No need to declare Port here anymore. cpu/cpu_exec_context.hh: Need PageTable definition. cpu/simple/cpu.cc: mem/physical.cc: mem/physical.hh: Replace Memory with MemObject. Get rid of addPort(); allow getting anonymous ports with getPort(). mem/translating_port.hh: Remove unneeded header. sim/process.cc: Replace Memory with MemObject. Change how initialization port gets set up to deal with change in addPort()/getPort(). Current solution is not ideal but it works. sim/process.hh: Remove unneeded headers and declarations. Make LiveProcess::getDesc() abstract instead of panicing if called. sim/syscall_emul.hh: Fix includes. --HG-- extra : convert_revision : 11d4ffb54230038afcf7219cc46e51f809329a2f
2006-03-12Get rid of "Functional" suffix from (read|write)(Blob|String) functions.Steve Reinhardt
--HG-- extra : convert_revision : 1456308af0fd686dff53ec1baddd7747354e1c0a
2006-03-12More memory system cleanup:Steve Reinhardt
- Get rid of unused ProxyMemory class (replaced by TranslatingPort). - Get rid of remaining unused prot_* functions. mem/physical.cc: mem/physical.hh: mem/port.hh: Get rid of remaining unused prot_* functions. --HG-- extra : convert_revision : f16c208f4e4c38bd6bb3626339674c9278da9e07
2006-03-12Fix TranslatingPort access functions to:Steve Reinhardt
- know nothing about Fault objects (as it should be) - call fatal() by default on accesses to unmapped addrs - provide "try" versions for callers that are prepared to handle failure mem/translating_port.cc: mem/translating_port.hh: Memory system objects should not return Fault objects, just errors. Half the time we don't check the return code anyway, so make default version of the access functions call fatal(). Provide "try*" versions that return a bool for places where we really are going to check the return code. sim/syscall_emul.cc: sim/syscall_emul.hh: Need to use new "tryReadString" here since we actually check the return code. --HG-- extra : convert_revision : 039737398ef183904dc382c05912ab96cd1d4a51
2006-03-10Work towards factoring isa_traits.hh into smaller, more specialized files.Gabe Black
arch/SConscript: Sorted the switch headers, and added registerfile.hh, constants.hh, types.hh, and utility.hh. arch/alpha/isa_traits.hh: Moved the register file types to registerfile.hh, small functions to utility.hh, and cleaned out alot of stuff that isn't necessary anymore. base/loader/ecoff_object.cc: base/loader/elf_object.cc: cpu/pc_event.hh: cpu/static_inst.hh: mem/port.hh: sim/faults.cc: sim/system.hh: base/misc.hh isn't included through isa_traits.hh anymore. cpu/simple/cpu.cc: Added include for arch/utility.hh --HG-- extra : convert_revision : 24f65f330f87e3c909c939596cfcf48336022eaf
2006-03-09SimpleCPU compiles with merge.Gabe Black
arch/alpha/isa_traits.hh: arch/alpha/linux/process.cc: arch/alpha/process.cc: arch/alpha/process.hh: arch/alpha/tru64/process.cc: base/chunk_generator.hh: base/loader/elf_object.cc: cpu/cpu_exec_context.cc: cpu/cpu_exec_context.hh: cpu/exec_context.hh: cpu/simple/cpu.cc: kern/linux/linux.hh: kern/tru64/tru64.hh: mem/packet.hh: mem/page_table.cc: mem/page_table.hh: mem/physical.cc: mem/request.hh: mem/translating_port.cc: sim/process.hh: sim/system.cc: Fixing merged changes. --HG-- extra : convert_revision : 2e94f21009395db654880fcb94ec806b6f5772c3
2006-03-02Fix memory allocation error in Port::memsetBlobFunctional.Steve Reinhardt
mem/port.cc: Delete temp buffer for memset. --HG-- extra : convert_revision : d7e2868c173442ca904898633f7ea9fc5e612dd3
2006-03-02Simple program runs with sendAtomic!Steve Reinhardt
Ignoring returned latency for now. Refactored loadSections in ObjectFile hierarchy. base/loader/aout_object.cc: base/loader/aout_object.hh: base/loader/ecoff_object.cc: base/loader/ecoff_object.hh: base/loader/elf_object.cc: base/loader/elf_object.hh: base/loader/object_file.hh: Have each section record a pointer to image data. This allows us to move common loadSections code into ObjectFile. base/loader/object_file.cc: Have each section record a pointer to image data. This allows us to move common loadSections code into ObjectFile. Also explicitly load BSS now since we need to allocate the translations for it in syscall emulation. cpu/base.hh: Don't need memPort (just pass port in to ExecContext constructor). cpu/exec_context.cc: cpu/exec_context.hh: mem/port.cc: mem/translating_port.cc: mem/translating_port.hh: Pass syscall emulation Port into constructor instead of getting it from BaseCPU. cpu/simple/cpu.cc: Explicitly choose one of three timing models. Statically allocate request and packet objects when possible. Several more minor bug fixes. Works for simple program with SIMPLE_CPU_MEM_IMMEDIATE model now. Probably have memory leaks with SIMPLE_CPU_MEM_TIMING (if it works at all). Pass syscall emulation Port into constructor instead of getting it from BaseCPU. cpu/simple/cpu.hh: Explicitly choose one of three timing models. Statically allocate request and packet objects when possible. Pass syscall emulation Port into constructor instead of getting it from BaseCPU. mem/physical.cc: Set packet result field. --HG-- extra : convert_revision : 359d0ebe4b4665867f4e26e7394ec0f1d17cfc26
2006-03-02More progress... run a few instructions now, but die on the secondSteve Reinhardt
memory access (I think because we're deallocating our one and only CpuRequest object). base/loader/aout_object.cc: base/loader/ecoff_object.cc: base/loader/elf_object.cc: Add flag to force allocation of new pages on data writes. cpu/simple/cpu.cc: Several minor fixes. Switch to atomic mode for now. mem/physical.hh: Don't copy the packet to the response event, just keep a reference to the original. mem/translating_port.cc: mem/translating_port.hh: Add parameter to writeBlobFunctional() to force allocation of unallocated pages on writes. --HG-- extra : convert_revision : 05cb31c7b0047b492dcfa0d12ddee690ef762b44
2006-03-01More progress toward actually running a program.Steve Reinhardt
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
2006-02-27Fixes so that it compiles properly. Still working on .py file issues.Ron Dreslinski
SConscript: Add Back memory to be built mem/physical.hh: Fix function declerations python/m5/objects/BaseCPU.py: Remove IL1 and DL1 params from the cpu object --HG-- extra : convert_revision : 2f285dc626bc8d84d095def68e986fe7e6f3d8e9
2006-02-23Add support for multiple ports on the memory. Hook up simple cpu to memory.Ron Dreslinski
Ready to start testing if I could fix the linking errors I can't ever seem to fix. cpu/simple/cpu.cc: cpu/simple/cpu.hh: Add connecting of ports until builder can handle it. mem/physical.cc: Add function to allocate a port in the object Remove some full_sys stuff untill needed mem/physical.hh: Add function to allocate a port in the object python/m5/objects/BaseCPU.py: Update the params sim/process.cc: Make sure to use the right name (hopefully CPU constructor already called) --HG-- extra : convert_revision : 4089caf20d7eb53e5463c8ac93ddce5e43ea5d85
2006-02-23Update functional memory to have a response eventRon Dreslinski
Clean out old memory python files, move them into old_mem directory. Maybe we should just delete them, they are under revision control. Add new py files for new objects. SConscript: Update because memory is just a header file now base/chunk_generator.hh: Make Chunk Generator return the entire size if the chunk_size is set to zero. Useful when trying to chunck on blocksize of memory, which can write large pieces of data. cpu/simple/cpu.cc: Make sure to delete the pkt. mem/physical.cc: mem/physical.hh: Set up response event. mem/port.cc: Rename rqst to req to conform to same standard naming convention. python/m5/objects/PhysicalMemory.py: Update the params, inheritence --HG-- extra : convert_revision : 857154ec256522baf423b715833930497999549b
2006-02-22Remove unneeded functions, moving code around abit.Ron Dreslinski
mem/physical.cc: Remove unneeded functions. Need to add a .toString option for commands to making printing prettier. mem/physical.hh: Remove unneeded functions. --HG-- extra : convert_revision : 3707d317f542d56c0a0758a2c5ba493b92fb0c87
2006-02-22Move the port from base memory object into the physical memory object.Ron Dreslinski
The Memory is now a pure virtual base class for all memory type objects (DRAM, physical). We should consider renaming MemObject to something more meaningful to represent it is for all memory heirarchy objects, perhaps MemHeirObject? mem/physical.cc: mem/physical.hh: Move the port from the base class into the actual object. --HG-- extra : convert_revision : b7754ee7b90fd8f816f9876dce374c1d43c7e34b
2006-02-21Some more changes for compilation. Since memset is now part of port and not ↵Ron Dreslinski
virtual, no need for memory to define them. mem/physical.cc: Return 0 for block size. The chunk generator should treat this as a infinite size. mem/physical.hh: Add function prototype mem/port.hh: Fix function to take no arguments mem/translating_port.cc: mem/translating_port.hh: Remove the memsetBlob because it doesn't exist yet. --HG-- extra : convert_revision : dfe352acfc2912ecc9a1ba1863e5666f46b991cc
2006-02-21Add blocksize functions to physical memory. Fix the port we were using in ↵Ron Dreslinski
the process loader. mem/physical.cc: Implement the blockSize function, return VMPageSize for the physical memory mem/port.hh: Add a function to get a pointer to a peer, needed for initVirtMem to work in the loader. sim/process.cc: The way the translating port is setup we don't want the memory port, we want the peer port associated with that memory. We may need to revisit this. --HG-- extra : convert_revision : 46a51d448d1683db7bd5afe64adbe167a5743060
2006-02-21Rename Port address range functions... like the block sizeSteve Reinhardt
functions, the send/recv*Query naming seems awkward. Also create a typedef for AddrRangeList. --HG-- extra : convert_revision : dd0ff3fad06ec329c82c199700d0a6264f1271d3
2006-02-21Rename port methods:Steve Reinhardt
sendBlockSizeQuery() -> peerBlockSize() recvBlockSizeQuery() -> deviceBlockSize() After seeing how this gets used in practice, the send/recv*Query names just don't make a lot of sense. dev/io_device.cc: mem/port.cc: sendBlockSizeQuery() -> peerBlockSize() mem/port.hh: sendBlockSizeQuery() -> peerBlockSize() recvBlockSizeQuery() -> deviceBlockSize() --HG-- extra : convert_revision : e96349fb443979b85899a5248bd7cd8665e23ef0
2006-02-21Move read/writeBlob functions to Port class;Steve Reinhardt
clean up implementation a little. SConscript: Add mem/port.cc cpu/simple/cpu.cc: cpu/simple/cpu.hh: Move read/writeBlob functions to base Port class. mem/port.hh: Implement read/writeBlob functions. No need for them to be virtual since the proxy object (now called TranslatingPort) is not a subclass of Port. mem/port.cc: Implement read/writeBlob functions. --HG-- extra : convert_revision : a3660eaa43a7c286aca962f17fa32fbd42bf1fa6
2006-02-21Thanks to Ali, I was able to add chunk generation code in to handle a few ↵Ron Dreslinski
cases. Still have some duplicated code we may want to revisit. cpu/simple/cpu.cc: Thanks to Ali I found the chunk generator, although I still seem to be duplicating some code becuase the only difference between readBlob and writeBlob is the command in the packet. Perhaps an access function with the command as a param would help with the duplication (sendBlob that takes a cmd (maybe). mem/translating_port.cc: Using the chunck generator to break it up to be in page size chunks --HG-- extra : convert_revision : cc2e4e60c76098655e469f81c89d2c7438350fdb
2006-02-21Adding some definitons for read/write blob/string. I need to locate te code ↵Ron Dreslinski
stever wrote to break up address ranges into blk/page size chunks. cpu/simple/cpu.cc: cpu/simple/cpu.hh: Add read/write blob definitions, still need to break it up into blk size chunks (where was the code stever wrote for that?) mem/physical.hh: Remove un-needed function (I think) mem/port.hh: Default these virtual functions to panic unimplented mem/translating_port.cc: Again handling read/write string properly. Need the stever code to break things into page size chunks yet mem/translating_port.hh: Having trouble with the const declerator. I will need to read how it works, for now it compiles if I remove it. --HG-- extra : convert_revision : f174e06700daa9967958d18e01798270c90d6dac
2006-02-20Add in a new translating port that allows syscalls to translate addresses ↵Ron Dreslinski
via the page table before accessing the memory port. Other compile issues cleaned up. SConscript: Changes to compile the new Translating Port. Split out memtester and eio support, will rework them back in after first getting a simpleCPU to work arch/alpha/alpha_linux_process.cc: arch/alpha/alpha_tru64_process.cc: sim/syscall_emul.cc: sim/syscall_emul.hh: Changes to use the new translating Port. cpu/exec_context.cc: cpu/exec_context.hh: Create a translating port in each execution context. sim/process.cc: Fix the way we do proxy memory --HG-- extra : convert_revision : 3d33218fe8b425a5d9ce24757f1112b4aa6001fd
2006-02-20Revert PageTable code back to non-asid version.Steve Reinhardt
mem/page_table.cc: mem/page_table.hh: Revert back to non-asid version. --HG-- extra : convert_revision : c8e8810584d4cf12eb86da43ab77ddf8551a9e6b
2006-02-15More progress toward compiling... partly bySteve Reinhardt
fixing things, partly by ignoring CPU models that don't currently compile. SConscript: Split sources for fast, simple, and o3 CPU models into separate source lists. For now none of these are included in the base source list, so you won't get any CPU models at all... but we still can't compile the other stuff so it's not an issue. Also get rid of obsolete encumbered/mem file. base/loader/aout_object.cc: base/loader/aout_object.hh: base/loader/ecoff_object.cc: base/loader/ecoff_object.hh: base/loader/elf_object.cc: base/loader/elf_object.hh: base/loader/object_file.hh: cpu/exec_context.cc: sim/process.cc: sim/system.cc: sim/system.hh: FunctionalMemory -> Memory cpu/pc_event.hh: Get rid of unused badpc. cpu/simple/cpu.cc: cpu/simple/cpu.hh: Move Port functions into .cc file. mem/port.hh: Make recvAddressRangesQuery panic by default instead of being abstract... do CPUs need to implement this? mem/request.hh: Add prefetch flags. sim/syscall_emul.hh: Start to fix... --HG-- extra : convert_revision : ece53b3855f20916caaa381598ac37e8c7adfba7
2006-02-15Changes to start making the tree use the new memory system. Trying to ↵Ron Dreslinski
compile decoder.cc but fails still. SConscript: Place the memory objects back in the right place arch/alpha/isa_desc: Fix includes to point to the new memory requests cpu/exec_context.hh: Exec context now points to memory object, fix the include paths. Convert to prot_read/prot_write functions instead of read and write. Convert to new CpuRequestPtr instead of MemReqPtr. mem/request.hh: Add back in support for Request Flags (needed by decoder to tag request) Removed the flags that were associated with packets/coherence. sim/process.hh: Converted to point to new memory objects --HG-- extra : convert_revision : a0b95380915d63b53194e2a26336d6adb1a0086b
2006-02-15Many changes that make the new mem system compile. Now to convert the rest ↵Ron Dreslinski
of the tree to use the new mem system. mem/mem_object.hh: Create constrtor so it compiles mem/packet.hh: Fix typedefs so they compile, add in a few more headers for compilation mem/page_table.cc: convert to new mem system so it compiles mem/page_table.hh: fix it to the version that had asid support. Make it compile in the new system mem/physical.cc: Fix some compilation bugs mem/physical.hh: Add a type that made compile fail mem/port.hh: Fix a spelling error that messed up compilation mem/request.hh: fix typedefs and forward declerations so it compiles --HG-- extra : convert_revision : 580fb1ba31ada799ff0122601b8b5a8d994bb8af
2006-02-07Pushing current state. Need to fix compilation problems, have moved the ↵Ron Dreslinski
SCONS script to build memory objects first. Some places I could have been using a forward decleration and that should be cleaned up as well. SConscript: Changed to move new memory object compilation to the top. See the errors right away. Will also need to update all other objects that included the old memory system to use the new one. But not until we at least get the mem system compiling first. mem/packet.hh: Adding includes and typedefs to fix compilation errors mem/request.hh: Add definition for compilation issues --HG-- extra : convert_revision : 34d9ae534a7a625445b981e81c7a1f856517cb04
2006-02-03Adding some more things toward having cpu->mem test in place. Still need to ↵Ron Dreslinski
work on compilation issues. mem/physical.cc: mem/physical.hh: Added a stripped down version of the physical memory object --HG-- extra : convert_revision : 26826fb316f4cac900ec648fa268f1d95bc960f1
2006-01-31More include files, removing definition of SendResult whioch isn't needed ↵Ron Dreslinski
anymore cpu/simple/cpu.hh: Some needed includes mem/port.hh: Now we removed the sendResult and replaced with void,tick,bool don't need it defined anymore --HG-- extra : convert_revision : aea08ec299c41b9f9a5b0da7649cef0459315139
2006-01-31Fixed some void functions with returns, first stab at cpu ports.Ron Dreslinski
cpu/simple/cpu.hh: Adding port definitions to simple cpu, still needs work. mem/bus.hh: no return for void functions --HG-- extra : convert_revision : 42e5bc16af187d3a46eb25a15b600a8a11b88cc5
2006-01-31Merge zizzer:/bk/newmemAli Saidi
into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : 3eb1a665cb813df974aa2815a794b459473c0a77
2006-01-31changed sendresult -> bool,tick,void as appropriateAli Saidi
first crack at io devices code made CpuRequest that derives from Request dev/io_device.cc: dev/io_device.hh: first crack at the classes for Pio and Dma devices dev/platform.hh: We are going to a system pointer to get info about the memory system mem/bus.hh: changed sendresult -> bool,tick,void as appropriate mem/port.hh: changed sendresult -> bool,tick,void as appropriate; removed the sendTiming(pkt,t) call since it is not really implementable in a generic fashion mem/request.hh: pulled items from Request into CpuRequest --HG-- extra : convert_revision : 6213cf2b66417fa023b80884d9e623e78f5aa891
2006-01-31Add proper includesRon Dreslinski
--HG-- extra : convert_revision : c5f909d00b6025cd8f14544f7e2c9c50610c0cd3
2006-01-31Listing some of the enum structuresRon Dreslinski
--HG-- extra : convert_revision : d6ba1873826ee017bf2e4975a44eb2494a323132
2006-01-31Inital split up of the header files for the new memory system. Still need ↵Ron Dreslinski
to fill in some of the include files, and other data types. But this will be the starting point. mem/bus.hh: Inital crack at a bus object that has ports. Still need to clean up the include file issues. mem/mem_object.hh: Decleration of a base memory object. Derives from simobject and adds a function to get the port associated with the object. mem/packet.hh: Inital crack at the packet decleration. Still need to clean up the include file issues. mem/port.hh: Inital crack at the port decleration. Still need to clean up the include file issues. mem/request.hh: Inital crack at the request decleration. Still need to clean up the include file issues. --HG-- extra : convert_revision : f17967d430458f91866a4639ab0cab45d835bb55
2006-01-29Add PageTable code and SConscript fixes for new syscall emulationSteve Reinhardt
memory model. These changes really should have been part of the previous changeset. SConscript: Move System and PhysicalMemory sources from being full_system_sources to base_sources, since they are now used in syscall emulation also. Also add source files for PageTable and ProxyMemory objects. Actual source files for PhysicalMemory and ProxyMemory are not committed yet since they still need to be ported from old interface. --HG-- extra : convert_revision : cb39e3b13d71429b7ee6082794dc09428cde989f