Deleted Added
sdiff udiff text old ( 12429:beefb9f5f551 ) new ( 12623:e6117729ae33 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 26 unchanged lines hidden (view full) ---

35
36#include "dev/mips/malta_cchip.hh"
37
38#include <deque>
39#include <string>
40#include <vector>
41
42#include "base/trace.hh"
43#include "cpu/intr_control.hh"
44#include "cpu/thread_context.hh"
45#include "debug/Malta.hh"
46#include "dev/mips/malta.hh"
47#include "dev/mips/maltareg.h"
48#include "mem/packet.hh"
49#include "mem/packet_access.hh"
50#include "mem/port.hh"
51#include "params/MaltaCChip.hh"
52#include "sim/system.hh"
53
54using namespace std;
55
56MaltaCChip::MaltaCChip(Params *p)
57 : BasicPioDevice(p, 0xfffffff), malta(p->malta)
58{
59 warn("MaltaCCHIP::MaltaCChip() not implemented.");
60
61 //Put back pointer in malta
62 malta->cchip = this;
63
64}
65
66Tick
67MaltaCChip::read(PacketPtr pkt)
68{
69 panic("MaltaCCHIP::read() not implemented.");
70 return pioDelay;
71}
72
73Tick
74MaltaCChip::write(PacketPtr pkt)
75{
76 panic("MaltaCCHIP::write() not implemented.");
77 return pioDelay;
78}
79
80void
81MaltaCChip::clearIPI(uint64_t ipintr)
82{
83 panic("MaltaCCHIP::clear() not implemented.");
84}
85
86void
87MaltaCChip::clearITI(uint64_t itintr)
88{
89 panic("MaltaCCHIP::clearITI() not implemented.");
90}
91
92void
93MaltaCChip::reqIPI(uint64_t ipreq)
94{
95 panic("MaltaCCHIP::reqIPI() not implemented.");
96}
97
98
99void
100MaltaCChip::postRTC()
101{
102 panic("MaltaCCHIP::postRTC() not implemented.");
103}
104
105void
106MaltaCChip::postIntr(uint32_t interrupt)
107{
108 uint64_t size = sys->threadContexts.size();
109 assert(size <= Malta::Max_CPUs);
110
111 for (int i=0; i < size; i++) {
112 //Note: Malta does not use index, but this was added to use the
113 //pre-existing implementation
114 malta->intrctrl->post(i, interrupt, 0);
115 DPRINTF(Malta, "posting interrupt to cpu %d, interrupt %d\n",
116 i, interrupt);
117 }
118}
119
120void
121MaltaCChip::clearIntr(uint32_t interrupt)
122{
123 uint64_t size = sys->threadContexts.size();
124 assert(size <= Malta::Max_CPUs);
125
126 for (int i=0; i < size; i++) {
127 //Note: Malta does not use index, but this was added to use the
128 //pre-existing implementation
129 malta->intrctrl->clear(i, interrupt, 0);
130 DPRINTF(Malta, "clearing interrupt to cpu %d, interrupt %d\n",
131 i, interrupt);
132 }
133}
134
135
136void
137MaltaCChip::serialize(CheckpointOut &cp) const
138{
139}
140
141void
142MaltaCChip::unserialize(CheckpointIn &cp)
143{
144}
145
146MaltaCChip *
147MaltaCChipParams::create()
148{
149 return new MaltaCChip(this);
150}
151