Re: [U-Boot] [PATCH] ARM: aspeed: Add SD host controller driver

2019-08-13 Thread Eddie James
drivers for Aspeed chips. Signed-off-by: Eddie James --- arch/arm/include/asm/arch-aspeed/scu_ast2500.h | 3 + arch/arm/include/asm/gpio.h| 3 +- arch/arm/mach-aspeed/ast2500-board.c | 3 + drivers/clk/aspeed/clk_ast2500.c | 27 + drivers

[U-Boot] [PATCH v2 2/4] mmc: Add Aspeed SD controller driver

2019-08-13 Thread Eddie James
Add support for the Aspeed SD host controller engine. Signed-off-by: Eddie James --- drivers/mmc/Kconfig| 11 +++ drivers/mmc/Makefile | 1 + drivers/mmc/aspeed_sdhci.c | 78 ++ 3 files changed, 90 insertions(+) create mode 100644

[U-Boot] [PATCH v2 0/4] ARM: aspeed: Add SD host controller driver

2019-08-13 Thread Eddie James
This series adds support for the SD host controller on Aspeed ast2XXX SocS. It also enables MMC and the SD controller on the ast2500 EVB. Changes since v1: - split the patch up - Add defconfig and dts changes Eddie James (4): clk: aspeed: Add support for SD clock mmc: Add Aspeed SD

[U-Boot] [PATCH v2 1/4] clk: aspeed: Add support for SD clock

2019-08-13 Thread Eddie James
Add code to enable the SD clock on the ast2500 SoC. Signed-off-by: Eddie James --- arch/arm/include/asm/arch-aspeed/scu_ast2500.h | 3 +++ drivers/clk/aspeed/clk_ast2500.c | 27 ++ drivers/pinctrl/aspeed/pinctrl_ast2500.c | 2 ++ 3 files changed, 32

[U-Boot] [PATCH v2 4/4] ARM: dts: ast2500: Add SDHCI nodes

2019-08-13 Thread Eddie James
Add nodes for the Aspeed SD controllers with their necessary properties. Signed-off-by: Eddie James --- arch/arm/dts/ast2500-evb.dts | 14 ++ arch/arm/dts/ast2500-u-boot.dtsi | 16 2 files changed, 30 insertions(+) diff --git a/arch/arm/dts/ast2500-evb.dts b

[U-Boot] [PATCH v2 3/4] aspeed: Support SD controller on the ast2500 board

2019-08-13 Thread Eddie James
Initialize the MMC subsystem on the ast2500 board. Compile MMC and the Aspeed SD controller on the ast2500 EVB. Signed-off-by: Eddie James --- arch/arm/include/asm/gpio.h | 3 ++- arch/arm/mach-aspeed/ast2500-board.c | 3 +++ configs/evb-ast2500_defconfig| 6 ++ 3 files

[U-Boot] [PATCH v3 3/4] configs: AST2500 EVB: Enable SD controller

2019-08-15 Thread Eddie James
Enable the MMC subsystem and the Aspeed SD controller. Also enable the use of the device tree for probing the controller. Signed-off-by: Eddie James --- configs/evb-ast2500_defconfig | 8 1 file changed, 8 insertions(+) diff --git a/configs/evb-ast2500_defconfig b/configs/evb

[U-Boot] [PATCH v3 0/4] ARM: Aspeed: Add SD host controller driver

2019-08-15 Thread Eddie James
in the driver probe function Changes since v1: - Split the patch up - Add defconfig and devicetree changes Eddie James (4): clk: aspeed: Add support for SD clock mmc: Add Aspeed SD controller driver configs: AST2500 EVB: Enable SD controller ARM: dts: ast2500: Add SDHCI nodes arch/arm

[U-Boot] [PATCH v3 1/4] clk: aspeed: Add support for SD clock

2019-08-15 Thread Eddie James
Add code to enable the SD clock on the ast2500 SoC. Reviewed-by: Cédric Le Goater Signed-off-by: Eddie James --- arch/arm/include/asm/arch-aspeed/scu_ast2500.h | 3 +++ drivers/clk/aspeed/clk_ast2500.c | 27 ++ drivers/pinctrl/aspeed/pinctrl_ast2500.c

Re: [U-Boot] [PATCH v2 2/4] mmc: Add Aspeed SD controller driver

2019-08-15 Thread Eddie James
On 8/14/19 10:18 AM, Cédric Le Goater wrote: On 13/08/2019 21:31, Eddie James wrote: Add support for the Aspeed SD host controller engine. It looks correct and simple enough. Some comments below. Signed-off-by: Eddie James --- drivers/mmc/Kconfig| 11 +++ drivers/mmc

Re: [U-Boot] [PATCH v2 3/4] aspeed: Support SD controller on the ast2500 board

2019-08-15 Thread Eddie James
On 8/14/19 10:23 AM, Cédric Le Goater wrote: On 13/08/2019 21:31, Eddie James wrote: Initialize the MMC subsystem on the ast2500 board. Compile MMC and the Aspeed SD controller on the ast2500 EVB. Signed-off-by: Eddie James --- arch/arm/include/asm/gpio.h | 3 ++- arch/arm/mach

[U-Boot] [PATCH v3 4/4] ARM: dts: ast2500: Add SDHCI nodes

2019-08-15 Thread Eddie James
Add nodes for the Aspeed SD controllers with their necessary properties. Reviewed-by: Cédric Le Goater Signed-off-by: Eddie James --- arch/arm/dts/ast2500-evb.dts | 14 ++ arch/arm/dts/ast2500-u-boot.dtsi | 16 2 files changed, 30 insertions(+) diff --git

[U-Boot] [PATCH v3 2/4] mmc: Add Aspeed SD controller driver

2019-08-15 Thread Eddie James
Add support for the Aspeed SD host controller engine. Signed-off-by: Eddie James --- arch/arm/include/asm/gpio.h | 3 +- drivers/mmc/Kconfig | 11 ++ drivers/mmc/Makefile| 1 + drivers/mmc/aspeed_sdhci.c | 90 + 4 files changed

[U-Boot] [PATCH] ARM: aspeed: Add SD host controller driver

2019-08-12 Thread Eddie James
Add support for the Aspeed SD host controller engine. This involves adding an MMC SDHCI driver and various additions to the clock and reset drivers for Aspeed chips. Signed-off-by: Eddie James --- arch/arm/include/asm/arch-aspeed/scu_ast2500.h | 3 + arch/arm/include/asm/gpio.h

[U-Boot] [PATCH v4 2/4] mmc: Add Aspeed SD controller driver

2019-08-27 Thread Eddie James
Add support for the Aspeed SD host controller engine. Signed-off-by: Eddie James Reviewed-by: Cédric Le Goater --- Changes since v3: - Rebase on master arch/arm/include/asm/gpio.h | 3 +- drivers/mmc/Kconfig | 11 ++ drivers/mmc/Makefile| 1 + drivers/mmc/aspeed_sdhci.c

Re: [U-Boot] [PATCH v3 2/4] mmc: Add Aspeed SD controller driver

2019-08-27 Thread Eddie James
support for the Aspeed SD host controller engine. Signed-off-by: Eddie James --- arch/arm/include/asm/gpio.h | 3 +- drivers/mmc/Kconfig | 11 ++ drivers/mmc/Makefile| 1 + drivers/mmc/aspeed_sdhci.c | 90 + 4 files changed, 104

Re: [PATCH] gpio: Enable hogging support in SPL

2022-02-04 Thread Eddie James
On 2/4/22 09:24, Simon Glass wrote: Hi Eddie, On Thu, 3 Feb 2022 at 15:37, Eddie James wrote: Use the CONFIG macros to conditionally build the GPIO hogging support in either the SPL or U-Boot, or both, depending on the configuration. Also call the GPIO hog probe function in the common SPL

[PATCH v3] gpio: Enable hogging support in SPL

2022-02-07 Thread Eddie James
-by: Eddie James --- Changes since v2: - change #if to if() in gpio_post_bind Changes since v1: - remove #if guards around gpio include - change #if to if() in spl board_init_r common/spl/spl.c | 4 drivers/gpio/Kconfig | 10 ++ drivers/gpio/gpio-uclass.c | 8

[PATCH v2] gpio: Enable hogging support in SPL

2022-02-07 Thread Eddie James
-by: Eddie James --- common/spl/spl.c | 4 drivers/gpio/Kconfig | 10 ++ drivers/gpio/gpio-uclass.c | 10 ++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 884102bdea..36115e674d 100644 --- a/common/spl

Re: [PATCH v14 4/8] bootm: Support boot measurement

2023-10-25 Thread Eddie James
On 10/25/23 07:41, Ilias Apalodimas wrote: On Tue, 24 Oct 2023 at 18:44, Eddie James wrote: Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass

[PATCH v12 5/8] test: Add sandbox TPM boot measurement

2023-10-12 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v5: - Only compile in the measurement u-boot command when CONFIG_MEASURED_BOOT is enabled. arch/sandbox/dts

[PATCH v12 0/8] tpm: Support boot measurements

2023-10-12 Thread Eddie James
sandbox TPM driver Eddie James (6): tpm: Fix spelling for tpmu_ha union tpm: sandbox: Update for needed TPM2 capabilities tpm: Support boot measurements bootm: Support boot measurement test: Add sandbox TPM boot measurement doc: Add measured boot documentation Ilias Apalodimas (2

[PATCH v12 3/8] tpm: Support boot measurements

2023-10-12 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- Changes since

[PATCH v12 1/8] tpm: Fix spelling for tpmu_ha union

2023-10-12 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2b6980e441..6684033deb 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

[PATCH v12 6/8] doc: Add measured boot documentation

2023-10-12 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 23 +++ 2 files changed, 24 insertions(+) create mode 100644 doc/usage/measured_boot.rst

[PATCH v12 7/8] efi_loader: fix EFI_ENTRY point on get_active_pcr_banks

2023-10-12 Thread Eddie James
From: Ilias Apalodimas efi_tcg2_get_active_pcr_banks doesn't immediately call the EFI_ENTRY() wrapper once it enters the function. Move the call a few lines above to cover the error cases properly as well. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 4 ++-- 1 file changed,

[PATCH v12 8/8] test: use a non system PCR for testing PCR extend

2023-10-12 Thread Eddie James
From: Ilias Apalodimas We currently use PCR 0 for testing the PCR read/extend functionality in our selftests. How ever those PCRs are defined by the TCG spec for platform use. For example if the tests run *after* the efi subsystem initialization, which extends PCRs 0 & 7 it will give a false

[PATCH v12 2/8] tpm: sandbox: Update for needed TPM2 capabilities

2023-10-12 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Remove the !SANDBOX dependency for EFI TCG2 as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since

[PATCH v12 4/8] bootm: Support boot measurement

2023-10-12 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v8: - Added a configuration option to select to ignore any existing event log

Re: [PATCH v12 5/8] test: Add sandbox TPM boot measurement

2023-10-19 Thread Eddie James
On 10/13/23 12:22, Ilias Apalodimas wrote: Hi Eddie, This doesn't apply on -master, can you please rebase? Ugh I thought you wanted -next... I can rebase again. Thanks /Ilias On Thu, 12 Oct 2023 at 16:49, Eddie James wrote: Use the sandbox TPM driver to measure some boot images

[PATCH v13 3/8] tpm: Support boot measurements

2023-10-19 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- Changes since

[PATCH v13 8/8] test: use a non system PCR for testing PCR extend

2023-10-19 Thread Eddie James
From: Ilias Apalodimas We currently use PCR 0 for testing the PCR read/extend functionality in our selftests. How ever those PCRs are defined by the TCG spec for platform use. For example if the tests run *after* the efi subsystem initialization, which extends PCRs 0 & 7 it will give a false

[PATCH v13 4/8] bootm: Support boot measurement

2023-10-19 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v8: - Added a configuration option to select to ignore any existing event log

[PATCH v13 6/8] doc: Add measured boot documentation

2023-10-19 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v12: - Add a bit of detail about OS usage and what pieces are measured doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 31

Re: [PATCH v12 6/8] doc: Add measured boot documentation

2023-10-19 Thread Eddie James
On 10/12/23 10:29, Simon Glass wrote: Hi Eddie, On Thu, 12 Oct 2023 at 08:08, Eddie James wrote: Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass This could use a bit more detail. What pieces are measured? What DT binding

[PATCH v13 5/8] test: Add sandbox TPM boot measurement

2023-10-19 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v5: - Only compile in the measurement u-boot command when CONFIG_MEASURED_BOOT is enabled. arch/sandbox/dts

[PATCH v13 1/8] tpm: Fix spelling for tpmu_ha union

2023-10-19 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2b6980e441..6684033deb 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

[PATCH v13 0/8] tpm: Support boot measurements

2023-10-19 Thread Eddie James
- Drop #ifdefs for bootm - Add devicetree measurement config option - Update sandbox TPM driver Eddie James (6): tpm: Fix spelling for tpmu_ha union tpm: sandbox: Update for needed TPM2 capabilities tpm: Support boot measurements bootm: Support boot measurement test: Add sandbox TPM boot

[PATCH v13 2/8] tpm: sandbox: Update for needed TPM2 capabilities

2023-10-19 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Remove the !SANDBOX dependency for EFI TCG2 as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since

[PATCH v13 7/8] efi_loader: fix EFI_ENTRY point on get_active_pcr_banks

2023-10-19 Thread Eddie James
From: Ilias Apalodimas efi_tcg2_get_active_pcr_banks doesn't immediately call the EFI_ENTRY() wrapper once it enters the function. Move the call a few lines above to cover the error cases properly as well. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 4 ++-- 1 file changed,

Re: [PATCH v13 0/8] tpm: Support boot measurements

2023-10-24 Thread Eddie James
this used to work on earlier versions I suspect it's going to be trivial to fix Cheers /Ilias On Thu, 19 Oct 2023 at 19:21, Eddie James wrote: This series adds support for measuring the boot images more generically than the existing EFI support. Several EFI functions have been moved to the TPM layer

[PATCH v14 0/8] tpm: Support boot measurements

2023-10-24 Thread Eddie James
system to use them, and remove duplicate EFI functions. - Add test case - Drop #ifdefs for bootm - Add devicetree measurement config option - Update sandbox TPM driver Eddie James (6): tpm: Fix spelling for tpmu_ha union tpm: sandbox: Update for needed TPM2 capabilities tpm: Support

[PATCH v14 5/8] test: Add sandbox TPM boot measurement

2023-10-24 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v5: - Only compile in the measurement u-boot command when CONFIG_MEASURED_BOOT is enabled. arch/sandbox/dts

[PATCH v14 6/8] doc: Add measured boot documentation

2023-10-24 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v12: - Add a bit of detail about OS usage and what pieces are measured doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 31

[PATCH v14 2/8] tpm: sandbox: Update for needed TPM2 capabilities

2023-10-24 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Remove the !SANDBOX dependency for EFI TCG2 as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since

[PATCH v14 1/8] tpm: Fix spelling for tpmu_ha union

2023-10-24 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2b6980e441..6684033deb 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

[PATCH v14 3/8] tpm: Support boot measurements

2023-10-24 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- Changes since

[PATCH v14 4/8] bootm: Support boot measurement

2023-10-24 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v8: - Added a configuration option to select to ignore any existing event log

[PATCH v14 8/8] test: use a non system PCR for testing PCR extend

2023-10-24 Thread Eddie James
From: Ilias Apalodimas We currently use PCR 0 for testing the PCR read/extend functionality in our selftests. How ever those PCRs are defined by the TCG spec for platform use. For example if the tests run *after* the efi subsystem initialization, which extends PCRs 0 & 7 it will give a false

[PATCH v14 7/8] efi_loader: fix EFI_ENTRY point on get_active_pcr_banks

2023-10-24 Thread Eddie James
From: Ilias Apalodimas efi_tcg2_get_active_pcr_banks doesn't immediately call the EFI_ENTRY() wrapper once it enters the function. Move the call a few lines above to cover the error cases properly as well. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 4 ++-- 1 file changed,

Re: [PATCH 2/2] tpm: add support for TPMv2.x I2C chips

2022-05-23 Thread Eddie James
On 5/23/22 01:12, Ilias Apalodimas wrote: Hi Eddie, Thanks for the patch. [...] +static const struct tpm_tis_chip_data tpm_tis_std_chip_data = { + .pcr_count = 24, + .pcr_select_min = 3, +}; + +static const struct udevice_id tpm_tis_i2c_ids[] = { + { +

[PATCH] arm: dts: ast2600: Add I2C pinctrl

2022-06-01 Thread Eddie James
Set the pinctrl groups for each I2C bus. These are essential to I2C operating correctly. Signed-off-by: Eddie James --- arch/arm/dts/ast2600.dtsi | 33 + 1 file changed, 33 insertions(+) diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi index

[PATCH 2/2] tpm: add support for TPMv2.x I2C chips

2022-05-13 Thread Eddie James
Add the tpm2_tis_i2c driver that should support any TPMv2 compliant I2C chips, such as the NPCT75X chip. Signed-off-by: Eddie James --- drivers/tpm/Kconfig| 9 ++ drivers/tpm/Makefile | 1 + drivers/tpm/tpm2_tis_i2c.c | 171 + 3 files

[PATCH 1/2] tpm: core: Set timeouts before requesting locality

2022-05-13 Thread Eddie James
Requesting the locality uses the timeout values, so they need to be set beforehand. Signed-off-by: Eddie James --- drivers/tpm/tpm2_tis_core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tpm/tpm2_tis_core.c b/drivers/tpm/tpm2_tis_core.c index 51392c4584

[PATCH 0/2] tpm: Add support for TPMv2.x I2C chips

2022-05-13 Thread Eddie James
Add a tpm driver that should support any TPMv2 compliant I2C chips, such as the NPCT75X chip. In my testing I also noticed that the timeouts weren't set before requesting the locality so I have included a fix. Eddie James (2): tpm: core: Set timeouts before requesting locality tpm: add

[PATCH] i2c: ast_i2c: Remove SCL direct drive mode

2022-05-11 Thread Eddie James
SCL direct drive mode prevents communication with devices that do clock stretching, so disable. The Linux driver doesn't use this mode, and the engine can handle clock stretching. Signed-off-by: Eddie James --- drivers/i2c/ast_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v2 5/5] test: Add sandbox TPM boot measurement

2023-01-10 Thread Eddie James
On 1/9/23 17:26, Heinrich Schuchardt wrote: On 1/10/23 00:13, Heinrich Schuchardt wrote: On 1/9/23 22:55, Eddie James wrote: Use the sandbox TPM driver to measure some boot images in a unit test case. $ ./u-boot -T -c "ut measurement" Running 1 measurement tests Test: measure: mea

Re: [PATCH v2 0/5] tpm: Support boot measurements

2023-01-10 Thread Eddie James
On 1/9/23 17:35, Heinrich Schuchardt wrote: On 1/9/23 22:55, Eddie James wrote: This series adds support for measuring the boot images more generically than the existing EFI support. Several EFI functions have been moved to the TPM layer. The series includes optional measurement from

Re: [PATCH v2 5/5] test: Add sandbox TPM boot measurement

2023-01-10 Thread Eddie James
On 1/10/23 16:02, Heinrich Schuchardt wrote: On 1/10/23 17:38, Eddie James wrote: On 1/9/23 17:26, Heinrich Schuchardt wrote: On 1/10/23 00:13, Heinrich Schuchardt wrote: On 1/9/23 22:55, Eddie James wrote: Use the sandbox TPM driver to measure some boot images in a unit test case. $ ./u

Re: [PATCH 3/3] bootm: Support boot measurement

2023-01-04 Thread Eddie James
On 1/4/23 03:56, Etienne Carriere wrote: Hello Eddie and all, On Tue, 3 Jan 2023 at 21:42, Eddie James wrote: Add a configuration option to measure the boot through the bootm function. Signed-off-by: Eddie James --- boot/bootm.c| 53

Re: [PATCH 0/3] tpm: Support boot measurements

2023-01-04 Thread Eddie James
, Eddie Regards /Ilias On Tue, 3 Jan 2023 at 22:42, Eddie James wrote: This series adds support for measuring the boot images more generically than the existing EFI support. The series includes optional measurement from the bootm command. Eventually the EFI code could be refactored to use

[PATCH v3 1/6] tpm: Fix spelling for tpmu_ha union

2023-01-12 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 737e57551d..85feda3e06 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

[PATCH v3 6/6] doc: Add measured boot documentation

2023-01-12 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James --- doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 23 +++ 2 files changed, 24 insertions(+) create mode 100644 doc/usage/measured_boot.rst diff --git a/doc/usage

[PATCH v3 3/6] bootm: Support boot measurement

2023-01-12 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James --- boot/Kconfig| 23 boot/bootm.c| 70 + cmd/booti.c

[PATCH v3 5/6] test: Add sandbox TPM boot measurement

2023-01-12 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James --- arch/sandbox/dts/sandbox.dtsi | 14 arch/sandbox/dts/test.dts | 13 +++ configs/sandbox_defconfig | 1 + include/test/suites.h | 1 + test/boot/Makefile

[PATCH v3 4/6] tpm: sandbox: Update for needed TPM2 capabilities

2023-01-12 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- drivers/tpm/tpm2_tis_sandbox.c | 100 - 1 file changed, 72

[PATCH v3 0/6] tpm: Support boot measurements

2023-01-12 Thread Eddie James
since v1: - Refactor TPM layer functions to allow EFI system to use them, and remove duplicate EFI functions. - Add test case - Drop #ifdefs for bootm - Add devicetree measurement config option - Update sandbox TPM driver Eddie James (6): tpm: Fix spelling for tpmu_ha union tpm

[PATCH v3 2/6] tpm: Support boot measurements

2023-01-12 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- include

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-13 Thread Eddie James
On 1/12/23 17:43, Simon Glass wrote: Hi Eddie, On Thu, 12 Jan 2023 at 09:16, Eddie James wrote: Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI

[PATCH v2 3/5] bootm: Support boot measurement

2023-01-09 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Signed-off-by: Eddie James --- boot/Kconfig| 23 ++ boot/bootm.c| 64 + cmd/bootm.c | 2 ++ include/bootm.h | 2 ++ include/image.h | 1 + 5

[PATCH v2 4/5] tpm: sandbox: Update for needed TPM2 capabilities

2023-01-09 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Signed-off-by: Eddie James --- drivers/tpm/tpm2_tis_sandbox.c | 100 - 1 file changed, 72 insertions(+), 28 deletions

[PATCH v2 1/5] tpm: Fix spelling for tpmu_ha union

2023-01-09 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 737e57551d..85feda3e06 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

[PATCH v2 2/5] tpm: Support boot measurements

2023-01-09 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- include

[PATCH v2 5/5] test: Add sandbox TPM boot measurement

2023-01-09 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. $ ./u-boot -T -c "ut measurement" Running 1 measurement tests Test: measure: measurement.c Failures: 0 Signed-off-by: Eddie James --- arch/sandbox/dts/test.dts | 12 +++ configs/sandbox_defconfig | 1

[PATCH v2 0/5] tpm: Support boot measurements

2023-01-09 Thread Eddie James
sandbox TPM driver Eddie James (5): tpm: Fix spelling for tpmu_ha union tpm: Support boot measurements bootm: Support boot measurement tpm: sandbox: Update for needed TPM2 capabilities test: Add sandbox TPM boot measurement arch/sandbox/dts/test.dts | 12 + boot/Kconfig

Re: [PATCH v2 5/5] test: Add sandbox TPM boot measurement

2023-01-11 Thread Eddie James
On 1/10/23 16:37, Heinrich Schuchardt wrote: On 1/10/23 23:32, Heinrich Schuchardt wrote: On 1/9/23 22:55, Eddie James wrote: Use the sandbox TPM driver to measure some boot images in a unit test case. $ ./u-boot -T -c "ut measurement" Running 1 measurement tests Tes

[PATCH 2/3] tpm: Support boot measurements

2023-01-03 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Signed-off-by: Eddie James --- include/efi_tcg2.h | 44 --- include/tpm-v2.h | 135 + lib/tpm-v2.c | 700

[PATCH 3/3] bootm: Support boot measurement

2023-01-03 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Signed-off-by: Eddie James --- boot/bootm.c| 53 + cmd/bootm.c | 2 ++ common/Kconfig | 6 ++ include/image.h | 1 + 4 files changed, 62 insertions(+) diff

[PATCH 0/3] tpm: Support boot measurements

2023-01-03 Thread Eddie James
This series adds support for measuring the boot images more generically than the existing EFI support. The series includes optional measurement from the bootm command. Eventually the EFI code could be refactored to use the generic functions. Eddie James (3): tpm: Fix spelling for tpmu_ha union

[PATCH 1/3] tpm: Fix spelling for tpmu_ha union

2023-01-03 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 737e57551d..85feda3e06 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -167,7 +167,7 @@ struct tcg_pcr_ev

[PATCH v4 2/6] tpm: Support boot measurements

2023-01-25 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- include

[PATCH v4 3/6] bootm: Support boot measurement

2023-01-25 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James --- boot/Kconfig| 23 boot/bootm.c| 70 + cmd/booti.c

[PATCH v4 5/6] test: Add sandbox TPM boot measurement

2023-01-25 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James --- arch/sandbox/dts/sandbox.dtsi | 14 arch/sandbox/dts/test.dts | 13 +++ configs/sandbox_defconfig | 1 + include/test/suites.h | 1 + test/boot/Makefile

[PATCH v4 0/6] tpm: Support boot measurements

2023-01-25 Thread Eddie James
. - Add test case - Drop #ifdefs for bootm - Add devicetree measurement config option - Update sandbox TPM driver Eddie James (6): tpm: Fix spelling for tpmu_ha union tpm: Support boot measurements bootm: Support boot measurement tpm: sandbox: Update for needed TPM2 capabilities test: Add

[PATCH v4 6/6] doc: Add measured boot documentation

2023-01-25 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James --- doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 23 +++ 2 files changed, 24 insertions(+) create mode 100644 doc/usage/measured_boot.rst diff --git a/doc/usage

[PATCH v4 1/6] tpm: Fix spelling for tpmu_ha union

2023-01-25 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 737e57551d..85feda3e06 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

[PATCH v4 4/6] tpm: sandbox: Update for needed TPM2 capabilities

2023-01-25 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- drivers/tpm/tpm2_tis_sandbox.c | 100 - 1 file changed, 72

Re: [PATCH v4 3/6] bootm: Support boot measurement

2023-01-26 Thread Eddie James
On 1/25/23 19:41, Simon Glass wrote: Hi Eddie, On Wed, 25 Jan 2023 at 10:18, Eddie James wrote: Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James --- boot/Kconfig| 23

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-23 Thread Eddie James
On 1/16/23 06:00, Ilias Apalodimas wrote: Hi Eddie +static inline u16 tpm2_algorithm_to_len(enum tpm2_algorithms a) +{ + switch (a) { + case TPM2_ALG_SHA1: + return TPM2_SHA1_DIGEST_SIZE; + case TPM2_ALG_SHA256: + return TPM2_SHA256_DIGEST_SIZE;

[PATCH v9 0/6] tpm: Support boot measurements

2023-03-08 Thread Eddie James
duplicate EFI functions. - Add test case - Drop #ifdefs for bootm - Add devicetree measurement config option - Update sandbox TPM driver Eddie James (6): tpm: Fix spelling for tpmu_ha union tpm: sandbox: Update for needed TPM2 capabilities tpm: Support boot measurements bootm: Support boot

[PATCH v9 5/6] test: Add sandbox TPM boot measurement

2023-03-08 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v5: - Only compile in the measurement u-boot command when CONFIG_MEASURED_BOOT is enabled. arch/sandbox/dts

[PATCH v9 1/6] tpm: Fix spelling for tpmu_ha union

2023-03-08 Thread Eddie James
tmpu -> tpmu Signed-off-by: Eddie James Reviewed-by: Ilias Apalodimas --- include/tpm-v2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tpm-v2.h b/include/tpm-v2.h index 2b6980e441..6684033deb 100644 --- a/include/tpm-v2.h +++ b/include/tpm-v2.h @@ -16

Re: [PATCH v8 0/6] tpm: Support boot measurements

2023-03-08 Thread Eddie James
[0] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/15471 Regards /Ilias On Fri, Mar 03, 2023 at 01:25:00PM -0600, Eddie James wrote: This series adds support for measuring the boot images more generically than the existing EFI support. Several EFI functions have been moved

[PATCH v9 2/6] tpm: sandbox: Update for needed TPM2 capabilities

2023-03-08 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Remove the !SANDBOX dependency for EFI TCG2 as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since

[PATCH v9 4/6] bootm: Support boot measurement

2023-03-08 Thread Eddie James
Add a configuration option to measure the boot through the bootm function. Add the measurement state to the booti and bootz paths as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- Changes since v8: - Added a configuration option to select to ignore any existing event log

[PATCH v9 6/6] doc: Add measured boot documentation

2023-03-08 Thread Eddie James
Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 23 +++ 2 files changed, 24 insertions(+) create mode 100644 doc/usage/measured_boot.rst

[PATCH v9 3/6] tpm: Support boot measurements

2023-03-08 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James --- Changes since

Re: [PATCH v5 0/6] tpm: Support boot measurements

2023-02-22 Thread Eddie James
On 2/22/23 05:33, Ilias Apalodimas wrote: Hi Eddie, On Tue, Feb 21, 2023 at 04:38:58PM -0600, Eddie James wrote: On 2/6/23 06:20, Ilias Apalodimas wrote: Thanks Eddie, I quickly tested this but the EFI subsystem fails to initialize the TCG protocol properly now. Unfortunately I am

[PATCH v8 5/6] test: Add sandbox TPM boot measurement

2023-03-03 Thread Eddie James
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since v5: - Only compile in the measurement u-boot command when CONFIG_MEASURED_BOOT is enabled arch/sandbox/dts

[PATCH v8 2/6] tpm: sandbox: Update for needed TPM2 capabilities

2023-03-03 Thread Eddie James
The driver needs to support getting the PCRs in the capabilities command. Fix various other things and support the max number of PCRs for TPM2. Remove the !SANDBOX dependency for EFI TCG2 as well. Signed-off-by: Eddie James Reviewed-by: Simon Glass Acked-by: Ilias Apalodimas --- Changes since

  1   2   >