diplomacy: report cacheability in ResourceAddress
This commit is contained in:
parent
985d9750e6
commit
ae8734da05
@ -26,9 +26,9 @@ object JSON
|
||||
}
|
||||
|
||||
private def helper(res: ResourceValue)(implicit path: Map[String, String]): Seq[String] = res match {
|
||||
case ResourceAddress(address, r, w, x) =>
|
||||
case ResourceAddress(address, r, w, x, c) =>
|
||||
AddressRange.fromSets(address).map { case AddressRange(base, size) =>
|
||||
s"""{"base":${base},"size":${size},"r":${r},"w":${w},"x":${x}}"""}
|
||||
s"""{"base":${base},"size":${size},"r":${r},"w":${w},"x":${x},"c":${c}}"""}
|
||||
case ResourceMapping(address, offset) =>
|
||||
AddressRange.fromSets(address).map { case AddressRange(base, size) =>
|
||||
s"""{"base":${base},"size":${size},"offset":${offset}}"""}
|
||||
|
@ -7,7 +7,7 @@ import config._
|
||||
import scala.collection.immutable.{ListMap,SortedMap}
|
||||
|
||||
sealed trait ResourceValue
|
||||
final case class ResourceAddress(address: Seq[AddressSet], r: Boolean, w: Boolean, x: Boolean) extends ResourceValue
|
||||
final case class ResourceAddress(address: Seq[AddressSet], r: Boolean, w: Boolean, x: Boolean, c: Boolean) extends ResourceValue
|
||||
final case class ResourceMapping(address: Seq[AddressSet], offset: BigInt) extends ResourceValue
|
||||
final case class ResourceInt(value: BigInt) extends ResourceValue
|
||||
final case class ResourceString(value: String) extends ResourceValue
|
||||
|
@ -60,7 +60,8 @@ case class TLManagerParameters(
|
||||
ResourceAddress(address,
|
||||
r = supportsAcquireB || supportsGet,
|
||||
w = supportsAcquireT || supportsPutFull,
|
||||
x = executable)
|
||||
x = executable,
|
||||
c = supportsAcquireB)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user