psci_osi_mode.rst 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. PSCI OS-initiated mode
  2. ======================
  3. :Author: Maulik Shah & Wing Li
  4. :Organization: Qualcomm Innovation Center, Inc. & Google LLC
  5. :Contact: Maulik Shah <quic_mkshah@quicinc.com> & Wing Li <wingers@google.com>
  6. :Status: Accepted
  7. .. contents:: Table of Contents
  8. Introduction
  9. ------------
  10. Power state coordination
  11. ^^^^^^^^^^^^^^^^^^^^^^^^
  12. A power domain topology is a logical hierarchy of power domains in a system that
  13. arises from the physical dependencies between power domains.
  14. Local power states describe power states for an individual node, and composite
  15. power states describe the combined power states for an individual node and its
  16. parent node(s).
  17. Entry into low-power states for a topology node above the core level requires
  18. coordinating its children nodes. For example, in a system with a power domain
  19. that encompasses a shared cache, and a separate power domain for each core that
  20. uses the shared cache, the core power domains must be powered down before the
  21. shared cache power domain can be powered down.
  22. PSCI supports two modes of power state coordination: platform-coordinated and
  23. OS-initiated.
  24. Platform-coordinated
  25. ~~~~~~~~~~~~~~~~~~~~
  26. Platform-coordinated mode is the default mode of power state coordination, and
  27. is currently the only supported mode in TF-A.
  28. In platform-coordinated mode, the platform is responsible for coordinating power
  29. states, and chooses the deepest power state for a topology node that can be
  30. tolerated by its children.
  31. OS-initiated
  32. ~~~~~~~~~~~~
  33. OS-initiated mode is optional.
  34. In OS-initiated mode, the calling OS is responsible for coordinating power
  35. states, and may request for a topology node to enter a low-power state when
  36. its last child enters the low-power state.
  37. Motivation
  38. ----------
  39. There are two reasons why OS-initiated mode might be a more suitable option than
  40. platform-coordinated mode for a platform.
  41. Scalability
  42. ^^^^^^^^^^^
  43. In platform-coordinated mode, each core independently selects their own local
  44. power states, and doesn't account for composite power states that are shared
  45. between cores.
  46. In OS-initiated mode, the OS has knowledge of the next wakeup event for each
  47. core, and can have more precise control over the entry, exit, and wakeup
  48. latencies when deciding if a composite power state (e.g. for a cluster) is
  49. appropriate. This is especially important for multi-cluster SMP systems and
  50. heterogeneous systems like big.LITTLE, where different processor types can have
  51. different power efficiencies.
  52. Simplicity
  53. ^^^^^^^^^^
  54. In platform-coordinated mode, the OS doesn't have visibility when the last core
  55. at a power level enters a low-power state. If the OS wants to perform last man
  56. activity (e.g. powering off a shared resource when it is no longer needed), it
  57. would have to communicate with an API side channel to know when it can do so.
  58. This could result in a design smell where the platform is using
  59. platform-coordinated mode when it should be using OS-initiated mode instead.
  60. In OS-initiated mode, the OS can perform last man activity if it selects a
  61. composite power state when the last core enters a low-power state. This
  62. eliminates the need for a side channel, and uses the well documented API between
  63. the OS and the platform.
  64. Current vendor implementations and workarounds
  65. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  66. * STMicroelectronics
  67. * For their ARM32 platforms, they're using OS-initiated mode implemented in
  68. OP-TEE.
  69. * For their future ARM64 platforms, they are interested in using OS-initiated
  70. mode in TF-A.
  71. * Qualcomm
  72. * For their mobile platforms, they're using OS-initiated mode implemented in
  73. their own custom secure monitor firmware.
  74. * For their Chrome OS platforms, they're using platform-coordinated mode in
  75. TF-A with custom driver logic to perform last man activity.
  76. * Google
  77. * They're using platform-coordinated mode in TF-A with custom driver logic to
  78. perform last man activity.
  79. Both Qualcomm and Google would like to be able to use OS-initiated mode in TF-A
  80. in order to simplify custom driver logic.
  81. Requirements
  82. ------------
  83. PSCI_FEATURES
  84. ^^^^^^^^^^^^^
  85. PSCI_FEATURES is for checking whether or not a PSCI function is implemented and
  86. what its properties are.
  87. .. c:macro:: PSCI_FEATURES
  88. :param func_id: 0x8400_000A.
  89. :param psci_func_id: the function ID of a PSCI function.
  90. :retval NOT_SUPPORTED: if the function is not implemented.
  91. :retval feature flags associated with the function: if the function is
  92. implemented.
  93. CPU_SUSPEND feature flags
  94. ~~~~~~~~~~~~~~~~~~~~~~~~~
  95. * Reserved, bits[31:2]
  96. * Power state parameter format, bit[1]
  97. * A value of 0 indicates the original format is used.
  98. * A value of 1 indicates the extended format is used.
  99. * OS-initiated mode, bit[0]
  100. * A value of 0 indicates OS-initiated mode is not supported.
  101. * A value of 1 indicates OS-initiated mode is supported.
  102. See sections 5.1.14 and 5.15 of the PSCI spec (DEN0022D.b) for more details.
  103. PSCI_SET_SUSPEND_MODE
  104. ^^^^^^^^^^^^^^^^^^^^^
  105. PSCI_SET_SUSPEND_MODE is for switching between the two different modes of power
  106. state coordination.
  107. .. c:macro:: PSCI_SET_SUSPEND_MODE
  108. :param func_id: 0x8400_000F.
  109. :param mode: 0 indicates platform-coordinated mode, 1 indicates OS-initiated
  110. mode.
  111. :retval SUCCESS: if the request is successful.
  112. :retval NOT_SUPPORTED: if OS-initiated mode is not supported.
  113. :retval INVALID_PARAMETERS: if the requested mode is not a valid value (0 or
  114. 1).
  115. :retval DENIED: if the cores are not in the correct state.
  116. Switching from platform-coordinated to OS-initiated is only allowed if the
  117. following conditions are met:
  118. * All cores are in one of the following states:
  119. * Running.
  120. * Off, through a call to CPU_OFF or not yet booted.
  121. * Suspended, through a call to CPU_DEFAULT_SUSPEND.
  122. * None of the cores has called CPU_SUSPEND since the last change of mode or
  123. boot.
  124. Switching from OS-initiated to platform-coordinated is only allowed if all cores
  125. other than the calling core are off, either through a call to CPU_OFF or not yet
  126. booted.
  127. If these conditions are not met, the PSCI implementation must return DENIED.
  128. See sections 5.1.19 and 5.20 of the PSCI spec (DEN0022D.b) for more details.
  129. CPU_SUSPEND
  130. ^^^^^^^^^^^
  131. CPU_SUSPEND is for moving a topology node into a low-power state.
  132. .. c:macro:: CPU_SUSPEND
  133. :param func_id: 0xC400_0001.
  134. :param power_state: the requested low-power state to enter.
  135. :param entry_point_address: the address at which the core must resume
  136. execution following wakeup from a powerdown state.
  137. :param context_id: this field specifies a pointer to the saved context that
  138. must be restored on a core following wakeup from a powerdown state.
  139. :retval SUCCESS: if the request is successful.
  140. :retval INVALID_PARAMETERS: in OS-initiated mode, this error is returned when
  141. a low-power state is requested for a topology node above the core level,
  142. and at least one of the node's children is in a local low-power state
  143. that is incompatible with the request.
  144. :retval INVALID_ADDRESS: if the entry_point_address argument is invalid.
  145. :retval DENIED: only in OS-initiated mode; this error is returned when a
  146. low-power state is requested for a topology node above the core level,
  147. and at least one of the node's children is running, i.e. not in a
  148. low-power state.
  149. In platform-coordinated mode, the PSCI implementation coordinates requests from
  150. all cores to determine the deepest power state to enter.
  151. In OS-initiated mode, the calling OS is making an explicit request for a
  152. specific power state, as opposed to expressing a vote. The PSCI implementation
  153. must comply with the request, unless the request is not consistent with the
  154. implementation's view of the system's state, in which case, the implementation
  155. must return INVALID_PARAMETERS or DENIED.
  156. See sections 5.1.2 and 5.4 of the PSCI spec (DEN0022D.b) for more details.
  157. Power state formats
  158. ~~~~~~~~~~~~~~~~~~~
  159. Original format
  160. * Power Level, bits[25:24]
  161. * The requested level in the power domain topology to enter a low-power
  162. state.
  163. * State Type, bit[16]
  164. * A value of 0 indicates a standby or retention state.
  165. * A value of 1 indicates a powerdown state.
  166. * State ID, bits[15:0]
  167. * Field to specify the requested composite power state.
  168. * The state ID encodings must uniquely describe every possible composite
  169. power state.
  170. * In OS-initiated mode, the state ID encoding must allow expressing the
  171. power level at which the calling core is the last to enter a powerdown
  172. state.
  173. Extended format
  174. * State Type, bit[30]
  175. * State ID, bits[27:0]
  176. Races in OS-initiated mode
  177. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  178. In OS-initiated mode, there are race windows where the OS's view and
  179. implementation's view of the system's state differ. It is possible for the OS to
  180. make requests that are invalid given the implementation's view of the system's
  181. state. For example, the OS might request a powerdown state for a node from one
  182. core, while at the same time, the implementation observes that another core in
  183. that node is powering up.
  184. To address potential race conditions in power state requests:
  185. * The calling OS must specify in each CPU_SUSPEND request the deepest power
  186. level for which it sees the calling core as the last running core (last man).
  187. This is required even if the OS doesn't want the node at that power level to
  188. enter a low-power state.
  189. * The implementation must validate that the requested power states in the
  190. CPU_SUSPEND request are consistent with the system's state, and that the
  191. calling core is the last core running at the requested power level, or deny
  192. the request otherwise.
  193. See sections 4.2.3.2, 6.2, and 6.3 of the PSCI spec (DEN0022D.b) for more
  194. details.
  195. Caveats
  196. -------
  197. CPU_OFF
  198. ^^^^^^^
  199. CPU_OFF is always platform-coordinated, regardless of whether the power state
  200. coordination mode for suspend is platform-coordinated or OS-initiated. If all
  201. cores in a topology node call CPU_OFF, the last core will power down the node.
  202. In OS-initiated mode, if a subset of the cores in a topology node has called
  203. CPU_OFF, the last running core may call CPU_SUSPEND to request a powerdown state
  204. at or above that node's power level.
  205. See section 5.5.2 of the PSCI spec (DEN0022D.b) for more details.
  206. Implementation
  207. --------------
  208. Current implementation of platform-coordinated mode
  209. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  210. Platform-coordinated is currently the only supported power state coordination
  211. mode in TF-A.
  212. The functions of interest in the ``psci_cpu_suspend`` call stack are as follows:
  213. * ``psci_validate_power_state``
  214. * This function calls a platform specific ``validate_power_state`` handler,
  215. which takes the ``power_state`` parameter, and updates the ``state_info``
  216. object with the requested states for each power level.
  217. * ``psci_find_target_suspend_lvl``
  218. * This function takes the ``state_info`` object containing the requested power
  219. states for each power level, and returns the deepest power level that was
  220. requested to enter a low power state, i.e. the target power level.
  221. * ``psci_do_state_coordination``
  222. * This function takes the target power level and the ``state_info`` object
  223. containing the requested power states for each power level, and updates the
  224. ``state_info`` object with the coordinated target power state for each
  225. level.
  226. * ``pwr_domain_suspend``
  227. * This is a platform specific handler that takes the ``state_info`` object
  228. containing the target power states for each power level, and transitions
  229. each power level to the specified power state.
  230. Proposed implementation of OS-initiated mode
  231. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  232. To add support for OS-initiated mode, the following changes are proposed:
  233. * Add a boolean build option ``PSCI_OS_INIT_MODE`` for a platform to enable
  234. optional support for PSCI OS-initiated mode. This build option defaults to 0.
  235. .. note::
  236. If ``PSCI_OS_INIT_MODE=0``, the following changes will not be compiled into
  237. the build.
  238. * Update ``psci_features`` to return 1 in bit[0] to indicate support for
  239. OS-initiated mode for CPU_SUSPEND.
  240. * Define a ``suspend_mode`` enum: ``PLAT_COORD`` and ``OS_INIT``.
  241. * Define a ``psci_suspend_mode`` global variable with a default value of
  242. ``PLAT_COORD``.
  243. * Implement a new function handler ``psci_set_suspend_mode`` for
  244. PSCI_SET_SUSPEND_MODE.
  245. * Since ``psci_validate_power_state`` calls a platform specific
  246. ``validate_power_state`` handler, the platform implementation should populate
  247. the ``state_info`` object based on the state ID from the given ``power_state``
  248. parameter.
  249. * ``psci_find_target_suspend_lvl`` remains unchanged.
  250. * Implement a new function ``psci_validate_state_coordination`` that ensures the
  251. request satisfies the following conditions, and denies any requests
  252. that don't:
  253. * The requested power states for each power level are consistent with the
  254. system's state
  255. * The calling core is the last core running at the requested power level
  256. This function differs from ``psci_do_state_coordination`` in that:
  257. * The ``psci_req_local_pwr_states`` map is not modified if the request were to
  258. be denied
  259. * The ``state_info`` argument is never modified since it contains the power
  260. states requested by the calling OS
  261. * Update ``psci_cpu_suspend_start`` to do the following:
  262. * If ``PSCI_SUSPEND_MODE`` is ``PLAT_COORD``, call
  263. ``psci_do_state_coordination``.
  264. * If ``PSCI_SUSPEND_MODE`` is ``OS_INIT``, call
  265. ``psci_validate_state_coordination``. If validation fails, propagate the
  266. error up the call stack.
  267. * Add a new optional member ``pwr_domain_validate_suspend`` to
  268. ``plat_psci_ops_t`` to allow the platform to optionally perform validations
  269. based on hardware states.
  270. * The platform specific ``pwr_domain_suspend`` handler remains unchanged.
  271. .. image:: ../resources/diagrams/psci-osi-mode.png
  272. Testing
  273. -------
  274. The proposed patches can be found at
  275. https://review.trustedfirmware.org/q/topic:psci-osi.
  276. Testing on FVP and Google platforms
  277. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  278. The proposed patches add a new CPU Suspend in OSI mode test suite to TF-A Tests.
  279. This has been enabled and verified on the FVP_Base_RevC-2xAEMvA platform and
  280. Google platforms, and excluded from all other platforms via the build option
  281. ``PLAT_TESTS_SKIP_LIST``.
  282. Testing on STM32MP15
  283. ^^^^^^^^^^^^^^^^^^^^
  284. The proposed patches have been tested and verified on the STM32MP15 platform,
  285. which has a single cluster with 2 CPUs, by Gabriel Fernandez
  286. <gabriel.fernandez@st.com> from STMicroelectronics with this device tree
  287. configuration:
  288. .. code-block:: devicetree
  289. cpus {
  290. #address-cells = <1>;
  291. #size-cells = <0>;
  292. cpu0: cpu@0 {
  293. device_type = "cpu";
  294. compatible = "arm,cortex-a7";
  295. reg = <0>;
  296. enable-method = "psci";
  297. power-domains = <&CPU_PD0>;
  298. power-domain-names = "psci";
  299. };
  300. cpu1: cpu@1 {
  301. device_type = "cpu";
  302. compatible = "arm,cortex-a7";
  303. reg = <1>;
  304. enable-method = "psci";
  305. power-domains = <&CPU_PD1>;
  306. power-domain-names = "psci";
  307. };
  308. idle-states {
  309. cpu_retention: cpu-retention {
  310. compatible = "arm,idle-state";
  311. arm,psci-suspend-param = <0x00000001>;
  312. entry-latency-us = <130>;
  313. exit-latency-us = <620>;
  314. min-residency-us = <700>;
  315. local-timer-stop;
  316. };
  317. };
  318. domain-idle-states {
  319. CLUSTER_STOP: core-power-domain {
  320. compatible = "domain-idle-state";
  321. arm,psci-suspend-param = <0x01000001>;
  322. entry-latency-us = <230>;
  323. exit-latency-us = <720>;
  324. min-residency-us = <2000>;
  325. local-timer-stop;
  326. };
  327. };
  328. };
  329. psci {
  330. compatible = "arm,psci-1.0";
  331. method = "smc";
  332. CPU_PD0: power-domain-cpu0 {
  333. #power-domain-cells = <0>;
  334. power-domains = <&pd_core>;
  335. domain-idle-states = <&cpu_retention>;
  336. };
  337. CPU_PD1: power-domain-cpu1 {
  338. #power-domain-cells = <0>;
  339. power-domains = <&pd_core>;
  340. domain-idle-states = <&cpu_retention>;
  341. };
  342. pd_core: power-domain-cluster {
  343. #power-domain-cells = <0>;
  344. domain-idle-states = <&CLUSTER_STOP>;
  345. };
  346. };
  347. Testing on Qualcomm SC7280
  348. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  349. The proposed patches have been tested and verified on the SC7280 platform by
  350. Maulik Shah <quic_mkshah@quicinc.com> from Qualcomm with this device tree
  351. configuration:
  352. .. code-block:: devicetree
  353. cpus {
  354. #address-cells = <2>;
  355. #size-cells = <0>;
  356. CPU0: cpu@0 {
  357. device_type = "cpu";
  358. compatible = "arm,kryo";
  359. reg = <0x0 0x0>;
  360. enable-method = "psci";
  361. power-domains = <&CPU_PD0>;
  362. power-domain-names = "psci";
  363. };
  364. CPU1: cpu@100 {
  365. device_type = "cpu";
  366. compatible = "arm,kryo";
  367. reg = <0x0 0x100>;
  368. enable-method = "psci";
  369. power-domains = <&CPU_PD1>;
  370. power-domain-names = "psci";
  371. };
  372. CPU2: cpu@200 {
  373. device_type = "cpu";
  374. compatible = "arm,kryo";
  375. reg = <0x0 0x200>;
  376. enable-method = "psci";
  377. power-domains = <&CPU_PD2>;
  378. power-domain-names = "psci";
  379. };
  380. CPU3: cpu@300 {
  381. device_type = "cpu";
  382. compatible = "arm,kryo";
  383. reg = <0x0 0x300>;
  384. enable-method = "psci";
  385. power-domains = <&CPU_PD3>;
  386. power-domain-names = "psci";
  387. }
  388. CPU4: cpu@400 {
  389. device_type = "cpu";
  390. compatible = "arm,kryo";
  391. reg = <0x0 0x400>;
  392. enable-method = "psci";
  393. power-domains = <&CPU_PD4>;
  394. power-domain-names = "psci";
  395. };
  396. CPU5: cpu@500 {
  397. device_type = "cpu";
  398. compatible = "arm,kryo";
  399. reg = <0x0 0x500>;
  400. enable-method = "psci";
  401. power-domains = <&CPU_PD5>;
  402. power-domain-names = "psci";
  403. };
  404. CPU6: cpu@600 {
  405. device_type = "cpu";
  406. compatible = "arm,kryo";
  407. reg = <0x0 0x600>;
  408. enable-method = "psci";
  409. power-domains = <&CPU_PD6>;
  410. power-domain-names = "psci";
  411. };
  412. CPU7: cpu@700 {
  413. device_type = "cpu";
  414. compatible = "arm,kryo";
  415. reg = <0x0 0x700>;
  416. enable-method = "psci";
  417. power-domains = <&CPU_PD7>;
  418. power-domain-names = "psci";
  419. };
  420. idle-states {
  421. entry-method = "psci";
  422. LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
  423. compatible = "arm,idle-state";
  424. idle-state-name = "little-power-down";
  425. arm,psci-suspend-param = <0x40000003>;
  426. entry-latency-us = <549>;
  427. exit-latency-us = <901>;
  428. min-residency-us = <1774>;
  429. local-timer-stop;
  430. };
  431. LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
  432. compatible = "arm,idle-state";
  433. idle-state-name = "little-rail-power-down";
  434. arm,psci-suspend-param = <0x40000004>;
  435. entry-latency-us = <702>;
  436. exit-latency-us = <915>;
  437. min-residency-us = <4001>;
  438. local-timer-stop;
  439. };
  440. BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
  441. compatible = "arm,idle-state";
  442. idle-state-name = "big-power-down";
  443. arm,psci-suspend-param = <0x40000003>;
  444. entry-latency-us = <523>;
  445. exit-latency-us = <1244>;
  446. min-residency-us = <2207>;
  447. local-timer-stop;
  448. };
  449. BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
  450. compatible = "arm,idle-state";
  451. idle-state-name = "big-rail-power-down";
  452. arm,psci-suspend-param = <0x40000004>;
  453. entry-latency-us = <526>;
  454. exit-latency-us = <1854>;
  455. min-residency-us = <5555>;
  456. local-timer-stop;
  457. };
  458. };
  459. domain-idle-states {
  460. CLUSTER_SLEEP_0: cluster-sleep-0 {
  461. compatible = "arm,idle-state";
  462. idle-state-name = "cluster-power-down";
  463. arm,psci-suspend-param = <0x40003444>;
  464. entry-latency-us = <3263>;
  465. exit-latency-us = <6562>;
  466. min-residency-us = <9926>;
  467. local-timer-stop;
  468. };
  469. };
  470. };
  471. psci {
  472. compatible = "arm,psci-1.0";
  473. method = "smc";
  474. CPU_PD0: cpu0 {
  475. #power-domain-cells = <0>;
  476. power-domains = <&CLUSTER_PD>;
  477. domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
  478. };
  479. CPU_PD1: cpu1 {
  480. #power-domain-cells = <0>;
  481. power-domains = <&CLUSTER_PD>;
  482. domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
  483. };
  484. CPU_PD2: cpu2 {
  485. #power-domain-cells = <0>;
  486. power-domains = <&CLUSTER_PD>;
  487. domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
  488. };
  489. CPU_PD3: cpu3 {
  490. #power-domain-cells = <0>;
  491. power-domains = <&CLUSTER_PD>;
  492. domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
  493. };
  494. CPU_PD4: cpu4 {
  495. #power-domain-cells = <0>;
  496. power-domains = <&CLUSTER_PD>;
  497. domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
  498. };
  499. CPU_PD5: cpu5 {
  500. #power-domain-cells = <0>;
  501. power-domains = <&CLUSTER_PD>;
  502. domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
  503. };
  504. CPU_PD6: cpu6 {
  505. #power-domain-cells = <0>;
  506. power-domains = <&CLUSTER_PD>;
  507. domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
  508. };
  509. CPU_PD7: cpu7 {
  510. #power-domain-cells = <0>;
  511. power-domains = <&CLUSTER_PD>;
  512. domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
  513. };
  514. CLUSTER_PD: cpu-cluster0 {
  515. #power-domain-cells = <0>;
  516. domain-idle-states = <&CLUSTER_SLEEP_0>;
  517. };
  518. };
  519. Comparisons on Qualcomm SC7280
  520. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  521. CPUIdle states
  522. ~~~~~~~~~~~~~~
  523. * 8 CPUs, 1 L3 cache
  524. * Platform-coordinated mode
  525. * CPUIdle states
  526. * State0 - WFI
  527. * State1 - Core collapse
  528. * State2 - Rail collapse
  529. * State3 - L3 cache off and system resources voted off
  530. * OS-initiated mode
  531. * CPUIdle states
  532. * State0 - WFI
  533. * State1 - Core collapse
  534. * State2 - Rail collapse
  535. * Cluster domain idle state
  536. * State3 - L3 cache off and system resources voted off
  537. .. image:: ../resources/diagrams/psci-flattened-vs-hierarchical-idle-states.png
  538. Results
  539. ~~~~~~~
  540. * The following stats have been captured with fixed CPU frequencies from the use
  541. case of 10 seconds of device idle with the display turned on and Wi-Fi and
  542. modem turned off.
  543. * Count refers to the number of times a CPU or cluster entered power collapse.
  544. * Residency refers to the time in seconds a CPU or cluster stayed in power
  545. collapse.
  546. * The results are an average of 3 iterations of actual counts and residencies.
  547. .. image:: ../resources/diagrams/psci-pc-mode-vs-osi-mode.png
  548. OS-initiated mode was able to scale better than platform-coordinated mode for
  549. multiple CPUs. The count and residency results for state3 (i.e. a cluster domain
  550. idle state) in OS-initiated mode for multiple CPUs were much closer to the
  551. results for a single CPU than in platform-coordinated mode.
  552. --------------
  553. *Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.*