Implement additional error checking for aplsmc_read_key() such that we can
authorkettenis <kettenis@openbsd.org>
Tue, 15 Mar 2022 18:46:15 +0000 (18:46 +0000)
committerkettenis <kettenis@openbsd.org>
Tue, 15 Mar 2022 18:46:15 +0000 (18:46 +0000)
commit40fc16d48e225523db99a9fcb18cc90cf2b70771
tree102266b683103d8cbc0c17270ed9962e72679d7e
parent4141bb4bac68426bd4442b1c97468838cd9ad760
Implement additional error checking for aplsmc_read_key() such that we can
detect when we read a key that isn't supported by the firmware.
Only provide RTC functionality if the "CLKM" key is implemented.
Fixes reading the time on machines with old SMC firmware from macOS 11.x.

ok jsg@
sys/arch/arm64/dev/aplsmc.c