Is it possible to enable CONFIG_TPM with the current head in git? On my Lenovo x230, CONFIG_MAINBOARD_HAS_LPC_TPM is selected, as is CONFIG_LPC_TPM, but there does not appear to be any way to enable CONFIG_TPM in menuconfig. In order to enable it, I had to change src/Kconfig to default to y.
Without it selected, src/lib/tclc.c won't compile since the prototype for tlcl_define_space() in src/include/tpm_lite/tlcl.h depends on CONFIG_TPM or CONFIG_TPM2 being defined.
External declarations in .h files should not be configuration dependent, maybe this is a simpler fix?
--vb
On Mon, Aug 15, 2016 at 8:55 AM, Trammell Hudson hudson@trmm.net wrote:
Is it possible to enable CONFIG_TPM with the current head in git? On my Lenovo x230, CONFIG_MAINBOARD_HAS_LPC_TPM is selected, as is CONFIG_LPC_TPM, but there does not appear to be any way to enable CONFIG_TPM in menuconfig. In order to enable it, I had to change src/Kconfig to default to y.
Without it selected, src/lib/tclc.c won't compile since the prototype for tlcl_define_space() in src/include/tpm_lite/tlcl.h depends on CONFIG_TPM or CONFIG_TPM2 being defined.
-- Trammell
-- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot
I think the answer is that CONFIG_TPM doesn't do anything by itself (it just compiles extra libraries that offer functions to access TPMs), so there's no point in selecting it directly from menuconfig. Any feature that uses the TPM (like CONFIG_VBOOT) should have its own Kconfig option that you select through menuconfig and which just has a 'select TPM' clause to pull in those libraries. (Looks like that's currently not quite configured right, and the 'select TPM' is in CONFIG_CHROMEOS instead of CONFIG_VBOOT... I'll upload a fix for that.)
So if you're adding anything new that wants to use tlcl functions, you should give it its own Kconfig option that does 'select TPM'. If you have a good reason why a mainboard needs to do (non-optional) TPM accesses from its board code, you could also just add 'select TPM' to BOARD_SPECIFIC_OPTIONS.
On Mon, Aug 15, 2016 at 8:55 AM, Trammell Hudson hudson@trmm.net wrote:
Is it possible to enable CONFIG_TPM with the current head in git? On my Lenovo x230, CONFIG_MAINBOARD_HAS_LPC_TPM is selected, as is CONFIG_LPC_TPM, but there does not appear to be any way to enable CONFIG_TPM in menuconfig. In order to enable it, I had to change src/Kconfig to default to y.
Without it selected, src/lib/tclc.c won't compile since the prototype for tlcl_define_space() in src/include/tpm_lite/tlcl.h depends on CONFIG_TPM or CONFIG_TPM2 being defined.
-- Trammell
-- coreboot mailing list: coreboot@coreboot.org https://www.coreboot.org/mailman/listinfo/coreboot