{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "title": "Environment file",
  "description": "Config file to information about supported Intel RDT features",

  "type": "object",

  "properties": {

    "cpu": {
      "description": "CPU information",
      "type": "object",
      "properties": {
        "sockets": {
          "description": "Number of sockets",
          "$ref": "definitions.json#/uint_nonzero"
        },
        "cores": {
          "description": "Number of cores",
          "$ref": "definitions.json#/uint_nonzero"
        }
      },
      "required": ["sockets", "cores"],
      "additionalProperties": false
    },

    "cat" : {
      "description": "CAT support",
      "type": "object",
      "properties": {
        "l2": {
          "description": "CAT L2 support",
          "type": "object",
          "properties": {
            "cos": {
              "description": "Number of classes",
              "$ref": "definitions.json#/uint_nonzero"
            },
            "ways": {
              "description": "Number of cache ways",
              "$ref": "definitions.json#/uint_nonzero"
            },
            "cdp" : {
              "description": "CDP support",
              "type": "boolean"
            },
            "minCbmBits": {
              "description": "Minimum number of bits set in CBM",
              "$ref": "definitions.json#/uint_nonzero"
            }
          },
          "required": ["cos", "ways", "cdp", "minCbmBits"],
          "additionalProperties": false
        },
        "l3": {
          "description": "CAT L3 support",
          "type": "object",
          "properties": {
            "cos": {
              "description": "Number of classes",
              "$ref": "definitions.json#/uint_nonzero"
            },
            "ways": {
              "description": "Number of cache ways",
              "$ref": "definitions.json#/uint_nonzero"
            },
            "cdp" : {
              "description": "CDP support",
              "type": "boolean"
            },
            "minCbmBits": {
              "description": "Minimum number of bits set in CBM",
              "$ref": "definitions.json#/uint_nonzero"
            }
          },
          "required": ["cos", "ways", "cdp", "minCbmBits"],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "mba" : {
      "description": "MBA support",
      "type": "object",
      "properties": {
        "cos": {
          "description": "Number of classes",
          "$ref": "definitions.json#/uint_nonzero"
        },
        "version": {
          "description": "MBA version",
          "type": "number",
          "minimum": 0.0
        }
      },
      "required": ["cos"],
      "additionalProperties": false
    },
    "cmt" : {
      "description": "CMT support",
      "type": "object",
      "properties": {
        "occup_llc" : {
          "description": "LLC occupancy monitoring support",
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "mbm" : {
      "description": "MBM support",
      "type": "object",
      "properties": {
        "mbm_local": {
          "description": "LLC occumancy monitoring support",
          "type": "boolean"
        },
        "mbm_total": {
          "description": "LLC occumancy monitoring support",
          "type": "boolean"
        },
        "counter_length": {
          "description": "MBM counter length",
          "$ref": "definitions.json#/uint_nonzero"
        }
      },
      "additionalProperties": false
    }
  }
}
