Attention is currently required from: Jason Glenesk, Raul Rangel, Martin L Roth, Matt DeVillier, Name of user not set #1004763, Martin Roth, Fred Reitberger, Karthik Ramasubramanian, Felix Held.
Jon Murphy has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/71207 )
Change subject: vc/amd/*,soc/amd/*: Add SVC call to get HSP Secure State ......................................................................
Patch Set 4:
(1 comment)
File src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h:
https://review.coreboot.org/c/coreboot/+/71207/comment/adebbbba_98a13af1 PS1, Line 362: uint32_t svc_get_hsp_secure_state(uint32_t *hsp_secure_state);
So looking into it further, I think these calls need a bit of a redesign. […]
Maybe I'm not following, but the function itself is defined in svc.c and calls into the PSP function there. It looks like svc_get_prev_boot_status has the same implementation as svc_get_hsp_secure_state with the prototypes and definitions in the same places even though it's not supported by cezanne and picasso.
I agree that we shouldn't be declaring prototypes in code bases that aren't using them, but it looks like there's more cleanup to be done.
What about declaring a default implementation weak in the common code that just returns an unimplemented status? Then platforms that implement the call can override? That's how we handle GPIO's in boards.
I suppose we could also have a platform_psp call in svc.c that's a nop on previous platforms, but you can add whatever is unique to your platform there? I think the biggest issue is we want this to be called as a part of the boot flow, but the boot flow and feature sets aren't 1:1 across platforms.
I can put additional cleanup CL's on this stack after we agree on the way to handle it.