<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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">Hi,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I've found the <span>src/southbridge/amd/pi/hudson/lpc.c</span>, the related to the AMD Bettong demoboard, and
</p>
<p style="margin-top:0;margin-bottom:0">'<span>lpc_acpi_name</span>' and '<span>lpc_ops</span>' are already defined... Maybe they are not enabled or used?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks!<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>static const char *lpc_acpi_name(const struct device *dev)<br>
{<br>
    if (dev->path.type != DEVICE_PATH_PCI)<br>
        return NULL;<br>
<br>
    if (dev->path.pci.devfn == LPC_DEVFN)<br>
        return "LIBR";<br>
<br>
    return NULL;<br>
}<br>
<br>
static struct device_operations lpc_ops = {<br>
    .read_resources = hudson_lpc_read_resources,<br>
    .set_resources = hudson_lpc_set_resources,<br>
    .enable_resources = hudson_lpc_enable_resources,<br>
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)<br>
    .write_acpi_tables = acpi_write_hpet,<br>
#endif<br>
    .init = lpc_init,<br>
    .scan_bus = scan_lpc_bus,<br>
    .ops_pci = &lops_pci,<br>
    .acpi_name = lpc_acpi_name,<br>
};<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> Zaolin <zaolin@das-labor.org><br>
<b>Enviado:</b> viernes, 22 de junio de 2018 12:26:27<br>
<b>Para:</b> Jorge Fernandez Monteagudo; coreboot@coreboot.org<br>
<b>Asunto:</b> Re: [coreboot] RV: Error booting with TPM enabled.</font>
<div> </div>
</div>
<meta content="text/html; charset=Windows-1252">
<div style="background-color:#FFFFFF">
<p>Hey,</p>
<p><br>
</p>
<p>you miss the LPC ACPI path for your SoC.</p>
<p>Just register the acpi_name method:</p>
<p><br>
</p>
<p><a class="x_moz-txt-link-freetext" href="https://review.coreboot.org/#/c/coreboot/+/25534/2/src/soc/intel/fsp_broadwell_de/southcluster.c">https://review.coreboot.org/#/c/coreboot/+/25534/2/src/soc/intel/fsp_broadwell_de/southcluster.c</a></p>
<p><br>
</p>
<p>I hope that helps.</p>
<p><br>
</p>
<p><br>
</p>
<p>Best Regards, Philipp<br>
</p>
<br>
<div class="x_moz-cite-prefix">On 22.06.2018 12:18, Jorge Fernandez Monteagudo wrote:<br>
</div>
<blockquote type="cite"><style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
Hi all,
<div style="color:rgb(0,0,0)">
<div dir="ltr">
<div id="x_x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<br>
<p style="margin-top:0; margin-bottom:0">I have an AMD Bettong demoboard supported by coreboot and the default configuration works ok.</p>
<p style="margin-top:0; margin-bottom:0">I've been able to boot a debian8 with a 4.17.1 kernel using the SeaBios payload. Now I've connected</p>
<p style="margin-top:0; margin-bottom:0">a TPM 1.2 to the LPC bus and I've done the next changes to the coreboot master code</p>
<p style="margin-top:0; margin-bottom:0">(<span>ae05d095b36ac835a6b1a221e6858065e5486888</span>)</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<div>--- src/mainboard/amd/bettong/devicetree.cb    2018-05-10 09:39:18.000000000 +0200<br>
+++ src/mainboard/amd/bettong/devicetree.cb    2018-06-18 15:13:53.761093194 +0200<br>
@@ -52,7 +52,11 @@<br>
                     end<br>
                 end # SM<br>
                 #device pci 14.2 on  end # HDA    0x4383<br>
-                device pci 14.3 on  end # LPC    0x439d<br>
+                device pci 14.3 on      # LPC    0x439d<br>
+                    chip drivers/pc80/tpm<br>
+                        device pnp 0c31.0 on end<br>
+                    end # LPC TPM<br>
+                end<br>
                 device pci 14.7 on  end # SD<br>
             end    #chip southbridge/amd/pi/hudson<br>
 <br>
--- src/mainboard/amd/bettong/Kconfig    2018-05-10 09:39:18.000000000 +0200<br>
+++ src/mainboard/amd/bettong/Kconfig    2018-06-18 12:36:10.014905977 +0200<br>
@@ -27,7 +27,9 @@<br>
     select HAVE_ACPI_TABLES<br>
     select BOARD_ROMSIZE_KB_8192<br>
     select GFXUMA<br>
-<br>
+    select MAINBOARD_HAS_LPC_TPM<br>
+    select TPM<br>
+    <br>
 config MAINBOARD_DIR<br>
     string<br>
     default amd/bettong<br>
</div>
<div><br>
</div>
<div>
<div>--- src/mainboard/amd/bettong/romstage.c    2018-05-10 09:39:18.000000000 +0200<br>
+++ src/mainboard/amd/bettong/romstage.c    2018-06-22 09:57:09.650663554 +0200<br>
@@ -24,6 +24,7 @@<br>
 #include <northbridge/amd/pi/agesawrapper.h><br>
 #include <northbridge/amd/pi/agesawrapper_call.h><br>
 #include <southbridge/amd/pi/hudson/hudson.h><br>
+#include <security/tpm/tis.h><br>
 <br>
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)<br>
 {<br>
@@ -67,6 +68,8 @@<br>
     post_code(0x41);<br>
     AGESAWRAPPER(amdinitenv);<br>
 <br>
+    init_tpm(false);<br>
+<br>
     if (acpi_is_wakeup_s4()) {<br>
         outb(0xEE, PM_INDEX);<br>
         outb(0x8, PM_DATA);<br>
<br>
</div>
<br>
</div>
<p style="margin-top:0; margin-bottom:0">Now the demoboard boots and a new option for TPM is displayed on screen (t for TPM actions),</p>
<p style="margin-top:0; margin-bottom:0">the grub is loaded ok, but the kernel complains with the next lines I've been able to write down</p>
<p style="margin-top:0; margin-bottom:0">from a pic I took with the phone.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<div>object-220)<br>
ACPI Error: Method parse/execution failed \, AE_NOT_FOUND (20180313/psparse-516)<br>
ACPI Error: Invalid zero thread count in method (20180313/dsmethod-760)<br>
ACPI Error: Invalid OwnerId: 0x00 (20180313/utownerid-156)<br>
ACPI Error: AE_NOT_FOUND, (SSDT:COREBOOT) while loading table (20180313/tbxfload-197)<br>
ACPI Error: 1 table load failures, 3 successful (20180313/tbxfload-215)<br>
ACPI BIOS Error (bug): Failure looking up [\_SB.PCI0._CRS.TOM1], AE_NOT_FOUND (20180313/psargs-330)<br>
ACPI Error: Method parse/execution failed \_SB.PCI0._CRS, AE_NOT_FOUND (20180313/psparse-516)<br>
ACPI BIOS Error (bug): Failure looking up [\_SB.PCI0._CRS.TOM1], AE_NOT_FOUND (20180313/psargs-330)<br>
ACPI Error: Method parse/execution failed \_SB.PCI0._CRS, AE_NOT_FOUND (20180313/psparse-516)<br>
ACPI BIOS Error (bug): Failure looking up [\_SB.PCI0._CRS.TOM1], AE_NOT_FOUND (20180313/psargs-330)<br>
ACPI Error: Method parse/execution failed \_SB.PCI0._CRS, AE_NOT_FOUND (20180313/psparse-516)<br>
acpi PNP0A08:00: Bus 0000:00 not present in PCI namespace<br>
Loading, please wait...</div>
<br>
<p style="margin-top:0; margin-bottom:0">Anybody could help me to make the board boots again?<br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Regards</p>
<p style="margin-top:0; margin-bottom:0">Jorge<br>
</p>
</div>
</div>
</div>
</div>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset> <br>
</blockquote>
<br>
</div>
</body>
</html>