5T33Z0 / OC-Little-Translated

ACPI Hotpatches and Guides for the OpenCore Bootmanager. Enhance and fine-tune your Hackintosh by adding devices and enabling additional features not covered in the OpenCore Install Guide. Only place that covers how to use OpenCore Legacy Patcher on PCs.
BSD 3-Clause "New" or "Revised" License
524 stars 71 forks source link

[ACPI] Proposal #25

Closed dreamwhite closed 2 years ago

dreamwhite commented 2 years ago

Is there any reason in this guide there are some useless SSDT that don't add any "feature" on macOS? I'm talking about:

I'd rather drop them rather than clogging uselessly ACPI tables as o*****a does...

Please read this PR also: https://github.com/acidanthera/OpenCorePkg/pull/121#issuecomment-696825376

5T33Z0 commented 2 years ago

As stated in chapter 01's summary, these tables are purely cosmetic and optional. To add them or not, is up to the user.

BTW, I think DMAC has to be considered cosmetic as well. I am not sure about XSPI, though.

If your proposal was to remove the tables: not happening. Even if one doesn't add any of this tables, one may still want to know what the device is for.

Baio1977 commented 2 years ago

Nobody forces users to use these SSDTs. This spectacular guide is NOT to be reduced by information, but things must be added. I am not discussing anything, because I have only added some useless things. But you have already removed the variation of the awac and rtc method and it is nonsense to me. I use these methods in every hack of my reposities and no one has ever had a problem. Rebuilding devices where it is possible to change the state is for me the cleanest method. Rebuilding devices is just an old and functional method. And they fill those removed parts with knowledge in my opinion. Always endless compliments for this masterpiece, you are great Esempio: Schermata 2022-04-25 alle 19 20 12

Same example I want to see if you delete this too, but not for a useful speech, but it is also nice to know certain things.

5T33Z0 commented 2 years ago

@Baio1977 I deleted the AWAC and RTC variants you mentioned because @dreamwhite said they were not ACPI conform and suggested to remove them:

https://github.com/5T33Z0/OC-Little-Translated/issues/22

And since I don't know enough ASL yet to really judge if a table conforms to ACPI specs or not, I acted based on the recommendation.

Baio1977 commented 2 years ago

No problem, I'm not an ACPI Guru, I'm just an average user, but whoever taught me to understand ACPI would never have made me do patches that are not in line with the ACPI standard and in fact the creator of this Guide has already explained the possible usable variables. So this is stated by my compatriot I do not know if it is really true, but I certainly do not have the skills to contradict it.

/*

MacBook Pro di lollo78.ioreg.zip

SSDT-HP 250G7

dreamwhite commented 2 years ago

Hi and sorry for the late reply. Basically the approach of @Baio1977 isn't bad at all BUT as already stated in issue #22, you can't assign a value to a function that returns a value. If _STA was a variable, then the proposed approach is fine, but to be ACPI 6.4 compliant, _STA is a method, not a variable, so assigning a value to it is just a hacky thing that works, for whatever reason, but it's not compliant...

To be more specific, if _STA was defined like Name (_STA, 0x0F) and not Method (_STA, 0, NotSerialized) the hacky approach would have been fine.

Maybe on old motherboards firmwares it's a variable, but from my whole experience it's not...

P.S. @Baio1977 for the HP 250 G7 you can just create a dummy RTC0 device and it will work :)

/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20200925 (64-bit version)
 * Copyright (c) 2000 - 2020 Intel Corporation
 * 
 * Disassembling to symbolic ASL+ operators
 *
 * Disassembly of iASLn8hmD4.aml, Mon Apr 25 21:04:52 2022
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x0000008E (142)
 *     Revision         0x02
 *     Checksum         0x97
 *     OEM ID           "ACDT"
 *     OEM Table ID     "RTC0"
 *     OEM Revision     0x00000000 (0)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20200528 (538969384)
 */
DefinitionBlock ("", "SSDT", 2, "ACDT", "RTC0", 0x00000000)
{
    External (_SB_.PCI0.LPCB, DeviceObj)

    Scope (_SB.PCI0.LPCB)
    {
        Device (RTC0)
        {
            Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // _HID: Hardware ID
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
                IO (Decode16,
                    0x0070,             // Range Minimum
                    0x0070,             // Range Maximum
                    0x01,               // Alignment
                    0x08,               // Length
                    )
                IRQNoFlags ()
                    {8}
            })
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (0x0F)
                }
                Else
                {
                    Return (Zero)
                }
            }
        }
    }
}