Skip to content

Commit

Permalink
pcieslot, cpu: add upstream_processor association
Browse files Browse the repository at this point in the history
Define a mechanism for documenting associations in PDI YAML files.

A new associations member is added to the interface definitions.  The
new associations member is an array, with each array element having an
object or structure type that consists of a name, reverse_name (all
OpenBMC associations are bi-directional), description, and an array of
required_endpoint_interfaces.  The name and reverse_name properties must
be snake_case and comply with D-Bus specification restrictions on object
paths so they could be used directly as an object path element in a real
D-Bus implementation.  Similarly the required_endpoint_interfaces array
elements must also comply with D-Bus specification restrictions and best
practices on interfaces names.

Associations should only exist as subordinate objects to a superior
object with a specific D-Bus interface - for example the
upstream_processor association should only exist on objects which
implement the PCIeSlot interface.  This is the motivating thought behind
documenting OpenBMC associations in the existing interface definition
files instead of somewhere else.  Reuse of upstream_processor in other
interfaces is allowed (for example a memory DIMM), but it must be
explicitly listed in each interface definition that wishes to host the
association.

This first use of the associations documentation adds an
upstream_processor interface used to link PCIeSlots to upstream PCIe
host bridges or on-processor PCIe root complexes.

Change-Id: I1d8bdb90a2705c4f16c5b015b7135870782ad672
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
  • Loading branch information
bradbishop authored and williamspatrick committed Oct 22, 2021
1 parent 7fd1de3 commit df55704
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,13 @@ enumerations:
- name: PowerPerformanceControl
description: >
Support power/performance control.
associations:
- name: associated_pcie_slots
description: >
Objects that implement Cpu can optionally implement the
associated_pcie_slots association to provide a link to one or more
PCIe slots.
reverse_name: upstream_processor
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item.PCIeSlot
10 changes: 10 additions & 0 deletions yaml/xyz/openbmc_project/Inventory/Item/PCIeSlot.interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,13 @@ enumerations:
- name: 'Unknown'
description: >
Type of the PCIe slot is unknown
associations:
- name: upstream_processor
description: >
Objects that implement PCIeSlot can optionally implement the
upstream_processor association to provide a link back to a PCIe host
bridge or on-processor PCIe root complexes.
reverse_name: associated_pcie_slots
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item.Cpu

0 comments on commit df55704

Please sign in to comment.