-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LAI misunderstanding of the Preserve field property(?) #144
Comments
This is caused by the following code unconditionally doing a read to get the original value. Lines 484 to 491 in a228465
One solution would be checking that the write only affects a part of the word, and only doing the read if that is the case. I'm unsure whether the extra unused read is actually a problem? I suppose it could potentially confuse some hardware that do things on register reads, and it's probably better to stick to what ACPICA does if we want to work on real hardware. |
Yeah it's pretty much impossible to say, it might trip up some hardware, might not. There are probably some registers cleared by read? Another thing I thought of is if this was some other address space (aka not SystemMemory or SystemIO) but say SMBus. There a spurious read could cause more problems probably. At the very least it's extra wasted cycles or stalls for no reason. |
As indicated by LAI's own field test here:
Preserve means that all bits outside of a field where field size is less than access size must be preserved. This implies that for field size == access size where field bit offset within byte is 0 no preservation of anything is needed. In the latter case, however, LAI still tries to read data only to discard it later.
I'm also not sure what's up with this top part here:
All in all write to REGC here should cause exactly 2 write accesses and 0 read accesses:
ACPICA seems to agree on this at least
The text was updated successfully, but these errors were encountered: