freebsd-nq/sys
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
..
amd64 Fix typo. 2019-03-07 10:01:32 +00:00
arm arm64: allwinner: a64: Add TCON clock 2019-03-07 19:32:01 +00:00
arm64 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Reduce CTL threads priority to about PUSER. 2019-03-04 00:49:07 +00:00
cddl MFV/ZoL: Disable LBA weighting on files and SSDs 2019-03-08 21:13:45 +00:00
compat Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
conf arm64: allwinner: Add CCU DE2 2019-03-07 19:30:37 +00:00
contrib [ath_hal_ar9300] Add the missing bits from the previous HAL commit. 2019-03-06 08:52:02 +00:00
crypto Embedded chacha: Add 0-bit iv + 128-bit counter mode 2019-03-01 23:30:23 +00:00
ddb ddb: Print the thread's pcb in 'show thread' 2019-02-09 21:08:19 +00:00
dev Give the mx25l device sole ownership of the name /dev/flash/spi* instead of 2019-03-10 18:48:08 +00:00
dts Adapt FreeBSD specific DT stub for Jetson TK1 board to be consistent with 2019-02-06 06:03:44 +00:00
fs fuse: switch from DFLTPHYS/MAXBSIZE to maxcachebuf 2019-03-07 00:55:49 +00:00
gdb
geom Revert revision 254095 2019-03-05 04:15:34 +00:00
gnu Correct my previous correction to the license. It now matches the text 2019-03-07 22:34:45 +00:00
i386 Fix typo. 2019-03-07 10:01:32 +00:00
isa
kern Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
kgssapi * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
libkern Add non-sleepable strdup variant strdup_flags 2019-02-20 20:48:10 +00:00
mips Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
modules Add another required header file. 2019-03-01 04:17:43 +00:00
net Most Ethernet drivers that potentially can run a pfil(9) hook with 2019-03-10 17:20:09 +00:00
net80211 net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
netgraph Remove remnants of byte order manipulation, back when FreeBSD stack 2019-02-09 03:00:00 +00:00
netinet Improve ARP logging. 2019-03-09 01:12:59 +00:00
netinet6 Update for IETF draft-ietf-6man-ipv6only-flag. 2019-03-07 23:03:39 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil pf: Fix DIOCGETSRCNODES 2019-03-08 09:33:16 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Fix another bug introduced during the review process of r344140: 2019-02-25 19:14:16 +00:00
powerpc powerpc: Print trap frame address in ddb backtraces 2019-03-09 03:24:39 +00:00
riscv Reorder copyright lines to preserve the source of "All rights reserved." 2019-03-06 16:50:14 +00:00
rpc Bump the default kern.rpc.gss.client_max from 128 to 1024. 2019-02-19 11:07:02 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
sys Try to improve comment for socket state bits. 2019-03-09 01:37:00 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs FFS: allow sendfile(2) to work with block sizes greater than the page size 2019-02-26 04:56:10 +00:00
vm Implement minidump support for RISC-V. 2019-03-06 00:01:06 +00:00
x86 atrtc(4): install ACPI RTC/CMOS operation region handler 2019-03-10 20:19:43 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile