45d44
< class Platform;
54c53
< * must respond to. The device must also provide getAddrRanges() function
---
> * must respond to. The device must also provide the addressRanges() function
65c64,65
< virtual AddrRangeList getAddrRanges();
---
> virtual void getDeviceAddressRanges(AddrRangeList &resp,
> bool &snoop);
132,134d131
< /** Port accesses a cache which requires snooping */
< bool recvSnoops;
<
137,141c134
< {
< if (recvSnoops) return 0;
<
< panic("dma port shouldn't be used for pio access."); M5_DUMMY_RETURN
< }
---
> { panic("dma port shouldn't be used for pio access."); M5_DUMMY_RETURN }
143,144c136
< {
< if (recvSnoops) return;
---
> { panic("dma port shouldn't be used for pio access."); }
146,147c138,139
< panic("dma port shouldn't be used for pio access.");
< }
---
> virtual void recvStatusChange(Status status)
> { ; }
149,154d140
< virtual void recvRangeChange()
< {
< // DMA port is a master with a single slave so there is no choice and
< // thus no need to worry about any address changes
< }
<
157,158c143,145
< virtual bool isSnooping()
< { return recvSnoops; }
---
> virtual void getDeviceAddressRanges(AddrRangeList &resp,
> bool &snoop)
> { resp.clear(); snoop = false; }
167,168c154
< DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff,
< bool recv_snoops = false);
---
> DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff);
182c168
< * implement getAddrRanges(), read(), and write(). The magic do choose which
---
> * implement addressRanges(), read(), and write(). The magic do choose which
189,193d174
<
< /** The platform we are in. This is used to decide what type of memory
< * transaction we should perform. */
< Platform *platform;
<
200,206c181
< /**
< * Every PIO device is obliged to provide an implementation that
< * returns the address ranges the device responds to.
< *
< * @return a list of non-overlapping address ranges
< */
< virtual AddrRangeList getAddrRanges() = 0;
---
> virtual void addressRanges(AddrRangeList &range_list) = 0;
237,238c212,222
< virtual Port *getPort(const std::string &if_name, int idx = -1);
<
---
> virtual Port *getPort(const std::string &if_name, int idx = -1)
> {
> if (if_name == "pio") {
> if (pioPort != NULL)
> fatal("%s: pio port already connected to %s",
> name(), pioPort->getPeer()->name());
> pioPort = new PioPort(this, sys);
> return pioPort;
> } else
> return NULL;
> }
265,268c249,250
< /**
< * Determine the address ranges that this device responds to.
< *
< * @return a list of non-overlapping address ranges
---
> /** return the address ranges that this device responds to.
> * @param range_list range list to populate with ranges
270c252
< virtual AddrRangeList getAddrRanges();
---
> void addressRanges(AddrRangeList &range_list);
306c288,305
< virtual Port *getPort(const std::string &if_name, int idx = -1);
---
> virtual Port *getPort(const std::string &if_name, int idx = -1)
> {
> if (if_name == "pio") {
> if (pioPort != NULL)
> fatal("%s: pio port already connected to %s",
> name(), pioPort->getPeer()->name());
> pioPort = new PioPort(this, sys);
> return pioPort;
> } else if (if_name == "dma") {
> if (dmaPort != NULL)
> fatal("%s: dma port already connected to %s",
> name(), dmaPort->getPeer()->name());
> dmaPort = new DmaPort(this, sys, params()->min_backoff_delay,
> params()->max_backoff_delay);
> return dmaPort;
> } else
> return NULL;
> }