Commit graph

8 commits

Author SHA1 Message Date
Ali Saidi 08d9e0ea7a change how much of the param string is copied into the kenel
Set locked flag if required
make SC always return success -- this needs to be fixed at some point
fix a couple of things

FS executes a bit of console code before dying a horrible death

arch/alpha/linux/system.cc:
    only need to copy the length of the os flags param, not 256  bytes
cpu/simple/cpu.cc:
    Set the physical flag if required
    Make LL/SC always return success
mem/bus.cc:
    add some dprintfs and change a assert to a panic
mem/port.cc:
    delete the buffer with the [] operator
mem/request.hh:
    add a function to reset a request

--HG--
extra : convert_revision : f2b78ddad33c7f6ffe1c48791d86609ff1d10d46
2006-04-11 19:35:30 -04:00
Ron Dreslinski 9e3d79694c Move to a model with a unified request object.
Constructor takes a bool to signify that it is either a cpu_request or not a cpu_request.
When accedding variables of a cpu_request it asserts that it is a cpu_request.
It also asserts that a value being read has been written at some point in time prior (not gaurnteeing it is up to date, but it was at least written before read).

There is also a isCpuReq() function to determine if this is a cpu_request.  It should be called before accesing a cpu_request only variable.

SConscript:
    Add compilation support for request.cc
arch/alpha/tlb.cc:
arch/alpha/tlb.hh:
cpu/cpu_exec_context.hh:
cpu/exec_context.hh:
cpu/simple/cpu.cc:
cpu/simple/cpu.hh:
dev/io_device.cc:
mem/page_table.cc:
mem/page_table.hh:
mem/port.cc:
    Update for unified request object and accessor functions.
mem/request.hh:
    Remove CpuRequest, make it a unified object.  Make variables private with accessor functions.

    May want to move things from .cc file into header (usually a assert() and either returning a value, or writting two).

--HG--
extra : convert_revision : f1e45cc490dadc7a418634539b03c3e72684a6e3
2006-04-07 15:54:48 -04:00
Steve Reinhardt 2d9c9dba37 Get rid of "Functional" suffix from (read|write)(Blob|String) functions.
--HG--
extra : convert_revision : 1456308af0fd686dff53ec1baddd7747354e1c0a
2006-03-12 16:38:16 -05:00
Steve Reinhardt 3adb45144a Fix memory allocation error in Port::memsetBlobFunctional.
mem/port.cc:
    Delete temp buffer for memset.

--HG--
extra : convert_revision : d7e2868c173442ca904898633f7ea9fc5e612dd3
2006-03-02 11:30:25 -05:00
Steve Reinhardt e7f442d527 Simple program runs with sendAtomic!
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-02 10:31:48 -05:00
Ron Dreslinski 8fc06589cb Update functional memory to have a response event
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-23 13:51:54 -05:00
Steve Reinhardt 00264ff1b8 Rename port methods:
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-21 12:20:02 -05:00
Steve Reinhardt 8a753f6ae2 Move read/writeBlob functions to Port class;
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-21 11:27:53 -05:00