From owner-freebsd-current@FreeBSD.ORG Tue Apr 6 00:53:43 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E8FC106566B for ; Tue, 6 Apr 2010 00:53:43 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from sarah.protected-networks.net (sarah.protected-networks.net [IPv6:2001:470:1f07:4e1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 583408FC15 for ; Tue, 6 Apr 2010 00:53:43 +0000 (UTC) Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [202.12.127.84]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "Iain Butler", Issuer "RSA Class 2 Personal CA" (verified OK)) (Authenticated sender: imb) by sarah.protected-networks.net (Postfix) with ESMTPSA id 68A2760D2 for ; Mon, 5 Apr 2010 20:53:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=protected-networks.net; s=200705; t=1270515222; bh=kt+mxCUBi2r9tyEBRiZjgfqUHDbWfzqPu3+iGBWe4xg=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=pC1fjhYHqoDrRBhDsu8exHzn5+eCln4kaBxrTpg7jsmmCdbdaSpzkCjr5DIQp5zI6 Ofl1Z/lyiv7MDzlCjqNf/x3uLO8k4KrW8LwVcDILK5X1dPFFVlV3v5gIPvxSo7k DomainKey-Signature: a=rsa-sha1; s=200509; d=protected-networks.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=AuX3WPTD7CIWLen21ewO+7O9gIHfFRoqIQ07/S/Iy3nP3KVP1b8tbM9+JwTeSB0mi Rg36zfNCIiEHrVM8dfRfFLIX5jpY54UfklBduv1iHN/fN99uSuJv5Q4rWANmn4A Message-ID: <4BBA8614.4000002@protected-networks.net> Date: Mon, 05 Apr 2010 20:53:40 -0400 From: Michael Butler User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100331 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-current X-Enigmail-Version: 1.0.1 OpenPGP: id=0442D492 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Enabling AHCI on ICH7M X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 00:53:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 My laptop manufacturer decided not to have AHCI included in the BIOS for this device, so I've been looking at what needs to happen in order to make this work. On this device, the BIOS doesn't even initialize BAR(5), so I need to start at that point .. from the Intel specs, it seemed fairly straight-forward: Give the AHCI sub-system a chunk of memory by initializing BAR(5), tell the PCI bridge(s) about it, reset the various config bits to flip from legacy to AHCI mode and leave the rest to what already exists in the ata-intel driver. My question, however, relates to the choice of memory: Can I simply call contigmalloc() to get a chunk of memory space whose physical address I can get with vtophys and leave the mapping for the PCI bridge to the existing call to bus_alloc_resource_any()? Is there a better method of finding some "free" physical space into which to put the ICH7M AHCI registers? imb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAku6hhQACgkQQv9rrgRC1JJ9TgCghkR8j9xy2MbSNW1LSRMhzX6h AdAAnR6Ctnvyng4W9qRbP0vtM352SYSo =t6V3 -----END PGP SIGNATURE-----