From owner-freebsd-acpi@FreeBSD.ORG Thu Oct 15 14:17:04 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 616831065679; Thu, 15 Oct 2009 14:17:04 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 261258FC12; Thu, 15 Oct 2009 14:17:04 +0000 (UTC) Received: from [192.168.1.4] (adsl-154-199-198.ard.bellsouth.net [72.154.199.198]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n9FEH0IV032165 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 15 Oct 2009 10:17:01 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Andriy Gapon In-Reply-To: <4AD6B1D5.3010003@icyb.net.ua> References: <4AD6067E.2010503@icyb.net.ua> <1255555532.95374.147.camel@balrog.2hip.net> <4AD6B1D5.3010003@icyb.net.ua> Content-Type: text/plain Organization: FreeBSD Date: Thu, 15 Oct 2009 09:16:54 -0500 Message-Id: <1255616214.2356.872.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-hackers@FreeBSD.org, freebsd-acpi@FreeBSD.org Subject: Re: heci: a new driver for review and testing 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, 15 Oct 2009 14:17:04 -0000 On Thu, 2009-10-15 at 08:23 +0300, Andriy Gapon wrote: > on 15/10/2009 00:25 Robert Noland said the following: > > On Wed, 2009-10-14 at 20:12 +0300, Andriy Gapon wrote: > >> Some time ago I posted some ideas about HECI/MEI driver for FreeBSD: > >> http://docs.freebsd.org/cgi/mid.cgi?4968E9A1.3080006 > >> > >> I actually got around to implementing it (in initial/basic form): > >> http://people.freebsd.org/~avg/heci.tgz > > > > Your getting a WITNESS warning from malloc() while holding a lock at > > like 941 of heci.c > > > > mec = (struct me_client *)malloc(sizeof(*mec), M_HECI, > > M_NOWAIT | M_ZERO); > > > > fixes it. > > Shame on me! > I have to admit that tested/used this module only on stable/7 (amd64) and > without WITNESS/INVARIANTS. > Thank you for catching this. > I guess I should also add a check for malloc returning NULL. Yes, with M_NOWAIT you should. Here is the dmesg output. heci0: mem 0xd0526100-0xd052610f irq 16 at device 3.0 on pci0 heci0: using MSI heci0: [ITHREAD] heci0: found ME client at address 0x02: heci0: status = 0x00 heci0: protocol_name(guid) = BB875E12-CB58-4D14-AE93-8566183C66C7 heci0: found ME client at address 0x03: heci0: status = 0x00 heci0: protocol_name(guid) = A12FF5CA-FACB-4CB4-A958-19A23B2E6881 heci0: found ME client at address 0x06: heci0: status = 0x00 heci0: protocol_name(guid) = 9B27FD6D-EF72-4967-BCC2-471A32679620 heci0: found ME client at address 0x07: heci0: status = 0x00 heci0: protocol_name(guid) = 55213584-9A29-4916-BADF-0FB7ED682AEB heci0: found ME client at address 0x20: heci0: status = 0x00 heci0: protocol_name(guid) = 23F27E9B-9D26-4FCE-9227-DE06446E5B06 heci0: found ME client at address 0x21: heci0: status = 0x00 heci0: protocol_name(guid) = 309DCDE8-CCB1-4062-8F78-600115A34327 heci0: found ME client at address 0x22: heci0: status = 0x00 heci0: protocol_name(guid) = 6B5205B9-8185-4519-B889-D98724B58607 heci0: found ME client at address 0x23: heci0: status = 0x00 heci0: protocol_name(guid) = 9D9105BD-C8C6-41CA-AC28-84738E2CE9FD heci0: found ME client at address 0x24: heci0: status = 0x00 heci0: protocol_name(guid) = DC506909-7ADB-4A0D-B109-4E25E38C382C heci0: found ME client at address 0x25: heci0: status = 0x00 heci0: protocol_name(guid) = 6733A4DB-0476-4E7B-B3AF-BCFC29BEE7A7 heci0: found ME client at address 0x26: heci0: status = 0x00 heci0: protocol_name(guid) = 12F80028-B4B7-4B2D-ACA8-46E0FF65814C heci0: found ME client at address 0x27: heci0: status = 0x00 heci0: protocol_name(guid) = 05B79A6F-4628-4D7F-899D-A91514CB32AB robert. > > It also locked up the machine when I tried to kldunload, but > > haven't identified a root cause of that. > > Haven't seen it here. > I will try to investigate. > -- Robert Noland FreeBSD