<emphasis>ibm,update-nodes</emphasis> RTAS Call This RTAS call is used to determine which device tree nodes have changed due to a massive platform reconfiguration such as when the partition is migrated between machines. Differing platform reconfigurations are expected to potentially result in different sets of nodes being updated; the “scope” argument communicates what set of changes are to be reported. The work area is a 4 KB naturally aligned area of storage below the first 4 GB; as such, it may not be large enough to contain the reports of all changed nodes. The status value of 1 is used to inform the caller that there are more updates to report and that it will have to call the ibm,update-nodes RTAS again to receive them. On subsequent calls the state variable, which is set to zero on the first call, is set to the value returned on the previous call, to supply RTAS with the information it needs to continue from where the previous call ended. Upon return, the work area contains, in addition to the state variable, zero or more operation lists, and logically ends with a terminator (4 byte word naturally aligned containing 0x00000000). An operation list consists of an operator (4 bytes naturally aligned) and zero or more (up to a the maximum number of 4 byte locations remaining in the work area) operands, each 4 bytes long. An operator consists of a single byte opcode followed by 3 bytes encoded with the binary value of the number of operands that follow. An operator with an operand length field of zero performs no operation, and the opcode of zero is reserved for the terminator -- thus the terminator can be considered a special encoding of a no-op operator. The opcode of 0x01 is used for deleted nodes -- the operands are the phandle values for the deleted nodes. The opcode of 0x02 is used for updated nodes -- the operands are the phandle values for the updated nodes. The updated properties are obtained using the ibm,update-properties RTAS call. The opcode of 0x03 is used for adding nodes -- the operands are pairs of phandle and drc-index values; the phandle value denotes the parent node of the node to be added and the ibm,drc-index value is passed with the ibm,configure-connector RTAS call to obtain the contents of the added node. To make processing of device tree updates simpler, all opcode 0x01 (delete) operations (if any) are presented prior to all opcode 0x02 (update) operations (if any), and finally any 0x03 (addition) operations are presented. The phandle operand values are the same phandle values as reported by the “ibm,phandle” property. R1--1. For the Update OF Tree option: The platform must include the “ibm,phandle” property in all OF nodes specified in . R1--2. For the Update OF Tree option: The platform must implement the ibm,update-nodes RTAS call using the argument call buffer defined by . Argument Call Buffer <emphasis>ibm,update-nodes</emphasis> Parameter Type Name Values In Token Token for ibm,update-nodes Number Inputs 2 Number Outputs 1 Work Area Address 32 bit real address of work area Scope Values per . Out Status -1: Hardware Error -2: Busy -3: Parameter Error (Purpose does not match the current partition state) 0: Success 1: More nodes updated -- call again
R1--3. ibm,update-nodes RTAS call work area must be 4 KB long aligned on a 4 KB boundary that is accessible with MSR[DR] = 0, else RTAS may return -3 “Parameter Error”. R1--4. ibm,update-nodes RTAS for a given value of “ Scope” must be formatted as specified in , else RTAS may return -3 “Parameter Error”. Initial Format of Work Area for <emphasis>ibm,update-nodes</emphasis> 0x00000000 (State Variable indicates Initial call for specified Scope) 12 bytes of 0x00 (reserved) Don’t Care . . .
R1--5. Upon successful return (non-negative status value) from ibm,update-nodes the work area must by formatted as defined in . (Note each entry in is 4 bytes long.) Format of Work Area for <emphasis>ibm,update-nodes</emphasis> State Variable (4 Bytes) 12 bytes of 0x00 (reserved) 0 or more operation lists . . . Terminator (0x00000000)
R1--6. ibm,update-nodes RTAS call operation list for the ibm,update-nodes RTAS call must contain an operator (4 bytes naturally aligned) and zero or more 4 byte operands up to the end of the work area. R1--7. An operator in an ibm,update-nodes RTAS call operation list must be formatted with, starting at the high order byte, a single byte opcode followed by 3 bytes encoded with the binary value of the number of operands that follow. R1--8. An operator in an ibm,update-nodes RTAS call operation list with an operand length field of zero must be considered to perform no operation. R1--9. The opcode of 0x01 in an ibm,update-nodes RTAS call operation list must be used to denote node deletions. R1--10. The operands for opcode 0x01 in an ibm,update-nodes RTAS call operation list must be the phandle values for the deleted nodes. R1--11. The opcode of 0x02 in an ibm,update-nodes RTAS call operation list must be used to denote updated nodes. R1--12. The operands for opcode 0x02 in an ibm,update-nodes RTAS call operation list must be the phandle values for the updated nodes that may be used as the ibm,update-properties RTAS call argument to obtain the changed properties of the updated node. R1--13. The opcode of 0x03 in an ibm,update-nodes RTAS call operation list must used for the added nodes. R1--14. The operands for opcode of 0x03 in an ibm,update-nodes RTAS call operation list must be phandle and drc-index value pairs (each value being 4 bytes on a natural boundary totalling 8 bytes for the pair) denoting the parent node of the added node and the ibm,configure-connector RTAS call argument to obtain the contents of the added node respectively. R1--15. All opcode 0x01 (delete) in an ibm,update-nodes RTAS call operation list (if any) must be presented prior to any opcode 0x02 (update) operations (if any). R1--16. All opcode 0x02 (update) in an ibm,update-nodes RTAS call operation list (if any) must be presented prior to any opcode 0x03 (add) operations (if any). R1--17. The work area on subsequent call(s) to ibm,update-nodes RTAS for the same value of the “Scope” must be formatted as specified in , else RTAS may return -3 “Parameter Error”. Format of Work Area for Subsequent Calls to <emphasis>ibm,update-nodes</emphasis> Value of the 1st 16 bytes of the returned work area from last call to ibm,update-nodes RTAS that returned status of 1. Don’t Care . . .
R1--18. The “Scope” argument for the ibm,update-nodes RTAS call must be one of the values specified in the scope value column of , else RTAS may return -3 “Parameter Error”. R1--19. For the ibm,update-nodes RTAS call, the platform must restrict its reported node updates to those specified in for the value of the specified “Scope” argument. R1--20. The work area on the first call to ibm,update-nodes RTAS for a given value of "Scope" must be formatted as specified in else RTAS may return -3 "Parameter Error". Initial Format of Work Area for <emphasis>ibm,update-nodes</emphasis> with Device Reconfiguration Scope 0x00000000 (State Variable indicates Initial call for specified Scope) Unit Address of target device for reconfiguration 4 bytes of 0x00 (reserved) Don't Care. . .
Nodes That May be Reported by <emphasis>ibm,update-nodes</emphasis> for a Given Value of the “<emphasis>Scope</emphasis>” Argument Scope Value Reportable node types (value of “name” or “device_type” property) Supported Opcodes Negative values: Platform Resource Reassignment events as from event-scan RTAS cpu 0x02 memory 0x02 ibm,dynamic-reconfiguration-memory 0x02 ibm,plaform-facilities 0x01-0x03 ibm,random-v# 0x01-0x03 ibm,compression-v# 0x01-0x03 ibm,encryption-v# 0x01-0x03 ibm,memory-utilization_instrumentation-v# 0x01-0x03 1 Partition Migration / Hibernation root 0x02 openprom 0x02 rtas 0x02 vdevice 0x02 cpu 0x02 cache 0x01-0x03 options 0x02 memory 0x02 ibm,dynamic-reconfiguration-memory <all> ibm,platform-facilities 0x01-0x03 ibm,random-v# 0x01-0x03 ibm,compression-v# 0x01-0x03 ibm,encryption-v# 0x01-0x03 ibm,memory-utilization_instrumentation-v# 0x01-0x03 2 Activate Firmware rtas 0x02 3 Device Reconfiguration ibm,coherent-platform-facility 0x02 ibm,coherent-platform-function 0x02