freebsd-nq/sys/x86/isa
Vladimir Kondratyev 2b4ee39838 atrtc(4): install ACPI RTC/CMOS operation region handler
FreeBSD base system does not provide an ACPI handler for the PC/AT RTC/CMOS
device with PnP ID PNP0B00; on some HP laptops, the absence of this handler
causes suspend/resume and poweroff(8) to hang or fail [1], [2]. On these
laptops EC _REG method queries the RTC date/time registers via ACPI
before suspending/powering off. The handler should be registered before
acpi_ec driver is loaded.

This change adds handler to access CMOS RTC operation region described in
section 9.15 of ACPI-6.2 specification [3]. It is installed only for ACPI
version of atrtc(4) so it should not affect old ACPI-less i386 systems.

It is possible to disable the handler with loader tunable:
debug.acpi.disabled=atrtc

Informational debugging printf can be enabled by setting hw.acpi.verbose=1
in loader.conf

[1] https://wiki.freebsd.org/Laptops/HP_Envy_6Z-1100
[2] https://wiki.freebsd.org/Laptops/HP_Notebook_15-af104ur
[3] https://uefi.org/sites/default/files/resources/ACPI_6_2.pdf

PR:		207419, 213039
Submitted by:	Anthony Jenkins <Scoobi_doo@yahoo.com>
Reviewed by:	ian
Discussed on:	acpi@, 2013-2015, several threads
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19314
2019-03-10 20:19:43 +00:00
..
atpic.c Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
atrtc.c atrtc(4): install ACPI RTC/CMOS operation region handler 2019-03-10 20:19:43 +00:00
clock.c Use separate mutexes for atrtc and i8254 locking. Change all the strange 2018-03-11 18:20:49 +00:00
elcr.c Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
icu.h Remove 'imen' global variable from atpic(4). 2018-08-21 17:13:51 +00:00
isa_dma.c ANSIfy sys/x86 2018-03-17 01:40:09 +00:00
isa.c SPDX: Fix some cases wrongly attributed to MIT. 2017-11-30 15:10:11 +00:00
nmi.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
orm.c Add ISA PNP tables to ISA drivers. Fix a few incidental comments. 2018-01-29 00:22:30 +00:00