Commit graph

83 commits

Author SHA1 Message Date
Andrew Schultz 43787ad863 Added initial (hackish) support for translating between a PCI bus address
and a physical memory address for DMA

dev/tsunami_pchip.cc:
dev/tsunami_pchip.hh:
    Changed registers to array and added mapping function to translate between
    PCI bus space and physical address space

--HG--
extra : convert_revision : e9dc4de4e7effe8e8e2365298843d6f767b5a289
2004-02-21 20:29:38 -05:00
Ron Dreslinski 4768c72964 Fix the RTC code so it is in the cchip, only interrupt processors that
are present

dev/tsunami_cchip.cc:
    Only need to interrupt processors that are there
    Move RTC interrupt code into a function
dev/tsunami_cchip.hh:
    Make a RTC interrupt function, move variables out of public scope
dev/tsunami_io.cc:
    Make a call to the RTC interrupt routine instead

--HG--
extra : convert_revision : 88113664d0e54a7dddc00ec11ff9b9d088232b31
2004-02-20 16:51:19 -05:00
Ron Dreslinski db940dd0b0 Add support for IPI's and extend RTC to interrupt all Processors
dev/tsunami_cchip.cc:
    Add support for IPI, making changes to read/write to MISC register
    Particularly the IPREQ, IPINTR, and ITINTR subfields
dev/tsunami_cchip.hh:
    Make an array to keep track of the number of outstanding IPI's,
    Extend RTC to interrupt all processors, not just cpu0
dev/tsunami_io.cc:
    Extend RTC to interrupt all present proccessors, not just cpu0

--HG--
extra : convert_revision : 0715cbf0abb06002c0fb0b05ef369304cdf75001
2004-02-20 14:28:59 -05:00
Ali Saidi 706d6bea52 1 << x != (uint64_t)1 << x
dev/tsunami_cchip.cc:
    fixed another problem with the interrupt code, should all work now

--HG--
extra : convert_revision : 1d9fe6081b6391e3e09f1c4a9380a30240fac6dc
2004-02-16 16:04:34 -05:00
Andrew Schultz 9c9d1cb5bf Changed device IRQ back to 1
--HG--
extra : convert_revision : 3fb611e6e0305fe9854cdf7813492b75750cd7a9
2004-02-16 01:33:43 -05:00
Andrew Schultz 484a4de65a Added new aic register definition, fix some interrupt related calls
dev/tsunami_cchip.cc:
    Change interrupt level to 20 for devices

--HG--
extra : convert_revision : deee68d5434643dc751de08e5a804c14d1a86efd
2004-02-16 01:07:16 -05:00
Ali Saidi 03e8793f89 Merge
dev/tsunami_cchip.cc:
    SCCS merged

--HG--
extra : convert_revision : a4b2b0b92038217608a733a6c8f27edb018e910d
2004-02-16 00:00:23 -05:00
Ali Saidi de5fa66714 Rewrote interrupt code to handle masking correctly and changed every
interrupt to use a different subnumber since both devices could
interrupt at the same time and we don't want to loose one.

dev/tsunami_cchip.cc:
    rewrote interrupt code to handle interrupt mask clearing correctly
dev/tsunami_cchip.hh:
    changed (post/clear)DRIR to use a interrupt number rather than a vecotr
dev/tsunami_io.cc:
    updated for new post/clearDRIR calls

--HG--
extra : convert_revision : 5b39f5e15a66d5eb6e689e6ece62f99b5fa735ab
2004-02-15 23:56:44 -05:00
Andrew Schultz 44b277a62f Interrupt changes
dev/tsunami_cchip.cc:
    Changed to point to IPL 20 rather than 21

--HG--
extra : convert_revision : ee70f4bae4e06b92a0e02ea71ed65d4e260e7967
2004-02-15 22:36:23 -05:00
Andrew Schultz 1978851fc7 Fix some debug printing errors
--HG--
extra : convert_revision : 3ef3d2c7eb67c45a7e005c1c072f3098142ea210
2004-02-15 18:24:14 -05:00
Andrew Schultz 092ec1978d Fix to remote debugger while in PAL
arch/alpha/vtophys.cc:
base/remote_gdb.cc:
    Fix to remote debugger while in PAL code
dev/pcidev.cc:
    Remove extra debug printf

--HG--
extra : convert_revision : e64988846ad05cd3ddf47034d72d99dae3501591
2004-02-13 18:15:04 -05:00
Ali Saidi 29eae76153 Merge
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
dev/tsunami_uart.cc:
    SCCS merged

--HG--
extra : convert_revision : da3d1998d6dd39e0d3f8754074c513cdd8a4193c
2004-02-11 15:36:36 -05:00
Ali Saidi 0f34a00703 added serializeation code
--HG--
extra : convert_revision : 468f3c739707d167af43562695b604fd7dead661
2004-02-11 15:32:30 -05:00
Andrew Schultz e72e8b28c8 Fix masking of read/write address to get read/write offset
Changed base_linux.ini file to use physical addresses

dev/alpha_console.cc:
dev/pciconfigall.cc:
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
    Fix masking of read/write address to get read/write offset
dev/tsunami_uart.cc:
    Fix masking of read/write address to get read/write offset
    Also added add_child call that was missed
dev/tsunami_uart.hh:
    Changed size to 0x8

--HG--
extra : convert_revision : 1468ca43167bfb28b28c4510401a1ebad683e102
2004-02-10 22:35:18 -05:00
Andrew Schultz 81d5ffe7de Changed new linux stuff to work with new FunctionalMemory interface and
some sundry problems with new interface

dev/alpha_console.cc:
dev/alpha_console.hh:
dev/baddev.cc:
dev/baddev.hh:
dev/pciconfigall.cc:
dev/pciconfigall.hh:
dev/pcidev.cc:
dev/pcidev.hh:
dev/tsunami_cchip.cc:
dev/tsunami_cchip.hh:
dev/tsunami_io.cc:
dev/tsunami_io.hh:
dev/tsunami_pchip.cc:
dev/tsunami_pchip.hh:
dev/tsunami_uart.cc:
dev/tsunami_uart.hh:
    Fixed to use new FunctionalMemory interface

--HG--
extra : convert_revision : bee98e6285d92f28fafacf919ab06eaf333a9b56
2004-02-10 00:19:43 -05:00
Andrew Schultz eac2d6a668 Merge linux tree with head
arch/alpha/alpha_memory.cc:
dev/alpha_console.cc:
dev/alpha_console.hh:
    Merge

--HG--
extra : convert_revision : 3233648f204338ab3f102ff117754dce955dcc37
2004-02-09 17:50:47 -05:00
Andrew Schultz 48bb27be72 Added platform.hh
--HG--
extra : convert_revision : c11fde5e5f0e344d2f4c89c57a4d41ca179a31e5
2004-02-09 14:52:41 -05:00
Andrew Schultz 581a6ea0dd Fixes for updating mmu mappings
dev/tsunami.hh:
    Added generic platform base class

--HG--
extra : convert_revision : ff74956937f9fca5bdfa5e3779add776e4a91f8b
2004-02-09 14:47:39 -05:00
Ali Saidi b93cab4e85 Merge zizzer.eecs.umich.edu:/m5/Bitkeeper/linux
into zizzer.eecs.umich.edu:/y/saidi/work/m5

--HG--
extra : convert_revision : 35c2de18adad0957538453b2a083e59de535aa88
2004-02-09 13:46:38 -05:00
Ali Saidi 1ded394fc3 Some changes to for linux 2.6.2
dev/pcidev.cc:
    Linux 2.6 writes the latency timer, so it was added to the list of
    allowable writes
dev/tsunami_uart.cc:
dev/tsunami_uart.hh:
    A couple of changes so that the new linux autoconf serial driver thinks
    that the serial port exists and configures it

--HG--
extra : convert_revision : 6c026ef754e31de56c9b837ceb8f6be48c8d8d9c
2004-02-09 13:40:58 -05:00
Nathan Binkert da8a702212 - Whack unused code
-  Make the MemoryController use address ranges (via Range) instead
of an address and a mask

base/remote_gdb.cc:
    reflect name change
dev/alpha_access.h:
    better include
dev/alpha_console.cc:
    -  FunctionalMemory no longer takes care of mapping my address into
    the proper address space.  It must be done locally.
    -  the memory controller no longer uses a mask, but a size, and the
    size is determined by the device, not the .ini file
    -  fix up address calculations to reflect the removal of a mask
    -  PhysicalMemory::getSize() -> PhysicalMemory::size()
dev/alpha_console.hh:
    -  FunctionalMemory no longer takes care of mapping my address into
    the proper address space.  It must be done locally.
    -  the memory controller no longer uses a mask, but a size, and the
    size is determined by the device, not the .ini file
    -  fix up address calculations to reflect the removal of a mask
    -  get rid of MmapDevice and inherit from FunctionalMemory

--HG--
extra : convert_revision : e3a65c9debf6f899632d62c70781cbdc2826616b
2004-02-09 10:49:48 -05:00
Andrew Schultz c76675be58 Now skips the calibrate_delay loop in the kernel boot
dev/tsunami.cc:
    Changed so Tsunami has a pointer to the System to which it belongs.
    Now it is derived from generic base class Platform so platform stuff
    can be accessed based on the system
dev/tsunami_io.cc:
dev/tsunami_io.hh:
    Cleanup and added copyright
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
    Added event to skip the "calibrate_delay" function, now calculate
    loops_per_jiffy based on frequency, interrupt frequency, and constant
sim/system.hh:
    Added pointer to generic Platform base class

--HG--
extra : convert_revision : 5bd925eec220a2ca48eb6164d2ecfdec96922c2c
2004-02-05 18:23:16 -05:00
Ali Saidi 77a30ed48d fixed mapping of device memory and i/o space
--HG--
extra : convert_revision : 9236c7f0aeb4d555880bdfdfa7f55cedf1cbb950
2004-02-05 15:12:33 -05:00
Ali Saidi 09c40bfe43 added some comments
--HG--
extra : convert_revision : eeb0a2c227261ce601ec5e5e8e57b58cbcf22a17
2004-02-05 13:22:02 -05:00
Ali Saidi f4ef613ffd mereged some comments with some of andrews changes
--HG--
extra : convert_revision : 8b3d1b2fe15eeb7d97462dac0043ca6b0863f6e6
2004-02-05 13:17:44 -05:00
Ali Saidi 7a6a435983 added some comments
--HG--
extra : convert_revision : b33c94984f8d9ac2baf8d7b45fa79460846b1755
2004-02-05 13:05:20 -05:00
Andrew Schultz daa579fc0f Fix PCI code so it builds properly now
dev/pciconfigall.cc:
dev/pciconfigall.hh:
dev/pcidev.cc:
dev/pcidev.hh:
dev/tsunami.cc:
dev/tsunami.hh:
    A bunch of changes to clean up new PCI code and to fix build

--HG--
extra : convert_revision : 71063bcc565c50fc293b323ddce2c8e701f544ff
2004-02-05 02:25:45 -05:00
Steve Reinhardt b6ff600bca Add support for "serializing" instructions that flush
execution pipeline (Alpha trapb & excb).

Add support for write memory barriers (mostly impacts
store buffer).

Add StaticInst flag to indicate memory barriers, though
this is not modeled in the pipeline yet.

arch/alpha/isa_desc:
    Implement trapb, excb, mb, and wmb as insts with
    no execution effect (empty execute() function) but
    with flags that indicate their side effects.

    Also make sure every instruction that needs to go to
    the execute stage has a real opClass value, since we
    are now using No_OpClass to signal insts that can get
    dropped at dispatch.

    StaticInst::branchTarget() is now a const method.
cpu/static_inst.hh:
    Add flags to indicate serializing insts (trapb, excb) and
    memory and write barriers.

    Also declare some StaticInst methods as const methods.
dev/etherlink.hh:
sim/eventq.hh:
sim/serialize.cc:
sim/serialize.hh:
sim/sim_object.hh:
    Make name() return value const.

--HG--
extra : convert_revision : 39520e71469fa20e0a7446b2e06b494eec17a02c
2004-02-04 21:42:00 -08:00
Ali Saidi 69e1e10f5d Added code so that BAR writes will result in an updated memory mapping
dev/pcidev.cc:
dev/pcidev.hh:
    BAR changes should now change the mmu mapping

--HG--
extra : convert_revision : 2d5c60ef076ab0588a25def1ecd9dbb90c9144d7
2004-02-04 19:56:24 -05:00
Andrew Schultz f2b8df2420 Changes to support PciDev as a new base class for devices which use PCI
--HG--
extra : convert_revision : fc2bc4399665344220b1a7e345ae6d2df03c9960
2004-02-04 15:03:50 -05:00
Andrew Schultz 0a585921f0 Mostly changes to point Tsunami related stuff to use AdaptecController
dev/tsunami.cc:
dev/tsunami.hh:
    Change to use AdaptecController with Tsunami

--HG--
extra : convert_revision : 6ff4f9f7ae1959589340b2ab23755b4dbfec4dbc
2004-02-03 17:02:48 -05:00
Andrew Schultz d08e1bc569 Fix to support redefinition of functional_memory base class
--HG--
extra : convert_revision : c06b2cfd2787022ee5dc664886873a9afa459434
2004-02-03 16:59:40 -05:00
Nathan Binkert 85bc028185 merge
--HG--
extra : convert_revision : 47425264e672f727cbb13aa7b9bb2a67790b25e8
2004-02-03 11:24:03 -05:00
Steve Reinhardt 956aff1291 More conversions of ref-counted parameters to references:
Statistics::NodePtr, StaticInstPtr, ethernet PacketPtr.

base/statistics.hh:
    Change NodePtr parameters to Nodeptr &.
cpu/exetrace.hh:
    Change StaticInstPtr parameters to StaticInstPtr &.
dev/etherbus.cc:
dev/etherbus.hh:
dev/etherdump.cc:
dev/etherdump.hh:
dev/etherint.hh:
dev/etherlink.cc:
dev/etherlink.hh:
dev/ethertap.cc:
dev/ethertap.hh:
    change PacketPtr parameters to PacketPtr &.

--HG--
extra : convert_revision : a778efdca33b0ec5beb76cf47db0e9e4728897ee
2004-02-02 15:45:22 -08:00
Steve Reinhardt 7b07b0877f Change MemReqPtr parameters to references.
This avoids incrementing and decrementing the MemReq
reference counters on every call and return.

arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
cpu/exec_context.hh:
cpu/memtest/memtest.cc:
cpu/memtest/memtest.hh:
dev/alpha_console.cc:
dev/alpha_console.hh:
    Change MemReqPtr parameters to references.

--HG--
extra : convert_revision : 3ba18bdd9f996563988402576bfdd3430e1ab1e5
2004-02-02 10:47:21 -08:00
Nathan Binkert bbf952376e Update for changes in the console
This is basically the same thing that was done for tlaser_uart

--HG--
extra : convert_revision : e0de84b83d1ee4fe0ef769b4de232dbbd7d9c228
2004-01-30 18:12:48 -05:00
Nathan Binkert 4ae64216c3 Merge
--HG--
extra : convert_revision : 8690e31b64235874d74ea4a1123a408610fb115b
2004-01-30 16:01:26 -05:00
Ali Saidi 0035440536 Linux boots with no devices
dev/tsunami.hh:
    Started commenting code
dev/tsunami_cchip.cc:
    removed unneccessary config files
dev/tsunami_io.cc:
    Added code to see the value written
dev/tsunami_uart.cc:
    conviently one of the addresses the SuperI/O southbridge can be is the same space
    as the UART. This stops the simulator from panicing although it should probably be
    changed a bit.

--HG--
extra : convert_revision : a3334a2c418ee8228089d0e1791fa78bbb276fe5
2004-01-30 15:24:50 -05:00
Nathan Binkert ee4263f72e Fix character input by handling the character and the
special console values separately.

dev/alpha_console.cc:
    use new console specific input function

--HG--
extra : convert_revision : 08997d6115d2aac3a26cac2774b3c3fc0cd76ab0
2004-01-29 16:32:03 -05:00
Nathan Binkert 2db1b6ea1b provide an output stream for simulator output. (This takes place of the
statStream catchall that we had before)
Also provide an optional output directory that multiple simulator output
files can be written to.
Make most output files use the output directory

base/misc.cc:
    send warnings to the outputStream as well
base/trace.cc:
    dprintf_stream defaults to cerr
dev/console.cc:
    use the output directory for the console output if it exists
dev/etherdump.cc:
    dump to the output directory if it exists
sim/builder.cc:
sim/builder.hh:
    move constructor and destructor to .cc file
    use a function to get the stream that the builder dumps its
    output to, and create a separate file in the output directory
    if able
sim/main.cc:
    statStream -> outputStream
sim/serialize.cc:
    dump checkpoints to the output directory if specified
sim/universe.cc:
    provide an output stream for simulator output.  (This takes place of the
    statStream catchall that we had before)
    Also provide an optional output directory that multiple simulator output
    files can be written to.

--HG--
extra : convert_revision : 03abce20edbbf7ec19c9ddd8d69ec8485c383532
2004-01-29 00:38:18 -05:00
Ali Saidi 00c49783ef moved devices around in config space and support figuring out cpuid
from cchip register

dev/tsunami_cchip.cc:
    added support for figuring out which cpu you are

--HG--
extra : convert_revision : 7862678a259931bb0a5b2ca8ad298a704bd272ec
2004-01-28 20:23:40 -05:00
Ron Dreslinski d41c904402 Add support for PIC interrupts in IO, and DIRx interrupts in CChip
dev/tsunami_cchip.cc:
dev/tsunami_cchip.hh:
    Add Interrupt capabilities for DIRx, added postDRIR and clearDRIR
    functions
dev/tsunami_io.cc:
    Add PIC interrupts, and post/clearPIC functions
dev/tsunami_io.hh:
    Add support for PIC interrupts, added post/clearPIC functions

--HG--
extra : convert_revision : b705568670b157c1a4496c365226526fa96e21e0
2004-01-28 19:18:29 -05:00
Ali Saidi b6fba57065 our first interrupt
cpu/exetrace.cc:
    added looking for symbols at PC+4 and PC+8 thanks to gcc skiping
    setting the gp where it can and jumping <func>+8
dev/console.cc:
    commented out weird interrupt per nate's suggestion
dev/tsunami_cchip.cc:
    moved rtc flag to correct bit
dev/tsunami_io.cc:
    time interrupt will be 1024Hz and at some point be configurable by
    linux
dev/tsunami_io.hh:
    Timer interrupt will be 1024hz for now and in the future be
    configurable by linux

--HG--
extra : convert_revision : 2fcc924c8848eb3c6166d9d517617ed193a2b89a
2004-01-28 18:12:52 -05:00
Ron Dreslinski 3ccc0b1f96 Add support for RTC to interrupt, HACK in alpha_console temporary
dev/alpha_console.cc:
    Fix reference to tlaserclock, HACK FOR NOW
dev/alpha_console.hh:
    fix reference to tlaser_clock, HACK FOR NOW
dev/tsunami.cc:
    Add proper tsunami chip pointers
dev/tsunami.hh:
    add proper tsunami chip pointers add RTC interrupt capabilities
dev/tsunami_cchip.cc:
    Add proper Interrupt for RTC
dev/tsunami_cchip.hh:
    Add proper interrupt for RTC
dev/tsunami_io.cc:
dev/tsunami_io.hh:
    Make RTC interrupt
dev/tsunami_pchip.cc:
dev/tsunami_pchip.hh:
    Add back pointer to tsunami

--HG--
extra : convert_revision : 2b0a8616b0bed8d9962ee5ca643dce56b9922d52
2004-01-27 21:36:46 -05:00
Ali Saidi 6f3c09a12c uart works in linux
dev/tsunami_uart.cc:
    added code make it work with linux's uart code.

--HG--
extra : convert_revision : 893a3439dac16cfe68dbd50daa475be04d9ee3de
2004-01-27 18:14:04 -05:00
Ali Saidi b7f44f6e06 Support for Tsunami coming along... RTC, PIC working, UART in progress
dev/tsunami_io.cc:
    PIC, PIT, RTC implementation for tsunami working so far
dev/tsunami_io.hh:
    PIT, PIC, RTC implementation for tlaser working so far
dev/tsunamireg.h:
    Added RTC defines
kern/linux/linux_system.cc:
    wrote cycle frequency into variable so linux doesn't probe for it.
    The support exists, but it takes two seconds of time to do on a real
    machine, so forever in the simulator.

--HG--
extra : convert_revision : e0ed7f271ece4ed69c06af35d1b0e8ed848cd138
2004-01-26 13:26:34 -05:00
Ron Dreslinski 9b397ce7f4 Add RTC event for uip bit
dev/tsunami_io.cc:
    Add RTC event to change the state of a uip bit
dev/tsunami_io.hh:
    Add RTC event to change state of an uip bit

--HG--
extra : convert_revision : acde7bdfe152d3e08f7ed53b4c8e910378f6ae67
2004-01-23 13:01:32 -05:00
Ali Saidi f9f4a74986 added the 8254 programmable interval timer
--HG--
extra : convert_revision : 6a111db98c05a3dd692c757611c3eb9c8cfdd32f
2004-01-22 19:02:07 -05:00
Ali Saidi d9e8ecbf46 renamed tsunami_dma to tsunami_io
dev/tsunami_io.cc:
    renamed to io instead of dma since it's more than the DMA controller now
dev/tsunami_io.hh:
    renamed from dma to io since it's more than dma just now

--HG--
rename : dev/tsunami_dma.cc => dev/tsunami_io.cc
rename : dev/tsunami_dma.hh => dev/tsunami_io.hh
extra : convert_revision : 4ffb69679eb7cea5725fae3446e088899f1f9315
2004-01-22 00:36:26 -05:00
Ali Saidi de17a03304 updated tsunami_dma
dev/tsunami_dma.cc:
    decide actually differentiating between the different i/o requests
    would be a better idea
dev/tsunami_dma.hh:
    added mask and mode variables, incase they are needed
dev/tsunamireg.h:
    added some i/o port defs

--HG--
extra : convert_revision : 5c7a88a8f8c8725359737b399cfa80610149a5f4
2004-01-22 00:08:48 -05:00