/*
- * Copyright (c) 2011-2015 ARM Limited
+ * Copyright (c) 2011-2016 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
if (snoopFilter && !system->bypassCaches()) {
// Let the snoop filter know about the success of the send operation
- snoopFilter->finishRequest(!success, addr);
+ snoopFilter->finishRequest(!success, addr, pkt->isSecure());
}
// check if we were successful in sending the packet onwards
// operation, and do it even before sending it onwards to
// avoid situations where atomic upward snoops sneak in
// between and change the filter state
- snoopFilter->finishRequest(false, pkt->getAddr());
+ snoopFilter->finishRequest(false, pkt->getAddr(), pkt->isSecure());
snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID,
sf_res.first);
bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping() &&
cpkt->fromCache();
Addr line_addr = cpkt->getBlockAddr(linesize);
+ if (cpkt->isSecure()) {
+ line_addr |= LineSecure;
+ }
SnoopMask req_port = portToMask(slave_port);
reqLookupResult = cachedLocations.find(line_addr);
bool is_hit = (reqLookupResult != cachedLocations.end());
}
void
-SnoopFilter::finishRequest(bool will_retry, const Addr addr)
+SnoopFilter::finishRequest(bool will_retry, Addr addr, bool is_secure)
{
if (reqLookupResult != cachedLocations.end()) {
// since we rely on the caller, do a basic check to ensure
// that finishRequest is being called following lookupRequest
- assert(reqLookupResult->first == (addr & ~(Addr(linesize - 1))));
+ Addr line_addr = (addr & ~(Addr(linesize - 1)));
+ if (is_secure) {
+ line_addr |= LineSecure;
+ }
+ assert(reqLookupResult->first == line_addr);
if (will_retry) {
// Undo any changes made in lookupRequest to the snoop filter
// entry if the request will come again. retryItem holds
assert(cpkt->isRequest());
Addr line_addr = cpkt->getBlockAddr(linesize);
+ if (cpkt->isSecure()) {
+ line_addr |= LineSecure;
+ }
auto sf_it = cachedLocations.find(line_addr);
bool is_hit = (sf_it != cachedLocations.end());
}
Addr line_addr = cpkt->getBlockAddr(linesize);
+ if (cpkt->isSecure()) {
+ line_addr |= LineSecure;
+ }
SnoopMask rsp_mask = portToMask(rsp_port);
SnoopMask req_mask = portToMask(req_port);
SnoopItem& sf_item = cachedLocations[line_addr];
assert(cpkt->cacheResponding());
Addr line_addr = cpkt->getBlockAddr(linesize);
+ if (cpkt->isSecure()) {
+ line_addr |= LineSecure;
+ }
auto sf_it = cachedLocations.find(line_addr);
bool is_hit = sf_it != cachedLocations.end();
// next check if we actually allocated an entry
Addr line_addr = cpkt->getBlockAddr(linesize);
+ if (cpkt->isSecure()) {
+ line_addr |= LineSecure;
+ }
auto sf_it = cachedLocations.find(line_addr);
if (sf_it == cachedLocations.end())
return;
/*
- * Copyright (c) 2013-2015 ARM Limited
+ * Copyright (c) 2013-2016 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* @param will_retry This request will retry on this bus / snoop filter
* @param addr Packet address, merely for sanity checking
*/
- void finishRequest(bool will_retry, const Addr addr);
+ void finishRequest(bool will_retry, Addr addr, bool is_secure);
/**
* Handle an incoming snoop from below (the master port). These
/** Max capacity in terms of cache blocks tracked, for sanity checking */
const unsigned maxEntryCount;
+ /**
+ * Use the lower bits of the address to keep track of the line status
+ */
+ enum LineStatus {
+ /** block holds data from the secure memory space */
+ LineSecure = 0x01,
+ };
+
/** Statistics */
Stats::Scalar totRequests;
Stats::Scalar hitSingleRequests;