On Thu, Aug 9, 2018 at 10:40 AM Mark Kettenis <mark.kette...@xs4all.nl> wrote: > > > From: sven falempin <sven.falem...@gmail.com> > > Date: Thu, 9 Aug 2018 10:10:14 -0400 > > > > In ACPI.c > > > > > > if ((pm1 & ACPI_PM1_SCI_EN) == 0 && sc->sc_fadt->smi_cmd && > > (!sc->sc_fadt->acpi_enable && !sc->sc_fadt->acpi_disable)) { > > printf(", ACPI control unavailable\n"); > > acpi_unmap_pmregs(sc); > > return; > > } > > > > > > the condition test that the sc_fadt is NOT ENABLE AND NOT DISABLE > > > > wut ? > > No. It tests whether the magic that's needed to enable and disable is > provided. If both are absent it decides that the ACPI implementation > is probably borked and bails out. >
Me heads hurt. Yes the system is screaming at me ;-) I m gonna see if there is multple fadt table , as rev 6 ( my hardware is rev 6 hdr ) say they could have a 64 and 32 bits and that you must prefer the bigger one ... Wörse diff ever enables device to reboot properly when asked Index: dev/acpi/acpi.c =================================================================== RCS file: /cvs/src/sys/dev/acpi/acpi.c,v retrieving revision 1.341 diff -u -p -r1.341 acpi.c --- dev/acpi/acpi.c 27 Mar 2018 21:11:16 -0000 1.341 +++ dev/acpi/acpi.c 9 Aug 2018 15:26:59 -0000 @@ -980,11 +980,18 @@ acpi_attach(struct device *parent, struc /* * Find the FADT */ + size_t fadt_s = sizeof(FADT_SIG) - 1; SIMPLEQ_FOREACH(entry, &sc->sc_tables, q_next) { - if (memcmp(entry->q_table, FADT_SIG, - sizeof(FADT_SIG) - 1) == 0) { - sc->sc_fadt = entry->q_table; - break; + if (memcmp(entry->q_table, FADT_SIG,fadt_s) == 0) { + if (sc->sc_fadt == NULL) { + sc->sc_fadt = entry->q_table; + } else { + struct acpi_fadt *p = entry->q_table; + printf(", more than one FADT old s: %d,new s: %d\n",sc->sc_fadt->hdr_length, p->hdr_length); + if (sc->sc_fadt->hdr_length < p->hdr_length) { + sc->sc_fadt = entry->q_table; + } + } } } if (sc->sc_fadt == NULL) { @@ -999,6 +1006,8 @@ acpi_attach(struct device *parent, struc if (sc->sc_fadt->hdr_revision >= 5 && sc->sc_fadt->flags & FADT_HW_REDUCED_ACPI) sc->sc_hw_reduced = 1; + printf(", hdr_revision %d", sc->sc_fadt->hdr_revision); + printf(", ACPI FATD %08X\n", sc->sc_fadt->flags); /* Map Power Management registers */ acpi_map_pmregs(sc); @@ -1093,7 +1102,7 @@ acpi_attach(struct device *parent, struc if ((pm1 & ACPI_PM1_SCI_EN) == 0 && sc->sc_fadt->smi_cmd) { if (acpi_enable(sc)) { printf(", can't enable ACPI\n"); - return; + // return; } } dmesg: OpenBSD 6.3-current (MEEEE.MP) #12: Thu Aug 9 11:11:50 EDT 2018 r...@imeee.com:/usr/src/sys/arch/amd64/compile/MEEEE .MP real mem = 17130721280 (16337MB) avail mem = 16604438528 (15835MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7f1fc000 (18 entries) bios0: vendor American Megatrends Inc. version "0ACHIA01" date 06/14/2018 bios0: NF699 NF699 acpi0 at bios0: rev 2, hdr_revision 6, ACPI FATD 0002C4A5 acpi0: sleep states S0 S4 S5, can't enable ACPI acpi0: tables DSDT FACP FPDT FIDT MCFG WDAT APIC BDAT HPET UEFI SSDT DMAR HEST BERT ERST EINJ WSMT acpi0: wakeup devices PEX0(S4) PEX1(S4) PEX2(S4) PEX3(S4) PEX4(S4) PEX5(S4) PEX6(S4) PEX7(S4) XHC1(S4) LAN0(S4) LAN1(S4) LAN2(S4) LAN3(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.43 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu0: 2MB 64b/line 16-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 25MHz cpu0: mwait min=64, max=64, C-substates=0.2.0.2, IBE cpu1 at mainbus0: apid 4 (application processor) cpu1: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu1: 2MB 64b/line 16-way L2 cache cpu1: smt 0, core 2, package 0 cpu2 at mainbus0: apid 8 (application processor) cpu2: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu2: 2MB 64b/line 16-way L2 cache cpu2: smt 0, core 4, package 0 cpu3 at mainbus0: apid 12 (application processor) cpu3: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu3: 2MB 64b/line 16-way L2 cache cpu3: smt 0, core 6, package 0 cpu4 at mainbus0: apid 16 (application processor) cpu4: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu4: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu4: 2MB 64b/line 16-way L2 cache cpu4: smt 0, core 8, package 0 cpu5 at mainbus0: apid 20 (application processor) cpu5: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu5: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu5: 2MB 64b/line 16-way L2 cache cpu5: smt 0, core 10, package 0 cpu6 at mainbus0: apid 24 (application processor) cpu6: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu6: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu6: 2MB 64b/line 16-way L2 cache cpu6: smt 0, core 12, package 0 cpu7 at mainbus0: apid 28 (application processor) cpu7: Intel(R) Atom(TM) CPU C3758 @ 2.20GHz, 2200.02 MHz cpu7: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,IBRS,IBPB,STIBP,SENSOR,ARAT cpu7: 2MB 64b/line 16-way L2 cache cpu7: smt 0, core 14, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins acpihpet0 at acpi0: 23999999 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 2 (PEX0) acpiprt2 at acpi0: bus -1 (PEX1) acpiprt3 at acpi0: bus -1 (PEX2) acpiprt4 at acpi0: bus -1 (PEX3) acpiprt5 at acpi0: bus 3 (PEX4) acpiprt6 at acpi0: bus 4 (PEX5) acpiprt7 at acpi0: bus 5 (PEX6) acpiprt8 at acpi0: bus 6 (PEX7) acpiprt9 at acpi0: bus 7 (BR38) acpiprt10 at acpi0: bus 1 (VRP2) acpiprt11 at acpi0: bus 8 (VRP0) acpiprt12 at acpi0: bus 9 (VRP1) acpicpu0 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu1 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu2 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu3 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu4 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu5 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu6 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpicpu7 at acpi0: C2(10@50 mwait.1@0x21), C1(1000@1 mwait.1@0x1), PSS acpitz0 at acpi0: critical temperature is 100 degC acpitz1 at acpi0: critical temperature is 93 degC "PNP0003" at acpi0 not configured acpicmos0 at acpi0 "PNP0C33" at acpi0 not configured cpu0: Enhanced SpeedStep 2200 MHz: speeds: 2200, 2100, 2000, 1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz pci0 at mainbus0 bus 0 0:31:5: mem address conflict 0xfe010000/0x1000 pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x1980 rev 0x11 pchb1 at pci0 dev 4 function 0 vendor "Intel", unknown product 0x19a1 rev 0x11 vendor "Intel", unknown product 0x19a2 (class system subclass root complex event, rev 0x11) at pci0 dev 5 function 0 not configured ppb0 at pci0 dev 6 function 0 vendor "Intel", unknown product 0x19a3 rev 0x11 pci1 at ppb0 bus 1 vendor "Intel", unknown product 0x19e2 (class processor subclass Co-processor, rev 0x11) at pci1 dev 0 function 0 not configured ppb1 at pci0 dev 9 function 0 vendor "Intel", unknown product 0x19a4 rev 0x11 pci2 at ppb1 bus 2 ppb2 at pci0 dev 14 function 0 vendor "Intel", unknown product 0x19a8 rev 0x11 pci3 at ppb2 bus 3 em0 at pci3 dev 0 function 0 "Intel I210" rev 0x03: msi, address 00:30:18:0b:4a:7f ppb3 at pci0 dev 15 function 0 vendor "Intel", unknown product 0x19a9 rev 0x11 pci4 at ppb3 bus 4 em1 at pci4 dev 0 function 0 "Intel I210" rev 0x03: msi, address 00:30:18:0b:4a:80 ppb4 at pci0 dev 16 function 0 vendor "Intel", unknown product 0x19aa rev 0x11 pci5 at ppb4 bus 5 ppb5 at pci0 dev 17 function 0 vendor "Intel", unknown product 0x19ab rev 0x11 pci6 at ppb5 bus 6 ppb6 at pci6 dev 0 function 0 "ASPEED Technology AST1150 PCI" rev 0x04 pci7 at ppb6 bus 7 "ASPEED Technology AST2000" rev 0x41 at pci7 dev 0 function 0 not configured vendor "Intel", unknown product 0x19ac (class system subclass miscellaneous, rev 0x11) at pci0 dev 18 function 0 not configured ahci0 at pci0 dev 19 function 0 vendor "Intel", unknown product 0x19b2 rev 0x11: msi, AHCI 1.3.1 scsibus1 at ahci0: 32 targets ahci1 at pci0 dev 20 function 0 vendor "Intel", unknown product 0x19c2 rev 0x11: msi, AHCI 1.3.1 scsibus2 at ahci1: 32 targets xhci0 at pci0 dev 21 function 0 vendor "Intel", unknown product 0x19d0 rev 0x11: msi usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1 ppb7 at pci0 dev 22 function 0 vendor "Intel", unknown product 0x19d1 rev 0x11 pci8 at ppb7 bus 8 "Intel X553 SFP+" rev 0x11 at pci8 dev 0 function 0 not configured "Intel X553 SFP+" rev 0x11 at pci8 dev 0 function 1 not configured ppb8 at pci0 dev 23 function 0 vendor "Intel", unknown product 0x19d2 rev 0x11 pci9 at ppb8 bus 9 "Intel X553 SFP+" rev 0x11 at pci9 dev 0 function 0 not configured "Intel X553 SFP+" rev 0x11 at pci9 dev 0 function 1 not configured vendor "Intel", unknown product 0x19d3 (class communications subclass miscellaneous, rev 0x11) at pci0 dev 24 function 0 not configured sdhc0 at pci0 dev 28 function 0 vendor "Intel", unknown product 0x19db rev 0x11: apic 2 int 16 sdhc0: SDHC 3.0, 200 MHz base clock sdmmc0 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma pcib0 at pci0 dev 31 function 0 vendor "Intel", unknown product 0x19dc rev 0x11 vendor "Intel", unknown product 0x19de (class memory subclass miscellaneous, rev 0x11) at pci0 dev 31 function 2 not configured vendor "Intel", unknown product 0x19df (class serial bus subclass SMBus, rev 0x11) at pci0 dev 31 function 4 not configured vendor "Intel", unknown product 0x19e0 (class serial bus unknown subclass 0x80, rev 0x11) at pci0 dev 31 function 5 not configured isa0 at pcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 vmm0 at mainbus0: VMX/EPT efifb0 at mainbus0: 1280x1024, 32bpp wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) sdmmc0: can't enable card uhidev0 at uhub0 port 3 configuration 1 interface 0 "USB USB Keyboard" rev 1.10/1.10 addr 2 uhidev0: iclass 3/1 ukbd0 at uhidev0: 8 variable keys, 6 key codes wskbd0 at ukbd0: console keyboard, using wsdisplay0 uhidev1 at uhub0 port 3 configuration 1 interface 1 "USB USB Keyboard" rev 1.10/1.10 addr 2 uhidev1: iclass 3/1, 3 report ids uhid0 at uhidev1 reportid 1: input=2, output=0, feature=0 uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0 ums0 at uhidev1 reportid 3: 3 buttons, Z dir wsmouse0 at ums0 mux 0 uhub1 at uhub0 port 4 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" rev 2.00/88.32 addr 3 umass0 at uhub0 port 6 configuration 1 interface 0 "Innodisk USB Drive 3ME" rev 3.00/8.05 addr 4 umass0: using SCSI over Bulk-Only scsibus3 at umass0: 2 targets, initiator 0 sd0 at scsibus3 targ 1 lun 0: <Innodisk, USB Drive 3ME, 0805> SCSI4 0/direct removable serial.196d0201A67861015010 sd0: 7720MB, 512 bytes/sector, 15810560 sectors vscsi0 at root scsibus4 at vscsi0: 256 targets softraid0 at root scsibus5 at softraid0: 256 targets root on sd0a (bbcc0e693f03134b.a) swap on sd0b dump on sd0b -- -- --------------------------------------------------------------------------------------------------------------------- Knowing is not enough; we must apply. Willing is not enough; we must do