From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 9 06:24:09 2006 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0DB916A4DA; Sun, 9 Jul 2006 06:24:09 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6540443D46; Sun, 9 Jul 2006 06:24:09 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k696KnCH092273; Sun, 9 Jul 2006 00:20:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 09 Jul 2006 00:20:57 -0600 (MDT) Message-Id: <20060709.002057.58455516.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200607071428.27775.jhb@freebsd.org> References: <200607071738.k67HcmJG006425@ns.init-main.com> <200607071428.27775.jhb@freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org, takawata@init-main.com, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 09 Jul 2006 06:24:09 -0000 In message: <200607071428.27775.jhb@freebsd.org> John Baldwin writes: : On Friday 07 July 2006 13:38, Takanori Watanabe wrote: : > In message <200607071240.57062.jhb@freebsd.org>, John Baldwin $B$5$s$$$o$/ : (B: : > We may want to use _UID resource to wire unit number. : > How about tweaking acpi_probe_child function so that attaching by : > _UID order? : : That's probably not a bad idea. However, it may be somewhat tricky to : implement. A quick hack solution would be to add the _UID to the order which : works as long as _UIDs are all < 10. I think the general case of unit wiring : is still useful though as it has applications outside of just ACPI. I believe the right way to cope is adding the devices with the right unit number. I think anything else is doomed to failure. However, it will mean that we'll need to OMIT the sio hints for ISA when we do acpi. We shouldn't be loading hints for isa anymore anyway, except on really really old machines. Warner From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 9 07:47:58 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0836B16A4DA; Sun, 9 Jul 2006 07:47:58 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 276AA43D49; Sun, 9 Jul 2006 07:47:57 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k697koqj092970; Sun, 9 Jul 2006 01:46:51 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 09 Jul 2006 01:46:58 -0600 (MDT) Message-Id: <20060709.014658.-460542464.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200607071240.57062.jhb@freebsd.org> References: <44AD6F67.9060804@root.org> <200607071240.57062.jhb@freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 09 Jul 2006 07:47:58 -0000 Sorry to toppost on this. But I'm curious. Why are such extensive changes needed to newbus when a two-pass device adding scheme would work nearly as well in the acpi layer? Likewise for pci and the 'wire this unit to a location' solution. A minor change to newbus to never assign a unit to a hinted device would be all that's needed. The big problem that I see with your solution is that sio0 is hinted on the isa bus, but not on the acpi bus. acpi should rightly ignore the isa hints. If someone wants to hint (wire) an ACPI device, that someone should wire it on the acpi bus. Or on whatever other bus is appropriate. There's a number of overlapping problems here. First, we need some way to enumerate a bus that has no way of doing that enumeration for itself. This used to be ISA bus, but these days ISA slots are almost gone, and the need to completely enumerate the ISA bus is almost nil because all on-board devices are enumerated by the PNPBIOS or ACPI (although I have seen some exceptions on boards that we buy for our embedded stuff at work). Many new busses are going to be added to the tree (or existing busses augmented) to do the proper hinting because they are not self enumerating. i2c is one such bus that's not self-enumerating (although i2c variants, such as smb, do exist that are nearly probeable). Next, there's the desire to wire units to locations. This is done to an extent in cam right now, but isn't newbus aware since cam isn't newbus aware. Although a simple problem on its surface, it really is an ugly one once you get down into it. One solution is to use devd to configure based on more information than is present at probe time. This solves the fxp0 in slot 3 becomes fxp1 when another fxp card is inserted in the wrong slot. If you base your configuration on location or attribtues (eg mac address) of the device, then you solve the problem in a more generic and scalable way. The kernel will likely never allow you to assign rl0 to 00:0f:b0:fd:ab:39 and rl1 to 00:0f:b0:fd:ca:23, for example, since that information isn't present until attach time. Finally, there's the redundant specification problem. People want sio0 to attach to this thing in the back of the computer that's labeled COMA, and whose resources are this or that. They know from their computer's documentation that this is COM1, and windows assigns it to COM1. This desire is due in part to it being the way we've always selected sio0. It traditionally has been the serial port at address 0x3f8. There's also the problem that the low level kernel console driver wants to talk to the port by address, while the newbus system wants to talk to it by how it probed. So you get odd cross-threading when these two don't agree. If the cross threading didn't exist, and the right thing happened, users wouldn't care how that happened. devfs could be used if one could express A<->B relationships in it. That would be an awkward solution, to say the least. However, given the momentum of history here, I think we need to accomidate Windows' practice of wiring their serial ports. The first problem is totally solved by hints. I just extended it from the one bus in the system that had it (ISA) to the many that will need it (i2c, spi, etc). The second problem is solved by devd generically. A limited subset of it could be solved using hints and a lot of goo to add a lot of DWIM to newbus, but guessing at user desires has never been a strong suit of unix. The third problem could also be solved with hints and some minor adjustments to newbus. Each bus could solve it differently, and likely should. But the number of busses that need to solve it are small. ISA + PNPBIOS info is one, and ACPI is another. I'm unaware of others where it is meaningful (after all, you'd never think of doing it on the PCI bus, where resource allocations fluxuate a lot). I've actually given a lot of thought to problem 3, and have a scheme worked out in my mind that I think will work well. I don't think it needs to be complicated or even two passes if newbus never assigns a unit number to a -1 device that has any hints at all. We could look at devclass creation time and just create the devices that have hints easily enough I think. It would mean gutting the current isahint driver, I think, and hoisting its function up into isa proper. I think it would also mean that PNP enumerated busses (ISA PNPBIOS and ACPI's system resources) would need have some way of looking up a device by its resources, and then for those it gets a 'hit' on, hard wiring the device and the unit. The down side is that it makes it harder for things that also live at COMx addresses to have different drivers. Like IrDA ports and the like. I'll have to see if I can code some of this up in p4 so we can hash out what approach will work best. Warner P.S. The fdc issue is completely orthogonal to all of this. That's purely a resource issue, and has nothing to do with device wiring... It shows an unlying weakness in the resource model, but that's a topic for another post... In message: <200607071240.57062.jhb@freebsd.org> John Baldwin writes: : On Thursday 06 July 2006 16:15, Nate Lawson wrote: : > > Ahh ok. You must forgive me if I seem dense since this is the first time : > > I've looked at repairing these types of instruction files. Are you : > > saying that the order that they appear in the .asl is important? : > : > Yes, that's what he means. Move the whole Device (COMA) { ... } section : > before COMB if that's what you want. : > : > Ultimate solution is probably to implement _SRS support (set resource) : > so that we can reconfigure the devices according to their desired order. : > That's not even on anyone's todo list I think. : : That actually wouldn't fix it. One of the issues here with the backwards com : ports is that the serial port ends up on sio0 by default, so if sio0 ends up : as COM2, then the kernel ends up switching to a different port for its serial : console (or it just uses a different one than the rest of the bootstrap). : Since COMA is wired to com1 and COMB is wired to the com2 port on the : motherboard, merely swapping the resources around will end up with the same : end result: sio0 will be COMB == com2, and sio1 will be COMA == com1. The : real solution is to allow for hints to be used to "wire" unit numbers. I : thought about this on my drive into work today and came up with a rough : design: : : First, when new-bus goes to probe a device, it currently temporarily assigns : it a unit number for each candidate driver. If new-bus ends up using that : driver for the device, the unit number "sticks". Right now the unit number : allocation is rather simple, it just uses the highest unit attached so far + : 1. What I would like it to do is start with unit 0 and look for a free unit : number each time. The first test would be if the unit has an assigned device : already. Secondly, for each unit we would see if there were any matching : hints for that (driver-name, unit) pair. If so, then we'd call a method in : the parent device (would be a new bus_if.m method called : bus_hint_compatible() or something) to determine if this device is compatible : with the specified hints and can thus "take over" the hint-specified device : or if it should skip this unit number. : : The default implementation would for bus_hint_compatible() would be to reject : the hint device if it contains any resource hints (irq, port, mem, drq). : This would mostly preserve existing behavior for things like the PCI bus (it : would also remove the need for the current hack in sio to try to bump up the : unit number of PCI sio(4) devices to leave sio0 and sio1 open for COM1 and : COM2). For the ISA and ACPI bus drivers though, they would actually compare : the resource hints to see if they were a subset of the resources assigned to : the device_t via PnP or ACPI. For example, they would make sure the IRQ : matched if it was assigned, or that the port. mem, and drq resources were : contained in at least one of the port, mem, or drq resources that device had. : Thus, you could wire sio0 to the default COM1 by specifying 0x3f8 for the : port (in fact, our default device.hints file would Just Work(tm) for things : like COM ports with this) regardless of the order of COM1 or COM2 in the ASL : or PnP BIOS list. : : This also makes it possible to define other hint mechanisms if we wanted. For : example, if you wanted to swap the unit numbers of two PCI NIC cards for some : reason you could maybe do something like 'hint.fxp.0.slot="0.4.0"' to : hardcode fxp0 as being the card at bus 0, device 4, function 0 and teach the : PCI bus driver to grok that hint. : : While this would make the search for unit numbers slower (potentially O(n^2) : to walk the list of units and walk the list of hints for each unit), that may : not be a problem since we do that fairly rarely. If needed we could also : come up with some sort of caching mechanism for the hint search as that is : the part I expect would be the slowest. Probably easier to just do the : simple implementation first and only try to optimize if we need it. : : -- : John Baldwin : _______________________________________________ : 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 Sun Jul 9 08:23:51 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FE8916A4DA; Sun, 9 Jul 2006 08:23:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F5AB43D49; Sun, 9 Jul 2006 08:23:50 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k698MGwZ093518; Sun, 9 Jul 2006 02:22:17 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 09 Jul 2006 02:22:24 -0600 (MDT) Message-Id: <20060709.022224.-1827343921.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Jul__9_02_22_24_2006_113)--" Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org Subject: Fw: PERFORCE change 101080 for review 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, 09 Jul 2006 08:23:51 -0000 ----Next_Part(Sun_Jul__9_02_22_24_2006_113)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit John, I think the following change is good reguardless of how the current discussions about how to get acpi devices wired falls out. It modifies devclass unit number assignment to treat a pre-existing device as 'taken' as well as one that just might be hinted at. It has the nice side effect of obviating the need for device_set_unit, which I added holding my nose a long time ago. The reason I didn't go with this approach was that at the time (4.x or maybe 3.x) there wasn't the hints infrastructure we have today, and I never went back to revisit this kludge to remove it. Please let me know what you think of this. Warner ----Next_Part(Sun_Jul__9_02_22_24_2006_113)-- Content-Type: Message/Rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: owner-perforce@freebsd.org Delivery-Date: Sun, 09 Jul 2006 02:17:09 -0600 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on harmony.bsdimp.com X-Spam-Level: X-Spam-Status: No, score=-2.4 required=4.5 tests=BAYES_00,HOT_NASTY autolearn=ham version=3.1.1 Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k698FH0I093302 for ; Sun, 9 Jul 2006 02:15:17 -0600 (MDT) (envelope-from owner-perforce@freebsd.org) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id DBCA857F1B for ; Sun, 9 Jul 2006 08:15:13 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix) id E4D5316A50A; Sun, 9 Jul 2006 08:15:12 +0000 (UTC) Delivered-To: imp@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE97516A4E1; Sun, 9 Jul 2006 08:15:12 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 674EB16A4DA for ; Sun, 9 Jul 2006 08:15:12 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 288B743D46 for ; Sun, 9 Jul 2006 08:15:12 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k698FC09071129 for ; Sun, 9 Jul 2006 08:15:12 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k698FBQl071126 for perforce@freebsd.org; Sun, 9 Jul 2006 08:15:11 GMT (envelope-from imp@freebsd.org) Date: Sun, 9 Jul 2006 08:15:11 GMT Message-Id: <200607090815.k698FBQl071126@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh Subject: PERFORCE change 101080 for review To: Perforce Change Reviews http://perforce.freebsd.org/chv.cgi?CH=101080 Change 101080 by imp@imp_lighthouse on 2006/07/09 08:14:50 Kill that unsightly device_set_unit(). Make the assignment of units skip anything that is hinted 'at' :-). This means we no longer need to skip low unit numbers for pci's sio since either there will be sio hints, in which case we'll be honoring them, or there won't, in which case it just won't matter. Affected files ... .. //depot/projects/arm/src/sys/dev/sio/sio_pci.c#3 edit .. //depot/projects/arm/src/sys/kern/subr_bus.c#10 edit .. //depot/projects/arm/src/sys/sys/bus.h#6 edit Differences ... ==== //depot/projects/arm/src/sys/dev/sio/sio_pci.c#3 (text+ko) ==== @@ -43,7 +43,6 @@ #include static int sio_pci_attach(device_t dev); -static void sio_pci_kludge_unit(device_t dev); static int sio_pci_probe(device_t dev); static device_method_t sio_pci_methods[] = { @@ -101,39 +100,9 @@ id++; if (id->desc == NULL) return (ENXIO); - sio_pci_kludge_unit(dev); return (sioattach(dev, id->rid, 0UL)); } -/* - * Don't cut and paste this to other drivers. It is a horrible kludge - * which will fail to work and also be unnecessary in future versions. - */ -static void -sio_pci_kludge_unit(dev) - device_t dev; -{ - devclass_t dc; - int err; - int start; - int unit; - - unit = 0; - start = 0; - while (resource_int_value("sio", unit, "port", &start) == 0 && - start > 0) - unit++; - if (device_get_unit(dev) < unit) { - dc = device_get_devclass(dev); - while (devclass_get_device(dc, unit)) - unit++; - device_printf(dev, "moving to sio%d\n", unit); - err = device_set_unit(dev, unit); /* EVIL DO NOT COPY */ - if (err) - device_printf(dev, "error moving device %d\n", err); - } -} - static int sio_pci_probe(dev) device_t dev; ==== //depot/projects/arm/src/sys/kern/subr_bus.c#10 (text+ko) ==== @@ -1295,11 +1295,11 @@ devclass_alloc_unit(devclass_t dc, int *unitp) { int unit = *unitp; + const char *where; PDEBUG(("unit %d in devclass %s", unit, DEVCLANAME(dc))); /* If we were given a wired unit number, check for existing device */ - /* XXX imp XXX */ if (unit != -1) { if (unit >= 0 && unit < dc->maxunit && dc->devices[unit] != NULL) { @@ -1309,9 +1309,16 @@ return (EEXIST); } } else { - /* Unwired device, find the next available slot for it */ + /* + * Unwired device, find the next available slot for it that + * doesn't have an "at" hint indicating that it might be + * wired on a bus that hasn't probed yet. We skip those + * units, even when we're past the 'end' of the current + * array. + */ unit = 0; - while (unit < dc->maxunit && dc->devices[unit] != NULL) + while ((unit < dc->maxunit && dc->devices[unit] != NULL) || + resource_string_value(dc->name, unit, "at", &where) == 0) unit++; } @@ -2480,33 +2487,6 @@ return (DEVICE_SHUTDOWN(dev)); } -/** - * @brief Set the unit number of a device - * - * This function can be used to override the unit number used for a - * device (e.g. to wire a device to a pre-configured unit number). - */ -int -device_set_unit(device_t dev, int unit) -{ - devclass_t dc; - int err; - - dc = device_get_devclass(dev); - if (unit < dc->maxunit && dc->devices[unit]) - return (EBUSY); - err = devclass_delete_device(dc, dev); - if (err) - return (err); - dev->unit = unit; - err = devclass_add_device(dc, dev); - if (err) - return (err); - - bus_data_generation_update(); - return (0); -} - /*======================================*/ /* * Some useful method implementations to make life easier for bus drivers. ==== //depot/projects/arm/src/sys/sys/bus.h#6 (text+ko) ==== @@ -375,7 +375,6 @@ int device_set_driver(device_t dev, driver_t *driver); void device_set_flags(device_t dev, u_int32_t flags); void device_set_softc(device_t dev, void *softc); -int device_set_unit(device_t dev, int unit); /* XXX DONT USE XXX */ int device_shutdown(device_t dev); void device_unbusy(device_t dev); void device_verbose(device_t dev); ----Next_Part(Sun_Jul__9_02_22_24_2006_113)---- From owner-freebsd-acpi@FreeBSD.ORG Sun Jul 9 18:05:28 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0372F16A4DE; Sun, 9 Jul 2006 18:05:28 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id A17C043D45; Sun, 9 Jul 2006 18:05:27 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.150] (pptp0.pn.xcllnt.net [192.168.4.150]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k69I5JmH013080; Sun, 9 Jul 2006 11:05:20 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <20060709.014658.-460542464.imp@bsdimp.com> References: <44AD6F67.9060804@root.org> <200607071240.57062.jhb@freebsd.org> <20060709.014658.-460542464.imp@bsdimp.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Sun, 9 Jul 2006 11:05:15 -0700 To: "M. Warner Losh" X-Mailer: Apple Mail (2.752.2) Cc: freebsd-acpi@freebsd.org, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 09 Jul 2006 18:05:28 -0000 On Jul 9, 2006, at 12:46 AM, M. Warner Losh wrote: > Finally, there's the redundant specification problem. People want > sio0 to attach to this thing in the back of the computer that's > labeled COMA, and whose resources are this or that. They know from > their computer's documentation that this is COM1, and windows assigns > it to COM1. This desire is due in part to it being the way we've > always selected sio0. It traditionally has been the serial port at > address 0x3f8. There's also the problem that the low level kernel > console driver wants to talk to the port by address, while the newbus > system wants to talk to it by how it probed. So you get odd > cross-threading when these two don't agree. If the cross threading > didn't exist, and the right thing happened, users wouldn't care how > that happened. uart(4) has this problem solved already. It seems to me from following the various mailing lists that it's probably time to think about phasing out sio(4), because problems tend to come up with sio(4) from time to time that have already been solved with uart(4). > ... The third problem could > also be solved with hints and some minor adjustments to newbus. I disagree. It's misusing hints that's causing the cross-threading. If hints were to be used for enumeration only and you have a different means to select the low-level serial console then cross-threading is avoided. This is exactly what uart(4) does. As such, you can even pick a port on a multi-I/O PCI card for the low-level serial console without causing interference with any of the other problems you mentioned. The reason is simply that you select the low-level serial console by the one attribute that matters: the I/O address (either I/O port or memory mapped I/O). -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 02:45:19 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 962A316A4E1; Mon, 10 Jul 2006 02:45:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 376B943D49; Mon, 10 Jul 2006 02:45:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6A2hKW3008028; Sun, 9 Jul 2006 20:43:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 09 Jul 2006 20:43:29 -0600 (MDT) Message-Id: <20060709.204329.-1889954042.imp@bsdimp.com> To: marcel@xcllnt.net From: "M. Warner Losh" In-Reply-To: References: <200607071240.57062.jhb@freebsd.org> <20060709.014658.-460542464.imp@bsdimp.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 10 Jul 2006 02:45:19 -0000 In message: Marcel Moolenaar writes: : On Jul 9, 2006, at 12:46 AM, M. Warner Losh wrote: : : > Finally, there's the redundant specification problem. People want : > sio0 to attach to this thing in the back of the computer that's : > labeled COMA, and whose resources are this or that. They know from : > their computer's documentation that this is COM1, and windows assigns : > it to COM1. This desire is due in part to it being the way we've : > always selected sio0. It traditionally has been the serial port at : > address 0x3f8. There's also the problem that the low level kernel : > console driver wants to talk to the port by address, while the newbus : > system wants to talk to it by how it probed. So you get odd : > cross-threading when these two don't agree. If the cross threading : > didn't exist, and the right thing happened, users wouldn't care how : > that happened. : : uart(4) has this problem solved already. It seems to me from following : the various mailing lists that it's probably time to think about phasing : out sio(4), because problems tend to come up with sio(4) from time to : time that have already been solved with uart(4). It solves one tiny sliver of this problem. While there may be other merit for using uart(4) over sio(4), this one issue isn't it. At the very least, there'd be a high cost of migration from /dev/ttyd0 to /dev/ttyu0. Our products were bit by the cuaa0 -> cuad0 changes between 5.x and 6.x, and that made a lot of people around unhappy. They'd be even more unhappy if it changed again. : > ... The third problem could : > also be solved with hints and some minor adjustments to newbus. : : I disagree. It's misusing hints that's causing the cross-threading. : If hints were to be used for enumeration only and you have a different : means to select the low-level serial console then cross-threading is : avoided. This is exactly what uart(4) does. As such, you can even pick : a port on a multi-I/O PCI card for the low-level serial console : without causing interference with any of the other problems you : mentioned. The reason is simply that you select the low-level serial : console by the one attribute that matters: the I/O address (either : I/O port or memory mapped I/O). You are correct for the console issue. But the problem is much bigger than just the console issue. My company uses single board computers for its embedded products. The documentation for the SBC says that this spigot is COM1 or that spigot is COM2. The hardware folks then design the cables and such for the individual unit, plug it all together and tell the software folks that thus and such function is on COM1 and whatsit is on COM2. It is perceived to be a FreeBSD bug that sio0 isn't COM1 and sio1 isn't COM2. This is espeically true when we swap out boards as the old one goes obsolete (which happens far too quickly). We've had some boards whose tables are such that com1 <-> sio0 and others where com1 <-> sio1. We've avoided this issue by not using ACPI, but we're starting to find that it's harder to get vendors to fix problems with non-acpi operation. There are many valid reasons for wanting to wire the unit number to a resource. Warner From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 05:37:40 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3090416A4DD; Mon, 10 Jul 2006 05:37:40 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id A538443D53; Mon, 10 Jul 2006 05:37:39 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.150] (pptp0.pn.xcllnt.net [192.168.4.150]) by ns1.xcllnt.net (8.13.6/8.13.6) with ESMTP id k6A5bVpe023687; Sun, 9 Jul 2006 22:37:32 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <20060709.204329.-1889954042.imp@bsdimp.com> References: <200607071240.57062.jhb@freebsd.org> <20060709.014658.-460542464.imp@bsdimp.com> <20060709.204329.-1889954042.imp@bsdimp.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0353311F-34F9-40F6-81B9-C7C838CC6024@xcllnt.net> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Sun, 9 Jul 2006 22:37:26 -0700 To: "M. Warner Losh" X-Mailer: Apple Mail (2.752.2) Cc: freebsd-acpi@freebsd.org, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 10 Jul 2006 05:37:40 -0000 On Jul 9, 2006, at 7:43 PM, M. Warner Losh wrote: > : > ... The third problem could > : > also be solved with hints and some minor adjustments to newbus. > : > : I disagree. It's misusing hints that's causing the cross-threading. > : If hints were to be used for enumeration only and you have a > different > : means to select the low-level serial console then cross-threading is > : avoided. This is exactly what uart(4) does. As such, you can even > pick > : a port on a multi-I/O PCI card for the low-level serial console > : without causing interference with any of the other problems you > : mentioned. The reason is simply that you select the low-level serial > : console by the one attribute that matters: the I/O address (either > : I/O port or memory mapped I/O). > > You are correct for the console issue. But the problem is much bigger > than just the console issue. I beg to differ. You correctly separated the low-level console issue from the need to have a fixed mapping between port (plug/socket) and unit numbers. The problems are separate and uart(4) correctly solves the low-level console to unit mapping. This means that with uart(4) you always have a single-user console, even though it may not be on the same unit number when hardware configurations change. That latter is the problem of having to wire-down a unit number and can best be illustrated by having to edit /etc/ttys when unit numbers change (or changing rc.conf when network units change -- take a pick :-). You like to be able to fixate that, so that you don't have to edit your favorite configuration file. This problem cannot and/or should not be solved by any individual driver, but should be handled at the bus level. So, we're talking about two different problems here, because they need to be solved at different "levels" in the newbus framework. Trying to solve them with a single solution or treating them as a single problem is exactly what will cause the cross-threading you mentioned. > There are many valid reasons for wanting to wire the unit number to a > resource. Agreed, and this has nothing to do with low-level console issues. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 11:02:59 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17A6B16A4DD for ; Mon, 10 Jul 2006 11:02:59 +0000 (UTC) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23CA943D67 for ; Mon, 10 Jul 2006 11:02:51 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6AB2pjY055533 for ; Mon, 10 Jul 2006 11:02:51 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6AB2nUq055529 for freebsd-acpi@freebsd.org; Mon, 10 Jul 2006 11:02:49 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 10 Jul 2006 11:02:49 GMT Message-Id: <200607101102.k6AB2nUq055529@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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, 10 Jul 2006 11:02:59 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2006/03/01] i386/93963 acpi [panic] [patch] ACPI Panic with some ACPI 1 problem total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/07/22] i386/54756 acpi ACPI suspend/resume problem on CF-W2 lapt o [2003/08/17] i386/55661 acpi ACPI suspend/resume problem on ARMADA M70 o [2003/08/20] kern/55822 acpi No ACPI power off with SMP kernel o [2003/08/27] kern/56024 acpi ACPI suspend drains battery while in S3 o [2004/03/09] i386/64002 acpi acpi problem o [2004/05/27] i386/67273 acpi [hang] system hangs with acpi and Xfree o [2004/10/12] i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Arma o [2005/03/21] i386/79080 acpi acpi thermal changes freezes HP nx6110 o [2005/03/21] i386/79081 acpi ACPI suspend/resume not working on HP nx6 o [2005/04/28] i386/80426 acpi [APIC] [panic] 5.4-RC3 still panic when b o [2005/10/17] i386/87568 acpi [ACPI] [REGRESSION] 6.0-STABLE needs ACPI 11 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/05/28] kern/67309 acpi zzz reboot computer (ACPI S3) o [2004/07/29] i386/69750 acpi Boot without ACPI failed on ASUS L5 o [2004/11/11] i386/73822 acpi [request] add thermal support to ACPI o [2004/11/11] kern/73823 acpi [feature request] acpi / power-on by time f [2004/11/17] kern/74030 acpi Unplugging AC causes battery % to stay lo f [2005/12/24] kern/90871 acpi ACPI problems with ASUS A8N-VM-CSM o [2006/05/30] kern/98171 acpi [acpi] ACPI 1304 / 0501 errors on Acer 50 7 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 12:38:28 2006 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 002A016A4E1 for ; Mon, 10 Jul 2006 12:38:27 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id A532743D6B for ; Mon, 10 Jul 2006 12:38:25 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 13536 invoked from network); 10 Jul 2006 12:38:23 -0000 Received: from unknown (HELO localhost) (775067@[217.50.129.182]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 10 Jul 2006 12:38:23 -0000 Date: Mon, 10 Jul 2006 14:38:10 +0200 From: Fabian Keil To: freebsd-acpi@FreeBSD.org Message-ID: <20060710143810.61705f74@localhost> X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.19; i386-portbld-freebsd6.1) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_S6fYkIbOHoXcPz8jCY5Ltrh; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: Selectively disabling acpi sub-systems 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, 10 Jul 2006 12:38:28 -0000 --Sig_S6fYkIbOHoXcPz8jCY5Ltrh Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable As described in: http://lists.freebsd.org/pipermail/freebsd-stable/2006-June/026554.html I'm currently experiencing strange hangs or crashes with a FreeBSD RELENG_6 system running Tor. In case of the Tor related hangs the serial console becomes unresponsive together with the rest of the system, therefore I can't get into ddb to provide useful information about the cause of the problem. sio0 is attached on acpi0 and while I have no reason to believe that acpi0 is part of the problem, I'd like to make sure and use sio0 without it. Disabling acpi all together with hint.acpi.0.disabled works, but it also renders fxp0 useless. It comes up but only generates timeout messages. acpi(4) lists several ways to disable acpi sub-systems, but apparently I don't get the syntax right. The system's device configuration is: [fk@tor ~]$ devinfo=20 nexus0 npx0 acpi0 cpu0 acpi_throttle0 cpufreq0 acpi_button0 acpi_sysresource0 pcib0 pci0 agp0 pcib1 pci1 pcib2 pci2 fxp0 miibus0 inphy0 fxp1 miibus1 inphy1 isab0 isa0 pmtimer0 sc0 vga0 atkbdc0 atkbd0 orm0 atapci0 ata0 ad0 ata1 pci_link0 pci_link1 pci_link2 pci_link3 pci_link4 pci_link5 pci_link6 pci_link7 acpi_sysresource1 atpic0 atdma0 attimer0 attimer1 npxisa0 sio0 sio1 ppc0 ppbus0 plip0 lpt0 ppi0 acpi_tz0 acpi_timer0 Could someone please tell me how to stop acpi0 from grabbing sio0, without affecting fxp0? Fabian --=20 http://www.fabiankeil.de/ --Sig_S6fYkIbOHoXcPz8jCY5Ltrh Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEsko9jV8GA4rMKUQRAjYVAKC7rgV5E7XvWdQc8warx/UUsPEu7QCfbu59 GDcc24OzNm1ohyjiJvJpLBQ= =xFe6 -----END PGP SIGNATURE----- --Sig_S6fYkIbOHoXcPz8jCY5Ltrh-- From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:35:18 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B00116A4DD for ; Mon, 10 Jul 2006 14:35:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 831A543D45 for ; Mon, 10 Jul 2006 14:35:17 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6AEZ8dW061078; Mon, 10 Jul 2006 10:35:15 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Mon, 10 Jul 2006 09:12:19 -0400 User-Agent: KMail/1.9.1 References: <20060708104309.32820.qmail@web27905.mail.ukl.yahoo.com> In-Reply-To: <20060708104309.32820.qmail@web27905.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607100912.19505.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 10 Jul 2006 10:35:16 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1590/Mon Jul 10 01:34:09 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Subject: Re: partial support on asus p5vdc mx 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, 10 Jul 2006 14:35:18 -0000 On Saturday 08 July 2006 06:43, uwe farinol wrote: > hi > > I run freebsd SMP on the mobo in subject, with a > Pentium D 805 CPU. > Everything is fine, but I get very few MIBs for acpi. > Notably, I don't get support for the thermal sensor. This is a limitation of your BIOS and there's not much FreeBSD can do about it. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:35:19 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCDF016A4DA for ; Mon, 10 Jul 2006 14:35:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A46343D45 for ; Mon, 10 Jul 2006 14:35:18 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6AEZ8dV061078; Mon, 10 Jul 2006 10:35:14 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Mon, 10 Jul 2006 09:10:50 -0400 User-Agent: KMail/1.9.1 References: <200607071738.k67HcmJG006425@ns.init-main.com> <200607071428.27775.jhb@freebsd.org> <20060709.002057.58455516.imp@bsdimp.com> In-Reply-To: <20060709.002057.58455516.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607100910.51309.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 10 Jul 2006 10:35:15 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1590/Mon Jul 10 01:34:09 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: takawata@init-main.com, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 10 Jul 2006 14:35:19 -0000 On Sunday 09 July 2006 02:20, M. Warner Losh wrote: > In message: <200607071428.27775.jhb@freebsd.org> > John Baldwin writes: > : On Friday 07 July 2006 13:38, Takanori Watanabe wrote: > : > In message <200607071240.57062.jhb@freebsd.org>, John Baldwin $B$5$s$$$o$/ > : (B: > : > We may want to use _UID resource to wire unit number. > : > How about tweaking acpi_probe_child function so that attaching by > : > _UID order? > : > : That's probably not a bad idea. However, it may be somewhat tricky to > : implement. A quick hack solution would be to add the _UID to the order which > : works as long as _UIDs are all < 10. I think the general case of unit wiring > : is still useful though as it has applications outside of just ACPI. > > I believe the right way to cope is adding the devices with the right > unit number. I think anything else is doomed to failure. > > However, it will mean that we'll need to OMIT the sio hints for ISA > when we do acpi. We shouldn't be loading hints for isa anymore > anyway, except on really really old machines. See my earlier post. The problem here is that the ASL list the ports in reverse order, so we probe COM2 first (as sio0) and COM1 second (as sio1). The only way I can see to bind sio0 to COM1 is to use the resources associated with COM1 to wire unit 0 to COM1. Also, note that the way you specify a serial console is via a hint flag. Also, if you look at my proposal, it allows us to extend hints to bind unit numbers in all sorts of ways. For example, for this case we could also not use resources but do something like 'hint.sio.0.device=COMA' or 'hint.sio.0.device=_SB_.FOO.COMA'. This lets the bus determine what hints mean as far as wiring unit numbers. However, letting ACPI parse the resources and do the subset thing means that default /boot/device.hints would wire sio0 and sio1 up correctly out of the box. This will also cleanup the ISA PnP BIOS case by having the PNP BIOS devices "take over" hint devices as well. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:35:22 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F402A16A505 for ; Mon, 10 Jul 2006 14:35:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF44343D49 for ; Mon, 10 Jul 2006 14:35:20 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6AEZ8dZ061078; Mon, 10 Jul 2006 10:35:18 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Mon, 10 Jul 2006 10:26:19 -0400 User-Agent: KMail/1.9.1 References: <200607071240.57062.jhb@freebsd.org> <20060709.014658.-460542464.imp@bsdimp.com> In-Reply-To: <20060709.014658.-460542464.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607101026.20045.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 10 Jul 2006 10:35:18 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1590/Mon Jul 10 01:34:09 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-acpi@freebsd.org, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 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, 10 Jul 2006 14:35:22 -0000 On Sunday 09 July 2006 03:46, M. Warner Losh wrote: > Sorry to toppost on this. But I'm curious. Why are such extensive > changes needed to newbus when a two-pass device adding scheme would > work nearly as well in the acpi layer? Likewise for pci and the 'wire > this unit to a location' solution. A minor change to newbus to never > assign a unit to a hinted device would be all that's needed. > > The big problem that I see with your solution is that sio0 is hinted > on the isa bus, but not on the acpi bus. acpi should rightly ignore > the isa hints. If someone wants to hint (wire) an ACPI device, that > someone should wire it on the acpi bus. Or on whatever other > bus is appropriate. The problem is that ACPI enumerates ISA devices just like PNP BIOS. A serial port is not an "ACPI device" on an ACPI bus. It's an ISA device that the BIOS enumerates because the ISA bus itself is too dumb/simple/whatever to enumerate itself. If you look at the actual device tree in ACPI, it looks like this: _SB_ \-- PCI0 \-- ISA0 \-- COMA If we actually followed this in new-bus we'd have: acpi0 pcib0 pci0 isab0 isa0 sio0 However, instead of making an ACPI-aware isa0 (which we have done for pcib0 and pci0 to get PCI interrupt routing to work correctly in ACPI-land) we attach ISA devices directly to acpi0. We should treat the ACPI case similar to the PNPBIOS case for enumerating built-in ISA devices. In both cases, whatever serial port contains the resources for 'sio.0' as specified in 'hints' should probe and attach as 'sio0' and take on non-resource hints such as 'flags' to mark the serial console. > There's a number of overlapping problems here. > > First, we need some way to enumerate a bus that has no way of doing > that enumeration for itself. This used to be ISA bus, but these days > ISA slots are almost gone, and the need to completely enumerate the > ISA bus is almost nil because all on-board devices are enumerated by > the PNPBIOS or ACPI (although I have seen some exceptions on boards > that we buy for our embedded stuff at work). Many new busses are > going to be added to the tree (or existing busses augmented) to do the > proper hinting because they are not self enumerating. i2c is one such > bus that's not self-enumerating (although i2c variants, such as smb, > do exist that are nearly probeable). > > Next, there's the desire to wire units to locations. This is done to > an extent in cam right now, but isn't newbus aware since cam isn't > newbus aware. Although a simple problem on its surface, it really is > an ugly one once you get down into it. One solution is to use devd to > configure based on more information than is present at probe time. > This solves the fxp0 in slot 3 becomes fxp1 when another fxp card is > inserted in the wrong slot. If you base your configuration on > location or attribtues (eg mac address) of the device, then you solve > the problem in a more generic and scalable way. The kernel will > likely never allow you to assign rl0 to 00:0f:b0:fd:ab:39 and rl1 to > 00:0f:b0:fd:ca:23, for example, since that information isn't present > until attach time. The serial console needs to work during boot. :-/ > The first problem is totally solved by hints. I just extended it from > the one bus in the system that had it (ISA) to the many that will need > it (i2c, spi, etc). The second problem is solved by devd > generically. A limited subset of it could be solved using hints and a > lot of goo to add a lot of DWIM to newbus, but guessing at user > desires has never been a strong suit of unix. The third problem could > also be solved with hints and some minor adjustments to newbus. Each > bus could solve it differently, and likely should. But the number of > busses that need to solve it are small. ISA + PNPBIOS info is one, > and ACPI is another. I'm unaware of others where it is meaningful > (after all, you'd never think of doing it on the PCI bus, where > resource allocations fluxuate a lot). What you are missing here is that ISA is a "special case" of a non-enumerated bus in that there are side-band methods (PNPBIOS and ACPI) to enumerate it for you. ACPI can also provides some of the same stuff for other non-enumerated bus's such as SMB. > I've actually given a lot of thought to problem 3, and have a scheme > worked out in my mind that I think will work well. I don't think it > needs to be complicated or even two passes if newbus never assigns a > unit number to a -1 device that has any hints at all. We could look > at devclass creation time and just create the devices that have hints > easily enough I think. It would mean gutting the current isahint > driver, I think, and hoisting its function up into isa proper. I > think it would also mean that PNP enumerated busses (ISA PNPBIOS and > ACPI's system resources) would need have some way of looking up a > device by its resources, and then for those it gets a 'hit' on, hard > wiring the device and the unit. The down side is that it makes it > harder for things that also live at COMx addresses to have different > drivers. Like IrDA ports and the like. My proposal is to add a method to bus drivers so they can tell new-bus when to do a hard-wiring operation. new-bus would by default not hand out hard-wired unit numbers unless the bus driver agrees to the match. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:35:23 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2D4D16A4FD for ; Mon, 10 Jul 2006 14:35:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B33543D46 for ; Mon, 10 Jul 2006 14:35:22 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6AEZ8dc061078; Mon, 10 Jul 2006 10:35:20 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Mon, 10 Jul 2006 10:34:38 -0400 User-Agent: KMail/1.9.1 References: <20060709.022224.-1827343921.imp@bsdimp.com> In-Reply-To: <20060709.022224.-1827343921.imp@bsdimp.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200607101034.38923.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 10 Jul 2006 10:35:20 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1590/Mon Jul 10 01:34:09 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: acpi@freebsd.org Subject: Re: Fw: PERFORCE change 101080 for review 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, 10 Jul 2006 14:35:23 -0000 On Sunday 09 July 2006 04:22, M. Warner Losh wrote: > > John, > > I think the following change is good reguardless of how the current > discussions about how to get acpi devices wired falls out. It > modifies devclass unit number assignment to treat a pre-existing > device as 'taken' as well as one that just might be hinted at. > > It has the nice side effect of obviating the need for device_set_unit, > which I added holding my nose a long time ago. The reason I didn't go > with this approach was that at the time (4.x or maybe 3.x) there > wasn't the hints infrastructure we have today, and I never went back > to revisit this kludge to remove it. > > Please let me know what you think of this. Well, I think perhaps you think my wiring stuff is just about serial ports, but it really would allow us to generically wire unit numbers based on properties of the device that the bus driver can verify (resources, location, etc.) Basically, I want the bus driver to decide if it wants to "claim" a hint device. That is, each time we go to probe a device, if there are any hint-enumerated devices for the child driver we are probing, we pass the device_t to the parent (bus) device_t and use a new bus_if.m method to ask the parent bus if it's ok for this device_t to "take over" the hint device (e.g. if the resources specified in the hint are a subset of the ACPI or PNPBIOS-enumerated resources). Since each bus is free to implement whatever algorithm it wants, we can also add creative things like: hint.foo.0.at="pci:0:4:0" (a PCI bus/device/function) or hint.foo.0.at="_SB_.PCI0.ISA0.FOO0" (an ACPI device name) because the bus (and not the MI subr_bus.c code) is determines what the hints mean. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:35:24 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DDF116A4DA for ; Mon, 10 Jul 2006 14:35:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFCFF43D45 for ; Mon, 10 Jul 2006 14:35:23 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6AEZ8dX061078; Mon, 10 Jul 2006 10:35:16 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Mon, 10 Jul 2006 09:38:09 -0400 User-Agent: KMail/1.9.1 References: <20060710143810.61705f74@localhost> In-Reply-To: <20060710143810.61705f74@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607100938.10108.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 10 Jul 2006 10:35:17 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1590/Mon Jul 10 01:34:09 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Subject: Re: Selectively disabling acpi sub-systems 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, 10 Jul 2006 14:35:24 -0000 On Monday 10 July 2006 08:38, Fabian Keil wrote: > As described in: > http://lists.freebsd.org/pipermail/freebsd-stable/2006-June/026554.html > I'm currently experiencing strange hangs or crashes with a FreeBSD > RELENG_6 system running Tor. > > ... > > Could someone please tell me how to stop acpi0 from > grabbing sio0, without affecting fxp0? You most likely can't. You can't disable ACPI from managing devices and then expect it to manage PCI interrupts. As far as your actual panic. I've looked at the PR's, etc. and there are few if any details. For example, what is a "hard crash?" Does the machine turn off? Is it locked up such that it won't respond to pings? In general, even if it's deadlocked you can break into DDB via a serial console (trust me, I've seen this far too many times at my day job in the past few weeks). -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:54:10 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4767816A55C; Mon, 10 Jul 2006 14:54:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1C943D49; Mon, 10 Jul 2006 14:54:09 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6AEpNo0019984; Mon, 10 Jul 2006 08:51:23 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 10 Jul 2006 08:51:33 -0600 (MDT) Message-Id: <20060710.085133.-432771632.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200607101034.38923.jhb@freebsd.org> References: <20060709.022224.-1827343921.imp@bsdimp.com> <200607101034.38923.jhb@freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org Subject: Re: PERFORCE change 101080 for review 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, 10 Jul 2006 14:54:10 -0000 In message: <200607101034.38923.jhb@freebsd.org> John Baldwin writes: : On Sunday 09 July 2006 04:22, M. Warner Losh wrote: : > : > John, : > : > I think the following change is good reguardless of how the current : > discussions about how to get acpi devices wired falls out. It : > modifies devclass unit number assignment to treat a pre-existing : > device as 'taken' as well as one that just might be hinted at. : > : > It has the nice side effect of obviating the need for device_set_unit, : > which I added holding my nose a long time ago. The reason I didn't go : > with this approach was that at the time (4.x or maybe 3.x) there : > wasn't the hints infrastructure we have today, and I never went back : > to revisit this kludge to remove it. : > : > Please let me know what you think of this. : : Well, I think perhaps you think my wiring stuff is just about serial : ports, No. I absolutely do not. : but it really would allow us to generically wire unit numbers : based on properties of the device that the bus driver can verify : (resources, location, etc.) It does allow us to do that, but I don't see the point for PCI devices. : Basically, I want the bus driver to decide : if it wants to "claim" a hint device. That is, each time we go to probe : a device, if there are any hint-enumerated devices for the child driver : we are probing, we pass the device_t to the parent (bus) device_t and use : a new bus_if.m method to ask the parent bus if it's ok for this device_t : to "take over" the hint device (e.g. if the resources specified in the : hint are a subset of the ACPI or PNPBIOS-enumerated resources). Since : each bus is free to implement whatever algorithm it wants, we can also : add creative things like: : : hint.foo.0.at="pci:0:4:0" (a PCI bus/device/function) : : or : : hint.foo.0.at="_SB_.PCI0.ISA0.FOO0" (an ACPI device name) : : because the bus (and not the MI subr_bus.c code) is determines what the : hints mean. Can't use 'at' for this purpose. 'at' isn't a location, but a bus specifier. You'll need to invent something else. I get that, so don't go assuming that I don't. You didn't answer my question: is the patch I posted good or not. I think it is absolutely necessary, reguardless of the outcome of this discussion. Like I said, I've been doing a lot of thinking about how to accomplish this. Your proposal is way too complicated. After thinking about it all weekend, I'm sure that we can do all the wiring (to both a location in a namespace, as well as to a resource "location") using the patch I posted, plus the hints stuff I created for the iic/spi bus stuff. Upon reflection, it turns out to be a lot more general. Warner From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 16:40:45 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B910016A4DD for ; Mon, 10 Jul 2006 16:40:45 +0000 (UTC) (envelope-from uwefarinol@yahoo.it) Received: from web27904.mail.ukl.yahoo.com (web27904.mail.ukl.yahoo.com [217.146.182.54]) by mx1.FreeBSD.org (Postfix) with SMTP id BE4F043D46 for ; Mon, 10 Jul 2006 16:40:44 +0000 (GMT) (envelope-from uwefarinol@yahoo.it) Received: (qmail 78841 invoked by uid 60001); 10 Jul 2006 16:40:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=r28lJEx7JAinewSAeBc9tgDPKWb5GTF4RGboFxt+GLXSEebwCHveXRLg+CmznTBng+qA9FsyjSqmdrmlpQHunqRFhFslwBemnzieXjB5ugXEoNl8Xbx9D1T2RQLF8scFgptcxfH8hkNFwsX9iPlRfkYXrLXtg8huaB+8lVPFBEk= ; Message-ID: <20060710164042.78839.qmail@web27904.mail.ukl.yahoo.com> Received: from [62.101.126.224] by web27904.mail.ukl.yahoo.com via HTTP; Mon, 10 Jul 2006 18:40:42 CEST Date: Mon, 10 Jul 2006 18:40:42 +0200 (CEST) From: uwe farinol To: freebsd-acpi@freebsd.org In-Reply-To: <200607100912.19505.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Subject: Re: partial support on asus p5vdc mx 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, 10 Jul 2006 16:40:45 -0000 Yes. And for the archives, I thought that weird "dev.acpi_sysresource.*" was pointing out that some features of the BIOS were not correctly recognized by freebsd's acpi subsystem. Actually, there is a more solid way to determine this. By digging into intel's acpi programmer reference http://www.intel.com/technology/iapc/acpi/downloads/ACPICA-ProgRef.pdf I found that a "_TZ_" scope must be provided by the bios DSDT, that is, a "Scope (\_TZ_)" be defined in the asl. Besides the load of errors from iasl on the decompiled dsdt, that zone is missing in the ASL. Whenever the feature/scope/method is implemented, but buggy, I found this collection of common acpi topics useful for simple fixes: http://www.cpqlinux.com/acpi-howto.html#fix_broken_dsdt bye --- John Baldwin ha scritto: > On Saturday 08 July 2006 06:43, uwe farinol wrote: > > hi > > > > I run freebsd SMP on the mobo in subject, with a > > Pentium D 805 CPU. > > Everything is fine, but I get very few MIBs for > acpi. > > Notably, I don't get support for the thermal > sensor. > > This is a limitation of your BIOS and there's not > much FreeBSD > can do about it. > > -- > John Baldwin > Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 17:04:53 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 039D716A4DD for ; Mon, 10 Jul 2006 17:04:53 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC52243D5A for ; Mon, 10 Jul 2006 17:04:49 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 24266 invoked from network); 10 Jul 2006 17:04:47 -0000 Received: from unknown (HELO localhost) (775067@[217.50.129.182]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 10 Jul 2006 17:04:47 -0000 Date: Mon, 10 Jul 2006 19:04:40 +0200 From: Fabian Keil To: John Baldwin Message-ID: <20060710190440.7632135b@localhost> In-Reply-To: <200607100938.10108.jhb@freebsd.org> References: <20060710143810.61705f74@localhost> <200607100938.10108.jhb@freebsd.org> X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.19; i386-portbld-freebsd6.1) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_PI/0QyBgQocsOlDfIy9bt8H"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-acpi@freebsd.org Subject: Re: Selectively disabling acpi sub-systems 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, 10 Jul 2006 17:04:53 -0000 --Sig_PI/0QyBgQocsOlDfIy9bt8H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable John Baldwin wrote: > On Monday 10 July 2006 08:38, Fabian Keil wrote: > > As described in: > > http://lists.freebsd.org/pipermail/freebsd-stable/2006-June/026554.html > > I'm currently experiencing strange hangs or crashes with a FreeBSD > > RELENG_6 system running Tor. > > > > ... > >=20 > > Could someone please tell me how to stop acpi0 from > > grabbing sio0, without affecting fxp0? >=20 > You most likely can't. You can't disable ACPI from managing devices > and then expect it to manage PCI interrupts. Thanks for the clarification, I misunderstood the man page then. =20 > As far as your actual panic. I've looked at the PR's, etc. and there > are few if any details. For example, what is a "hard crash?" Does > the machine turn off? Is it locked up such that it won't respond to > pings? In general, even if it's deadlocked you can break into DDB via > a serial console (trust me, I've seen this far too many times at my > day job in the past few weeks). I don't have physical access to the system and have no way to tell if it turned it self off or just hangs. All I can tell is that it suddenly stops responding on the network and on the serial console, which makes manually entering ddb impossible. If the system is running the serial console is working as expected: I can enter ddb with ~ ^b, sysctl debug.kdb.enter=3D1 (or by typing kldload /dev/mem instead of mount_procfs ...). Another sio related thing where I'm not sure if it means anything: according to top -S, "swi4: clock sio" hardly ever leaves the state *Giant. top's output is logged every five minute and at the moment I have: [fk@tor ~]$ sudo grep "clock sio" /var/log/stats.log.bak | wc -l 1022 [fk@tor ~]$ sudo grep "clock sio" /var/log/stats.log.bak | grep Giant | wc = -l 1006 [fk@tor ~]$ sudo grep "clock sio" /var/log/stats.log.bak | grep WAIT | wc -l 16 Fabian --=20 http://www.fabiankeil.de/ --Sig_PI/0QyBgQocsOlDfIy9bt8H Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEsoitjV8GA4rMKUQRAt8BAJ46WNp5ueYtFGmDE9Sr3ytLRM2AKACgp6r5 UenWaQjSW2oZ0yw/RGJgIqQ= =YniF -----END PGP SIGNATURE----- --Sig_PI/0QyBgQocsOlDfIy9bt8H-- From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 06:59:15 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CA2C16A4DD for ; Tue, 11 Jul 2006 06:59:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82AF843D7D for ; Tue, 11 Jul 2006 06:59:14 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6B6uUYQ032361 for ; Tue, 11 Jul 2006 00:56:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 11 Jul 2006 00:56:39 -0600 (MDT) Message-Id: <20060711.005639.-233674225.imp@bsdimp.com> To: acpi@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Jul_11_00_56_39_2006_144)--" Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 11 Jul 2006 00:56:30 -0600 (MDT) Cc: Subject: sio0 wiring to a resource patch 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, 11 Jul 2006 06:59:15 -0000 ----Next_Part(Tue_Jul_11_00_56_39_2006_144)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please find enclosed an experimental patch. It does two things. First, it allows one to wire a unit number to a pci location. For example: hint.rl.1.at="pci" hint.rl.1.location="6:6:0" If there's an rl device at pci bus 6, slot 6, funcion 0, then assign it to rl1. Otherwise, use the standard unit assignment numbers. Second, it hours resources that are hinted for devices on the acpi bus (not isapnp yet, alas). If you had: hint.sio.0.at="isa" hint.sio.0.port="0x3F8" hint.sio.0.flags="0x10" hint.sio.0.irq="4" hint.sio.1.at="isa" hint.sio.1.port="0x2F8" hint.sio.1.irq="3" in your /boot/device.hints file, then COM1 would be sio0 and COM2 would be sio1. If instead you had: hint.sio.0.at="isa" hint.sio.0.port="0x2F8" hint.sio.0.flags="0x10" hint.sio.0.irq="3" hint.sio.1.at="isa" hint.sio.1.port="0x3F8" hint.sio.1.irq="4" Then sio1 would be COM1 and sio0 would be COM2. This is independent of the order that you have them in your acpi bios' aml. If, by chance, you had a IrDA device on COM1, and there was a sir driver that could detect it and returned a higher value than sio does for sio1, then sir0 would attach instead of sio1. The hint here also means "if you are going to attach a sio device, make it unit 1, otherwise make it the unit that would normally be assigned." It also means that if you don't load sio, but load uart instead, then uart will attach to the devices none-the-less. These patches are experimental, and will need some substantial refinement as these techniques are applied to other busses. John Baldwin and I hashed out the interfaces used under the covers here on irc today. Ideally, for the isa unit numbering problem, we'd change the isa layer somewhat. There's three types of enumeration that we need to support: (1) No pnpbios. Hints rule the show here. isahints.c is perfect for this case. (2) Enumeration through pnpbios data, augmented by hints for add-in nonPnP ISA cards. (3) Enumeration through ACPI data, augmented by hints for add-in nonPnP ISA cards. In all three cases, the ISA PNP code would also augment the lists (since ISA PNP interregates the card directly, and pnpbios is just a table in the BIOS with no knowledge of and add-in cards, PNP or no). The nuances of these cases, as well as system specific code for things like cbus on pc98 that use pnp as well need to be worked out. None of these issues are addressed by these patches. They are a 'cheap hack' to demonstrate a proof of concept. These patches augment the other hinting work I just did, so you'll need a fairly current current to apply them. Busses can cope with hinting in two ways. With the first method, a bus can ask for all the hinted devices up front, and get a callback for each hinted device. This is aimed primarily as those busses that have no shred of self-identifying information. The i2c bus falls into this category, for example, as there's no way to ask for meta-data on each device on the bus in a non-disruptive, non-intrusive portable way. Spi bus would be another example. Busses that have some way to query their devices would also benefit from this. smi bus, for example, has ways to query devices on the bus, but there's no standardized meta-data for chips on that bus, so you need to rely on hints. In this scenario, when the bus adds its children, it does so with specific names and unit numbers. With the second method, a bus will detect each of its children. It will add generic devices with -1 for the unit number. Just before newbus probes a device, it will ask the bus driver if this device node might have hints that suggest a unit number for the driver we're about to probe with. This method is for those busses that can easily add children, but need to have the children in place before they can parse resources and the like. Also, newbus needs to be involved to implement the bidding for device functionality, as well as the 'fallback to something sane if a device of type foo isn't really at the hinted location' functionality. Having the two different methods allows us to easily code up wiring code for different busses. At least that's the theory. Anyway, please test these patches out and let me know if you have problems. Warner ----Next_Part(Tue_Jul_11_00_56_39_2006_144)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="wiring.diff" --- FreeBSD/src/sys/kern/subr_bus.c Sat Jul 8 11:06:14 2006 +++ p4/arm/src/sys/kern/subr_bus.c Mon Jul 10 16:49:30 2006 @@ -1690,10 +1697,10 @@ int device_probe_child(device_t dev, device_t child) { - devclass_t dc; + devclass_t dc, childdc; driverlink_t best = 0; driverlink_t dl; - int result, pri = 0; + int unit, result, pri = 0; int hasclass = (child->devclass != 0); GIANT_REQUIRED; @@ -1717,7 +1724,18 @@ device_set_driver(child, dl->driver); if (!hasclass) device_set_devclass(child, dl->driver->name); - + if (child->flags & DF_WILDCARD) { + unit = child->unit; + BUS_HINT_DEVICE_UNIT(dev, child, &unit); + if (unit != child->unit) { + childdc = child->devclass; + devclass_delete_device(childdc, child); + if (childdc->devices[unit] != NULL) + continue; + child->unit = unit; + devclass_add_device(childdc, child); + } + } /* Fetch any flags for the device before probing. */ resource_int_value(dl->driver->name, child->unit, "flags", &child->devflags); @@ -1797,6 +1815,16 @@ if (!child->devclass) device_set_devclass(child, best->driver->name); device_set_driver(child, best->driver); + if (child->flags & DF_WILDCARD) { + unit = child->unit; + BUS_HINT_DEVICE_UNIT(dev, child, &unit); + if (unit != child->unit) { + childdc = child->devclass; + devclass_delete_device(childdc, child); + child->unit = unit; + devclass_add_device(childdc, child); + } + } resource_int_value(best->driver->name, child->unit, "flags", &child->devflags); @@ -2480,33 +2508,6 @@ return (DEVICE_SHUTDOWN(dev)); } -/** - * @brief Set the unit number of a device - * - * This function can be used to override the unit number used for a - * device (e.g. to wire a device to a pre-configured unit number). - */ -int -device_set_unit(device_t dev, int unit) -{ - devclass_t dc; - int err; - - dc = device_get_devclass(dev); - if (unit < dc->maxunit && dc->devices[unit]) - return (EBUSY); - err = devclass_delete_device(dc, dev); - if (err) - return (err); - dev->unit = unit; - err = devclass_add_device(dc, dev); - if (err) - return (err); - - bus_data_generation_update(); - return (0); -} - /*======================================*/ /* * Some useful method implementations to make life easier for bus drivers. --- FreeBSD/src/sys/kern/bus_if.m Sat Jul 8 11:06:14 2006 +++ p4/arm/src/sys/kern/bus_if.m Mon Jul 10 15:37:30 2006 @@ -528,4 +528,21 @@ device_t _dev; const char * _dname; int _dunit; +}; + +/** + * @brief Asks the bus to give us a hand hinting this device. + * + * Before we probe a child of a bus that's been wildcarded, we call the + * bus to see if there's any 'hints' as to unit number for the child + * presented for this kind of device. + * + * @param _dev the bus device + * @param _child child to hint + * @param _dunit the unit number of the device + */ +METHOD void hint_device_unit { + device_t _dev; + device_t _child; + int *_dunit; }; --- FreeBSD/src/sys/sys/bus.h Sat Jul 8 11:06:15 2006 +++ p4/arm/src/sys/sys/bus.h Sun Jul 9 02:14:59 2006 @@ -375,7 +375,6 @@ int device_set_driver(device_t dev, driver_t *driver); void device_set_flags(device_t dev, u_int32_t flags); void device_set_softc(device_t dev, void *softc); -int device_set_unit(device_t dev, int unit); /* XXX DONT USE XXX */ int device_shutdown(device_t dev); void device_unbusy(device_t dev); void device_verbose(device_t dev); Only in FreeBSD/src/sys/dev/pci: CVS diff -u FreeBSD/src/sys/dev/pci/pci.c p4/arm/src/sys/dev/pci/pci.c --- FreeBSD/src/sys/dev/pci/pci.c Thu May 11 16:13:21 2006 +++ p4/arm/src/sys/dev/pci/pci.c Mon Jul 10 17:23:21 2006 @@ -119,6 +119,7 @@ DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method), DEVMETHOD(bus_child_location_str, pci_child_location_str_method), + DEVMETHOD(bus_hint_device_unit, pci_hint_device_unit), /* PCI interface */ DEVMETHOD(pci_read_config, pci_read_config_method), @@ -1997,6 +1998,21 @@ cfg->subvendor, cfg->subdevice, cfg->baseclass, cfg->subclass, cfg->progif); return (0); +} + +void +pci_hint_device_unit(device_t bus, device_t child, int *unit) +{ + struct pci_devinfo *dinfo = device_get_ivars(child); + int i; + char buf[10]; + + snprintf(buf, sizeof(buf), "%d:%d:%d", dinfo->cfg.bus, dinfo->cfg.slot, + dinfo->cfg.func); + i = 0; + resource_find_dev(&i, device_get_name(child), unit, "location", buf); + + return; } int diff -u FreeBSD/src/sys/dev/pci/pci_private.h p4/arm/src/sys/dev/pci/pci_private.h --- FreeBSD/src/sys/dev/pci/pci_private.h Fri Jan 20 15:00:50 2006 +++ p4/arm/src/sys/dev/pci/pci_private.h Mon Jul 10 17:23:54 2006 @@ -76,6 +76,8 @@ char *buf, size_t buflen); int pci_child_pnpinfo_str_method(device_t cbdev, device_t child, char *buf, size_t buflen); +void pci_hint_device_unit(device_t bus, device_t child, + int *unit); int pci_assign_interrupt_method(device_t dev, device_t child); int pci_resume(device_t dev); int pci_suspend(device_t dev); diff -u FreeBSD/src/sys/dev/acpica/acpi.c p4/arm/src/sys/dev/acpica/acpi.c --- FreeBSD/src/sys/dev/acpica/acpi.c Sun Jun 11 21:35:29 2006 +++ p4/arm/src/sys/dev/acpica/acpi.c Mon Jul 10 17:33:55 2006 @@ -149,9 +149,10 @@ static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_pm_func(u_long cmd, void *arg, ...); static int acpi_child_location_str_method(device_t acdev, device_t child, - char *buf, size_t buflen); + char *buf, size_t buflen); static int acpi_child_pnpinfo_str_method(device_t acdev, device_t child, - char *buf, size_t buflen); + char *buf, size_t buflen); +static void acpi_hint_device_unit(device_t bus, device_t child, int *unit); static device_method_t acpi_methods[] = { /* Device interface */ @@ -182,6 +183,7 @@ DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_hint_device_unit, acpi_hint_device_unit), /* ACPI bus */ DEVMETHOD(acpi_id_probe, acpi_device_id_probe), @@ -810,6 +812,29 @@ return (0); } + +static void +acpi_hint_device_unit(device_t bus, device_t child, int *unit) +{ + int i; + char buf[10]; + char *kind = NULL; + u_long start, len; + + if (bus_get_resource(child, SYS_RES_IOPORT, 0, &start, &len) == 0) + kind = "port"; + else if (bus_get_resource(child, SYS_RES_MEMORY, 0, &start, &len) == 0) + kind = "maddr"; + if (kind == NULL) + return; + snprintf(buf, sizeof(buf), "0x%lx", start); + i = 0; + resource_find_dev(&i, device_get_name(child), unit, kind, buf); + // NOTE: We eat units on ANY bus, not just acpi because acpi + // should be a specialization of isa, but isn't atm. + return; +} + /* * Handle per-device ivars ----Next_Part(Tue_Jul_11_00_56_39_2006_144)---- From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 07:02:29 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF46516A4DA for ; Tue, 11 Jul 2006 07:02:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49E3643D45 for ; Tue, 11 Jul 2006 07:02:29 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6B6xaIj032417; Tue, 11 Jul 2006 00:59:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 11 Jul 2006 00:59:45 -0600 (MDT) Message-Id: <20060711.005945.-1962671777.imp@bsdimp.com> To: freebsd-listen@fabiankeil.de From: "M. Warner Losh" In-Reply-To: <20060710143810.61705f74@localhost> References: <20060710143810.61705f74@localhost> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 11 Jul 2006 00:59:37 -0600 (MDT) Cc: freebsd-acpi@freebsd.org Subject: Re: Selectively disabling acpi sub-systems 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, 11 Jul 2006 07:02:29 -0000 In message: <20060710143810.61705f74@localhost> Fabian Keil writes: : Could someone please tell me how to stop acpi0 from : grabbing sio0, without affecting fxp0? Hack sio not to have a acpi attachment. Or wait for some work that we're doing in current to be MFC'd :-) Warner From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 15:02:19 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D29E316A695 for ; Tue, 11 Jul 2006 15:02:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2E9343D73 for ; Tue, 11 Jul 2006 15:02:13 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6BF1qGb075013; Tue, 11 Jul 2006 11:01:52 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Tue, 11 Jul 2006 09:50:19 -0400 User-Agent: KMail/1.9.1 References: <20060710143810.61705f74@localhost> <20060711.005945.-1962671777.imp@bsdimp.com> In-Reply-To: <20060711.005945.-1962671777.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607110950.19841.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 11 Jul 2006 11:01:58 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1591/Mon Jul 10 15:41:02 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Subject: Re: Selectively disabling acpi sub-systems 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, 11 Jul 2006 15:02:19 -0000 On Tuesday 11 July 2006 02:59, M. Warner Losh wrote: > In message: <20060710143810.61705f74@localhost> > Fabian Keil writes: > : Could someone please tell me how to stop acpi0 from > : grabbing sio0, without affecting fxp0? > > Hack sio not to have a acpi attachment. Or wait for some work that > we're doing in current to be MFC'd :-) That still wouldn't help in his case. :) Probably fxp0's interrupt routing is busted in the non-ACPI case and to get ACPI to route PCI interrupts you need to have ACPI probe the device tree which would cause sio0 to be enumerated via ACPI. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 17:16:58 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE98016A4E0 for ; Tue, 11 Jul 2006 17:16:58 +0000 (UTC) (envelope-from gofda-freebsd-acpi@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 062DF43D78 for ; Tue, 11 Jul 2006 17:16:47 +0000 (GMT) (envelope-from gofda-freebsd-acpi@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G0Lqe-00048d-Oq for freebsd-acpi@freebsd.org; Tue, 11 Jul 2006 19:16:36 +0200 Received: from gw205.f5.com ([205.229.151.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Jul 2006 19:16:36 +0200 Received: from atkin901 by gw205.f5.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Jul 2006 19:16:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-acpi@freebsd.org From: othermark Date: Tue, 11 Jul 2006 10:16:21 -0700 Lines: 41 Message-ID: References: <20060711.005639.-233674225.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: gw205.f5.com User-Agent: KNode/0.10.2 Sender: news Subject: Re: sio0 wiring to a resource patch 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, 11 Jul 2006 17:16:59 -0000 M. Warner Losh wrote: > Please find enclosed an experimental patch. It does two things. [...] > Anyway, please test these patches out and let me know if you have > problems. > > Warner (sorry about the wrapping here) I tried to build it with a csup from this morning, and I get this compilation error: cc -c -O -pipe -march=pentiumpro -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -fformat-extensions -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror /usr/src/sys/dev/sio/sio_pci.c /usr/src/sys/dev/sio/sio_pci.c: In function `sio_pci_kludge_unit': /usr/src/sys/dev/sio/sio_pci.c:131: warning: implicit declaration of function `device_set_unit' /usr/src/sys/dev/sio/sio_pci.c:131: warning: nested extern declaration of `device_set_unit' *** Error code 1 Stop in /usr/obj/usr/src/sys/POGO. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. A full find on /usr/src only reveals that one instance of usage that needs to be changed. -- othermark atkin901 at nospam dot yahoo dot com (!wired)?(coffee++):(wired); From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 19:13:30 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64ED616A500 for ; Tue, 11 Jul 2006 19:13:30 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D81943D72 for ; Tue, 11 Jul 2006 19:13:28 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 12293 invoked from network); 11 Jul 2006 19:13:26 -0000 Received: from unknown (HELO localhost) (775067@[217.50.132.149]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 11 Jul 2006 19:13:26 -0000 Date: Tue, 11 Jul 2006 21:13:09 +0200 From: Fabian Keil Cc: freebsd-acpi@freebsd.org Message-ID: <20060711211309.3f327a41@localhost> In-Reply-To: <200607110950.19841.jhb@freebsd.org> References: <20060710143810.61705f74@localhost> <20060711.005945.-1962671777.imp@bsdimp.com> <200607110950.19841.jhb@freebsd.org> X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.19; i386-portbld-freebsd6.1) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_NKDNm2vxTxG6rDoQodmWnk8; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: Selectively disabling acpi sub-systems 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, 11 Jul 2006 19:13:30 -0000 --Sig_NKDNm2vxTxG6rDoQodmWnk8 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable John Baldwin wrote: > On Tuesday 11 July 2006 02:59, M. Warner Losh wrote: > > In message: <20060710143810.61705f74@localhost> > > Fabian Keil writes: > > : Could someone please tell me how to stop acpi0 from > > : grabbing sio0, without affecting fxp0? > >=20 > > Hack sio not to have a acpi attachment. Or wait for some work that > > we're doing in current to be MFC'd :-) >=20 > That still wouldn't help in his case. :) Probably fxp0's interrupt routi= ng is=20 > busted in the non-ACPI case and to get ACPI to route PCI interrupts you n= eed=20 > to have ACPI probe the device tree which would cause sio0 to be enumerate= d=20 > via ACPI. I only found one ACPI reference in sio and commenting it out did indeed change nothing. I don't have any ideas left for RELENG_6 and will jump to current tomorrow to try my luck there. Fabian --=20 http://www.fabiankeil.de/ --Sig_NKDNm2vxTxG6rDoQodmWnk8 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEs/hUjV8GA4rMKUQRAjEfAKDMZcMX/Almc3exJBsnhNuWzCx/aQCg3kiW IjciY5ZfIwlY4nGIJDlCzr4= =E2Xx -----END PGP SIGNATURE----- --Sig_NKDNm2vxTxG6rDoQodmWnk8-- From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 19:40:23 2006 Return-Path: X-Original-To: freebsd-acpi@hub.freebsd.org Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4350B16A4DF for ; Tue, 11 Jul 2006 19:40:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AD7143D76 for ; Tue, 11 Jul 2006 19:40:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6BJeMTf000571 for ; Tue, 11 Jul 2006 19:40:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6BJeMQt000570; Tue, 11 Jul 2006 19:40:22 GMT (envelope-from gnats) Date: Tue, 11 Jul 2006 19:40:22 GMT Message-Id: <200607111940.k6BJeMQt000570@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org From: Cy Schubert Cc: Subject: Re: kern/98171: [acpi] ACPI 1304 / 0501 errors on Acer 5024WLMi Laptop (probably on all 3020 / 5020 series) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cy Schubert List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 19:40:23 -0000 The following reply was made to PR kern/98171; it has been noted by GNATS. From: Cy Schubert To: bug-followup , William.Anderle@Alice.it Cc: Subject: Re: kern/98171: [acpi] ACPI 1304 / 0501 errors on Acer 5024WLMi Laptop (probably on all 3020 / 5020 series) Date: Tue, 11 Jul 2006 12:38:48 -0700 I recently purchased one of these puppies. The bug exists and it often affects battery monitoring. I suspect that since the machine came with a special chipset driver for XP, that "reverse engineering" or contacting the vendor might be a good place to start. I will see what I can do to help out. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org e**(i*pi)+1=0 From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 21:09:20 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E35716A4E2 for ; Tue, 11 Jul 2006 21:09:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88D5D43D7F for ; Tue, 11 Jul 2006 21:09:13 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k6BL7YUO046943; Tue, 11 Jul 2006 15:07:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 11 Jul 2006 15:07:42 -0600 (MDT) Message-Id: <20060711.150742.1649768833.imp@bsdimp.com> To: atkin901@yahoo.com From: "M. Warner Losh" In-Reply-To: References: <20060711.005639.-233674225.imp@bsdimp.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 11 Jul 2006 15:07:35 -0600 (MDT) Cc: freebsd-acpi@freebsd.org Subject: Re: sio0 wiring to a resource patch 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, 11 Jul 2006 21:09:20 -0000 In message: othermark writes: : M. Warner Losh wrote: : : > Please find enclosed an experimental patch. It does two things. : [...] : > Anyway, please test these patches out and let me know if you have : > problems. : > : > Warner : : (sorry about the wrapping here) : : I tried to build it with a csup from this morning, and I get this : compilation error: : : : cc -c -O -pipe -march=pentiumpro -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -fformat-extensions -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include : opt_global.h -fno-common -finline-limit=8000 --param : inline-unit-growth=100 --param : large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -Werror /usr/src/sys/dev/sio/sio_pci.c : /usr/src/sys/dev/sio/sio_pci.c: In function `sio_pci_kludge_unit': : /usr/src/sys/dev/sio/sio_pci.c:131: warning: implicit declaration of : function `device_set_unit' : /usr/src/sys/dev/sio/sio_pci.c:131: warning: nested extern declaration of : `device_set_unit' : *** Error code 1 : : Stop in /usr/obj/usr/src/sys/POGO. : *** Error code 1 : : Stop in /usr/src. : *** Error code 1 : : Stop in /usr/src. : : A full find on /usr/src only reveals that one instance of usage that needs : to be changed. Doh! I forgot to include that in my patch. My mistake. Comes from doing too many things in that branch. http://people.freebsd.org/~imp/wire-unit.diff Basically, delete the sio_pci_kludge_unit function, remove its declaration and the one place it calls it. Warner From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 11 23:19:40 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AF9A16A4DF for ; Tue, 11 Jul 2006 23:19:40 +0000 (UTC) (envelope-from sam_rajarathinam@yahoo.com) Received: from web34103.mail.mud.yahoo.com (web34103.mail.mud.yahoo.com [66.163.178.101]) by mx1.FreeBSD.org (Postfix) with SMTP id 9748043D58 for ; Tue, 11 Jul 2006 23:19:39 +0000 (GMT) (envelope-from sam_rajarathinam@yahoo.com) Received: (qmail 71873 invoked by uid 60001); 11 Jul 2006 23:19:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Dj4Cu4CgdBlQ0Q+2+asengD9lLGBVa3wdMpUkPfdJpy5O8FdGW1emZlnzAjQ7tF9chNMG5nkrLswkSU9CsdJjl2pOSPhx2epzOPZGlybb+ILGup0w9DVhLKCH8MthPJpHcYZDAjkJiSVlhaJufGoIKfkSML9oIsvrbQa4+VdQTc= ; Message-ID: <20060711231938.71871.qmail@web34103.mail.mud.yahoo.com> Received: from [65.200.185.165] by web34103.mail.mud.yahoo.com via HTTP; Tue, 11 Jul 2006 16:19:38 PDT Date: Tue, 11 Jul 2006 16:19:38 -0700 (PDT) From: Sam Rajarathinam To: freebsd-acpi@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: shutdown -p now does not power off the MotherBoard 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, 11 Jul 2006 23:19:40 -0000 I have a X86 Mother board which can be powered off from software command "shutdown -p now" using FreeBSD 5.1, 5.2 but not with 5.3, 5.4 or 6.1. Unfortunately the acpi diff between 5.2 and 5.3 is ~50000 lines. I see the tasks acpi tasks are started properly in 5.3, 5.4 or 6.1. Tried playing with asl file also using acpidump. I am not sure where to start looking. Any pointers? Thanks. -sam From owner-freebsd-acpi@FreeBSD.ORG Wed Jul 12 14:59:33 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F17016A500 for ; Wed, 12 Jul 2006 14:59:33 +0000 (UTC) (envelope-from gofda-freebsd-acpi@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAC5143D45 for ; Wed, 12 Jul 2006 14:59:32 +0000 (GMT) (envelope-from gofda-freebsd-acpi@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G0gAB-0001JW-Kh for freebsd-acpi@freebsd.org; Wed, 12 Jul 2006 16:58:07 +0200 Received: from ip244.gte215.dsl-acs2.sea.iinet.com ([209.20.215.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jul 2006 16:58:07 +0200 Received: from atkin901 by ip244.gte215.dsl-acs2.sea.iinet.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jul 2006 16:58:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-acpi@freebsd.org From: othermark Date: Wed, 12 Jul 2006 07:58:42 -0700 Lines: 61 Message-ID: References: <20060711.005639.-233674225.imp@bsdimp.com> <20060711.150742.1649768833.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip244.gte215.dsl-acs2.sea.iinet.com User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) In-Reply-To: <20060711.150742.1649768833.imp@bsdimp.com> Sender: news Subject: Re: sio0 wiring to a resource patch 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, 12 Jul 2006 14:59:33 -0000 M. Warner Losh wrote: > In message: > othermark writes: > : M. Warner Losh wrote: > : > : > Please find enclosed an experimental patch. It does two things. > : [...] > : > Anyway, please test these patches out and let me know if you have > : > problems. > : > > : > Warner > > Doh! I forgot to include that in my patch. My mistake. Comes from > doing too many things in that branch. > > http://people.freebsd.org/~imp/wire-unit.diff > > Basically, delete the sio_pci_kludge_unit function, remove its > declaration and the one place it calls it. That URL/page gives a 404, so I deleted sio_pci_kludge_unit function, declaration and it's call in sio_pci.c and compiled and installed a new kernel. I then removed the DSDT.aml and loader.conf files for the machine and rebooted. sio0 and sio1 were still backwards and device.hints in boot wasn't overruling the acpi info. When the machine boots up, I know that device.hints was loaded correctly from kenv, although sio0 was wired to 0x2f8 irq 3 hint.sio.0.at="isa" hint.sio.0.flags="0x10" hint.sio.0.irq="4" hint.sio.0.port="0x3F8" hint.sio.1.at="isa" hint.sio.1.irq="3" hint.sio.1.port="0x2F8" hint.sio.2.at="isa" hint.sio.2.disabled="1" hint.sio.2.irq="5" hint.sio.2.port="0x3E8" hint.sio.3.at="isa" hint.sio.3.disabled="1" hint.sio.3.irq="9" hint.sio.3.port="0x2E8" sio0: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 flags 0x10 on acpi0 sio0: type 16550A, console sio0: [FAST] sio1: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 on acpi0 sio1: type 16550A sio1: [FAST] In short, not working on this machine at least... Let me know what other information I can provide. -Mark From owner-freebsd-acpi@FreeBSD.ORG Wed Jul 12 22:41:55 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1058916A4E0 for ; Wed, 12 Jul 2006 22:41:55 +0000 (UTC) (envelope-from nate@root.org) Received: from ylpvm15.prodigy.net (ylpvm15-ext.prodigy.net [207.115.57.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8319743D49 for ; Wed, 12 Jul 2006 22:41:54 +0000 (GMT) (envelope-from nate@root.org) Received: from pimout7-ext.prodigy.net (pimout7-int.prodigy.net [207.115.4.147]) by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id k6CMfrEs001260 for ; Wed, 12 Jul 2006 18:41:54 -0400 X-ORBL: [67.119.74.222] Received: from [10.0.0.53] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by pimout7-ext.prodigy.net (8.13.6 out.dk/8.13.6) with ESMTP id k6CMfpPj139442; Wed, 12 Jul 2006 18:41:52 -0400 Message-ID: <44B57AA1.6080604@root.org> Date: Wed, 12 Jul 2006 15:41:37 -0700 From: Nate Lawson User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Fabian Keil References: <20060710143810.61705f74@localhost> <20060711.005945.-1962671777.imp@bsdimp.com> <200607110950.19841.jhb@freebsd.org> <20060711211309.3f327a41@localhost> In-Reply-To: <20060711211309.3f327a41@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: Selectively disabling acpi sub-systems 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, 12 Jul 2006 22:41:55 -0000 Fabian Keil wrote: > John Baldwin wrote: > >> On Tuesday 11 July 2006 02:59, M. Warner Losh wrote: >>> In message: <20060710143810.61705f74@localhost> >>> Fabian Keil writes: >>> : Could someone please tell me how to stop acpi0 from >>> : grabbing sio0, without affecting fxp0? >>> >>> Hack sio not to have a acpi attachment. Or wait for some work that >>> we're doing in current to be MFC'd :-) >> That still wouldn't help in his case. :) Probably fxp0's interrupt routing is >> busted in the non-ACPI case and to get ACPI to route PCI interrupts you need >> to have ACPI probe the device tree which would cause sio0 to be enumerated >> via ACPI. > > I only found one ACPI reference in sio and commenting it out > did indeed change nothing. I don't have any ideas left > for RELENG_6 and will jump to current tomorrow to try my luck > there. ACPI doesn't change much for sio devices. It's basically ISA with the resource being provided by the _CRS value in the AML (instead of by /boot/*.hints). -- Nate From owner-freebsd-acpi@FreeBSD.ORG Thu Jul 13 05:14:07 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8ECF16A4DA for ; Thu, 13 Jul 2006 05:14:07 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC9D943D4C for ; Thu, 13 Jul 2006 05:14:06 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 1861 invoked from network); 13 Jul 2006 05:14:04 -0000 Received: from unknown (HELO localhost) (775067@[217.50.128.22]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 13 Jul 2006 05:14:04 -0000 Date: Thu, 13 Jul 2006 07:13:51 +0200 From: Fabian Keil To: Nate Lawson Message-ID: <20060713071351.272180f2@localhost> In-Reply-To: <44B57AA1.6080604@root.org> References: <20060710143810.61705f74@localhost> <20060711.005945.-1962671777.imp@bsdimp.com> <200607110950.19841.jhb@freebsd.org> <20060711211309.3f327a41@localhost> <44B57AA1.6080604@root.org> X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.19; i386-portbld-freebsd6.1) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_jfj1telbyG1/7G=_.V1FTvP"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-acpi@freebsd.org Subject: Re: Selectively disabling acpi sub-systems 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: Thu, 13 Jul 2006 05:14:08 -0000 --Sig_jfj1telbyG1/7G=_.V1FTvP Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Nate Lawson wrote: > Fabian Keil wrote: > > John Baldwin wrote: > >=20 > >> On Tuesday 11 July 2006 02:59, M. Warner Losh wrote: > >>> In message: <20060710143810.61705f74@localhost> > >>> Fabian Keil writes: > >>> : Could someone please tell me how to stop acpi0 from > >>> : grabbing sio0, without affecting fxp0? > >>> > >>> Hack sio not to have a acpi attachment. Or wait for some work that > >>> we're doing in current to be MFC'd :-) > >> That still wouldn't help in his case. :) Probably fxp0's interrupt ro= uting is=20 > >> busted in the non-ACPI case and to get ACPI to route PCI interrupts yo= u need=20 > >> to have ACPI probe the device tree which would cause sio0 to be enumer= ated=20 > >> via ACPI. > >=20 > > I only found one ACPI reference in sio and commenting it out > > did indeed change nothing. I don't have any ideas left > > for RELENG_6 and will jump to current tomorrow to try my luck > > there. >=20 > ACPI doesn't change much for sio devices. It's basically ISA with the=20 > resource being provided by the _CRS value in the AML (instead of by=20 > /boot/*.hints). What I meant was: sio0 is still attached on acpi0. Either John is right or I was looking at the wrong places. I'm currently testing if polling changes anything. I can't tell yet if it increases the uptime, but at least the permanent sio lock is gone. Fabian --=20 http://www.fabiankeil.de/ --Sig_jfj1telbyG1/7G=_.V1FTvP Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEtdaajV8GA4rMKUQRAhzmAJ4tLgIzM8nun0upS0CR4qiPFf4IZQCfYKjt fOXpcnBn4KHM+fOTvTU+MW8= =e5hT -----END PGP SIGNATURE----- --Sig_jfj1telbyG1/7G=_.V1FTvP-- From owner-freebsd-acpi@FreeBSD.ORG Fri Jul 14 00:06:28 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 761B316A4DA; Fri, 14 Jul 2006 00:06:28 +0000 (UTC) (envelope-from john@utzweb.net) Received: from marley.grokthis.net (marley.grokthis.net [69.93.78.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF64143D45; Fri, 14 Jul 2006 00:06:27 +0000 (GMT) (envelope-from john@utzweb.net) Received: from utzweb.net (marley.grokthis.net [127.0.0.1]) by marley.grokthis.net (Postfix) with ESMTP id C784DF1464; Thu, 13 Jul 2006 20:06:32 -0400 (EDT) Received: from 69.93.78.27 (proxying for 216.254.62.194) (SquirrelMail authenticated user john-utzweb-net); by utzweb.net with HTTP; Thu, 13 Jul 2006 20:06:32 -0400 (EDT) Message-ID: <34247.69.93.78.27.1152835592.squirrel@69.93.78.27> In-Reply-To: <32884.69.93.78.27.1152831695.squirrel@69.93.78.27> References: <20060711.104708.1159134898.imp@bsdimp.com> <200607111338.01412.mistry.7@osu.edu> <200607122136.54293.mistry.7@osu.edu> <44B6401F.8050507@centtech.com> <44B641F2.2020500@centtech.com> <32884.69.93.78.27.1152831695.squirrel@69.93.78.27> Date: Thu, 13 Jul 2006 20:06:32 -0400 (EDT) From: john@utzweb.net To: freebsd-acpi@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-mobile@freebsd.org Subject: Re: Dell/acpi_video hw.acpi.video.out0 is probably a bug, and an important one. Re: Dell laptops 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: Fri, 14 Jul 2006 00:06:28 -0000 Self Reply, i am moving this over to freebsd-acpi with this additional set of facts.... > Hijacking this a bit, but it's very relevant IMHO > >> On Thu, 13 Jul 2006, Eric Anderson wrote: >> >>> On 07/13/06 07:50, Daniel Eischen wrote: >>>> On Thu, 13 Jul 2006, Eric Anderson wrote: >>>> >>>>> And then if you do: >>>>> >>>>> sysctl hw.acpi.video.out0.active=1 >>>>> and then >>>>> sysctl hw.acpi.video.out0.active=0 >>>>> >>>>> Does your screen do something? >>>> >>>> Yes, hw.acpi.video.out0.active=1 seems to switch to the CRT, >>>> but once there, setting it back to 0 does not bring it back. >>>> Fn + CRT/LCD also has no effect. The only way to get it back >>>> is to reboot. >>>> >>> >>> Did you try to do this too: >>> >>> sysctl hw.acpi.video.out1.active=1 >>> >>> Or some other combinations? >>> >>> Sounds like it works ok, you just need to figure out which outputs map >>> to >>> your LCD/CRT/etc. > > So, if you look at: > > /usr/src/sys/dev/acpicaacpi_video.c::acpi_video_vo_init() > > you will notice that 'out' is what you get when you fall out of the > switch: > > switch (adr & DOD_DEVID_MASK) { > case DOD_DEVID_MONITOR: > desc = "CRT monitor"; > type = "crt"; > voqh = &crt_units; > break; > case DOD_DEVID_PANEL: > desc = "LCD panel"; > type = "lcd"; > voqh = &lcd_units; > break; > case DOD_DEVID_TV: > desc = "TV"; > type = "tv"; > voqh = &tv_units; > break; > default: > desc = "unknown output"; > type = "out"; > voqh = &other_units; > } > > > my Latitude C400 (i830M) also shows up with out0 and i am highly confident > that what *should* be happening is that it should be *winning* at lcd. > > when i was running 6.1-RELEASE i tried h3xoring the switch to have the lcd > be the default case but that didnt seem to help anything and i have not > tried the selfsame hack since switching over to CURRENT ( for the first > time since i started using FreeBSD back in 10/93!). > > the switch is quite simple, so it really looks like there are only two > things that could be wrong: > > 1. either the addr passed as the inparm (UNIT32 adr) is wrong > > 2. the bit's at the address are screwed up so that the dont make the mask. > > > my devguy gut votes for 2, but i have yet to debug...urmm printf this > thing again. > > so who the hell is acpi_video asking? > > anybody know? i am resisting an impolite cross-post to freebsd-acpi based > on the assumption that anybody who knows anything over there is probably > on this list too. > > i suspect that untwisting this will probably break the logjam on several > dell acpi annoyances. > > X obviously get's it right, where is the fork in the road between X and > ACPI? > > i *will* figure this out, but if anybody has any thoughts they wanted to > chime in with, i would love to read them! further facts,does this VID entry look reasonable? Device (VID) { Name (_ADR, 0x00020000) Method (_DOS, 1, NotSerialized) { Store (Arg0, MIS4) SMI (0x9E, MIS4) } Method (_DOD, 0, NotSerialized) { Return (Package (0x02) { 0x00010100, 0x00010400 }) } Device (CRT) { Method (_ADR, 0, NotSerialized) { Return (0x0100) } Method (_DCS, 0, NotSerialized) { Store (SMI (0x8E, 0x01), Local0) Return (Local0) } Method (_DGS, 0, NotSerialized) { Store (SMI (0x99, 0x01), Local0) Return (Local0) } Method (_DSS, 1, NotSerialized) { DSS (0x01, Arg0) } } Device (LCD) { Method (_ADR, 0, NotSerialized) { Return (0x0400) } Method (_DCS, 0, NotSerialized) { Store (SMI (0x8E, 0x02), Local0) Return (Local0) } Method (_DGS, 0, NotSerialized) { Store (SMI (0x99, 0x02), Local0) Return (Local0) } Method (_DSS, 1, NotSerialized) { DSS (0x02, Arg0) } } } what is also worthy of note is this empty VID2 entry: Device (VID2) { Name (_ADR, 0x00020001) Method (_DOS, 1, NotSerialized) { } Method (_DOD, 0, NotSerialized) { Return (Package (0x00) {}) } } evidently, our ACPI code believes this to be bogus (correctly, i think), because the dmesg shows a complaint: pcib0: port 0xcf8-0xcff on acpi0 pci_link1: BIOS IRQ 11 for 0.31.INTB is invalid pci0: on pcib0 vgapci0: mem 0xe0000000-0xe7ffffff,0xf4f80000-0xf4ffffff irq 11 at device 2.0 on pci0 agp0: on vgapci0 agp0: detected 892k stolen memory agp0: aperture size is 128M acpi_video0: on vgapci0 drm0: on vgapci0 info: [drm] AGP at 0xe0000000 128MB info: [drm] Initialized i915 1.4.0 20060119 vgapci1: mem 0xd8000000-0xdfffffff,0xf4f00000-0xf4f7ffff at device 2.1 on pci0 acpi_video1: on vgapci1 evaluation of \\_SB_.PCI0.VID2._DOD makes no sense <--- WARNING HERE drm1: on vgapci1 info: [drm] AGP at 0xe0000000 128MB info: [drm] Initialized i915 1.4.0 20060119 does this jog anybody's cranium? what does the VID stuff look like on laptops where the video portion of sus/res actually works? > tnx! > > johnu > > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org" > > From owner-freebsd-acpi@FreeBSD.ORG Fri Jul 14 06:05:58 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9BAD16A4DD; Fri, 14 Jul 2006 06:05:58 +0000 (UTC) (envelope-from john@utzweb.net) Received: from marley.grokthis.net (marley.grokthis.net [69.93.78.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 663E943D53; Fri, 14 Jul 2006 06:05:40 +0000 (GMT) (envelope-from john@utzweb.net) Received: from utzweb.net (marley.grokthis.net [127.0.0.1]) by marley.grokthis.net (Postfix) with ESMTP id 7AAD1F1467; Fri, 14 Jul 2006 02:05:40 -0400 (EDT) Received: from 69.93.78.27 (proxying for 24.22.134.170) (SquirrelMail authenticated user john-utzweb-net); by utzweb.net with HTTP; Fri, 14 Jul 2006 02:05:40 -0400 (EDT) Message-ID: <39062.69.93.78.27.1152857140.squirrel@69.93.78.27> In-Reply-To: <34247.69.93.78.27.1152835592.squirrel@69.93.78.27> References: <20060711.104708.1159134898.imp@bsdimp.com> <200607111338.01412.mistry.7@osu.edu> <200607122136.54293.mistry.7@osu.edu> <44B6401F.8050507@centtech.com> <44B641F2.2020500@centtech.com> <32884.69.93.78.27.1152831695.squirrel@69.93.78.27> <34247.69.93.78.27.1152835592.squirrel@69.93.78.27> Date: Fri, 14 Jul 2006 02:05:40 -0400 (EDT) From: john@utzweb.net To: john@utzweb.net User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org Subject: Patch to fix this Re: Dell/acpi_video hw.acpi.video.out0 is probably a bug, and an important one. Re: Dell laptops 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: Fri, 14 Jul 2006 06:05:59 -0000 acpi_video.c expects the lcd to be identified as 0x0110, but my Dell Latitude C400 (and probably others) id's the lcd at 0x0400: Device (LCD) { Method (_ADR, 0, NotSerialized) { Return (0x0400) } so, acpi_video needs to account for this. got this sorted, and now the display turns back on, here's the patch, i already send-pr'd it spaz@minime /usr/home/spaz]$ diff -u acpi_videoorig.c acpi_video.c --- acpi_videoorig.c Thu Jul 13 22:44:40 2006 +++ acpi_video.c Thu Jul 13 22:44:28 2006 @@ -113,6 +113,7 @@ #define DOD_DEVID_MONITOR 0x0100 #define DOD_DEVID_PANEL 0x0110 #define DOD_DEVID_TV 0x0200 +#define DOD_DEVID_LCD 0x0400 #define DOD_BIOS (1 << 16) #define DOD_NONVGA (1 << 17) #define DOD_HEAD_ID_SHIFT 18 @@ -416,6 +417,7 @@ voqh = &crt_units; break; case DOD_DEVID_PANEL: + case DOD_DEVID_LCD: desc = "LCD panel"; type = "lcd"; voqh = &lcd_units; @@ -558,6 +560,7 @@ voqh = &crt_units; break; case DOD_DEVID_PANEL: + case DOD_DEVID_LCD: voqh = &lcd_units; break; case DOD_DEVID_TV: [spaz@minime /usr/home/spaz]$ > Self Reply, i am moving this over to freebsd-acpi with this additional set > of facts.... > >> Hijacking this a bit, but it's very relevant IMHO >> >>> On Thu, 13 Jul 2006, Eric Anderson wrote: >>> >>>> On 07/13/06 07:50, Daniel Eischen wrote: >>>>> On Thu, 13 Jul 2006, Eric Anderson wrote: >>>>> >>>>>> And then if you do: >>>>>> >>>>>> sysctl hw.acpi.video.out0.active=1 >>>>>> and then >>>>>> sysctl hw.acpi.video.out0.active=0 >>>>>> >>>>>> Does your screen do something? >>>>> >>>>> Yes, hw.acpi.video.out0.active=1 seems to switch to the CRT, >>>>> but once there, setting it back to 0 does not bring it back. >>>>> Fn + CRT/LCD also has no effect. The only way to get it back >>>>> is to reboot. >>>>> >>>> >>>> Did you try to do this too: >>>> >>>> sysctl hw.acpi.video.out1.active=1 >>>> >>>> Or some other combinations? >>>> >>>> Sounds like it works ok, you just need to figure out which outputs map >>>> to >>>> your LCD/CRT/etc. >> >> So, if you look at: >> >> /usr/src/sys/dev/acpicaacpi_video.c::acpi_video_vo_init() >> >> you will notice that 'out' is what you get when you fall out of the >> switch: >> >> switch (adr & DOD_DEVID_MASK) { >> case DOD_DEVID_MONITOR: >> desc = "CRT monitor"; >> type = "crt"; >> voqh = &crt_units; >> break; >> case DOD_DEVID_PANEL: >> desc = "LCD panel"; >> type = "lcd"; >> voqh = &lcd_units; >> break; >> case DOD_DEVID_TV: >> desc = "TV"; >> type = "tv"; >> voqh = &tv_units; >> break; >> default: >> desc = "unknown output"; >> type = "out"; >> voqh = &other_units; >> } >> >> >> my Latitude C400 (i830M) also shows up with out0 and i am highly >> confident >> that what *should* be happening is that it should be *winning* at lcd. >> >> when i was running 6.1-RELEASE i tried h3xoring the switch to have the >> lcd >> be the default case but that didnt seem to help anything and i have not >> tried the selfsame hack since switching over to CURRENT ( for the first >> time since i started using FreeBSD back in 10/93!). >> >> the switch is quite simple, so it really looks like there are only two >> things that could be wrong: >> >> 1. either the addr passed as the inparm (UNIT32 adr) is wrong >> >> 2. the bit's at the address are screwed up so that the dont make the >> mask. >> >> >> my devguy gut votes for 2, but i have yet to debug...urmm printf this >> thing again. >> >> so who the hell is acpi_video asking? >> >> anybody know? i am resisting an impolite cross-post to freebsd-acpi >> based >> on the assumption that anybody who knows anything over there is probably >> on this list too. >> >> i suspect that untwisting this will probably break the logjam on several >> dell acpi annoyances. >> >> X obviously get's it right, where is the fork in the road between X and >> ACPI? >> >> i *will* figure this out, but if anybody has any thoughts they wanted to >> chime in with, i would love to read them! > > further facts,does this VID entry look reasonable? > > > Device (VID) > { > Name (_ADR, 0x00020000) > Method (_DOS, 1, NotSerialized) > { > Store (Arg0, MIS4) > SMI (0x9E, MIS4) > } > > Method (_DOD, 0, NotSerialized) > { > Return (Package (0x02) > { > 0x00010100, > 0x00010400 > }) > } > > Device (CRT) > { > Method (_ADR, 0, NotSerialized) > { > Return (0x0100) > } > > Method (_DCS, 0, NotSerialized) > { > Store (SMI (0x8E, 0x01), Local0) > Return (Local0) > } > > Method (_DGS, 0, NotSerialized) > { > Store (SMI (0x99, 0x01), Local0) > Return (Local0) > } > > Method (_DSS, 1, NotSerialized) > { > DSS (0x01, Arg0) > } > } > > Device (LCD) > { > Method (_ADR, 0, NotSerialized) > { > Return (0x0400) > } > > Method (_DCS, 0, NotSerialized) > { > Store (SMI (0x8E, 0x02), Local0) > Return (Local0) > } > > Method (_DGS, 0, NotSerialized) > { > Store (SMI (0x99, 0x02), Local0) > Return (Local0) > } > > Method (_DSS, 1, NotSerialized) > { > DSS (0x02, Arg0) > } > } > } > > what is also worthy of note is this empty VID2 entry: > > > Device (VID2) > { > Name (_ADR, 0x00020001) > Method (_DOS, 1, NotSerialized) > { > } > > Method (_DOD, 0, NotSerialized) > { > Return (Package (0x00) {}) > } > } > > evidently, our ACPI code believes this to be bogus (correctly, i think), > because the dmesg shows a complaint: > pcib0: port 0xcf8-0xcff on acpi0 > pci_link1: BIOS IRQ 11 for 0.31.INTB is invalid > pci0: on pcib0 > vgapci0: mem > 0xe0000000-0xe7ffffff,0xf4f80000-0xf4ffffff irq 11 at device 2.0 on pci0 > agp0: on vgapci0 > agp0: detected 892k stolen memory > agp0: aperture size is 128M > acpi_video0: on vgapci0 > drm0: on vgapci0 > info: [drm] AGP at 0xe0000000 128MB > info: [drm] Initialized i915 1.4.0 20060119 > vgapci1: mem > 0xd8000000-0xdfffffff,0xf4f00000-0xf4f7ffff at device 2.1 on pci0 > acpi_video1: on vgapci1 > > evaluation of \\_SB_.PCI0.VID2._DOD makes no sense <--- WARNING HERE > > > drm1: on vgapci1 > info: [drm] AGP at 0xe0000000 128MB > info: [drm] Initialized i915 1.4.0 20060119 > > > does this jog anybody's cranium? what does the VID stuff look like on > laptops where the video portion of sus/res actually works? > >> tnx! >> >> johnu >> >> _______________________________________________ >> freebsd-mobile@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-mobile >> To unsubscribe, send any mail to >> "freebsd-mobile-unsubscribe@freebsd.org" >> >> > > > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org" > > From owner-freebsd-acpi@FreeBSD.ORG Fri Jul 14 07:06:35 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE31516A4DA; Fri, 14 Jul 2006 07:06:35 +0000 (UTC) (envelope-from cfaber@ruckusmail.com) Received: from unixgr.com (unixgr.com [63.224.69.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB09543D66; Fri, 14 Jul 2006 07:06:32 +0000 (GMT) (envelope-from cfaber@ruckusmail.com) Received: from [192.168.0.71] (c-24-8-35-213.hsd1.co.comcast.net [24.8.35.213]) (authenticated bits=0) by unixgr.com (8.13.3/8.13.3) with ESMTP id k6E8DCZ7015183; Fri, 14 Jul 2006 02:13:13 -0600 (MDT) (envelope-from cfaber@ruckusmail.com) X-Authentication-Warning: unixgr.com: Host c-24-8-35-213.hsd1.co.comcast.net [24.8.35.213] claimed to be [192.168.0.71] Message-ID: <44B74273.6060802@ruckusmail.com> Date: Fri, 14 Jul 2006 01:06:27 -0600 From: Colin Faber User-Agent: Thunderbird 1.5.0.4 (X11/20060708) MIME-Version: 1.0 To: john@utzweb.net References: <20060711.104708.1159134898.imp@bsdimp.com> <20060711114633.G67466@orthanc.ca> <44B54E3A.9040102@ruckusmail.com> <44B554AA.20009@telia.com> <33711.69.93.78.27.1152834137.squirrel@69.93.78.27> In-Reply-To: <33711.69.93.78.27.1152834137.squirrel@69.93.78.27> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org, Carl Gustavsson , mobile@freebsd.org Subject: Re: Dell laptops 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: Fri, 14 Jul 2006 07:06:36 -0000 john@utzweb.net wrote: >> Colin Faber wrote: >> >>> I'm running -CURRENT on a D610 with working crt/lcd Fn switch, bge, >>> wireless (via ndis), sound, video (including DRM/DRI), est (via >>> powerd), and Lid switch control. >>> >>> The only problems I've noticed so far is that when running est with >>> powerd in adaptive mode, it seems to adjust the cpu timing many times >>> a second, which has lead to some applications being unstable and or >>> performing horribly (the most notable would be audio applications, >>> each time the cpu timing is switch you hear a pause). >>> > > aha! now i get it, the same thing happens with powerd, i notice the > hiccups when i am listening to something. > > perhaps there is an unutilized hardware callback somewhere that can inform > powerd/est that the audio device is in use and that it shouldnt toggle the > cpu..... > Possibly. Digging into this a little bit deeper I've also noticed that mplayer will pause when I close the lid. All this does is result in a devd callback to a script called Lid in /etc/rc.d that I wrote. This in turn issues a simple sysctl hw.acpi.video.lcd0.active=0 when closed and =1 when open. Maybe the ACPI system it self is resulting in the hiccups. From owner-freebsd-acpi@FreeBSD.ORG Fri Jul 14 11:00:53 2006 Return-Path: X-Original-To: freebsd-acpi@FreeBSD.org Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B221016A4E8 for ; Fri, 14 Jul 2006 11:00:53 +0000 (UTC) (envelope-from huangxiangkui@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FC7243D46 for ; Fri, 14 Jul 2006 11:00:52 +0000 (GMT) (envelope-from huangxiangkui@gmail.com) Received: by nf-out-0910.google.com with SMTP id g2so146906nfe for ; Fri, 14 Jul 2006 04:00:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=td7wAOiFQ9cPu1N7J7DAoob7S9MjG849ixbdfmnyAbuJ4jo/n5HXLICMWf57yXyNEhzh/DZ3pItpmT4pyzCzMvKN0tjj1j19EJG78LeP7PsVGQpdHU5YTJSZCPFBqdfBCe4Hl6SjeZtV6Y1j5TKVfRxpgd2RziHdeEBlyatiGXk= Received: by 10.48.210.20 with SMTP id i20mr1815854nfg; Fri, 14 Jul 2006 04:00:51 -0700 (PDT) Received: by 10.48.208.6 with HTTP; Fri, 14 Jul 2006 04:00:49 -0700 (PDT) Message-ID: Date: Fri, 14 Jul 2006 19:00:49 +0800 From: huangxiangkui@gmail.com To: freebsd-acpi@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: My FreeBSD couldn't work well with the acpi of my notebook. 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: Fri, 14 Jul 2006 11:00:53 -0000 My FreeBSD couldn't work well with the acpi of my notebook. My Operating System is FreeBSD release 6.1 My notebook is HP Pavilion ze2205au. I use dmesg get the information be like below. ============================ Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Mobile AMD Sempron(tm) Processor 3000+ (1794.79-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x20fc2 Stepping = 2 Features=0x78bfbff Features2=0x1 AMD Features=0xc2500800 AMD Features2=0x1 real memory = 233766912 (222 MB) avail memory = 219234304 (209 MB) ACPI APIC Table: ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: Overriding SCI Interrupt from IRQ 9 to IRQ 21 acpi0: Power Button (fixed) ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f633c0 StartNode 0xc1f633c0 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._CRS] (Node 0xc1f633c0), AE_NOT_FOUND ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f633c0 StartNode 0xc1f633c0 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._CRS] (Node 0xc1f633c0), AE_NOT_FOUND ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f63400 StartNode 0xc1f63400 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._PRS] (Node 0xc1f63400), AE_NOT_FOUND pci_link8: Unable to parse _CRS or _PRS: AE_NOT_FOUND device_attach: pci_link8 attach returned 6 acpi_ec0: port 0x62,0x66 on acpi0 Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f633c0 StartNode 0xc1f633c0 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._CRS] (Node 0xc1f633c0), AE_NOT_FOUND ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f63400 StartNode 0xc1f63400 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._PRS] (Node 0xc1f63400), AE_NOT_FOUND pci_link8: Unable to parse _CRS or _PRS: AE_NOT_FOUND device_attach: pci_link8 attach returned 6 cpu0: on acpi0 acpi_throttle0: on cpu0 acpi_button0: on acpi0 acpi_button1: on acpi0 acpi_lid0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 5.0 (no driver attached) ohci0: mem 0xd0000000-0xd0000fff irq 19 at device 19.0 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 4 ports with 4 removable, self powered ohci1: mem 0xd0001000-0xd0001fff irq 19 at device 19.1 on pci0 ohci1: [GIANT-LOCKED] usb1: OHCI version 1.0, legacy support usb1: SMM does not respond, resetting usb1: on ohci1 usb1: USB revision 1.0 uhub1: ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 4 ports with 4 removable, self powered ehci0: mem 0xd0002000-0xd0002fff irq 19 at device 19.2 on pci0 ehci0: [GIANT-LOCKED] usb2: EHCI version 1.0 usb2: companion controllers, 4 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: ATI EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub2: 8 ports with 8 removable, self powered pci0: at device 20.0 (no driver attached) atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x8410-0x841f at device 20.1 on pci0 ata0: on atapci0 ata1: on atapci0 isab0: at device 20.3 on pci0 isa0: on isab0 pcib2: at device 20.4 on pci0 pci5: on pcib2 rl0: port 0xa000-0xa0ff mem 0xd0206000-0xd02060ff irq 18 at device 0.0 on pci5 miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:16:36:18:10:9f cbb0: at device 9.0 on pci5 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 fwohci0: <1394 Open Host Controller Interface> mem 0xd0206800-0xd0206fff,0xd0200000-0xd0203fff irq 22 at device 9.2 on pci5 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:c0:9f:00:00:85:7a:e2 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:c0:9f:85:7a:e2 fwe0: Ethernet address: 02:c0:9f:85:7a:e2 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc000ffc0, gen=2, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) fwohci0: phy int pci5: at device 9.3 (no driver attached) pci5: at device 9.4 (no driver attached) pcm0: mem 0xd0003400-0xd00034ff irq 17 at device 20.5 on pci0 pci0: at device 20.6 (no driver attached) acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse, device ID 3 acpi_acad0: on acpi0 battery0: on acpi0 ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f633c0 StartNode 0xc1f633c0 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._CRS] (Node 0xc1f633c0), AE_NOT_FOUND ACPI-0438: *** Error: Looking up [UPRS] in namespace, AE_NOT_FOUND SearchNode 0xc1f63400 StartNode 0xc1f63400 ReturnNode 0 ACPI-1304: *** Error: Method execution failed [\\_SB_.PCI0.LPC0.LNKU._PRS] (Node 0xc1f63400), AE_NOT_FOUND pci_link8: Unable to parse _CRS or _PRS: AE_NOT_FOUND device_attach: pci_link8 attach returned 6 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcffff,0xd0000-0xd0fff,0xdc000-0xdffff,0xe0000-0xe3fff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 1794787325 Hz quality 800 Timecounters tick every 1.000 msec ad0: 38154MB at ata0-master UDMA100 acd0: CDRW at ata1-master PIO4 pcm0: Trying to mount root from ufs:/dev/ad0s3a ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to deny, logging disabled ums0: Logitech USB Receiver, rev 1.10/20.10, addr 2, iclass 3/1 ums0: 16 buttons and Z dir. ============================================================ I use acpidump -d -t get the information be like below. ===================================== /* RSD PTR: OEM=HP, ACPI_Rev=1.0x (0) RSDT=0x0def8ad8, cksum=107 */ /* RSDT: Length=52, Revision=1, Checksum=48, OEMID=HP, OEM Table ID=3091, OEM Revision=0x20041209, Creator ID= LTP, Creator Revision=0x0 Entries={ 0x0defee2a, 0x0defee9e, 0x0defef74, 0x0defefc4 } */ /* FACP: Length=116, Revision=1, Checksum=124, OEMID=HP, OEM Table ID=3091, OEM Revision=0x20041209, Creator ID=PTL, Creator Revision=0x5f FACS=0xdefffc0, DSDT=0xdef8b0c INT_MODEL=PIC Preferred_PM_Profile=Unspecified (0) SCI_INT=9 SMI_CMD=0xb0, ACPI_ENABLE=0xf0, ACPI_DISABLE=0xf1, S4BIOS_REQ=0x0 PSTATE_CNT=0x0 PM1a_EVT_BLK=0x8000-0x8003 PM1b_EVT_BLK=0x8104-0x8107 PM1a_CNT_BLK=0x8004-0x8005 PM2_CNT_BLK=0x8100-0x8100 PM_TMR_BLK=0x8008-0x800b GPE0_BLK=0x8020-0x8027 P_LVL2_LAT=18 us, P_LVL3_LAT=1001 us FLUSH_SIZE=0, FLUSH_STRIDE=0 DUTY_OFFSET=1, DUTY_WIDTH=3 DAY_ALRM=13, MON_ALRM=0, CENTURY=0 IAPC_BOOT_ARCH= Flags={WBINVD,PROC_C1,SLP_BUTTON,RTC_S4,TMR_VAL_EXT} */ /* FACS: Length=64, HwSig=0x00000000, Firm_Wake_Vec=0x00000000 Global_Lock= Flags= Version=0 */ /* DSDT: Length=25374, Revision=1, Checksum=215, OEMID=HP, OEM Table ID=3091, OEM Revision=0x20041209, Creator ID=MSFT, Creator Revision=0x100000e */ /* SSDT: Length=214, Revision=1, Checksum=141, OEMID=PTLTD, OEM Table ID=POWERNOW, OEM Revision=0x20041209, Creator ID= LTP, Creator Revision=0x1 */ /* APIC: Length=80, Revision=1, Checksum=104, OEMID=PTLTD, OEM Table ID= 3091, OEM Revision=0x20041209, Creator ID= LTP, Creator Revision=0x0 Local APIC ADDR=0xfee00000 Flags={PC-AT} Type=Local APIC ACPI CPU=0 Flags={ENABLED} APIC ID=0 Type=IO APIC APIC ID=1 INT BASE=0 ADDR=0x00000000fec00000 Type=INT Override BUS=0 IRQ=9 INTR=21 Flags={Polarity=active-lo, Trigger=level} Type=Local NMI ACPI CPU=0 LINT Pin=1 Flags={Polarity=active-hi, Trigger=edge} */ /* MCFG: Length=60, Revision=1, Checksum=50, OEMID=PTLTD, OEM Table ID= MCFG, OEM Revision=0x20041209, Creator ID= LTP, Creator Revision=0x0 Base Address= 0x00000000e0000000 Segment Group= 0x0000 Start Bus= 0 End Bus= 0 */ /* * Intel ACPI Component Architecture * AML Disassembler version 20041119 * * Disassembly of /tmp/acpidump.Zi9CRU, Fri Jul 14 18:50:59 2006 */ DefinitionBlock ("DSDT.aml", "DSDT", 1, "HP ", "3091 ", 537137673) { Name (Z000, 0x01) Name (Z001, 0x02) Name (Z002, 0x04) Name (Z003, 0x08) Name (Z004, 0x00) Name (Z005, 0x0F) Name (Z006, 0x0D) Name (Z007, 0x0B) Name (Z008, 0x09) Method (VTOB, 1, NotSerialized) { Store (0x01, Local0) ShiftLeft (Local0, Arg0, Local0) Return (Local0) } Method (BTOV, 1, NotSerialized) { ShiftRight (Arg0, 0x01, Local0) Store (0x00, Local1) While (Local0) { Increment (Local1) ShiftRight (Local0, 0x01, Local0) } Return (Local1) } Method (MKWD, 2, NotSerialized) { If (And (Arg1, 0x80)) { Store (0xFFFF0000, Local0) } Else { Store (Zero, Local0) } Or (Local0, Arg0, Local0) Or (Local0, ShiftLeft (Arg1, 0x08), Local0) Return (Local0) } Method (POSW, 1, NotSerialized) { If (And (Arg0, 0x8000)) { If (LEqual (Arg0, 0xFFFF)) { Return (0xFFFFFFFF) } Else { Not (Arg0, Local0) Increment (Local0) And (Local0, 0xFFFF, Local0) Return (Local0) } } Else { Return (Arg0) } } Method (GBFE, 3, NotSerialized) { CreateByteField (Arg0, Arg1, TIDX) Store (TIDX, Arg2) } Method (PBFE, 3, NotSerialized) { CreateByteField (Arg0, Arg1, TIDX) Store (Arg2, TIDX) } Method (ITOS, 1, NotSerialized) { Store (Buffer (0x09) { 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, Local0) Store (Buffer (0x11) { "0123456789ABCDEF" }, Local7) Store (0x08, Local1) Store (0x00, Local2) Store (0x00, Local3) While (Local1) { Decrement (Local1) And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4) If (Local4) { Store (Ones, Local3) } If (Local3) { GBFE (Local7, Local4, RefOf (Local5)) PBFE (Local0, Local2, Local5) Increment (Local2) } } Return (Local0) } Name (WIRE, 0x00) Scope (\_PR) { Processor (CPU0, 0x00, 0x00008010, 0x06) {} } Name (_S0, Package (0x04) { 0x00, 0x00, 0x00, 0x00 }) Name (_S3, Package (0x04) { 0x03, 0x03, 0x00, 0x00 }) Name (_S4, Package (0x04) { 0x04, 0x04, 0x00, 0x00 }) Name (_S5, Package (0x04) { 0x05, 0x05, 0x00, 0x00 }) OperationRegion (\DEBG, SystemIO, 0x80, 0x01) Field (\DEBG, ByteAcc, NoLock, Preserve) { DBGP, 8 } OperationRegion (\PMIO, SystemIO, 0x0CD6, 0x02) Field (\PMIO, ByteAcc, NoLock, Preserve) { PIDX, 8, PDAT, 8 } OperationRegion (GPE0, SystemIO, 0x8024, 0x04) Field (GPE0, ByteAcc, NoLock, Preserve) { , 4, PMEE, 1, , 4, A97E, 1 } OperationRegion (\P01, SystemIO, 0x8001, 0x01) Field (\P01, ByteAcc, NoLock, Preserve) { PST1, 8 } Name (HTTX, 0x00) Method (_PTS, 1, NotSerialized) { Store (0x01, PMEE) Store (0x60, PIDX) Sleep (0x0A) Store (PDAT, Local0) And (Local0, 0x7F, Local0) Store (Local0, PDAT) Sleep (0x0A) Store (\_SB.PCI0.SMB.GPOW, Local1) Store (Local1, \_SB.WILS) Store (0x13, \_SB.PCI0.SMB.INCM) Sleep (0x0A) Store (0x40, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (0xF7, \_SB.PCI0.SMB.PTGM) Sleep (0x0A) Store (0x80, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (\_SB.PCI0.SMB.PTGM, Local1) Sleep (0x0A) And (Local1, 0x08, Local1) If (LEqual (Local1, 0x08)) { Store (0x01, Local1) Store (Local1, \_SB.BLTS) } Else { Store (0x00, Local1) Store (Local1, \_SB.BLTS) } If (LEqual (Arg0, 0x05)) { Store (One, \_SB.PCI0.SMB.SLPS) Store (0x88, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) } If (LEqual (Arg0, 0x04)) { Store (\_SB.PCI0.SMB.RVID, Local1) If (LNot (LLess (Local1, 0x10))) { Store (Zero, \_SB.PCI0.SMB.RSTU) } Store (One, \_SB.PCI0.SMB.SLPS) Store (0x87, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) } Store (\_SB.PCI0.SMB.RVID, Local1) If (LNot (LLess (Local1, 0x80))) { Store (Zero, \_SB.PCI0.SMB.RS3U) } If (LEqual (Arg0, 0x03)) { Store (One, \_SB.PCI0.SMB.SLPS) } } Method (_WAK, 1, NotSerialized) { Store (0x00, PMEE) Store (\_SB.WILS, Local0) Store (Local0, \_SB.PCI0.SMB.GPOW) Store (0x13, \_SB.PCI0.SMB.INCM) Sleep (0x0A) Store (0x40, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (0xF7, \_SB.PCI0.SMB.PTGM) Sleep (0x0A) Store (0x80, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (\_SB.PCI0.SMB.PTGM, Local1) Sleep (0x0A) If (\_SB.BLTS) { Or (Local1, 0x08, Local1) Store (Local1, \_SB.PCI0.SMB.PTGM) } Else { And (Local1, 0xF7, Local1) Store (Local1, \_SB.PCI0.SMB.PTGM) } Sleep (0x0A) Store (0x81, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) Store (0x30, DBGP) If (LEqual (Arg0, 0x03)) { Store (0x61, PIDX) Store (PDAT, Local0) And (Local0, 0x80, Local0) If (LEqual (Local0, 0x00)) { Notify (\_SB.PWRB, 0x02) } } If (LEqual (Arg0, 0x04)) { Store (0x80, \_SB.PCI0.LPC0.BCMD) Store (0x00, \_SB.PCI0.LPC0.SMIC) Notify (\_SB.PWRB, 0x02) } } Scope (\_SI) { Method (_SST, 1, NotSerialized) { If (LEqual (Arg0, 0x01)) { Store ("===== SST Working =====", Debug) } If (LEqual (Arg0, 0x02)) { Store ("===== SST Waking =====", Debug) } If (LEqual (Arg0, 0x03)) { Store ("===== SST Sleeping =====", Debug) } If (LEqual (Arg0, 0x04)) { Store ("===== SST Sleeping S4 =====", Debug) } } } Scope (\_TZ) { Name (TPAS, 0x5D) Name (TPC, 0x69) ThermalZone (THRM) { Method (_CRT, 0, Serialized) { Return (Add (0x0AAC, Multiply (TPC, 0x0A))) } Method (_SCP, 1, Serialized) { Store (0x00, CTYP) } Method (_TMP, 0, Serialized) { If (ECON) { Store (\_SB.PCI0.LPC0.EC0.RTMP, Local0) Store ("Current temp is: ", Debug) Store (Local0, Debug) Store (Local0, \_SB.CM25) Return (Add (0x0AAC, Multiply (Local0, 0x0A))) } Else { Store ("Get EC Temp failed!!", Debug) Return (0x0BB8) } } Method (_PSL, 0, Serialized) { Return (Package (0x01) { \_PR.CPU0 }) } Method (_PSV, 0, Serialized) { Return (Add (0x0AAC, Multiply (TPAS, 0x0A))) } Method (_TC1, 0, Serialized) { Return (0x02) } Method (_TC2, 0, Serialized) { Return (0x03) } Method (_TSP, 0, Serialized) { Return (0x64) } } } Scope (\_SB) { Name (OSTB, Ones) OperationRegion (OSTY, SystemMemory, 0x0DEFFE94, 0x00000001) Field (OSTY, AnyAcc, NoLock, Preserve) { TPOS, 8 } Method (OSTP, 0, NotSerialized) { If (LEqual (^OSTB, Ones)) { If (CondRefOf (\_OSI, Local0)) { If (\_OSI ("Windows 2001.1")) { Store (0x20, ^OSTB) Store (0x20, ^TPOS) } Else { If (\_OSI ("Windows 2001 SP1")) { Store (0x10, ^OSTB) Store (0x10, ^TPOS) } Else { If (\_OSI ("Windows 2001")) { Store (0x08, ^OSTB) Store (0x08, ^TPOS) } Else { Store (0x00, ^OSTB) Store (0x00, ^TPOS) } } } } Else { If (CondRefOf (\_OS, Local0)) { If (^SEQL (\_OS, "Microsoft Windows")) { Store (0x01, ^OSTB) Store (0x01, ^TPOS) } Else { If (^SEQL (\_OS, "Microsoft WindowsME: Millennium Edition")) { Store (0x02, ^OSTB) Store (0x02, ^TPOS) } Else { If (^SEQL (\_OS, "Microsoft Windows NT")) { Store (0x04, ^OSTB) Store (0x04, ^TPOS) } Else { Store (0x00, ^OSTB) Store (0x00, ^TPOS) } } } } Else { Store (0x00, ^OSTB) Store (0x00, ^TPOS) } } } Return (^OSTB) } Method (OSHT, 0, NotSerialized) { \_SB.OSTP () Store (0x48, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) } Method (SEQL, 2, Serialized) { Store (SizeOf (Arg0), Local0) Store (SizeOf (Arg1), Local1) If (LNot (LEqual (Local0, Local1))) { Return (Zero) } Name (BUF0, Buffer (Local0) {}) Store (Arg0, BUF0) Name (BUF1, Buffer (Local0) {}) Store (Arg1, BUF1) Store (Zero, Local2) While (LLess (Local2, Local0)) { Store (DerefOf (Index (BUF0, Local2)), Local3) Store (DerefOf (Index (BUF1, Local2)), Local4) If (LNot (LEqual (Local3, Local4))) { Return (Zero) } Increment (Local2) } Return (One) } } Name (FWSO, "FWSO") Name (_PSC, 0x00) Method (_PS0, 0, NotSerialized) { Store (_PSC, Local0) Store (0x00, _PSC) If (LEqual (Local0, 0x03)) { Store (0x01, \_SB.PCI0.LPC0.INF) While (\_SB.PCI0.LPC0.INF) { Store (0x20, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) If (LAnd (LEqual (\_SB.PCI0.LPC0.INF, 0x01), LNot (LLess (\_SB.OSTB, 0x04)))) { Sleep (0x01F4) } } } } Method (_PS3, 0, NotSerialized) { Store (0x03, _PSC) } Name (\GPIC, 0x00) Method (\_PIC, 1, NotSerialized) { Store (Arg0, GPIC) If (Arg0) { \_SB.PCI0.LPC0.DSPI () } } Name (ECON, 0x00) Name (CTYP, 0x00) Scope (\_SB) { Name (WIRE, 0x00) Name (WILS, 0x00) Name (BLTS, 0x00) Name (GPOB, 0x00) Device (PWRB) { Name (_HID, EisaId ("PNP0C0C")) } Device (SLPB) { Name (_HID, EisaId ("PNP0C0E")) } Device (LID) { Name (_HID, EisaId ("PNP0C0D")) Name (LSTS, 0x00) Method (_LID, 0, NotSerialized) { If (ECON) { If (\_SB.PCI0.LPC0.EC0.LIDS) { Store (Zero, LSTS) } Else { Store (One, LSTS) } } Else { Store (One, LSTS) } Return (LSTS) } } OperationRegion (EXCO, SystemIO, 0x72, 0x02) Field (EXCO, ByteAcc, NoLock, Preserve) { INDX, 8, DATA, 8 } IndexField (INDX, DATA, ByteAcc, NoLock, Preserve) { Offset (0xA0), DISD, 3, OVRL, 1, DCKS, 1, ACST, 1, POPF, 1, FL07, 1, FL10, 1, FL11, 1, FL12, 1, FL13, 1, FL14, 1, FL15, 1, FL16, 1, FL17, 1, FL20, 2, FL21, 2, FL22, 2, FL23, 2, CM23, 8, CM24, 8, CM25, 8, CM26, 8, CM27, 8, CM28, 8, CM29, 8, CM2A, 8, CM2B, 8, CM2C, 8, CM2D, 8, CM2E, 8, CM2F, 8, Offset (0xB1), HPBD, 8, BTWL, 2, BTLS, 1, BWLS, 1, WWLS, 1, Offset (0xB3), WLSU, 1, BTSU, 1, PWDC, 3, POTL, 1 } Device (PCI0) { Name (_HID, EisaId ("PNP0A03")) Name (_ADR, 0x00) Name (_UID, 0x01) Name (_BBN, 0x00) Method (_INI, 0, NotSerialized) { \_SB.OSTP () } OperationRegion (K8ST, SystemMemory, 0x0DEFFF04, 0x000000B8) Field (K8ST, AnyAcc, Lock, Preserve) { C0_0, 16, C2_0, 16, C4_0, 16, C6_0, 16, C8_0, 16, CA_0, 16, CC_0, 16, CE_0, 16, D0_0, 16, D2_0, 16, D4_0, 16, D6_0, 16, D8_0, 16, DA_0, 16, DC_0, 16, DE_0, 16, E0_0, 16, E2_0, 16, E4_0, 16, E6_0, 16, E8_0, 16, EA_0, 16, EC_0, 16, EE_0, 16, F0_0, 16, F2_0, 16, F4_0, 16, F6_0, 16, F8_0, 16, FA_0, 16, FC_0, 16, FE_0, 16, TOML, 32, TOMH, 32 } Name (RSRC, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, SubDecode, 0x0000, 0x0000, 0x00FF, 0x0000, 0x0100, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000A0000, 0x000BFFFF, 0x00000000, 0x00020000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000C0000, 0x000C1FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000C2000, 0x000C3FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000C4000, 0x000C5FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000C6000, 0x000C7FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000C8000, 0x000C9FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000CA000, 0x000CBFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000CC000, 0x000CDFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000CE000, 0x000CFFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000D0000, 0x000D1FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000D2000, 0x000D3FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000D4000, 0x000D5FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000D6000, 0x000D7FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000D8000, 0x000D9FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000DA000, 0x000DBFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000DC000, 0x000DDFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000DE000, 0x000DFFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000E0000, 0x000E1FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000E2000, 0x000E3FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000E4000, 0x000E5FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000E6000, 0x000E7FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000E8000, 0x000E9FFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000EA000, 0x000EBFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000EC000, 0x000EDFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x000EE000, 0x000EFFFF, 0x00000000, 0x00002000, 0x00) DWordMemory (ResourceProducer, SubDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00) IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, 0x0000, 0x0CF7, 0x0000, 0x0CF8, 0x00) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, 0x0D00, 0xFFFF, 0x0000, 0xF300, 0x00) }) Method (_CRS, 0, Serialized) { CreateBitField (RSRC, 0x0188, C0RW) CreateDWordField (RSRC, 0x42, C0LN) Store (One, C0RW) Store (0x2000, C0LN) If (And (C0_0, 0x1818)) { Store (0x00, C0LN) } CreateBitField (RSRC, 0x0260, C2RW) CreateDWordField (RSRC, 0x5D, C2LN) Store (One, C2RW) Store (0x2000, C2LN) If (And (C2_0, 0x1818)) { Store (0x00, C2LN) } CreateBitField (RSRC, 0x0338, C4RW) CreateDWordField (RSRC, 0x78, C4LN) Store (One, C4RW) Store (0x2000, C4LN) If (And (C4_0, 0x1818)) { Store (0x00, C4LN) } CreateBitField (RSRC, 0x0410, C6RW) CreateDWordField (RSRC, 0x93, C6LN) Store (One, C6RW) Store (0x2000, C6LN) If (And (C6_0, 0x1818)) { Store (0x00, C6LN) } CreateBitField (RSRC, 0x04E8, C8RW) CreateDWordField (RSRC, 0xAE, C8LN) Store (One, C8RW) Store (0x2000, C8LN) If (And (C8_0, 0x1818)) { Store (0x00, C8LN) } CreateBitField (RSRC, 0x05C0, CARW) CreateDWordField (RSRC, 0xC9, CALN) Store (One, CARW) Store (0x2000, CALN) If (And (CA_0, 0x1818)) { Store (0x00, CALN) } CreateBitField (RSRC, 0x0698, CCRW) CreateDWordField (RSRC, 0xE4, CCLN) Store (One, CCRW) Store (0x2000, CCLN) If (And (CC_0, 0x1818)) { Store (0x00, CCLN) } CreateBitField (RSRC, 0x0770, CERW) CreateDWordField (RSRC, 0xFF, CELN) Store (One, CERW) Store (0x2000, CELN) If (And (CE_0, 0x1818)) { Store (0x00, CELN) } CreateBitField (RSRC, 0x0848, D0RW) CreateDWordField (RSRC, 0x011A, D0LN) Store (One, D0RW) Store (0x2000, D0LN) If (And (D0_0, 0x1818)) { Store (0x00, D0LN) } CreateBitField (RSRC, 0x0920, D2RW) CreateDWordField (RSRC, 0x0135, D2LN) Store (One, D2RW) Store (0x2000, D2LN) If (And (D2_0, 0x1818)) { Store (0x00, D2LN) } CreateBitField (RSRC, 0x09F8, D4RW) CreateDWordField (RSRC, 0x0150, D4LN) Store (One, D4RW) Store (0x2000, D4LN) If (And (D4_0, 0x1818)) { Store (0x00, D4LN) } CreateBitField (RSRC, 0x0AD0, D6RW) CreateDWordField (RSRC, 0x016B, D6LN) Store (One, D6RW) Store (0x2000, D6LN) If (And (D6_0, 0x1818)) { Store (0x00, D6LN) } CreateBitField (RSRC, 0x0BA8, D8RW) CreateDWordField (RSRC, 0x0186, D8LN) Store (One, D8RW) Store (0x2000, D8LN) If (And (D8_0, 0x1818)) { Store (0x00, D8LN) } CreateBitField (RSRC, 0x0C80, DARW) CreateDWordField (RSRC, 0x01A1, DALN) Store (One, DARW) Store (0x2000, DALN) If (And (DA_0, 0x1818)) { Store (0x00, DALN) } CreateBitField (RSRC, 0x0D58, DCRW) CreateDWordField (RSRC, 0x01BC, DCLN) Store (One, DCRW) Store (0x2000, DCLN) If (And (DC_0, 0x1818)) { Store (0x00, DCLN) } CreateBitField (RSRC, 0x0E30, DERW) CreateDWordField (RSRC, 0x01D7, DELN) Store (One, DERW) Store (0x2000, DELN) If (And (DE_0, 0x1818)) { Store (0x00, DELN) } CreateBitField (RSRC, 0x0F08, E0RW) CreateDWordField (RSRC, 0x01F2, E0LN) Store (One, E0RW) Store (0x2000, E0LN) If (And (E0_0, 0x1818)) { Store (0x00, E0LN) } CreateBitField (RSRC, 0x0FE0, E2RW) CreateDWordField (RSRC, 0x020D, E2LN) Store (One, E2RW) Store (0x2000, E2LN) If (And (E2_0, 0x1818)) { Store (0x00, E2LN) } CreateBitField (RSRC, 0x10B8, E4RW) CreateDWordField (RSRC, 0x0228, E4LN) Store (One, E4RW) Store (0x2000, E4LN) If (And (E4_0, 0x1818)) { Store (0x00, E4LN) } CreateBitField (RSRC, 0x1190, E6RW) CreateDWordField (RSRC, 0x0243, E6LN) Store (One, E6RW) Store (0x2000, E6LN) If (And (E6_0, 0x1818)) { Store (0x00, E6LN) } CreateBitField (RSRC, 0x1268, E8RW) CreateDWordField (RSRC, 0x025E, E8LN) Store (One, E8RW) Store (0x2000, E8LN) If (And (E8_0, 0x1818)) { Store (0x00, E8LN) } CreateBitField (RSRC, 0x1340, EARW) CreateDWordField (RSRC, 0x0279, EALN) Store (One, EARW) Store (0x2000, EALN) If (And (EA_0, 0x1818)) { Store (0x00, EALN) } CreateBitField (RSRC, 0x1418, ECRW) CreateDWordField (RSRC, 0x0294, ECLN) Store (One, ECRW) Store (0x2000, ECLN) If (And (EC_0, 0x1818)) { Store (0x00, ECLN) } CreateBitField (RSRC, 0x14F0, EERW) CreateDWordField (RSRC, 0x02AF, EELN) Store (One, EERW) Store (0x2000, EELN) If (And (EE_0, 0x1818)) { Store (0x00, EELN) } CreateDWordField (RSRC, 0x02BE, BTMN) CreateDWordField (RSRC, 0x02CA, BTLN) Store (TOML, BTMN) Add (Not (BTMN), 0x01, BTLN) Return (RSRC) } Device (MEMR) { Name (_HID, EisaId ("PNP0C02")) Name (MEM1, ResourceTemplate () { Memory32Fixed (ReadWrite, 0xE0000000, 0x10000000) Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) }) Method (_CRS, 0, NotSerialized) { CreateDWordField (MEM1, 0x10, MB01) CreateDWordField (MEM1, 0x14, ML01) CreateDWordField (MEM1, 0x1C, MB02) CreateDWordField (MEM1, 0x20, ML02) If (GPIC) { Store (0xFEC00000, MB01) Store (0xFEE00000, MB02) Store (0x1000, ML01) Store (0x1000, ML02) } Return (MEM1) } } Method (_PRT, 0, NotSerialized) { If (GPIC) { Return (Package (0x05) { Package (0x04) { 0x0013FFFF, 0x00, 0x00, 0x13 }, Package (0x04) { 0x0014FFFF, 0x00, 0x00, 0x10 }, Package (0x04) { 0x0014FFFF, 0x01, 0x00, 0x11 }, Package (0x04) { 0x0014FFFF, 0x02, 0x00, 0x12 }, Package (0x04) { 0x0014FFFF, 0x03, 0x00, 0x13 } }) } Else { Return (Package (0x07) { Package (0x04) { 0x0011FFFF, 0x00, \_SB.PCI0.LPC0.LNKH, 0x00 }, Package (0x04) { 0x0012FFFF, 0x00, \_SB.PCI0.LPC0.LNKG, 0x00 }, Package (0x04) { 0x0013FFFF, 0x00, \_SB.PCI0.LPC0.LNKD, 0x00 }, Package (0x04) { 0x0014FFFF, 0x00, \_SB.PCI0.LPC0.LNKA, 0x00 }, Package (0x04) { 0x0014FFFF, 0x01, \_SB.PCI0.LPC0.LNKB, 0x00 }, Package (0x04) { 0x0014FFFF, 0x02, \_SB.PCI0.LPC0.LNKC, 0x00 }, Package (0x04) { 0x0014FFFF, 0x03, \_SB.PCI0.LPC0.LNKD, 0x00 } }) } } OperationRegion (BAR1, PCI_Config, 0x14, 0x04) Field (BAR1, ByteAcc, NoLock, Preserve) { Z009, 32 } Device (OHC1) { Name (_ADR, 0x00130000) } Device (OHC2) { Name (_ADR, 0x00130001) } Device (EHCI) { Name (_ADR, 0x00130002) } Device (SMB) { Name (_ADR, 0x00140000) OperationRegion (Z00A, PCI_Config, 0x08, 0x01) Field (Z00A, ByteAcc, NoLock, Preserve) { RVID, 8 } OperationRegion (CMIO, SystemIO, 0x0C50, 0x03) Field (CMIO, ByteAcc, NoLock, Preserve) { INCM, 8, DACM, 8, PTGM, 8 } OperationRegion (RGA8, PCI_Config, 0xA8, 0x01) Field (RGA8, ByteAcc, NoLock, Preserve) { , 2, GPOW, 1 } OperationRegion (PMIO, SystemIO, 0x0CD6, 0x02) Field (PMIO, ByteAcc, NoLock, Preserve) { INPM, 8, DAPM, 8 } IndexField (INPM, DAPM, ByteAcc, NoLock, Preserve) { , 1, TM1E, 1, TM2E, 1, Offset (0x01), , 1, TM1S, 1, TM2S, 1, Offset (0x04), , 7, SLPS, 1, Offset (0x1C), , 3, MKME, 1, PI3E, 1, PI2E, 1, PI1E, 1, PI0E, 1, , 3, MKMS, 1, PI3S, 1, PI2S, 1, PI1S, 1, PI0S, 1, Offset (0x36), , 6, GVT6, 1, Offset (0x37), , 4, GPX1, 1, , 1, GPX3, 1, Offset (0x38), , 1, GPX4, 1, GPX5, 1, , 1, GPX6, 1, Offset (0x55), SPRE, 1, Offset (0x65), , 4, RS3U, 1, RSTU, 1, Offset (0x68), , 3, TPDE, 1, , 1 } Method (TRMD, 0, NotSerialized) { Store (Zero, SPRE) Store (Zero, TPDE) } Method (HTCD, 0, NotSerialized) { Store (Zero, PI2E) Store (Zero, TM2E) Store (PI2S, PI2S) Store (TM2S, TM2S) } } Device (IDE) { Name (_ADR, 0x00140001) Name (UDMT, Package (0x08) { 0x78, 0x5A, 0x3C, 0x2D, 0x1E, 0x14, 0x0F, 0x00 }) Name (PIOT, Package (0x06) { 0x0258, 0x0186, 0x010E, 0xB4, 0x78, 0x00 }) Name (PITR, Package (0x06) { 0x99, 0x47, 0x34, 0x22, 0x20, 0x99 }) Name (MDMT, Package (0x04) { 0x01E0, 0x96, 0x78, 0x00 }) Name (MDTR, Package (0x04) { 0x77, 0x21, 0x20, 0xFF }) OperationRegion (IDE, PCI_Config, 0x40, 0x20) Field (IDE, WordAcc, NoLock, Preserve) { PPIT, 16, SPIT, 16, PMDT, 16, SMDT, 16, PPIC, 8, SPIC, 8, PPIM, 8, SPIM, 8, Offset (0x14), PUDC, 2, SUDC, 2, Offset (0x16), PUDM, 8, SUDM, 8 } Method (ATPI, 1, NotSerialized) { Store (Arg0, Local0) And (Local0, 0xFF, Local0) Or (Local0, 0x41544900, Local0) Store (Local0, \_SB.PCI0.LPC0.INFO) Store (0x84, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) } Method (GETT, 1, NotSerialized) { Store (And (Arg0, 0x0F), Local0) Store (ShiftRight (Arg0, 0x04), Local1) Return (Multiply (0x1E, Add (Add (Local0, 0x01), Add (Local1, 0x01)))) } Method (GTM, 1, NotSerialized) { CreateByteField (Arg0, 0x00, PIT1) CreateByteField (Arg0, 0x01, PIT0) CreateByteField (Arg0, 0x02, MDT1) CreateByteField (Arg0, 0x03, MDT0) CreateByteField (Arg0, 0x04, PICX) CreateByteField (Arg0, 0x05, UDCX) CreateByteField (Arg0, 0x06, UDMX) Name (BUF, Buffer (0x14) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00 }) CreateDWordField (BUF, 0x00, PIO0) CreateDWordField (BUF, 0x04, DMA0) CreateDWordField (BUF, 0x08, PIO1) CreateDWordField (BUF, 0x0C, DMA1) CreateDWordField (BUF, 0x10, FLAG) If (And (PICX, 0x01)) { Return (BUF) } Store (GETT (PIT0), PIO0) Store (GETT (PIT1), PIO1) If (And (UDCX, 0x01)) { Or (FLAG, 0x01, FLAG) Store (DerefOf (Index (^UDMT, And (UDMX, 0x0F))), DMA0) } Else { Store (GETT (MDT0), DMA0) } If (And (UDCX, 0x02)) { Or (FLAG, 0x04, FLAG) Store (DerefOf (Index (^UDMT, ShiftRight (UDMX, 0x04))), DMA1) } Else { Store (GETT (MDT1), DMA1) } Or (FLAG, 0x1A, FLAG) Return (BUF) } Method (STM, 3, NotSerialized) { CreateDWordField (Arg0, 0x00, PIO0) CreateDWordField (Arg0, 0x04, DMA0) CreateDWordField (Arg0, 0x08, PIO1) CreateDWordField (Arg0, 0x0C, DMA1) CreateDWordField (Arg0, 0x10, FLAG) Name (BUF, Buffer (0x07) { 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00 }) CreateByteField (BUF, 0x00, PIT1) CreateByteField (BUF, 0x01, PIT0) CreateByteField (BUF, 0x02, MDT1) CreateByteField (BUF, 0x03, MDT0) CreateByteField (BUF, 0x04, PIMX) CreateByteField (BUF, 0x05, UDCX) CreateByteField (BUF, 0x06, UDMX) Store (Match (^PIOT, MLE, PIO0, MTR, 0x00, 0x00), Local0) Divide (Local0, 0x05, Local0) Store (Match (^PIOT, MLE, PIO1, MTR, 0x00, 0x00), Local1) Divide (Local1, 0x05, Local1) Store (Or (ShiftLeft (Local1, 0x04), Local0), PIMX) Store (DerefOf (Index (^PITR, Local0)), PIT0) Store (DerefOf (Index (^PITR, Local1)), PIT1) If (And (FLAG, 0x01)) { Store (Match (^UDMT, MLE, DMA0, MTR, 0x00, 0x00), Local0) Divide (Local0, 0x07, Local0) Or (UDMX, Local0, UDMX) Or (UDCX, 0x01, UDCX) } Else { If (LNot (LEqual (DMA0, 0xFFFFFFFF))) { Store (Match (^MDMT, MLE, DMA0, MTR, 0x00, 0x00), Local0) Store (DerefOf (Index (^MDTR, Local0)), MDT0) } } If (And (FLAG, 0x04)) { Store (Match (^UDMT, MLE, DMA1, MTR, 0x00, 0x00), Local0) Divide (Local0, 0x07, Local0) Or (UDMX, ShiftLeft (Local0, 0x04), UDMX) Or (UDCX, 0x02, UDCX) } Else { If (LNot (LEqual (DMA1, 0xFFFFFFFF))) { Store (Match (^MDMT, MLE, DMA1, MTR, 0x00, 0x00), Local0) Store (DerefOf (Index (^MDTR, Local0)), MDT1) } } Return (BUF) } Method (GTF, 2, NotSerialized) { CreateByteField (Arg1, 0x00, MDT1) CreateByteField (Arg1, 0x01, MDT0) CreateByteField (Arg1, 0x02, PIMX) CreateByteField (Arg1, 0x03, UDCX) CreateByteField (Arg1, 0x04, UDMX) If (LEqual (Arg0, 0xA0)) { Store (And (PIMX, 0x0F), Local0) Store (MDT0, Local1) And (UDCX, 0x01, Local2) Store (And (UDMX, 0x0F), Local3) } Else { Store (ShiftRight (PIMX, 0x04), Local0) Store (MDT1, Local1) And (UDCX, 0x02, Local2) Store (ShiftRight (UDMX, 0x04), Local3) } Name (BUF, Buffer (0x0E) { 0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF, 0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xEF }) CreateByteField (BUF, 0x01, PMOD) CreateByteField (BUF, 0x08, DMOD) CreateByteField (BUF, 0x05, CMDA) CreateByteField (BUF, 0x0C, CMDB) Store (Arg0, CMDA) Store (Arg0, CMDB) Or (Local0, 0x08, PMOD) If (Local2) { Or (Local3, 0x40, DMOD) } Else { Store (Match (^MDMT, MLE, GETT (Local1), MTR, 0x00, 0x00), Local4) If (LLess (Local4, 0x03)) { Or (0x20, Local4, DMOD) } } Return (BUF) } Device (PRID) { Name (_ADR, 0x00) Method (_GTM, 0, NotSerialized) { Name (BUF, Buffer (0x07) { 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00 }) CreateWordField (BUF, 0x00, VPIT) CreateWordField (BUF, 0x02, VMDT) CreateByteField (BUF, 0x04, VPIC) CreateByteField (BUF, 0x05, VUDC) CreateByteField (BUF, 0x06, VUDM) Store (^^PPIT, VPIT) Store (^^PMDT, VMDT) Store (^^PPIC, VPIC) Store (^^PUDC, VUDC) Store (^^PUDM, VUDM) Return (GTM (BUF)) } Method (_STM, 3, NotSerialized) { Name (BUF, Buffer (0x07) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }) CreateWordField (BUF, 0x00, VPIT) CreateWordField (BUF, 0x02, VMDT) CreateByteField (BUF, 0x04, VPIM) CreateByteField (BUF, 0x05, VUDC) CreateByteField (BUF, 0x06, VUDM) Store (STM (Arg0, Arg1, Arg2), BUF) Store (VPIT, ^^PPIT) Store (VMDT, ^^PMDT) Store (VPIM, ^^PPIM) Store (VUDC, ^^PUDC) Store (VUDM, ^^PUDM) } Device (P_D0) { Name (_ADR, 0x00) Method (_GTF, 0, NotSerialized) { Name (BUF, Buffer (0x05) { 0x00, 0x00, 0x00, 0x00, 0x00 }) CreateWordField (BUF, 0x00, VMDT) CreateByteField (BUF, 0x02, VPIM) CreateByteField (BUF, 0x03, VUDC) CreateByteField (BUF, 0x04, VUDM) Store (^^^PMDT, VMDT) Store (^^^PPIM, VPIM) Store (^^^PUDC, VUDC) Store (^^^PUDM, VUDM) Return (GTF (0xA0, BUF)) } } Method (_STA, 0, NotSerialized) { And (PPIC, 0x01, Local0) If (LAnd (Local0, 0x01)) { Return (Z006) } Else { Return (Z005) } } } Device (SECD) { Name (_ADR, 0x01) Method (_GTM, 0, NotSerialized) { Name (BUF, Buffer (0x07) { 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00 }) CreateWordField (BUF, 0x00, VPIT) CreateWordField (BUF, 0x02, VMDT) CreateByteField (BUF, 0x04, VPIC) CreateByteField (BUF, 0x05, VUDC) CreateByteField (BUF, 0x06, VUDM) Store (^^SPIT, VPIT) Store (^^SMDT, VMDT) Store (^^SPIC, VPIC) Store (^^SUDC, VUDC) Store (^^SUDM, VUDM) Return (GTM (BUF)) } Method (_STM, 3, NotSerialized) { Name (BUF, Buffer (0x07) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }) CreateWordField (BUF, 0x00, VPIT) CreateWordField (BUF, 0x02, VMDT) CreateByteField (BUF, 0x04, VPIM) CreateByteField (BUF, 0x05, VUDC) CreateByteField (BUF, 0x06, VUDM) Store (STM (Arg0, Arg1, Arg2), BUF) Store (VPIT, ^^SPIT) Store (VMDT, ^^SMDT) Store (VPIM, ^^SPIM) Store (VUDC, ^^SUDC) Store (VUDM, ^^SUDM) } Device (S_D0) { Name (_ADR, 0x00) Method (_GTF, 0, NotSerialized) { Name (BUF, Buffer (0x05) { 0x00, 0x00, 0x00, 0x00, 0x00 }) CreateWordField (BUF, 0x00, VMDT) CreateByteField (BUF, 0x02, VPIM) CreateByteField (BUF, 0x03, VUDC) CreateByteField (BUF, 0x04, VUDM) Store (^^^SMDT, VMDT) Store (^^^SPIM, VPIM) Store (^^^SUDC, VUDC) Store (^^^SUDM, VUDM) Return (GTF (0xA0, BUF)) } } Method (_STA, 0, NotSerialized) { And (SPIC, 0x01, Local0) If (LAnd (Local0, 0x01)) { Return (Z006) } Else { Return (Z005) } } } } Device (LPC0) { Name (_ADR, 0x00140003) Mutex (PSMX, 0x00) OperationRegion (PIRQ, SystemIO, 0x0C00, 0x02) Field (PIRQ, ByteAcc, NoLock, Preserve) { PIID, 8, PIDA, 8 } IndexField (PIID, PIDA, ByteAcc, NoLock, Preserve) { PIRA, 8, PIRB, 8, PIRC, 8, PIRD, 8, PIRS, 8, Offset (0x06), PIRU, 8, Offset (0x09), PIRE, 8, PIRF, 8, PIRG, 8, PIRH, 8 } Name (IPRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared) {10,11} }) Method (DSPI, 0, NotSerialized) { Store (0x00, PIRA) Store (0x00, PIRB) Store (0x00, PIRC) Store (0x00, PIRD) Store (0x00, PIRS) Store (0x00, PIRU) Store (0x00, PIRE) Store (0x00, PIRF) Store (0x00, PIRG) Store (0x00, PIRH) } Device (LNKA) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x01) Method (_STA, 0, NotSerialized) { If (PIRA) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRA) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRA, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRA) } } Device (LNKB) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x02) Method (_STA, 0, NotSerialized) { If (PIRB) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRB) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRB, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRB) } } Device (LNKC) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x03) Method (_STA, 0, NotSerialized) { If (PIRC) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRC) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRC, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRC) } } Device (LNKD) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x04) Method (_STA, 0, NotSerialized) { If (PIRD) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRD) Store (0x00, PIRU) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRD, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRD) } } Device (LNKE) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x05) Method (_STA, 0, NotSerialized) { If (PIRE) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRE) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRE, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRE) } } Device (LNKF) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x06) Method (_STA, 0, NotSerialized) { If (PIRF) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRF) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRF, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRF) } } Device (LNKG) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x07) Method (_STA, 0, NotSerialized) { If (PIRG) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRG) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRG, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRG) } } Device (LNKH) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x08) Method (_STA, 0, NotSerialized) { If (PIRH) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (IPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRH) } Method (_CRS, 0, NotSerialized) { Store (IPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRH, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRH) } } Device (LNKU) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x04) Method (_STA, 0, NotSerialized) { If (PIRU) { Return (Z007) } Else { Return (Z008) } } Method (_PRS, 0, NotSerialized) { Return (UPRS) } Method (_DIS, 0, NotSerialized) { Store (0x00, PIRU) } Method (_CRS, 0, NotSerialized) { Store (UPRS, Local0) CreateWordField (Local0, 0x01, IRQ0) ShiftLeft (0x01, PIRU, IRQ0) Return (Local0) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, IRQ0) FindSetRightBit (IRQ0, Local0) Decrement (Local0) Store (Local0, PIRU) } } OperationRegion (LPCR, PCI_Config, 0x44, 0x02) Field (LPCR, ByteAcc, NoLock, Preserve) { CMA0, 1, CMA1, 1, CMA2, 1, CMA3, 1, CMA4, 1, CMA5, 1, CMA6, 1, CMA7, 1, CMB0, 1, CMB1, 1, CMB2, 1, CMB3, 1, CMB4, 1, CMB5, 1, CMB6, 1, CMB7, 1 } Device (DMAC) { Name (_HID, EisaId ("PNP0200")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0000, 0x0000, 0x01, 0x20) IO (Decode16, 0x0080, 0x0080, 0x01, 0x10) IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20) DMA (Compatibility, NotBusMaster, Transfer8_16) {4} }) } Device (MATH) { Name (_HID, EisaId ("PNP0C04")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x00F0, 0x00F0, 0x01, 0x0F) IRQ (Edge, ActiveHigh, Exclusive) {13} }) } Device (PIC) { Name (_HID, EisaId ("PNP0000")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0020, 0x0020, 0x01, 0x02) IO (Decode16, 0x00A0, 0x00A0, 0x01, 0x02) IRQ (Edge, ActiveHigh, Exclusive) {2} }) } Device (RTC) { Name (_HID, EisaId ("PNP0B00")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0070, 0x0070, 0x01, 0x02) IRQ (Edge, ActiveHigh, Exclusive) {8} }) } Device (SPKR) { Name (_HID, EisaId ("PNP0800")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0061, 0x0061, 0x01, 0x01) }) } Device (TIME) { Name (_HID, EisaId ("PNP0100")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0040, 0x0040, 0x01, 0x04) IRQ (Edge, ActiveHigh, Exclusive) {0} }) } Device (KBC0) { Name (_HID, EisaId ("PNP0303")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0060, 0x0060, 0x01, 0x01) IO (Decode16, 0x0064, 0x0064, 0x01, 0x01) IRQ (Edge, ActiveHigh, Exclusive) {1} }) Name (_PRW, Package (0x02) { 0x03, 0x03 }) Method (_PSW, 1, NotSerialized) { If (ECON) { Store (Arg0, \_SB.PCI0.LPC0.EC0.PSKB) } } } Device (MSE0) { Method (_HID, 0, NotSerialized) { If (HPBD) { Return ("*SYN011C") } Else { Return ("*SYN011B") } } Name (_CID, Package (0x03) { 0x00012E4F, 0x02002E4F, 0x130FD041 }) Name (_CRS, ResourceTemplate () { IRQ (Edge, ActiveHigh, Exclusive) {12} }) Name (_PRW, Package (0x02) { 0x03, 0x03 }) Method (_PSW, 1, NotSerialized) { If (ECON) { Store (Arg0, \_SB.PCI0.LPC0.EC0.PSTP) } } } Device (SYSR) { Name (_HID, EisaId ("PNP0C02")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x002E, 0x002E, 0x01, 0x02) IO (Decode16, 0x0072, 0x0072, 0x01, 0x02) IO (Decode16, 0x1080, 0x1080, 0x01, 0x01) IO (Decode16, 0x00B0, 0x00B0, 0x01, 0x02) IO (Decode16, 0x0092, 0x0092, 0x01, 0x01) IO (Decode16, 0x0220, 0x0220, 0x01, 0x10) IO (Decode16, 0x040B, 0x040B, 0x01, 0x01) IO (Decode16, 0x04D0, 0x04D0, 0x01, 0x02) IO (Decode16, 0x04D6, 0x04D6, 0x01, 0x01) IO (Decode16, 0x0530, 0x0530, 0x08, 0x08) IO (Decode16, 0x0C00, 0x0C00, 0x01, 0x02) IO (Decode16, 0x0C14, 0x0C14, 0x01, 0x01) IO (Decode16, 0x0C50, 0x0C50, 0x01, 0x03) IO (Decode16, 0x0C6C, 0x0C6C, 0x01, 0x01) IO (Decode16, 0x0C6F, 0x0C6F, 0x01, 0x01) IO (Decode16, 0x0CD4, 0x0CD4, 0x01, 0x02) IO (Decode16, 0x0CD6, 0x0CD6, 0x01, 0x02) IO (Decode16, 0x0CD8, 0x0CD8, 0x01, 0x08) IO (Decode16, 0x8000, 0x8000, 0x01, 0x60) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, 0x8100, 0x81FF, 0x0000, 0x0100) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, 0x8200, 0x82FF, 0x0000, 0x0100) IO (Decode16, 0x0F40, 0x0F40, 0x01, 0x08) IO (Decode16, 0x087F, 0x087F, 0x01, 0x01) }) } Device (MEM) { Name (_HID, EisaId ("PNP0C01")) Name (MSRC, ResourceTemplate () { Memory32Fixed (ReadOnly, 0x000E0000, 0x00020000) Memory32Fixed (ReadOnly, 0xFFF80000, 0x00080000) Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) }) Method (_CRS, 0, NotSerialized) { If (LNot (LLess (TPOS, 0x04))) { CreateDWordField (MSRC, 0x1C, BARX) CreateDWordField (MSRC, 0x20, GALN) Store (0x1000, GALN) Store (\_SB.PCI0.Z009, Local0) And (Local0, 0xFFFFFFF0, BARX) } Return (MSRC) } Method (_STA, 0, NotSerialized) { Return (0x0F) } } OperationRegion (SMI0, SystemIO, 0x00000F40, 0x00000002) Field (SMI0, AnyAcc, NoLock, Preserve) { SMIC, 8 } OperationRegion (SMI1, SystemMemory, 0x0DEFFD74, 0x00000120) Field (SMI1, AnyAcc, NoLock, Preserve) { BCMD, 8, DID, 32, INFO, 1024 } Field (SMI1, AnyAcc, NoLock, Preserve) { AccessAs (ByteAcc, 0x00), Offset (0x05), INF, 8 } Device (EC0) { Name (_HID, EisaId ("PNP0C09")) Name (_UID, 0x01) Method (_CRS, 0, NotSerialized) { Name (BFFR, ResourceTemplate () { IO (Decode16, 0x0062, 0x0062, 0x00, 0x01) IO (Decode16, 0x0066, 0x0066, 0x00, 0x01) }) Return (BFFR) } OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF) Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x04), CMCM, 8, CMD1, 8, CMD2, 8, CMD3, 8, Offset (0x18), SMPR, 8, SMST, 8, SMAD, 8, SMCM, 8, SMD0, 256, BCNT, 8, SMAA, 8, BATD, 16, SW2S, 1, Offset (0x41), , 4, CFAN, 1, PFN2, 1, WOLF, 1, PFLG, 1, Offset (0x43), TMSS, 2, , 2, BANK, 4, Offset (0x45), VFAN, 1, Offset (0x46), RL01, 1, RD01, 1, RF01, 1, RP01, 1, RB01, 1, RC01, 1, , 1, R701, 1, R801, 1, RM01, 1, RI01, 1, , 1, , 1, , 1, RA01, 1, RR01, 1, RL10, 1, RD10, 1, RF10, 1, RP10, 1, RB10, 1, RC10, 1, , 1, R710, 1, R810, 1, RM10, 1, RI10, 1, , 1, , 1, , 1, RA10, 1, RR10, 1, WL01, 1, WD01, 1, WF01, 1, WP01, 1, WB01, 1, WC01, 1, , 1, W701, 1, W801, 1, WM01, 1, WI01, 1, , 1, , 1, , 1, WA01, 1, WR01, 1, WL10, 1, WD10, 1, WF10, 1, WP10, 1, WB10, 1, WC10, 1, , 1, W710, 1, W810, 1, WM10, 1, WI10, 1, , 1, , 1, , 1, WA10, 1, WR10, 1, LIDE, 1, BAYE, 1, EFDE, 1, PRDE, 1, BRBE, 1, CRTE, 1, , 1, W7BE, 1, W8BE, 1, PMEE, 1, INTE, 1, , 1, , 1, , 1, DB2E, 1, DB3E, 1, Offset (0x52), LIDS, 1, BAYS, 1, EFDS, 1, PRDS, 1, BRBS, 1, CRTS, 1, , 1, W7BS, 1, W8BS, 1, DPEM, 1, DINT, 1, , 1, , 1, , 1, DB2S, 1, DB3S, 1, SCIM, 8, Offset (0x57), RG57, 8, RTMP, 8, RG59, 8, RG5A, 8, RG5B, 8, FSPD, 16, Offset (0x5F), CFN2, 1, SFN2, 1, Offset (0x71), MBTS, 1, MBTF, 1, Offset (0x72), MBTC, 1, , 2, MBNH, 1, Offset (0x77), BA1C, 8, Offset (0x7E), BATP, 8, Offset (0x81), SBTS, 1, SBTF, 1, Offset (0x82), SBTC, 1, Offset (0x87), BA2C, 8, ABVG, 16, Offset (0xC1), MCUR, 16, MBRM, 16, MBVG, 16, MBST, 8, ACUR, 16, ABRM, 16, Offset (0xCF), DLYC, 8, EBPL, 1, Offset (0xD2), , 6, APWR, 1, DLYE, 1, Offset (0xD6), DBPL, 8, Offset (0xDA), EPRW, 8, PSKB, 1, PSTP, 1, PSBA, 1, Offset (0xDF), ECBW, 1, Offset (0xE7), GQKS, 7 } Name (BATO, 0x00) Name (BATN, 0x00) Name (BATF, 0xC0) Method (_REG, 2, NotSerialized) { If (LEqual (Arg0, 0x03)) { Store (Arg1, ECON) } } Method (BPOL, 1, NotSerialized) { Store (Arg0, DBPL) Store (0x01, EBPL) } Name (_GPE, 0x18) Method (_Q09, 0, NotSerialized) { Store ("_Q09 : Delay Timer Handler", Debug) If (LEqual (SizeOf (\_OS), 0x14)) { Notify (\_SB.PCI0.LPC0.BAT1, 0x80) Notify (\_SB.PCI0.LPC0.BAT1, 0x00) Notify (\_SB.PCI0.LPC0.ACAD, 0x00) } If (LEqual (SizeOf (\_OS), 0x14)) { BPOL (0x3C) } } Method (_Q0D, 0, NotSerialized) { Acquire (\_SB.PCI0.LPC0.PSMX, 0xFFFF) Store (0x8A, \_SB.PCI0.LPC0.BCMD) Store (0x00, \_SB.PCI0.LPC0.INFO) Store (Zero, \_SB.PCI0.LPC0.SMIC) Release (\_SB.PCI0.LPC0.PSMX) Store (\_SB.PCI0.LPC0.INF, Local1) And (Local1, 0x07, Local1) If (LEqual (Local1, 0x01)) { Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x02)) { Store (0x00, \_SB.PCI0.AGP.VGA.LCDA) Store (0x01, \_SB.PCI0.AGP.VGA.CRTA) Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x03)) { Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) Store (0x01, \_SB.PCI0.AGP.VGA.CRTA) Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x04)) { Store (0x00, \_SB.PCI0.AGP.VGA.LCDA) Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) Store (0x01, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x05)) { Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) Store (0x01, \_SB.PCI0.AGP.VGA.TVA) } Notify (\_SB.PCI0.AGP.VGA, 0x80) } Method (_Q0E, 0, NotSerialized) { Notify (\_SB.SLPB, 0x80) } Method (_Q10, 0, NotSerialized) { Store (0x8B, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) } Method (_Q11, 0, NotSerialized) { Store (0x8C, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) } Method (_Q15, 0, NotSerialized) { If (LOr (\_SB.BTSU, \_SB.WLSU)) { If (\_SB.BTLS) { Store (0x00, \_SB.BTLS) Store (0x00, \_SB.PCI0.SMB.GPOW) Store (0x00, \_SB.GPOB) } Else { Store (0x01, \_SB.BTLS) If (\_SB.WLSU) { If (\_SB.WIRE) { If (\_SB.WWLS) { Store (0x01, \_SB.PCI0.SMB.GPOW) } } Else { Store (0x01, \_SB.PCI0.SMB.GPOW) } } If (\_SB.BTSU) { If (\_SB.WIRE) { If (\_SB.BWLS) { Store (0x01, \_SB.GPOB) } } Else { Store (0x01, \_SB.GPOB) } } } } Else { Store (0x00, \_SB.BTLS) Store (0x00, \_SB.PCI0.SMB.GPOW) Store (0x00, \_SB.GPOB) } Store (0x13, \_SB.PCI0.SMB.INCM) Sleep (0x0A) Store (0x40, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (0xF7, \_SB.PCI0.SMB.PTGM) Sleep (0x0A) Store (0x80, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (\_SB.PCI0.SMB.PTGM, Local1) Sleep (0x0A) If (\_SB.GPOB) { Or (Local1, 0x08, Local1) Store (Local1, \_SB.PCI0.SMB.PTGM) } Else { And (Local1, 0xF7, Local1) Store (Local1, \_SB.PCI0.SMB.PTGM) } Sleep (0x0A) Store (0x05, \_SB.WMID.Z00B) Store (0x00, \_SB.WMID.Z00C) Notify (\_SB.WMID, 0x80) } Method (_Q20, 0, NotSerialized) { If (And (SMST, 0x40)) { Store (SMAA, Local0) If (LEqual (Local0, 0x14)) { SELE () If (And (0x40, BATF)) { Notify (\_SB.PCI0.LPC0.BAT1, 0x81) } If (And (0x02, BATF)) { Notify (\_SB.PCI0.LPC0.ACAD, 0x00) } Notify (\_SB.PCI0.LPC0.BAT1, 0x80) Store (BATD, BATO) BPOL (0x14) And (SMST, 0xBF, SMST) } } } Method (SELE, 0, NotSerialized) { Store (BATD, BATN) Store (0x00, BATF) If (And (0xC0, BATN)) { Or (BATF, 0x01, BATF) } If (And (0x0300, BATN)) { Or (BATF, 0x04, BATF) } And (BATN, 0x01, Local0) And (BATO, 0x01, Local1) If (Local0) { Or (BATF, 0x0100, BATF) } Else { And (BATF, 0xFEFF, BATF) } If (Not (LEqual (Local0, Local1))) { Or (BATF, 0x40, BATF) } And (BATN, 0x02, Local0) And (BATO, 0x02, Local1) If (Local0) { Or (BATF, 0x0200, BATF) } Else { And (BATF, 0xFDFF, BATF) } If (Not (LEqual (Local0, Local1))) { Or (BATF, 0x80, BATF) } And (BATN, 0xC0, Local0) And (BATO, 0xC0, Local1) If (Not (LEqual (Local0, Local1))) { Or (BATF, 0x02, BATF) } If (And (0x01, BATF)) { If (And (0x04, BATF)) { Or (BATF, 0x10, BATF) } } } Method (_Q80, 0, NotSerialized) { Store ("_Q80 : Temperature Up", Debug) Notify (\_TZ.THRM, 0x80) } Method (_Q81, 0, NotSerialized) { Store ("_Q81 : Temperature Down", Debug) Notify (\_TZ.THRM, 0x80) } Method (_Q8A, 0, NotSerialized) { If (LIDE) { Store ("_Q8A : LID Switch Event", Debug) Store (0x01, LIDE) Notify (\_SB.LID, 0x80) Sleep (0x0FA0) } } Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x1C), SMW0, 16 } Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x1C), SMB0, 8 } Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x1C), FLD0, 64 } Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x1C), FLD1, 128 } Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x1C), FLD2, 192 } Field (ERAM, ByteAcc, NoLock, Preserve) { Offset (0x1C), FLD3, 256 } Mutex (MUT0, 0x00) Method (SMRD, 4, NotSerialized) { If (LNot (ECON)) { Return (0xFF) } If (LNot (LEqual (Arg0, 0x07))) { If (LNot (LEqual (Arg0, 0x09))) { If (LNot (LEqual (Arg0, 0x0B))) { Return (0x19) } } } Acquire (MUT0, 0xFFFF) Store (0x04, Local0) While (LGreater (Local0, 0x01)) { And (SMST, 0x40, SMST) Store (Arg2, SMCM) Store (Arg1, SMAD) Store (Arg0, SMPR) Store (0x00, Local3) While (LNot (And (SMST, 0xBF, Local1))) { Sleep (0x02) Increment (Local3) If (LEqual (Local3, 0x32)) { And (SMST, 0x40, SMST) Store (Arg2, SMCM) Store (Arg1, SMAD) Store (Arg0, SMPR) Store (0x00, Local3) } } If (LEqual (Local1, 0x80)) { Store (0x00, Local0) } Else { Decrement (Local0) } } If (Local0) { Store (And (Local1, 0x1F), Local0) } Else { If (LEqual (Arg0, 0x07)) { Store (SMB0, Arg3) } If (LEqual (Arg0, 0x09)) { Store (SMW0, Arg3) } If (LEqual (Arg0, 0x0B)) { Store (BCNT, Local3) ShiftRight (0x0100, 0x03, Local2) If (LGreater (Local3, Local2)) { Store (Local2, Local3) } If (LLess (Local3, 0x09)) { Store (FLD0, Local2) } Else { If (LLess (Local3, 0x11)) { Store (FLD1, Local2) } Else { If (LLess (Local3, 0x19)) { Store (FLD2, Local2) } Else { Store (FLD3, Local2) } } } Increment (Local3) Store (Buffer (Local3) {}, Local4) Decrement (Local3) Store (Zero, Local5) While (LGreater (Local3, Local5)) { GBFE (Local2, Local5, RefOf (Local6)) PBFE (Local4, Local5, Local6) Increment (Local5) } PBFE (Local4, Local5, 0x00) Store (Local4, Arg3) } } Release (MUT0) Return (Local0) } Method (SMWR, 4, NotSerialized) { If (LNot (ECON)) { Return (0xFF) } If (LNot (LEqual (Arg0, 0x06))) { If (LNot (LEqual (Arg0, 0x08))) { If (LNot (LEqual (Arg0, 0x0A))) { Return (0x19) } } } Acquire (MUT0, 0xFFFF) Store (0x04, Local0) While (LGreater (Local0, 0x01)) { If (LEqual (Arg0, 0x06)) { Store (Arg3, SMB0) } If (LEqual (Arg0, 0x08)) { Store (Arg3, SMW0) } If (LEqual (Arg0, 0x0A)) { Store (Arg3, SMD0) } And (SMST, 0x40, SMST) Store (Arg2, SMCM) Store (Arg1, SMAD) Store (Arg0, SMPR) Store (0x00, Local3) While (LNot (And (SMST, 0xBF, Local1))) { Sleep (0x02) Increment (Local3) If (LEqual (Local3, 0x32)) { And (SMST, 0x40, SMST) Store (Arg2, SMCM) Store (Arg1, SMAD) Store (Arg0, SMPR) Store (0x00, Local3) } } If (LEqual (Local1, 0x80)) { Store (0x00, Local0) } Else { Decrement (Local0) } } If (Local0) { Store (And (Local1, 0x1F), Local0) } Release (MUT0) Return (Local0) } } Device (ACAD) { Name (_HID, "ACPI0003") Name (_PCL, Package (0x01) { \_SB }) Name (ACWT, 0x00) Method (_PSR, 0, NotSerialized) { Store (\_SB.ACST, ACWT) If (ECON) { Store (\_SB.PCI0.LPC0.EC0.SW2S, \_SB.ACST) } If (LNot (LEqual (ACWT, \_SB.ACST))) { Store (0x80, \_SB.PCI0.LPC0.BCMD) Store (0x00, \_SB.PCI0.LPC0.SMIC) } Store (\_SB.PCI0.LPC0.EC0.BATP, DBGP) If (LAnd (LEqual (\_SB.PCI0.LPC0.EC0.BATP, 0x34), LEqual (\_SB.POTL, 0x01))) { Store (0x00, \_PR.CPU0._PPC) Notify (\_PR.CPU0, 0x80) } Else { If (LEqual (\_SB.ACST, 0x01)) { Store (0x00, \_PR.CPU0._PPC) Notify (\_PR.CPU0, 0x80) } Else { If (LEqual (\_SB.PWDC, 0x06)) { Store (0x02, \_PR.CPU0._PPC) Notify (\_PR.CPU0, 0x80) } If (LEqual (\_SB.PWDC, 0x05)) { Store (0x01, \_PR.CPU0._PPC) Notify (\_PR.CPU0, 0x80) } } } Return (\_SB.ACST) } } Method (VTOB, 1, NotSerialized) { Store (0x01, Local0) ShiftLeft (Local0, Arg0, Local0) Return (Local0) } Method (BTOV, 1, NotSerialized) { ShiftRight (Arg0, 0x01, Local0) Store (0x00, Local1) While (Local0) { Increment (Local1) ShiftRight (Local0, 0x01, Local0) } Return (Local1) } Method (MKWD, 2, NotSerialized) { If (And (Arg1, 0x80)) { Store (0xFFFF0000, Local0) } Else { Store (Zero, Local0) } Or (Local0, Arg0, Local0) Or (Local0, ShiftLeft (Arg1, 0x08), Local0) Return (Local0) } Method (POSW, 1, NotSerialized) { If (And (Arg0, 0x8000)) { If (LEqual (Arg0, 0xFFFF)) { Return (0xFFFFFFFF) } Else { Not (Arg0, Local0) Increment (Local0) And (Local0, 0xFFFF, Local0) Return (Local0) } } Else { Return (Arg0) } } Method (GBFE, 3, NotSerialized) { CreateByteField (Arg0, Arg1, TIDX) Store (TIDX, Arg2) } Method (PBFE, 3, NotSerialized) { CreateByteField (Arg0, Arg1, TIDX) Store (Arg2, TIDX) } Method (ITOS, 1, NotSerialized) { Store (Buffer (0x05) { 0x20, 0x20, 0x20, 0x20, 0x20 }, Local0) Store (Buffer (0x11) { "0123456789ABCDEF" }, Local7) Store (0x05, Local1) Store (0x00, Local2) Store (0x00, Local3) While (Local1) { Decrement (Local1) And (ShiftRight (Arg0, ShiftLeft (Local1, 0x02)), 0x0F, Local4) GBFE (Local7, Local4, RefOf (Local5)) PBFE (Local0, Local2, Local5) Increment (Local2) } Return (Local0) } Device (BAT1) { Name (_HID, EisaId ("PNP0C0A")) Name (_UID, 0x01) Name (_PCL, Package (0x01) { \_SB }) Name (PBIF, Package (0x0D) { 0x01, 0xFFFFFFFF, 0xFFFFFFFF, 0x01, 0xFFFFFFFF, 0xFA, 0x96, 0x0A, 0x19, "BAT1", " ", " ", " " }) Name (PBST, Package (0x04) { 0x00, 0xFFFFFFFF, 0xFFFFFFFF, 0x2710 }) Name (BAST, 0x00) Name (B1ST, 0x0F) Name (B1WT, 0x00) Method (_STA, 0, NotSerialized) { If (ECON) { If (\_SB.PCI0.LPC0.EC0.MBTS) { Store (0x1F, B1ST) Store (\_SB.PCI0.LPC0.EC0.BA1C, \_SB.CM26) } Else { Store (0x0F, B1ST) Store (0xFF, \_SB.CM26) } } Else { Store (0x0F, B1ST) } Return (B1ST) } Method (_BIF, 0, NotSerialized) { If (ECON) { If (\_SB.PCI0.LPC0.EC0.MBTS) { UPBI () } Else { IVBI () } } Else { IVBI () } Return (PBIF) } Method (_BST, 0, NotSerialized) { If (ECON) { If (\_SB.PCI0.LPC0.EC0.MBTS) { UPBS () } Else { IVBS () } } Else { IVBS () } Return (PBST) } Method (UPBI, 0, NotSerialized) { If (LNot (\_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x10, RefOf (Local5)))) { If (LAnd (Local5, LNot (And (Local5, 0x8000)))) { ShiftRight (Local5, 0x05, Local5) ShiftLeft (Local5, 0x05, Local5) Store (Local5, Index (PBIF, 0x02)) Divide (Local5, 0x64, , Local2) Add (Local2, 0x01, Local2) Multiply (Local2, 0x05, Local4) Add (Local4, 0x02, Index (PBIF, 0x05)) Multiply (Local2, 0x03, Local4) Add (Local4, 0x02, Index (PBIF, 0x06)) } } If (\_SB.PCI0.LPC0.EC0.MBNH) { Store (0x2328, Index (PBIF, 0x01)) Store (0x1C20, Index (PBIF, 0x04)) Store ("OANI$", Index (PBIF, 0x09)) Store ("NiMH", Index (PBIF, 0x0B)) } Else { Store (0x1770, Index (PBIF, 0x01)) Store (0x39D0, Index (PBIF, 0x04)) Sleep (0x32) If (LEqual (\_SB.PCI0.LPC0.EC0.BATP, 0x34)) { Store ("JM-12", Index (PBIF, 0x09)) } Else { If (LEqual (\_SB.PCI0.LPC0.EC0.BATP, 0x32)) { Store ("JM-6", Index (PBIF, 0x09)) } Else { Store ("JM-6", Index (PBIF, 0x09)) } } Store ("LION", Index (PBIF, 0x0B)) } UPUM () Store (0x01, Index (PBIF, 0x00)) } Method (UPUM, 0, NotSerialized) { Store (Buffer (0x0A) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, Local0) Store (Buffer (0x05) { 0x36, 0x35, 0x35, 0x33, 0x35 }, Local6) Store (Buffer (0x05) { 0x31, 0x32, 0x33, 0x32, 0x31 }, Local7) If (LNot (\_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x1B, RefOf (Local5)))) { Store (ITOS (ToBCD (Local5)), Local7) } If (LNot (\_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x1C, RefOf (Local5)))) { Store (ITOS (ToBCD (Local5)), Local6) } Store (0x05, Local1) Store (0x00, Local2) Store (0x00, Local3) While (Local1) { Decrement (Local1) GBFE (Local6, Local2, RefOf (Local5)) PBFE (Local0, Local3, Local5) Increment (Local2) Increment (Local3) } Store (0x00, Local2) Store (0x05, Local1) While (Local1) { Decrement (Local1) GBFE (Local7, Local2, RefOf (Local5)) PBFE (Local0, Local3, Local5) Increment (Local2) Increment (Local3) } Store (Local0, Index (PBIF, 0x0A)) Store ("Hewlett-Packard", Index (PBIF, 0x0C)) } Method (UPBS, 0, NotSerialized) { Store (0xFFFFFFFF, Index (PBST, 0x01)) Store (\_SB.PCI0.LPC0.EC0.MBRM, Local5) If (LNot (And (Local5, 0x8000))) { ShiftRight (Local5, 0x05, Local5) ShiftLeft (Local5, 0x05, Local5) If (LNot (LEqual (Local5, DerefOf (Index (PBST, 0x02))))) { Store (Local5, Index (PBST, 0x02)) } } Store (0xFFFFFFFF, Index (PBST, 0x03)) Store (\_SB.PCI0.LPC0.EC0.MBST, Index (PBST, 0x00)) Store (\_SB.PCI0.LPC0.EC0.BA1C, \_SB.CM26) } Method (IVBI, 0, NotSerialized) { Store (0xFFFFFFFF, Index (PBIF, 0x01)) Store (0xFFFFFFFF, Index (PBIF, 0x02)) Store (0xFFFFFFFF, Index (PBIF, 0x04)) Store ("Bad", Index (PBIF, 0x09)) Store (" ", Index (PBIF, 0x0A)) Store ("Bad", Index (PBIF, 0x0B)) Store ("Bad", Index (PBIF, 0x0C)) } Method (IVBS, 0, NotSerialized) { Store (0x00, Index (PBST, 0x00)) Store (0xFFFFFFFF, Index (PBST, 0x01)) Store (0xFFFFFFFF, Index (PBST, 0x02)) Store (0x2710, Index (PBST, 0x03)) Store (0xFF, \_SB.CM26) } } } Device (P2P) { Name (_ADR, 0x00140004) Name (_PRW, Package (0x02) { 0x04, 0x04 }) Method (_PRT, 0, NotSerialized) { If (GPIC) { Return (Package (0x05) { Package (0x04) { 0x0002FFFF, 0x00, 0x00, 0x14 }, Package (0x04) { 0x0002FFFF, 0x01, 0x00, 0x15 }, Package (0x04) { 0x0009FFFF, 0x00, 0x00, 0x11 }, Package (0x04) { 0x0009FFFF, 0x02, 0x00, 0x16 }, Package (0x04) { 0xFFFF, 0x00, 0x00, 0x12 } }) } Else { Return (Package (0x05) { Package (0x04) { 0x0002FFFF, 0x00, \_SB.PCI0.LPC0.LNKE, 0x00 }, Package (0x04) { 0x0002FFFF, 0x01, \_SB.PCI0.LPC0.LNKF, 0x00 }, Package (0x04) { 0x0009FFFF, 0x00, \_SB.PCI0.LPC0.LNKB, 0x00 }, Package (0x04) { 0x0009FFFF, 0x02, \_SB.PCI0.LPC0.LNKG, 0x00 }, Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC0.LNKC, 0x00 } }) } } } Device (AUDO) { Name (_ADR, 0x00140005) Name (_PRW, Package (0x02) { 0x0C, 0x03 }) } Device (MODM) { Name (_ADR, 0x00140006) } Device (AGP) { Name (_ADR, 0x00010000) Method (_PRT, 0, NotSerialized) { If (GPIC) { Return (Package (0x04) { Package (0x04) { 0x0005FFFF, 0x00, 0x00, 0x11 }, Package (0x04) { 0x0005FFFF, 0x01, 0x00, 0x12 }, Package (0x04) { 0x0005FFFF, 0x02, 0x00, 0x13 }, Package (0x04) { 0x0005FFFF, 0x03, 0x00, 0x10 } }) } Else { Return (Package (0x04) { Package (0x04) { 0x0005FFFF, 0x00, \_SB.PCI0.LPC0.LNKB, 0x00 }, Package (0x04) { 0x0005FFFF, 0x01, \_SB.PCI0.LPC0.LNKC, 0x00 }, Package (0x04) { 0x0005FFFF, 0x02, \_SB.PCI0.LPC0.LNKD, 0x00 }, Package (0x04) { 0x0005FFFF, 0x03, \_SB.PCI0.LPC0.LNKA, 0x00 } }) } } Device (VGA) { Name (_ADR, 0x00050000) Name (DABL, 0x00) Name (SWIT, 0x01) Name (CRTA, 0x01) Name (LCDA, 0x01) Name (TVA, 0x00) Name (TOGF, 0x00) Name (_S3D, 0x03) Method (_INI, 0, NotSerialized) { Acquire (\_SB.PCI0.LPC0.PSMX, 0xFFFF) Store (0x83, \_SB.PCI0.LPC0.BCMD) Store (0x00, \_SB.PCI0.LPC0.INFO) Store (Zero, \_SB.PCI0.LPC0.SMIC) Release (\_SB.PCI0.LPC0.PSMX) Store (\_SB.PCI0.LPC0.INF, Local0) Store (Local0, DABL) Store (Local0, Local1) Store (Local0, Local2) And (Local1, 0x01, CRTA) And (Local1, 0x02, LCDA) If (LGreater (Local0, 0x04)) { And (Local0, 0x03, TOGF) } Else { Store (Local0, TOGF) } } Method (_DOS, 1, NotSerialized) { Store ("VGA --_DOS Arg0", Debug) Store (Arg0, SWIT) } Method (_DOD, 0, NotSerialized) { Store ("VGA --_DOD", Debug) Return (Package (0x03) { 0x00010100, 0x00010110, 0x0200 }) } Method (_PS0, 0, NotSerialized) { Store ("VGA_PS0", Debug) } Method (_PS2, 0, NotSerialized) { Store ("VGA_PS2", Debug) } Method (_PS3, 0, NotSerialized) { Store ("VGA_PS3", Debug) } Device (CRT) { Name (_ADR, 0x0100) Method (_DCS, 0, NotSerialized) { Store ("CRT --_DCS", Debug) If (CRTA) { Return (0x1F) } Else { Return (0x1D) } } Method (_DGS, 0, NotSerialized) { Store ("CRT --_DGS", Debug) Store (CRTA, Local0) If (CRTA) { Return (0x01) } Else { Return (0x00) } } Method (_DSS, 1, NotSerialized) { Store ("CRT --_DSS", Debug) Store (Arg0, Debug) } } Device (LCD) { Name (_ADR, 0x0110) Method (_DCS, 0, NotSerialized) { Store ("LCD --_DCS", Debug) If (LCDA) { Return (0x1F) } Else { Return (0x1D) } } Method (_DGS, 0, NotSerialized) { Store ("LCD --_DGS", Debug) Store (LCDA, Local0) If (LCDA) { Return (0x01) } Else { Return (0x00) } } Method (_DSS, 1, NotSerialized) { Store ("LCD --_DSS", Debug) Store (Arg0, Debug) } } Device (TV) { Name (_ADR, 0x0200) Method (_DCS, 0, NotSerialized) { Store ("TV --_DCS", Debug) If (TVA) { Return (0x1F) } Else { Return (0x1D) } } Method (_DGS, 0, NotSerialized) { Store ("TV --_DGS", Debug) Store (TVA, Local0) If (TVA) { Return (0x01) } Else { Return (0x00) } } Method (_DSS, 1, NotSerialized) { Store ("TV --_DSS", Debug) Store (Arg0, Debug) } } } } } Device (WMID) { Name (Z00D, Package (0x07) { 0x04, 0x04, 0x04, 0x00, 0x04, 0x04, 0x00 }) Mutex (WMUX, 0x00) Method (Z00E, 2, NotSerialized) { CreateDWordField (Arg1, 0x04, Z00F) CreateDWordField (Arg1, 0x08, Z00G) CreateDWordField (Arg1, 0x0C, Z00H) If (LEqual (Arg0, 0x01)) { Store (0x00, Local0) } If (LEqual (Arg0, 0x02)) { Store (0x04, Local0) } If (LEqual (Arg0, 0x03)) { Store (0x80, Local0) } If (LEqual (Arg0, 0x04)) { Store (0x0400, Local0) } If (LEqual (Arg0, 0x05)) { Store (0x1000, Local0) } Store (Buffer (Add (0x08, Local0)) {}, Local1) CreateDWordField (Local1, 0x00, Z00I) CreateDWordField (Local1, 0x04, Z00J) Store (0x4C494146, Z00I) Store (0x02, Z00J) Store (0x03, Z00J) If (LEqual (Z00F, 0x01)) { Store (0x04, Z00J) If (LEqual (Z00G, 0x05)) { Store (^Z00K (), Local2) Store (0x00, Z00J) } If (LEqual (Z00G, 0x07)) { If (Z00H) { Store (DerefOf (Index (Arg1, 0x10)), Local3) Store (^Z00L (Local3), Local2) Store (0x00, Z00J) } Else { Store (0x05, Z00J) } } If (LEqual (Z00G, 0x01)) { Store (^Z00M (), Local2) Store (0x00, Z00J) } } If (LEqual (Z00F, 0x02)) { Store (0x04, Z00J) If (LAnd (LGreater (Z00G, 0x00), LNot (LGreater (Z00G, 0x06)))) { If (LLess (Z00H, DerefOf (Index (Z00D, Subtract (Z00G, 0x01))))) { Store (0x05, Z00J) } Else { CreateDWordField (Arg1, 0x10, Z00N) If (LEqual (Z00G, 0x05)) { Store (^Z00O (Z00N), Local2) Store (0x00, Z00J) } If (LEqual (Z00G, 0x01)) { Store (^Z00P (Z00N), Local2) Store (0x00, Z00J) } } } } If (LEqual (Z00J, 0x00)) { Store (DerefOf (Index (Local2, 0x00)), Z00J) If (LEqual (Z00J, 0x00)) { If (LNot (LGreater (DerefOf (Index (Local2, 0x01)), Local0))) { Store (0x00, Local0) While (LLess (Local0, DerefOf (Index (Local2, 0x01)))) { Store (DerefOf (Index (DerefOf (Index (Local2, 0x02)), Local0)), Index (Local1, Add (Local0, 0x08))) Increment (Local0) } Store (0x53534150, Z00I) } Else { Store (0x05, Z00J) } } } Return (Local1) } Name (_HID, "PNP0C14") Name (_UID, 0x00) Name (Z00B, 0x00) Name (Z00C, 0x00) Name (BUFF, Buffer (0x04) { 0x00, 0x00, 0x00, 0x00 }) CreateByteField (BUFF, 0x00, OB0) CreateByteField (BUFF, 0x01, OB1) CreateByteField (BUFF, 0x02, OB2) CreateByteField (BUFF, 0x03, OB3) Name (_WDG, Buffer (0x50) { 0x34, 0xF0, 0xB7, 0x5F, 0x63, 0x2C, 0xE9, 0x45, 0xBE, 0x91, 0x3D, 0x44, 0xE2, 0xC7, 0x07, 0xE4, 0x41, 0x44, 0x01, 0x02, 0x79, 0x42, 0xF2, 0x95, 0x7B, 0x4D, 0x34, 0x43, 0x93, 0x87, 0xAC, 0xCD, 0xC6, 0x7E, 0xF6, 0x1C, 0x80, 0x00, 0x01, 0x08, 0x21, 0x12, 0x90, 0x05, 0x66, 0xD5, 0xD1, 0x11, 0xB2, 0xF0, 0x00, 0xA0, 0xC9, 0x06, 0x29, 0x10, 0x41, 0x45, 0x01, 0x00, 0xD4, 0x2B, 0x99, 0xD0, 0x7C, 0xA4, 0xFE, 0x4E, 0xB0, 0x72, 0x32, 0x4A, 0xEC, 0x92, 0x29, 0x6C, 0x42, 0x43, 0x01, 0x00 }) Method (WQBC, 1, NotSerialized) { Store (0x89, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) Store (\_SB.PCI0.LPC0.INF, Local0) And (Local0, 0x07, Local0) If (LEqual (\_SB.LID._LID (), 0x00)) { And (Local0, 0x06, Local0) } Return (Local0) } Method (WSBC, 2, NotSerialized) { CreateByteField (Arg1, 0x00, ADA0) Store (ADA0, Local0) If (Ones) { Store (0x8D, \_SB.PCI0.LPC0.BCMD) Store (Zero, \_SB.PCI0.LPC0.SMIC) Store (\_SB.PCI0.LPC0.INF, Local1) And (Local1, 0x07, Local1) If (LEqual (Local0, Local1)) { Return (0x02) } Else { Store (Local0, Local1) If (LGreater (Local1, 0x06)) { Store (One, Local1) } If (LEqual (Local1, 0x01)) { Store ("LCD", Debug) Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x02)) { Store ("CRT", Debug) Store (0x00, \_SB.PCI0.AGP.VGA.LCDA) Store (0x01, \_SB.PCI0.AGP.VGA.CRTA) Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x03)) { Store ("Both", Debug) Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) Store (0x01, \_SB.PCI0.AGP.VGA.CRTA) Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local1, 0x04)) { Store ("TV", Debug) Store (0x00, \_SB.PCI0.AGP.VGA.LCDA) Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) Store (0x01, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local0, 0x05)) { Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) Store (0x01, \_SB.PCI0.AGP.VGA.TVA) } If (LEqual (Local0, 0x06)) { Store (0x00, \_SB.PCI0.AGP.VGA.LCDA) Store (0x01, \_SB.PCI0.AGP.VGA.CRTA) Store (0x01, \_SB.PCI0.AGP.VGA.TVA) } Notify (\_SB.PCI0.AGP.VGA, 0x80) Return (0x00) } } Else { Return (0x01) } } Method (WMAD, 3, NotSerialized) { Return (Z00E (Arg1, Arg2)) } Method (Z00K, 0, NotSerialized) { Store (0x13, \_SB.PCI0.SMB.INCM) Sleep (0x0A) Store (0x40, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (0xF7, \_SB.PCI0.SMB.PTGM) Sleep (0x0A) Store (0x80, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (\_SB.PCI0.SMB.PTGM, Local1) Sleep (0x0A) And (Local1, 0x08, Local1) If (LEqual (Local1, 0x08)) { Store (0x01, Local1) Store (Local1, \_SB.GPOB) } Else { Store (0x00, Local1) Store (Local1, \_SB.GPOB) } Store (0x01, \_SB.WIRE) And (\_SB.BTWL, 0x03, Local0) Or (Local0, 0x20, OB0) Store (\_SB.WWLS, Local1) ShiftLeft (Local1, 0x01, Local1) Store (\_SB.BWLS, Local2) ShiftLeft (Local2, 0x01, Local2) Store (\_SB.BTLS, Local3) ShiftLeft (Local3, 0x03, Local3) Or (Local1, Local3, Local1) Or (Local2, Local3, Local2) If (\_SB.PCI0.SMB.GPOW) { If (LNot (\_SB.WWLS)) { Store (0x00, \_SB.PCI0.SMB.GPOW) } If (LNot (\_SB.BTLS)) { Store (0x00, \_SB.PCI0.SMB.GPOW) } } If (\_SB.GPOB) { If (LNot (\_SB.BWLS)) { Store (0x00, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) And (Local4, 0xF7, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } If (LNot (\_SB.BTLS)) { Store (0x00, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) And (Local4, 0xF7, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } Or (\_SB.PCI0.SMB.GPOW, Local1, Local1) Or (\_SB.GPOB, Local2, Local2) Store (0x00, OB2) Store (0x00, OB1) If (\_SB.WLSU) { Or (Local1, 0x04, Local1) } If (\_SB.BTSU) { Or (Local2, 0x04, Local2) } If (\_SB.PCI0.SMB.GPOW) { Or (Local1, 0x10, Local1) } Else { And (Local1, 0xEF, Local1) } If (And (\_SB.BTWL, 0x01)) { Store (Local1, OB1) } If (And (\_SB.BTWL, 0x02)) { Store (Local2, OB2) } Store (0x00, OB3) Store (Package (0x03) { 0x00, 0x04, Buffer (0x04) { 0x01, 0x02, 0x03, 0x04 } }, Local0) Store (OB0, Index (DerefOf (Index (Local0, 0x02)), 0x00)) Store (OB1, Index (DerefOf (Index (Local0, 0x02)), 0x01)) Store (OB2, Index (DerefOf (Index (Local0, 0x02)), 0x02)) Store (OB3, Index (DerefOf (Index (Local0, 0x02)), 0x03)) Return (Local0) } Method (Z00O, 1, NotSerialized) { Store (0x13, \_SB.PCI0.SMB.INCM) Sleep (0x0A) Store (0x40, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (0xF7, \_SB.PCI0.SMB.PTGM) Sleep (0x0A) Store (0x80, \_SB.PCI0.SMB.DACM) Sleep (0x0A) Store (\_SB.PCI0.SMB.PTGM, Local1) Sleep (0x0A) And (Local1, 0x08, Local1) If (LEqual (Local1, 0x08)) { Store (0x01, Local1) Store (Local1, \_SB.GPOB) } Else { Store (0x00, Local1) Store (Local1, \_SB.GPOB) } If (And (\_SB.BTWL, 0x03)) { If (And (Arg0, 0x0800)) { If (And (Arg0, 0x08)) { Store (0x01, \_SB.WWLS) Store (0x01, \_SB.BWLS) If (\_SB.WLSU) { If (\_SB.BTLS) { Store (0x01, \_SB.PCI0.SMB.GPOW) } } Else { Store (0x00, \_SB.PCI0.SMB.GPOW) } If (\_SB.BTSU) { If (\_SB.BTLS) { Store (0x01, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) Or (Local4, 0x08, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } Else { Store (0x00, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) And (Local4, 0xF7, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } Else { Store (0x00, \_SB.WWLS) Store (0x00, \_SB.PCI0.SMB.GPOW) Store (0x00, \_SB.BWLS) Store (0x00, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) And (Local4, 0xF7, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } If (And (Arg0, 0x0100)) { If (And (Arg0, 0x01)) { Store (0x01, \_SB.WWLS) If (\_SB.WLSU) { If (\_SB.BTLS) { Store (0x01, \_SB.PCI0.SMB.GPOW) } } Else { Store (0x00, \_SB.PCI0.SMB.GPOW) } } Else { Store (0x00, \_SB.WWLS) Store (0x00, \_SB.PCI0.SMB.GPOW) } } If (And (Arg0, 0x0200)) { If (And (Arg0, 0x02)) { Store (0x01, \_SB.BWLS) If (\_SB.BTSU) { If (\_SB.BTLS) { Store (0x01, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) Or (Local4, 0x08, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } Else { Store (0x00, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) And (Local4, 0xF7, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } Else { Store (0x00, \_SB.BWLS) Store (0x00, \_SB.GPOB) Store (\_SB.PCI0.SMB.PTGM, Local4) And (Local4, 0xF7, Local4) Store (Local4, \_SB.PCI0.SMB.PTGM) } } Return (Package (0x02) { 0x00, 0x00 }) } Else { Return (Package (0x02) { 0x0D, 0x00 }) } } Method (Z00L, 1, NotSerialized) { Acquire (\_SB.PCI0.LPC0.EC0.MUT0, 0xFFFF) If (LNot (ECON)) { Store (Package (0x02) { 0x0D, 0x00 }, Local0) Sleep (0x96) Release (\_SB.PCI0.LPC0.EC0.MUT0) Return (Local0) } If (Arg0) { Store (Package (0x02) { 0x06, 0x00 }, Local0) Sleep (0x96) Release (\_SB.PCI0.LPC0.EC0.MUT0) Return (Local0) } If (\_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x14, 0x01, RefOf (Local0))) { Store (Package (0x02) { 0x06, 0x00 }, Local0) Sleep (0x96) Release (\_SB.PCI0.LPC0.EC0.MUT0) Return (Local0) } Store (Package (0x03) { 0x00, 0x80, Buffer (0x80) {} }, Local0) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x18, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x01)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x00)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x10, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x03)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x02)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x0F, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x05)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x04)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x0C, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x07)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x06)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x17, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x09)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x08)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x08, RefOf (Local1)) Subtract (Local1, 0x0AAA, Local1) Divide (Local1, 0x0A, Local2, Local1) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x0B)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x0A)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x09, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x0D)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x0C)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x0A, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x0F)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x0E)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x19, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x11)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x10)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x16, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x13)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x12)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x3F, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x15)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x14)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x3E, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x17)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x16)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x3D, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x19)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x18)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x3C, RefOf (Local1)) Divide (Local1, 0x0100, Local2, Index (DerefOf (Index (Local0, 0x02)), 0x1B)) Store (Local2, Index (DerefOf (Index (Local0, 0x02)), 0x1A)) \_SB.PCI0.LPC0.EC0.SMRD (0x09, 0x16, 0x1C, RefOf (Local1)) Store (ITOS (ToBCD (Local1)), Local3) Store (0x1C, Local2) Store (0x00, Local4) Store (SizeOf (Local3), Local1) While (Local1) { GBFE (Local3, Local4, RefOf (Local5)) PBFE (DerefOf (Index (Local0, 0x02)), Local2, Local5) Decrement (Local1) Increment (Local2) Increment (Local4) } Store (0x00, Index (DerefOf (Index (Local0, 0x02)), Local2)) Store (0x2C, Local2) Store (0x00, Local4) Store (0x0F, Local1) Store (Buffer (0x10) { "Hewlett-Packard" }, Local3) While (Local1) { GBFE (Local3, Local4, RefOf (Local5)) PBFE (DerefOf (Index (Local0, 0x02)), Local2, Local5) Decrement (Local1) Increment (Local2) Increment (Local4) } Store (0x00, Index (DerefOf (Index (Local0, 0x02)), Local2)) Sleep (0x96) Release (\_SB.PCI0.LPC0.EC0.MUT0) Return (Local0) } Method (Z00M, 0, NotSerialized) { Store (WQBC (0x00), OB0) Store (0x00, OB1) Store (0x00, OB2) Store (0x00, OB3) Store (Package (0x03) { 0x00, 0x04, Buffer (0x04) { 0x01, 0x02, 0x03, 0x04 } }, Local0) Store (OB0, Index (DerefOf (Index (Local0, 0x02)), 0x00)) Store (OB1, Index (DerefOf (Index (Local0, 0x02)), 0x01)) Store (OB2, Index (DerefOf (Index (Local0, 0x02)), 0x02)) Store (OB3, Index (DerefOf (Index (Local0, 0x02)), 0x03)) Return (Local0) } Method (Z00P, 1, NotSerialized) { And (Arg0, 0x07, Local0) Store (Local0, Local1) If (And (Local0, 0x01)) { Store (0x01, \_SB.PCI0.AGP.VGA.LCDA) } Else { Store (0x00, \_SB.PCI0.AGP.VGA.LCDA) } If (And (Local0, 0x02)) { Store (0x01, \_SB.PCI0.AGP.VGA.CRTA) } Else { Store (0x00, \_SB.PCI0.AGP.VGA.CRTA) } If (And (Local0, 0x04)) { Store (0x01, \_SB.PCI0.AGP.VGA.TVA) } Else { Store (0x00, \_SB.PCI0.AGP.VGA.TVA) } Notify (\_SB.PCI0.AGP.VGA, 0x80) Return (Package (0x02) { 0x00, 0x00 }) } Method (_WED, 1, NotSerialized) { Concatenate (Z00B, Z00C, Local0) Return (Local0) } Name (WQAE, Buffer (0x08A9) { 0x46, 0x4F, 0x4D, 0x42, 0x01, 0x00, 0x00, 0x00, 0x99, 0x08, 0x00, 0x00, 0x8A, 0x3A, 0x00, 0x00, 0x44, 0x53, 0x00, 0x01, 0x1A, 0x7D, 0xDA, 0x54, 0x98, 0x4B, 0x9C, 0x00, 0x01, 0x06, 0x18, 0x42, 0x10, 0x13, 0x10, 0x22, 0x21, 0x04, 0x12, 0x01, 0xA1, 0xC8, 0x2C, 0x0C, 0x86, 0x10, 0x38, 0x2E, 0x84, 0x1C, 0x40, 0x88, 0x59, 0x50, 0x08, 0x21, 0x10, 0xEA, 0x4F, 0x20, 0xBF, 0x02, 0x10, 0x3A, 0x14, 0x20, 0x53, 0x80, 0x41, 0x01, 0x4E, 0x11, 0x44, 0xD0, 0xAB, 0x00, 0x9B, 0x02, 0x4C, 0x0A, 0xB0, 0x28, 0x40, 0xBB, 0x00, 0xCB, 0x02, 0x74, 0x0B, 0x90, 0x0E, 0x4B, 0x44, 0x82, 0xA3, 0xC4, 0x80, 0xA3, 0x74, 0x62, 0x0B, 0x37, 0x6C, 0xF0, 0x42, 0x51, 0x34, 0x83, 0x28, 0x09, 0x2A, 0x17, 0xE0, 0x1B, 0x41, 0xE0, 0xE5, 0x0A, 0x90, 0x3C, 0x01, 0x69, 0x16, 0x60, 0x58, 0x80, 0x75, 0x01, 0xB2, 0x87, 0x40, 0xA5, 0x0E, 0x01, 0x25, 0x67, 0x08, 0xA8, 0x01, 0xB4, 0x3A, 0x01, 0xE1, 0x57, 0x3A, 0x25, 0x24, 0x41, 0x38, 0x63, 0x15, 0x8F, 0xAF, 0x59, 0x34, 0x3D, 0x27, 0x39, 0xC7, 0x90, 0xE3, 0x71, 0xA1, 0x07, 0xC1, 0x05, 0x78, 0x18, 0x06, 0x1D, 0xB2, 0x22, 0x6B, 0x80, 0xC1, 0x58, 0x18, 0x0B, 0x75, 0x31, 0x6A, 0xD4, 0x48, 0xD9, 0x80, 0x0C, 0x51, 0x12, 0x1C, 0x6A, 0xD4, 0x96, 0x28, 0xC0, 0xFC, 0x38, 0x34, 0xBB, 0xB6, 0xC7, 0x42, 0x20, 0x99, 0xB4, 0xA1, 0xA0, 0xA4, 0x40, 0x68, 0x6C, 0x67, 0xEA, 0x19, 0x45, 0x3C, 0x52, 0xC3, 0x24, 0xF0, 0x28, 0x22, 0x1B, 0x8D, 0x43, 0x63, 0x87, 0xE1, 0x61, 0x06, 0x3B, 0x88, 0xC3, 0x38, 0xE6, 0xC8, 0x09, 0x3C, 0xA1, 0x23, 0x3D, 0xF2, 0xC2, 0xE6, 0x29, 0xD4, 0x18, 0xCD, 0x41, 0x11, 0xB8, 0xD0, 0x18, 0x19, 0x10, 0xF2, 0x3C, 0x7E, 0x8D, 0xC4, 0x04, 0x76, 0x2F, 0xC0, 0x1A, 0xA6, 0x60, 0x1B, 0x9B, 0x98, 0xFE, 0xFF, 0x10, 0x47, 0x1E, 0xA3, 0xAD, 0xB9, 0x0B, 0x29, 0x4C, 0x8C, 0x28, 0xC1, 0xE2, 0x55, 0x3C, 0x0D, 0xA1, 0x3C, 0x29, 0x84, 0x8A, 0x54, 0x19, 0x8A, 0x86, 0x1E, 0xA5, 0x42, 0x01, 0xCE, 0xE6, 0x21, 0xDC, 0x1A, 0x41, 0x85, 0x10, 0x2B, 0x52, 0xAC, 0xF6, 0x07, 0x41, 0x42, 0x2E, 0x5B, 0xC7, 0x07, 0x47, 0x1A, 0x0D, 0xEA, 0x50, 0xE0, 0xB1, 0x7B, 0xDC, 0xCF, 0x02, 0x3E, 0x08, 0x9C, 0x5B, 0x90, 0xA3, 0x3B, 0x8B, 0x47, 0x85, 0x83, 0xF6, 0xF0, 0xD8, 0x6D, 0xC0, 0x67, 0x08, 0x9F, 0x02, 0xF0, 0xAE, 0x01, 0x35, 0xFD, 0x83, 0x67, 0x82, 0xE0, 0x50, 0x43, 0xF4, 0xA8, 0xC3, 0x9D, 0xC0, 0x21, 0x32, 0x40, 0x4F, 0xEA, 0xB8, 0xB1, 0x83, 0x3B, 0x99, 0x83, 0x7E, 0x6F, 0x68, 0xF6, 0xC6, 0x40, 0x08, 0x8E, 0xC7, 0x97, 0x05, 0x36, 0xE1, 0x04, 0x96, 0x3F, 0x08, 0xD4, 0xC8, 0x0C, 0xED, 0x51, 0x9E, 0x56, 0xCC, 0x90, 0xCF, 0x0C, 0x26, 0xB0, 0x58, 0x08, 0x29, 0x80, 0xD0, 0x78, 0xC0, 0x7F, 0x03, 0x78, 0xC0, 0xF0, 0xCD, 0xC0, 0xF3, 0x35, 0xC1, 0xB0, 0x10, 0x32, 0xB2, 0x0A, 0x8F, 0x87, 0x8E, 0xC2, 0xD7, 0x83, 0xC3, 0x39, 0xAD, 0x78, 0x26, 0x18, 0x0E, 0x42, 0x27, 0x09, 0x8B, 0x1A, 0x36, 0x3D, 0x39, 0xF0, 0x43, 0x03, 0xBB, 0x19, 0x9C, 0xC1, 0x23, 0x80, 0x47, 0x72, 0x42, 0xFE, 0x98, 0x78, 0x60, 0xF0, 0x01, 0xF1, 0xDE, 0xA7, 0x4C, 0x46, 0x70, 0xA6, 0x06, 0xF4, 0x71, 0xC0, 0xFF, 0xFF, 0xA1, 0xF0, 0x21, 0x7A, 0x7C, 0xA7, 0x7C, 0xBC, 0x96, 0x00, 0x21, 0x59, 0xE3, 0x84, 0x7E, 0x87, 0xF0, 0xF1, 0xC3, 0x47, 0x16, 0x47, 0x84, 0x90, 0x93, 0x53, 0x00, 0x1A, 0xF8, 0x74, 0xCF, 0x2E, 0xC2, 0xE9, 0x7A, 0x52, 0x0E, 0x34, 0x0C, 0x3A, 0x4E, 0x70, 0x9C, 0x07, 0xC0, 0x31, 0x4E, 0xF8, 0xE7, 0x02, 0xF8, 0x03, 0xE4, 0xA7, 0x8C, 0x57, 0x8C, 0x04, 0x8E, 0x39, 0x42, 0xF4, 0xB9, 0xC6, 0x23, 0xC4, 0xC2, 0x3F, 0x55, 0x14, 0x3E, 0x10, 0x32, 0x46, 0x70, 0x01, 0x7A, 0x8C, 0xC0, 0x37, 0xE0, 0x18, 0xD1, 0x47, 0x09, 0xAE, 0xFE, 0xA0, 0x41, 0x07, 0x88, 0xFB, 0xFF, 0x0F, 0x10, 0x3E, 0xA8, 0x07, 0x08, 0x7C, 0xA3, 0x1F, 0x3D, 0xD0, 0xE3, 0xB2, 0xE8, 0xF3, 0x80, 0x8C, 0x9F, 0x68, 0x34, 0x2F, 0x7E, 0x3A, 0xE0, 0x87, 0x0F, 0xF0, 0x80, 0x7A, 0x48, 0x38, 0x50, 0xCC, 0xB4, 0x39, 0xE8, 0xB3, 0xCB, 0xA1, 0x63, 0x87, 0x0B, 0xFE, 0x13, 0x08, 0xB8, 0xE4, 0x1D, 0xC2, 0x40, 0x31, 0x62, 0xFC, 0x39, 0xC8, 0xA7, 0x30, 0xF0, 0xFF, 0xFF, 0x4F, 0x61, 0xB8, 0x11, 0xF0, 0x20, 0xAF, 0x05, 0x9F, 0xB6, 0xA8, 0x74, 0x18, 0xD4, 0x81, 0x0B, 0x30, 0x09, 0x1A, 0xE1, 0x59, 0xA2, 0x36, 0x08, 0x01, 0xBF, 0x4D, 0xBC, 0x6D, 0xF9, 0x16, 0x10, 0xE7, 0xC8, 0x7B, 0x3B, 0x70, 0x11, 0x8C, 0x08, 0xA7, 0x1D, 0xCA, 0x63, 0x88, 0x18, 0x23, 0xCA, 0xE3, 0x96, 0x51, 0xDE, 0xB6, 0x5E, 0x00, 0xE2, 0x9D, 0xE5, 0xF3, 0x96, 0x31, 0x82, 0x47, 0x7E, 0xE0, 0x62, 0x62, 0xDF, 0x13, 0xFA, 0xB9, 0xF9, 0xC0, 0x05, 0x38, 0xFB, 0xFF, 0x1F, 0xB8, 0x00, 0x0E, 0x05, 0x3D, 0x0C, 0xA1, 0x87, 0xE1, 0xA9, 0x9C, 0xCB, 0x13, 0xE5, 0xA9, 0x44, 0x8C, 0x1A, 0x26, 0xEA, 0x33, 0x94, 0x2F, 0x1A, 0x3E, 0x10, 0x81, 0xEF, 0xCC, 0x05, 0xFC, 0xFE, 0xFF, 0x07, 0x22, 0x38, 0x02, 0xCF, 0x34, 0xA0, 0xF4, 0x39, 0x03, 0x81, 0x9C, 0x8A, 0x0F, 0x35, 0xC0, 0x48, 0xF4, 0xAB, 0xC1, 0x27, 0x1A, 0x2A, 0x13, 0x06, 0x75, 0xA8, 0x01, 0x4C, 0x5E, 0x61, 0x9E, 0x46, 0xCF, 0xF9, 0x59, 0xC6, 0xA7, 0x1A, 0x1F, 0x4A, 0x8D, 0x63, 0x88, 0x97, 0x99, 0x87, 0x1A, 0x1F, 0x0B, 0x5E, 0x49, 0x7D, 0xA8, 0x31, 0x54, 0x9C, 0x87, 0x1A, 0x9F, 0x48, 0x03, 0x45, 0x7D, 0xB3, 0x79, 0xB6, 0x31, 0x7A, 0x7C, 0xDF, 0x50, 0x0D, 0xF1, 0x50, 0xC3, 0x84, 0xBD, 0x23, 0xF4, 0xC1, 0xF5, 0xA1, 0x06, 0x1C, 0xFF, 0xFF, 0x43, 0x0D, 0xC0, 0xFF, 0xFF, 0xFF, 0xA1, 0x06, 0x70, 0x74, 0x34, 0x80, 0x73, 0x64, 0xC4, 0x1D, 0x0D, 0xC0, 0x75, 0x28, 0x05, 0x0E, 0x47, 0x03, 0xE0, 0x71, 0x14, 0x02, 0xF3, 0x85, 0xC6, 0x47, 0x21, 0x60, 0xF1, 0xFF, 0x3F, 0x0A, 0xE1, 0x64, 0x9F, 0x83, 0x50, 0x42, 0x8F, 0x42, 0x80, 0x54, 0xC8, 0xA7, 0x88, 0x67, 0x1F, 0x5F, 0x7E, 0x1E, 0x08, 0x22, 0xBC, 0xE6, 0xFB, 0x14, 0xE4, 0x43, 0xBE, 0x8F, 0x42, 0x0C, 0xC6, 0x50, 0xBE, 0x06, 0xF9, 0x28, 0xC4, 0xA0, 0x5E, 0x83, 0x7C, 0xDF, 0x37, 0xC8, 0x91, 0x18, 0xFB, 0x99, 0xC0, 0x47, 0x21, 0x26, 0xED, 0x28, 0x04, 0x28, 0xFC, 0xFF, 0x1F, 0x85, 0x00, 0xFE, 0xFF, 0xFF, 0x8F, 0x42, 0x80, 0xB3, 0x00, 0x47, 0x03, 0xD0, 0x4D, 0xEB, 0x51, 0x08, 0xBC, 0x77, 0x96, 0xD3, 0x3E, 0x01, 0x9F, 0x85, 0x00, 0xB3, 0xFF, 0xFF, 0xB3, 0x10, 0x30, 0x3B, 0x0A, 0x45, 0x3D, 0xE8, 0x57, 0xA1, 0x27, 0x80, 0x17, 0x80, 0x18, 0x61, 0xDE, 0x81, 0x5E, 0x32, 0xD9, 0x5D, 0xDC, 0x38, 0x4F, 0x2E, 0xA7, 0x6D, 0x94, 0x97, 0x20, 0x1F, 0x28, 0x9E, 0x85, 0x0C, 0xF5, 0x2E, 0x14, 0xF4, 0x8D, 0xDC, 0xA3, 0x8C, 0x19, 0x3F, 0xC4, 0xF3, 0x90, 0x21, 0x9E, 0x85, 0x00, 0x76, 0xFD, 0xFF, 0xCF, 0x42, 0x00, 0xFF, 0xFF, 0xFF, 0x47, 0x03, 0xF8, 0x2F, 0x00, 0x9F, 0x85, 0x80, 0xE7, 0x09, 0xE0, 0x41, 0xDB, 0x67, 0x21, 0x80, 0x33, 0x87, 0xCB, 0xF3, 0x0F, 0x7A, 0x60, 0xEF, 0x11, 0x9E, 0xF5, 0x71, 0xBF, 0x5E, 0x7A, 0xE0, 0x0F, 0x05, 0xCF, 0x42, 0x0C, 0xEB, 0x98, 0x7C, 0x16, 0x62, 0x10, 0x2F, 0x9A, 0x86, 0x78, 0xE1, 0xF4, 0x61, 0xC0, 0xFF, 0x7F, 0xBC, 0xC0, 0xAF, 0x9C, 0x06, 0x0A, 0x12, 0xE8, 0x59, 0x08, 0x60, 0xFC, 0xFF, 0xFF, 0x2C, 0x04, 0x90, 0x71, 0x8D, 0x3A, 0x0B, 0x01, 0xCB, 0x63, 0x0C, 0x3B, 0xAD, 0x24, 0xF8, 0xFF, 0x3F, 0x0B, 0x01, 0x9F, 0x5C, 0x46, 0x0E, 0x42, 0x98, 0x88, 0x6F, 0x05, 0x1F, 0x33, 0x01, 0xA5, 0xE7, 0xA0, 0x17, 0x77, 0x63, 0x04, 0x7E, 0x91, 0x78, 0xCC, 0x64, 0x47, 0x4D, 0xC3, 0x3C, 0x0B, 0x19, 0xEF, 0x30, 0xCE, 0xE0, 0x09, 0xDE, 0x93, 0x7F, 0x16, 0x62, 0x60, 0xC7, 0x18, 0xEC, 0x51, 0xC8, 0xA0, 0x06, 0x8F, 0x1D, 0x22, 0x4C, 0xA0, 0x67, 0x21, 0x16, 0x6A, 0xDC, 0x3A, 0x7F, 0xF8, 0x2C, 0x04, 0xBC, 0xFF, 0xFF, 0x67, 0x21, 0xC0, 0xD3, 0x61, 0xC3, 0x67, 0x0D, 0xF0, 0x0C, 0xDF, 0xA3, 0x3A, 0x87, 0xC7, 0x63, 0xE0, 0x92, 0x55, 0xC7, 0x09, 0x83, 0xE5, 0x5E, 0xA7, 0x6C, 0x9C, 0x61, 0xE8, 0x20, 0xAC, 0x0E, 0x48, 0xC3, 0xC1, 0xDC, 0x43, 0x0E, 0xE2, 0x7C, 0xD8, 0x40, 0xAD, 0x08, 0x4E, 0xC7, 0x24, 0x0F, 0xDA, 0x5A, 0x28, 0xA4, 0x80, 0x46, 0x03, 0x32, 0xBC, 0x33, 0x9F, 0x96, 0x28, 0x88, 0x01, 0x7D, 0x02, 0xB2, 0x8D, 0x73, 0x00, 0x6A, 0x2F, 0x9A, 0x02, 0x39, 0xDA, 0x60, 0xF4, 0x5F, 0x16, 0xE8, 0x6C, 0x7C, 0x0D, 0xE0, 0x1A, 0x20, 0x74, 0x30, 0x30, 0xB4, 0xD5, 0xDC, 0x62, 0x50, 0x60, 0xC6, 0x7F, 0x70, 0x31, 0x81, 0x8F, 0x2E, 0xF8, 0xB3, 0x00, 0xEE, 0xFF, 0x3F, 0x5C, 0x8F, 0xF6, 0x5D, 0xA0, 0xEA, 0xC9, 0xEA, 0x8A, 0x60, 0x75, 0x97, 0x17, 0x08, 0x33, 0x32, 0x41, 0x7D, 0x07, 0x02, 0x50, 0x00, 0xF9, 0x0E, 0xE0, 0xA3, 0xD3, 0x73, 0x00, 0x9B, 0x48, 0x88, 0x30, 0xD1, 0x8C, 0x8E, 0x98, 0x30, 0x2A, 0xFA, 0x84, 0x29, 0x88, 0x27, 0xEC, 0x58, 0x13, 0x46, 0xCF, 0xC4, 0x77, 0x1B, 0x36, 0x62, 0x4C, 0x88, 0xDB, 0x06, 0xB4, 0x09, 0x06, 0xF5, 0x3D, 0x08, 0xD6, 0x90, 0xF9, 0x58, 0x7C, 0x67, 0xC0, 0x4D, 0x19, 0x8C, 0x73, 0x62, 0xD7, 0x04, 0x0B, 0x9C, 0x33, 0xC8, 0xE1, 0x31, 0xD7, 0x2F, 0x7E, 0x5B, 0xF2, 0xE8, 0xF8, 0x41, 0xC1, 0x37, 0x1C, 0x86, 0xFD, 0x30, 0xE6, 0x19, 0xBD, 0x8A, 0xF9, 0xE6, 0x86, 0x81, 0xF5, 0x78, 0x39, 0xAC, 0xD1, 0xC2, 0x1E, 0xDA, 0xAB, 0x87, 0xCF, 0x2D, 0x3E, 0x4F, 0x18, 0x23, 0xAC, 0x2F, 0x2C, 0xE0, 0x00, 0xFC, 0xFF, 0xBF, 0x5A, 0xC1, 0xBE, 0x6B, 0x80, 0xE7, 0x26, 0xE4, 0xBB, 0x06, 0xC0, 0xDA, 0xFF, 0xFF, 0x5D, 0x03, 0xFE, 0x35, 0xC1, 0x77, 0x0D, 0xE0, 0x3D, 0x74, 0xDF, 0x35, 0x80, 0x6B, 0xF6, 0xBB, 0x06, 0xEA, 0x18, 0x60, 0x85, 0x77, 0x0D, 0x68, 0xB7, 0xB4, 0x57, 0xB4, 0x87, 0x2A, 0x6B, 0xBA, 0x6C, 0xA0, 0xD4, 0x5C, 0x36, 0x00, 0x6D, 0xFF, 0xFF, 0xCB, 0x06, 0xB0, 0x91, 0x32, 0x61, 0x54, 0xF8, 0x09, 0x53, 0x10, 0x4F, 0xD8, 0xC1, 0x2E, 0x1B, 0xA0, 0x88, 0x71, 0xD9, 0x00, 0xFD, 0xD8, 0x5E, 0x36, 0x80, 0xC1, 0x3D, 0x81, 0xDF, 0x36, 0x80, 0x37, 0xA4, 0x6F, 0x1B, 0xC0, 0xF4, 0xFF, 0x0F, 0x31, 0xFF, 0x6D, 0x03, 0xC5, 0x61, 0x95, 0xB7, 0x0D, 0x88, 0x87, 0x77, 0x46, 0x60, 0x55, 0xD7, 0x0D, 0x94, 0x9E, 0xEB, 0x06, 0x40, 0x02, 0x31, 0x13, 0x46, 0xC5, 0x9F, 0x30, 0x05, 0xF1, 0x84, 0x1D, 0xED, 0xBA, 0x01, 0x8A, 0x20, 0xD7, 0x0D, 0xD0, 0xCF, 0xEB, 0x94, 0xC1, 0xFA, 0xFF, 0xBF, 0x6E, 0x60, 0x2F, 0x0A, 0x98, 0xFB, 0x06, 0xF0, 0x86, 0xE5, 0xF7, 0x0D, 0xC0, 0xC7, 0xE5, 0x1B, 0x73, 0xDF, 0x00, 0x6C, 0xFE, 0xFF, 0xEF, 0x1B, 0x00, 0x13, 0x2E, 0x0A, 0xB8, 0xFB, 0x06, 0xF0, 0xBE, 0x48, 0xFB, 0xBE, 0x01, 0x5C, 0x83, 0x49, 0xF8, 0xFF, 0xDF, 0xF5, 0xE8, 0x0B, 0x40, 0x51, 0x60, 0x50, 0x43, 0xF2, 0x99, 0x00, 0x3F, 0xBA, 0x83, 0x3B, 0xA6, 0xE0, 0x4C, 0x12, 0x1C, 0x6A, 0xE0, 0xBE, 0x02, 0x3C, 0xCD, 0x9F, 0xD6, 0x7B, 0xBD, 0xE7, 0xF1, 0x24, 0x10, 0x92, 0x1D, 0x61, 0x7C, 0x6C, 0x43, 0x9C, 0x0C, 0xC8, 0x41, 0xDC, 0x47, 0xF7, 0x88, 0xEF, 0xE1, 0x86, 0x49, 0xE0, 0x21, 0x33, 0x34, 0x0E, 0x8D, 0x1D, 0x86, 0xEF, 0x02, 0xC1, 0x0E, 0xE2, 0x30, 0xCE, 0xD7, 0x04, 0x9E, 0xD0, 0x83, 0xC0, 0x7B, 0xF9, 0xA3, 0x41, 0xF1, 0x77, 0x03, 0x4A, 0x60, 0xB8, 0xD0, 0x98, 0x91, 0xFA, 0x6C, 0xFF, 0x8E, 0x70, 0x24, 0x26, 0xB0, 0x7B, 0x48, 0x59, 0x13, 0xA0, 0xF1, 0x96, 0x43, 0x20, 0x7A, 0xC3, 0x91, 0x2D, 0x14, 0xCD, 0x2D, 0xCA, 0xFB, 0x42, 0x14, 0x3B, 0x43, 0x10, 0x46, 0x94, 0x60, 0x41, 0x9E, 0xD6, 0x62, 0x45, 0x79, 0x66, 0x37, 0x42, 0xC4, 0x10, 0xAF, 0x0C, 0x81, 0x5E, 0x12, 0xC2, 0x07, 0x79, 0xEC, 0x89, 0xD3, 0xFE, 0x20, 0x88, 0xF8, 0x17, 0x82, 0x3C, 0x80, 0x28, 0xD2, 0x68, 0x50, 0xE7, 0x06, 0x8F, 0xDD, 0x87, 0x10, 0x5F, 0xFE, 0x7D, 0xB8, 0xF7, 0xE8, 0x0E, 0xEE, 0x45, 0xFE, 0xA0, 0x3D, 0x3C, 0x76, 0xC2, 0xF0, 0x41, 0x03, 0x8E, 0x6B, 0x40, 0x4D, 0xFF, 0x19, 0x01, 0x2C, 0x97, 0x7F, 0xF8, 0xE3, 0xF1, 0x3D, 0xC1, 0xF3, 0x39, 0xE1, 0x04, 0x96, 0x3F, 0x08, 0xD4, 0x71, 0x84, 0xCF, 0xF3, 0x85, 0xC3, 0x90, 0xCF, 0x02, 0x87, 0xC5, 0xC4, 0x0A, 0xF8, 0xFF, 0x9F, 0x4C, 0xD8, 0x78, 0xC0, 0x7F, 0x0F, 0x79, 0xFD, 0xF7, 0xCD, 0xC0, 0xF3, 0x35, 0xC1, 0x88, 0x10, 0x72, 0x32, 0x1E, 0x34, 0xE8, 0xD9, 0xF8, 0x80, 0xE1, 0xEB, 0x09, 0x3B, 0x77, 0x70, 0x51, 0xE7, 0x0E, 0xD4, 0xD1, 0xC1, 0xA7, 0x06, 0x76, 0xB3, 0xC1, 0x1C, 0xB7, 0xF9, 0x59, 0x03, 0xFC, 0x23, 0x84, 0x7F, 0x7B, 0xF0, 0xBC, 0x7C, 0x65, 0x78, 0x75, 0x48, 0xE0, 0x90, 0x23, 0x44, 0x8F, 0xCB, 0x23, 0xC4, 0x9C, 0x6F, 0x30, 0x43, 0x04, 0xD7, 0x59, 0x00, 0x1C, 0x43, 0x04, 0x3E, 0x67, 0x4C, 0x9F, 0x71, 0x60, 0xFE, 0xFF, 0xCF, 0x38, 0xEC, 0xD2, 0xC3, 0x07, 0x6A, 0x78, 0x13, 0xF8, 0xFE, 0x8C, 0x3B, 0xD2, 0x18, 0x9C, 0x1F, 0x33, 0x1E, 0x76, 0x18, 0xF8, 0xFB, 0x8E, 0x67, 0x70, 0x34, 0x3E, 0xA0, 0x18, 0x21, 0xF8, 0x73, 0xC9, 0x73, 0x8A, 0x35, 0x0F, 0x52, 0x33, 0x7A, 0x67, 0x38, 0x04, 0x76, 0xB3, 0xC2, 0x1D, 0x38, 0x3C, 0x04, 0x3E, 0x80, 0x56, 0x27, 0x47, 0x4E, 0x3F, 0xA7, 0x84, 0x1B, 0x3E, 0xBF, 0x0A, 0x60, 0x0E, 0x41, 0x38, 0x85, 0x36, 0x7D, 0x6A, 0x34, 0x6A, 0xD5, 0xA0, 0x4C, 0x8D, 0x32, 0x0D, 0x6A, 0xF5, 0xA9, 0xD4, 0x98, 0xB1, 0x0B, 0x8B, 0x03, 0xBE, 0x02, 0x74, 0x1C, 0xB0, 0x3C, 0x0A, 0x1D, 0xC1, 0xC8, 0x9B, 0x40, 0x20, 0x0E, 0x0B, 0x42, 0x23, 0xBD, 0x71, 0x04, 0x62, 0xC9, 0xEF, 0x2F, 0x81, 0x58, 0xEE, 0x03, 0x45, 0x20, 0x0E, 0x68, 0x02, 0x9C, 0xAA, 0x00, 0xA7, 0xAF, 0x01, 0x81, 0x38, 0x32, 0x08, 0x15, 0xFA, 0x35, 0x13, 0x88, 0x63, 0x82, 0xD0, 0x50, 0x3E, 0x40, 0x98, 0xF4, 0x17, 0x80, 0x00, 0x89, 0x11, 0x10, 0x16, 0xEE, 0xE5, 0x20, 0x10, 0x4B, 0x7B, 0x2D, 0x08, 0xC4, 0x42, 0xAC, 0x80, 0xB0, 0xB8, 0x20, 0x34, 0x9C, 0x16, 0x10, 0x26, 0xC9, 0x0C, 0x08, 0x0B, 0x04, 0x42, 0xE5, 0x3F, 0xD3, 0x04, 0x62, 0x91, 0x6E, 0x00, 0xE9, 0xBA, 0x05, 0xE2, 0x20, 0x7A, 0x40, 0x98, 0x0C, 0x3F, 0x20, 0x2C, 0x34, 0x08, 0x8D, 0xF6, 0x6C, 0x10, 0x20, 0x31, 0x04, 0xC2, 0xE2, 0x3B, 0x02, 0x61, 0xE2, 0xDF, 0x44, 0x02, 0x71, 0x4A, 0x4B, 0x10, 0x37, 0xA5, 0x01, 0x06, 0x11, 0x90, 0x93, 0x6A, 0x02, 0x62, 0xB9, 0x41, 0x34, 0x24, 0xF2, 0xB0, 0x10, 0x90, 0x93, 0x82, 0x68, 0xC0, 0xC4, 0x14, 0x90, 0xFF, 0xFF, 0x43, 0x13, 0x88, 0x80, 0x9C, 0xCA, 0x15, 0x10, 0x8B, 0x08, 0x22, 0x20, 0x27, 0x7B, 0x52, 0x09, 0xC8, 0x39, 0x41, 0x74, 0x04, 0x20, 0xBA, 0x80, 0x58, 0x3E, 0x10, 0x01, 0x39, 0x96, 0x2F, 0x20, 0x16, 0x12, 0x44, 0x40, 0x4E, 0xF4, 0xF3, 0x09, 0x44, 0xE2, 0x81, 0x68, 0x10, 0xE4, 0x3F, 0x21, 0x20, 0x67, 0x04, 0x11, 0x10, 0x79, 0x12, 0x05, 0x21, 0x9A, 0x3E, 0x62, 0x02, 0x71, 0x6A, 0x10, 0x9A, 0xEC, 0x27, 0x14, 0x84, 0xFC, 0xFF, 0x01 }) } } Scope (\_GPE) { Method (_L03, 0, NotSerialized) { Notify (\_SB.SLPB, 0x02) } Method (_L04, 0, NotSerialized) { Notify (\_SB.PCI0.P2P, 0x02) Store (0xA1, DEBG) Notify (\_SB.SLPB, 0x02) } } Scope (\_PR.CPU0) { Name (_PCT, Package (0x02) { ResourceTemplate () { Register (FFixedHW, 0x00, 0x00, 0x0000000000000000) }, ResourceTemplate () { Register (FFixedHW, 0x00, 0x00, 0x0000000000000000) } }) Name (_PSS, Package (0x03) { Package (0x06) { 0x00000708, 0x000061A8, 0x00000064, 0x00000009, 0xE0202A8A, 0x0000028A }, Package (0x06) { 0x00000640, 0x000050DC, 0x00000064, 0x00000009, 0xE0202B08, 0x00000308 }, Package (0x06) { 0x00000320, 0x00002198, 0x00000064, 0x00000009, 0xE0202CC0, 0x000004C0 } }) Name (_PPC, 0x00) } } ==================================================== Who can help me to fix this problem.Because of this problem I couldn't use acpi with FB.And I couldn't know wheather my battle has enough power to work when I use FreeBSD. Wait you. From owner-freebsd-acpi@FreeBSD.ORG Fri Jul 14 17:35:26 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11A1316A4DA for ; Fri, 14 Jul 2006 17:35:26 +0000 (UTC) (envelope-from mistry.7@osu.edu) Received: from mail.united-ware.com (am-productions.biz [69.61.164.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92FDB43D45 for ; Fri, 14 Jul 2006 17:35:25 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.100] (am-productions.biz [69.61.164.22]) (authenticated bits=0) by mail.united-ware.com (8.13.6/8.13.6) with ESMTP id k6EHgLm3052013 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Jul 2006 13:42:28 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: freebsd-acpi@freebsd.org Date: Fri, 14 Jul 2006 13:35:49 -0400 User-Agent: KMail/1.9.1 References: <200606232251.15593.robertsg@westnet.com.au> <449EB6B4.1010601@root.org> In-Reply-To: <449EB6B4.1010601@root.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5847626.U76Kvn8v82"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607141336.01575.mistry.7@osu.edu> X-Spam-Status: No, score=-4.5 required=5.0 tests=ALL_TRUSTED,BAYES_60, MYFREEBSD2 autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.united-ware.com X-Virus-Scanned: ClamAV 0.88.2/1599/Fri Jul 14 01:35:31 2006 on mail.united-ware.com X-Virus-Status: Clean Cc: Subject: Re: acpi: bad write to port 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: Fri, 14 Jul 2006 17:35:26 -0000 --nextPart5847626.U76Kvn8v82 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 25 June 2006 12:15, Nate Lawson wrote: >> The IO access has always been going on, we just started catching it > recently. Those are the CMOS/RTC ports and it's not appropriate > for the BIOS to access them. > > This is from OsdHardware.c log: > revision 1.18 > date: 2006/03/29 06:41:56; author: njl; state: Exp; lines: +76 > -0 Add a blacklist for bad IO ports that AML should never touch.=20 > It seems some systems were designed so that AML writes to various > resources shared with OS drivers, including the RTC, PIC, PCI, etc. > These writes could collide with writes by the OS and should never > be performed. For now, we print a message if such an access > occurs, but do not block it. To block the access, the tunable > "debug.acpi.block_bad_io" can be set to 1. In the future, we will > flip the switch and this will become the default. > > Information about this problem was found in Microsoft KB 283649.=20 > They block IO accesses if the BIOS indicates via _OSI that it is > Windows 2001 or higher. They always block accesses to the PIC, > cascaded PIC, and ELCRs, no matter how old the BIOS. > > > To test if disabling these writes hurts your system, try booting > with debug.acpi.block_bad_io=3D1 set at the loader prompt. If > there's a problem, let me know what happened. This helps us gather > info for when we flip the switch to disabling such writes by > default. I'm seeing a small problem when setting the debug.acpi.block_bad_io=3D1=20 tunable. The system no longer automatically powers off=20 with "halt -p". Waiting (max 60 seconds) for system process `bufdaemon' to stop...done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining...2 0 1 0 0 done All buffers synced. Uptime: 7h52m23s ZapTel shutdown! acpi: bad write to port 0x070 (8), val 0x42 ACPI-0519: *** Error: Handler for [SystemIO] returned=20 AE_BAD_PARAMETER ACPI-0610: *** Error: Method execution failed [\_PTS] (Node=20 0xc1ad30a0), AE_BAD_PARAMETER AcpiEnterSleepStatePrep failed - AE_BAD_PARAMETER The operating system has halted. Please press any key to reboot. http://am-productions.biz/docs/cathode.asl http://am-productions.biz/docs/cathode.dmesg http://am-productions.biz/docs/cathode.pciconf =2D-=20 Anish Mistry --nextPart5847626.U76Kvn8v82 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEt9YBxqA5ziudZT0RAlATAJ9u1zvH9d2UisBZbxONPcnVRXyxEwCfR+l3 IHXrfU2NFR0VFVujQ4JSTmg= =qf8d -----END PGP SIGNATURE----- --nextPart5847626.U76Kvn8v82-- From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 15 17:40:22 2006 Return-Path: X-Original-To: freebsd-acpi@hub.freebsd.org Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DA4F16A4E1 for ; Sat, 15 Jul 2006 17:40:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEE8043D45 for ; Sat, 15 Jul 2006 17:40:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6FHeLFe046480 for ; Sat, 15 Jul 2006 17:40:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6FHeL4o046479; Sat, 15 Jul 2006 17:40:21 GMT (envelope-from gnats) Date: Sat, 15 Jul 2006 17:40:21 GMT Message-Id: <200607151740.k6FHeL4o046479@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org From: Cy Schubert Cc: Subject: Re: kern/98171: [acpi] ACPI 1304 / 0501 errors on Acer 5024WLMi Laptop (probably on all 3020 / 5020 series) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cy Schubert List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2006 17:40:22 -0000 The following reply was made to PR kern/98171; it has been noted by GNATS. From: Cy Schubert To: bug-followup , William.Anderle@Alice.it Cc: njl@freebsd.org Subject: Re: kern/98171: [acpi] ACPI 1304 / 0501 errors on Acer 5024WLMi Laptop (probably on all 3020 / 5020 series) Date: Sat, 15 Jul 2006 10:32:11 -0700 I tried a couple of things. First, I enabled the EC burst mode code in acpi_ec.c, via a kernel tunable, hw.acpi.ec.burst=1 in the patch below. That solved the messages problem however it caused the battery status to stop working completely -- prior to the patch it worked about half the time. Thinking that a 10 ms polling loop may inundate the embedded controller that monitors battery status and temperature in the ACER Aspire notebooks, I turned the poll delay also into a kernel tunable, hw.apci.ec.poll_delay. Normally the poll delay is 10 ms, however IMHO polling for battery and temperature status, along with anything else the embedded controller monitors, every second is probably good enough. That seems to have fixed the problem. The messages are now gone and battery status is reported 100% of the time. You will need to apply the following patch: --- sys/dev/acpica/acpi_ec.c.orig Thu May 11 10:41:00 2006 +++ sys/dev/acpica/acpi_ec.c Sat Jul 15 09:47:27 2006 @@ -291,6 +291,12 @@ static int ec_poll_timeout = EC_POLL_TIMEOUT; TUNABLE_INT("hw.acpi.ec.poll_timeout", &ec_poll_timeout); +static int ec_poll_delay = EC_POLL_DELAY; +TUNABLE_INT("hw.acpi.ec.poll_delay", &ec_poll_delay); + +static int ec_burst = 0; +TUNABLE_INT("hw.acpi.ec.burst", &ec_burst); + ACPI_SERIAL_DECL(ec, "ACPI embedded controller"); static __inline ACPI_STATUS @@ -875,15 +881,15 @@ * Poll the EC status register for up to 1 ms in chunks of 10 us * to detect completion of the last command. */ - for (i = 0; i < 1000 / EC_POLL_DELAY; i++) { + for (i = 0; i < 1000 / ec_poll_delay; i++) { EcStatus = EC_GET_CSR(sc); if (EVENT_READY(Event, EcStatus)) { Status = AE_OK; break; } - AcpiOsStall(EC_POLL_DELAY); + AcpiOsStall(ec_poll_delay); } - period = i * EC_POLL_DELAY; + period = i * ec_poll_delay; /* * If we still don't have a response and we're up and running, wait up @@ -966,10 +972,10 @@ ACPI_SERIAL_ASSERT(ec); CTR1(KTR_ACPI, "ec read from %#x", Address); -#ifdef notyet - /* If we can't start burst mode, continue anyway. */ - EcCommand(sc, EC_COMMAND_BURST_ENABLE); -#endif + if (ec_burst != 0) { + /* If we can't start burst mode, continue anyway. */ + EcCommand(sc, EC_COMMAND_BURST_ENABLE); + } Status = EcCommand(sc, EC_COMMAND_READ); if (ACPI_FAILURE(Status)) @@ -985,13 +991,11 @@ *Data = EC_GET_DATA(sc); -#ifdef notyet - if (sc->ec_burstactive) { + if (ec_burst != 0) { Status = EcCommand(sc, EC_COMMAND_BURST_DISABLE); if (ACPI_FAILURE(Status)) return (Status); } -#endif return (AE_OK); } @@ -1004,10 +1008,10 @@ ACPI_SERIAL_ASSERT(ec); CTR2(KTR_ACPI, "ec write to %#x, data %#x", Address, *Data); -#ifdef notyet - /* If we can't start burst mode, continue anyway. */ - EcCommand(sc, EC_COMMAND_BURST_ENABLE); -#endif + if (ec_burst != 0) { + /* If we can't start burst mode, continue anyway. */ + EcCommand(sc, EC_COMMAND_BURST_ENABLE); + } Status = EcCommand(sc, EC_COMMAND_WRITE); if (ACPI_FAILURE(Status)) @@ -1029,13 +1033,11 @@ return (Status); } -#ifdef notyet - if (sc->ec_burstactive) { + if (ec_burst != 0) { Status = EcCommand(sc, EC_COMMAND_BURST_DISABLE); if (ACPI_FAILURE(Status)) return (Status); } -#endif return (AE_OK); } After you apply the patch, rebuild and install the new kernel. Then add the following to your loader.conf file: #hw.acpi.ec.poll_timeout=100 #hw.acpi.ec.poll_delay=10 hw.acpi.ec.poll_delay=1000 # hw.acpi.ec.burst=1 You may have to play with these a bit to get them just right. I'm thinking of making these sysctl variables too so you can adjust them on the fly, however given that each time the kernel polls for a sysctl variable, CPU time is used, slowing down the system ever so slightly, I'm kind of leaning toward just keeping them as kernel tunables to be set at boot time only. (Maybe the sysctl variables could be set when a debug kernel tunable is set at boot time, allowing the user to adjust the settings more quickly without rebooting, then set them in loader.conf but that should really be a matter of discussion on freebsd-arch or hackers.) Anyhow, this solved the problem I had on my ACER Aspire 3623NWXMi. You may want to try different combinations of the above kernel tunables. As I'm a ports commmitter I need to find a src committer to commit this for me. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org e**(i*pi)+1=0 From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 15 18:38:19 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5409316A4DA; Sat, 15 Jul 2006 18:38:19 +0000 (UTC) (envelope-from ducrot@poupinou.org) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27FE343D49; Sat, 15 Jul 2006 18:38:17 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1G1p1h-0000fU-00; Sat, 15 Jul 2006 20:38:05 +0200 Date: Sat, 15 Jul 2006 20:38:04 +0200 To: john@utzweb.net Message-ID: <20060715183804.GN17014@poupinou.org> References: <200607122136.54293.mistry.7@osu.edu> <44B6401F.8050507@centtech.com> <44B641F2.2020500@centtech.com> <32884.69.93.78.27.1152831695.squirrel@69.93.78.27> <34247.69.93.78.27.1152835592.squirrel@69.93.78.27> <39062.69.93.78.27.1152857140.squirrel@69.93.78.27> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39062.69.93.78.27.1152857140.squirrel@69.93.78.27> User-Agent: Mutt/1.5.9i From: Bruno Ducrot Cc: freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Patch to fix this Re: Dell/acpi_video hw.acpi.video.out0 is probably a bug, and an important one. Re: Dell laptops 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: Sat, 15 Jul 2006 18:38:19 -0000 Hi John, On Fri, Jul 14, 2006 at 02:05:40AM -0400, john@utzweb.net wrote: > acpi_video.c expects the lcd to be identified as 0x0110, but my Dell > Latitude C400 (and probably others) id's the lcd at 0x0400: > > Device (LCD) > { > Method (_ADR, 0, NotSerialized) > { > Return (0x0400) > } > > > so, acpi_video needs to account for this. > > > got this sorted, and now the display turns back on, here's the patch, i > already send-pr'd it You are somewhat right, but your patch is wrong. Actually you have to check if ((adr & 0x0400) == 0x0400). In fact, acpi_video.c is correct for ACPI spec2, but ACPI spec3 have changed in that regard, and only the value 0x110 (LCD internal panel) should be kept for backward compatility. Please look at the two specifications (v2.0c and v3) at the ACPI info website: http://www.acpi.info for more. I would suggest something like that (not even compile tested): Index: acpi_video.c =================================================================== RCS file: /home/ncvs/src/sys/dev/acpica/acpi_video.c,v retrieving revision 1.12 diff -u -p -r1.12 acpi_video.c --- acpi_video.c 20 Dec 2005 22:42:16 -0000 1.12 +++ acpi_video.c 15 Jul 2006 18:38:39 -0000 @@ -113,6 +113,11 @@ static void vo_set_device_state(ACPI_HAN #define DOD_DEVID_MONITOR 0x0100 #define DOD_DEVID_PANEL 0x0110 #define DOD_DEVID_TV 0x0200 +#define DOD_DEVID_MASK_V3 0x0400 +#define DOD_DEVID_CRT_V3 0x0100 +#define DOD_DEVID_TV_V3 0x0200 +#define DOD_DEVID_DIGI_V3 0x0300 +#define DOD_DEVID_PANEL_V3 0x0400 #define DOD_BIOS (1 << 16) #define DOD_NONVGA (1 << 17) #define DOD_HEAD_ID_SHIFT 18 @@ -426,9 +431,32 @@ acpi_video_vo_init(UINT32 adr) voqh = &tv_units; break; default: - desc = "unknown output"; - type = "out"; - voqh = &other_units; + switch (adr & DOD_DEVID_MASK_V3) { + case DOD_DEVID_CRT_V3: + desc = "CRT monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_DIGI_V3: + desc = "External digital monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_PANEL_V3: + desc = "LCD panel"; + type = "lcd"; + voqh = &lcd_units; + break; + case DOD_DEVID_TV_V3: + desc = "TV"; + type = "tv"; + voqh = &tv_units; + break; + default: + desc = "unknown output"; + type = "out"; + voqh = &other_units; + } } n = 0; @@ -564,7 +592,32 @@ acpi_video_vo_destroy(struct acpi_video_ voqh = &tv_units; break; default: - voqh = &other_units; + switch (adr & DOD_DEVID_MASK_V3) { + case DOD_DEVID_CRT_V3: + desc = "CRT monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_DIGI_V3: + desc = "External digital monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_PANEL_V3: + desc = "LCD panel"; + type = "lcd"; + voqh = &lcd_units; + break; + case DOD_DEVID_TV_V3: + desc = "TV"; + type = "tv"; + voqh = &tv_units; + break; + default: + desc = "unknown output"; + type = "out"; + voqh = &other_units; + } } STAILQ_REMOVE(voqh, vo, acpi_video_output, vo_unit.next); free(vo, M_ACPIVIDEO); Cheers, -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care. From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 15 18:44:09 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E430416A4DE; Sat, 15 Jul 2006 18:44:08 +0000 (UTC) (envelope-from ducrot@poupinou.org) Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7141243D46; Sat, 15 Jul 2006 18:44:08 +0000 (GMT) (envelope-from ducrot@poupinou.org) Received: from ducrot by poup.poupinou.org with local (Exim) id 1G1p7W-0000gP-00; Sat, 15 Jul 2006 20:44:06 +0200 Date: Sat, 15 Jul 2006 20:44:06 +0200 To: john@utzweb.net Message-ID: <20060715184406.GO17014@poupinou.org> References: <200607122136.54293.mistry.7@osu.edu> <44B6401F.8050507@centtech.com> <44B641F2.2020500@centtech.com> <32884.69.93.78.27.1152831695.squirrel@69.93.78.27> <34247.69.93.78.27.1152835592.squirrel@69.93.78.27> <39062.69.93.78.27.1152857140.squirrel@69.93.78.27> <20060715183804.GN17014@poupinou.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060715183804.GN17014@poupinou.org> User-Agent: Mutt/1.5.9i From: Bruno Ducrot Cc: freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Patch to fix this Re: Dell/acpi_video hw.acpi.video.out0 is probably a bug, and an important one. Re: Dell laptops 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: Sat, 15 Jul 2006 18:44:09 -0000 On Sat, Jul 15, 2006 at 08:38:04PM +0200, Bruno Ducrot wrote: > > I would suggest something like that (not even compile tested): > Gna, bad patch. Consider that one instead. Index: acpi_video.c =================================================================== RCS file: /home/ncvs/src/sys/dev/acpica/acpi_video.c,v retrieving revision 1.12 diff -u -p -r1.12 acpi_video.c --- acpi_video.c 20 Dec 2005 22:42:16 -0000 1.12 +++ acpi_video.c 15 Jul 2006 18:45:52 -0000 @@ -109,10 +109,12 @@ static void vo_set_device_state(ACPI_HAN #define DOS_BRIGHTNESS_BY_BIOS (1 << 2) /* _DOD and subdev's _ADR */ -#define DOD_DEVID_MASK 0xffff +#define DOD_DEVID_MASK 0x0400 #define DOD_DEVID_MONITOR 0x0100 -#define DOD_DEVID_PANEL 0x0110 #define DOD_DEVID_TV 0x0200 +#define DOD_DEVID_DIGITAL 0x0300 +#define DOD_DEVID_PANEL 0x0400 +#define DOD_DEVID_PANEL_COMPAT 0x0110 #define DOD_BIOS (1 << 16) #define DOD_NONVGA (1 << 17) #define DOD_HEAD_ID_SHIFT 18 @@ -409,27 +411,37 @@ acpi_video_vo_init(UINT32 adr) struct acpi_video_output_queue *voqh; ACPI_SERIAL_ASSERT(video); - switch (adr & DOD_DEVID_MASK) { - case DOD_DEVID_MONITOR: - desc = "CRT monitor"; - type = "crt"; - voqh = &crt_units; - break; - case DOD_DEVID_PANEL: + if ((adr & 0xffff) == DOD_DEVID_PANEL_COMPAT) { desc = "LCD panel"; type = "lcd"; voqh = &lcd_units; - break; - case DOD_DEVID_TV: - desc = "TV"; - type = "tv"; - voqh = &tv_units; - break; - default: - desc = "unknown output"; - type = "out"; - voqh = &other_units; - } + } else + switch (adr & DOD_DEVID_MASK) { + case DOD_DEVID_MONITOR: + desc = "CRT monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_DIGITAL: + desc = "Digital monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_PANEL: + desc = "LCD panel"; + type = "lcd"; + voqh = &lcd_units; + break; + case DOD_DEVID_TV: + desc = "TV"; + type = "tv"; + voqh = &tv_units; + break; + default: + desc = "unknown output"; + type = "out"; + voqh = &other_units; + } n = 0; vn = vp = NULL; @@ -553,19 +565,29 @@ acpi_video_vo_destroy(struct acpi_video_ if (vo->vo_levels != NULL) AcpiOsFree(vo->vo_levels); - switch (vo->adr & DOD_DEVID_MASK) { - case DOD_DEVID_MONITOR: - voqh = &crt_units; - break; - case DOD_DEVID_PANEL: + if ((adr & 0xffff) == DOD_DEVID_PANEL_COMPAT) { + desc = "LCD panel"; + type = "lcd"; voqh = &lcd_units; - break; - case DOD_DEVID_TV: - voqh = &tv_units; - break; - default: - voqh = &other_units; - } + } else + switch (vo->adr & DOD_DEVID_MASK) { + case DOD_DEVID_MONITOR: + voqh = &crt_units; + break; + case DOD_DEVID_DIGITAL: + desc = "Digital monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_PANEL: + voqh = &lcd_units; + break; + case DOD_DEVID_TV: + voqh = &tv_units; + break; + default: + voqh = &other_units; + } STAILQ_REMOVE(voqh, vo, acpi_video_output, vo_unit.next); free(vo, M_ACPIVIDEO); } -- Bruno Ducrot -- Which is worse: ignorance or apathy? -- Don't know. Don't care. From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 15 23:43:17 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01C9616A4DA for ; Sat, 15 Jul 2006 23:43:17 +0000 (UTC) (envelope-from nate@root.org) Received: from ylpvm15.prodigy.net (ylpvm15-ext.prodigy.net [207.115.57.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52C2B43D46 for ; Sat, 15 Jul 2006 23:43:16 +0000 (GMT) (envelope-from nate@root.org) Received: from pimout7-ext.prodigy.net (pimout7-int.prodigy.net [207.115.4.147]) by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id k6FNhGEs027137 for ; Sat, 15 Jul 2006 19:43:16 -0400 X-ORBL: [71.139.3.149] Received: from [10.0.5.51] (ppp-71-139-3-149.dsl.snfc21.pacbell.net [71.139.3.149]) by pimout7-ext.prodigy.net (8.13.6 out.dk/8.13.6) with ESMTP id k6FNhDvq127732; Sat, 15 Jul 2006 19:43:14 -0400 Message-ID: <44B97D81.8000006@root.org> Date: Sat, 15 Jul 2006 16:42:57 -0700 From: Nate Lawson User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: Eric Anholt References: <4496E51E.1070607@root.org> <1151047820.14983.13.camel@leguin> In-Reply-To: <1151047820.14983.13.camel@leguin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org Subject: Re: HEADSUP: default for hw.acpi.reset_video changed 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: Sat, 15 Jul 2006 23:43:17 -0000 Eric Anholt wrote: > On Mon, 2006-06-19 at 10:55 -0700, Nate Lawson wrote: >> I thought this would be a small change (since the default was already >> supposed to be this way) but as usual with acpi, there is a lot of >> variation out there. I think it's split about 50/50 between systems >> where enabling this feature is helpful/neutral and those that it is harmful. >> >> The default value of the tunable/sysctl for hw.acpi.reset_video has >> changed from 1 to 0 (off). This means the BIOS video reset method will >> not be called automatically on resume. If you want the previous >> behavior, set hw.acpi.reset_video="1" in /boot/loader.conf or >> /etc/sysctl.conf. >> >> If a committer could throw the 2nd paragraph in UPDATING, that would be >> nice, thanks. > > A note on reset_video from recent discussions I've had with Linux folks: > > Up until recently was their reset_video equivalent (vbetool) being on or > off sounded like about a 50/50 chance of working or not either way. But > apparently recently Linux started hooking in a reset_video from real > mode before going back to protected, and this works a lot better than > doing it with vm86. > > As far as I understand, our reset_video hook in FreeBSD is done with > vm86. If so, it might be valuable to try that method, if it might get > us something that works everywhere. No, it's the opposite. We run the reset_video code in real mode during resume and before enabling protected mode. Linux does the same thing for this method (lcall 0xc000, 3). However, the vbetool method does a much more complete reinitialization of video. It would be worth looking into all the things it does and adding it to the agp video framework or acpi as appropriate. We don't do any of this by default right now although Takawata-san ported vbetool to FreeBSD as a port. -- Nate From owner-freebsd-acpi@FreeBSD.ORG Sat Jul 15 23:57:13 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C94916A4E2 for ; Sat, 15 Jul 2006 23:57:13 +0000 (UTC) (envelope-from nate@root.org) Received: from ylpvm29.prodigy.net (ylpvm29-ext.prodigy.net [207.115.57.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A125F43D55 for ; Sat, 15 Jul 2006 23:57:07 +0000 (GMT) (envelope-from nate@root.org) Received: from pimout6-ext.prodigy.net (pimout6-int.prodigy.net [207.115.4.22]) by ylpvm29.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id k6FNv4SV016904 for ; Sat, 15 Jul 2006 19:57:04 -0400 X-ORBL: [71.139.3.149] Received: from [10.0.5.51] (ppp-71-139-3-149.dsl.snfc21.pacbell.net [71.139.3.149]) by pimout6-ext.prodigy.net (8.13.6 out.dk/8.13.6) with ESMTP id k6FNv410253226; Sat, 15 Jul 2006 19:57:05 -0400 Message-ID: <44B980C0.8040400@root.org> Date: Sat, 15 Jul 2006 16:56:48 -0700 From: Nate Lawson User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: doug@safeport.com References: <20060626025813.M64069@pemaquid.safeport.com> In-Reply-To: <20060626025813.M64069@pemaquid.safeport.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: acpi on thinkpad T42p 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: Sat, 15 Jul 2006 23:57:13 -0000 doug@safeport.com wrote: > I am trying to get suspend/resuume working. I think what I have is a problem in > the Xorg ATI driver, but I am not sure and would greatly appreciate some > guidence. > > I am running 6.1 and Xorg 6.9.0. The S1 and S3 states worked with the only > change being commenting out the DRI module in xorg.conf. My video shows as: > > none2@pci1:0:0: class=0x030000 card=0x054f1014 chip=0x4e541002 rev=0x80 hdr=0x00 > vendor = 'ATI Technologies Inc' > device = 'Radeon Mobility M10 NT (RV350-WS)' > class = display > subclass = VGA > > Upon a resume from an S3 state the background is not restored, looking rather > like a zebra (black and white lines). I can restore the background by forcing > KDE to redraw it. Everything else except the built-in mouse is restored. I am > using the ipw wireless driver, usually the network also comes back > > Am I correct in thinking the problem is in the ATI driver? Well, it's probably X's responsibility to reinitialize the video right. You can probably force the mouse reset with: hint.psm.0.flags="0x2000" -- Nate