HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/42461/1
diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c index e85163f..714cc4b 100644 --- a/src/northbridge/intel/ironlake/raminit.c +++ b/src/northbridge/intel/ironlake/raminit.c @@ -1781,6 +1781,10 @@ u8 field2; u8 unk3[0x48 - 4 - 1]; } __packed reply; + + /*FIXME: We should not initialize 'reply.command' */ + reply.command = 0; + struct uma_message { u8 group_id; u8 cmd; @@ -1801,7 +1805,6 @@ reply_size = sizeof(reply); if (recv_heci_message(info, (u32 *) & reply, &reply_size) == -1) return; - if (reply.command != (MKHI_SET_UMA | (1 << 7))) die("HECI init failed\n"); }
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/42461/1/src/northbridge/intel/ironl... File src/northbridge/intel/ironlake/raminit.c:
https://review.coreboot.org/c/coreboot/+/42461/1/src/northbridge/intel/ironl... PS1, Line 1785: /*FIXME: We should not initialize 'reply.command' */ Instead:
/* FIXME: recv_heci_message() does not always initialize 'reply' */
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 1:
What would otherwise be a silent bug will now execute the die() statement. While this may not be ideal, it at least makes the problem visible if it happens.
Hello build bot (Jenkins), Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42461
to look at the new patch set (#2).
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/42461/2
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42461/1/src/northbridge/intel/ironl... File src/northbridge/intel/ironlake/raminit.c:
https://review.coreboot.org/c/coreboot/+/42461/1/src/northbridge/intel/ironl... PS1, Line 1785: /*FIXME: We should not initialize 'reply.command' */
Instead: […]
Done Thx
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 3:
I wonder if the Clang static analyzer scan-build would be able to pinpoint the path, where it remains uninitialized.
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 3:
Patch Set 3:
I wonder if the Clang static analyzer scan-build would be able to pinpoint the path, where it remains uninitialized.
here https://www.coreboot.org/scan-build/ looks like Clang will not pinpoint it
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 3:
I always forget that the coreboot infrastructure offers the scan-build results.
Maybe it is https://coreboot.org/scan-build/LENOVO_X201-scanbuild/report-c6837c.html#End... ?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 3: Code-Review+2
a
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42461/3/src/northbridge/intel/ironl... File src/northbridge/intel/ironlake/raminit.c:
https://review.coreboot.org/c/coreboot/+/42461/3/src/northbridge/intel/ironl... PS3, Line 1786: /* FIXME: recv_heci_message() does not always initialize 'reply' */ if that's what should happen, why not just initialize it to 0 early on in recv_heci_message?
Hello build bot (Jenkins), Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42461
to look at the new patch set (#4).
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/42461/4
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42461/3/src/northbridge/intel/ironl... File src/northbridge/intel/ironlake/raminit.c:
https://review.coreboot.org/c/coreboot/+/42461/3/src/northbridge/intel/ironl... PS3, Line 1786: /* FIXME: recv_heci_message() does not always initialize 'reply' */
if that's what should happen, why not just initialize it to 0 early on in recv_heci_message?
Done
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 4: Code-Review+2
Hello build bot (Jenkins), Patrick Georgi, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42461
to look at the new patch set (#5).
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/42461/5
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42461/5/src/northbridge/intel/ironl... File src/northbridge/intel/ironlake/raminit.c:
https://review.coreboot.org/c/coreboot/+/42461/5/src/northbridge/intel/ironl... PS5, Line 1751: struct uma_reply { : u8 group_id; : u8 command; : u8 reserved; : u8 result; : u8 field2; : u8 unk3[0x48 - 4 - 1]; : } __packed reply; : struct reply message; : : message.command = 0; yuck!
Hello build bot (Jenkins), Patrick Georgi, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42461
to look at the new patch set (#6).
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/42461/6
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42461/3/src/northbridge/intel/ironl... File src/northbridge/intel/ironlake/raminit.c:
https://review.coreboot.org/c/coreboot/+/42461/3/src/northbridge/intel/ironl... PS3, Line 1786: /* FIXME: recv_heci_message() does not always initialize 'reply' */
Done
the struct is defined only here.
Hello build bot (Jenkins), Patrick Georgi, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42461
to look at the new patch set (#7).
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/42461/7
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
Patch Set 8: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42461 )
Change subject: nb/intel/ironlake/raminit.c: initialize 'reply.command' ......................................................................
nb/intel/ironlake/raminit.c: initialize 'reply.command'
This to silent a bug found using gcc-10. src/northbridge/intel/ironlake/raminit.c: In function 'setup_heci_uma': src/northbridge/intel/ironlake/raminit.c:1805:11: error: 'reply.command' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1805 | if (reply.command != (MKHI_SET_UMA | (1 << 7))) | ~~~~~^~~~~~~~ cc1: all warnings being treated as errors
Change-Id: I0d13de549b6d428ac3675ee3f91eb5e42aeb25e8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/42461 Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/northbridge/intel/ironlake/raminit.c 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/northbridge/intel/ironlake/raminit.c b/src/northbridge/intel/ironlake/raminit.c index f1f8aa5..f50adb1 100644 --- a/src/northbridge/intel/ironlake/raminit.c +++ b/src/northbridge/intel/ironlake/raminit.c @@ -1782,6 +1782,10 @@ u8 field2; u8 unk3[0x48 - 4 - 1]; } __packed reply; + + /* FIXME: recv_heci_message() does not always initialize 'reply' */ + reply.command = 0; + struct uma_message { u8 group_id; u8 cmd;