* Re: Question on TPL in PCD/Variable code [not found] <BY5PR12MB4132E0C2AD01A8231CB71E7DCB699@BY5PR12MB4132.namprd12.prod.outlook.com> @ 2021-12-02 14:50 ` Jeff Brasen 0 siblings, 0 replies; only message in thread From: Jeff Brasen @ 2021-12-02 14:50 UTC (permalink / raw) To: devel@edk2.groups.io [-- Attachment #1: Type: text/plain, Size: 905 bytes --] I am trying to get variable services hosted on a UFS device and running into TPL related issues. The variable and PCD code have locks that raise the TPL to NOTIFY prior to calling into the FVB instance and the UFS driver has a few raise tpl calls that increase the TPL to TPL_CALLBACK. This is causing a failure as you can't do a RaiseTPL to CALLBACK when current TPL is NOTIFY. The UEFI specification states that both BlockIO and Variable services should only be called at <= TPL_CALLBACK. I see a couple options. 1. Change the locks to TPL_CALLBACK which seems to keep things in line with the UEFI spec but may introduce race conditions if that higher lock was blocking things 2. Change the raise tpl in the UFS driver to TPL_NOTIFY. This is how the eMMC driver is written. I am leaning towards option 2 but wanted to get some feedback prior to pushing a patch. Thanks, Jeff [-- Attachment #2: Type: text/html, Size: 4707 bytes --] ^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-02 14:50 UTC | newest] Thread overview: (only message) (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <BY5PR12MB4132E0C2AD01A8231CB71E7DCB699@BY5PR12MB4132.namprd12.prod.outlook.com> 2021-12-02 14:50 ` Question on TPL in PCD/Variable code Jeff Brasen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox