.. | .. |
---|
5 | 5 | * Authors: |
---|
6 | 6 | * Rafael Antognolli <rafael.antognolli@intel.com> |
---|
7 | 7 | * Scott Bauer <scott.bauer@intel.com> |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify it |
---|
10 | | - * under the terms and conditions of the GNU General Public License, |
---|
11 | | - * version 2, as published by the Free Software Foundation. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
---|
14 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
15 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
16 | | - * more details. |
---|
17 | 8 | */ |
---|
18 | 9 | |
---|
19 | 10 | #ifndef _UAPI_SED_OPAL_H |
---|
.. | .. |
---|
27 | 18 | enum opal_mbr { |
---|
28 | 19 | OPAL_MBR_ENABLE = 0x0, |
---|
29 | 20 | OPAL_MBR_DISABLE = 0x01, |
---|
| 21 | +}; |
---|
| 22 | + |
---|
| 23 | +enum opal_mbr_done_flag { |
---|
| 24 | + OPAL_MBR_NOT_DONE = 0x0, |
---|
| 25 | + OPAL_MBR_DONE = 0x01 |
---|
30 | 26 | }; |
---|
31 | 27 | |
---|
32 | 28 | enum opal_user { |
---|
.. | .. |
---|
58 | 54 | struct opal_lr_act { |
---|
59 | 55 | struct opal_key key; |
---|
60 | 56 | __u32 sum; |
---|
61 | | - __u8 num_lrs; |
---|
| 57 | + __u8 num_lrs; |
---|
62 | 58 | __u8 lr[OPAL_MAX_LRS]; |
---|
63 | 59 | __u8 align[2]; /* Align to 8 byte boundary */ |
---|
64 | 60 | }; |
---|
.. | .. |
---|
104 | 100 | __u8 __align[7]; |
---|
105 | 101 | }; |
---|
106 | 102 | |
---|
| 103 | +struct opal_mbr_done { |
---|
| 104 | + struct opal_key key; |
---|
| 105 | + __u8 done_flag; |
---|
| 106 | + __u8 __align[7]; |
---|
| 107 | +}; |
---|
| 108 | + |
---|
| 109 | +struct opal_shadow_mbr { |
---|
| 110 | + struct opal_key key; |
---|
| 111 | + const __u64 data; |
---|
| 112 | + __u64 offset; |
---|
| 113 | + __u64 size; |
---|
| 114 | +}; |
---|
| 115 | + |
---|
| 116 | +/* Opal table operations */ |
---|
| 117 | +enum opal_table_ops { |
---|
| 118 | + OPAL_READ_TABLE, |
---|
| 119 | + OPAL_WRITE_TABLE, |
---|
| 120 | +}; |
---|
| 121 | + |
---|
| 122 | +#define OPAL_UID_LENGTH 8 |
---|
| 123 | +struct opal_read_write_table { |
---|
| 124 | + struct opal_key key; |
---|
| 125 | + const __u64 data; |
---|
| 126 | + const __u8 table_uid[OPAL_UID_LENGTH]; |
---|
| 127 | + __u64 offset; |
---|
| 128 | + __u64 size; |
---|
| 129 | +#define OPAL_TABLE_READ (1 << OPAL_READ_TABLE) |
---|
| 130 | +#define OPAL_TABLE_WRITE (1 << OPAL_WRITE_TABLE) |
---|
| 131 | + __u64 flags; |
---|
| 132 | + __u64 priv; |
---|
| 133 | +}; |
---|
| 134 | + |
---|
107 | 135 | #define IOC_OPAL_SAVE _IOW('p', 220, struct opal_lock_unlock) |
---|
108 | 136 | #define IOC_OPAL_LOCK_UNLOCK _IOW('p', 221, struct opal_lock_unlock) |
---|
109 | 137 | #define IOC_OPAL_TAKE_OWNERSHIP _IOW('p', 222, struct opal_key) |
---|
.. | .. |
---|
116 | 144 | #define IOC_OPAL_ENABLE_DISABLE_MBR _IOW('p', 229, struct opal_mbr_data) |
---|
117 | 145 | #define IOC_OPAL_ERASE_LR _IOW('p', 230, struct opal_session_info) |
---|
118 | 146 | #define IOC_OPAL_SECURE_ERASE_LR _IOW('p', 231, struct opal_session_info) |
---|
| 147 | +#define IOC_OPAL_PSID_REVERT_TPR _IOW('p', 232, struct opal_key) |
---|
| 148 | +#define IOC_OPAL_MBR_DONE _IOW('p', 233, struct opal_mbr_done) |
---|
| 149 | +#define IOC_OPAL_WRITE_SHADOW_MBR _IOW('p', 234, struct opal_shadow_mbr) |
---|
| 150 | +#define IOC_OPAL_GENERIC_TABLE_RW _IOW('p', 235, struct opal_read_write_table) |
---|
119 | 151 | |
---|
120 | 152 | #endif /* _UAPI_SED_OPAL_H */ |
---|