reset: Add RESET_TYPE_WAKEUP

Some devices need to distinguish cold start reset from waking up from a
suspended state. This patch adds new value to the enum, and updates the
i386 wakeup method to use this new reset type.

Message-ID: <20240904103722.946194-3-jmarcin@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
This commit is contained in:
Juraj Marcin 2024-09-04 12:37:13 +02:00 committed by David Hildenbrand
parent 1b063fe2df
commit 759cbb4ee9
3 changed files with 14 additions and 2 deletions

View file

@ -29,6 +29,7 @@ typedef struct ResettableState ResettableState;
* Types of reset.
*
* + Cold: reset resulting from a power cycle of the object.
* + Wakeup: reset resulting from a wake-up from a suspended state.
*
* TODO: Support has to be added to handle more types. In particular,
* ResettableState structure needs to be expanded.
@ -36,6 +37,7 @@ typedef struct ResettableState ResettableState;
typedef enum ResetType {
RESET_TYPE_COLD,
RESET_TYPE_SNAPSHOT_LOAD,
RESET_TYPE_WAKEUP,
RESET_TYPE_S390_CPU_INITIAL,
RESET_TYPE_S390_CPU_NORMAL,
} ResetType;