File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -78,4 +78,7 @@ zx::result<power_cpu_state> psci_get_cpu_state(uint64_t mpid);
78
78
zx_status_t psci_system_off ();
79
79
zx_status_t psci_system_reset (power_reboot_flags flags );
80
80
81
+ // Used when calling SYSTEM_RESET2 directly
82
+ zx_status_t psci_system_reset2_raw (uint32_t reset_type , uint32_t cookie );
83
+
81
84
#endif // ZIRCON_KERNEL_DEV_PSCI_INCLUDE_DEV_PSCI_H_
Original file line number Diff line number Diff line change @@ -107,6 +107,16 @@ uint32_t psci_get_feature(uint32_t psci_call) {
107
107
return (uint32_t )do_psci_call (PSCI64_PSCI_FEATURES, psci_call, 0 , 0 );
108
108
}
109
109
110
+ zx_status_t psci_system_reset2_raw (uint32_t reset_type, uint32_t cookie) {
111
+ dprintf (INFO, " PSCI SYSTEM_RESET2: %#" PRIx32 " %#" PRIx32 " \n " , reset_type, cookie);
112
+
113
+ uint64_t psci_status = do_psci_call (PSCI64_SYSTEM_RESET2, reset_type, cookie, 0 );
114
+
115
+ dprintf (INFO, " PSCI SYSTEM_RESET2 returns %" PRIi64 " \n " , static_cast <int64_t >(psci_status));
116
+
117
+ return psci_status_to_zx_status (psci_status);
118
+ }
119
+
110
120
zx_status_t psci_system_reset (power_reboot_flags flags) {
111
121
uint64_t * args = reboot_args;
112
122
You can’t perform that action at this time.
0 commit comments