diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-10-28 14:16:40 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-10-28 14:16:40 +0000 |
commit | a3d888e8b5b93eb44383fc913f83731f51fa259b (patch) | |
tree | b6daf629531818bf84fb5bd8741f69bdf340c117 /sys/arch/arm64 | |
parent | f3f6a39e7e9951728902462a12758758ba793292 (diff) |
Set AP power state. Fixes the SMC initialization on (at least) the M1
MacBook with the latest system firmware.
ok patrick@, jsg@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r-- | sys/arch/arm64/dev/aplsmc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/arm64/dev/aplsmc.c b/sys/arch/arm64/dev/aplsmc.c index 08b4629a293..4717c54bb8d 100644 --- a/sys/arch/arm64/dev/aplsmc.c +++ b/sys/arch/arm64/dev/aplsmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplsmc.c,v 1.25 2023/07/16 16:11:11 kettenis Exp $ */ +/* $OpenBSD: aplsmc.c,v 1.26 2024/10/28 14:16:39 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org> * @@ -250,6 +250,12 @@ aplsmc_attach(struct device *parent, struct device *self, void *aux) return; } + error = rtkit_set_ap_pwrstate(sc->sc_rs, RTKIT_MGMT_PWR_STATE_ON); + if (error) { + printf(": can't set AP power state\n"); + return; + } + error = rtkit_start_endpoint(sc->sc_rs, SMC_EP, aplsmc_callback, sc); if (error) { printf(": can't start SMC endpoint\n"); |