schemas: legacy: extract XeonCPU

This allows to remove some properties from 'Aggregate' schema which are
no longer needed, since there is now a more specific schema to use.

Tested: Schema Validator Pass

Change-Id: I3ec77630977db027f17238f9ab85a334abc7b7c6
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index 3ed2ed5..9bcbcb1 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -64,6 +64,9 @@
                             "$ref": "legacy.json#/$defs/NuvotonFan"
                         },
                         {
+                            "$ref": "legacy.json#/$defs/XeonCPU"
+                        },
+                        {
                             "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
                         },
                         {
diff --git a/schemas/legacy.json b/schemas/legacy.json
index ef9114b..65cb148 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -265,6 +265,42 @@
             "required": ["Name", "Type", "Connector"],
             "type": "object"
         },
+        "XeonCPU": {
+            "description": "implemented in dbus-sensors: IntelCPUSensor",
+            "additionalProperties": false,
+            "properties": {
+                "Name": {
+                    "$ref": "#/$defs/Types/Name"
+                },
+                "Address": {
+                    "$ref": "#/$defs/Types/Address"
+                },
+                "Bus": {
+                    "$ref": "#/$defs/Types/Bus"
+                },
+                "PowerState": {
+                    "$ref": "#/$defs/Types/PowerState"
+                },
+                "Thresholds": {
+                    "$ref": "#/$defs/Types/Thresholds"
+                },
+                "DtsCritOffset": {
+                    "$ref": "#/$defs/Types/DtsCritOffset"
+                },
+                "PresenceGpio": {
+                    "$ref": "#/$defs/Types/PresenceGpio"
+                },
+                "CpuID": {
+                    "$ref": "#/$defs/Types/CpuID"
+                },
+                "Type": {
+                    "type": "string",
+                    "const": "XeonCPU"
+                }
+            },
+            "required": ["Name", "Type", "CpuID", "Address"],
+            "type": "object"
+        },
         "Aggregate": {
             "description": "Don't add additional properties to this schema. Consult README.schema for instructions on adding new Exposes element sub-schema.",
             "additionalProperties": false,
@@ -325,18 +361,12 @@
                 "ConnectsToType": {
                     "$ref": "#/$defs/Types/ConnectsToType"
                 },
-                "CpuID": {
-                    "$ref": "#/$defs/Types/CpuID"
-                },
                 "CurrScaleFactor": {
                     "$ref": "#/$defs/Types/CurrScaleFactor"
                 },
                 "Direction": {
                     "$ref": "#/$defs/Types/Direction"
                 },
-                "DtsCritOffset": {
-                    "$ref": "#/$defs/Types/DtsCritOffset"
-                },
                 "EntityId": {
                     "$ref": "#/$defs/Types/EntityId"
                 },
@@ -718,7 +748,6 @@
                     "IpmbDevice",
                     "IpmbPowerMonitor",
                     "MOSTempSensor",
-                    "XeonCPU",
                     "EEPROM",
                     "BMC",
                     "Board",