git: eb815a741940 - main - atrtc: Install address space handler for \_SB and its descendant.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 21 Jan 2022 06:37:22 UTC
The branch main has been updated by takawata: URL: https://cgit.FreeBSD.org/src/commit/?id=eb815a7419409056c65eb027c2b24b4e616480e8 commit eb815a7419409056c65eb027c2b24b4e616480e8 Author: Takanori Watanabe <takawata@FreeBSD.org> AuthorDate: 2022-01-21 06:32:30 +0000 Commit: Takanori Watanabe <takawata@FreeBSD.org> CommitDate: 2022-01-21 06:32:30 +0000 atrtc: Install address space handler for \_SB and its descendant. SystemCMOS address space is accessible for system wide. So install address handler in \_SB space. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D33892 --- sys/x86/isa/atrtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c index aff838c53851..68ea554fd95b 100644 --- a/sys/x86/isa/atrtc.c +++ b/sys/x86/isa/atrtc.c @@ -371,7 +371,10 @@ atrtc_reg_acpi_cmos_handler(device_t dev) if (acpi_disabled("atrtc")) return (ENXIO); - sc->acpi_handle = acpi_get_handle(dev); + if (ACPI_FAILURE(AcpiGetHandle(ACPI_ROOT_OBJECT, "\\_SB_", &sc->acpi_handle))) { + return (ENXIO); + } + if (sc->acpi_handle == NULL || ACPI_FAILURE(AcpiInstallAddressSpaceHandler(sc->acpi_handle, ACPI_ADR_SPACE_CMOS, atrtc_acpi_cmos_handler, NULL, dev))) {