[PATCH] ACPI CMOS region support rev. 4

Anthony Jenkins Anthony.B.Jenkins at att.net
Mon Mar 16 15:53:00 UTC 2015


On 03/16/2015 11:00 AM, Anthony Jenkins wrote:
> On 03/16/2015 09:59 AM, Ian Smith wrote:
>> On Sat, 14 Mar 2015 23:40:34 -0400, Anthony Jenkins wrote:
>>> +    if (!acpi_check_rtc_byteaccess(function == ACPI_READ, address))
>>> +            return AE_BAD_PARAMETER;
>> acpi_check_rtc_byteaccess() needs to be called per byte of 1, 2 or 4 
>> bytes - or pass it 'bytes' also, and loop over each of them within?
>> =======
>>
>> Otherwise (for example) a 2 byte read from 0x0b or 4 byte read from 
>> 0x09-0x0b will read 0x0c (clearing interrupts), or a 2 or 4 byte write 
>> to (say) 0x01 will also write to 0x02 and 0x04 (clobbering the time).
> Right, this is an (incorrect) hybrid of a few attempts, probably from
> around the time I lost my SSD and only had a single backup copy of my
> work to go from.  In one revision I had disallowed all multibyte
> accesses (width > 8) since IMHO it was more consistent/correct with the
> suggested locking.  I wasn't ignoring your suggestion, just making one
> or a few changes at a time (generally the simpler ones).

Okay now I remember why I was reluctant to do this - suppose ACPIBIOS
does a multibyte op on a set of bytes whose last byte fails
acpi_check_rtc_byteaccess().  I will have already performed n-1
accesses.  At one point I had a revision (acpi_check_rtc_access()?) that
permitted/denied the entire request (it took the starting address and
byte length), but I guess that got lost too.  I'll just recreate it...

Anthony

>
>> cheers, Ian
>>
>>
>> _______________________________________________
>> freebsd-acpi at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
>> To unsubscribe, send any mail to "freebsd-acpi-unsubscribe at freebsd.org"



More information about the freebsd-acpi mailing list