[dv/full_chip] Create pwrmgr testutils
There are many tests that need to trigger wakeups from different IPs,
so this abstracts one of the common pwrmgr operation.
Signed-off-by: Guillermo Maturana <maturana@google.com>
diff --git a/sw/device/lib/testing/rstmgr_testutils.h b/sw/device/lib/testing/rstmgr_testutils.h
new file mode 100644
index 0000000..f685b7b
--- /dev/null
+++ b/sw/device/lib/testing/rstmgr_testutils.h
@@ -0,0 +1,21 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_RSTMGR_TESTUTILS_H_
+#define OPENTITAN_SW_DEVICE_LIB_TESTING_RSTMGR_TESTUTILS_H_
+
+#include <stdint.h>
+
+#include "sw/device/lib/dif/dif_rstmgr.h"
+
+/**
+ * Determines if the reset_info matches info.
+ *
+ * @param rstmgr A reset manager handle.
+ * @param info A bit mask of reset reasons.
+ */
+bool rstmgr_testutils_is_reset_info(dif_rstmgr_t *rstmgr,
+ dif_rstmgr_reset_info_bitfield_t info);
+
+#endif // OPENTITAN_SW_DEVICE_LIB_TESTING_RSTMGR_TESTUTILS_H_