summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru>2022-06-28 13:58:03 +0300
committerEvgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru>2022-06-28 13:58:03 +0300
commitf9859233fefb5abd6a0ceaf5fb0c865ca176969f (patch)
tree625f2587fee3df7a797b51661884ec2bf0d207f4
parentc2ca3080bfea9c28f8d38f001a051135e06ad7cc (diff)
downloadopenbmc-sensors_SILABMC-148.tar.xz
[Add]ipmi-host patches, sila-yaml-configsensors_SILABMC-148
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config.bb35
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru-properties.yaml47
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru.yaml165
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-inventory-sensors.yaml340
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-sensors.yaml762
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/.phosphor-ipmi-host_%.bbappend.un~bin0 -> 902 bytes
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend21
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json178
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json7
-rwxr-xr-xmeta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh5
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service12
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend6
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend7
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend~7
-rw-r--r--meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiator-mailbox-interface.patch138
-rw-r--r--meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend5
-rw-r--r--meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend1
-rw-r--r--meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json14
-rw-r--r--meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch92
-rw-r--r--meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch417
-rw-r--r--meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch327
-rw-r--r--meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend7
22 files changed, 2593 insertions, 0 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config.bb b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config.bb
new file mode 100644
index 0000000000..81e81d2a48
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config.bb
@@ -0,0 +1,35 @@
+SUMMARY = "YAML configuration for sila"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+SRC_URI = " \
+ file://sila-ipmi-fru.yaml \
+ file://sila-ipmi-fru-properties.yaml \
+ file://sila-ipmi-inventory-sensors.yaml \
+ file://sila-ipmi-sensors.yaml \
+ "
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -m 0644 -D sila-ipmi-fru-properties.yaml \
+ ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
+ install -m 0644 -D sila-ipmi-fru.yaml \
+ ${D}${datadir}/${BPN}/ipmi-fru-read.yaml
+ install -m 0644 -D sila-ipmi-inventory-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
+ install -m 0644 -D sila-ipmi-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-sensors.yaml
+}
+
+FILES:${PN}-dev = " \
+ ${datadir}/${BPN}/ipmi-extra-properties.yaml \
+ ${datadir}/${BPN}/ipmi-fru-read.yaml \
+ ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \
+ ${datadir}/${BPN}/ipmi-sensors.yaml \
+ "
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru-properties.yaml b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru-properties.yaml
new file mode 100644
index 0000000000..472679d765
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru-properties.yaml
@@ -0,0 +1,47 @@
+/system: &DEFAULTS
+ xyz.openbmc_project.Inventory.Decorator.Cacheable:
+ Cached: 'true'
+ xyz.openbmc_project.Inventory.Decorator.Replaceable:
+ FieldReplaceable: 'true'
+ xyz.openbmc_project.Inventory.Item:
+ Present: 'true'
+/system/chassis/motherboard:
+ <<: *DEFAULTS
+/system/chassis/motherboard/cpu0:
+ <<: *DEFAULTS
+/system/chassis/motherboard/cpu1:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm0:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm1:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm2:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm3:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm4:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm5:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm6:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm7:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm8:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm9:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm10:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm11:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm12:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm13:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm14:
+ <<: *DEFAULTS
+/system/chassis/motherboard/dimm15:
+ <<: *DEFAULTS
+/system/chassis/motherboard/opfw:
+ <<: *DEFAULTS
diff --git a/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru.yaml b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru.yaml
new file mode 100644
index 0000000000..9d0d95d58b
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-fru.yaml
@@ -0,0 +1,165 @@
+1:
+ /system/chassis/motherboard/cpu0: &CPU_DEFAULTS
+ entityID: 3
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruProperty: Mfg Date
+ IPMIFruSection: Board
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Board
+ PartNumber:
+ IPMIFruProperty: Part Number
+ IPMIFruSection: Board
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Board
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruProperty: Custom Field 2
+ IPMIFruSection: Board
+ IPMIFruValueDelimiter: 58
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Board
+2:
+ /system/chassis/motherboard/cpu1:
+ <<: *CPU_DEFAULTS
+ entityInstance: 2
+3:
+ /system:
+ entityID: 7
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ Model:
+ IPMIFruProperty: Part Number
+ IPMIFruSection: Chassis
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Chassis
+ /system/chassis/motherboard:
+ entityID: 7
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruProperty: Mfg Date
+ IPMIFruSection: Board
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Board
+ PartNumber:
+ IPMIFruProperty: Part Number
+ IPMIFruSection: Board
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Board
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Board
+4:
+ /system/chassis/motherboard/dimm0: &DIMM_DEFAULTS
+ entityID: 32
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Decorator.Asset:
+ BuildDate:
+ IPMIFruProperty: Mfg Date
+ IPMIFruSection: Product
+ Manufacturer:
+ IPMIFruProperty: Manufacturer
+ IPMIFruSection: Product
+ Model:
+ IPMIFruProperty: Model Number
+ IPMIFruSection: Product
+ PartNumber:
+ IPMIFruProperty: Part Number
+ IPMIFruSection: Product
+ SerialNumber:
+ IPMIFruProperty: Serial Number
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruProperty: Version
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Product
+5:
+ /system/chassis/motherboard/dimm1:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 2
+6:
+ /system/chassis/motherboard/dimm2:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 3
+7:
+ /system/chassis/motherboard/dimm3:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 4
+8:
+ /system/chassis/motherboard/dimm4:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 5
+9:
+ /system/chassis/motherboard/dimm5:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 6
+10:
+ /system/chassis/motherboard/dimm6:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 7
+11:
+ /system/chassis/motherboard/dimm7:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 8
+12:
+ /system/chassis/motherboard/dimm8:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 9
+13:
+ /system/chassis/motherboard/dimm9:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 10
+14:
+ /system/chassis/motherboard/dimm10:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 11
+15:
+ /system/chassis/motherboard/dimm11:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 12
+16:
+ /system/chassis/motherboard/dimm12:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 13
+17:
+ /system/chassis/motherboard/dimm13:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 14
+18:
+ /system/chassis/motherboard/dimm14:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 15
+19:
+ /system/chassis/motherboard/dimm15:
+ <<: *DIMM_DEFAULTS
+ entityInstance: 16
+28:
+ /system/chassis/motherboard/opfw:
+ entityID: 34
+ entityInstance: 0
+ interfaces:
+ xyz.openbmc_project.Inventory.Item:
+ PrettyName:
+ IPMIFruProperty: Name
+ IPMIFruSection: Product
+ xyz.openbmc_project.Inventory.Decorator.Revision:
+ Version:
+ IPMIFruProperty: Version
+ IPMIFruSection: Product
diff --git a/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-inventory-sensors.yaml b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-inventory-sensors.yaml
new file mode 100644
index 0000000000..5f96f87c1e
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-inventory-sensors.yaml
@@ -0,0 +1,340 @@
+/xyz/openbmc_project/inventory/system:
+ eventReadingType: 111
+ offset: 2
+ sensorID: 144
+ sensorType: 18
+/xyz/openbmc_project/inventory/system/chassis/motherboard:
+ eventReadingType: 3
+ offset: 0
+ sensorID: 140
+ sensorType: 199
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 8
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 43
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core1:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 44
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core10:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 53
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core11:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 54
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core12:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 55
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core13:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 56
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core14:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 57
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core15:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 58
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core16:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 59
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core17:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 60
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core18:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 61
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core19:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 62
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core2:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 45
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core20:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 63
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core21:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 64
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core22:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 65
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core23:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 66
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core3:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 46
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core4:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 47
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core5:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 48
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core6:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 49
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core7:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 50
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core8:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 51
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core9:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 52
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 9
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core0:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 67
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core1:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 68
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core10:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 77
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core11:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 78
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core12:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 79
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core13:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 80
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core14:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 81
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core15:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 82
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core16:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 83
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core17:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 84
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core18:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 85
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core19:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 86
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core2:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 69
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core20:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 87
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core21:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 88
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core22:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 89
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core23:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 90
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core3:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 70
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core4:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 71
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core5:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 72
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core6:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 73
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core7:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 74
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core8:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 75
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core9:
+ eventReadingType: 111
+ offset: 8
+ sensorID: 76
+ sensorType: 7
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 11
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 12
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 21
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 22
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm12:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 23
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm13:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 24
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm14:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 25
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm15:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 26
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm2:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 13
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm3:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 14
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm4:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 15
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm5:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 16
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm6:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 17
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm7:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 18
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm8:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 19
+ sensorType: 12
+/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm9:
+ eventReadingType: 111
+ offset: 4
+ sensorID: 20
+ sensorType: 12
diff --git a/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-sensors.yaml b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-sensors.yaml
new file mode 100644
index 0000000000..d12d3397ba
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/configuration/sila-yaml-config/sila-ipmi-sensors.yaml
@@ -0,0 +1,762 @@
+2:
+ entityID: 34
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.State.Boot.Progress:
+ BootProgress:
+ Offsets:
+ 0:
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
+ type: string
+ 1:
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit
+ type: string
+ 3:
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit
+ type: string
+ 7:
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit
+ type: string
+ 19:
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSStart
+ type: string
+ 20:
+ set: xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit
+ type: string
+ mutability: Mutability::Write|Mutability::Read
+ path: /xyz/openbmc_project/state/host0
+ readingType: eventdata2
+ sensorNamePattern: nameProperty
+ sensorReadingType: 111
+ sensorType: 15
+ serviceInterface: org.freedesktop.DBus.Properties
+3: &OCC_DEFAULTS
+ entityID: 210
+ entityInstance: 1
+ interfaces:
+ org.open_power.OCC.Status:
+ OccActive:
+ Offsets:
+ 0:
+ assert: false
+ deassert: true
+ type: bool
+ 1:
+ assert: true
+ deassert: false
+ type: bool
+ mutability: Mutability::Write|Mutability::Read
+ path: /org/open_power/control/occ0
+ readingType: assertion
+ sensorNamePattern: nameLeaf
+ sensorReadingType: 9
+ sensorType: 7
+ serviceInterface: org.freedesktop.DBus.Properties
+4:
+ <<: *OCC_DEFAULTS
+ entityInstance: 2
+ path: /org/open_power/control/occ1
+8: &CPU_DEFAULTS
+ entityID: 3
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 7:
+ assert: true
+ deassert: false
+ type: bool
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 8:
+ assert: false
+ deassert: true
+ type: bool
+ Prereqs:
+ 7:
+ assert: true
+ deassert: false
+ type: bool
+ mutability: Mutability::Write|Mutability::Read
+ path: /system/chassis/motherboard/cpu0
+ readingType: assertion
+ sensorNamePattern: nameLeaf
+ sensorReadingType: 111
+ sensorType: 7
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+9:
+ <<: *CPU_DEFAULTS
+ entityInstance: 2
+ path: /system/chassis/motherboard/cpu1
+11: &DIMM_FUNC_DEFAULTS
+ entityID: 32
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 6:
+ assert: true
+ deassert: false
+ type: bool
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 4:
+ assert: false
+ deassert: true
+ type: bool
+ Prereqs:
+ 6:
+ assert: true
+ deassert: false
+ type: bool
+ mutability: Mutability::Write|Mutability::Read
+ path: /system/chassis/motherboard/dimm0
+ readingType: assertion
+ sensorNamePattern: nameLeaf
+ sensorReadingType: 111
+ sensorType: 12
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+12:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 2
+ path: /system/chassis/motherboard/dimm1
+13:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 3
+ path: /system/chassis/motherboard/dimm2
+14:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 4
+ path: /system/chassis/motherboard/dimm3
+15:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 5
+ path: /system/chassis/motherboard/dimm4
+16:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 6
+ path: /system/chassis/motherboard/dimm5
+17:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 7
+ path: /system/chassis/motherboard/dimm6
+18:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 8
+ path: /system/chassis/motherboard/dimm7
+19:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 9
+ path: /system/chassis/motherboard/dimm8
+20:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 10
+ path: /system/chassis/motherboard/dimm9
+21:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 11
+ path: /system/chassis/motherboard/dimm10
+22:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 12
+ path: /system/chassis/motherboard/dimm11
+23:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 13
+ path: /system/chassis/motherboard/dimm12
+24:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 14
+ path: /system/chassis/motherboard/dimm13
+25:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 15
+ path: /system/chassis/motherboard/dimm14
+26:
+ <<: *DIMM_FUNC_DEFAULTS
+ entityInstance: 16
+ path: /system/chassis/motherboard/dimm15
+27: &DIMM_TEMP_DEFAULTS
+ bExp: 0
+ entityID: 32
+ entityInstance: 17
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 255:
+ type: double
+ multiplierM: 5
+ mutability: Mutability::Write|Mutability::Read
+ offsetB: 0
+ path: /xyz/openbmc_project/sensors/temperature/dimm0_temp
+ rExp: -1
+ readingType: readingData
+ scale: 0
+ sensorNamePattern: nameLeaf
+ sensorReadingType: 1
+ sensorType: 1
+ serviceInterface: org.freedesktop.DBus.Properties
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+28:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 18
+ path: /xyz/openbmc_project/sensors/temperature/dimm1_temp
+29:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 25
+ path: /xyz/openbmc_project/sensors/temperature/dimm2_temp
+30:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 26
+ path: /xyz/openbmc_project/sensors/temperature/dimm3_temp
+31:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 27
+ path: /xyz/openbmc_project/sensors/temperature/dimm4_temp
+32:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 28
+ path: /xyz/openbmc_project/sensors/temperature/dimm5_temp
+33:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 29
+ path: /xyz/openbmc_project/sensors/temperature/dimm6_temp
+34:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 30
+ path: /xyz/openbmc_project/sensors/temperature/dimm7_temp
+35:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 31
+ path: /xyz/openbmc_project/sensors/temperature/dimm8_temp
+36:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 32
+ path: /xyz/openbmc_project/sensors/temperature/dimm9_temp
+37:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 19
+ path: /xyz/openbmc_project/sensors/temperature/dimm10_temp
+38:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 20
+ path: /xyz/openbmc_project/sensors/temperature/dimm11_temp
+39:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 21
+ path: /xyz/openbmc_project/sensors/temperature/dimm12_temp
+40:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 22
+ path: /xyz/openbmc_project/sensors/temperature/dimm13_temp
+41:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 23
+ path: /xyz/openbmc_project/sensors/temperature/dimm14_temp
+42:
+ <<: *DIMM_TEMP_DEFAULTS
+ entityInstance: 24
+ path: /xyz/openbmc_project/sensors/temperature/dimm15_temp
+43: &CORE_FUNC_DEFAULTS
+ entityID: 208
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.Inventory.Item:
+ Present:
+ Offsets:
+ 7:
+ assert: true
+ deassert: false
+ skipOn: deassert
+ type: bool
+ xyz.openbmc_project.State.Decorator.OperationalStatus:
+ Functional:
+ Offsets:
+ 8:
+ assert: false
+ deassert: true
+ type: bool
+ Prereqs:
+ 7:
+ assert: true
+ deassert: false
+ type: bool
+ mutability: Mutability::Write|Mutability::Read
+ path: /system/chassis/motherboard/cpu0/core0
+ readingType: assertion
+ sensorNamePattern: nameParentLeaf
+ sensorReadingType: 111
+ sensorType: 7
+ serviceInterface: xyz.openbmc_project.Inventory.Manager
+44:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 2
+ path: /system/chassis/motherboard/cpu0/core1
+45:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 3
+ path: /system/chassis/motherboard/cpu0/core2
+46:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 4
+ path: /system/chassis/motherboard/cpu0/core3
+47:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 5
+ path: /system/chassis/motherboard/cpu0/core4
+48:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 6
+ path: /system/chassis/motherboard/cpu0/core5
+49:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 7
+ path: /system/chassis/motherboard/cpu0/core6
+50:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 8
+ path: /system/chassis/motherboard/cpu0/core7
+51:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 9
+ path: /system/chassis/motherboard/cpu0/core8
+52:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 10
+ path: /system/chassis/motherboard/cpu0/core9
+53:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 11
+ path: /system/chassis/motherboard/cpu0/core10
+54:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 12
+ path: /system/chassis/motherboard/cpu0/core11
+55:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 13
+ path: /system/chassis/motherboard/cpu0/core12
+56:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 14
+ path: /system/chassis/motherboard/cpu0/core13
+57:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 15
+ path: /system/chassis/motherboard/cpu0/core14
+58:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 16
+ path: /system/chassis/motherboard/cpu0/core15
+59:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 17
+ path: /system/chassis/motherboard/cpu0/core16
+60:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 18
+ path: /system/chassis/motherboard/cpu0/core17
+61:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 19
+ path: /system/chassis/motherboard/cpu0/core18
+62:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 20
+ path: /system/chassis/motherboard/cpu0/core19
+63:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 21
+ path: /system/chassis/motherboard/cpu0/core20
+64:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 22
+ path: /system/chassis/motherboard/cpu0/core21
+65:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 23
+ path: /system/chassis/motherboard/cpu0/core22
+66:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 24
+ path: /system/chassis/motherboard/cpu0/core23
+67:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 25
+ path: /system/chassis/motherboard/cpu1/core0
+68:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 26
+ path: /system/chassis/motherboard/cpu1/core1
+69:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 27
+ path: /system/chassis/motherboard/cpu1/core2
+70:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 28
+ path: /system/chassis/motherboard/cpu1/core3
+71:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 29
+ path: /system/chassis/motherboard/cpu1/core4
+72:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 30
+ path: /system/chassis/motherboard/cpu1/core5
+73:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 31
+ path: /system/chassis/motherboard/cpu1/core6
+74:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 32
+ path: /system/chassis/motherboard/cpu1/core7
+75:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 33
+ path: /system/chassis/motherboard/cpu1/core8
+76:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 34
+ path: /system/chassis/motherboard/cpu1/core9
+77:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 35
+ path: /system/chassis/motherboard/cpu1/core10
+78:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 36
+ path: /system/chassis/motherboard/cpu1/core11
+79:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 37
+ path: /system/chassis/motherboard/cpu1/core12
+80:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 38
+ path: /system/chassis/motherboard/cpu1/core13
+81:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 39
+ path: /system/chassis/motherboard/cpu1/core14
+82:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 40
+ path: /system/chassis/motherboard/cpu1/core15
+83:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 41
+ path: /system/chassis/motherboard/cpu1/core16
+84:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 42
+ path: /system/chassis/motherboard/cpu1/core17
+85:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 43
+ path: /system/chassis/motherboard/cpu1/core18
+86:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 44
+ path: /system/chassis/motherboard/cpu1/core19
+87:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 45
+ path: /system/chassis/motherboard/cpu1/core20
+88:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 46
+ path: /system/chassis/motherboard/cpu1/core21
+89:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 47
+ path: /system/chassis/motherboard/cpu1/core22
+90:
+ <<: *CORE_FUNC_DEFAULTS
+ entityInstance: 48
+ path: /system/chassis/motherboard/cpu1/core23
+91: &CORE_TEMP_DEFAULTS
+ bExp: 0
+ entityID: 208
+ entityInstance: 49
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 255:
+ type: double
+ multiplierM: 5
+ mutability: Mutability::Write|Mutability::Read
+ offsetB: 0
+ path: /xyz/openbmc_project/sensors/temperature/p0_core0_temp
+ rExp: -1
+ readingType: readingData
+ scale: 0
+ sensorNamePattern: nameLeaf
+ sensorReadingType: 1
+ sensorType: 1
+ serviceInterface: org.freedesktop.DBus.Properties
+ unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+92:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 50
+ path: /xyz/openbmc_project/sensors/temperature/p0_core1_temp
+93:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 51
+ path: /xyz/openbmc_project/sensors/temperature/p0_core2_temp
+94:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 52
+ path: /xyz/openbmc_project/sensors/temperature/p0_core3_temp
+95:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 53
+ path: /xyz/openbmc_project/sensors/temperature/p0_core4_temp
+96:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 54
+ path: /xyz/openbmc_project/sensors/temperature/p0_core5_temp
+97:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 55
+ path: /xyz/openbmc_project/sensors/temperature/p0_core6_temp
+98:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 56
+ path: /xyz/openbmc_project/sensors/temperature/p0_core7_temp
+99:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 57
+ path: /xyz/openbmc_project/sensors/temperature/p0_core8_temp
+100:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 58
+ path: /xyz/openbmc_project/sensors/temperature/p0_core9_temp
+101:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 59
+ path: /xyz/openbmc_project/sensors/temperature/p0_core10_temp
+102:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 60
+ path: /xyz/openbmc_project/sensors/temperature/p0_core11_temp
+103:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 61
+ path: /xyz/openbmc_project/sensors/temperature/p0_core12_temp
+104:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 62
+ path: /xyz/openbmc_project/sensors/temperature/p0_core13_temp
+105:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 63
+ path: /xyz/openbmc_project/sensors/temperature/p0_core14_temp
+106:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 64
+ path: /xyz/openbmc_project/sensors/temperature/p0_core15_temp
+107:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 65
+ path: /xyz/openbmc_project/sensors/temperature/p0_core16_temp
+108:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 66
+ path: /xyz/openbmc_project/sensors/temperature/p0_core17_temp
+109:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 67
+ path: /xyz/openbmc_project/sensors/temperature/p0_core18_temp
+110:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 68
+ path: /xyz/openbmc_project/sensors/temperature/p0_core19_temp
+111:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 69
+ path: /xyz/openbmc_project/sensors/temperature/p0_core20_temp
+112:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 70
+ path: /xyz/openbmc_project/sensors/temperature/p0_core21_temp
+113:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 71
+ path: /xyz/openbmc_project/sensors/temperature/p0_core22_temp
+114:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 72
+ path: /xyz/openbmc_project/sensors/temperature/p0_core23_temp
+115:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 73
+ path: /xyz/openbmc_project/sensors/temperature/p1_core0_temp
+116:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 74
+ path: /xyz/openbmc_project/sensors/temperature/p1_core1_temp
+117:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 75
+ path: /xyz/openbmc_project/sensors/temperature/p1_core2_temp
+118:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 76
+ path: /xyz/openbmc_project/sensors/temperature/p1_core3_temp
+119:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 77
+ path: /xyz/openbmc_project/sensors/temperature/p1_core4_temp
+120:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 78
+ path: /xyz/openbmc_project/sensors/temperature/p1_core5_temp
+121:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 79
+ path: /xyz/openbmc_project/sensors/temperature/p1_core6_temp
+122:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 80
+ path: /xyz/openbmc_project/sensors/temperature/p1_core7_temp
+123:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 81
+ path: /xyz/openbmc_project/sensors/temperature/p1_core8_temp
+124:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 82
+ path: /xyz/openbmc_project/sensors/temperature/p1_core9_temp
+125:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 83
+ path: /xyz/openbmc_project/sensors/temperature/p1_core10_temp
+126:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 84
+ path: /xyz/openbmc_project/sensors/temperature/p1_core11_temp
+127:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 85
+ path: /xyz/openbmc_project/sensors/temperature/p1_core12_temp
+128:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 86
+ path: /xyz/openbmc_project/sensors/temperature/p1_core13_temp
+129:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 87
+ path: /xyz/openbmc_project/sensors/temperature/p1_core14_temp
+130:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 88
+ path: /xyz/openbmc_project/sensors/temperature/p1_core15_temp
+131:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 89
+ path: /xyz/openbmc_project/sensors/temperature/p1_core16_temp
+132:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 90
+ path: /xyz/openbmc_project/sensors/temperature/p1_core17_temp
+133:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 91
+ path: /xyz/openbmc_project/sensors/temperature/p1_core18_temp
+134:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 92
+ path: /xyz/openbmc_project/sensors/temperature/p1_core19_temp
+135:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 93
+ path: /xyz/openbmc_project/sensors/temperature/p1_core20_temp
+136:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 94
+ path: /xyz/openbmc_project/sensors/temperature/p1_core21_temp
+137:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 95
+ path: /xyz/openbmc_project/sensors/temperature/p1_core22_temp
+138:
+ <<: *CORE_TEMP_DEFAULTS
+ entityInstance: 96
+ path: /xyz/openbmc_project/sensors/temperature/p1_core23_temp
+139:
+ entityID: 34
+ entityInstance: 2
+ interfaces:
+ xyz.openbmc_project.Control.Boot.RebootAttempts:
+ AttemptsLeft:
+ Offsets:
+ 255:
+ type: uint32_t
+ mutability: Mutability::Write|Mutability::Read
+ path: /xyz/openbmc_project/state/host0
+ readingType: readingAssertion
+ sensorNamePattern: nameProperty
+ sensorReadingType: 111
+ sensorType: 195
+ serviceInterface: org.freedesktop.DBus.Properties
+145:
+ entityID: 35
+ entityInstance: 1
+ interfaces:
+ xyz.openbmc_project.State.OperatingSystem.Status:
+ OperatingSystemState:
+ Offsets:
+ 1:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CBoot
+ type: string
+ 2:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot
+ type: string
+ 3:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.DiagBoot
+ type: string
+ 4:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CDROMBoot
+ type: string
+ 5:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.ROMBoot
+ type: string
+ 6:
+ assert: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete
+ type: string
+ mutability: Mutability::Write|Mutability::Read
+ path: /xyz/openbmc_project/state/host0
+ readingType: assertion
+ sensorNamePattern: nameProperty
+ sensorReadingType: 111
+ sensorType: 31
+ serviceInterface: org.freedesktop.DBus.Properties
+
+254:
+ sensorType: 2
+ path: /xyz/openbmc_project/sensors/voltage/vbat
+ sensorReadingType: 1
+ # This gives the measurement 1.800..3.585 volts with a step 0.007
+ multiplierM: 7
+ offsetB: 18
+ bExp: 2
+ rExp: -3
+ scale: 0
+ unit: xyz.openbmc_project.Sensor.Value.Unit.Volts
+ mutability: Mutability::Read
+ readingType: readingData
+ serviceInterface: org.freedesktop.DBus.Properties
+ interfaces:
+ xyz.openbmc_project.Sensor.Value:
+ Value:
+ Offsets:
+ 255:
+ type: double
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/.phosphor-ipmi-host_%.bbappend.un~ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/.phosphor-ipmi-host_%.bbappend.un~
new file mode 100644
index 0000000000..c3f991b159
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/.phosphor-ipmi-host_%.bbappend.un~
Binary files differ
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 0000000000..d2ea14c799
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1,21 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+inherit systemd
+
+RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils}"
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
+SRC_URI:append = " \
+ file://${BPN}-set-device-id.sh \
+ file://${BPN}.service \
+"
+
+S = "${WORKDIR}"
+do_install:append() {
+ install -d ${D}${bindir} ${D}${systemd_system_unitdir}
+ install ${BPN}-set-device-id.sh ${D}${bindir}/
+ install -m 0644 ${BPN}.service ${D}${systemd_system_unitdir}/
+}
+
+FILES:${PN}:append = " \
+ ${bindir}/${BPN}-set-device-id.sh \
+"
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
new file mode 100644
index 0000000000..63e1fa7e37
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -0,0 +1,178 @@
+{
+ "0" : {
+ "name" : "IPMB",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "ipmb",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "1" : {
+ "name" : "eth0",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "2" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "lan-802.3",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "multi-session",
+ "is_ipmi" : true
+ }
+ },
+ "3" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "4" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "5" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "6" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "7" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "8" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "oem",
+ "protocol_type" : "oem",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "9" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "10" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "11" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "12" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "13" : {
+ "name" : "RESERVED",
+ "is_valid" : false,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "reserved",
+ "protocol_type" : "na",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "14" : {
+ "name" : "SELF",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "ipmb",
+ "protocol_type" : "ipmb-1.0",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ },
+ "15" : {
+ "name" : "SMS",
+ "is_valid" : true,
+ "active_sessions" : 0,
+ "channel_info" : {
+ "medium_type" : "system-interface",
+ "protocol_type" : "kcs",
+ "session_supported" : "session-less",
+ "is_ipmi" : true
+ }
+ }
+}
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
new file mode 100644
index 0000000000..9cad555735
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json
@@ -0,0 +1,7 @@
+{
+ "id": 0,
+ "revision": 1,
+ "addn_dev_support": 0,
+ "manuf_id": 49769,
+ "prod_id": 11
+}
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh
new file mode 100755
index 0000000000..6600ced4a4
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -eu
+
+BMCPOS=$(awk -v RS=" " '/^bmcposition=/{print substr($0,13)}' /proc/cmdline)
+sed -r "s/\"id\"\s*:\s*[0-9]+\s*,/\"id\": ${BMCPOS:-0},/" -i \
+ /usr/share/ipmi-providers/dev_id.json
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service
new file mode 100644
index 0000000000..6471380549
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Set DeviceID for ipmi-host
+Before=phosphor-ipmi-host.service
+
+[Service]
+Type=oneshot
+TimeoutSec=0
+RemainAfterExit=yes
+ExecStart=/usr/bin/env phosphor-ipmi-config-set-device-id.sh
+
+[Install]
+RequiredBy=phosphor-ipmi-host.service
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
new file mode 100644
index 0000000000..e1f346593a
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend
@@ -0,0 +1,6 @@
+DEPENDS:append = " sila-yaml-config"
+
+EXTRA_OECONF = " \
+ YAML_GEN=${STAGING_DIR_HOST}${datadir}/sila-yaml-config/ipmi-fru-read.yaml \
+ PROP_YAML=${STAGING_DIR_HOST}${datadir}/sila-yaml-config/ipmi-extra-properties.yaml \
+ "
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 0000000000..b9f429988a
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,7 @@
+DEPENDS:append = " sila-yaml-config"
+
+EXTRA_OECONF = " \
+ SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/sila-yaml-config/ipmi-sensors.yaml \
+ INVSENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/sila-yaml-config/ipmi-inventory-sensors.yaml \
+ FRU_YAML_GEN=${STAGING_DIR_HOST}${datadir}/sila-yaml-config/ipmi-fru-read.yaml \
+ "
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend~ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend~
new file mode 100644
index 0000000000..aa0ae99429
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend~
@@ -0,0 +1,7 @@
+DEPENDS:append = " nicole-yaml-config"
+
+EXTRA_OECONF = " \
+ SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-sensors.yaml \
+ INVSENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-inventory-sensors.yaml \
+ FRU_YAML_GEN=${STAGING_DIR_HOST}${datadir}/nicole-yaml-config/ipmi-fru-read.yaml \
+ "
diff --git a/meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiator-mailbox-interface.patch b/meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiator-mailbox-interface.patch
new file mode 100644
index 0000000000..e3da4378a1
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiator-mailbox-interface.patch
@@ -0,0 +1,138 @@
+From 104027fff5db49d60d2ff7256580b8efb6429a27 Mon Sep 17 00:00:00 2001
+From: Alexander Amelkin <a.amelkin@yadro.com>
+Date: Wed, 20 Mar 2019 19:33:00 +0300
+Subject: [PATCH] Add boot initiator mailbox interface
+
+Add the xyz.openbmc_project.Control.Boot.Mailbox interface to allow
+for provision of the boot initiator (such as Petitboot or UEFI) with
+its specific parameters. This is based on IPMI 2.0 Table 28-14 'Boot
+Option Parameters' parameter 7 'Boot initiator mailbox'.
+
+Partially resolves openbmc/openbmc#3391
+
+Change-Id: If2a7dce6fae812fc3f1f325cd07c77f31900cf42
+Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
+---
+ .../Control/Boot/Mailbox/meson.build | 14 +++++
+ .../openbmc_project/Control/Boot/meson.build | 15 +++++
+ .../Control/Boot/Mailbox.interface.yaml | 63 +++++++++++++++++++
+ 3 files changed, 92 insertions(+)
+ create mode 100644 gen/xyz/openbmc_project/Control/Boot/Mailbox/meson.build
+ create mode 100644 xyz/openbmc_project/Control/Boot/Mailbox.interface.yaml
+
+diff --git a/gen/xyz/openbmc_project/Control/Boot/Mailbox/meson.build b/gen/xyz/openbmc_project/Control/Boot/Mailbox/meson.build
+new file mode 100644
+index 0000000..149e68a
+--- /dev/null
++++ b/gen/xyz/openbmc_project/Control/Boot/Mailbox/meson.build
+@@ -0,0 +1,14 @@
++# Generated file; do not modify.
++generated_sources += custom_target(
++ 'xyz/openbmc_project/Control/Boot/Mailbox__cpp'.underscorify(),
++ input: [ meson.source_root() / 'xyz/openbmc_project/Control/Boot/Mailbox.interface.yaml', ],
++ output: [ 'server.cpp', 'server.hpp', 'client.hpp', ],
++ command: [
++ sdbuspp_gen_meson_prog, '--command', 'cpp',
++ '--output', meson.current_build_dir(),
++ '--tool', sdbusplusplus_prog,
++ '--directory', meson.source_root(),
++ 'xyz/openbmc_project/Control/Boot/Mailbox',
++ ],
++)
++
+diff --git a/gen/xyz/openbmc_project/Control/Boot/meson.build b/gen/xyz/openbmc_project/Control/Boot/meson.build
+index ba8a19f..6901fc0 100644
+--- a/gen/xyz/openbmc_project/Control/Boot/meson.build
++++ b/gen/xyz/openbmc_project/Control/Boot/meson.build
+@@ -1,4 +1,19 @@
+ # Generated file; do not modify.
++subdir('Mailbox')
++generated_others += custom_target(
++ 'xyz/openbmc_project/Control/Boot/Mailbox__markdown'.underscorify(),
++ input: [ meson.source_root() / 'xyz/openbmc_project/Control/Boot/Mailbox.interface.yaml', ],
++ output: [ 'Mailbox.md' ],
++ command: [
++ sdbuspp_gen_meson_prog, '--command', 'markdown',
++ '--output', meson.current_build_dir(),
++ '--tool', sdbusplusplus_prog,
++ '--directory', meson.source_root(),
++ 'xyz/openbmc_project/Control/Boot/Mailbox',
++ ],
++ build_by_default: true,
++)
++
+ subdir('Mode')
+ generated_others += custom_target(
+ 'xyz/openbmc_project/Control/Boot/Mode__markdown'.underscorify(),
+diff --git a/xyz/openbmc_project/Control/Boot/Mailbox.interface.yaml b/xyz/openbmc_project/Control/Boot/Mailbox.interface.yaml
+new file mode 100644
+index 0000000..839e8be
+--- /dev/null
++++ b/xyz/openbmc_project/Control/Boot/Mailbox.interface.yaml
+@@ -0,0 +1,63 @@
++description: >
++ Implement to provide the boot initiator (such as Petitboot or UEFI)
++ with its specific parameters. This is based on IPMI 2.0 Table 28-14
++ 'Boot Option Parameters' parameter 7 'Boot initiator mailbox'.
++
++properties:
++ - name: Supported
++ type: boolean
++ flags:
++ - const
++ default: false
++ description: >
++ Specifies whether or not the mailbox is supported by the
++ boot initiator on this machine.
++
++ The property is constant and is only set by the implementation
++ on startup.
++
++ - name: IANAEnterpriseNumber
++ type: uint32
++ flags:
++ - const
++ default: 0
++ description: >
++ The 24-bit IANA Private Enterprise Number for the company or organization
++ that has specified the boot initiator. This is a machine-specific
++ constant. The implementing application is responsible for setting
++ this to the proper machine-specific value (0x000000..0xFFFFFF)
++ according to https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers.
++
++ The property is constant and is only set by the implementation
++ on startup.
++
++ - name: Data
++ type: array[byte]
++ description: >
++ The array of data bytes for the boot initiator to treat
++ in its specific way. This interface doesn't impose any
++ limitiations on the format or make any assumptions regarding
++ it. The boot initiator is responsible for parsing this array.
++
++ The size of the array is a constant depending on the requirements
++ set by the boot initiator used for a particular architecture or
++ a machine. The implementing application is responsible for setting
++ the size of this array to the proper value.
++
++ For conformance to the IPMI 2.0 specification, the size of the array
++ plus 3 (the size of IPMI 2.0 representation of IANA Enterprise Number)
++ must be a multiple of 16 with the minimum allowed size being 77
++ (5 x 16-byte blocks, minus 3) if mailbox is at all Supported.
++
++ For IPMI 2.0 this array is supposed to be split into 16-byte
++ blocks by the implementing service (block 0 being made of IANA PEN
++ plus first 13 bytes of this array). Please pay special attention
++ that this array does NOT include the IANA PEN needed for IPMI 2.0.
++ Only the actual PEN-specific data is stored here.
++
++ When partially written to, the remaining parts of this array
++ must not be automatically cleared. This is per IPMI 2.0
++ specification.
++
++ Other interfaces to the boot initiator (such as MCTP) may process
++ this array differently.
+--
+2.26.2
+
diff --git a/meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
new file mode 100644
index 0000000000..c2d267912b
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = "\
+ file://0001-Add-boot-initiator-mailbox-interface.patch \
+"
diff --git a/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
new file mode 100644
index 0000000000..4fc41d0580
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
diff --git a/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json
new file mode 100644
index 0000000000..767fc708c5
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-config/cipher_list.json
@@ -0,0 +1,14 @@
+{
+ "a":{
+ "cipher":3,
+ "authentication":1,
+ "integrity":1,
+ "confidentiality":1
+ },
+ "b":{
+ "cipher":17,
+ "authentication":3,
+ "integrity":4,
+ "confidentiality":1
+ }
+}
diff --git a/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch
new file mode 100644
index 0000000000..f1e2c4ae43
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch
@@ -0,0 +1,92 @@
+From aaf8a4a5b82baff679f557ed83b25af6ff2919cf Mon Sep 17 00:00:00 2001
+From: Alexander Amelkin <a.amelkin@yadro.com>
+Date: Thu, 23 May 2019 20:39:57 +0300
+Subject: [PATCH] Add support for persistent-only settings
+
+Some settings such as Boot Initiator Mailbox do not support
+one-time setting mode (as per IPMI 2.0 specification).
+
+This commit adds support for such persistent-only settings.
+
+Partially resolves openbmc/openbmc#3391
+
+Change-Id: Iec8e2f5bddbc50d270916567effe334f10db2987
+Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
+Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com>
+---
+ settings.cpp | 35 +++++++++++++++++++++++++++++++----
+ 1 file changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/settings.cpp b/settings.cpp
+index 2fa2511..6002365 100644
+--- a/settings.cpp
++++ b/settings.cpp
+@@ -95,19 +95,44 @@ namespace boot
+ std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
+ const Interface& iface)
+ {
+- constexpr auto bootObjCount = 2;
++ constexpr auto ambiguousOperationCount = 2;
+ constexpr auto oneTime = "one_time";
+ constexpr auto enabledIntf = "xyz.openbmc_project.Object.Enable";
++ bool oneTimeEnabled = false;
+
+ const std::vector<Path>& paths = objects.map.at(iface);
+ auto count = paths.size();
+- if (count != bootObjCount)
++ if (!count)
+ {
+- log<level::ERR>("Exactly two objects expected",
++ // If there are no objects implementing the requested interface,
++ // that must be an error.
++ log<level::ERR>("Interface objects not found",
++ entry("INTERFACE=%s", iface.c_str()));
++ elog<InternalFailure>();
++ }
++ else if (count < ambiguousOperationCount)
++ {
++ // On the contrary, if there is just one object, that may mean
++ // that this particular interface doesn't support one-time
++ // setting mode (e.g. Boot Initiator Mailbox).
++ // That is not an error, just return the regular setting.
++ // If there's just one object, that's the only kind of setting
++ // mode this interface supports, so just return that setting path.
++ const Path& regularSetting = paths[0];
++ return std::make_tuple(regularSetting, oneTimeEnabled);
++ }
++ else if (count > ambiguousOperationCount)
++ {
++ // Something must be wrong if there are more objects than expected
++ log<level::ERR>("Exactly 1 or 2 interface objects are required",
+ entry("INTERFACE=%s", iface.c_str()),
+ entry("COUNT=%d", count));
+ elog<InternalFailure>();
+ }
++
++ // We are here because there were exactly two objects implementing the
++ // same interface. Take those two and find out which of them is the
++ // one-time setting, consider the other the persistent setting.
+ size_t index = 0;
+ if (std::string::npos == paths[0].rfind(oneTime))
+ {
+@@ -116,6 +141,8 @@ std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
+ const Path& oneTimeSetting = paths[index];
+ const Path& regularSetting = paths[!index];
+
++ // Now see if the one-time setting is enabled and return the path for it
++ // if so. Otherwise return the path for the persistent setting.
+ auto method = objects.bus.new_method_call(
+ objects.service(oneTimeSetting, iface).c_str(), oneTimeSetting.c_str(),
+ ipmi::PROP_INTF, "Get");
+@@ -131,7 +158,7 @@ std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
+
+ std::variant<bool> enabled;
+ reply.read(enabled);
+- auto oneTimeEnabled = std::get<bool>(enabled);
++ oneTimeEnabled = std::get<bool>(enabled);
+ const Path& setting = oneTimeEnabled ? oneTimeSetting : regularSetting;
+ return std::make_tuple(setting, oneTimeEnabled);
+ }
+--
+2.21.1
+
diff --git a/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch
new file mode 100644
index 0000000000..04ea96421c
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch
@@ -0,0 +1,417 @@
+From a193c5ce59758ed5971b5bd7494f1aaf3489ed9d Mon Sep 17 00:00:00 2001
+From: Alexander Amelkin <a.amelkin@yadro.com>
+Date: Mon, 8 Apr 2019 17:58:42 +0300
+Subject: [PATCH] Add support for boot initiator mailbox
+
+Add handlers to process the chassis system option 7
+(boot initiator mailbox). The format of mailbox is
+specific to the machine/bootloader. This commit only
+adds generic handlers to process getting and setting
+of the mailbox data regardless of the content.
+
+Only the IANA Enterprise number is checked in the data
+block 0. Also checked are the data boundaries.
+
+It is expected that a machine-specific override for
+phosphor-settingsd sets the supported state and
+the IANA number according to the used bootloader.
+
+Resolves openbmc/openbmc#3391
+
+Change-Id: Iccbf74c0775f20c70e8deaa7b0a8bd995ebbffea
+Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
+Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com>
+
+---
+ chassishandler.cpp | 329 ++++++++++++++++++++++++++++++++++++++++++++-
+ chassishandler.hpp | 1 +
+ 2 files changed, 326 insertions(+), 4 deletions(-)
+
+diff --git a/chassishandler.cpp b/chassishandler.cpp
+index fb3d644..7f92b85 100644
+--- a/chassishandler.cpp
++++ b/chassishandler.cpp
+@@ -131,6 +131,7 @@ namespace internal
+ {
+
+ constexpr auto bootModeIntf = "xyz.openbmc_project.Control.Boot.Mode";
++constexpr auto bootMboxIntf = "xyz.openbmc_project.Control.Boot.Mailbox";
+ constexpr auto bootTypeIntf = "xyz.openbmc_project.Control.Boot.Type";
+ constexpr auto bootSourceIntf = "xyz.openbmc_project.Control.Boot.Source";
+ constexpr auto powerRestoreIntf =
+@@ -147,8 +148,9 @@ settings::Objects& getObjects()
+ if (objectsPtr == nullptr)
+ {
+ objectsPtr = std::make_unique<settings::Objects>(
+- dbus, std::vector<std::string>{bootModeIntf, bootTypeIntf,
+- bootSourceIntf, powerRestoreIntf});
++ dbus,
++ std::vector<std::string>{bootMboxIntf, bootModeIntf, bootTypeIntf,
++ bootSourceIntf, powerRestoreIntf});
+ }
+ return *objectsPtr;
+ }
+@@ -1708,6 +1710,127 @@ static ipmi::Cc setBootType(ipmi::Context::ptr& ctx, const Type::Types& type)
+ return ipmi::ccSuccess;
+ }
+
++using MboxVec = std::vector<uint8_t>;
++
++// Check if Boot Mailbox is supported.
++static std::optional<bool> isBootMboxSupported()
++{
++ using namespace chassis::internal;
++ using namespace chassis::internal::cache;
++
++ try
++ {
++ settings::Objects& objects = getObjects();
++ auto bootMbox = settings::boot::setting(objects, bootMboxIntf);
++ const auto& bootMboxSetting = std::get<settings::Path>(bootMbox);
++ auto method = dbus.new_method_call(
++ objects.service(bootMboxSetting, bootMboxIntf).c_str(),
++ bootMboxSetting.c_str(), ipmi::PROP_INTF, "Get");
++
++ method.append(bootMboxIntf, "Supported");
++ auto reply = dbus.call(method);
++ std::variant<bool> result;
++ reply.read(result);
++ return std::get<bool>(result);
++ }
++ catch (const std::exception& e)
++ {
++ log<level::ERR>("Error getting Boot/Mailbox/Supported",
++ entry("ERROR=%s", e.what()));
++ report<InternalFailure>();
++ return std::nullopt;
++ }
++}
++
++static std::optional<uint24_t> getBootMboxIANA()
++{
++ using namespace chassis::internal;
++ using namespace chassis::internal::cache;
++
++ try
++ {
++ settings::Objects& objects = getObjects();
++ auto bootMbox = settings::boot::setting(objects, bootMboxIntf);
++ const auto& bootMboxSetting = std::get<settings::Path>(bootMbox);
++ auto method = dbus.new_method_call(
++ objects.service(bootMboxSetting, bootMboxIntf).c_str(),
++ bootMboxSetting.c_str(), ipmi::PROP_INTF, "Get");
++
++ method.append(bootMboxIntf, "IANAEnterpriseNumber");
++ auto reply = dbus.call(method);
++ std::variant<uint32_t> result;
++ reply.read(result);
++ return std::get<uint32_t>(result);
++ }
++ catch (const std::exception& e)
++ {
++ log<level::ERR>("Error getting Boot/Mailbox/IANAEnterpriseNumber",
++ entry("ERROR=%s", e.what()));
++ report<InternalFailure>();
++ return std::nullopt;
++ }
++}
++
++static std::optional<MboxVec> getBootMbox()
++{
++ using namespace chassis::internal;
++ using namespace chassis::internal::cache;
++
++ try
++ {
++ settings::Objects& objects = getObjects();
++ auto bootMbox = settings::boot::setting(objects, bootMboxIntf);
++ const auto& bootMboxSetting = std::get<settings::Path>(bootMbox);
++ auto method = dbus.new_method_call(
++ objects.service(bootMboxSetting, bootMboxIntf).c_str(),
++ bootMboxSetting.c_str(), ipmi::PROP_INTF, "Get");
++
++ method.append(bootMboxIntf, "Data");
++ auto reply = dbus.call(method);
++ std::variant<MboxVec> result;
++ reply.read(result);
++ return std::get<MboxVec>(result);
++ }
++ catch (const std::exception& e)
++ {
++ log<level::ERR>("Error getting Boot/Mailbox/Data",
++ entry("ERROR=%s", e.what()));
++ report<InternalFailure>();
++ return std::nullopt;
++ }
++}
++
++static bool setBootMbox(MboxVec data)
++{
++ using namespace chassis::internal;
++ using namespace chassis::internal::cache;
++
++ try
++ {
++ settings::Objects& objects = getObjects();
++ std::variant<MboxVec> property(data);
++ auto bootMbox = settings::boot::setting(objects, bootMboxIntf);
++ const auto& bootMboxSetting = std::get<settings::Path>(bootMbox);
++ auto method = dbus.new_method_call(
++ objects.service(bootMboxSetting, bootMboxIntf).c_str(),
++ bootMboxSetting.c_str(), ipmi::PROP_INTF, "Set");
++
++ method.append(bootMboxIntf, "Data", property);
++ dbus.call(method);
++ return true;
++ }
++ catch (const std::exception& e)
++ {
++ log<level::ERR>("Error setting Boot/Mailbox/Data",
++ entry("ERROR=%s", e.what()));
++ report<InternalFailure>();
++ return false;
++ }
++}
++
++static constexpr size_t normalBlockSize = 16;
++static constexpr size_t IANAEnterpriseLength = 3;
++
+ static constexpr uint8_t setComplete = 0x0;
+ static constexpr uint8_t setInProgress = 0x1;
+ static uint8_t transferStatus = setComplete;
+@@ -1882,6 +2005,87 @@ ipmi::RspType<ipmi::message::Payload>
+ return ipmi::responseUnspecifiedError();
+ }
+ }
++ else if (types::enum_cast<BootOptionParameter>(bootOptionParameter) ==
++ BootOptionParameter::bootInitiatorMbox)
++ {
++ // Only allow reading the boot initiator mailbox if Mailbox is supported
++ //
++ // Algorithm:
++ // 1. Get 'Supported' property from the Control.Boot.Mailbox interface
++ // 2. If {1} is 'false', report Parameter not supported (0x80)
++ // 3. Get Block Selector from request
++ // 4. Get 'Data' vector from Control.Boot.Mailbox
++ // 5. If requested block {3} exceeds total vector size {4},
++ // report Out of space (0xC4)
++ // 6. Return the selected block (16 bytes) from the vector
++ try
++ {
++ // Check whether this option is supported
++ std::optional<bool> isSupported = isBootMboxSupported();
++ if (!isSupported)
++ {
++ return ipmi::responseUnspecifiedError();
++ }
++
++ if (!*isSupported)
++ {
++ log<level::INFO>("Attempt to read unsupported Boot/Mailbox");
++ return ipmi::responseParmNotSupported();
++ }
++
++ // Initially assume it's block 1+
++ std::optional<uint24_t> IANAEnterprise;
++ size_t blockDataSize = normalBlockSize;
++ size_t dataVecStartOffset =
++ setSelector * normalBlockSize - IANAEnterpriseLength;
++
++ response.pack(bootOptionParameter, reserved1, setSelector);
++
++ // Adjust pointers and sizes for block 0, and fill in the IANA PEN
++ if (0 == setSelector)
++ {
++ IANAEnterprise = getBootMboxIANA();
++ if (!IANAEnterprise)
++ {
++ return ipmi::responseInvalidCommand();
++ }
++
++ blockDataSize = normalBlockSize - IANAEnterpriseLength;
++ dataVecStartOffset = 0;
++
++ response.pack(*IANAEnterprise);
++ }
++
++ // Get the total data size
++ std::optional<MboxVec> dataVec = getBootMbox();
++ if (!dataVec)
++ {
++ return ipmi::responseInvalidCommand();
++ }
++
++ if ((*dataVec).size() < dataVecStartOffset + blockDataSize)
++ {
++ size_t totalSize = (*dataVec).size() + IANAEnterpriseLength;
++ log<level::ERR>(
++ "Attempt to read unsupported block",
++ entry("REQUESTED_BLOCK=%d", setSelector),
++ entry("MAX_BLOCK=%d", totalSize / normalBlockSize));
++ return ipmi::responseParmOutOfRange();
++ }
++
++ // Copy the data to response from specified offset in d-bus vector
++ response.append((*dataVec).data() + dataVecStartOffset,
++ (*dataVec).data() + dataVecStartOffset +
++ blockDataSize);
++
++ return ipmi::responseSuccess(std::move(response));
++ }
++ catch (InternalFailure& e)
++ {
++ report<InternalFailure>();
++ return ipmi::responseUnspecifiedError();
++ }
++ }
+ else
+ {
+ if ((bootOptionParameter >= oemParmStart) &&
+@@ -1946,9 +2150,8 @@ ipmi::RspType<> ipmiChassisSetSysBootOptions(ipmi::Context::ptr ctx,
+ return ipmi::responseSuccess();
+ }
+
+- /* 000101
++ /*
+ * Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc.
+- * This is the only parameter used by petitboot.
+ */
+
+ if (types::enum_cast<BootOptionParameter>(parameterSelector) ==
+@@ -2084,6 +2287,124 @@ ipmi::RspType<> ipmiChassisSetSysBootOptions(ipmi::Context::ptr ctx,
+ return ipmi::responseUnspecifiedError();
+ }
+ }
++ else if (types::enum_cast<BootOptionParameter>(parameterSelector) ==
++ BootOptionParameter::bootInitiatorMbox)
++ {
++ // Only allow writing to boot initiator mailbox if:
++ // 1. Mailbox is supported
++ // 2. IANA PEN matches.
++ //
++ // Algorithm:
++ // 1. Get 'Supported' property from Control.Boot.Mailbox interface
++ // 2. If {1} is 'false', report Parameter not supported (0x80)
++ // 3. Get Block Selector from request
++ // 4. Get 'Data' array from Control.Boot.Mailbox
++ // 5. If requested block {3} exceeds total vector size {4},
++ // report Out of range (0xC9)
++ // 6. If requsted block {3} is 0:
++ // 4.1. Get IANA PEN from request
++ // 4.2. Get 'IANAEnterpriseNumber' property from Control.Boot.Mailbox
++ // 4.3. If {4.1} doesn't match {4.2}, report 0xCC error (Invalid
++ // data field in request)
++ // 7. Overwrite the 16 bytes at offset {3}*16 with the data from request
++ // 8. Update the 'Data' array in Control.Boot.Mailbox
++
++ try
++ {
++ std::optional<bool> isSupported = isBootMboxSupported();
++ if (!isSupported)
++ {
++ return ipmi::responseUnspecifiedError();
++ }
++
++ if (!*isSupported)
++ {
++ log<level::INFO>("Attempt to read unsupported Boot/Mailbox");
++ return ipmi::responseParmNotSupported();
++ }
++
++ // Requested block
++ uint8_t reqBlock;
++ if (data.unpack(reqBlock) != 0)
++ {
++ return ipmi::responseReqDataLenInvalid();
++ }
++
++ // Initially assume it's blcok 1+
++ uint24_t reqIANAEnterprise;
++ std::vector<uint8_t> blockData(normalBlockSize);
++ size_t dataVecStartOffset =
++ reqBlock * normalBlockSize - IANAEnterpriseLength;
++
++ // Adjust pointers and sizes for block 0, and fill in the IANA PEN
++ if (0 == reqBlock)
++ {
++ if (data.unpack(reqIANAEnterprise) != 0)
++ {
++ return ipmi::responseReqDataLenInvalid();
++ }
++
++ std::optional<uint24_t> IANAEnterprise = getBootMboxIANA();
++ if (!IANAEnterprise)
++ {
++ return ipmi::responseInvalidCommand();
++ }
++
++ if (*IANAEnterprise != reqIANAEnterprise)
++ {
++ log<level::ERR>(
++ "Unsupported IANA Enterprise number",
++ entry("REQUESTED_IANA=%d",
++ static_cast<uint32_t>(reqIANAEnterprise)),
++ entry("SUPPORTED_IANA=%d",
++ static_cast<uint32_t>(*IANAEnterprise)));
++ return ipmi::responseInvalidFieldRequest();
++ }
++
++ // For block 0 operate on data after IANA PEN
++ blockData.resize(normalBlockSize - IANAEnterpriseLength);
++ dataVecStartOffset = 0;
++ }
++
++ // Get the data vector from d-bus
++ std::optional<MboxVec> dataVec = getBootMbox();
++ if (!dataVec)
++ {
++ return ipmi::responseInvalidCommand();
++ }
++
++ // Does the requested block exist?
++ if ((*dataVec).size() < dataVecStartOffset + blockData.size())
++ {
++ size_t totalSize = (*dataVec).size() + IANAEnterpriseLength;
++ log<level::ERR>(
++ "Attempt to read unsupported block",
++ entry("REQUESTED_BLOCK=%d", reqBlock),
++ entry("MAX_BLOCK=%d", totalSize / normalBlockSize));
++ return ipmi::responseParmOutOfRange();
++ }
++
++ if (data.unpack(blockData) != 0 || !data.fullyUnpacked())
++ {
++ return ipmi::responseReqDataLenInvalid();
++ }
++
++ // Copy the data from request to specified offset in d-bus vector
++ for (size_t i = 0; i < blockData.size(); ++i)
++ {
++ (*dataVec)[dataVecStartOffset + i] = blockData[i];
++ }
++ if (!setBootMbox(*dataVec))
++ {
++ return ipmi::responseUnspecifiedError();
++ }
++ }
++ catch (InternalFailure& e)
++ {
++ report<InternalFailure>();
++ return ipmi::responseUnspecifiedError();
++ }
++ }
+ else if (types::enum_cast<BootOptionParameter>(parameterSelector) ==
+ BootOptionParameter::bootInfo)
+ {
+diff --git a/chassishandler.hpp b/chassishandler.hpp
+index 2957127..a783bff 100644
+--- a/chassishandler.hpp
++++ b/chassishandler.hpp
+@@ -51,6 +51,7 @@ enum class BootOptionParameter : size_t
+ bootFlagValidClr = 0x3,
+ bootInfo = 0x4,
+ bootFlags = 0x5,
++ bootInitiatorMbox = 0x07,
+ opalNetworkSettings = 0x61
+ };
+
diff --git a/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch
new file mode 100644
index 0000000000..0ca9d8b547
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch
@@ -0,0 +1,327 @@
+From 9b91e2ace1c127344e5e7d32ebb866ca636387fd Mon Sep 17 00:00:00 2001
+From: Alexander Amelkin <alexander@amelkin.msk.ru>
+Date: Wed, 11 Jul 2018 13:16:01 +0300
+Subject: [PATCH] Fix version parsing, update AUX revision info
+
+AUX Revision info was always taken from the dev_id.json
+file if it exists, overriding the value calculated from the
+active firmware version string. Also, when AUX info was
+calculated, it only properly parsed the dirtyness of the
+build.
+
+With this commit the AUX info calculation will properly parse
+the git hash part and will include it as higher 3 bytes of
+the AUX info. For officially released versions the lower byte
+will be zero.
+
+For development versions, bits [7:1] of the fourth byte will
+all be 1 as an indicator of non-release branch. For unofficial
+builds from release branches those bits will contain a number
+from 1 to 126 indicating a patch level since the release tag.
+
+In any case the bit 0 of byte 4 is a dirtyness indicator.
+If the sources used to build the firmware were modified compared
+to the git hash, this bit will be 1.
+
+WARNING: For the AUX decoding from version string to work
+ properly, the dev_id.json file must NOT contain
+ the `aux` property.
+
+Resolves SRV-775
+End-user-impact: Version info is properly represented in the
+ AUX Revision Info fields in response to the
+ IPMI Get Device ID command (ipmitool mc info)
+Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
+Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
+
+---
+ apphandler.cpp | 226 +++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 163 insertions(+), 63 deletions(-)
+
+diff --git a/apphandler.cpp b/apphandler.cpp
+index 6cdd78f..c62cd35 100644
+--- a/apphandler.cpp
++++ b/apphandler.cpp
+@@ -1,4 +1,5 @@
+ #include <arpa/inet.h>
++#include <endian.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <linux/i2c-dev.h>
+@@ -459,33 +460,112 @@ ipmi::RspType<uint8_t, // acpiSystemPowerState
+ return ipmi::responseSuccess(sysAcpiState, devAcpiState);
+ }
+
++static
++std::vector<std::string>
++tokenize(std::string const& str,
++ char const token[])
++{
++ std::vector<std::string> results;
++ std::string::size_type j = 0;
++ while (j < str.length())
++ {
++ std::string::size_type k = str.find_first_of(token, j);
++ if (k == std::string::npos)
++ k = str.length();
++ results.push_back(str.substr(j, k-j));
++ j = k + 1;
++ }
++ return results;
++}
++
+ typedef struct
+ {
+- char major;
+- char minor;
+- uint16_t d[2];
++ uint8_t major;
++ uint8_t minor;
++ union {
++ uint8_t aux[4]; // Individual bytes in IPMI big-endian order
++ uint32_t aux32; // use htobe32() on writes to aux32
++ };
+ } Revision;
+
+-/* Currently supports the vx.x-x-[-x] and v1.x.x-x-[-x] format. It will */
+-/* return -1 if not in those formats, this routine knows how to parse */
++/* Currently supports the following formats. It will return -1 if not in */
++/* those formats: */
++/* */
++/* Format 1: */
+ /* version = v0.6-19-gf363f61-dirty */
+-/* ^ ^ ^^ ^ */
+-/* | | |----------|-- additional details */
+-/* | |---------------- Minor */
+-/* |------------------ Major */
+-/* and version = v1.99.10-113-g65edf7d-r3-0-g9e4f715 */
+-/* ^ ^ ^^ ^ */
+-/* | | |--|---------- additional details */
+-/* | |---------------- Minor */
+-/* |------------------ Major */
+-/* Additional details : If the option group exists it will force Auxiliary */
+-/* Firmware Revision Information 4th byte to 1 indicating the build was */
+-/* derived with additional edits */
++/* ^ ^ ^^^^^^ ^^^^^ */
++/* | | | | */
++/* | | | `-- AUX dirty flag */
++/* | | `---------- AUX commit hash */
++/* | `---------------- Minor */
++/* `------------------ Major */
++/* */
++/* Format 2: */
++/* version = v1.99.10-113-g65edf7d-r3-0-g9e4f715-dirty */
++/* ^ ^^ ^^^^^^ ^^^^^ */
++/* | | | .-----------------' */
++/* | | | `- AUX dirty flag */
++/* | | `----- AUX commit hash */
++/* | `---------------- Minor */
++/* `------------------ Major */
++/* */
++/* version = v2.09-dev-794-g196400c89-some-branch-name-dirty */
++/* ^ ^^ ^^^^^^ ^^^^^ */
++/* | | | .-----------------------' */
++/* | | | `- AUX dirty flag */
++/* | | `---- AUX commit hash */
++/* | `---------------- Minor */
++/* `------------------ Major */
++/* */
++/* Format 3 (YADRO Releases): */
++/* version = v1.0rcf2817p7-rc2-unofficial-dirty */
++/* ^ ^ ^^^^^^ ^^ .----------^^^^^ */
++/* | | | | `- AUX dirty flag */
++/* | | | `------- AUX patch level (1-126), optional */
++/* | | `-------------- AUX release number */
++/* | `---------------- Minor */
++/* `------------------ Major */
++/* */
++static
+ int convertVersion(std::string s, Revision& rev)
+ {
+- std::string token;
+- uint16_t commits;
++ std::vector<std::string> tokens;
++ bool has_release = false; // version string is of "release" format 3
++ bool dirty = false;
+
++ constexpr int TOKEN_MAJOR = 0;
++ constexpr int TOKEN_MINOR = 1;
++ // These are for "release" format 3
++ constexpr int TOKEN_MINOR_HASH = 1;
++ constexpr int TOKEN_MINOR_PATCH = 2;
++ // For non-release formats 1 and 2
++ constexpr int TOKEN_HASH = 3; // Search for git hash starting from this
++
++ // Hash info is in the higher 24 bits of AUX F/W Revision Info
++ constexpr int AUX_HASH_SHIFT = 8;
++ constexpr int AUX_HASH_LEN = 6;
++
++ // Non-release indicator is byte 3 (bits 7..1 of AUX F/W Revision Info)
++ constexpr int AUX_NON_REL_BYTE = 3;
++ constexpr int AUX_NON_REL_SHIFT = 1;
++ constexpr uint8_t AUX_NON_REL_VALUE = UINT8_MAX >> AUX_NON_REL_SHIFT;
++
++ // Release patch level occupies the same bits as the non-release indicator
++ constexpr int AUX_PATCH_BYTE = AUX_NON_REL_BYTE;
++ constexpr int AUX_PATCH_SHIFT = AUX_NON_REL_SHIFT;
++ constexpr int AUX_MAX_PATCH = AUX_NON_REL_VALUE - 1;
++
++ // The least significant bit of byte 3 is the dirty flag
++ constexpr int AUX_DIRTY_BYTE = 3;
++ constexpr int AUX_DIRTY_SHIFT = 0;
++
++ // Use base-16 to convert decimals to BCD
++ constexpr int BCD_BASE = 16;
++
++ // First of all clear the revision
++ rev = {0};
++
++ // Cut off the optional 'v' at the beginning
+ auto location = s.find_first_of('v');
+ if (location != std::string::npos)
+ {
+@@ -494,64 +574,77 @@ int convertVersion(std::string s, Revision& rev)
+
+ if (!s.empty())
+ {
+- location = s.find_first_of(".");
+- if (location != std::string::npos)
++ int hash = 0;
++
++ if (s.find("dirty") != std::string::npos)
+ {
+- rev.major =
+- static_cast<char>(std::stoi(s.substr(0, location), 0, 10));
+- token = s.substr(location + 1);
++ dirty = true;
+ }
+
+- if (!token.empty())
++ tokens = tokenize(s, ".-");
++
++ if (!tokens.empty())
+ {
+- location = token.find_first_of(".-");
+- if (location != std::string::npos)
++ rev.major = std::stoi(tokens[TOKEN_MAJOR], 0, BCD_BASE);
++ }
++
++ if (tokens.size() > TOKEN_MINOR)
++ {
++ rev.minor = std::stoi(tokens[TOKEN_MINOR], 0, BCD_BASE);
++
++ // Minor version token may also contain release/patchlevel info
++ std::vector<std::string> minortok;
++
++ minortok = tokenize(tokens[TOKEN_MINOR], "rp");
++
++ if (minortok.size() > TOKEN_MINOR_HASH)
+ {
+- rev.minor = static_cast<char>(
+- std::stoi(token.substr(0, location), 0, 10));
+- token = token.substr(location + 1);
++ // hash is plain hex
++ hash= std::stoi(minortok[TOKEN_MINOR_HASH], 0, 16);
++ has_release = true;
++ }
++
++ if (minortok.size() > TOKEN_MINOR_PATCH)
++ {
++ // Patch level is encoded as binary, not BCD.
++ // That is to allow for a wider range.
++ int pl = std::stoi(minortok[TOKEN_MINOR_PATCH], 0, 10);
++ uint8_t patchlevel = (pl > AUX_MAX_PATCH)
++ ? AUX_MAX_PATCH
++ : pl;
++ rev.aux[AUX_PATCH_BYTE] = patchlevel << AUX_PATCH_SHIFT;
+ }
+ }
+
+- // Capture the number of commits on top of the minor tag.
+- // I'm using BE format like the ipmi spec asked for
+- location = token.find_first_of(".-");
+- if (!token.empty())
++ // If it's not a "release" format 3, then search for
++ // letter 'g' indicating the position of a git hash
++ // in the version string
++ if (!has_release && tokens.size() > TOKEN_HASH)
+ {
+- commits = std::stoi(token.substr(0, location), 0, 16);
+- rev.d[0] = (commits >> 8) | (commits << 8);
+-
+- // commit number we skip
+- location = token.find_first_of(".-");
+- if (location != std::string::npos)
++ std::string hashstr;
++ for (size_t i = TOKEN_HASH; i < tokens.size(); ++i)
+ {
+- token = token.substr(location + 1);
++ // Find the first token that looks like a git hash.
++ // We think here that anything starting with a 'g' is a match.
++ if ('g' == tokens[i][0])
++ {
++ // Cut off the 'g', take only the first AUX_HASH_LEN digits
++ hashstr = tokens[i].substr(1, AUX_HASH_LEN);
++ break;
++ }
+ }
+- }
+- else
+- {
+- rev.d[0] = 0;
+- }
+
+- if (location != std::string::npos)
+- {
+- token = token.substr(location + 1);
++ // Hash is plain hex
++ hash = std::stoi(hashstr, 0, 16);
++ rev.aux[AUX_NON_REL_BYTE] |= AUX_NON_REL_VALUE << AUX_NON_REL_SHIFT;
+ }
++ rev.aux32 |= htobe32(hash << AUX_HASH_SHIFT);
++ rev.aux[AUX_DIRTY_BYTE] |= dirty << AUX_DIRTY_SHIFT;
+
+- // Any value of the optional parameter forces it to 1
+- location = token.find_first_of(".-");
+- if (location != std::string::npos)
+- {
+- token = token.substr(location + 1);
+- }
+- commits = (!token.empty()) ? 1 : 0;
+-
+- // We do this operation to get this displayed in least significant bytes
+- // of ipmitool device id command.
+- rev.d[1] = (commits >> 8) | (commits << 8);
++ return 0;
+ }
+
+- return 0;
++ return -1;
+ }
+
+ /* @brief: Implement the Get Device ID IPMI command per the IPMI spec
+@@ -623,7 +716,7 @@ ipmi::RspType<uint8_t, // Device ID
+
+ rev.minor = (rev.minor > 99 ? 99 : rev.minor);
+ devId.fw[1] = rev.minor % 10 + (rev.minor / 10) * 16;
+- std::memcpy(&devId.aux, rev.d, 4);
++ std::memcpy(&devId.aux, rev.aux, 4);
+ haveBMCVersion = true;
+ }
+ }
+@@ -643,7 +736,14 @@ ipmi::RspType<uint8_t, // Device ID
+ devId.addnDevSupport = data.value("addn_dev_support", 0);
+ devId.manufId = data.value("manuf_id", 0);
+ devId.prodId = data.value("prod_id", 0);
+- devId.aux = data.value("aux", 0);
++
++ // Use the AUX data from the file only for overriding
++ // the data obtained from version string.
++ if (data.contains("aux"))
++ {
++ // AUX F/W Revision Info is MSB first (big-endian)
++ devId.aux = htobe32(data.value("aux", 0));
++ }
+
+ // Set the availablitity of the BMC.
+ defaultActivationSetting = data.value("availability", true);
diff --git a/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 0000000000..faa3f579ee
--- /dev/null
+++ b/meta-ibs/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "\
+ file://0001-Add-support-for-persistent-only-settings.patch \
+ file://0002-Add-support-for-boot-initiator-mailbox.patch \
+ file://0003-Fix-version-parsing-update-AUX-revision-info.patch \
+"