1 /* Copyright (C) 2010 - 2013 UNISYS CORPORATION
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at
7 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12 * NON INFRINGEMENT. See the GNU General Public License for more
20 * Abstract: This file defines common structures in the unmanaged
21 * Ultravisor (mostly EFI) space.
25 #ifndef _CONTROL_FRAMEWORK_H_
26 #define _CONTROL_FRAMEWORK_H_
28 #include <linux/types.h>
31 struct spar_segment_state {
32 u16 enabled:1; /* Bit 0: May enter other states */
33 u16 active:1; /* Bit 1: Assigned to active partition */
34 u16 alive:1; /* Bit 2: Configure message sent to
36 u16 revoked:1; /* Bit 3: similar to partition state
38 u16 allocated:1; /* Bit 4: memory (device/port number)
39 * has been selected by Command */
40 u16 known:1; /* Bit 5: has been introduced to the
41 * service/guest partition */
42 u16 ready:1; /* Bit 6: service/Guest partition has
43 * responded to introduction */
44 u16 operating:1; /* Bit 7: resource is configured and
46 /* Note: don't use high bit unless we need to switch to ushort
47 * which is non-compliant */
50 static const struct spar_segment_state segment_state_running = {
51 1, 1, 1, 0, 1, 1, 1, 1
54 static const struct spar_segment_state segment_state_paused = {
55 1, 1, 1, 0, 1, 1, 1, 0
58 static const struct spar_segment_state segment_state_standby = {
59 1, 1, 0, 0, 1, 1, 1, 0
62 #endif /* _CONTROL_FRAMEWORK_H_ not defined */