<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 30/10/2016 7:21 AM, Idwer Vollering
wrote:<br>
</div>
<blockquote
cite="mid:CAPp9OrmN3WXDSthCbrRPc3=R1p5iw8H7sevVjXRv5Z67Sou8Sg@mail.gmail.com"
type="cite">
<pre wrap="">2016-10-30 1:18 GMT+02:00 Idwer Vollering <a class="moz-txt-link-rfc2396E" href="mailto:vidwer@gmail.com"><vidwer@gmail.com></a>:
</pre>
<blockquote type="cite">
<pre wrap="">2016-10-30 1:04 GMT+02:00 Riko Ho <a class="moz-txt-link-rfc2396E" href="mailto:antonius.riko@gmail.com"><antonius.riko@gmail.com></a>:
</pre>
<blockquote type="cite">
<pre wrap="">
Everyone,
How can I use the result from
sudo lspci -xxx -s 0:1F.0
inside this function ?
static void ich7_enable_lpc(void)
{
// Enable Serial IRQ
pci_write_config8(PCI_DEV(0, 0x1f, 0), 0x64, 0xd0);
</pre>
</blockquote>
<pre wrap="">
This looks good, because lspci tells you this: 60: 8a 89 89 8f d0 00
00 00 89 80 80 8f 00 00 00 00
</pre>
<blockquote type="cite">
<pre wrap=""> // Set COM1/COM2 decode range
pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0010);
</pre>
</blockquote>
<pre wrap="">
This looks good, because lspci tells you this: 60: 8a 89 89 8f d0 00
00 00 89 80 80 8f 00 00 00 00
</pre>
</blockquote>
<pre wrap="">
mea culpa, the above should have been 80: 10 00 07 34 01 08 3c 00 91
02 1c 00 00 00 00 00
</pre>
<blockquote type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap=""> // Enable COM1
pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x140d);
</pre>
</blockquote>
<pre wrap="">
lspci's output: 80: 10 00 07 34 01 08 3c 00 91 02 1c 00 00 00 00 00
change this to pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x3407);
</pre>
<blockquote type="cite">
<pre wrap=""> // Enable SuperIO Power Management Events
pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x84, 0x007c0681);
</pre>
</blockquote>
<pre wrap="">
lspci's output: 80: 01 08 3c 00
</pre>
</blockquote>
<pre wrap="">
^ this was me, stripping the whole line to the value that should be
written.. whole line:
80: 10 00 07 34 01 08 3c 00 91 02 1c 00 00 00 00 00
</pre>
<blockquote type="cite">
<pre wrap="">
(correct me if I'm wrong)
change this to pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x84, 0x003c0801);
</pre>
<blockquote type="cite">
<pre wrap="">}</pre>
</blockquote>
</blockquote>
</blockquote>
if we cut from 84 and following the logic from<br>
<pre wrap="">change this to pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x3407);
pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x84, 0x01340700); ...or ?
</pre>
<br>
<br>
<blockquote
cite="mid:CAPp9OrmN3WXDSthCbrRPc3=R1p5iw8H7sevVjXRv5Z67Sou8Sg@mail.gmail.com"
type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">
are they correctly defined or something not right ?
bianchi@bianchi-AcerPower-SK50:~$ sudo lspci -xxx -s 0:1F.0
[sudo] password for bianchi:
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC
Interface Bridge (rev 01)
00: 86 80 b8 27 07 01 10 02 01 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 19 10 96 21
30: 00 00 00 00 e0 00 00 00 00 00 00 00 00 00 00 00
40: 01 04 00 00 80 00 00 00 81 04 00 00 10 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 8a 89 89 8f d0 00 00 00 89 80 80 8f 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 10 00 07 34 01 08 3c 00 91 02 1c 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 23 02 00 00 38 00 00 00 13 00 00 00 00 03 00 00
b0: 00 00 f0 00 00 00 00 00 55 55 55 59 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 33 22 11 00 67 45 00 00 c0 c0 00 00 00 00 00 00
e0: 09 00 0c 10 a8 00 24 00 00 00 00 00 00 00 00 00
f0: 01 c0 d1 fe 00 00 00 00 86 0f 01 00 00 00 00 00
Cheers
--
/*===
Kind regards,
Riko Ho
===*/
--
coreboot mailing list: <a class="moz-txt-link-abbreviated" href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a>
<a class="moz-txt-link-freetext" href="https://www.coreboot.org/mailman/listinfo/coreboot">https://www.coreboot.org/mailman/listinfo/coreboot</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
<p><br>
</p>
<div class="moz-signature">-- <br>
<b>/*===<br>
Kind regards,<br>
Riko Ho<br>
===*/
</b></div>
</body>
</html>