From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 25 19:07:33 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 318131065677 for ; Sat, 25 Apr 2009 19:07:33 +0000 (UTC) (envelope-from william88@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id DD3B78FC1D for ; Sat, 25 Apr 2009 19:07:32 +0000 (UTC) (envelope-from william88@gmail.com) Received: by qyk3 with SMTP id 3so3462817qyk.3 for ; Sat, 25 Apr 2009 12:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=OnDUXqS35+NCQDuC661CnQu+ATCptWp4A9/Py/D8GKA=; b=lTNX/K87doDsRbePCt/zYfSxgisSzw5+J34q0aHBNEClI7b58G3CHGszYZrKioMK08 GYHbqrY2UPcaFwRwF3HQgcZtO+uSx0/vxyp4beYg4+xFhw0om8MM/8edsEwV6sm6PtLG 68kDGltI5sWWGqR7qfJRv9JIWZmg+NIrvoNTs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=EPA3svESryu9aeDYkh9YERA56z4cVGeyK/9kqSsI7Lr2s1lsSSBMkCoElJDlayYLuE 1iKZiGbnP/ACRwgOKb0vJIRxOyTaWXY5mmy6hldmVcm40IuyCwpkzlN7yEy9PqaTUFvZ 0cvNkCqb/W7mI39JRPVh03nDArTJV30E3AxTU= Received: by 10.220.45.211 with SMTP id g19mr7341609vcf.86.1240686451959; Sat, 25 Apr 2009 12:07:31 -0700 (PDT) Received: from localhost ([201.21.182.73]) by mx.google.com with ESMTPS id 4sm8528353yxq.28.2009.04.25.12.07.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 25 Apr 2009 12:07:31 -0700 (PDT) Date: Sat, 25 Apr 2009 16:08:01 -0300 From: William Grzybowski To: freebsd-acpi@freebsd.org Message-ID: <20090425190801.GA1150@venon.lostgarden> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: pci access question 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, 25 Apr 2009 19:07:33 -0000 Hi, I was reading some code and running some tests in freebsd and some doubts came out. I know this is not a school but I would like to ask some questions regarding 8086 architecture and pci access, I really appreciate if someone could answer or point me to some good book. As far as I can understund the pci controllers have some registers which the cpu can read and write stuff. Everythings starts with the host pci bridge bus, this bus is define as _BBN in the acpi and is 0 when it is not set. Then for every pci controller attached to this bus the interrupt routing table is set so this bridge can control them properly. If any of them is a pci controller of the type pci bridge this process is repeated. This is how I would describe in a very simple way how the process works with my limited knowledge. My questions would be: Does ACPI directly inteferes in how pci regs are accesses somehow or a pci_cfgregread is 100% inpendent just with proper locks and asm inb, inl, inw instructions after setting the bus and slot/func? How does the bridge discovers the pci controllers attached to the bus? Is there some kind of signal or all possible addresses are tested? Does the pci bridges need to be initialized by the OS (by initialized i mean set some registers in the controller or something)? Again, sorry for asking this here, probably not the right place, but I would love any kind of "light", specially a good book about it.