Merge linux tree with head
authorAndrew Schultz <alschult@umich.edu>
Mon, 9 Feb 2004 22:50:47 +0000 (17:50 -0500)
committerAndrew Schultz <alschult@umich.edu>
Mon, 9 Feb 2004 22:50:47 +0000 (17:50 -0500)
arch/alpha/alpha_memory.cc:
dev/alpha_console.cc:
dev/alpha_console.hh:
    Merge

--HG--
extra : convert_revision : 3233648f204338ab3f102ff117754dce955dcc37

1  2 
dev/alpha_console.cc
dev/alpha_console.hh

index 9411c64700c1ab25e3de2201a8d39af3e7bf1139,2dc939b975d75f29a6ba162572f8b79d0e22db84..e1b69c3ce4134f86dafd7558f6fb751b4f7f1fdd
  
  using namespace std;
  
 -AlphaConsole::AlphaConsole(const string &name, SimConsole *cons, SimpleDisk *d,
 -                           System *system, BaseCPU *cpu, TlaserClock *clock,
 -                           int num_cpus, MemoryController *mmu, Addr a)
 -    : FunctionalMemory(name), disk(d), console(cons), addr(a)
 +AlphaConsole::AlphaConsole(const string &name, SimConsole *cons,
 +                           SimpleDisk *d, int size, System *system,
 +                           BaseCPU *cpu, TsunamiIO *clock, int num_cpus,
 +                           Addr addr, Addr mask, MemoryController *mmu)
 +    : MmapDevice(name, addr, mask, mmu), disk(d), console(cons)
  {
+     mmu->add_child(this, Range<Addr>(addr, addr + size));
      consoleData = new uint8_t[size];
      memset(consoleData, 0, size);
  
@@@ -247,11 -248,9 +250,9 @@@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(AlphaCo
      Param<int> num_cpus;
      SimObjectParam<MemoryController *> mmu;
      Param<Addr> addr;
-     Param<Addr> mask;
      SimObjectParam<System *> system;
      SimObjectParam<BaseCPU *> cpu;
 -    SimObjectParam<TlaserClock *> clock;
 +    SimObjectParam<TsunamiIO *> clock;
  
  END_DECLARE_SIM_OBJECT_PARAMS(AlphaConsole)
  
index 4647be538d60ce26f3a9a909c5d6cd5d6768c539,54a2af6d51a373eee519cbc7931b437a534a48b1..29ebec1bb34e48ac1dd9c025afee9d018a407f91
  #ifndef __ALPHA_CONSOLE_HH__
  #define __ALPHA_CONSOLE_HH__
  
- #include "sim/host.hh"
+ #include "base/range.hh"
  #include "dev/alpha_access.h"
- #include "mem/functional_mem/mmap_device.hh"
+ #include "mem/functional_mem/functional_memory.hh"
+ #include "sim/host.hh"
 +#include "dev/tsunami_io.hh"
  
  class BaseCPU;
  class SimConsole;
@@@ -83,15 -83,15 +84,17 @@@ class AlphaConsole : public FunctionalM
      /** the system console (the terminal) is accessable from the console */
      SimConsole *console;
  
+     Addr addr;
+     static const Addr size = 0x80; // equal to sizeof(alpha_access);
    public:
      /** Standard Constructor */
 -    AlphaConsole(const std::string &name, SimConsole *cons, SimpleDisk *d,
 -                 System *system, BaseCPU *cpu, TlaserClock *clock,
 -                 int num_cpus, MemoryController *mmu, Addr addr);
 +    AlphaConsole(const std::string &name, SimConsole *cons,
 +                 SimpleDisk *d, int size,
 +                 System *system, BaseCPU *cpu,
 +                 TsunamiIO *clock, int num_cpus,
 +                 Addr addr, Addr mask, MemoryController *mmu);
  
-   public:
      /**
       * memory mapped reads and writes
       */