1OPAL_PCI_SET_PELTV
2==================
3::
4
5   #define OPAL_PCI_SET_PELTV			32
6
7**WARNING:** This documentation comes from an old source and is possibly not up
8to date with OPALv3. Rely on this documentation only as a starting point,
9use the source (and update the docs).
10
11::
12
13   static int64_t opal_pci_set_peltv(uint64_t phb_id, uint32_t parent_pe,
14				  uint32_t child_pe, uint8_t state)
15
16This call sets the PELTV of a parent PE to add or remove a PE number as a PE
17within that parent PE domain. The host must call this function for each child
18of a parent PE.
19
20``phb_id``
21  is the value from the PHB node ibm,opal-phbid property
22
23``parent_pe``
24  is the PE number of a PE that is higher in the PCI hierarchy
25  to other PEs, such that an error involving this parent PE should cause a
26  collateral PE freeze for PEs below this PE in the PCI hierarchy. For example
27  a switch upstream bridge is a PE that is parent to PEs reached through that
28  upstream bridge such that an error involving the upstream bridge
29  (e.g, ERR_FATAL) should cause the PHB to freeze all other PEs below that
30  upstream bridge (e.g., a downstream bridge, or devices below a downstream
31  bridge).
32
33``child_pe``
34  is the PE number of a PE that is lower in the PCI hierarchy
35  than another PE, such that an error involving that other PE should cause a
36  collateral PE freeze for this child PE. For example a device below a
37  downstream bridge of a PCIE switch is a child PE that downstream bridge PE
38  and the upstream bridge PE of that switch -- an ERR_Fatal from either bridge
39  should result in a collateral freeze of that device PE.
40
41::
42
43   enum OpalPeltvAction {
44	OPAL_REMOVE_PE_FROM_DOMAIN = 0,
45	OPAL_ADD_PE_TO_DOMAIN = 1
46   };
47
48**OPAL Implementation Note:**
49**WARNING TODO**: *CHECK IF THIS IS CORRECT FOR skiboot:*
50For ibm,opal-ioda2, OPAL sets the PELTV bit in all RTT entries for the parent
51PE when the state argument is '1'. OPAL clears the PELTV bit in all RTT
52entries for the parent PE when the state argument is '0' and setting the child
53PE bit in the parent PELTV results in an all-zeros value for that PELTV.
54
55Return value: ::
56
57	if (!phb)
58		return OPAL_PARAMETER;
59	if (!phb->ops->set_peltv)
60		return OPAL_UNSUPPORTED;
61