From owner-freebsd-arch@FreeBSD.ORG Tue Apr 26 06:53:29 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B56C1065670; Tue, 26 Apr 2011 06:53:29 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id ACAB98FC1C; Tue, 26 Apr 2011 06:53:28 +0000 (UTC) Received: by bwz12 with SMTP id 12so406191bwz.13 for ; Mon, 25 Apr 2011 23:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=W1iq9pIFe7QgHiwVOlPEuBGtXmGR4cbdtbNqlX3UY0c=; b=LLGWFCw05YUI1EMvx4CHcc65Ub+PUF25nTXnsI2rGa+MAJ2ELI1KUQPJAY/zCA/9yh x2V++9i0KVxYxuCuLTMM1kJ9TsK3pNZ1BlyCoYPov7DnSCovzEEw9k0jVipMmDw+3uvZ RYMoD3oPvROo1I1exOoXJHStMy3nHx8yRPKdc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=cNS6onvBCTJf/KYDSiDP9Dpz5hsAJXgIIYsE+UKOblR5twSWXxprd7L+yfUUS5Y++m vEdy2D90YXd474eUYCyB67NFH0Ceb9NCi8RgncUC187CZp/IJQ228e0xue+DWv71t5oW sMlYb58eDxRDXGi7AjWgbvKpe8m4V4yf17Wco= Received: by 10.204.83.7 with SMTP id d7mr301575bkl.206.1303800807570; Mon, 25 Apr 2011 23:53:27 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id w3sm3652795bkt.17.2011.04.25.23.53.26 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 23:53:26 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB66BE4.8070709@FreeBSD.org> Date: Tue, 26 Apr 2011 09:53:24 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: John Baldwin References: <4DAE9B86.8040106@FreeBSD.org> <201104251509.47482.jhb@freebsd.org> <201104251721.53027.jhb@freebsd.org> In-Reply-To: <201104251721.53027.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: Changing how PCI-PCI bridges do resource allocation X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 06:53:29 -0000 On 26.04.2011 00:21, John Baldwin wrote: > On Monday, April 25, 2011 3:09:47 pm John Baldwin wrote: >> On Wednesday, April 20, 2011 4:38:30 am Alexander Motin wrote: >>> On 19.04.2011 21:50, John Baldwin wrote: >>>> I've already had at least one testing report that this fixes the issues with >>>> some machines' BIOS clearing the I/O windows on some PCI-PCI bridges when ACPI >>>> is enabled as this code re-discovers the original windows and programs them >>>> correctly. More testing would be good however. >>> >>> I would like this helped my Acer TM6292 which also has alike problems >>> with missing PCIe bridge resources, but unluckily it doesn't. >>> >>> Here is verbose dmesg when my system uses this dirty hack: >>> http://people.freebsd.org/~mav/tm6292_pcie.patch >>> to restore bridges resources to the pre-ACPI state: >>> http://people.freebsd.org/~mav/dmesg.boot.hacks >>> >>> Here is respective `pciconf -lvcb` output: >>> http://people.freebsd.org/~mav/pciconf.hacks >>> >>> Here is dmesg with patches, but without NEW_PCIB: >>> http://people.freebsd.org/~mav/dmesg.boot.olbpcib >>> >>> Here is dmesg with patches with NEW_PCIB: >>> http://people.freebsd.org/~mav/dmesg.boot.newpcib >> >> Ah, your problem is we pick bad ranges when we alloc fresh resources for your >> bridges. I am working on making that better for ACPI, but for now you can try >> setting hw.acpi.host_mem_start to a value like '0xf0000000' in loader.conf. >> >> Although, it looks like it is not being honored currently. Try adding a printf >> in acpi_pcib_alloc_resource() in sys/dev/acpica/acpi_pcib_acpi.c to log the >> type, start, and end of each resource range. > > Actually, try this patch. Then I think you can use the host_mem_start tunable: I've tried it. With this patch host_mem_start tunable seems like makes effect. Numbers look closer, but bge0 and iwn0 beyond the bridges are still not working. Here is dmesg with the patch: http://people.freebsd.org/~mav/newpcib/dmesg.wpatch , with the tunable set: http://people.freebsd.org/~mav/newpcib/dmesg.wpatch.tunable and with additional printf (but without snd_hda to fit the log size): http://people.freebsd.org/~mav/newpcib/dmesg.wpatch.tunable.debug It it helps, here is `devinfo -vr` outputs. Original (hacked): http://people.freebsd.org/~mav/newpcib/devinfo.orig , with the patch: http://people.freebsd.org/~mav/newpcib/devinfo.wpatch and with the tunable set: http://people.freebsd.org/~mav/newpcib/devinfo.wpatch.tunable -- Alexander Motin