That makes sense. Thanks!!!<br><br><div class="gmail_quote">On Mon, Aug 15, 2011 at 12:59 PM, Baumann Andrew <span dir="ltr"><<a href="mailto:andrewb@inf.ethz.ch">andrewb@inf.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div link="blue" vlink="purple" lang="EN-AU">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">At some point you need to implement the accessor functions for reading/writing PCI space and device memory. ACPI doesn’t do any of that for you (it doesn’t
know how – the mappings are OS specific). Part of the ACPI host code you need to implement is for performing those accesses. The ACPICA code is really just a bytecode interpreter with some knowledge of the ACPI data structures. It doesn’t directly implement
device access.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">You can either use the traditional IO ports, or the PCIe memory-mapped config space region. Barrelfish does both depending on the device and some heuristics.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Andrew<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt" lang="EN-US">From:</span></b><span style="font-size:10.0pt" lang="EN-US"> <a href="mailto:hilfialkaff@gmail.com" target="_blank">hilfialkaff@gmail.com</a> [mailto:<a href="mailto:hilfialkaff@gmail.com" target="_blank">hilfialkaff@gmail.com</a>]
<b>On Behalf Of </b>hilfi alkaff<br>
<b>Sent:</b> Monday, 15 August, 2011 12:57<br>
<b>To:</b> Roscoe Timothy<br>
<b>Cc:</b> <a href="mailto:barrelfish-users@lists.inf.ethz.ch" target="_blank">barrelfish-users@lists.inf.ethz.ch</a>; Baumann Andrew<br>
<b>Subject:</b> Re: [Barrelfish-users] Details regarding pci support with acpi<u></u><u></u></span></p><div><div></div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I seee. Do you know whether it's possible to use pure acpi functions only w/o reading the conf space manually? I'm just wondering how much could I acpi-ed my kernel<br>
<br>
Hilfi Alkaff<u></u><u></u></p>
<div>
<p class="MsoNormal">On Mon, Aug 15, 2011 at 11:42 AM, Timothy Roscoe <<a href="mailto:troscoe@inf.ethz.ch" target="_blank">troscoe@inf.ethz.ch</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal"><br>
Hilfi,<br>
<br>
We do low-level PCI reads/writes to configuration space just like<br>
everyone else does - the only difference is the use of the Mackerel<br>
DSL to specify register formats. pci_hdr1.dev is a Mackerel<br>
specification of the PCI type 1 (bridge) header; the format is<br>
documented in the Mackerel manual (Technical note #2). If you read<br>
that documentation, plus the pci_hdr1.dev file, you'll see that<br>
pci_hdr1_vendor_id_rd() is the function to read the vendor id field of<br>
a PCI config header.<br>
<br>
-- Mothy<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
At Mon, 15 Aug 2011 11:03:41 -0700, hilfi alkaff <<a href="mailto:hilfialkaff@berkeley.edu" target="_blank">hilfialkaff@berkeley.edu</a>> wrote:<br>
> Hi,<br>
><br>
> I have some follow up questions regarding the same topic. how do you guys<br>
> read the device ID, vendor ID of the pci? I see this function<br>
> pci_hdr1_vendor_id_rd() but I don't really understand about the .dev file<br>
> format. Do you guys read from the pci conf headers or using acpi commands?<br>
><br>
> Thanks,<br>
> Hilfi Alkaff<br>
><br>
> On Thu, Aug 4, 2011 at 5:01 PM, hilfi alkaff <<a href="mailto:hilfialkaff@berkeley.edu" target="_blank">hilfialkaff@berkeley.edu</a>>wrote:<br>
><br>
> > Oh, of course, how I did not realize that, >.<,, Thanks!<br>
> ><br>
> > Hilfi Alkaff<br>
> ><br>
> ><br>
> > On Thu, Aug 4, 2011 at 4:16 PM, Baumann Andrew <<a href="mailto:andrewb@inf.ethz.ch" target="_blank">andrewb@inf.ethz.ch</a>>wrote:<br>
> ><br>
> >> Hi,****<br>
> >><br>
> >> ** **<br>
> >><br>
> >> I’m not sure what you mean by this, since pci_add_root() is a function in<br>
> >> Barrelfish and not ACPICA, but the general answer to your question is<br>
> >> probably that you can’t use the ACPICA reference in isolation: you also need<br>
> >> to grok parts of the PCI spec (or just the bad Mindshare books), the ACPI<br>
> >> spec, the PNPBIOS spec (mainly just for the device IDs), and if in doubt<br>
> >> also the source code to something clean like FreeBSD to make sense of it<br>
> >> all.****<br>
> >><br>
> >> ** **<br>
> >><br>
> >> Good luck :)****<br>
> >><br>
> >> ** **<br>
> >><br>
> >> Andrew****<br>
> >><br>
> >> ** **<br>
> >><br>
> >> *From:* hilfi alkaff [mailto:<a href="mailto:hilfialkaff@berkeley.edu" target="_blank">hilfialkaff@berkeley.edu</a>]<br>
> >> *Sent:* Thursday, 04 August, 2011 15:47<br>
> >> *To:* <a href="mailto:barrelfish-users@lists.inf.ethz.ch" target="_blank">barrelfish-users@lists.inf.ethz.ch</a><br>
> >> *Subject:* [Barrelfish-users] Details regarding pci support with acpi****<br>
> >><br>
> >> ** **<br>
> >><br>
> >> Hi,<br>
> >><br>
> >> I'm an undergraduate currently working on a research operating system and<br>
> >> I'm having problems when initializing pci and mapping its interrupts with<br>
> >> ACPI. I'm wondering how do you guys figure out the pci_add_root() function<br>
> >> because I could not find any meaningful details in Intel's acpica reference.<br>
> >><br>
> >> Thanks,<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">> >> Hilfi Alkaff****<br>
> >><br>
> ><br>
> ><br>
><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div></div></div>
</div>
</blockquote></div><br>