Page MenuHomeFreeBSD

atrtc.c: handle _STA object indcate it is not functional.
Needs ReviewPublic

Authored by takawata on Jan 14 2022, 6:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 9:58 AM
Unknown Object (File)
Dec 26 2023, 9:58 PM
Unknown Object (File)
Dec 20 2023, 1:15 AM
Unknown Object (File)
Dec 12 2023, 9:22 PM
Unknown Object (File)
Nov 26 2023, 1:54 PM
Unknown Object (File)
Sep 6 2023, 5:13 AM
Unknown Object (File)
Jun 20 2023, 5:21 PM
Unknown Object (File)
May 24 2023, 6:42 PM
Subscribers
None

Details

Reviewers
wulf
imp
jhb
Summary

Enable cmos register access from ACPI only and relux register access restriction when RTC _STA object indicate not functional. This is needed for upcoming ACPI000E device (I name it acpi_rtc.) for some implementation.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43923
Build 40811: arc lint + arc unit

Event Timeline

takawata created this revision.
sys/x86/isa/atrtc.c
508

blank line is missed

510
- if (acpi_rtc_is_present){
+ if (acpi_rtc_is_present) {
514
- }else{
+ } else {
534

blank line is missed

535
- if(sc->is_active)
+ if (sc->is_active)
sys/x86/isa/atrtc.c
298

I do not understand what !acpi_rtc_is_present check does here.
This code opens a lot of RTC registers for write if execution of _STA method returned 'Not present'.
To make region handler dummy, if it is required, !acpi_rtc_is_present check should be moved to atrtc_acpi_cmos_handler() and should return AE_OK on success.
P.S. soft context is available in atrtc_acpi_cmos_handler(), so acpi_rtc_is_present global variable may be converted to sc->is_present