Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
sb/intel/bd82x6x: Align mkhi_end_of_post() functions
Looks like we don't handle the returned value in ME7. It should not make things worse if we now print it, though. Also, since __FUNCTION__ is specific to GCC, replace it with __func__ to make checkpatch happy.
Change-Id: Ic553d8129e5a37be9dca9ab970fc0fdefb874d84 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/bd82x6x/me.c M src/southbridge/intel/bd82x6x/me_8.x.c 2 files changed, 32 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/42011/1
diff --git a/src/southbridge/intel/bd82x6x/me.c b/src/southbridge/intel/bd82x6x/me.c index 68e6dbf..6209270 100644 --- a/src/southbridge/intel/bd82x6x/me.c +++ b/src/southbridge/intel/bd82x6x/me.c @@ -341,13 +341,16 @@ .length = sizeof(mkhi), };
+ u32 eop_ack; + /* Send request and wait for response */ - if (mei_sendrecv(&mei, &mkhi, NULL, NULL, 0) < 0) { + printk(BIOS_NOTICE, "ME: %s\n", __func__); + if (mei_sendrecv(&mei, &mkhi, NULL, &eop_ack, sizeof(eop_ack)) < 0) { printk(BIOS_ERR, "ME: END OF POST message failed\n"); return -1; }
- printk(BIOS_INFO, "ME: END OF POST message successful\n"); + printk(BIOS_INFO, "ME: END OF POST message successful (%d)\n", eop_ack); return 0; }
diff --git a/src/southbridge/intel/bd82x6x/me_8.x.c b/src/southbridge/intel/bd82x6x/me_8.x.c index e1fdd5d..54afae8 100644 --- a/src/southbridge/intel/bd82x6x/me_8.x.c +++ b/src/southbridge/intel/bd82x6x/me_8.x.c @@ -327,6 +327,33 @@ return 0; }
+/* Send END OF POST message to the ME */ +static int __unused mkhi_end_of_post(void) +{ + struct mkhi_header mkhi = { + .group_id = MKHI_GROUP_ID_GEN, + .command = MKHI_END_OF_POST, + }; + struct mei_header mei = { + .is_complete = 1, + .host_address = MEI_HOST_ADDRESS, + .client_address = MEI_ADDRESS_MKHI, + .length = sizeof(mkhi), + }; + + u32 eop_ack; + + /* Send request and wait for response */ + printk(BIOS_NOTICE, "ME: %s\n", __func__); + if (mei_sendrecv(&mei, &mkhi, NULL, &eop_ack, sizeof(eop_ack)) < 0) { + printk(BIOS_ERR, "ME: END OF POST message failed\n"); + return -1; + } + + printk(BIOS_INFO, "ME: END OF POST message successful (%d)\n", eop_ack); + return 0; +} + static inline void print_cap(const char *name, int state) { printk(BIOS_DEBUG, "ME Capability: %-41s : %sabled\n", @@ -398,33 +425,6 @@ print_cap("Wireless LAN (WLAN)", cap->wlan); }
-/* Send END OF POST message to the ME */ -static int __unused mkhi_end_of_post(void) -{ - struct mkhi_header mkhi = { - .group_id = MKHI_GROUP_ID_GEN, - .command = MKHI_END_OF_POST, - }; - struct mei_header mei = { - .is_complete = 1, - .host_address = MEI_HOST_ADDRESS, - .client_address = MEI_ADDRESS_MKHI, - .length = sizeof(mkhi), - }; - - u32 eop_ack; - - /* Send request and wait for response */ - printk(BIOS_NOTICE, "ME: %s\n", __FUNCTION__); - if (mei_sendrecv(&mei, &mkhi, NULL, &eop_ack, sizeof(eop_ack)) < 0) { - printk(BIOS_ERR, "ME: END OF POST message failed\n"); - return -1; - } - - printk(BIOS_INFO, "ME: END OF POST message successful (%d)\n", eop_ack); - return 0; -} - #ifdef __SIMPLE_DEVICE__
void intel_me8_finalize_smm(void)
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42011/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42011/2//COMMIT_MSG@10 PS2, Line 10: __FUNCTION__ should we use : find -type f -name '*.c' -print0 | xargs -0 sed -i 's/__FUNCTION__/__func__/g' ?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42011/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42011/2//COMMIT_MSG@10 PS2, Line 10: __FUNCTION__
should we use : […]
Feel free to do so across the whole tree, let's see what it finds 😄
Hello build bot (Jenkins), Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42011
to look at the new patch set (#3).
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
sb/intel/bd82x6x: Align mkhi_end_of_post() functions
Looks like we don't handle the returned value in ME7. It should not make things worse if we now print it, though.
Change-Id: Ic553d8129e5a37be9dca9ab970fc0fdefb874d84 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/bd82x6x/me.c M src/southbridge/intel/bd82x6x/me_8.x.c 2 files changed, 32 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/42011/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42011/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42011/2//COMMIT_MSG@10 PS2, Line 10: __FUNCTION__
Feel free to do so across the whole tree, let's see what it finds 😄
CB:42516
Hello build bot (Jenkins), Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42011
to look at the new patch set (#5).
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
sb/intel/bd82x6x: Align mkhi_end_of_post() functions
Looks like we don't handle the returned value in ME7. It should not make things worse if we now print it, though.
Change-Id: Ic553d8129e5a37be9dca9ab970fc0fdefb874d84 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/bd82x6x/me.c M src/southbridge/intel/bd82x6x/me_8.x.c 2 files changed, 32 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/42011/5
Hello build bot (Jenkins), Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42011
to look at the new patch set (#6).
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
sb/intel/bd82x6x: Align mkhi_end_of_post() functions
Looks like we don't handle the returned value in ME7. It should not make things worse if we now print it, though.
Tested on Asus P8Z77-V LX2, still boots.
Change-Id: Ic553d8129e5a37be9dca9ab970fc0fdefb874d84 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/bd82x6x/me.c M src/southbridge/intel/bd82x6x/me_8.x.c 2 files changed, 32 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/42011/6
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG@10 PS7, Line 10: things worse if we now print it, though. We don't only print it, we also wait for it. What if there is no response data?
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG@12 PS7, Line 12: Tested on Asus P8Z77-V LX2, still boots. With ME7?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG@12 PS7, Line 12: Tested on Asus P8Z77-V LX2, still boots.
With ME7?
No, it has ME8. I don't have any ME7 board at hand.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42011/7//COMMIT_MSG@10 PS7, Line 10: things worse if we now print it, though.
We don't only print it, we also wait for it. What if there is no […]
I would expect that a timeout would be reached. I would like to test but I don't have any ME7 board...
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Patch Set 7: Code-Review-1
On hold for now (I skipped over this change in the patch train)
Angel Pons has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/42011 )
Change subject: sb/intel/bd82x6x: Align mkhi_end_of_post() functions ......................................................................
Abandoned