sst: Prefer cached values over default values
In anticipation of support for future CPUs, change some assumptions:
* When host is off, return cached property values instead of "default"
values. CPUs may not guarantee support for level 0, so there is no
universal default.
* Must always check the backend interface is ready before using it.
* Rename numLevels() to maxLevel() since there may be discontinuities in
the supported levels.
* Also add some more debug prints.
Tested:
* On CPU that supports level 0 - verified that output of sst-info.sh
script was the same before and after these changes.
* On a CPU that only supports level 4 - verified that when host was
powered off, the AppliedConfig showed config4 (valid) instead of
config0 (invalid).
Change-Id: Idffcb9a6534ba32760f6d6b2ac244f47427995ea
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
3 files changed