SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
As a master (initiator) on the device L3_MAIN interconnect, the PCIe controller supports the standby protocol over the standard three signals: mstandby/mwait/mwakeup. The behavior of that interface can be configured in the PCIeSS controller wrapper (PCIe_SS_TI_CONF) register - PCIECTRL_TI_CONF_SYSCONFIG[5:4] STANDBYMODE bitfield.
The standby protocol notifies the local system if inbound PCIe transactions are likely to be routed to the controller’s master port.
Note that CFG-type transactions are typically not part of the PCIe controller master port transfers: in RC mode they are only outbound, and in EP mode they are processed inside the controller.
Automatic mode (default): most operations are expected to take place in “smart-standby” mode. In that mode, the master standby interface is automatically managed by the PCIe status, featuring (Mstandby = 0) if (D-state=D0active and MSE=1 that is bit (RC) STATUS_COMMAND_REGISTER/(EP) STATUS_COMMAND_REGISTER[1] MEM_SPACE_EN) :
In automatic (smart-standby) mode, the standby is therefore controlled remotely by the RC software, which sets both the D-state and the MSE.
Note that the master does not go to standby during ASPM (so called active state power management) transitions to L0s or L1 on the link, as it remains in "D0_active" during that time. Although the physical layer is partially or fully stopped during L0s and L1, the short restart time of a few microseconds does not justify a transition to standby by the master. In other words, the master goes or doesn't go to standby after a link layer transition to L1, depending on the cause, if a transition in "D-state" or "ASPM" occured, respectively.
More generally, the link state is not directly correlated to the automatic standby state of the master:
The "Mstandby" status depends on the possibility of transactions, not on actual transactions. The master may remain out of standby indefinitely without any transaction, and an incoming transaction shall not cause the master to exit standby. The latter is an error case which occurance is prevented in hardware.
The mwait=0 handshake, eventually returned after the mstandby=0 transition, should prevent the master from issuing transactions until the system is ready. However, no back-pressure can actually be applied to the PCIe to prevent inbound accesses after, for example, MSE has been set. It is assumed that there will be sufficient time for the mwait to transition, that is typically for the system to reopen the path to its local memory, before the first inbound transaction is routed to the master.
When the PCIe local controller itself is in RC mode, note that the D-state may remain D0active even after the has gone down. It is therefore advised to use the clearing of the local MSE bit to set the master in standby. Alternatively, the RC can be placed in D3hot mode, or the standby can be forced (to mstandby = 1) by setting the standbymode to “force-standby”. Whatever the method, the RC is aware of the state of the entire PCIe fabric, and is expected to put its master in standby in full knowledge of the situation.
For more information on the PCIe Controller Standby Management Protocol with the device PRCM , see Module-Level Clock Management, in Power, Reset, and Clock Management.
Manual control, EP type: When incoming transactions are not memory-type (e.g.: IO type), the master is capable of issuing transactions while the automatic out-of-standby conditions above are not met.
In the EP, non-memory type transaction cases, it is the user software responsibility to manually force the master out of standby via setting the bit PCIECTRL_TI_CONF_SYSCONFIG[5:4] STANDBYMODE = 0x1, that means - "No-Standby", before the first transaction, and to return it to automatic mode via setting PCIECTRL_TI_CONF_SYSCONFIG[5:4] STANDBYMODE = 0x2, that means - "Smart-Standby" after the last transaction.
For instance, an EP shall have to monitor the ISE (IO space enable) bit and the link status, and set the PCIECTRL_TI_CONF_SYSCONFIG [5:4] STANDBYMODE bitfield accordingly if EP is configured to have an IO BAR.