Open fearful-symmetry opened 5 years ago
Another consideration is the units in the write API. For example, the SDM specifies the value for the Time Limit in the MSR_[DOMAIN]_POWER_LIMIT as:
Time limit = 2^Y * (1.0 + Z/4.0) * Time_Unit
Should we expect the user to do that math? Do they give a value in whatever unit and we convert it?
So, embarrassingly, I don't have nearly as much experience writing to MSRs as I do reading them. This has lead me to wonder how we want to update single values in a write. Presumably modifying the MSR itself isn't hard, and applying a binary AND to the existing value and writing it back will be enough.
The API is a little more interesting: I'm thinking an
Option
Type that allows us to specify an arbitrary number of values to update might be best:Another option would be a struct with
&int
pointers, as this would allow us to distinguish between uninitialized values. Having pointers everywhere seems awkward, but it's certainly an option.