Attention is currently required from: Andrey Petrov, Arthur Heymans, Chen, Gang C, Jincheng Li, Jérémy Compostella, Ronak Kanabar, Shuo Liu.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/80574?usp=email )
Change subject: drivers/intel/fsp2_0/ppi: Fix FSP PPI callback calling convention ......................................................................
Patch Set 15:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/80574/comment/422c9fd5_542c5383 : PS7, Line 9: Multi Processor PEIM-to-PEIM Interface deals with pointer to function : living in FSP space
Discarding a function type by casting to (Void *) and then calling is wrong IMO. It makes the assumption that the current compiler / system calling convention complies with the one original function type.
we had an agreement that all functions will be running over APs in coreboot context have to be with `void*` and no print statement should present. i don't expect such functions to return any return type while running on APs.
The fact it works is because the calling convention is the same but technically we should not discard it. That's what this code is fixing. Let's say for instance you want to compile coreboot with a Microsoft compiler using the stdcall calling convention by default, that piece of code would break even on 32-bits. From C point of view the current code is not correct as it relies on knowledge compiler of specifics which turns out to be fine because most of them just use the same C calling convention.
Honestly, I don't think there is any value debating this more. If you want me to move that to the 64-bits support patch then fine, I'll just to that.
I will say lets move this into 64-bit support specific one