Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWAC] Clarifications #1749

Closed
dreamwhite opened this issue Aug 9, 2021 · 1 comment
Closed

[AWAC] Clarifications #1749

dreamwhite opened this issue Aug 9, 2021 · 1 comment

Comments

@dreamwhite
Copy link

Hi there,
on SSDT-AWAC-DISABLE #L3 it's written that macOS doesn't support yet AWAC clock.
However, in the following Mac dumps downloaded from this AppleLife thread, a device called ARTC identified by the ACPI name ACPI000E is present:

  • MBP15,1
  • MBP16,2
  • iMacPro1,1
  • iMac19,1
  • MacPro7,1

In the spoiler below you can find the code of ARTC device:

ARTC device ACPI
Device (ARTC)
                {
                    Name (_HID, "ACPI000E" /* Time and Alarm Device */)  // _HID: Hardware ID
                    Method (_GCP, 0, NotSerialized)  // _GCP: Get Capabilities
                    {
                        Return (0x05)
                    }

                    Method (_GRT, 0, Serialized)  // _GRT: Get Real Time
                    {
                        Name (BUFF, Buffer (0x10){})
                        BUFF [Zero] = ^^EC.YRLB /* \_SB_.PCI0.LPCB.EC__.YRLB */
                        BUFF [One] = ^^EC.YRMB /* \_SB_.PCI0.LPCB.EC__.YRMB */
                        BUFF [0x02] = ^^EC.MNTH /* \_SB_.PCI0.LPCB.EC__.MNTH */
                        BUFF [0x03] = ^^EC.DAYB /* \_SB_.PCI0.LPCB.EC__.DAYB */
                        BUFF [0x04] = ^^EC.HOUR /* \_SB_.PCI0.LPCB.EC__.HOUR */
                        BUFF [0x05] = ^^EC.MINT /* \_SB_.PCI0.LPCB.EC__.MINT */
                        BUFF [0x06] = ^^EC.SECD /* \_SB_.PCI0.LPCB.EC__.SECD */
                        BUFF [0x07] = ^^EC.PAD0 /* \_SB_.PCI0.LPCB.EC__.PAD0 */
                        BUFF [0x08] = ^^EC.MSLB /* \_SB_.PCI0.LPCB.EC__.MSLB */
                        BUFF [0x09] = ^^EC.MSMB /* \_SB_.PCI0.LPCB.EC__.MSMB */
                        BUFF [0x0A] = ^^EC.TZLB /* \_SB_.PCI0.LPCB.EC__.TZLB */
                        BUFF [0x0B] = ^^EC.TZMB /* \_SB_.PCI0.LPCB.EC__.TZMB */
                        BUFF [0x0C] = ^^EC.DAYL /* \_SB_.PCI0.LPCB.EC__.DAYL */
                        BUFF [0x0D] = ^^EC.PAD1 /* \_SB_.PCI0.LPCB.EC__.PAD1 */
                        BUFF [0x0E] = ^^EC.PAD2 /* \_SB_.PCI0.LPCB.EC__.PAD2 */
                        BUFF [0x0F] = ^^EC.PAD3 /* \_SB_.PCI0.LPCB.EC__.PAD3 */
                        Return (BUFF) /* \_SB_.PCI0.LPCB.ARTC._GRT.BUFF */
                    }

                    Method (_SRT, 1, Serialized)  // _SRT: Set Real Time
                    {
                        ^^EC.YRLB = DerefOf (Arg0 [Zero])
                        ^^EC.YRMB = DerefOf (Arg0 [One])
                        ^^EC.MNTH = DerefOf (Arg0 [0x02])
                        ^^EC.DAYB = DerefOf (Arg0 [0x03])
                        ^^EC.HOUR = DerefOf (Arg0 [0x04])
                        ^^EC.MINT = DerefOf (Arg0 [0x05])
                        ^^EC.SECD = DerefOf (Arg0 [0x06])
                        ^^EC.MSLB = DerefOf (Arg0 [0x08])
                        ^^EC.MSMB = DerefOf (Arg0 [0x09])
                        ^^EC.TZLB = DerefOf (Arg0 [0x0A])
                        ^^EC.TZMB = DerefOf (Arg0 [0x0B])
                        ^^EC.DAYL = DerefOf (Arg0 [0x0C])
                        Return (Zero)
                    }

                    Method (_STV, 2, Serialized)  // _STV: Set Timer Value
                    {
                        ^^EC.ALR0 = (Arg1 & 0xFF)
                        ^^EC.ALR1 = ((Arg1 >> 0x08) & 0xFF)
                        ^^EC.ALR2 = ((Arg1 >> 0x10) & 0xFF)
                        ^^EC.ALR3 = ((Arg1 >> 0x18) & 0xFF)
                        Return (Zero)
                    }

                    Method (_CWS, 1, Serialized)  // _CWS: Clear Wake Alarm Status
                    {
                        ^^EC.TMRF = Zero
                        ^^EC.TMRW = Zero
                        Return (Zero)
                    }

The mentioned variables are defined inside the EmbeddedController ECOR field:

EC fields
OperationRegion (ECOR, EmbeddedControl, Zero, 0xFF)
                    Field (ECOR, ByteAcc, NoLock, Preserve)
                    {
                        ECVS,   8, 
                        Offset (0x02), 
                        Offset (0x03), 
                        G3HT,   1, 
                            ,   5, 
                        LVME,   1, 
                        PRST,   1, 
                        WBCB,   1, 
                        DSLP,   1, 
                        Offset (0x05), 
                        Offset (0x06), 
                        WKRS,   8, 
                        Offset (0x09), 
                        LDSB,   8, 
                        Offset (0x0B), 
                        TBPW,   4, 
                        Offset (0x0C), 
                        Offset (0x0D), 
                        CMDS,   8, 
                        DATA,   8, 
                        INDX,   8, 
                        ECSS,   8, 
                        RRST,   8, 
                        ALB0,   8, 
                        ALB1,   8, 
                        WTLB,   8, 
                        WTMB,   8, 
                        Offset (0x20), 
                        SPTR,   8, 
                        SSTS,   8, 
                        SADR,   8, 
                        SCMD,   8, 
                        SBFR,   256, 
                        SCNT,   8, 
                        SAAD,   8, 
                        SAD0,   8, 
                        SAD1,   8, 
                        SMUX,   8, 
                        Offset (0x60), 
                        ELSW,   1, 
                        EACP,   1, 
                        ECDI,   1, 
                        ENMI,   1, 
                        Offset (0x61), 
                        EMHP,   1, 
                        PSOC,   1, 
                        PCIR,   1, 
                        TBPS,   1, 
                        Offset (0x62), 
                        Offset (0x63), 
                        Offset (0x64), 
                        SWLO,   1, 
                        SWLC,   1, 
                        SWAI,   1, 
                        SWAR,   1, 
                        SWCI,   1, 
                        SWCE,   1, 
                        SWMI,   1, 
                        SWMR,   1, 
                        SWPB,   1, 
                        SWGP,   1, 
                        SWPM,   1, 
                        SWWT,   1, 
                        SWLB,   1, 
                        Offset (0x66), 
                        Offset (0x67), 
                        Offset (0x68), 
                        EWLO,   1, 
                        EWLC,   1, 
                        EWAI,   1, 
                        EWAR,   1, 
                        EWCI,   1, 
                        EWCE,   1, 
                        EWMI,   1, 
                        EWMR,   1, 
                        EWPB,   1, 
                        EWGP,   1, 
                        EWPM,   1, 
                        ENWT,   1, 
                        EWLB,   1, 
                        EWDK,   1, 
                        Offset (0x6A), 
                        Offset (0x6B), 
                        Offset (0x6C), 
                        LWLO,   1, 
                        LWLC,   1, 
                        LWAI,   1, 
                        LWAR,   1, 
                        LWCI,   1, 
                        LWCE,   1, 
                        LWMI,   1, 
                        LWMR,   1, 
                        LWPB,   1, 
                        LWGP,   1, 
                        LWPM,   1, 
                        LWWT,   1, 
                        LWLB,   1, 
                        Offset (0x6E), 
                        Offset (0x6F), 
                        Offset (0x70), 
                        LWSR,   1, 
                        LWPN,   1, 
                        LWCL,   1, 
                            ,   8, 
                            ,   8, 
                            ,   8, 
                            ,   8, 
                        Offset (0x7C), 
                        ALRA,   1, 
                        ALRD,   1, 
                        GSRT,   1, 
                        RTMS,   1, 
                        Offset (0x7D), 
                        TMRF,   1, 
                        TMRW,   1, 
                        Offset (0x80), 
                        YRLB,   8, -------------------------------> HERE THE VARIABLES OF ARTC ARE DEFINED
                        YRMB,   8, 
                        MNTH,   8, 
                        DAYB,   8, 
                        HOUR,   8, 
                        MINT,   8, 
                        SECD,   8, 
                        PAD0,   8, 
                        MSLB,   8, 
                        MSMB,   8, 
                        TZLB,   8, 
                        TZMB,   8, 
                        DAYL,   8, 
                        PAD1,   8, 
                        PAD2,   8, 
                        PAD3,   8, 
                        ALR0,   8, 
                        ALR1,   8, 
                        ALR2,   8, 
                        ALR3,   8
                    }

Given that AWAC (or maybe EC) device on hackintosh itself probably isn't natively supported, isn't this a discrepancy with the statement in SSDT-AWAC-DISABLE?
Can eventually AWAC be enabled on macOS?
Greetings
dreamwhite

@khronokernel
Copy link
Member

The ARTC device in Macs are unrelated to the AWAC devices in PCs, specifically that the Mac's ARTC devices are tied to the SMC. One would need to implement a VirtualSMC plugin to communicate between AppleSMCRTC and the PC's AWAC device.

So the statement that macOS does not yet support AWAC is correct, as the AWAC device the community knows in PCs is not the ARTC macOS supports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants