Skip to content

Commit 1cc0a75

Browse files
SergiiDmytrukrossphilipson
authored andcommitted
include/slrt.h: update sizes and order of fields
This results in 64-bit alignment of 64-bit fields. Signed-off-by: Sergii Dmytruk <[email protected]>
1 parent 794fe07 commit 1cc0a75

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

include/slrt.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include <types.h>
66

77
struct slr_entry_hdr {
8-
u16 tag;
9-
u16 size;
8+
u32 tag;
9+
u32 size;
1010
} __packed;
1111

1212
#define SLR_ENTRY_INVALID 0x0000
@@ -32,29 +32,29 @@ struct slr_table {
3232

3333
struct slr_bl_context {
3434
u16 bootloader;
35-
u16 reserved;
35+
u16 reserved[3];
3636
u64 context;
3737
} __packed;
3838

3939
#define SLR_BOOTLOADER_GRUB 1
4040

4141
struct slr_entry_dl_info {
4242
struct slr_entry_hdr hdr;
43-
struct slr_bl_context bl_context;
44-
u64 dl_handler;
43+
u64 dce_size;
4544
u64 dce_base;
46-
u32 dce_size;
45+
u64 dlme_size;
4746
u64 dlme_base;
48-
u32 dlme_size;
49-
u32 dlme_entry; /* Offset from dlme_base */
47+
u64 dlme_entry; /* Offset from dlme_base */
48+
struct slr_bl_context bl_context;
49+
u64 dl_handler;
5050
} __packed;
5151

5252
struct slr_entry_log_info {
5353
struct slr_entry_hdr hdr;
5454
u16 format;
5555
u16 reserved;
56-
u64 addr;
5756
u32 size;
57+
u64 addr;
5858
} __packed;
5959

6060
#define SLR_LOG_FORMAT_TPM12_TXT 1
@@ -67,8 +67,8 @@ struct slr_policy_entry {
6767
u16 entity_type;
6868
u16 flags;
6969
u16 reserved;
70-
u64 entity;
7170
u64 size;
71+
u64 entity;
7272
char evt_info[TPM_EVENT_INFO_LENGTH];
7373
} __packed;
7474

@@ -93,6 +93,7 @@ struct slr_policy_entry {
9393

9494
struct slr_entry_policy {
9595
struct slr_entry_hdr hdr;
96+
u16 reserved[2];
9697
u16 revision;
9798
u16 nr_entries;
9899
struct slr_policy_entry policy_entries[];

0 commit comments

Comments
 (0)