On March 23, 2022 3:20 PM, Ni Ray wrote: > Min, > MpInitLib contains following APIs. Let's discuss one by one. > > MpInitLibInitialize: Directly return. Looks good to me.
> MpInitLibGetNumberOfProcessors : Call TdxMpInitLibGetNumberOfProcessors(). > Why call a subfunction here but directly return in above API? Not quite > consistent to me. By the way, can you re-use the parameter check logic? My consideration is that if the complexity of code change is small, then it will return directly. Otherwise a sub-function will be called. As to the parameter check logic, it will be reused. Thanks for reminder. > MpInitLibGetProcessorInfo : Call TdxMpInitLibGetProcessorInfo (). Consistency > concern. Same as above. > MpInitLibStartupAllAPs : Directly return in DXE version. But > StartupAllCPUsWorker() directly returns AGAIN! My guess that's for PEI > version. > Can you remove the changes in DXE version? I double checked the code of MpInitLibStartupAllAPs (both DXE and PEI version). It calls StartupAllCPUsWorker which returns directly in Td guest. > MpInitLibStartupThisAP : Directly return in DXE version. How is the PEI > version > handled? It is missed in PEI version. StartupThisAPWorker will be updated to return directly in Td guest. > MpInitLibSwitchBSP : Directly return in DXE version. How is the PEI version > handled? Sorry it is missed in PEI version. It will be added in the next version. > MpInitLibEnableDisableAP : Directly return in DXE version. But > EnableDisableApWorker () directly returns AGAIN! My guess that's for PEI > version. Can you remove the changes in DXE version? Thanks for reminder. The changes in DXE version will be removed. > MpInitLibWhoAmI : Directly return. Looks good to me. > MpInitLibStartupAllCPUs : Not handled. Missed? It is not missed. MpInitLibStartupAllCPUs call StartupAllCPUsWorker which returns directly in Td guest. Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87902): https://edk2.groups.io/g/devel/message/87902 Mute This Topic: https://groups.io/mt/89859015/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-