From owner-freebsd-acpi@FreeBSD.ORG Sun Sep 6 20:36:29 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3314106568D; Sun, 6 Sep 2009 20:36:29 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E7AA58FC12; Sun, 6 Sep 2009 20:36:28 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA20891; Sun, 06 Sep 2009 23:36:27 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MkOTL-000IeQ-0V; Sun, 06 Sep 2009 23:36:27 +0300 Message-ID: <4AA41D4A.4080805@freebsd.org> Date: Sun, 06 Sep 2009 23:36:26 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: freebsd-acpi@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2009 20:36:30 -0000 Please review the included patch that adds support from SMBus controller found in AMD SB600/700/710/750 south-bridges (not sure about SB800). As I understand, this controller works only in polling mode, so support for this mode was enabled in the code. There are two places that I was not sure about, so I marked them with XXX. The static variable intsmb_cfg_irq9 would be problematic if there are multiple SMBus controllers in a system. Also, PCI_INTR_SMB_IRQ_AMD is probably not the best name. Maybe something like PCI_INTR_SMB_IRQ_OTHER or just PCI_INTR_SMB_IRQ would be better? Almost forgot: bogus check for PIIX4_SMBHSTSTAT_INTR bit in polling mode was removed. diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 63eb4c4..894ed02 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -53,6 +53,7 @@ struct intsmb_softc { void *irq_hand; device_t smbus; int isbusy; + int poll; struct mtx lock; }; @@ -83,6 +84,9 @@ static int intsmb_stop_poll(struct intsmb_softc *sc); static int intsmb_free(struct intsmb_softc *sc); static void intsmb_rawintr(void *arg); +/* XXX Is there a better way than a static variable? */ +static int intsmb_cfg_irq9 = 0; + static int intsmb_probe(device_t dev) { @@ -95,6 +99,15 @@ intsmb_probe(device_t dev) case 0x02001166: /* ServerWorks OSB4 */ #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); +#ifndef NO_CHANGE_PCICONF + /* Changing configuration is not allowed. */ + intsmb_cfg_irq9 = 1; +#endif + break; + case 0x43851002: + device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + /* XXX Maybe force polling right here? */ + intsmb_cfg_irq9 = 0; break; default: return (ENXIO); @@ -108,6 +121,7 @@ intsmb_attach(device_t dev) { struct intsmb_softc *sc = device_get_softc(dev); int error, rid, value; + int intr; char *str; sc->dev = dev; @@ -123,27 +137,36 @@ intsmb_attach(device_t dev) goto fail; } -#ifndef NO_CHANGE_PCICONF - pci_write_config(dev, PCIR_INTLINE, 0x9, 1); - pci_write_config(dev, PCI_HST_CFG_SMB, - PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); -#endif + if (intsmb_cfg_irq9) { + pci_write_config(dev, PCIR_INTLINE, 0x9, 1); + pci_write_config(dev, PCI_HST_CFG_SMB, + PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); + } value = pci_read_config(dev, PCI_HST_CFG_SMB, 1); - switch (value & 0xe) { + sc->poll = value & PCI_INTR_SMB_ENABLE; + intr = value & PCI_INTR_SMB_MASK; + switch (intr) { case PCI_INTR_SMB_SMI: str = "SMI"; break; case PCI_INTR_SMB_IRQ9: str = "IRQ 9"; break; + case PCI_INTR_SMB_IRQ_AMD: + str = "IRQ"; + break; default: str = "BOGUS"; } + device_printf(dev, "intr %s %s ", str, - (value & 1) ? "enabled" : "disabled"); + sc->poll == 0 ? "enabled" : "disabled"); printf("revision %d\n", pci_read_config(dev, PCI_REVID_SMB, 1)); - if ((value & 0xe) != PCI_INTR_SMB_IRQ9) { + if (sc->poll) + goto no_intr; + + if (intr != PCI_INTR_SMB_IRQ9 && intr != PCI_INTR_SMB_IRQ_AMD) { device_printf(dev, "Unsupported interrupt mode\n"); error = ENXIO; goto fail; @@ -151,7 +174,9 @@ intsmb_attach(device_t dev) /* Force IRQ 9. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + if (intsmb_cfg_irq9) + bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -167,6 +192,7 @@ intsmb_attach(device_t dev) goto fail; } +no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { @@ -361,7 +387,7 @@ intsmb_start(struct intsmb_softc *sc, unsigned char cmd, int nointr) tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!sc->poll && !cold && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -411,8 +437,6 @@ intsmb_stop_poll(struct intsmb_softc *sc) if (!(status & PIIX4_SMBHSTSTAT_BUSY)) { sc->isbusy = 0; error = intsmb_error(sc->dev, status); - if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?\n"); return (error); } } @@ -434,7 +458,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (sc->poll || cold) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc)); diff --git a/sys/pci/intpmreg.h b/sys/pci/intpmreg.h index 236c737..4a3e599 100644 --- a/sys/pci/intpmreg.h +++ b/sys/pci/intpmreg.h @@ -35,7 +35,9 @@ #define PCI_BASE_ADDR_SMB 0x90 /* IO BAR. */ #define PCI_BASE_ADDR_PM 0x40 #define PCI_HST_CFG_SMB 0xd2 /* Host Configuration */ +#define PCI_INTR_SMB_MASK 0xe #define PCI_INTR_SMB_SMI 0 +#define PCI_INTR_SMB_IRQ_AMD 2 #define PCI_INTR_SMB_IRQ9 8 #define PCI_INTR_SMB_ENABLE 1 #define PCI_SLV_CMD_SMB 0xd3 /*SLAVE COMMAND*/ -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Mon Sep 7 11:06:53 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A38F1065679 for ; Mon, 7 Sep 2009 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 083208FC20 for ; Mon, 7 Sep 2009 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n87B6q4R010112 for ; Mon, 7 Sep 2009 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n87B6q5g010108 for freebsd-acpi@FreeBSD.org; Mon, 7 Sep 2009 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Sep 2009 11:06:52 GMT Message-Id: <200909071106.n87B6q5g010108@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o amd64/138210 acpi [acpi] acer aspire 5536 ACPI problems (S3, brightness, o bin/137053 acpi [hang] FreeBSD 8.0 BETA2Compaq Mini 700 locks on boot o kern/137042 acpi [acpi] hp laptop's lcd not wakes up after suspend to r o kern/136808 acpi [acpi] panic when switching to s3 o i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not o kern/130683 acpi [ACPI] shutdown hangs after syncing disks - ACPI race? o i386/129953 acpi [acpi] ACPI timeout (CDROM) with Shuttle X27D o kern/129618 acpi [acpi] Problem with ACPI on HP Pavilion DV2899 laptop o kern/129563 acpi [acpi] sleep broken on IBM/Lenovo T61 in amd64 mode f kern/128639 acpi [patch] [acpi_asus] acpi for ASUS A6F,A3E,A3F,A3N not f kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o kern/127581 acpi [patch] [acpi_sony] Add support for more Sony features o kern/124744 acpi [acpi] [patch] incorrect _BST result validation for To o kern/124412 acpi [acpi] power off error on Toshiba M40 laptop o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin f kern/121454 acpi [pst] Promise SuperTrak SX6000 does not load during bo o amd64/121439 acpi [boot] Installation of FreeBSD 7.0 fails: ACPI problem o kern/121102 acpi [acpi_fujitsu] [patch] update acpi_fujitsu for the P80 o kern/120515 acpi [acpi] [patch] acpi_alloc_wakeup_handler: can't alloc o kern/119356 acpi [acpi]: i386 ACPI wakeup not work due resource exhaust o kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H o kern/118973 acpi [acpi]: Kernel panic with acpi boot o kern/117605 acpi [acpi] [request] add debug.cpufreq.highest o kern/116939 acpi [acpi] PCI-to-PCI misconfigured for bus three and can o i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a o kern/114165 acpi [acpi] Dell C810 - ACPI problem s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/108954 acpi [acpi] 'sleep(1)' sleeps >1 seconds when speedstep (Cx o kern/108695 acpi [acpi]: Fatal trap 9: general protection fault when in o kern/108488 acpi [acpi] ACPI-1304: *** Error: Method execution failed o kern/108017 acpi [acpi]: Acer Aspire 5600 o kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/104625 acpi ACPI on ASUS A8N-32 SLI/ASUS P4P800 does not show ther o kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o kern/97383 acpi Volume buttons on IBM Thinkpad crash system with ACPI s i386/91748 acpi acpi problem on Acer TravelMare 4652LMi (nvidia panic, s kern/91038 acpi [panic] [ata] [acpi] 6.0-RELEASE on Fujitsu Siemens Am s kern/90243 acpi Laptop fan doesn't turn off (ACPI enabled) (Packard Be o i386/83018 acpi [install] Installer will not boot on Asus P4S8X BIOS 1 f kern/81000 acpi [apic] Via 8235 sound card worked great with FreeBSD 5 o i386/79081 acpi ACPI suspend/resume not working on HP nx6110 o kern/76950 acpi ACPI wrongly blacklisted on Micron ClientPro 766Xi sys s kern/73823 acpi [request] acpi / power-on by timer support o i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Armada 1750 o i386/69750 acpi Boot without ACPI failed on ASUS L5 o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 o i386/54756 acpi ACPI suspend/resume problem on CF-W2 laptop 53 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Sep 7 15:02:34 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B4531065695 for ; Mon, 7 Sep 2009 15:02:34 +0000 (UTC) (envelope-from ro.kpa92@gmail.com) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6A98FC0C for ; Mon, 7 Sep 2009 15:02:33 +0000 (UTC) Received: by yxe2 with SMTP id 2so5147162yxe.3 for ; Mon, 07 Sep 2009 08:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=/Wajz18IXQSIY8pBYaJl/I60v2hFeoenJWbRY03P09k=; b=BVKDUQfRVq0t92DYHVmv/QZN3w7l90rRcsf/ICeVIGzrB+g0e6P7iRl3f9VDiM7S2C H+wsaeELAw/jcu6FERU/p/t+NO2VKim4HEEPBPJzKCftzIlpCF50YtfZEMNyvcesYpLo bB7eSqtykKrswFRyI9v6izfbflrPk1OCZMA+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=b6vogOr3JhNnWYrcHk0Hf31LWrsFh143widJHqKE+/Vb85HPONGTuOIaCL6d6FdQKD 9v4bFxqStuPyXbxY6K+FRu5TvEVdbRx6gTPfBMI/xx7Y18t4wtYwkOqUZJ7JgN8oO0ZB XebxYCwqgGVJueBLzBKFC5Q8Kj0BD3xsYB8zM= MIME-Version: 1.0 Received: by 10.150.113.3 with SMTP id l3mr24171402ybc.90.1252334123931; Mon, 07 Sep 2009 07:35:23 -0700 (PDT) Date: Mon, 7 Sep 2009 11:35:23 -0300 Message-ID: <4ea651b50909070735t3c25c397p78d7debf86f7bb0e@mail.gmail.com> From: Romina Batistini To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ACPI Unable shutdown (newbee) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 15:02:34 -0000 Hi! I am Romina, from Argentina. I am New in FreeBSD and i wantto lear to use this system. I always use Windows (from 95 to W7 the last beta) i like windows but i want a powerfull operative system (unix) and FreeBSD i like so much. After my presentation, and I hope it's not beyond boring, I go to tell my problem. I was in the FreeBSD forum and an admin told me to score this mailing list. If you want to read a bit this is the link of my question () But step details here anyway. I successfully installed FreeBSD struggle a bit but managed to install XFCE4 as desktop (such a succes for me that never went out of windows) Although a tube problem from the start. In the installation of FreeBSD never throw an error and everything was fine. But in the first boat (even without the graphical environment) every 5 sec I get an error message which is: ACPI ERROR (DSWSTATE-0185): Result stack is empy! State 0xc69b6920 [20070320] ACPI EXCEPTION (DSUTILS-0766): EA_AML_NO_RETURN_VALUE, Missing or null operand [20070320] ACPI EXCEPTION (DSUTILS-0894): EA_AML_NO_RETURN_VALUE, While creating arg o [20070320] ACPI ERROR (psparce-0626): Method parse/execution failed [\_TZ_.THRM._TMP] (node 0xc69b6920), AR_AML_NO_RETURN_VALUE ACPI and seen as regards the "Power Management" (if I define it) FreeBSD operating system. Other thing is that when I'm in graphical environment (xfce4) will not let me turn off the machine and to receive the following message: UNABLE TO PRERFORM SHUTDOWN. org.freedesktop.hal.power-management.reboot no <-- (action result) I have the bios updated to the latest date. They need some information about my hardware? Can you help please? Although I am new in this great day nomas FreeBSD world excites me very much and want to learn PS: by the way: forgive my bad English, not very good jeje: D From owner-freebsd-acpi@FreeBSD.ORG Mon Sep 7 15:25:52 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0693E106566B for ; Mon, 7 Sep 2009 15:25:52 +0000 (UTC) (envelope-from niktychina@gmail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id 78CA28FC17 for ; Mon, 7 Sep 2009 15:25:50 +0000 (UTC) Received: by bwz2 with SMTP id 2so420300bwz.43 for ; Mon, 07 Sep 2009 08:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=FeVRcRS/kk3dWD5wsCkx4l+EusXVc3V9dNdXwxTWSHM=; b=EL+ZT8M2hfb/tVqfEJGIexRsg27shPCle/7K5875UaIPQpjvvoy30NsHd/Y7Ldk9GG fSno6Jb9e//RpnmU2jcaEYg6AAaMegmnqTIMC54zafhMoZMzw5bHhks/s7NzEY19yq3C 2fbilq3oFoV5bg61JuLc7UQ/j2LHd6GuynAoM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=sp8xJxDyrgGvnytUlbSGgfHP0BV/MM88cPkb26S9nTJA/RNvZqG2XEiocilnTwsUCT 1J2oZA846NsXXcwCMLaOwCi7lp2fh6j0trtXE5upxCIPWyY7jM6dI3qkwnC0A0HvmzXQ 0arFu1R8vUH8BRrrTefdwddzkyFTPF/R6t7Jw= MIME-Version: 1.0 Received: by 10.204.7.198 with SMTP id e6mr12247557bke.148.1252337149538; Mon, 07 Sep 2009 08:25:49 -0700 (PDT) In-Reply-To: <4ea651b50909070735t3c25c397p78d7debf86f7bb0e@mail.gmail.com> References: <4ea651b50909070735t3c25c397p78d7debf86f7bb0e@mail.gmail.com> Date: Mon, 7 Sep 2009 19:25:49 +0400 Message-ID: From: Nikolay Tychina To: Romina Batistini Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI Unable shutdown (newbee) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Sep 2009 15:25:52 -0000 Hi, Does "shutdown -p now" as root work? Read http://www.freebsd.org/doc/en/books/handbook/acpi-debug.html maybe you could fix errors by editing your DSDT. FreeBSD used to spam in my console, so i rurned off parts of ACPI in loader.conf. These errors are harmless :) Anyway, your error seem to be caused by something hal related. Try searching in google your " org.freedesktop.hal.power-management.reboot no <-- (action result)" Cheers, Nik 2009/9/7 Romina Batistini > Hi! I am Romina, from Argentina. > I am New in FreeBSD and i wantto lear to use this system. > I always use Windows (from 95 to W7 the last beta) i like windows but i > want > a powerfull operative system (unix) and FreeBSD i like so much. > > After my presentation, and I hope it's not beyond boring, I go to tell my > problem. > I was in the FreeBSD forum and an admin told me to score this mailing list. > If you want to read a bit this is the link of my question () > But step details here anyway. > I successfully installed FreeBSD struggle a bit but managed to install > XFCE4 > as desktop (such a succes for me that never went out of windows) > Although a tube problem from the start. In the installation of FreeBSD > never > throw an error and everything was fine. But in the first boat (even without > the graphical environment) every 5 sec I get an error message which is: > > ACPI ERROR (DSWSTATE-0185): Result stack is empy! State 0xc69b6920 > [20070320] > ACPI EXCEPTION (DSUTILS-0766): EA_AML_NO_RETURN_VALUE, Missing or null > operand [20070320] > ACPI EXCEPTION (DSUTILS-0894): EA_AML_NO_RETURN_VALUE, While creating arg o > [20070320] > ACPI ERROR (psparce-0626): Method parse/execution failed [\_TZ_.THRM._TMP] > (node 0xc69b6920), AR_AML_NO_RETURN_VALUE > > ACPI and seen as regards the "Power Management" (if I define it) FreeBSD > operating system. > Other thing is that when I'm in graphical environment (xfce4) will not let > me turn off the machine and to receive the following message: > > UNABLE TO PRERFORM SHUTDOWN. > org.freedesktop.hal.power-management.reboot no <-- (action result) > > > I have the bios updated to the latest date. > They need some information about my hardware? > Can you help please? Although I am new in this great day nomas FreeBSD > world > excites me very much and want to learn > > PS: by the way: forgive my bad English, not very good jeje: D > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" > From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 00:21:42 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA6E1065676 for ; Tue, 8 Sep 2009 00:21:42 +0000 (UTC) (envelope-from ro.kpa92@gmail.com) Received: from mail-yw0-f180.google.com (mail-yw0-f180.google.com [209.85.211.180]) by mx1.freebsd.org (Postfix) with ESMTP id 77D318FC0C for ; Tue, 8 Sep 2009 00:21:42 +0000 (UTC) Received: by ywh10 with SMTP id 10so6861403ywh.7 for ; Mon, 07 Sep 2009 17:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=yiiD0E34k0mpcCJ2U+HEeiPhv81s/Jfh/Y8gQtKI8tM=; b=GgzchfspWEKt0JOJIRbqAYbX0OFDkLBaQFIejKkkTuh6doZi6OdiRjfTVRqokmR46t vyd5PJ0VHn/sh8EM+APjk0IMU1YPnAICEX3qzsWDB81cdE6lkQgrXFEoFsHpHjPL2y9n 3FGvEddTGk+eAtjVZAJsvCkl4wfH07QWJ2jEM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PZK7QecYiw0yX61UJFQ7wTigZ8eWVEZShLVbaciGfepesKbA9mjFAaXagobiXc38E1 PfqcE23h3s6dxMCDQ48pjNohEXtwFwGV/5/YfAwzI8/lgyHGldD1uvO2HpXQfDkahPl/ B2teV5/HA7Uwbx78gRA4h4Quw8HmrW2tCv8WQ= MIME-Version: 1.0 Received: by 10.150.113.3 with SMTP id l3mr25013835ybc.90.1252369301293; Mon, 07 Sep 2009 17:21:41 -0700 (PDT) Date: Mon, 7 Sep 2009 21:21:38 -0300 Message-ID: <4ea651b50909071721j2eb99d0ct1298cb82e128899d@mail.gmail.com> From: Romina Batistini To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: ACPI Unable shutdown (newbee) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 00:21:42 -0000 Hello Segio (portuges para baixo para voc=EA) and Nik. First of all thanks = for replying. (Sorry about the delay, newly released from school) I hope that my Portuguese is good, I'm not good at writing but regularly to discuss jeje Look, I:have Core2Duo E8400 (3Ghz) 4Gb DDR2 (soon 8gb) Abit Mother ix38quad GT (I love, it's great!) Westdigital Sata II 350GB (primary) 1Tb Sata II Westdigital (segundario. This if or if I prefer this format because I have things NFTS very important, this almost full and is where I keep all my stuff (music, photos, videos, documents) I have a ati x1550 I installed FreeBSD 7.2 i386 for now. Both to learn how to configure everything. I have it in dual boot with windows 7 beta. The idea is to leave only FreeBSD and if I need some WineHD usare windows o= r a virtual machine. He commented that s the first time I leave the operating system of Windows family (Starting with Windows 95 to date) But I want something more professional look and Linux for anything I Convens the nucleus. I like Unix power and stability can offer me. As my pc is not really to play is to work and perhaps listening to music or watch some movies. (more later if you encourage me explaining how I make my FreeBSD from XFCE4 graphical environment can read the NTFS disk 2 times I'd be grateful) The issue that I can not put "shutdown-p now" as Nik says it's because Entrocomo normal user, I noticed that I take my root account to logearme .. nose will know why, but "re.carga" the graphics again and again the login system. I leave this copy also in English in case someone (I think many) do not kno= w Portuguese. PS: I did not understand was that "=3D=3D=3D=3D> com or command uname-a ele= te diz" --------------------------------- Ol=E1 Segi e Nik. Antes de mais nada obrigado por responder. (Desculpe a demora, rec=E9m-lan=E7ado da escola) Espero que o meu Portugu=EAs =E9 bom, eu n=E3o sou bom em escrever, mas regularmente para discutir jeje Olha, eu: Core2Duo E8400 (3GHz) 4Gb DDR2 (logo 8GB) M=E3e Abit ix38quad GT (I love, it's great!) Westdigital Sata II 350GB (prim=E1ria) 1TB SATA II Westdigital (segundario. Isto se ou se eu prefiro esse formato porque tenho coisas muito importantes NFTS, esta quase cheio e =E9 onde eu mantenho todas as minhas coisas (m=FAsica, fotos, v=EDdeos, documentos) Tenho uma ATI X1550 Eu instalei o FreeBSD 7.2 i386 para agora. Tanto para aprender como configurar tudo isso. Tenho-o em dual boot com o Windows 7 beta. A id=E9ia =E9 deixar apenas FreeBSD e se eu precisar de algumas janelas Win= eHD usare ou uma m=E1quina virtual. Ele comentou que =E9 a primeira vez que eu deixar o sistema operacional da fam=EDlia Windows (come=E7ando com Windows 95 at=E9 hoje) Mas eu quero algo= mais profissional olhar e Linux para qualquer coisa que eu Ledecq do n=FAcleo. E= u gosto Unix poder e estabilidade pode me oferecer. Como meu pc n=E3o =E9 realmente para jogar =E9 para trabalhar e, talvez, ou= vir m=FAsica ou assistir alguns filmes. (mais tarde, se voc=EA me incentivar explicando como eu fa=E7o o meu FreeBS= D XFCE4 do ambiente gr=E1fico pode ler o disco NTFS 2 vezes eu ficaria grato) A quest=E3o que eu n=E3o posso colocar "shutdown-p now" como Nik diz que = =E9 porque Entrocomo usu=E1rio normal, notei que eu levo a minha conta de root para logearme .. nariz vai saber o porqu=EA, mas re.carga "os gr=E1ficos um= a e outra vez o sistema de login. Deixo esta c=F3pia tamb=E9m em Ingl=EAs no caso de algu=E9m (acho que muito= s) n=E3o sabem Portugu=EAs. PS: eu n=E3o entendi foi que "=3D=3D=3D=3D> com ou comando uname-a ele diz = "te From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 01:12:29 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C8041065693 for ; Tue, 8 Sep 2009 01:12:29 +0000 (UTC) (envelope-from gnemmi@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id A3E428FC62 for ; Tue, 8 Sep 2009 01:12:28 +0000 (UTC) Received: by fxm6 with SMTP id 6so2204332fxm.43 for ; Mon, 07 Sep 2009 18:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=G3uKSSC51bt9GvBmSi7GkfuIR7W+cPBSXNgpgmHgtGQ=; b=X92BH1UD7AhGhvtP7efSA5fnAeK063BK6kYMGlWIFwFIRGg4ghEoR3+bOqNF/TBLew y8ZoWZ0OkWxWR2CwsAp6UemCY/3vEpjAbrT8eDd22LwHqmqFeZvyAMEkaWfEb1ce9Rij MPXLD9Ubfjd4Z7HYSB11RClnt1hXC6f5v5E6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=spSfMh8xA/thJ1ZFZxfSEixSKj4WLUA3Ad+NEMiUjtC16uRGLW0R5qNRACf0OiB3b0 tWaEjwMtHnlqmsIYeHK4K5T7OrDGK2ds7gcj5UJXF6Q1Sxq1toiQDVOYjejky+iDISff EH13DIMfYCONhRxLLbrcyhXuQw/1GzsyG4zt4= MIME-Version: 1.0 Received: by 10.239.168.220 with SMTP id l28mr1386023hbe.117.1252370536075; Mon, 07 Sep 2009 17:42:16 -0700 (PDT) In-Reply-To: <4ea651b50909071721j2eb99d0ct1298cb82e128899d@mail.gmail.com> References: <4ea651b50909071721j2eb99d0ct1298cb82e128899d@mail.gmail.com> Date: Mon, 7 Sep 2009 21:42:16 -0300 Message-ID: <19e9a5dc0909071742n7d9992d8w7799dd824a3a6071@mail.gmail.com> From: Gonzalo Nemmi To: Romina Batistini Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-acpi@freebsd.org Subject: Re: ACPI Unable shutdown (newbee) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 01:12:29 -0000 On Mon, Sep 7, 2009 at 9:21 PM, Romina Batistini wrote= : > Hello Segio (portuges para baixo para voc=EA) and Nik. First of all thank= s > for > replying. > (Sorry about the delay, newly released from school) > I hope that my Portuguese is good, I'm not good at writing but regularly = to > discuss jeje > Look, I:have > > Core2Duo E8400 (3Ghz) > 4Gb DDR2 (soon 8gb) > Abit Mother ix38quad GT (I love, it's great!) > Westdigital Sata II 350GB (primary) > 1Tb Sata II Westdigital (segundario. This if or if I prefer this format > because I have things NFTS very important, this almost full and is where = I > keep all my stuff (music, photos, videos, documents) > I have a ati x1550 > I installed FreeBSD 7.2 i386 for now. Both to learn how to configure > everything. I have it in dual boot with windows 7 beta. > > The idea is to leave only FreeBSD and if I need some WineHD usare windows > or > a virtual machine. > He commented that s the first time I leave the operating system of Window= s > family (Starting with Windows 95 to date) But I want something more > professional look and Linux for anything I Convens the nucleus. I like Un= ix > power and stability can offer me. > > > As my pc is not really to play is to work and perhaps listening to music = or > watch some movies. > (more later if you encourage me explaining how I make my FreeBSD from XFC= E4 > graphical environment can read the NTFS disk 2 times I'd be grateful) > > The issue that I can not put "shutdown-p now" as Nik says it's because > Entrocomo normal user, I noticed that I take my root account to logearme = .. > nose will know why, but "re.carga" the graphics again and again the login > system. > > I leave this copy also in English in case someone (I think many) do not > know > Portuguese. > > PS: I did not understand was that "=3D=3D=3D=3D> com or command uname-a e= le te diz" > > > --------------------------------- > > > > Ol=E1 Segi e Nik. Antes de mais nada obrigado por responder. > (Desculpe a demora, rec=E9m-lan=E7ado da escola) > Espero que o meu Portugu=EAs =E9 bom, eu n=E3o sou bom em escrever, mas > regularmente para discutir jeje > Olha, eu: > > Core2Duo E8400 (3GHz) > 4Gb DDR2 (logo 8GB) > M=E3e Abit ix38quad GT (I love, it's great!) > Westdigital Sata II 350GB (prim=E1ria) > 1TB SATA II Westdigital (segundario. Isto se ou se eu prefiro esse format= o > porque tenho coisas muito importantes NFTS, esta quase cheio e =E9 onde e= u > mantenho todas as minhas coisas (m=FAsica, fotos, v=EDdeos, documentos) > Tenho uma ATI X1550 > Eu instalei o FreeBSD 7.2 i386 para agora. Tanto para aprender como > configurar tudo isso. Tenho-o em dual boot com o Windows 7 beta. > A id=E9ia =E9 deixar apenas FreeBSD e se eu precisar de algumas janelas W= ineHD > usare ou uma m=E1quina virtual. > Ele comentou que =E9 a primeira vez que eu deixar o sistema operacional d= a > fam=EDlia Windows (come=E7ando com Windows 95 at=E9 hoje) Mas eu quero al= go mais > profissional olhar e Linux para qualquer coisa que eu Ledecq do n=FAcleo.= Eu > gosto Unix poder e estabilidade pode me oferecer. > > > Como meu pc n=E3o =E9 realmente para jogar =E9 para trabalhar e, talvez, = ouvir > m=FAsica ou assistir alguns filmes. > (mais tarde, se voc=EA me incentivar explicando como eu fa=E7o o meu Free= BSD > XFCE4 do ambiente gr=E1fico pode ler o disco NTFS 2 vezes eu ficaria grat= o) > > A quest=E3o que eu n=E3o posso colocar "shutdown-p now" como Nik diz que = =E9 > porque Entrocomo usu=E1rio normal, notei que eu levo a minha conta de roo= t > para logearme .. nariz vai saber o porqu=EA, mas re.carga "os gr=E1ficos = uma e > outra vez o sistema de login. > > Deixo esta c=F3pia tamb=E9m em Ingl=EAs no caso de algu=E9m (acho que mui= tos) n=E3o > sabem Portugu=EAs. > > PS: eu n=E3o entendi foi que "=3D=3D=3D=3D> com ou comando uname-a ele di= z "te > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" > Hi there Romina: Just in case you don't know, you can open up a thread on penguinpower.com.ar and I'll be there to help you (there's a FreeBSD topic in there and I, along with ezeaguerre, are the admins.). It would be nice i= f you could join us as we (eze and me) have been working on it for more than = a year now trying to create a place for FreeBSD users in Argentina to share experiences, tips, get toghether and so on, and you know, the more the merrier =3DD. Just in case, I triple boot in both my desktop (WinXP, Mandriva, FreeBSD-7.0-RELEASE) and my notebook (Dell 1318, Windows Vista, Mandriva 2009 Spring, FreeBSD 8.0-BETA3 ... and BETA-4 in a few hours ... in the hop= e to see the bge problems I filed as PR's fixed so I can get it to resume properly =3DD) Hope to see you over there soon ;) From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 18:00:16 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6369C10656A4; Tue, 8 Sep 2009 18:00:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 36C5C8FC1B; Tue, 8 Sep 2009 18:00:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DDA0F46B49; Tue, 8 Sep 2009 14:00:15 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2FB1B8A021; Tue, 8 Sep 2009 14:00:15 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Tue, 8 Sep 2009 13:35:50 -0400 User-Agent: KMail/1.9.7 References: <4AA41D4A.4080805@freebsd.org> In-Reply-To: <4AA41D4A.4080805@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909081335.50980.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 08 Sep 2009 14:00:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 18:00:16 -0000 On Sunday 06 September 2009 4:36:26 pm Andriy Gapon wrote: > > Please review the included patch that adds support from SMBus controller found > in AMD SB600/700/710/750 south-bridges (not sure about SB800). > As I understand, this controller works only in polling mode, so support for this > mode was enabled in the code. > > There are two places that I was not sure about, so I marked them with XXX. > The static variable intsmb_cfg_irq9 would be problematic if there are multiple > SMBus controllers in a system. I would move this into the softc and set it in the attach() routine by duplicating that bit of the switch() statement in attach(). > Also, PCI_INTR_SMB_IRQ_AMD is probably not the best name. Maybe something like > PCI_INTR_SMB_IRQ_OTHER or just PCI_INTR_SMB_IRQ would be better? I would maybe just change the driver to print the value in hex instead of bogus and not add a #define for '2'. The PIIX4 datasheet says '2' is a reserved value for that field FWIW. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 20:09:37 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83F3106568F; Tue, 8 Sep 2009 20:09:37 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 03D4D8FC12; Tue, 8 Sep 2009 20:09:36 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA07503; Tue, 08 Sep 2009 23:09:34 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1] helo=edge.pp.kiev.ua) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Ml70Q-0001Cl-HD; Tue, 08 Sep 2009 23:09:34 +0300 Message-ID: <4AA6B9FC.1070205@freebsd.org> Date: Tue, 08 Sep 2009 23:09:32 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090723) MIME-Version: 1.0 To: John Baldwin References: <4AA41D4A.4080805@freebsd.org> <200909081335.50980.jhb@freebsd.org> In-Reply-To: <200909081335.50980.jhb@freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 20:09:38 -0000 on 08/09/2009 20:35 John Baldwin said the following: > On Sunday 06 September 2009 4:36:26 pm Andriy Gapon wrote: >> Please review the included patch that adds support from SMBus controller found >> in AMD SB600/700/710/750 south-bridges (not sure about SB800). >> As I understand, this controller works only in polling mode, so support for this >> mode was enabled in the code. >> >> There are two places that I was not sure about, so I marked them with XXX. >> The static variable intsmb_cfg_irq9 would be problematic if there are multiple >> SMBus controllers in a system. > > I would move this into the softc and set it in the attach() routine by > duplicating that bit of the switch() statement in attach(). OK, thank you for the idea. >> Also, PCI_INTR_SMB_IRQ_AMD is probably not the best name. Maybe something like >> PCI_INTR_SMB_IRQ_OTHER or just PCI_INTR_SMB_IRQ would be better? > > I would maybe just change the driver to print the value in hex instead of > bogus and not add a #define for '2'. The PIIX4 datasheet says '2' is a > reserved value for that field FWIW. But, OTOH, SB700 datasheet says '2' is a regular interrupt. Although it is quite unclear from that datasheet what that interrupt might be and if interrupt-driven configuration is possible at all. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 21:09:33 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5E0106566B; Tue, 8 Sep 2009 21:09:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A0E2B8FC20; Tue, 8 Sep 2009 21:09:33 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0B03D46B0C; Tue, 8 Sep 2009 17:09:33 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 0CED28A01F; Tue, 8 Sep 2009 17:09:32 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Tue, 8 Sep 2009 16:55:55 -0400 User-Agent: KMail/1.9.7 References: <4AA41D4A.4080805@freebsd.org> <200909081335.50980.jhb@freebsd.org> <4AA6B9FC.1070205@freebsd.org> In-Reply-To: <4AA6B9FC.1070205@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909081655.56006.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 08 Sep 2009 17:09:32 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 21:09:33 -0000 On Tuesday 08 September 2009 4:09:32 pm Andriy Gapon wrote: > on 08/09/2009 20:35 John Baldwin said the following: > > On Sunday 06 September 2009 4:36:26 pm Andriy Gapon wrote: > >> Please review the included patch that adds support from SMBus controller found > >> in AMD SB600/700/710/750 south-bridges (not sure about SB800). > >> As I understand, this controller works only in polling mode, so support for this > >> mode was enabled in the code. > >> > >> There are two places that I was not sure about, so I marked them with XXX. > >> The static variable intsmb_cfg_irq9 would be problematic if there are multiple > >> SMBus controllers in a system. > > > > I would move this into the softc and set it in the attach() routine by > > duplicating that bit of the switch() statement in attach(). > > OK, thank you for the idea. > > >> Also, PCI_INTR_SMB_IRQ_AMD is probably not the best name. Maybe something like > >> PCI_INTR_SMB_IRQ_OTHER or just PCI_INTR_SMB_IRQ would be better? > > > > I would maybe just change the driver to print the value in hex instead of > > bogus and not add a #define for '2'. The PIIX4 datasheet says '2' is a > > reserved value for that field FWIW. > > But, OTOH, SB700 datasheet says '2' is a regular interrupt. > Although it is quite unclear from that datasheet what that interrupt might be > and if interrupt-driven configuration is possible at all. Does it have a valid intpin config register? Maybe '2' means it has a legacy INTx PCI interrupt. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Wed Sep 9 10:21:23 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C562106566C; Wed, 9 Sep 2009 10:21:23 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5019B8FC0A; Wed, 9 Sep 2009 10:21:21 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA20692; Wed, 09 Sep 2009 13:21:20 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4AA7819F.3020800@freebsd.org> Date: Wed, 09 Sep 2009 13:21:19 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090724) MIME-Version: 1.0 To: John Baldwin References: <4AA41D4A.4080805@freebsd.org> <200909081335.50980.jhb@freebsd.org> <4AA6B9FC.1070205@freebsd.org> <200909081655.56006.jhb@freebsd.org> In-Reply-To: <200909081655.56006.jhb@freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-acpi@freebsd.org Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2009 10:21:23 -0000 on 08/09/2009 23:55 John Baldwin said the following: > > Does it have a valid intpin config register? Maybe '2' means it has a legacy > INTx PCI interrupt. Just for future references, conveniently organized links to the specs can be found here: http://www.coreboot.org/Datasheets#AMD_SB700.2FSB710.2FSB750 Description of PCI interrupt router implies that there is a dedicated SMBus interrupt line (internal to the chip, I guess). >From BIOS Developer's Guide: > 4.1 PCI IRQ Routing Registers > The SB700 uses one pair of I/O ports to do the PCI IRQ routing. The ports are at C00h/C01h. > Address Register Name Description > C00h PCI_Intr_Index PCI IRQ Routing Index > 0 – INTA# > 1 – INTB# > 2 – INTC# > 3 – INTD# > 4 – SCI > 5 – SMBus interrupt > 9 – INTE# > 0Ah – INTF# > 0Bh – INTG# > 0Ch – INTH# > C01h PCI_Intr_Data 0 ~ 15 : IRQ0 to IRQ15 > IRQ0, 2, 8, 13 are reserved Register Reference Guide in addition says: > Pci_Intr_Data register > Note: If IOXAPIC is enabled, software must make sure interrupts are not re-routed; > ie, they should all be set to 0. > When IOXAPIC is enabled, [...] SMBus interrupt is routed to INTIN[20], [...] I believe that nowadays IOXAPIC would be typically enabled. I tried to hardwire intpm to use IRQ20 on SB700, but no SMBus interrupt was ever seen. And, just in case, here is what the spec says about normal PCI interrupt configuration registers (of the PCI device that hosts SMBus controller): > Interrupt Line - R - 8 bits - [PCI_Reg: 3Ch] > Field Name Bits Default Description > Interrupt Line 7:0 00h This module does not generate interrupt. This register is > hardcoded to 0. > Interrupt Pin – R - 8 bits - [PCI_Reg: 3Dh] > Field Name Bits Default Description > Interrupt Pin 7:0 00h This register specifies which interrupt pin the device issues. > This module does not generate interrupt but contains the > actual interrupt controller. This register is hardcoded to 0. P.S. sorry if formatting would come up ugly on your side. -- Andriy Gapon From owner-freebsd-acpi@FreeBSD.ORG Wed Sep 9 21:10:04 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F7E1065694; Wed, 9 Sep 2009 21:10:04 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 881EE8FC12; Wed, 9 Sep 2009 21:10:03 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA03200; Thu, 10 Sep 2009 00:10:01 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MlUQT-0005Xt-64; Thu, 10 Sep 2009 00:10:01 +0300 Message-ID: <4AA819A8.4030902@freebsd.org> Date: Thu, 10 Sep 2009 00:10:00 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: John Baldwin , freebsd-acpi@freebsd.org References: <4AA41D4A.4080805@freebsd.org> <200909081335.50980.jhb@freebsd.org> In-Reply-To: <200909081335.50980.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2009 21:10:04 -0000 on 08/09/2009 20:35 John Baldwin said the following: > I would move this into the softc and set it in the attach() routine by > duplicating that bit of the switch() statement in attach(). Please see an updated patch that uses a variation of your advice. diff --git a/sys/pci/intpm.c b/sys/pci/intpm.c index 63eb4c4..46ad238 100644 --- a/sys/pci/intpm.c +++ b/sys/pci/intpm.c @@ -53,6 +53,8 @@ struct intsmb_softc { void *irq_hand; device_t smbus; int isbusy; + int cfg_irq9; + int poll; struct mtx lock; }; @@ -96,6 +98,10 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43851002: + device_set_desc(dev, "AMD SB600/700/710/750 SMBus Controller"); + /* XXX Maybe force polling right here? */ + break; default: return (ENXIO); } @@ -108,12 +114,24 @@ intsmb_attach(device_t dev) { struct intsmb_softc *sc = device_get_softc(dev); int error, rid, value; + int intr; char *str; sc->dev = dev; mtx_init(&sc->lock, device_get_nameunit(dev), "intsmb", MTX_DEF); + sc->cfg_irq9 = 0; +#ifndef NO_CHANGE_PCICONF + switch (pci_get_devid(dev)) { + case 0x71138086: /* Intel 82371AB */ + case 0x719b8086: /* Intel 82443MX */ + /* Changing configuration is allowed. */ + sc->cfg_irq9 = 1; + break; + } +#endif + rid = PCI_BASE_ADDR_SMB; sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); @@ -123,27 +141,36 @@ intsmb_attach(device_t dev) goto fail; } -#ifndef NO_CHANGE_PCICONF - pci_write_config(dev, PCIR_INTLINE, 0x9, 1); - pci_write_config(dev, PCI_HST_CFG_SMB, - PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); -#endif + if (sc->cfg_irq9) { + pci_write_config(dev, PCIR_INTLINE, 0x9, 1); + pci_write_config(dev, PCI_HST_CFG_SMB, + PCI_INTR_SMB_IRQ9 | PCI_INTR_SMB_ENABLE, 1); + } value = pci_read_config(dev, PCI_HST_CFG_SMB, 1); - switch (value & 0xe) { + sc->poll = value & PCI_INTR_SMB_ENABLE; + intr = value & PCI_INTR_SMB_MASK; + switch (intr) { case PCI_INTR_SMB_SMI: str = "SMI"; break; case PCI_INTR_SMB_IRQ9: str = "IRQ 9"; break; + case PCI_INTR_SMB_IRQ_AMD: + str = "IRQ"; + break; default: str = "BOGUS"; } + device_printf(dev, "intr %s %s ", str, - (value & 1) ? "enabled" : "disabled"); + sc->poll == 0 ? "enabled" : "disabled"); printf("revision %d\n", pci_read_config(dev, PCI_REVID_SMB, 1)); - if ((value & 0xe) != PCI_INTR_SMB_IRQ9) { + if (sc->poll) + goto no_intr; + + if (intr != PCI_INTR_SMB_IRQ9 && intr != PCI_INTR_SMB_IRQ_AMD) { device_printf(dev, "Unsupported interrupt mode\n"); error = ENXIO; goto fail; @@ -151,7 +178,9 @@ intsmb_attach(device_t dev) /* Force IRQ 9. */ rid = 0; - bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + if (sc->cfg_irq9) + bus_set_resource(dev, SYS_RES_IRQ, rid, 9, 1); + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { @@ -167,6 +196,7 @@ intsmb_attach(device_t dev) goto fail; } +no_intr: sc->isbusy = 0; sc->smbus = device_add_child(dev, "smbus", -1); if (sc->smbus == NULL) { @@ -361,7 +391,7 @@ intsmb_start(struct intsmb_softc *sc, unsigned char cmd, int nointr) tmp |= PIIX4_SMBHSTCNT_START; /* While not in autoconfiguration enable interrupts. */ - if (!cold && !nointr) + if (!sc->poll && !cold && !nointr) tmp |= PIIX4_SMBHSTCNT_INTREN; bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp); } @@ -411,8 +441,6 @@ intsmb_stop_poll(struct intsmb_softc *sc) if (!(status & PIIX4_SMBHSTSTAT_BUSY)) { sc->isbusy = 0; error = intsmb_error(sc->dev, status); - if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR)) - device_printf(sc->dev, "unknown cause why?\n"); return (error); } } @@ -434,7 +462,7 @@ intsmb_stop(struct intsmb_softc *sc) INTSMB_LOCK_ASSERT(sc); - if (cold) + if (sc->poll || cold) /* So that it can use device during device probe on SMBus. */ return (intsmb_stop_poll(sc)); diff --git a/sys/pci/intpmreg.h b/sys/pci/intpmreg.h index 236c737..4a3e599 100644 --- a/sys/pci/intpmreg.h +++ b/sys/pci/intpmreg.h @@ -35,7 +35,9 @@ #define PCI_BASE_ADDR_SMB 0x90 /* IO BAR. */ #define PCI_BASE_ADDR_PM 0x40 #define PCI_HST_CFG_SMB 0xd2 /* Host Configuration */ +#define PCI_INTR_SMB_MASK 0xe #define PCI_INTR_SMB_SMI 0 +#define PCI_INTR_SMB_IRQ_AMD 2 #define PCI_INTR_SMB_IRQ9 8 #define PCI_INTR_SMB_ENABLE 1 #define PCI_SLV_CMD_SMB 0xd3 /*SLAVE COMMAND*/ -- Andriy Gapon