From a1ef21301b8e82c343d25c75b7d8b73fc048faeb Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 8 Sep 2020 17:23:04 +0200 Subject: [PATCH] nb/intel/ironlake/raminit: Work around compiler bug This fixes commit e1d1fe454cf27d6b1c2ef5625f1cefc1a9c6ec9d initialize 'reply.command'. The compiler now optimized away the final condition, that checks the result of heci message, resulting in a binary that always calls die(). Fix that behaviour by using volatile. Tested on Lenovo T410: Boots again into Linux. Change-Id: I63cffc8812bd22695c01bf57283ca593b12e3d87 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/45174 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/northbridge/intel/ironlake/raminit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c index 81ba4503a0..5d58b277ab 100644 --- a/src/northbridge/intel/ironlake/raminit.c +++ b/src/northbridge/intel/ironlake/raminit.c @@ -1770,7 +1770,7 @@ recv_heci_message(struct raminfo *info, u32 *message, u32 *message_size) static void send_heci_uma_message(struct raminfo *info) { - struct uma_reply { + volatile struct uma_reply { u8 group_id; u8 command; u8 reserved;