Skip to content

Commit d2d208f

Browse files
miguelafsilva5DavidMCerdeira
authored andcommitted
fix: Align an element inside a packed struct
The compiler issues errors when trying to get the reference of elements of packed structs since it might result in unaligned pointer values. As such we forced the elements in question to be aligned inside the struct. Signed-off-by: Miguel Silva <[email protected]>
1 parent 8883953 commit d2d208f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arch/armv8/inc/arch/psci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct psci_off_state {
8787
uint64_t vttbr_el2;
8888
uint64_t wakeup_reason;
8989
paddr_t flat_map;
90-
struct gicc_state gicc_state;
90+
struct gicc_state gicc_state __attribute__((aligned(8)));
9191
} __attribute__((packed, aligned(8)));
9292

9393
enum wakeup_reason {

0 commit comments

Comments
 (0)