Patch Set 19: Code-Review+2

so we took a deeper dive into GPIO discrepancies between vendor bios and coreboot.
we compared outputs of inteltool -G on vendor bios and with coreboot running this patch stack.
there are certain differences:

sdiff -w 100 -s tiogapass_coreboot_inteltool_gpio.txt tiogapass_vendorbios_inteltool_gpio.txt
0x0080: 0x00000000 (HOSTSW_OWN_GPP_A) | 0x0080: 0x00f7ffff (HOSTSW_OWN_GPP_A)
0x0084: 0x00000000 (HOSTSW_OWN_GPP_B) | 0x0084: 0x00ffffff (HOSTSW_OWN_GPP_B)
0x0088: 0x00000000 (HOSTSW_OWN_GPP_F) | 0x0088: 0x00ffffff (HOSTSW_OWN_GPP_F)
0x0060: 0x00000000 (PADCFGLOCK_GPP_C_0) | 0x0060: 0x00000200 (PADCFGLOCK_GPP_C_0)
0x0064: 0x00000000 (PADCFGLOCKTX_GPP_C_0) | 0x0064: 0x00000200 (PADCFGLOCKTX_GPP_C_0)
0x0070: 0x00000000 (PADCFGLOCK_GPP_E_0) | 0x0070: 0x00000003 (PADCFGLOCK_GPP_E_0)
0x0080: 0x00000000 (HOSTSW_OWN_GPP_C_0) | 0x0080: 0x002fbb04 (HOSTSW_OWN_GPP_C_0)
0x0084: 0x00000000 (HOSTSW_OWN_GPP_D_0) | 0x0084: 0x00fffffe (HOSTSW_OWN_GPP_D_0)
0x0088: 0x00000000 (HOSTSW_OWN_GPP_E_0) | 0x0088: 0x00001fff (HOSTSW_OWN_GPP_E_0)
0x0108: 0x00000000 (GPI_IS_GPP_E_0) | 0x0108: 0x00000003 (GPI_IS_GPP_E_0)
0x0128: 0x00000003 (GPI_GPE_STS_GPP_E_0) | 0x0128: 0x00000000 (GPI_GPE_STS_GPP_E_0)
0x0140: 0x00c00000 (GPI_SMI_STS_GPP_C_0) | 0x0140: 0x00400000 (GPI_SMI_STS_GPP_C_0)
0x0144: 0x00000001 (GPI_SMI_STS_GPP_D_0) | 0x0144: 0x00000000 (GPI_SMI_STS_GPP_D_0)
0x0148: 0x00000003 (GPI_SMI_STS_GPP_E_0) | 0x0148: 0x00000000 (GPI_SMI_STS_GPP_E_0)
0x0154: 0x00000000 (GPI_SMI_EN_GPP_D_0) | 0x0154: 0x00000001 (GPI_SMI_EN_GPP_D_0)
0x0560: 0x0000004444000100 GPP_D20 GPIO| 0x0560: 0x0000004444000102 GPP_D20 GPIO
0x0080: 0x00000000 (HOSTSW_OWN_GPD_0) | 0x0080: 0x00000ffe (HOSTSW_OWN_GPD_0)
0x0080: 0x00000000 (HOSTSW_OWN_GPP_I_0) | 0x0080: 0x000007ff (HOSTSW_OWN_GPP_I_0)
0x0400: 0x0000001844000902 GPP_I0 LAN_| 0x0400: 0x0000001844000900 GPP_I0 LAN_T
0x0080: 0x00000000 (HOSTSW_OWN_GPP_J) | 0x0080: 0x00ffffff (HOSTSW_OWN_GPP_J)
0x0084: 0x00000000 (HOSTSW_OWN_GPP_K) | 0x0084: 0x000007ff (HOSTSW_OWN_GPP_K)
0x0440: 0x0000002044000600 GPP_J8 LAN | 0x0440: 0x0000002044000602 GPP_J8 LAN_I
0x0450: 0x0000002244000600 GPP_J10 LAN | 0x0450: 0x0000002244000602 GPP_J10 LAN_I
0x0460: 0x0000002444000600 GPP_J12 LAN | 0x0460: 0x0000002444000602 GPP_J12 LAN_I
0x0470: 0x0000002644000600 GPP_J14 LAN | 0x0470: 0x0000002644000602 GPP_J14 LAN_I
0x04c0: 0x0000003044000102 GPP_K0 GPI | 0x04c0: 0x0000003044000100 GPP_K0 GPIO
0x0060: 0x00000000 (PADCFGLOCK_GPP_G) | 0x0060: 0x00400000 (PADCFGLOCK_GPP_G)
0x0064: 0x00000000 (PADCFGLOCKTX_GPP_G) | 0x0064: 0x00400000 (PADCFGLOCKTX_GPP_G)
0x0080: 0x00000000 (HOSTSW_OWN_GPP_G) | 0x0080: 0x00efffff (HOSTSW_OWN_GPP_G)
0x0084: 0x00000000 (HOSTSW_OWN_GPP_H) | 0x0084: 0x00fc93df (HOSTSW_OWN_GPP_H)
0x0088: 0x00000000 (HOSTSW_OWN_GPP_L) | 0x0088: 0x000ffffc (HOSTSW_OWN_GPP_L)
0x0570: 0x0000004f44000100 GPP_H22 GPIO| 0x0570: 0x0000004f44000102 GPP_H22 GPIO
0x0578: 0x0000005044000100 GPP_H23 GPIO| 0x0578: 0x0000005044000102 GPP_H23 GPIO

So it looks like the difference is mostly in pad ownership. Common gpio code seems to have rather convoluted logic w.r.t setting pad ownership. We may need to add additional macros if we want to replicate pad config with 100% fidelity. But I think this may not be needed. At any rate I think we have good confidence this patch correctly defines all the offsets and community numbers, so I think it can land

Ok, thanks. I will try to resolve problem with pad ownership.

View Change

1 comment:

To view, visit change 39425. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idde32fdd53f1966e3ba6b7f5598ae8f51488d5a5
Gerrit-Change-Number: 39425
Gerrit-PatchSet: 21
Gerrit-Owner: Maxim Polyakov <max.senia.poliak@gmail.com>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov@gmail.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov@fb.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: David Hendricks <david.hendricks@gmail.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Tue, 07 Apr 2020 14:16:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maxim Polyakov <max.senia.poliak@gmail.com>
Gerrit-MessageType: comment