Hi!

Thanks for looking into this. I've tried the patch and the "found GPIO
port" printf is not triggered because sc->sc_acpi->sc_hw_reduced is 0
for me.

Which acpi table should I attach?

Thanks,
Ilya


RSD PTR: Checksum=188, OEMID=ACRSYS, RsdtAddress=0x9aafe124


RSDT: Length=112, Revision=1, Checksum=171,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=, Creator Revision=0x1000013


        Entries={ 0x9aaf7000, 0x9aafd000, 0x9aafc000, 0x9aafa000,
0x9aaf9000, 0x9aaf8000, 0x9aaf6000, 0x9aaf5000, 0x9aaf4000,
0x9aae2000, 0x9aae0000, 0x9aade000, 0x9aadd000, 0x9aada000,
0x9aad9000, 0x9aad5000, 0x9aad4000, 0x9aad3000, 0x9aae3000 }


        DSDT=0x9aae4000
        INT_MODEL=APIC
        SCI_INT=9
        SMI_CMD=0xb2, ACPI_ENABLE=0xa0, ACPI_DISABLE=0xa1, S4BIOS_REQ=0x0
        PM1a_EVT_BLK=0x1800-0x1803
        PM1a_CNT_BLK=0x1804-0x1805
        PM2_CNT_BLK=0x1850-0x1850
        PM2_TMR_BLK=0x1808-0x180b
        PM2_GPE0_BLK=0x1880-0x189f
        P_LVL2_LAT=101ms, P_LVL3_LAT=57ms
        FLUSH_SIZE=1024, FLUSH_STRIDE=16
        DUTY_OFFSET=1, DUTY_WIDTH=3
        DAY_ALRM=13, MON_ALRM=0, CENTURY=0
        Flags={WBINVD,PROC_C1,SLP_BUTTON,RTC_S4}


DSDT: Length=61736, Revision=1, Checksum=95,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x0,
        Creator ID=1025, Creator Revision=0x40000


TCPA: Length=50, Revision=2, Checksum=139,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x0,
        Creator ID=1025, Creator Revision=0x40000


UEFI: Length=566, Revision=1, Checksum=189,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


FPDT: Length=68, Revision=1, Checksum=181,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


MSDM: Length=85, Revision=3, Checksum=230,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


ASF!: Length=165, Revision=32, Checksum=231,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


HPET: Length=56, Revision=1, Checksum=170,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


APIC: Length=140, Revision=3, Checksum=12,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


MCFG: Length=60, Revision=1, Checksum=210,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


SSDT: Length=2101, Revision=1, Checksum=93,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1000,
        Creator ID=1025, Creator Revision=0x40000


BOOT: Length=40, Revision=1, Checksum=106,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


ASPT: Length=52, Revision=7, Checksum=152,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


DBGP: Length=52, Revision=1, Checksum=172,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000


SSDT: Length=1337, Revision=1, Checksum=105,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x3000,
        Creator ID=1025, Creator Revision=0x40000


SSDT: Length=2776, Revision=1, Checksum=140,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x3000,
        Creator ID=1025, Creator Revision=0x40000


SSDT: Length=12958, Revision=1, Checksum=91,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x3000,
        Creator ID=1025, Creator Revision=0x40000


SSDT: Length=824, Revision=1, Checksum=146,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1000,
        Creator ID=1025, Creator Revision=0x40000


SSDT: Length=1593, Revision=1, Checksum=58,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1000,
        Creator ID=1025, Creator Revision=0x40000


DMAR: Length=136, Revision=1, Checksum=227,
        OEMID=ACRSYS, OEM Table ID=ACRPRDCT, OEM Revision=0x1,
        Creator ID=1025, Creator Revision=0x40000






On Thu, Oct 13, 2016 at 1:19 AM, Paul Irofti <p...@irofti.net> wrote:
>> The diff you sent simply ignores the issue which obviously can not be
>> used in the tree.
>
> The following diff starts working in the right direction, but there is
> probably more to do in order to support machines like yours.
>
> It would be interesting to see if that printf gets triggered though, so
> please test and let me know. Also, send that acpidump.
>
>
> Index: acpiec.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/acpiec.c,v
> retrieving revision 1.54
> diff -u -p -u -p -r1.54 acpiec.c
> --- acpiec.c    23 Aug 2016 18:26:21 -0000      1.54
> +++ acpiec.c    13 Oct 2016 08:16:52 -0000
> @@ -410,8 +410,8 @@ int
>  acpiec_getcrs(struct acpiec_softc *sc, struct acpi_attach_args *aa)
>  {
>         struct aml_value        res;
> -       bus_size_t              ec_sc, ec_data;
> -       int                     dtype, ctype;
> +       bus_size_t              ec_sc, ec_data, ec_gpio;
> +       int                     dtype, ctype, iotype;
>         char                    *buf;
>         int                     size, ret;
>         int64_t                 gpe;
> @@ -480,6 +480,20 @@ acpiec_getcrs(struct acpiec_softc *sc, s
>
>         buf += ret;
>         size -= ret;
> +
> +       if (sc->sc_acpi->sc_hw_reduced) {
> +               ret = acpiec_getregister(buf, size, &iotype, &ec_gpio);
> +               if (ret <= 0) {
> +                       dnprintf(10, "%s: failed to read GPIO from _CRS\n",
> +                           DEVNAME(sc));
> +                       aml_freevalue(&res);
> +                       return (1);
> +               }
> +               printf("%s: found GPIO port\n", DEVNAME(sc));
> +
> +               buf += ret;
> +               size -= ret;
> +       }
>
>         if (size != 2 || *buf != RES_TYPE_ENDTAG) {
>                 dnprintf(10, "%s: no _CRS end tag\n", DEVNAME(sc));

Reply via email to