[Bug]: Cannot use ConfigGet*** APIs from ConfigClientGenerated.h in Pre-Memory envrionment #243
Closed
1 task done
Labels
state:needs-maintainer-feedback
Needs more information from a maintainer to determine next steps
state:needs-owner
Needs an issue owner to be assigned
state:needs-triage
Needs to triaged to determine next steps
type:bug
Something isn't working
urgency:high
Significant with a critical impact
Is there an existing issue for this?
Current Behavior
If the ConfigPolicyTo[Silicon|Platform]Mapper driver get dispatched in Pre-Memory phase, when we try to use ConfigGet*** APIs from ConfigClientGenerated.h to retrieve the config back, all the data is 0 due to the memory is still not ready to use, and in each ConfigGet*** APIs, it calls InitConfigPolicyCache() to get CloudConfigPolicy and store in CachedPolicy, which is a global variable in C code, so in Pre-Memory phase, the global variable cannot be updated success, all the data will be kept as 0.
Expected Behavior
To make the design generic and can be adopted to all system architecture, needs to consider the case that ConfigPolicyTo[Silicon|Platform]Mapper get dispatched in Pre-Memory phase, and ConfigGet*** APIs from ConfigClientGenerated.h should work properly in Pre-Memory environment, so global variables consumption in Pre-Memory phase should be prevented.
Steps To Reproduce
Call ConfigGet*** APIs from ConfigClientGenerated.h, the return status is success, but all the data we retrieved will still be zero.
Build Environment
Version Information
Urgency
High
Are you going to fix this?
Someone else needs to fix it
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response
The text was updated successfully, but these errors were encountered: