You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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?
#5 Is going to make this a bit of a pain, as we'll have to 'reverse' the multiplier function to turn the data back into something we write to a register.
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.The text was updated successfully, but these errors were encountered: