Re: [PATCH 05/13] efi_loader: signature: make efi_hash_regions more generic
On 5/29/20 8:41 AM, AKASHI Takahiro wrote: > There are a couple of occurrences of hash calculations in which a new > efi_hash_regions will be commonly used. > > Signed-off-by: AKASHI Takahiro > --- > lib/efi_loader/efi_signature.c | 44 +- > 1 file changed, 16 insertions(+), 28 deletions(-) > > diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c > index 35f678de057e..00e442783059 100644 > --- a/lib/efi_loader/efi_signature.c > +++ b/lib/efi_loader/efi_signature.c > @@ -30,6 +30,7 @@ const efi_guid_t efi_guid_cert_type_pkcs7 = > EFI_CERT_TYPE_PKCS7_GUID; > /** > * efi_hash_regions - calculate a hash value > * @regs:List of regions > + * @count: Number of regions > * @hash:Pointer to a pointer to buffer holding a hash value > * @size:Size of buffer to be returned > * > @@ -37,18 +38,20 @@ const efi_guid_t efi_guid_cert_type_pkcs7 = > EFI_CERT_TYPE_PKCS7_GUID; > * > * Return: true on success, false on error > */ > -static bool efi_hash_regions(struct efi_image_regions *regs, void **hash, > - size_t *size) > +static bool efi_hash_regions(struct image_region *regs, int count, > + void **hash, size_t *size) What is this size parameter good for if we know all signatures are SHA256? Should it be eliminiated? Otherwise Reviewed-by: Heinrich Schuchardt > { > - *size = 0; > - *hash = calloc(1, SHA256_SUM_LEN); > if (!*hash) { > - debug("Out of memory\n"); > - return false; > + *hash = calloc(1, SHA256_SUM_LEN); > + if (!*hash) { > + debug("Out of memory\n"); > + return false; > + } > } > - *size = SHA256_SUM_LEN; > + if (size) > + *size = SHA256_SUM_LEN; > > - hash_calculate("sha256", regs->reg, regs->num, *hash); > + hash_calculate("sha256", regs, count, *hash); > #ifdef DEBUG > debug("hash calculated:\n"); > print_hex_dump("", DUMP_PREFIX_OFFSET, 16, 1, > @@ -73,26 +76,10 @@ static bool efi_hash_msg_content(struct pkcs7_message > *msg, void **hash, > { > struct image_region regtmp; > > - *size = 0; > - *hash = calloc(1, SHA256_SUM_LEN); > - if (!*hash) { > - debug("Out of memory\n"); > - free(msg); > - return false; > - } > - *size = SHA256_SUM_LEN; > - > regtmp.data = msg->data; > regtmp.size = msg->data_len; > > - hash_calculate("sha256", , 1, *hash); > -#ifdef DEBUG > - debug("hash calculated based on contentInfo:\n"); > - print_hex_dump("", DUMP_PREFIX_OFFSET, 16, 1, > -*hash, SHA256_SUM_LEN, false); > -#endif > - > - return true; > + return efi_hash_regions(, 1, hash, size); > } > > /** > @@ -168,9 +155,10 @@ static bool efi_signature_verify(struct > efi_image_regions *regs, > false); > #endif > /* against contentInfo first */ > + hash = NULL; > if ((msg->data && efi_hash_msg_content(msg, , )) || > /* for signed image */ > - efi_hash_regions(regs, , )) { > + efi_hash_regions(regs->reg, regs->num, , )) { > /* for authenticated variable */ > if (ps_info->msgdigest_len != size || > memcmp(hash, ps_info->msgdigest, size)) { > @@ -238,7 +226,7 @@ bool efi_signature_verify_with_list(struct > efi_image_regions *regs, > regs, signed_info, siglist, valid_cert); > > if (!signed_info) { > - void *hash; > + void *hash = NULL; > size_t size; > > debug("%s: unsigned image\n", __func__); > @@ -252,7 +240,7 @@ bool efi_signature_verify_with_list(struct > efi_image_regions *regs, > goto out; > } > > - if (!efi_hash_regions(regs, , )) { > + if (!efi_hash_regions(regs->reg, regs->num, , )) { > debug("Digesting unsigned image failed\n"); > goto out; > } >
Re: [PATCH 06/13] efi_loader: image_loader: verification for all signatures should pass
On 5/29/20 8:41 AM, AKASHI Takahiro wrote: > A signed image may have multiple signatures in > - each WIN_CERTIFICATE in authenticode, and/or > - each SignerInfo in pkcs7 SignedData (of WIN_CERTIFICATE) > > In the initial implementation of efi_image_authenticate(), the criteria > of verification check for multiple signatures case is a bit ambiguous > and it may cause inconsistent result. > > With this patch, we will make sure that verification check in > efi_image_authenticate() should pass against all the signatures. > The only exception would be > - the case where a digest algorithm used in signature is not supported by > U-Boot, or > - the case where parsing some portion of authenticode has failed > In those cases, we don't know how the signature be handled and should > just ignore them. > > Please note that, due to this change, efi_signature_verify_with_sigdb()'s > function prototype will be modified, taking "dbx" as well as "db" > instead of outputing a "certificate." If "dbx" is null, the behavior would > be the exact same as before. > The function's name will be changed to efi_signature_verify() once > current efi_signature_verify() has gone due to further improvement > in intermedaite certificates support. > > Signed-off-by: AKASHI Takahiro > --- > include/efi_loader.h | 10 +- > lib/efi_loader/efi_image_loader.c | 37 +++-- > lib/efi_loader/efi_signature.c| 266 ++ > 3 files changed, 146 insertions(+), 167 deletions(-) > > diff --git a/include/efi_loader.h b/include/efi_loader.h > index 9533df26dc9e..2cbd52e273d4 100644 > --- a/include/efi_loader.h > +++ b/include/efi_loader.h > @@ -761,14 +761,12 @@ struct efi_signature_store { > struct x509_certificate; > struct pkcs7_message; > > -bool efi_signature_verify_cert(struct x509_certificate *cert, > -struct efi_signature_store *dbx); > -bool efi_signature_verify_signers(struct pkcs7_message *msg, > - struct efi_signature_store *dbx); > bool efi_signature_verify_with_sigdb(struct efi_image_regions *regs, >struct pkcs7_message *msg, > - struct efi_signature_store *db, > - struct x509_certificate **cert); > + struct efi_signature_store *db, > + struct efi_signature_store *dbx); > +bool efi_signature_check_signers(struct pkcs7_message *msg, > + struct efi_signature_store *dbx); > > efi_status_t efi_image_region_add(struct efi_image_regions *regs, > const void *start, const void *end, > diff --git a/lib/efi_loader/efi_image_loader.c > b/lib/efi_loader/efi_image_loader.c > index 5cdaa93519e7..33ffb43f3886 100644 > --- a/lib/efi_loader/efi_image_loader.c > +++ b/lib/efi_loader/efi_image_loader.c > @@ -492,11 +492,12 @@ static bool efi_image_authenticate(void *efi, size_t > efi_size) > size_t wincerts_len; > struct pkcs7_message *msg = NULL; > struct efi_signature_store *db = NULL, *dbx = NULL; > - struct x509_certificate *cert = NULL; > void *new_efi = NULL, *auth, *wincerts_end; > size_t new_efi_size, auth_size; > bool ret = false; > > + debug("%s: Enter, %d\n", __func__, ret); > + > if (!efi_secure_boot_enabled()) > return true; > > @@ -542,7 +543,17 @@ static bool efi_image_authenticate(void *efi, size_t > efi_size) > goto err; > } > > - /* go through WIN_CERTIFICATE list */ > + /* > + * go through WIN_CERTIFICATE list > + * NOTE: > + * We may have multiple signatures either as WIN_CERTIFICATE's > + * in PE header, or as pkcs7 SignerInfo's in SignedData. > + * So the verification policy here is: > + * - Success if, at least, one of signatures is verified > + * - unless > + * any of signatures is rejected explicitly, or If one signature is good and the others are rejected (e.g. due to the revocation list), why won't you be happy with the one good signature? Is this a requirement in the UEFI spec? Best regards Heinrich > + * none of digest algorithms are supported > + */ > for (wincert = wincerts, wincerts_end = (void *)wincerts + wincerts_len; >(void *)wincert < wincerts_end; >wincert = (void *)wincert + ALIGN(wincert->dwLength, 8)) { > @@ -596,37 +607,27 @@ static bool efi_image_authenticate(void *efi, size_t > efi_size) > goto err; > } > > - if (!efi_signature_verify_signers(msg, dbx)) { > - debug("Signer was rejected by \"dbx\"\n"); > + if (!efi_signature_check_signers(msg, dbx)) { > + debug("Signer(s) in \"dbx\"\n"); > goto err; > - } else { > - ret = true; >
[PATCH 1/3] pinctrl: imx7: move soc info to data section
The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-imx7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx7.c b/drivers/pinctrl/nxp/pinctrl-imx7.c index 769d428dda..66b58ba472 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx7.c +++ b/drivers/pinctrl/nxp/pinctrl-imx7.c @@ -9,7 +9,7 @@ #include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __attribute__((section(".data"))); static struct imx_pinctrl_soc_info imx7_lpsr_pinctrl_soc_info = { .flags = ZERO_OFFSET_VALID, -- 2.16.4
[PATCH 3/3] pinctrl: imx5: move soc info to data section
The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-imx5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx5.c b/drivers/pinctrl/nxp/pinctrl-imx5.c index 5d17380919..9c3423bef3 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx5.c +++ b/drivers/pinctrl/nxp/pinctrl-imx5.c @@ -10,7 +10,7 @@ #include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __attribute__((section(".data"))); static int imx5_pinctrl_probe(struct udevice *dev) { -- 2.16.4
[PATCH 2/3] pinctrl: imx8m: move soc info to data section
The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-imx8m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx8m.c b/drivers/pinctrl/nxp/pinctrl-imx8m.c index 5b7cbb69ae..0626fde58f 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx8m.c +++ b/drivers/pinctrl/nxp/pinctrl-imx8m.c @@ -8,7 +8,7 @@ #include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __attribute__((section(".data"))); static int imx8mq_pinctrl_probe(struct udevice *dev) { -- 2.16.4
[PATCH] usb: xhci-dwc3: Fix usage of bulk PHY API
The PHY consumer is responsible for allocating the struct phy_bulk. During conversion to the bulk API, the contents of the struct were replaced by a pointer instead of the struct itself. This leads to a null pointer dereference in generic_phy_get_bulk() when setting bulk->phys. Fixes: 6dfb8a8052ee ("usb: dwc3: use the phy bulk API to get phys") Signed-off-by: Samuel Holland --- drivers/usb/host/xhci-dwc3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c index 563db1a426..9b22f271a7 100644 --- a/drivers/usb/host/xhci-dwc3.c +++ b/drivers/usb/host/xhci-dwc3.c @@ -19,7 +19,7 @@ #include struct xhci_dwc3_platdata { - struct phy_bulk *usb_phys; + struct phy_bulk usb_phys; }; void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode) @@ -124,7 +124,7 @@ static int xhci_dwc3_probe(struct udevice *dev) hcor = (struct xhci_hcor *)((uintptr_t)hccr + HC_LENGTH(xhci_readl(&(hccr)->cr_capbase))); - ret = dwc3_setup_phy(dev, plat->usb_phys); + ret = dwc3_setup_phy(dev, >usb_phys); if (ret && (ret != -ENOTSUPP)) return ret; @@ -167,7 +167,7 @@ static int xhci_dwc3_remove(struct udevice *dev) { struct xhci_dwc3_platdata *plat = dev_get_platdata(dev); - dwc3_shutdown_phy(dev, plat->usb_phys); + dwc3_shutdown_phy(dev, >usb_phys); return xhci_deregister(dev); } -- 2.24.1
Re: [PATCH 08/13] test/py: efi_secboot: remove all "re.search"
On 5/29/20 8:41 AM, AKASHI Takahiro wrote: > Currently, we don't use any regular expression in matching outputs from > U-Boot. Since its use is just redundant, we can remove all. > > Signed-off-by: AKASHI Takahiro Applying: test/py: efi_secboot: remove all "re.search" error: patch failed: test/py/tests/test_efi_secboot/test_signed.py:32 error: test/py/tests/test_efi_secboot/test_signed.py: patch does not apply error: patch failed: test/py/tests/test_efi_secboot/test_unsigned.py:33 error: test/py/tests/test_efi_secboot/test_unsigned.py: patch does not apply Patch failed at 0001 test/py: efi_secboot: remove all "re.search" Could you, please, rebase your patches. Best regards Heinrich
[PATCH V2 RESEND 0/7] imx: drivers: ddr: ddr driver update
Seems the previous V2 not show all patches in patchwork https://patchwork.ozlabs.org/project/uboot/list/?series=176250=%2A=both V2: Drop patch to print dram rate remove board ddr ecc part from patch enabling inline ecc feature This is to upstream NXP vendor tree ddr driver related fix and update Jacky Bai (2): driver: ddr: imx: skip ddr_ss_gpr config on imx8mn driver: ddr: imx: correct the pwrctl setting of selfref_en on imx8m Jian Li (3): imx8mp: enable rd_port_urgent imx8mp: DDR performance tunning imx8mp: Disables use of MR4 TUF flag (MR4[7]) bit Oliver Chen (1): drivers: ddr: imx Workaround for i.MX8M DDRPHY rank to rank issue Sherry Sun (1): drivers: ddr: imx8mp: Add inline ECC feature support arch/arm/include/asm/arch-imx8m/ddr.h | 10 ++ board/freescale/imx8mp_evk/lpddr4_timing.c | 5 +- drivers/ddr/imx/imx8m/Kconfig | 7 ++ drivers/ddr/imx/imx8m/ddr_init.c | 79 +- drivers/ddr/imx/imx8m/ddrphy_train.c | 7 ++ drivers/ddr/imx/imx8m/ddrphy_utils.c | 164 + 6 files changed, 268 insertions(+), 4 deletions(-) -- 2.16.4
[PATCH V2 3/7] drivers: ddr: imx8mp: Add inline ECC feature support
From: Sherry Sun the DRAM Controller in i.MX8MP will support a feature called "Inline ECC". This is supported for all 3 supported DRAM technologies (LPDDR4, DDR4 and DDR3L). When this feature is enabled by software, the DRAM Controller reserves 12.5% of DRAM capacity for ECC information, and presents only the non-ECC portion (lower 87.5% of the installed capacity of DRAM) to the rest of the SoC. The DRAM memory can be divided into 8 regions so that if a use case only requires ECC protection on a subset of memory, then only that subset of memory need support inline ECC. If this occurs, then there is no performance penalty accessing the non-ECC-protected memory (no need to access ECC for this portion of the memory map). This is all configured with the DRAM Controller. Signed-off-by: Sherry Sun Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8m/ddr.h | 7 drivers/ddr/imx/imx8m/Kconfig | 7 drivers/ddr/imx/imx8m/ddr_init.c | 72 +++ 3 files changed, 86 insertions(+) diff --git a/arch/arm/include/asm/arch-imx8m/ddr.h b/arch/arm/include/asm/arch-imx8m/ddr.h index 7a2a2d8edc..04c9c962cf 100644 --- a/arch/arm/include/asm/arch-imx8m/ddr.h +++ b/arch/arm/include/asm/arch-imx8m/ddr.h @@ -529,6 +529,8 @@ enum msg_response { #define DDRC_SBRWDATA0(X)(DDRC_IPS_BASE_ADDR(X) + 0xf2c) #define DDRC_SBRWDATA1(X)(DDRC_IPS_BASE_ADDR(X) + 0xf30) #define DDRC_PDCH(X) (DDRC_IPS_BASE_ADDR(X) + 0xf34) +#define DDRC_SBRSTART0(X)(DDRC_IPS_BASE_ADDR(X) + 0xf38) +#define DDRC_SBRRANGE0(X)(DDRC_IPS_BASE_ADDR(X) + 0xf40) #define DDRC_FREQ1_DERATEEN(X) (DDRC_IPS_BASE_ADDR(X) + 0x2020) #define DDRC_FREQ1_DERATEINT(X)(DDRC_IPS_BASE_ADDR(X) + 0x2024) @@ -708,6 +710,11 @@ int ddr_cfg_phy(struct dram_timing_info *timing_info); void load_lpddr4_phy_pie(void); void ddrphy_trained_csr_save(struct dram_cfg_param *param, unsigned int num); void dram_config_save(struct dram_timing_info *info, unsigned long base); +void board_dram_ecc_scrub(void); +void ddrc_inline_ecc_scrub(unsigned int start_address, + unsigned int range_address); +void ddrc_inline_ecc_scrub_end(unsigned int start_address, + unsigned int range_address); /* utils function for ddr phy training */ int wait_ddrphy_training_complete(void); diff --git a/drivers/ddr/imx/imx8m/Kconfig b/drivers/ddr/imx/imx8m/Kconfig index 5bf61eb258..a5f5524fbe 100644 --- a/drivers/ddr/imx/imx8m/Kconfig +++ b/drivers/ddr/imx/imx8m/Kconfig @@ -29,4 +29,11 @@ config SAVED_DRAM_TIMING_BASE info into memory for low power use. OCRAM_S is used for this purpose on i.MX8MM. default 0x18 + +config IMX8M_DRAM_INLINE_ECC + bool "imx8mp inline ECC" + depends on IMX8MP && IMX8M_LPDDR4 + help + Select this config if you want to use inline ecc feature for + imx8mp-evk board. endmenu diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c index 06b4341b11..f573a778d9 100644 --- a/drivers/ddr/imx/imx8m/ddr_init.c +++ b/drivers/ddr/imx/imx8m/ddr_init.c @@ -20,6 +20,76 @@ void ddr_cfg_umctl2(struct dram_cfg_param *ddrc_cfg, int num) } } +#ifdef CONFIG_IMX8M_DRAM_INLINE_ECC +void ddrc_inline_ecc_scrub(unsigned int start_address, + unsigned int range_address) +{ + unsigned int tmp; + + /* Step1: Enable quasi-dynamic programming */ + reg32_write(DDRC_SWCTL(0), 0x); + /* Step2: Set ECCCFG1.ecc_parity_region_lock to 1 */ + reg32setbit(DDRC_ECCCFG1(0), 0x4); + /* Step3: Block the AXI ports from taking the transaction */ + reg32_write(DDRC_PCTRL_0(0), 0x0); + /* Step4: Set scrub start address */ + reg32_write(DDRC_SBRSTART0(0), start_address); + /* Step5: Set scrub range address */ + reg32_write(DDRC_SBRRANGE0(0), range_address); + /* Step6: Set scrub_mode to write */ + reg32_write(DDRC_SBRCTL(0), 0x0014); + /* Step7: Set the desired pattern through SBRWDATA0 registers */ + reg32_write(DDRC_SBRWDATA0(0), 0x55aa55aa); + /* Step8: Enable the SBR by programming SBRCTL.scrub_en=1 */ + reg32setbit(DDRC_SBRCTL(0), 0x0); + /* Step9: Poll SBRSTAT.scrub_done=1 */ + tmp = reg32_read(DDRC_SBRSTAT(0)); + while (tmp != 0x0002) + tmp = reg32_read(DDRC_SBRSTAT(0)) & 0x2; + /* Step10: Poll SBRSTAT.scrub_busy=0 */ + tmp = reg32_read(DDRC_SBRSTAT(0)); + while (tmp != 0x0) + tmp = reg32_read(DDRC_SBRSTAT(0)) & 0x1; + /* Step11: Disable SBR by programming SBRCTL.scrub_en=0 */ + clrbits_le32(DDRC_SBRCTL(0), 0x1); + /* Step12: Prepare for normal scrub operation(Read) and set scrub_interval*/ + reg32_write(DDRC_SBRCTL(0), 0x100); + /* Step13: Enable the SBR by programming SBRCTL.scrub_en=1 */ +
[PATCH V2 2/7] driver: ddr: imx: correct the pwrctl setting of selfref_en on imx8m
From: Jacky Bai The 'selfref_en' should be bit'0', so correct the setting to enable the auto self-refresh. Reviewed-by: Jian Li Reviewed-by: Ye Li Signed-off-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/ddr/imx/imx8m/ddr_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c index ba5ae05035..06b4341b11 100644 --- a/drivers/ddr/imx/imx8m/ddr_init.c +++ b/drivers/ddr/imx/imx8m/ddr_init.c @@ -162,7 +162,7 @@ int ddr_init(struct dram_timing_info *dram_timing) /* Step26: Set back register in Step4 to the original values if desired */ reg32_write(DDRC_RFSHCTL3(0), 0x000); /* enable selfref_en by default */ - setbits_le32(DDRC_PWRCTL(0), 0x1 << 3); + setbits_le32(DDRC_PWRCTL(0), 0x1); /* enable port 0 */ reg32_write(DDRC_PCTRL_0(0), 0x0001); -- 2.16.4
[PATCH V2 1/7] driver: ddr: imx: skip ddr_ss_gpr config on imx8mn
From: Jacky Bai There is no DDR_SS_GPR0 exits on i.MX8MN, so skip setting this register on i.MX8MN. Signed-off-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/ddr/imx/imx8m/ddr_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c index af8c1427d2..ba5ae05035 100644 --- a/drivers/ddr/imx/imx8m/ddr_init.c +++ b/drivers/ddr/imx/imx8m/ddr_init.c @@ -73,7 +73,7 @@ int ddr_init(struct dram_timing_info *dram_timing) /* if ddr type is LPDDR4, do it */ tmp = reg32_read(DDRC_MSTR(0)); - if (tmp & (0x1 << 5)) + if (tmp & (0x1 << 5) && !is_imx8mn()) reg32_write(DDRC_DDR_SS_GPR0, 0x01); /* LPDDR4 mode */ /* determine the initial boot frequency */ -- 2.16.4
Re: [PATCH 03/13] efi_loader: image_loader: retrieve authenticode only if it exists
On 5/29/20 8:41 AM, AKASHI Takahiro wrote: > Since certificate table, which is indexed by IMAGE_DIRECTORY_ENTRY_SECURITY %s/Since certificate/Since the certificate/ > and contains authenticode in PE image, doesn't always exist, we should make > sure that we will retrieve its pointer only if it exists. > > Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt
Re: [PATCH 04/13] efi_loader: signature: fix a size check against revocation list
On 5/29/20 8:41 AM, AKASHI Takahiro wrote: > Since the size check against an entry in efi_search_siglist() is > incorrect, this function will never find out a to-be-matched certificate > and its associated revocation time in signature list. %s/in signature/in the signature/ > > Signed-off-by: AKASHI Takahiro > --- > lib/efi_loader/efi_signature.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c > index be6491c6e255..35f678de057e 100644 > --- a/lib/efi_loader/efi_signature.c > +++ b/lib/efi_loader/efi_signature.c > @@ -432,10 +432,11 @@ static bool efi_search_siglist(struct x509_certificate > *cert, >* time64_t revocation_time; >* }; >*/ > - if ((sig_data->size == SHA256_SUM_LEN) && > - !memcmp(sig_data->data, hash, SHA256_SUM_LEN)) { > + if ((sig_data->size >= SHA256_SUM_LEN + sizeof(time64_t)) && > + !memcmp(sig_data->data, msg, SHA256_SUM_LEN)) { > memcpy(revoc_time, sig_data->data + SHA256_SUM_LEN, > sizeof(*revoc_time)); > + debug("revocation time: 0x%llx\n", *revoc_time); Since this is seconds since 1970 wouldn't it be reasonable to use decimal output (%llu)? Otherwise: Reviewed-by: Heinrich Schuchardt > found = true; > goto out; > } >
Re: [PATCH 07/13] efi_loader: image_loader: add digest-based verification for signed image
On 5/29/20 8:41 AM, AKASHI Takahiro wrote: > In case that a type of certificate in "db" or "dbx" is > EFI_CERT_X509_SHA256_GUID, it is actually not a certificate which contains > a public key for RSA decryption, but a digest of image to be loaded. > If the value matches to a value calculated from a given binary image, it is > granted for loading. > > With this patch, common digest check code, which used to be used for > unsigned image verification, will be extracted from > efi_signature_verify_with_sigdb() into efi_signature_lookup_digest(), and > extra step for digest check will be added to efi_image_authenticate(). Could you, please, add comments in the code describing this process flow. Best regards Heinrich
Aw: [PATCH] usb: xhci-dwc3: Fix usage of bulk PHY API
Hi, my mistake is already fixed and merged by commit "usb: dwc3: fix NULL pointer issue" by original author of xhci/bulk-api https://gitlab.denx.de/u-boot/u-boot/-/commit/58221d7e876c2f75ae7696aad853d81ccd76fb7a regards Frank
Re: [PATCH 2/2] dma-mapping: Add header file for ARCH_DMA_MINALIGN
On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote: > On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote: > > > This is defined in the asm/cache.h header file. Update this header file to > > include it. > > > > Signed-off-by: Simon Glass > > Reviewed-by: Tom Rini > > There's also drivers/usb/host/ohci.h and lib/elf.c which also reference > ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those. Dunno how I missed that 1/2 is what fixed that one, sorry. And lib/elf.c is a problem in theory but would be a fail to build if not pulled in logically so I'll leave it be for now. -- Tom signature.asc Description: PGP signature
Please pull u-boot-dm
Hi Tom, The following changes since commit 606cced58bf44bdf640760711be40d15a169aa71: Merge tag 'u-boot-amlogic-20200529' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic (2020-05-29 08:57:04 -0400) are available in the Git repository at: git://git.denx.de/u-boot-dm.git tags/dm-pull-30may20 for you to fetch changes up to dc03ba48be2b78597889409cf29bfd2b271e: patman: Modify functional tests for new behavior (2020-05-29 20:55:45 -0600) Patman changelog enhancements Sandbox SPI flash doc update AKASHI Takahiro (2): sandbox: drop CONFIG_SYS_RELOC_GD_ENV_ADDR sandbox: update documents regarding spi_sf Bin Meng (2): patman: Sort the command line options patman: Add an option to create patches without binary contents Sean Anderson (4): patman: Suppress empty changelog entries patman: Add new tags for finer-grained changelog control patman: Support multi-line changes in changelogs patman: Modify functional tests for new behavior Stefan Roese (1): dm: core: Reorder include files in read.c configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig| 1 - configs/sandbox_spl_defconfig | 1 - doc/SPI/README.sandbox-spi| 58 +-- doc/arch/sandbox.rst | 52 ++ drivers/core/read.c | 6 +- tools/patman/README | 54 +- tools/patman/func_test.py | 58 +-- tools/patman/gitutil.py | 4 +- tools/patman/main.py | 19 ++--- tools/patman/patchstream.py | 104 +++ tools/patman/series.py| 54 ++ tools/patman/test/0001-pci-Correct-cast-for-sandbox.patch | 3 + ...fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch | 12 +++- tools/patman/test/test01.txt | 15 +++- 16 files changed, 304 insertions(+), 139 deletions(-) Regards, Simon
Re: [PATCH 04/18] common: Drop net.h from common header
On Mon, Apr 6, 2020 at 10:04 PM Simon Glass wrote: > > Move this header out of the common header. Network support is used in > quite a few places but it still does not warrant blanket inclusion. > > Note that this net.h header itself has quite a lot in it. It could be > split into the driver-mode support, functions, structures, checksumming, > etc. > > Signed-off-by: Simon Glass This patch appears to break the USB OHCI on the da850-evm. starting USB... Bus usb@20: Port not available. Bus usb@225000: USB OHCI 1.0 scanning bus usb@225000 for devices... ERROR: CTL:TIMEOUT The CTL:TIMEOUT is part of drivers/usb/host/ohci-hcd.c I can go back and forth and the issue appears very repeatable. A working state looks like: starting USB... Bus usb@20: Port not available. Bus usb@225000: USB OHCI 1.0 scanning bus usb@225000 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found I generated drivers/usb/host/ohci-hcd.i files between the working and non-working versions to see if/what is different, but they are different. It's too large of a patch to just do a revert on this commit at master, because of many of the dependent changes that have been made after that. I am open for ideas on what to do to regain the broken USB functionality. thanks, adam > --- >
[PATCH 2/2] dma-mapping: Add header file for ARCH_DMA_MINALIGN
This is defined in the asm/cache.h header file. Update this header file to include it. Signed-off-by: Simon Glass --- include/linux/dma-mapping.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 20b6d60dd8..6a107d52e0 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -2,6 +2,7 @@ #ifndef _LINUX_DMA_MAPPING_H #define _LINUX_DMA_MAPPING_H +#include #include #include #include -- 2.27.0.rc0.183.gde8f92d652-goog
[PATCH 1/2] usb: ohci: Add header file for ARCH_DMA_MINALIGN
This is defined in the asm/cache.h header file. Update this header file to include it so it gets the same value consistently across U-Boot. This fixes 'usb host' on omapl138_lcdk. Fixes: 90526e9fbac ("common: Drop net.h from common header") Reported-by: Adam Ford Signed-off-by: Simon Glass --- drivers/usb/host/ohci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 9b264bd92a..a38cd25eb8 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -11,6 +11,7 @@ * e.g. PCI controllers need this */ +#include #include #ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS -- 2.27.0.rc0.183.gde8f92d652-goog
Re: [PATCH 04/18] common: Drop net.h from common header
On Sat, May 30, 2020 at 11:29 AM Simon Glass wrote: > > Hi Adam, > > On Sat, 30 May 2020 at 08:59, Adam Ford wrote: > > > > On Mon, Apr 6, 2020 at 10:04 PM Simon Glass wrote: > > > > > > Move this header out of the common header. Network support is used in > > > quite a few places but it still does not warrant blanket inclusion. > > > > > > Note that this net.h header itself has quite a lot in it. It could be > > > split into the driver-mode support, functions, structures, checksumming, > > > etc. > > > > > > Signed-off-by: Simon Glass > > > > This patch appears to break the USB OHCI on the da850-evm. > > > > starting USB... > > Bus usb@20: Port not available. > > Bus usb@225000: USB OHCI 1.0 > > scanning bus usb@225000 for devices... ERROR: CTL:TIMEOUT > > > > The CTL:TIMEOUT is part of drivers/usb/host/ohci-hcd.c > > > > I can go back and forth and the issue appears very repeatable. > > > > A working state looks like: > > > > starting USB... > > Bus usb@20: Port not available. > > Bus usb@225000: USB OHCI 1.0 > > scanning bus usb@225000 for devices... 2 USB Device(s) found > >scanning usb for storage devices... 1 Storage Device(s) found > > > > > > I generated drivers/usb/host/ohci-hcd.i files between the working and > > non-working versions to see > > if/what is different, but they are different. > > > > It's too large of a patch to just do a revert on this commit at > > master, because of many of the dependent changes that have been made > > after that. I am open for ideas on what to do to regain the broken USB > > functionality. > > I happen to have an omapl138_lcdk in my lab at the moment which seems > to be close enough to repeat the problem. I've sent a patch. Thank you for your quick response. I have tested it, and responded with my 'tested-by' to the other series. adam > > Regards, > Simon
Re: [PATCH 04/18] common: Drop net.h from common header
Hi Adam, On Sat, 30 May 2020 at 08:59, Adam Ford wrote: > > On Mon, Apr 6, 2020 at 10:04 PM Simon Glass wrote: > > > > Move this header out of the common header. Network support is used in > > quite a few places but it still does not warrant blanket inclusion. > > > > Note that this net.h header itself has quite a lot in it. It could be > > split into the driver-mode support, functions, structures, checksumming, > > etc. > > > > Signed-off-by: Simon Glass > > This patch appears to break the USB OHCI on the da850-evm. > > starting USB... > Bus usb@20: Port not available. > Bus usb@225000: USB OHCI 1.0 > scanning bus usb@225000 for devices... ERROR: CTL:TIMEOUT > > The CTL:TIMEOUT is part of drivers/usb/host/ohci-hcd.c > > I can go back and forth and the issue appears very repeatable. > > A working state looks like: > > starting USB... > Bus usb@20: Port not available. > Bus usb@225000: USB OHCI 1.0 > scanning bus usb@225000 for devices... 2 USB Device(s) found >scanning usb for storage devices... 1 Storage Device(s) found > > > I generated drivers/usb/host/ohci-hcd.i files between the working and > non-working versions to see > if/what is different, but they are different. > > It's too large of a patch to just do a revert on this commit at > master, because of many of the dependent changes that have been made > after that. I am open for ideas on what to do to regain the broken USB > functionality. I happen to have an omapl138_lcdk in my lab at the moment which seems to be close enough to repeat the problem. I've sent a patch. Regards, Simon
Re: [PATCH 1/2] usb: ohci: Add header file for ARCH_DMA_MINALIGN
On Sat, May 30, 2020 at 10:29:03AM -0600, Simon Glass wrote: > This is defined in the asm/cache.h header file. Update this header file to > include it so it gets the same value consistently across U-Boot. > > This fixes 'usb host' on omapl138_lcdk. > > Fixes: 90526e9fbac ("common: Drop net.h from common header") > Reported-by: Adam Ford > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature
Re: [PATCH 1/2] usb: ohci: Add header file for ARCH_DMA_MINALIGN
On Sat, May 30, 2020 at 11:29 AM Simon Glass wrote: > > This is defined in the asm/cache.h header file. Update this header file to > include it so it gets the same value consistently across U-Boot. > > This fixes 'usb host' on omapl138_lcdk. Thank you. This series also fixes the da850-evm. > > Fixes: 90526e9fbac ("common: Drop net.h from common header") Tested-by: Adam Ford > Reported-by: Adam Ford > Signed-off-by: Simon Glass > --- > > drivers/usb/host/ohci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h > index 9b264bd92a..a38cd25eb8 100644 > --- a/drivers/usb/host/ohci.h > +++ b/drivers/usb/host/ohci.h > @@ -11,6 +11,7 @@ > * e.g. PCI controllers need this > */ > > +#include > #include > > #ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS > -- > 2.27.0.rc0.183.gde8f92d652-goog >
Re: [PATCH 2/2] dma-mapping: Add header file for ARCH_DMA_MINALIGN
On Sat, May 30, 2020 at 12:27 PM Tom Rini wrote: > > On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote: > > On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote: > > > > > This is defined in the asm/cache.h header file. Update this header file to > > > include it. > > > > > > Signed-off-by: Simon Glass > > Tested-by: Adam Ford #da850-evm > > Reviewed-by: Tom Rini > > > > There's also drivers/usb/host/ohci.h and lib/elf.c which also reference > > ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those. > > Dunno how I missed that 1/2 is what fixed that one, sorry. And > lib/elf.c is a problem in theory but would be a fail to build if not > pulled in logically so I'll leave it be for now. > > -- > Tom
Re: test_efi_selftest_test_input_ex test failure
jAm May 30, 2020 2:44:04 PM UTC schrieb Simon Glass : >Hi Heinrich, > >I got a failure on this commit: > >https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102827 > >then a retry succeeded: > >https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102828 > >Any ideas on this? > >Some time ago I had a problem with buildman where the 4k pipe buffer >for console output would happen within a unicode character. I'm not >sure if this has anything to do with the problem, or if pytest uses >'bytes' under the hood or not. > >Regards, >Simon In the log I see: [1;32;40mExecuting 'extended text input' succeeded It is this call that fails: u_boot_console.restart_uboot() And QEMU writes: DRAM: alloc space exhausted Doesn't this mean that the server does not have enough RAM for all processes running on it? This should be fixed in the Gitlab setup of konsulko-bootbake G37FKVsV. Best regards Heinrich
Re: [U-Boot] Please pull from u-boot-i2c
On Sat, May 30, 2020 at 05:51:18AM +0200, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-i2c master > > The following changes since commit ab80137cc436e977ef91a154372ae5aeae3f4fb0: > > Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell (2020-05-27 > 10:56:25 -0400) > > are available in the Git repository at: > > https://gitlab.denx.de/u-boot/custodians/u-boot-i2c.git > tags/bugfixes-for-v2020.07-rc4 > > for you to fetch changes up to b24dc83f156604f253ef6521776444188c5bff9b: > > misc: i2c_eeprom: implement different probe test eeprom offset (2020-05-28 > 06:51:06 +0200) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH] tbs2910: migrate to DM_VIDEO
On 28.05.20 10:07, Anatolij Gustschin wrote: > On Thu, 28 May 2020 09:54:42 +0200 > Soeren Moch sm...@web.de wrote: > ... >>> I'll merge this via u-boot-video tree. v2 patch depends on a few more >>> video patches which are under review/built-test currently. >> OK, I will try to test this new version again on top of your other patches. > OK, you could use 'dm_video-imx6' branch in my repo: > https://gitlab.denx.de/u-boot/custodians/u-boot-video/-/commits/dm_video-imx6 > > All required patches are already integrated there. Still works as expected. The tbs2910-patch already has my tested-by, I could not find this series as a whole to send a tag for this. >> Do you plan to merge this for v2020.07, or for -next? > For v2020.07 it is too late, Tom suggested to merge this for -next. OK, thanks, Soeren
Re: [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions
On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote: > This is needed to enable distro_boot support later on. > > Adding the necessary configuration to enable booting general > purpose distributions is typically done by enabling > CONFIG_DISTRO_DEFAULTS. > > However the resulting image size is is already very close to > the size limit and PXE isn't strictly needed, so instead we > made sure that all the configuration selected by > CONFIG_DISTRO_DEFAULTS were selected, with the exception of > PXE related configuration (CONFIG_BOOTP_PXE and > CONFIG_CMD_PXE) that are both disabled. > > With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola > GNU/Linux distribution, we have the following size > differences: > - text: +7526 bytes > - data: +28 bytes > - bss: -12 bytes > - total: +7542 bytes > > Signed-off-by: Denis 'GNUtoo' Carikli It is quite uncommon to use "board: tbs2910_defconfig" instead of "board: tbs2910" in the patch title.But maybe not that important. Reviewed-by: Soeren Moch Thanks, Soeren > --- > Changelog since v4: > --- > - As requested, I Added in the commit message the reason why the > change is really needed as the short summary is not self > explanatory enough. > - Fixed a typo in the commit message > (resultimg image instead of resulting image). > - Switched to the use of CONFIG_CMD_SYSBOOT instead of > CONFIG_DISTRO_BOOTCMD as suggested > The only changes between the two resulting .config are the following: > -CONFIG_DISTRO_DEFAULTS=y > +# CONFIG_DISTRO_DEFAULTS is not set > -CONFIG_BOOTP_PXE=y > -CONFIG_BOOTP_PXE_CLIENTARCH=0x15 > -CONFIG_CMD_PXE=y > +# CONFIG_CMD_PXE is not set > --- > configs/tbs2910_defconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig > index d14ff45615..fc9095c859 100644 > --- a/configs/tbs2910_defconfig > +++ b/configs/tbs2910_defconfig > @@ -9,6 +9,7 @@ CONFIG_NR_DRAM_BANKS=1 > CONFIG_PRE_CON_BUF_ADDR=0x7c00 > CONFIG_CMD_HDMIDETECT=y > CONFIG_AHCI=y > +CONFIG_ENV_VARS_UBOOT_CONFIG=y > CONFIG_BOOTDELAY=3 > CONFIG_USE_BOOTCOMMAND=y > CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; > else run bootcmd_mmc; fi" > @@ -43,6 +44,7 @@ CONFIG_CMD_MII=y > CONFIG_CMD_PING=y > CONFIG_CMD_CACHE=y > CONFIG_CMD_TIME=y > +CONFIG_CMD_SYSBOOT=y > CONFIG_CMD_EXT2=y > CONFIG_CMD_EXT4=y > CONFIG_CMD_EXT4_WRITE=y
Re: [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support.
On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote: > This keeps the compatibility with the old bootcmd. > > The fdtfile environment variable also needed to be set to > imx6q-tbs2910.dtb to enable booting mainline kernels > otherwise with extlinux.conf it tries to load > mx6-tbs2910.dtb instead. > > With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola > GNU/Linux distribution, we have the following size > differences: > - text: +2041 bytes > - data: 0 bytes > - bss: 0 bytes > - total: +2041 bytes > > Signed-off-by: Denis 'GNUtoo' Carikli Reviewed-by: Soeren Moch Thanks, Soeren > --- > Changelog since v4: > --- > - Sorted EXTRA_ENV_SETTINGS alphabetically as requested > BOOTENV was also moved at the begining of > EXTRA_ENV_SETTINGS like on include/configs/colibri-imx8x.h > - Moved BOOT_TARGET_DEVICES at the end of the file as suggested > --- > configs/tbs2910_defconfig | 3 ++- > include/configs/tbs2910.h | 18 ++ > 2 files changed, 20 insertions(+), 1 deletion(-) > > diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig > index 9b25dcff5e..df5013e87c 100644 > --- a/configs/tbs2910_defconfig > +++ b/configs/tbs2910_defconfig > @@ -12,11 +12,12 @@ CONFIG_AHCI=y > CONFIG_ENV_VARS_UBOOT_CONFIG=y > CONFIG_BOOTDELAY=3 > CONFIG_USE_BOOTCOMMAND=y > -CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; > else run bootcmd_mmc; fi" > +CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; > else run bootcmd_mmc || run distro_bootcmd; fi" > CONFIG_USE_PREBOOT=y > CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run > set_con_hdmi; else run set_con_serial; fi" > CONFIG_PRE_CONSOLE_BUFFER=y > CONFIG_SUPPORT_RAW_INITRD=y > +CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb" > CONFIG_BOUNCE_BUFFER=y > CONFIG_BOARD_EARLY_INIT_F=y > CONFIG_HUSH_PARSER=y > diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h > index a230111251..17de122852 100644 > --- a/include/configs/tbs2910.h > +++ b/include/configs/tbs2910.h > @@ -76,6 +76,7 @@ > #define CONFIG_BOARD_SIZE_LIMIT 392192 /* (CONFIG_ENV_OFFSET - > 1024) */ > > #define CONFIG_EXTRA_ENV_SETTINGS \ > + BOOTENV \ > "bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \ > "bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M@60 " \ > "video=mxcfb1:off video=mxcfb2:off fbmem=28M\0" \ > @@ -92,6 +93,13 @@ > "bootm 0x1080 0x10d0\0" \ > "console=ttymxc0\0" \ > "fan=gpio set 92\0" \ > + "fdt_addr=0x1300\0" \ > + "fdt_addr_r=0x1300\0" \ > + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ > + "kernel_addr_r=0x10008000\0" \ > + "pxefile_addr_r=0x10008000\0" \ > + "ramdisk_addr_r=0x1800\0" \ > + "scriptaddr=0x1400\0" \ > "set_con_serial=setenv stdout serial; " \ > "setenv stderr serial\0" \ > "set_con_hdmi=setenv stdout serial,vga; " \ > @@ -100,4 +108,14 @@ > "stdin=serial,usbkbd\0" \ > "stdout=serial,vga\0" > > +/* Enable distro boot */ > +#define BOOT_TARGET_DEVICES(func) \ > + func(MMC, mmc, 0) \ > + func(MMC, mmc, 1) \ > + func(MMC, mmc, 2) \ > + func(SATA, sata, 0) \ > + func(USB, usb, 0) > +#include > + > #endif /* __TBS2910_CONFIG_H * */
Re: [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP
On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote: > As that the resulting image is already very close to the > size limit, and that CONFIG_DHCP is not strictly required, > removing it shouldn't hurt. You removed CONFIG_CMD_DHCP. This is used to check the ethernet connection of the board. And since we enable NFS boot in defconfig, we also want DHCP. Please keep this command and drop this patch. > > With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola > GNU/Linux distribution, we have the following size > differences: > - text: -1708 bytes > - data: -28 bytes > - bss: -20 bytes > - total: -1756 bytes > > Signed-off-by: Denis 'GNUtoo' Carikli > --- > Changelog since v4: > --- > - I was requested to remove DHCP in the v3 review > but I forgot about it in v4. This fixes it. I asked to "remove DHCP and PXE boot targets" in BOOT_TARGET_DEVICES for distroboot. This already was correctly done in v4 of this series. Please drop this patch. Thanks, Soeren > --- > configs/tbs2910_defconfig | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig > index fc9095c859..9b25dcff5e 100644 > --- a/configs/tbs2910_defconfig > +++ b/configs/tbs2910_defconfig > @@ -39,7 +39,6 @@ CONFIG_CMD_PCI=y > CONFIG_CMD_SATA=y > CONFIG_CMD_USB=y > CONFIG_CMD_USB_MASS_STORAGE=y > -CONFIG_CMD_DHCP=y > CONFIG_CMD_MII=y > CONFIG_CMD_PING=y > CONFIG_CMD_CACHE=y
Re: [PATCHv5][ 7/7] board: tbs2910: add documentation
On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote: > This documents the u-boot installation procedure and the > hardware in order to get started. > > Signed-off-by: Denis 'GNUtoo' Carikli > --- > Changelog since v4: > --- > - Added dded information about SYSBOOT boot support as requested. > - Fixed the switch positions as suggested. > --- > doc/board/index.rst | 1 + > doc/board/tbs/index.rst | 9 ++ > doc/board/tbs/tbs2910.rst | 191 ++ > 3 files changed, 201 insertions(+) > create mode 100644 doc/board/tbs/index.rst > create mode 100644 doc/board/tbs/tbs2910.rst Denis, thanks for providing this documentation. 2 remarks below. Since this already is v5, do you want to resend a fixed version of this series, or should we fix this later in a separate patch? If you want to send a new version of this patch, please also add ---8<--- diff --git a/board/tbs/tbs2910/MAINTAINERS b/board/tbs/tbs2910/MAINTAINERS index a3ad2f712a..1e3c0d0ece 100644 --- a/board/tbs/tbs2910/MAINTAINERS +++ b/board/tbs/tbs2910/MAINTAINERS @@ -4,4 +4,5 @@ S: Maintained F: arch/arm/dts/imx6q-tbs2910.dts F: board/tbs/tbs2910/ F: configs/tbs2910_defconfig +F: doc/board/tbs/ F: include/configs/tbs2910.h ---8<--- (whitespace may be broken in this snippet) Thanks, Soeren > > diff --git a/doc/board/index.rst b/doc/board/index.rst > index 01b233f737..bb4473152a 100644 > --- a/doc/board/index.rst > +++ b/doc/board/index.rst > @@ -18,5 +18,6 @@ Board-specific doc > rockchip/index > sifive/index > st/index > + tbs/index > toradex/index > xilinx/index > diff --git a/doc/board/tbs/index.rst b/doc/board/tbs/index.rst > new file mode 100644 > index 00..b677bc624f > --- /dev/null > +++ b/doc/board/tbs/index.rst > @@ -0,0 +1,9 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +TBS > +=== > + > +.. toctree:: > + :maxdepth: 2 > + > + tbs2910 > diff --git a/doc/board/tbs/tbs2910.rst b/doc/board/tbs/tbs2910.rst > new file mode 100644 > index 00..e97f2b6e61 > --- /dev/null > +++ b/doc/board/tbs/tbs2910.rst > @@ -0,0 +1,191 @@ > +TBS2910 Matrix ARM miniPC > += > + > +Building > + > +To build u-boot for the TBS2910 Matrix ARM miniPC, you can use the following > +procedure: > + > +First add the ARM toolchain to your PATH > + > +Then setup the ARCH and cross compilation environment variables. > + > +When this is done you can then build u-boot for the TBS2910 Matrix ARM miniPC > +with the following commands: > + > +.. code-block:: none > + > + make mrproper > + make tbs2910_defconfig > + make > + > +Once the build is complete, you can find the resulting image as u-boot.imx in > +the current directory. > + > +UART > + > +The UART voltage is at 3.3V and its settings are 115200bps 8N1 > + > +BOOT/UPDATE boot switch: > + > +The BOOT/UPDATE switch (SW11) is connected to the BOOT_MODE0 and > +BOOT_MODE1 SoC pins. It has "BOOT" and "UPDATE" markings both on > +the PCB and on the plastic case. > + > +When set to the "UPDATE" position, the SoC will use the "Boot From Fuses" > +configuration, and since BT_FUSE_SEL is 0, this makes the SOC jump to serial > +downloader. > + > +When set in the "BOOT" position, the SoC will use the "Internal boot" > +configuration, and since BT_FUSE_SEL is 0, it will then use the GPIO pins > +for the boot configuration. > + > +SW6 binary DIP switch array on the PCB revision 2.1: > + > +On that PCB revision, SW6 has 8 positions. > + > +Switching a position to ON sets the corresponding > +register to 1. > + > +See the following table for a correspondence between the switch positions and > +registers: > + > +=== > +Switch positionRegister > +=== > +1 BOOT_CFG2[3] > +2 BOOT_CFG2[4] > +3 BOOT_CFG2[5] > +4 BOOT_CFG2[6] > +5 BOOT_CFG1[4] > +6 BOOT_CFG1[5] > +7 BOOT_CFG1[6] > +8 BOOT_CFG1[7] > +=== > + > +For example: > + > + - To boot from the eMMC: 1:ON , 2:ON, 3:ON, 4:OFF, 5:OFF, 6:ON, 7:ON, 8:OFF > + - To boot from the microSD slot: 1: ON, 2: OFF, 3: OFF, 4: OFF, 5:OFF, > 6:OFF, > +7:ON, 8:OFF > + - To boot from the SD slot: 1: OFF, 2: ON, 3: OFF, 4: OFF, 5:OFF, 6:OFF, > 7:ON, > +8:OFF > + - To boot from SATA: 1: OFF, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:ON, 7:OFF, > 8:OFF > + > +You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for > +additional details. > + > +SW6 binary DIP switch array on the PCB revision 2.3: > + > +On that PCB revision, SW6 has only 4 positions. > + > +Switching a position to ON sets the corresponding > +register to 1. > + > +See the following table for a correspondence
Re: [PATCH 2/2] dma-mapping: Add header file for ARCH_DMA_MINALIGN
On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote: > This is defined in the asm/cache.h header file. Update this header file to > include it. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini There's also drivers/usb/host/ohci.h and lib/elf.c which also reference ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those. -- Tom signature.asc Description: PGP signature
[PATCH] ARM: imx: hab: panic on authentication failure
Instead of hang()ing the system and thus disallowing any automated recovery possibility from a HAB authentication failure, panic() . The panic() function can be configured to hang() the system after printing an error message, however the default is to reset the system instead. This allows redundant boot to work correctly. In case the primary or secondary image cannot be authenticated, the system reboots and bootrom can try to start the other one. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team Cc: Peng Fan Cc: Stefano Babic --- arch/arm/mach-imx/spl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 1a231c67f5..76a5f7aca6 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -293,8 +293,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) CSF_PAD_SIZE, offset)) { image_entry(); } else { - puts("spl: ERROR: image authentication fail\n"); - hang(); + panic("spl: ERROR: image authentication fail\n"); } } } @@ -320,8 +319,7 @@ void board_spl_fit_post_load(ulong load_addr, size_t length) if (imx_hab_authenticate_image(load_addr, offset + IVT_SIZE + CSF_PAD_SIZE, offset)) { - puts("spl: ERROR: image authentication unsuccessful\n"); - hang(); + panic("spl: ERROR: image authentication unsuccessful\n"); } } #endif -- 2.25.1
Re: [PATCH] ARM: imx: hab: panic on authentication failure
Hi Marek, [Adding Breno] On Sat, May 30, 2020 at 3:29 PM Marek Vasut wrote: > > Instead of hang()ing the system and thus disallowing any automated > recovery possibility from a HAB authentication failure, panic() . > The panic() function can be configured to hang() the system after > printing an error message, however the default is to reset the > system instead. > > This allows redundant boot to work correctly. In case the primary > or secondary image cannot be authenticated, the system reboots and > bootrom can try to start the other one. > > Signed-off-by: Marek Vasut > Cc: Fabio Estevam > Cc: NXP i.MX U-Boot Team > Cc: Peng Fan > Cc: Stefano Babic This is a better behavior indeed: Reviewed-by: Fabio Estevam
test_efi_selftest_test_input_ex test failure
Hi Heinrich, I got a failure on this commit: https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102827 then a retry succeeded: https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102828 Any ideas on this? Some time ago I had a problem with buildman where the 4k pipe buffer for console output would happen within a unicode character. I'm not sure if this has anything to do with the problem, or if pytest uses 'bytes' under the hood or not. Regards, Simon
Re: test_efi_selftest_test_input_ex test failure
On 5/30/20 5:24 PM, Heinrich Schuchardt wrote: > > jAm May 30, 2020 2:44:04 PM UTC schrieb Simon Glass : >> Hi Heinrich, >> >> I got a failure on this commit: >> >> https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102827 >> >> then a retry succeeded: >> >> https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102828 >> >> Any ideas on this? >> >> Some time ago I had a problem with buildman where the 4k pipe buffer >> for console output would happen within a unicode character. I'm not >> sure if this has anything to do with the problem, or if pytest uses >> 'bytes' under the hood or not. >> >> Regards, >> Simon > > In the log I see: > > [1;32;40mExecuting 'extended text input' succeeded > > It is this call that fails: > > u_boot_console.restart_uboot() > > And QEMU writes: > > DRAM: alloc space exhausted > > Doesn't this mean that the server does not have enough RAM for all processes > running on it? This should be fixed in the Gitlab setup of konsulko-bootbake > G37FKVsV. The message is not from QEMU but from U-Boot: common/malloc_simple.c:28: log_err("alloc space exhausted\n"); Best regards Heinrich
Re: test_efi_selftest_test_input_ex test failure
Hi Heinrich, On Sat, 30 May 2020 at 09:51, Heinrich Schuchardt wrote: > > On 5/30/20 5:24 PM, Heinrich Schuchardt wrote: > > > > jAm May 30, 2020 2:44:04 PM UTC schrieb Simon Glass : > >> Hi Heinrich, > >> > >> I got a failure on this commit: > >> > >> https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102827 > >> > >> then a retry succeeded: > >> > >> https://gitlab.denx.de/u-boot/custodians/u-boot-dm/-/jobs/102828 > >> > >> Any ideas on this? > >> > >> Some time ago I had a problem with buildman where the 4k pipe buffer > >> for console output would happen within a unicode character. I'm not > >> sure if this has anything to do with the problem, or if pytest uses > >> 'bytes' under the hood or not. > >> > >> Regards, > >> Simon > > > > In the log I see: > > > > [1;32;40mExecuting 'extended text input' succeeded > > > > It is this call that fails: > > > > u_boot_console.restart_uboot() > > > > And QEMU writes: > > > > DRAM: alloc space exhausted > > > > Doesn't this mean that the server does not have enough RAM for all > > processes running on it? This should be fixed in the Gitlab setup of > > konsulko-bootbake G37FKVsV. > > The message is not from QEMU but from U-Boot: > > common/malloc_simple.c:28: > log_err("alloc space exhausted\n"); Funny how it only happens sometimes though. I wonder what could be different between runs? Regards, Simon
Re: [PATCH] ARM: imx: hab: panic on authentication failure
On 5/30/20 10:14 PM, Patrick Wildt wrote: > On Sat, May 30, 2020 at 03:31:29PM -0300, Fabio Estevam wrote: >> Hi Marek, >> >> [Adding Breno] >> >> On Sat, May 30, 2020 at 3:29 PM Marek Vasut wrote: >>> >>> Instead of hang()ing the system and thus disallowing any automated >>> recovery possibility from a HAB authentication failure, panic() . >>> The panic() function can be configured to hang() the system after >>> printing an error message, however the default is to reset the >>> system instead. >>> >>> This allows redundant boot to work correctly. In case the primary >>> or secondary image cannot be authenticated, the system reboots and >>> bootrom can try to start the other one. >>> >>> Signed-off-by: Marek Vasut >>> Cc: Fabio Estevam >>> Cc: NXP i.MX U-Boot Team >>> Cc: Peng Fan >>> Cc: Stefano Babic >> >> This is a better behavior indeed: >> >> Reviewed-by: Fabio Estevam > > What about this? Have you ignored this patch for a reason? :/ > > https://marc.info/?l=u-boot=159069441005730=2 Yes, and the reason is I was not even aware of your patch, sorry. The CC list in this mail should cover all the interested parties, so use it when sending V2, or use patman. The patch looks fine, one nit is that you should return errno.h return value and another is that it changes the current behavior. Now that I look at this imx code, board_spl_fit_post_load() should not even be in arch/ , sigh, but that's for separate patch either way. So I think if you want to support this sort of fallback, you should make the board_spl_fit_post_load() be in board/ files, with default __weak implementation calling some arch_hab_authenticate...() which implements current content of board_spl_fit_post_load(), and let boards decide how to handle the fallback if it needs to be altered. Would that work ?
[PATCH 1/1] Dockerfile: add libguestfs-tools package
In some of our Python tests we build disk images. Currently this involves using the sudo command for losetup and mount. For some tests sudo is not necessary if the command guestmount of package libguestfs-tools is available. Another useful tool in libguestfs-tools is virt-make-fs. Generally we should get rid of using a root user for building and testing. As a first step install libguestfs-tools in our Docker image. Signed-off-by: Heinrich Schuchardt --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4138415..20a861f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,6 +57,7 @@ RUN apt-get update && apt-get install -y \ iasl \ imagemagick \ iputils-ping \ + libguestfs-tools \ libisl15 \ liblz4-tool \ libpixman-1-dev \ -- 2.26.2
[PATCH 1/2] ARM: imx: m53menlo: Do not fail boot on invalid splash screen
None of these splash screen loading errors are so critical as to justify complete failure to boot, so just print error message as needed and return 0, the boot can very likely continue without the splash. Fix a couple of missing free(dst) instances as well. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team Cc: Peng Fan Cc: Stefano Babic --- board/menlo/m53menlo/m53menlo.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index 58a564ac31..d4288a2c57 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -353,24 +353,28 @@ int board_late_init(void) ret = splash_screen_prepare(); if (ret < 0) - return ret; + goto splasherr; len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE; ret = gunzip(dst + 2, CONFIG_SYS_VIDEO_LOGO_MAX_SIZE - 2, (uchar *)addr, ); if (ret) { printf("Error: no valid bmp or bmp.gz image at %lx\n", addr); - free(dst); - return ret; + goto splasherr; } ret = uclass_get_device(UCLASS_VIDEO, 0, ); if (ret) - return ret; + goto splasherr; ret = video_bmp_display(dev, (ulong)dst + 2, xpos, ypos, true); if (ret) - return ret; + goto splasherr; + + return 0; + +splasherr: + free(dst); #endif return 0; } -- 2.25.1
[PATCH 2/2] ARM: dts: imx: m53menlo: Convert to DM_ETH
Convert the board to DM_ETH instead of legacy networking. This requires a minor addition to the DT to satisfy the requirement for specifying a PHY node. No functional change from board user perspective. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team Cc: Peng Fan Cc: Stefano Babic --- arch/arm/dts/imx53-m53menlo.dts | 11 +++ configs/m53menlo_defconfig | 3 +++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/dts/imx53-m53menlo.dts b/arch/arm/dts/imx53-m53menlo.dts index a6805eca9d..3767dcaef4 100644 --- a/arch/arm/dts/imx53-m53menlo.dts +++ b/arch/arm/dts/imx53-m53menlo.dts @@ -86,8 +86,19 @@ { pinctrl-names = "default"; pinctrl-0 = <_fec>; + phy-handle = <>; phy-mode = "rmii"; status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethphy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; + }; }; { diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig index a65c21a139..5289899601 100644 --- a/configs/m53menlo_defconfig +++ b/configs/m53menlo_defconfig @@ -75,6 +75,9 @@ CONFIG_NAND_MXC=y CONFIG_PHYLIB=y CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ8XXX=y +CONFIG_DM_ETH=y +CONFIG_DM_MDIO=y +CONFIG_DM_ETH_PHY=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y CONFIG_DM_REGULATOR=y -- 2.25.1
[PATCH 1/1] test/py: use actual core count for parallel builds
When building U-Boot we should not blindly use make -j8 but consider the actual core count given by os.cpu_count(). Signed-off-by: Heinrich Schuchardt --- test/py/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/conftest.py b/test/py/conftest.py index e3392ff6bc..30920474b3 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -156,7 +156,7 @@ def pytest_configure(config): o_opt = '' cmds = ( ['make', o_opt, '-s', board_type + '_defconfig'], -['make', o_opt, '-s', '-j8'], +['make', o_opt, '-s', '-j{}'.format(os.cpu_count())], ) name = 'make' -- 2.26.2
Pull request: u-boot-rockchip-20200530
Hi Tom, Please pull the rockchip updates/fixes: - Fix mmc of path after syncfrom kernel dts; - Add dwc3 host support with DM for rk3399; - Add usb2phy and typec phy for rockchip platform; - Migrate board list doc to rockchip.rst Gitlab ci: https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip/pipelines/3495 Thanks, - Kever The following changes since commit ab80137cc436e977ef91a154372ae5aeae3f4fb0: Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell (2020-05-27 10:56:25 -0400) are available in the Git repository at: https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git tags/u-boot-rockchip-20200530 for you to fetch changes up to 63a3c89855cabc173c76a9958053408d34d33dc2: rockchip: rockpro64: enable DM_KEYBOARD (2020-05-30 07:38:50 +0800) Frank Wang (8): arm: mach-rockchip: bind sub-nodes for rk3399_syscon usb: dwc3: add dis_enblslpm_quirk usb: dwc3: add dis_u2_freeclk_exists_quirk usb: dwc3: amend UTMI/UTMIW phy interface setup usb: dwc3: add make compatible for rockchip platform driver: usb: drop legacy rockchip xhci driver ARM: dts: rk3399-evb: usb3.0 host support configs: evb-rk3399: update support usb3.0 host Jagan Teki (13): rockchip: Fix spl mmc boot device ofpath clk: rk3399: Fix eMMC get_clk reg offset arm64: dts: rk3399-nanopi4: Add u-boot,spl-boot-order nanopc-t4: Enable USB Gadget doc: rockchip: Document eMMC program steps clk: rk3399: Enable/Disable the USB2PHY clk clk: rk3399: Set empty for TCPHY assigned-clocks clk: rk3399: Enable/Disable TCPHY clocks phy: rockchip: Add Rockchip USB2PHY driver phy: rockchip: Add Rockchip USB TypeC PHY driver usb: dwc3: Add disable u2mac linestate check quirk usb: dwc3: Enable AutoRetry feature in the controller roc-rk3399-pc: Enable USB3.0 Host Marcin Juszkiewicz (2): rockchip: enable USB OHCI host for RockPro64 rockchip: rockpro64: enable DM_KEYBOARD Mark Kettenis (2): pci: Make Rockchip PCIe voltage regulators optional rk3399: Enable NVMe distro bootcmd Walter Lozano (3): doc: board: rockchip: Improve supported board list format doc: board: rockchip: Add missing supported boards doc: rockchip: Remove list of supported boards arch/arm/dts/rk3399-evb-u-boot.dtsi | 15 +- arch/arm/dts/rk3399-ficus-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 6 + arch/arm/dts/rk3399-rock960-u-boot.dtsi | 2 +- arch/arm/mach-rockchip/rk3399/rk3399.c| 4 +- arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 3 + board/theobroma-systems/puma_rk3399/puma-rk3399.c | 4 +- configs/evb-rk3399_defconfig | 6 + configs/nanopc-t4-rk3399_defconfig| 3 + configs/roc-pc-mezzanine-rk3399_defconfig | 5 + configs/roc-pc-rk3399_defconfig | 6 + configs/rockpro64-rk3399_defconfig| 3 + doc/README.rockchip | 72 +- doc/board/rockchip/rockchip.rst | 116 +++- drivers/Makefile | 1 + drivers/clk/rockchip/clk_rk3399.c | 40 +- drivers/pci/pcie_rockchip.c | 33 +- drivers/phy/Kconfig | 1 + drivers/phy/rockchip/Kconfig | 21 + drivers/phy/rockchip/Makefile | 7 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 312 + drivers/phy/rockchip/phy-rockchip-typec.c | 796 ++ drivers/usb/common/common.c | 25 + drivers/usb/dwc3/core.c | 106 ++- drivers/usb/dwc3/core.h | 19 + drivers/usb/dwc3/dwc3-generic.c | 34 +- drivers/usb/host/Kconfig | 9 - drivers/usb/host/Makefile | 1 - drivers/usb/host/xhci-rockchip.c | 197 -- include/configs/rockchip-common.h | 7 + include/configs/rockpro64_rk3399.h| 2 + include/dwc3-uboot.h | 3 + include/linux/usb/phy.h | 18 + 33 files changed, 1510 insertions(+), 369 deletions(-) create mode 100644 drivers/phy/rockchip/Kconfig create mode 100644 drivers/phy/rockchip/Makefile create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb2.c create mode 100644 drivers/phy/rockchip/phy-rockchip-typec.c delete mode 100644 drivers/usb/host/xhci-rockchip.c
Re: [PATCH] ARM: imx: hab: panic on authentication failure
On Sat, May 30, 2020 at 03:31:29PM -0300, Fabio Estevam wrote: > Hi Marek, > > [Adding Breno] > > On Sat, May 30, 2020 at 3:29 PM Marek Vasut wrote: > > > > Instead of hang()ing the system and thus disallowing any automated > > recovery possibility from a HAB authentication failure, panic() . > > The panic() function can be configured to hang() the system after > > printing an error message, however the default is to reset the > > system instead. > > > > This allows redundant boot to work correctly. In case the primary > > or secondary image cannot be authenticated, the system reboots and > > bootrom can try to start the other one. > > > > Signed-off-by: Marek Vasut > > Cc: Fabio Estevam > > Cc: NXP i.MX U-Boot Team > > Cc: Peng Fan > > Cc: Stefano Babic > > This is a better behavior indeed: > > Reviewed-by: Fabio Estevam What about this? Have you ignored this patch for a reason? :/ https://marc.info/?l=u-boot=159069441005730=2
[PULL] u-boot-sh/master
The following changes since commit ab80137cc436e977ef91a154372ae5aeae3f4fb0: Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell (2020-05-27 10:56:25 -0400) are available in the Git repository at: git://git.denx.de/u-boot-sh.git master for you to fetch changes up to d8172f606ffd474248172c9a932483913c9f7b7d: sh: r2dplus: Enable HUSH (2020-05-29 19:20:54 +0200) Marek Vasut (2): sh: r2dplus: Enable board_eth_init only for non-DM case sh: r2dplus: Enable HUSH board/renesas/r2dplus/r2dplus.c | 2 ++ configs/r2dplus_defconfig | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-)
[PULL] u-boot-usb/master
The following changes since commit ab80137cc436e977ef91a154372ae5aeae3f4fb0: Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell (2020-05-27 10:56:25 -0400) are available in the Git repository at: git://git.denx.de/u-boot-usb.git master for you to fetch changes up to 73021d11d4d53cddaa2b1c8e0bd6eb3c79dc7fdc: usb: ehci-mx6: Print error code on failure (2020-05-29 19:23:36 +0200) Hayes Wang (1): eth/r8152: fix assigning the wrong endpoint Marek Vasut (2): usb: ehci-mx6: Handle fixed regulators correctly usb: ehci-mx6: Print error code on failure drivers/usb/eth/r8152.c | 14 -- drivers/usb/host/ehci-mx6.c | 8 2 files changed, 12 insertions(+), 10 deletions(-)
Re: [PATCH] ARM: imx: hab: panic on authentication failure
On Sat, May 30, 2020 at 10:29:19PM +0200, Marek Vasut wrote: > On 5/30/20 10:14 PM, Patrick Wildt wrote: > > On Sat, May 30, 2020 at 03:31:29PM -0300, Fabio Estevam wrote: > >> Hi Marek, > >> > >> [Adding Breno] > >> > >> On Sat, May 30, 2020 at 3:29 PM Marek Vasut wrote: > >>> > >>> Instead of hang()ing the system and thus disallowing any automated > >>> recovery possibility from a HAB authentication failure, panic() . > >>> The panic() function can be configured to hang() the system after > >>> printing an error message, however the default is to reset the > >>> system instead. > >>> > >>> This allows redundant boot to work correctly. In case the primary > >>> or secondary image cannot be authenticated, the system reboots and > >>> bootrom can try to start the other one. > >>> > >>> Signed-off-by: Marek Vasut > >>> Cc: Fabio Estevam > >>> Cc: NXP i.MX U-Boot Team > >>> Cc: Peng Fan > >>> Cc: Stefano Babic > >> > >> This is a better behavior indeed: > >> > >> Reviewed-by: Fabio Estevam > > > > What about this? Have you ignored this patch for a reason? :/ > > > > https://marc.info/?l=u-boot=159069441005730=2 > > Yes, and the reason is I was not even aware of your patch, sorry. The CC > list in this mail should cover all the interested parties, so use it > when sending V2, or use patman. I already had 11 people on CC, but apparently I missed you. > The patch looks fine, one nit is that you should return errno.h return > value and another is that it changes the current behavior. Now that I > look at this imx code, board_spl_fit_post_load() should not even be in > arch/ , sigh, but that's for separate patch either way. > > So I think if you want to support this sort of fallback, you should make > the board_spl_fit_post_load() be in board/ files, with default __weak > implementation calling some arch_hab_authenticate...() which implements > current content of board_spl_fit_post_load(), and let boards decide how > to handle the fallback if it needs to be altered. > > Would that work ? I'm not sure. In comparison to the people from NXP who are paid to upstream their code and still don't do it correctly, I'm doing this in my spare time and I'm not sure I want to bikeshed all day long. I can send a V3 that replaces the -1 with EINVAL, EACCESS, EPERM or something the like. If you want to clean up after NXP, feel free to. Which errno would you like to see? Best regards, Patrick
Re: Please pull u-boot-dm
On Sat, May 30, 2020 at 09:16:10AM -0600, Simon Glass wrote: > Hi Tom, > > The following changes since commit 606cced58bf44bdf640760711be40d15a169aa71: > > Merge tag 'u-boot-amlogic-20200529' of > https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic (2020-05-29 > 08:57:04 -0400) > > are available in the Git repository at: > > git://git.denx.de/u-boot-dm.git tags/dm-pull-30may20 > > for you to fetch changes up to dc03ba48be2b78597889409cf29bfd2b271e: > > patman: Modify functional tests for new behavior (2020-05-29 20:55:45 -0600) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature