<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Ok, I think I've found the problem... If I force in 'src/drivers/pc80/tpm/tis.c'</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>the path value to "\\_SB_.PCI0.LIBR" it works!</div>
<div><br>
</div>
<div>Now, I'll try to guess from where the "<span>\_SB.\_SB.LIBR</span>" current value comes from...<br>
</div>
but now it's working.<br>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Changes I've made:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>static void lpc_tpm_fill_ssdt(struct device *dev)<br>
{<br>
    const char *path = acpi_device_path(dev->bus->dev);<br>
    u32 arg;<br>
/*<br>
    if (!path) {<br>
        path = "\\_SB_.PCI0.LPCB";<br>
        printk(BIOS_DEBUG, "Using default TPM ACPI path: '%s'\n", path);<br>
    }<br>
*/<br>
    path = "\\_SB_.PCI0.LIBR";<br>
    printk(BIOS_DEBUG, "Using TPM ACPI path: '%s'\n", path);<br>
<br>
</div>
<br>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> coreboot <coreboot-bounces@coreboot.org> en nombre de Jorge Fernandez Monteagudo <jorgefm@cirsa.com><br>
<b>Enviado:</b> viernes, 29 de junio de 2018 11:37:43<br>
<b>Para:</b> Nico Huber; coreboot@coreboot.org; Zaolin<br>
<b>Asunto:</b> Re: [coreboot] RV: Error booting with TPM enabled.</font>
<div> </div>
</div>
<meta content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0">Hi!</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Booting with <span>acpi=noirq</span> I can run the kernel and the dmesg show the next errors:</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"></p>
<div>[    0.040912] ACPI: Added _OSI(Module Device)<br>
[    0.040912] ACPI: Added _OSI(Processor Device)<br>
[    0.040912] ACPI: Added _OSI(3.0 _SCP Extensions)<br>
[    0.040912] ACPI: Added _OSI(Processor Aggregator Device)<br>
[    0.040912] ACPI: Added _OSI(Linux-Dell-Video)<br>
[    0.041885] ACPI BIOS Error (bug): Failure looking up [\_SB.*SB.LIBR], AE_NOT_FOUND (20180313/dswload2-160)<br>
[    0.044008] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20180313/psobject-220)<br>
[    0.044059] ACPI Error: Method parse/execution failed \, AE_NOT_FOUND (20180313/psparse-516)<br>
[    0.045344] ACPI Error: Invalid zero thread count in method (20180313/dsmethod-760)<br>
[    0.045395] ACPI Error: Invalid OwnerId: 0x00 (20180313/utownerid-156)<br>
[    0.045448] ACPI Error: AE_NOT_FOUND, (SSDT:COREBOOT) while loading table (20180313/tbxfload-197)<br>
[    0.051635] ACPI Error: 1 table load failures, 3 successful (20180313/tbxfload-215)<br>
[    0.054040] ACPI: Interpreter enabled<br>
[    0.054100] ACPI: (supports S0 S1 S4 S5)<br>
[    0.054144] ACPI: Using PIC for interrupt routing<br>
[    0.054203] HEST: Table parsing has been initialized.<br>
[    0.054249] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug<br>
[    0.054443] ACPI: Enabled 8 GPEs in block 00 to 1F<br>
[    0.054857] ACPI BIOS Error (bug): Failure looking up [\_SB.PCI0._CRS.TOM1], AE_NOT_FOUND (20180313/psargs-330)<br>
[    0.054914] ACPI Error: Method parse/execution failed \_SB.PCI0._CRS, AE_NOT_FOUND (20180313/psparse-516)<br>
[    0.057653] ACPI BIOS Error (bug): Failure looking up [\_SB.PCI0._CRS.TOM1], AE_NOT_FOUND (20180313/psargs-330)<br>
[    0.057711] ACPI Error: Method parse/execution failed \_SB.PCI0._CRS, AE_NOT_FOUND (20180313/psparse-516)<br>
[    0.057770] acpi PNP0A08:00: [Firmware Bug]: no secondary bus range in _CRS<br>
[    0.057823] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])<br>
[    0.057873] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]<br>
[    0.058009] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability]<br>
[    0.058083] ACPI BIOS Error (bug): Failure looking up [\_SB.PCI0._CRS.TOM1], AE_NOT_FOUND (20180313/psargs-330)<br>
[    0.058138] ACPI Error: Method parse/execution failed \_SB.PCI0._CRS, AE_NOT_FOUND (20180313/psparse-516)<br>
[    0.058194] acpi PNP0A08:00: failed to parse _CRS method, error code -5<br>
[    0.058240] acpi PNP0A08:00: Bus 0000:00 not present in PCI namespace<br>
[    0.058329] ACPI: IRQ 3 override to edge, high<br>
[    0.058428] ACPI: IRQ 4 override to edge, high<br>
[    0.058527] PCI: setting IRQ 5 as level-triggered<br>
[    0.058580] ACPI: IRQ 7 override to edge, high<br>
[    0.058675] ACPI: IRQ 11 override to edge, high<br>
[    0.058770] ACPI: IRQ 10 override to edge, high<br>
<br>
</div>
Now, I'll try to patch the kernel to show all the symbols parsed...
<p></p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Any hint is welcome!</p>
<p style="margin-top:0; margin-bottom:0">Regards<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De:</b> coreboot <coreboot-bounces@coreboot.org> en nombre de Jorge Fernandez Monteagudo <jorgefm@cirsa.com><br>
<b>Enviado:</b> jueves, 28 de junio de 2018 9:36:15<br>
<b>Para:</b> Nico Huber; coreboot@coreboot.org; Zaolin<br>
<b>Asunto:</b> Re: [coreboot] RV: Error booting with TPM enabled.</font>
<div> </div>
</div>
<meta content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0">Hi!</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I'm still trying to boot the linux kernel when the TPM is enabled...
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">>Background: the TPM driver calls acpi_device_path() which walks the<br>
>devicetree hierarchy up and asks every device for its acpi_name().<br>
>If you look at your devicetree, there is above your TPM, the `device<br>
>pci 14.3` (LIBR), then `device domain 0` (PCI0) and finally an implicit<br>
>root device (_SB_). The latter is hardcoded for all of coreboot.<br>
><br>
>Now this acpi_name() has one peculiarity: When one device doesn't have<br>
>this function, its parent's acpi_name() function is queried. That is<br>
>why the acpi_name() implementations don't just `return "...";` but<br>
>check for what device they were called, first.<br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">I can see the TPM is initialized ok</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"></p>
<div>agesawrapper_amdinitenv() returned AGESA_SUCCESS                                                                                                               <br>
TPM initialization.                                                                                                                                            <br>
TPM: Init                                                                                                                                                      <br>
Found TPM SLB9660 TT 1.2 by Infineon                                                                                                                           <br>
TPM: Open                                                                                                                                                      <br>
TPM: Startup                                                                                                                                                   <br>
TPM: command 0x99 returned 0x0                                                                                                                                 <br>
TPM: OK.                                                                                                                                                       <br>
Timestamp - end of romstage: 7155473845                                                                                                                        <br>
<br>
</div>
Lately, when the ACPI table is written I can see:</span></font>
<p></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"></p>
<div>ACPI: Writing ACPI tables at 8fdc6000.                                                                                                                         <br>
ACPI:    * FACS                                                                                                                                                <br>
ACPI:    * DSDT                                                                                                                                                <br>
ACPI:    * FADT                                                                                                                                                <br>
pm_base: 0x0800                                                                                                                                                <br>
ACPI: added table 1/32, length now 40                                                                                                                          <br>
ACPI:     * SSDT                                                                                                                                               <br>
CBFS: 'Master Header Locator' located CBFS at [200:7fffc0)                                                                                                     <br>
CBFS: Locating 'pci1002,9874.rom'                                                                                                                              <br>
CBFS: Found @ offset b7e00 size fc00                                                                                                                           <br>
Mapping PCI device 10029874 to 10029870                                                                                                                        <br>
In CBFS, ROM address for PCI: 00:01.0 = ff8b8048                                                                                                               <br>
PCI expansion ROM, signature 0xaa55, INIT size 0xfc00, data ptr 0x01c0                                                                                         <br>
PCI ROM image, vendor ID 1002, device ID 9870,                                                                                                                 <br>
PCI ROM image, Class Code 030000, Code Type 00                                                                                                                 <br>
PCI: 00:01.0: Missing ACPI scope                                                                                                                               <br>
\_SB.\_SB.LIBR.TPM: LPC TPM PNP: 0c31.0                                                                                                                        <br>
ACPI: added table 2/32, length now 44                                                                                                                          <br>
ACPI:    * MCFG                                                                                                                                                <br>
ACPI:    * TCPA                                                                                                                                                <br>
TCPA log created at 8fdb6000                                                                                                                                   <br>
ACPI: added table 3/32, length now 48                                                                                                                          <br>
ACPI:    * MADT                                                                                                                                                <br>
ACPI: added table 4/32, length now 52                                                                                                                          <br>
current = 8fdc8050                                                                                                                                             <br>
CBFS: 'Master Header Locator' located CBFS at [200:7fffc0)                                                                                                     <br>
CBFS: Locating 'pci1002,9874.rom'                                                                                                                              <br>
CBFS: Found @ offset b7e00 size fc00                                                                                                                           <br>
Mapping PCI device 10029874 to 10029870                                                                                                                        <br>
In CBFS, ROM address for PCI: 00:01.0 = ff8b8048                                                                                                               <br>
PCI expansion ROM, signature 0xaa55, INIT size 0xfc00, data ptr 0x01c0                                                                                         <br>
PCI ROM image, vendor ID 1002, device ID 9870,                                                                                                                 <br>
PCI ROM image, Class Code 030000, Code Type 00                                                                                                                 <br>
ACPI:    * VFCT at 8fdc8050                                                                                                                                    <br>
           Copying initialized VBIOS image from 000c0000                                                                                                       <br>
ACPI: added table 5/32, length now 56                                                                                                                          <br>
ACPI:    * HPET                                                                                                                                                <br>
ACPI: added table 6/32, length now 60                                                                                                                          <br>
ACPI: added table 7/32, length now 64                                                                                                                          <br>
ACPI:    * IVRS at 8fdd7d28                                                                                                                                    <br>
  AGESA IVRS table NULL. Skipping.                                                                                                                             <br>
ACPI:    * SRAT at 8fdd7d28                                                                                                                                    <br>
  AGESA SRAT table NULL. Skipping.                                                                                                                             <br>
ACPI:   * SLIT at 8fdd7d28                                                                                                                                     <br>
  AGESA SLIT table NULL. Skipping.                                                                                                                             <br>
ACPI:  * AGESA ALIB SSDT at 8fdd7d30                                                                                                                           <br>
ACPI: added table 8/32, length now 68                                                                                                                          <br>
ACPI:    * SSDT at 8fde0470                                                                                                                                    <br>
ACPI: added table 9/32, length now 72                                                                                                                          <br>
ACPI:    * SSDT for PState at 8fde0cc4                                                                                                                         <br>
ACPI: done.                                                                                                                                                    <br>
ACPI tables: 109776 bytes.                                                                                                                                     <br>
smbios_write_tables: 8fdb5000                                                                                                                                  <br>
<br>
</div>
Where the path to TPM is:</span></font>
<p></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt">\_SB.\_SB.LIBR.TPM: LPC TPM PNP: 0c31.0                                                                                                                       
<br>
</span></font></span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">It seems all ok for coreboot (device detected, initialized, no error messages, etc) but the linux kernel complains...</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">Is there some tool to analyze the ACPI table from coreboot to extract paths or anything relevant in order to know</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">what it's not working?<br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">>The names returned have to match the names in the static ACPI tables.<br>
>See your board's `dsdt.asl` and what it includes.<br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">My board's dsdt.asl is the src/mainboard/amd/bettong/dsdt.asl from repository. I'm using that board to</p>
<p style="margin-top:0; margin-bottom:0">do my testing, if you should take a look.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">Attached is the trace log I get from coreboot.
<br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"><br>
</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">Thanks for your help!</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt">Jorge</span></font><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De:</b> Nico Huber <nico.h@gmx.de><br>
<b>Enviado:</b> sábado, 23 de junio de 2018 12:28:05<br>
<b>Para:</b> Jorge Fernandez Monteagudo; coreboot@coreboot.org; Zaolin<br>
<b>Asunto:</b> Re: [coreboot] RV: Error booting with TPM enabled.</font>
<div> </div>
</div>
<div class="x_x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_x_PlainText">On 23.06.2018 07:58, Jorge Fernandez Monteagudo wrote:<br>
>> I guess it's used, but you need an acpi name for all devices along the<br>
>> path. "LIBR" is the name for the LPC device, there should also be one<br>
>> for the PCI bus/domain. I would try `src/northbridge/amd/pi/00660F01/<br>
>> northbridge.c`.<br>
> <br>
> <br>
> Could you point me to an example to know what I have to look for, p.e,<br>
> to a good supported board or something related. I'm still introducing me<br>
> in the coreboot world :)<br>
<br>
Didn't use a TPM with coreboot so far, so I don't know full working<br>
examples (but there are some, I'm sure).<br>
<br>
Regarding the domain, the code for 00730F01 looks like what I had in<br>
mind: `src/northbridge/amd/pi/00730F01/northbridge.c:813`.<br>
<br>
Background: the TPM driver calls acpi_device_path() which walks the<br>
devicetree hierarchy up and asks every device for its acpi_name().<br>
If you look at your devicetree, there is above your TPM, the `device<br>
pci 14.3` (LIBR), then `device domain 0` (PCI0) and finally an implicit<br>
root device (_SB_). The latter is hardcoded for all of coreboot.<br>
<br>
Now this acpi_name() has one peculiarity: When one device doesn't have<br>
this function, its parent's acpi_name() function is queried. That is<br>
why the acpi_name() implementations don't just `return "...";` but<br>
check for what device they were called, first.<br>
<br>
The names returned have to match the names in the static ACPI tables.<br>
See your board's `dsdt.asl` and what it includes.<br>
<br>
Nico<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>