From b82394bc75834e490b86dec8e6d6b6045d1bac31 Mon Sep 17 00:00:00 2001 From: eportnov Date: Wed, 29 Jun 2022 12:19:11 +0300 Subject: Add cpu, dimm, fans Split periphery on files --- .../chassis.yaml | 137 --------------------- .../inventory/phosphor-inventory-manager-cpu.bb | 18 +++ .../phosphor-inventory-manager-cpu/cpu.yaml | 105 ++++++++++++++++ .../inventory/phosphor-inventory-manager-dimm.bb | 18 +++ .../phosphor-inventory-manager-dimm/dimm.yaml | 91 ++++++++++++++ .../inventory/phosphor-inventory-manager-fans.bb | 18 +++ .../phosphor-inventory-manager-fans/fans.yaml | 18 +++ .../phosphor-inventory-manager_%.bbappend | 3 + 8 files changed, 271 insertions(+), 137 deletions(-) create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu.bb create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu/cpu.yaml create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm.bb create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm/dimm.yaml create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans.bb create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans/fans.yaml diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-chassis/chassis.yaml b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-chassis/chassis.yaml index f244eb1899..4f09ea2adf 100644 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-chassis/chassis.yaml +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-chassis/chassis.yaml @@ -11,142 +11,5 @@ events: Type: value: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount" type: string - /system/board/cpu0: - xyz.openbmc_project.Inventory.Item.Cpu: - Socket: - value: "FCLGA2011-3" - type: string - Family: - value: "XeonCPU-3" - type: string - #EffectiveFamily: - #value: 2 - #type: uint16_t - #EffectiveModel: - #value: 0 - #type: uint16_t - #Id: - #value: 1 - #type: uint64_t - #MaxSpeedInMhz: - #value: 4200 - #type: uint32_t - #Characteristics: - #value: [Capable64bit] - #type: array[enum[self.Capability]] - #CoreCount: - #value: 2 - #type: uint16_t - #ThreadCount: - #value: 0 - #type: uint16_t - #Step: - #value: 1 - #type: uint16_t - #Microcode: - #value: 4200 - #type: uint32_t - #/system/board/cpu0/core0: - #xyz.openbmc_project.Inventory.Item.CpuCore: - #Microcode: - #value: 0 - #type: uint32_t - /system/board/cpu0/operation0: - xyz.openbmc_project.Inventory.Item.CpuCore.OperatingConfig: - #BaseSpeed: - #value: 0 - #type: uint32_t - #BaseSpeedPrioritySettings: - #value: [] - #type: array[struct[uint32, array[uint32]]] - #MaxJunctionTemperature: - #value: 100 - #type: uint32_t - #MaxSpeed: - #value: 5000 - #type: uint32_t - #PowerLimit: - #value: 1000 - #type: uint32_t - #AvailableCoreCount: - #value: 12 - #type: size - #TurboProfile: - #value: [] - #type: array[struct[uint32, size]] - /system/board/dimm0: - xyz.openbmc_project.Inventory.Item.Dimm: - #MemoryDataWidth: - #value: 10 - #type: uint16_t - #MemorySizeInKB: - #value: 16000000 - #type: size - #MemoryDeviceLocator: - #value: 10 - #type: uint16_t - #MemoryType: - #value: "DRAM" - #type: enum[self.DeviceType] - MemoryTypeDetail: - value: "More details" - type: string - #MaxMemorySpeedInMhz: - #value: 2600 - #type: uint16_t - #MemoryAttributes: - #value: 0x07 - #type: byte - #MemoryConfiguredSpeedInMhz: - #value: 2600 - #type: uint16_t - #ECC: - #value: MultiBitECC - #type: enum[self.Ecc] - #CASLatencies: - #value: 21 - #type: uint16_t - #RevisionCode: - #value: 1 - #type: uint16_t - #FormFactor: - #value: "RDIMM" - #type: enum[self.FormFactor] - #MemoryTotalWidth: - #value: 256 - #type: uint16_t - #AllowedSpeedsMT: - #value: [2600] - #type: array[uint16] - #MemoryAttributes: - #value: 0x07 - #type: byte - #MemoryMedia: - #value: "DRAM" - #type: enum[self.MemoryTech] - /system/board/dimm0/memory_location0: - xyz.openbmc_project.Inventory.Item.Dimm.MemoryLocation: - #Socket: - #value: 0x01 - #type: byte - #MemoryController: - #value: 0x03 - #type: byte - #Channel: - #value: 0x08 - #type: byte - #Slot: - #value: 0x01 - #type: byte - /system/board/fan0: - xyz.openbmc_project.Inventory.Item.Fan: - /system/board/fan1: - xyz.openbmc_project.Inventory.Item.Fan: - /system/board/fan2: - xyz.openbmc_project.Inventory.Item.Fan: - /system/board/fan3: - xyz.openbmc_project.Inventory.Item.Fan: - - diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu.bb b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu.bb new file mode 100644 index 0000000000..e627c4e939 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu.bb @@ -0,0 +1,18 @@ +SUMMARY = "Add Cpu interface for inventory manager" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch +inherit phosphor-inventory-manager + +PROVIDES += "virtual/phosphor-inventory-manager-cpu" +S = "${WORKDIR}" + +SRC_URI = "file://cpu.yaml" + +do_install() { + install -D cpu.yaml ${D}${base_datadir}/events.d/cpu.yaml +} + +FILES:${PN} += "${base_datadir}/events.d/cpu.yaml" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu/cpu.yaml b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu/cpu.yaml new file mode 100644 index 0000000000..329d1b20d4 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-cpu/cpu.yaml @@ -0,0 +1,105 @@ +events: + - name: Add Cpu interface + description: > + Add the cpu interface on the cpu inventory path + type: startup + actions: + - name: createObjects + objs: + /system/board/cpu0: + xyz.openbmc_project.Inventory.Item.Cpu: + Socket: + value: "FCLGA2011-3" + type: string + Family: + value: "XeonCPU-3" + type: string + - name: createObjects + objs: + /system/board/cpu0/core0: + xyz.openbmc_project.Inventory.Item.CpuCore: + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: EffectiveFamily + paths: + - /system/board/cpu0 + value: + type: uint16 + value: 888 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: EffectiveModel + paths: + - /system/board/cpu0 + value: + type: uint16 + value: 321 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: Id + paths: + - /system/board/cpu0 + value: + type: uint64 + value: 7008 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: MaxSpeedInMhz + paths: + - /system/board/cpu0 + value: + type: uint32 + value: 4200 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: CoreCount + paths: + - /system/board/cpu0 + value: + type: uint16 + value: 1234 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: ThreadCount + paths: + - /system/board/cpu0 + value: + type: uint16 + value: 152 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: Step + paths: + - /system/board/cpu0 + value: + type: uint16 + value: 999 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Cpu + property: Microcode + paths: + - /system/board/cpu0 + value: + type: uint32 + value: 111 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.CpuCore + property: Microcode + paths: + - /system/board/cpu0/core0 + value: + type: uint32 + value: 111 + + + + diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm.bb b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm.bb new file mode 100644 index 0000000000..a7fce85394 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm.bb @@ -0,0 +1,18 @@ +SUMMARY = "Add Dimm interface for inventory manager" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch +inherit phosphor-inventory-manager + +PROVIDES += "virtual/phosphor-inventory-manager-dimm" +S = "${WORKDIR}" + +SRC_URI = "file://dimm.yaml" + +do_install() { + install -D dimm.yaml ${D}${base_datadir}/events.d/dimm.yaml +} + +FILES:${PN} += "${base_datadir}/events.d/dimm.yaml" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm/dimm.yaml b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm/dimm.yaml new file mode 100644 index 0000000000..9e5db64438 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-dimm/dimm.yaml @@ -0,0 +1,91 @@ +events: + - name: Add Dimm interface + description: > + Add the dimm interface on the cpu inventory path + type: startup + actions: + - name: createObjects + objs: + /system/board/dimm0: + xyz.openbmc_project.Inventory.Item.Dimm: + MemoryDeviceLocator: + value: "CPU1_DIMM_B1" + type: string + MemoryTypeDetail: + value: "Synchronous, Static column" + type: string + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: MemoryDataWidth + paths: + - /system/board/dimm0 + value: + type: uint16 + value: 256 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: MemorySizeInKB + paths: + - /system/board/dimm0 + value: + type: size + value: 32000 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: MaxMemorySpeedInMhz + paths: + - /system/board/dimm0 + value: + type: uint16 + value: 2600 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: MemoryConfiguredSpeedInMhz + paths: + - /system/board/dimm0 + value: + type: uint16 + value: 2600 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: CASLatencies + paths: + - /system/board/dimm0 + value: + type: uint16 + value: 21 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: RevisionCode + paths: + - /system/board/dimm0 + value: + type: uint16 + value: 5 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: MemoryTotalWidth + paths: + - /system/board/dimm0 + value: + type: uint16 + value: 255 + + - name: setProperty + interface: xyz.openbmc_project.Inventory.Item.Dimm + property: MemoryAttributes + paths: + - /system/board/dimm0 + value: + type: byte + value: 0x10 + + + diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans.bb b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans.bb new file mode 100644 index 0000000000..ac120e773e --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans.bb @@ -0,0 +1,18 @@ +SUMMARY = "Add Dimm interface for inventory manager" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch +inherit phosphor-inventory-manager + +PROVIDES += "virtual/phosphor-inventory-manager-fans" +S = "${WORKDIR}" + +SRC_URI = "file://fans.yaml" + +do_install() { + install -D fans.yaml ${D}${base_datadir}/events.d/fans.yaml +} + +FILES:${PN} += "${base_datadir}/events.d/fans.yaml" diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans/fans.yaml b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans/fans.yaml new file mode 100644 index 0000000000..de749598fa --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager-fans/fans.yaml @@ -0,0 +1,18 @@ +events: + - name: Add Fans interface + description: > + Add the fan interface on the fan inventory path + type: startup + actions: + - name: createObjects + objs: + /system/board/fan0: + xyz.openbmc_project.Inventory.Item.Fan: + /system/board/fan1: + xyz.openbmc_project.Inventory.Item.Fan: + /system/board/fan2: + xyz.openbmc_project.Inventory.Item.Fan: + /system/board/fan3: + xyz.openbmc_project.Inventory.Item.Fan: + /system/board/fan4: + xyz.openbmc_project.Inventory.Item.Fan: diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend index 0620c2d8c9..3410c0c1c3 100644 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend @@ -3,6 +3,9 @@ PACKAGECONFIG:append = " associations" SRC_URI += " file://associations.json" DEPENDS += " phosphor-inventory-manager-chassis" +DEPENDS += " phosphor-inventory-manager-cpu" +DEPENDS += " phosphor-inventory-manager-dimm" +DEPENDS += " phosphor-inventory-manager-fans" do_install:append() { install -d ${D}${base_datadir} -- cgit v1.2.3