From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Marinho Date: Tue, 2 Mar 2021 11:51:26 +0000 Subject: [PATCH 2/2 v4] efi: ESRT creation tests In-Reply-To: <53eee005-c38f-1be1-5ceb-b51d9b1ab7c7@gmx.de> References: <20210223165001.17001-1-jose.marinho@arm.com> <20210223165001.17001-3-jose.marinho@arm.com> <53eee005-c38f-1be1-5ceb-b51d9b1ab7c7@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Heinrich, Thank you for your reviews. > > With which configuration do we see any entry in the list? > > I only got: > > => efidebug capsule esrt > ======================================== > ESRT: fw_resource_count=0 > ESRT: fw_resource_count_max=0 > ESRT: fw_resource_version=1 > ======================================== > => > To get the FIT and RAW capsules showing, the best is to execute the test script in: test/py/tests/test_efi_capsule/test_capsule_firmware.py > > diff --git a/test/lib/Makefile b/test/lib/Makefile index > > 97c11e35a8..aeb8c13eb0 100644 > > --- a/test/lib/Makefile > > +++ b/test/lib/Makefile > > @@ -15,3 +15,4 @@ obj-$(CONFIG_UT_LIB_ASN1) += asn1.o > > obj-$(CONFIG_UT_LIB_RSA) += rsa.o > > obj-$(CONFIG_AES) += test_aes.o > > obj-$(CONFIG_GETOPT) += getopt.o > > +obj-$(CONFIG_EFI_ESRT) += efi_esrt.o > > diff --git a/test/lib/efi_esrt.c b/test/lib/efi_esrt.c new file mode > > 100644 index 0000000000..e8cfe671e2 > > --- /dev/null > > +++ b/test/lib/efi_esrt.c > > @@ -0,0 +1,191 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* > > + * Test ESRT tables support > > + * > > + * Copyright (C) 2021 Arm Ltd. > > + */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#define TEST_ESRT_NUM_ENTRIES 255 > > + > > +#if 0x100 < TEST_ESRT_NUM_ENTRIES > > +#error TEST_ESRT_NUM_ENTRIES must be lower or equal to 255. > > +#endif > > A comment above the #define should be enough. > > What leads to the limit of 255 entries? The 255 entry limit stems from the get_image_info u8 descriptor_count output variable. > > Have the existing FMP protocols to be in the count? > Regards, Jose