Re: [PATCH] xilinx: Enable MBEDTLS/LWIP/WGET and WGET_HTTPS

2025-01-30 Thread Ilias Apalodimas
IS_IN_SPI_FLASH=y > CONFIG_SYS_REDUNDAND_ENVIRONMENT=y > CONFIG_ENV_FAT_DEVICE_AND_PART=":auto" > CONFIG_SYS_RELOC_GD_ENV_ADDR=y > -CONFIG_NETCONSOLE=y > -CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y > +CONFIG_NET_LWIP=y > CONFIG_NET_RANDOM_ETHADDR=y > CONFIG_SPL_DM_SEQ_ALIAS=y > CONFIG_SIMPLE_PM_BUS=y > @@ -132,7 +125,6 @@ CONFIG_SATA_CEVA=y > CONFIG_BUTTON=y > CONFIG_BUTTON_GPIO=y > CONFIG_CLK_ZYNQMP=y > -CONFIG_DFU_TFTP=y > CONFIG_DFU_TIMEOUT=y > CONFIG_DFU_MMC=y > CONFIG_DFU_MTD=y > @@ -140,10 +132,6 @@ CONFIG_DFU_NAND=y > CONFIG_DFU_RAM=y > CONFIG_DFU_SF=y > CONFIG_SYS_DFU_DATA_BUF_SIZE=0x180 > -CONFIG_USB_FUNCTION_FASTBOOT=y > -CONFIG_FASTBOOT_FLASH=y > -CONFIG_FASTBOOT_FLASH_MMC_DEV=0 > -CONFIG_FASTBOOT_CMD_OEM_FORMAT=y > CONFIG_ARM_FFA_TRANSPORT=y > CONFIG_FPGA_XILINX=y > CONFIG_FPGA_ZYNQMPPL=y > @@ -247,6 +235,7 @@ CONFIG_VIRTIO_BLK=y > # CONFIG_BINMAN_FDT is not set > CONFIG_BINMAN_DTB="./arch/arm/dts/zynqmp-binman.dtb" > CONFIG_PANIC_HANG=y > +CONFIG_MBEDTLS_LIB=y > CONFIG_TPM=y > CONFIG_SPL_GZIP=y > CONFIG_TOOLS_MKFWUMDATA=y > -- > 2.43.0 > Thanks this helps! Acked-by: Ilias Apalodimas

Re: [RFC PATCH 1/4] meminfo: add memory details for armv8

2025-01-30 Thread Ilias Apalodimas
HI Heinrich On Thu, 30 Jan 2025 at 12:01, Heinrich Schuchardt wrote: > > On 1/30/25 07:20, Ilias Apalodimas wrote: > > Upcoming patches are mapping memory with RO, RW^X etc permsissions. > > Fix the meminfo command to display them properly > > > > S

Re: [RFC PATCH 3/4] arm64: mmu_change_region_attr() add an option not to break PTEs

2025-01-30 Thread Ilias Apalodimas
On Thu, 30 Jan 2025 at 12:13, Heinrich Schuchardt wrote: > > On 1/30/25 07:20, Ilias Apalodimas wrote: > > The ARM ARM on section 8.17.1 describes the cases where > > break-before-make is required when changing live page tables. > > Since we can use this function

Re: [RFC PATCH 2/4] arm: Prepare linker scripts for memory permissions

2025-01-30 Thread Ilias Apalodimas
Hi Heinrich On Thu, 30 Jan 2025 at 12:08, Heinrich Schuchardt wrote: > > On 1/30/25 07:20, Ilias Apalodimas wrote: > > Upcoming patches are switching the memory mappings to RW, RO, RW^X page > > RWX, RO, RW? RW, RX, RO :) > > > permissions after the U-Boot binary

Re: [RFC PATCH 4/4] arm64: Change mapping for data/rodata/text

2025-01-30 Thread Ilias Apalodimas
Hi Heinrich, On Thu, 30 Jan 2025 at 12:24, Heinrich Schuchardt wrote: > > On 1/30/25 07:20, Ilias Apalodimas wrote: > > Now that we have everything in place switch the page permissions for > > .rodata, .text and .data just after we relocate everything in top of the > > RA

Re: [RFC PATCH 3/4] arm64: mmu_change_region_attr() add an option not to break PTEs

2025-01-30 Thread Ilias Apalodimas
Hi Jerome, On Thu, 30 Jan 2025 at 11:11, Jerome Forissier wrote: > > Hi Ilias, > > On 1/30/25 08:20, Ilias Apalodimas wrote: > > The ARM ARM on section 8.17.1 describes the cases where > > break-before-make is required when changing live page tables. > > Since we

Re: [RFC PATCH 2/4] arm: Prepare linker scripts for memory permissions

2025-01-30 Thread Ilias Apalodimas
On Thu, 30 Jan 2025 at 11:09, Jerome Forissier wrote: > > Hi Ilias, > > On 1/30/25 08:20, Ilias Apalodimas wrote: > > Upcoming patches are switching the memory mappings to RW, RO, RW^X page > > permissions after the U-Boot binary and its data are relocated. Add >

Re: [RFC PATCH 1/4] meminfo: add memory details for armv8

2025-01-30 Thread Ilias Apalodimas
Hi Jerome, On Thu, 30 Jan 2025 at 11:09, Jerome Forissier wrote: > > Hi Ilias, > > On 1/30/25 08:20, Ilias Apalodimas wrote: > > Upcoming patches are mapping memory with RO, RW^X etc permsissions. > > Fix the meminfo command to display them properly > > >

[RFC PATCH 4/4] arm64: Change mapping for data/rodata/text

2025-01-29 Thread Ilias Apalodimas
Now that we have everything in place switch the page permissions for .rodata, .text and .data just after we relocate everything in top of the RAM. Signed-off-by: Ilias Apalodimas --- common/board_r.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/common/board_r.c b/common/board_r.c

[RFC PATCH 3/4] arm64: mmu_change_region_attr() add an option not to break PTEs

2025-01-29 Thread Ilias Apalodimas
the attributes of normal memory without breaking the pages tables first Signed-off-by: Ilias Apalodimas --- arch/arm/cpu/armv8/cache_v8.c | 27 - arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 10 - arch/arm/include/asm/system.h | 3 ++- arch/arm

[RFC PATCH 1/4] meminfo: add memory details for armv8

2025-01-29 Thread Ilias Apalodimas
Upcoming patches are mapping memory with RO, RW^X etc permsissions. Fix the meminfo command to display them properly Signed-off-by: Ilias Apalodimas --- arch/arm/cpu/armv8/cache_v8.c| 18 +- arch/arm/include/asm/armv8/mmu.h | 2 ++ cmd/meminfo.c| 5

[RFC PATCH 2/4] arm: Prepare linker scripts for memory permissions

2025-01-29 Thread Ilias Apalodimas
Upcoming patches are switching the memory mappings to RW, RO, RW^X page permissions after the U-Boot binary and its data are relocated. Add annotations in the linker scripts to and mark text, data, rodata etc sections and align them to a page boundary Signed-off-by: Ilias Apalodimas

[RFC PATCH 0/4] Fix page permission on arm64 architectures

2025-01-29 Thread Ilias Apalodimas
GnRnE | Non-shareable [0x23ffe4000] | Table | | [0x80 - 0x100] | Block | RW | Device-nGnRnE | Non-shareable [0] https://lore.kernel.org/u-boot/20250129-rockchip-pinctrl-const-v1-0-450ccdadf...@cherry.de/ [1] https://source.denx.de/u-boot/cust

Pull request for tpm-master-28012025

2025-01-29 Thread Ilias Apalodimas
The following changes since commit a517796cfa5d8f4ca2f0c11c78c24a08a102c047: Prepare v2025.04-rc1 (2025-01-27 16:38:46 -0600) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/tpm-master-28012025 for you to fetch changes up to 8895ff8ae2186b53

Re: [PATCH v7 3/3] tpm: get tpm event log from bloblist

2025-01-27 Thread Ilias Apalodimas
0, &args)) > - return -ENODEV; > + return 0; > + } > > - a = ofnode_get_addr_size(args.node, "reg", &s); > - if (a == FDT_ADDR_T_NONE) > - return -ENOMEM; > + if (dev_read_phandle_with_args(dev, "memory-region", NULL, 0, 0, > &args)) > + return -ENODEV; > > - *addr = map_physmem(a, s, MAP_NOCACHE); > - *size = (u32)s; > - } > + a = ofnode_get_addr_size(args.node, "reg", &s); > + if (a == FDT_ADDR_T_NONE) > + return -ENOMEM; > + > + *addr = map_physmem(a, s, MAP_NOCACHE); > + *size = (u32)s; > > return 0; > } > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v3 3/6] tpm: add wrapper and helper APIs for PCR allocate

2025-01-27 Thread Ilias Apalodimas
mode = TPM2_SU_CLEAR */ > + return tpm2_startup(dev, false, TPM2_SU_CLEAR); > +} > + > +int tpm2_activate_banks(struct udevice *dev, u32 log_active) > +{ > + u32 algo_mask = 0; > + int rc; > + > + rc = tpm2_scan_masks(dev, log_active, &algo_mask); > + if (rc) > + return rc; > + > + if (algo_mask) { > + if (!IS_ENABLED(CONFIG_TPM_PCR_ALLOCATE)) > + return -1; > + > + rc = tpm2_pcr_allocate(dev, algo_mask); > + if (rc) > + return rc; > + > + log_info("PCR allocate done, shutdown TPM and reboot\n"); > + do_reset(NULL, 0, 0, NULL); > + log_err("reset does not work!\n"); > + return -1; > + } > + > + return 0; > +} > + > u32 tpm2_startup(struct udevice *dev, bool bon, enum tpm2_startup_types mode) > { > int op = bon ? TPM2_CC_STARTUP : TPM2_CC_SHUTDOWN; > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v3 5/6] tpm: PCR allocate during PCR extend to disable the unsupported algorithms

2025-01-27 Thread Ilias Apalodimas
On Mon, 27 Jan 2025 at 16:59, Raymond Mao wrote: > > During PCR extend process, if any unsupported algorithms are active, > try to use PCR allocate to inactivate them. > > Signed-off-by: Raymond Mao > Acked-by: Ilias Apalodimas > --- > changes in v2 > - None. > ch

Re: [PATCH v3 0/5] Add pmem node for preserving distro ISO's

2025-01-27 Thread Ilias Apalodimas
Hi Sughosh, On Mon, 27 Jan 2025 at 08:47, Sughosh Ganu wrote: > > On Fri, 24 Jan 2025 at 17:10, Ilias Apalodimas > wrote: > > > > Heinrich, Tobias > > > > There's a slight problem that I forgot when commenting v2. > > > > Heinrich's id

Re: [PATCH v3 0/5] Add pmem node for preserving distro ISO's

2025-01-24 Thread Ilias Apalodimas
ture. This has been changed, based on a review > comment from Heinrich to instead be done by looping through the memory > based blkmamp devices. > > Changes since V2: > * Fix a checkpatch error for putting a blank line after a function > * Use blkmap device based scanning

Re: [PATCH v6 3/3] tpm: get tpm event log from bloblist

2025-01-23 Thread Ilias Apalodimas
On Thu, 23 Jan 2025 at 17:51, Raymond Mao wrote: > > Hi Ilias, > > On Thu, 23 Jan 2025 at 02:00, Ilias Apalodimas > wrote: >> >> Hi Raymond >> >> On Fri, 17 Jan 2025 at 18:36, Raymond Mao wrote: >> > >> > Get tpm event log from blobli

Re: [PATCH v6 3/3] tpm: get tpm event log from bloblist

2025-01-22 Thread Ilias Apalodimas
Hi Raymond On Fri, 17 Jan 2025 at 18:36, Raymond Mao wrote: > > Get tpm event log from bloblist instead of FDT when bloblist is > enabled and valid from previous boot stage. > > Signed-off-by: Raymond Mao > --- > Changes in v2 > - Remove patch dependency. > - Remove the fallback to FDT when BLOB

Re: [PATCH v2 3/6] tpm: add wrapper and helper APIs for PCR allocate

2025-01-22 Thread Ilias Apalodimas
Hi Raymond, On Fri, 17 Jan 2025 at 18:40, Raymond Mao wrote: > > Add PCR allocate wrapper APIs for using in tcg2 protocol. > The wrapper proceeds a PCR allocate command, followed by a > shutdown command. > A system boot is required after two commands since TPM device needs > a HW reset to activa

Re: [PATCH 2/6] tmp: add TPM2_PCR_Allocate command

2025-01-22 Thread Ilias Apalodimas
Hi Simon, On Sat, 18 Jan 2025 at 06:31, Simon Glass wrote: > > Hi Raymond, > > On Wed, 15 Jan 2025 at 13:02, Raymond Mao wrote: > > > > TPM2_PCR_Allocate command is required to re-configurate a TPM device > > to enable or disable algorithms in run-time, thus this patch introduces > > the impleme

Re: [PATCH v2 2/6] tpm: add TPM2_PCR_Allocate command

2025-01-22 Thread Ilias Apalodimas
pcr->count)) > + return TPM_LIB_ERROR; > + > + offset += sizeof(pcr->count); > + > + /* Pack each tpms_pcr_selection */ > + for (i = 0; i < pcr->count; i++) { > + struct tpms_pcr_selection *sel = &pcr->selection[i]; > + > + /* Pack hash (16-bit) */ > + if (pack_byte_string(command_v2, sizeof(command_v2), "w", > offset, > +sel->hash)) > + return TPM_LIB_ERROR; > + > + offset += sizeof(sel->hash); > + > + /* Pack size_of_select (8-bit) */ > + if (pack_byte_string(command_v2, sizeof(command_v2), "b", > offset, > +sel->size_of_select)) > + return TPM_LIB_ERROR; > + > + offset += sizeof(sel->size_of_select); > + > + /* Pack pcr_select array */ > + if (pack_byte_string(command_v2, sizeof(command_v2), "s", > offset, > +sel->pcr_select, sel->size_of_select)) > + return TPM_LIB_ERROR; > + > + offset += sel->size_of_select; > + } > + > + ret = tpm_sendrecv_command(dev, command_v2, response, &response_len); > + if (!ret) > + tpm_init(dev); > + > + return ret; > +} > + > static int tpm2_get_num_pcr(struct udevice *dev, u32 *num_pcr) > { > u8 response[(sizeof(struct tpms_capability_data) - > -- > 2.25.1 > Acked-by: Ilias Apalodimas

Re: [PATCH v2 5/6] tpm: PCR allocate during PCR extend to disable the unsupported algorithms

2025-01-22 Thread Ilias Apalodimas
return -EINVAL; > } > /* > * Fill the command structure starting from the first buffer: > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v3 4/5] blkmap: store type of blkmap device in corresponding structure

2025-01-21 Thread Ilias Apalodimas
On Tue, 21 Jan 2025 at 18:02, Sughosh Ganu wrote: > > On Tue, 21 Jan 2025 at 21:25, Ilias Apalodimas > wrote: > > > > Hi Sughosh > > > > On Mon, 20 Jan 2025 at 12:51, Sughosh Ganu wrote: > > > > > > Add information about the type of blkmap d

Re: [PATCH v3 4/5] blkmap: store type of blkmap device in corresponding structure

2025-01-21 Thread Ilias Apalodimas
Hi Sughosh On Mon, 20 Jan 2025 at 12:51, Sughosh Ganu wrote: > > Add information about the type of blkmap device in the blkmap > structure. Currently, the blkmap device is used for mapping to either > a memory based block device, or another block device (linear > mapping). Put information in the

Re: [PATCH 1/1] efi_loader: reduce UEFI size if HAS_BOARD_SIZE_LIMIT=y

2025-01-20 Thread Ilias Apalodimas
lect this option to enable correct handling of the capitalization > of > Unicode codepoints in the range 0x-0x. If this option is not > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v5 3/3] tpm: get tpm event log from bloblist

2025-01-18 Thread Ilias Apalodimas
On Sat, 18 Jan 2025 at 06:31, Simon Glass wrote: > > Hi Ilias, > > On Thu, 16 Jan 2025 at 07:35, Ilias Apalodimas > wrote: > > > > On Wed, 15 Jan 2025 at 03:17, Simon Glass wrote: > > > > > > Hi Raymond, > > > > > > On Tue, 14

Re: [PATCH] dfu: Prevent set_dfu_alt_info() from overwriting a previous value

2025-01-17 Thread Ilias Apalodimas
Hi Jon, On Fri, 17 Jan 2025 at 00:02, Jon Humphreys wrote: > > Sughosh Ganu writes: > > > On Thu, 16 Jan 2025 at 14:07, Mattijs Korpershoek > > wrote: > >> > >> Hi Jon, > >> > >> Sorry for the (very) late reply. I had some long holidays in between and > >> since this is a difficult topic for me

Re: [PATCH 4/8] efi_loader: Correct bounce-buffer setup

2025-01-17 Thread Ilias Apalodimas
Hi Simon, Is this patch for -master of your tree? On Mon, 6 Jan 2025 at 16:48, Simon Glass wrote: > > This should set the bounce buffer to a pointer, not an address. Fix it. > > Signed-off-by: Simon Glass > --- > > lib/efi_loader/efi_memory.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 dele

Re: [PATCH 1/1] efi_loader: use LOGC_EFI consistently

2025-01-17 Thread Ilias Apalodimas
b/efi_loader/efi_var_common.c > @@ -5,6 +5,8 @@ > * Copyright (c) 2020 Linaro Limited, Author: AKASHI Takahiro > */ > > +#define LOG_CATEGORY LOGC_EFI > + > #include > #include > #include > diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c > index 139e16aad7c..b265d95dd6b 100644 > --- a/lib/efi_loader/efi_var_mem.c > +++ b/lib/efi_loader/efi_var_mem.c > @@ -5,6 +5,8 @@ > * Copyright (c) 2020, Heinrich Schuchardt > */ > > +#define LOG_CATEGORY LOGC_EFI > + > #include > #include > #include > diff --git a/lib/efi_loader/efi_variable_tee.c > b/lib/efi_loader/efi_variable_tee.c > index 8b6b0a39086..0d090d051dd 100644 > --- a/lib/efi_loader/efi_variable_tee.c > +++ b/lib/efi_loader/efi_variable_tee.c > @@ -10,6 +10,8 @@ > *Abdellatif El Khlifi > */ > > +#define LOG_CATEGORY LOGC_EFI > + > #if CONFIG_IS_ENABLED(ARM_FFA_TRANSPORT) > #include > #endif > diff --git a/lib/efi_loader/efi_watchdog.c b/lib/efi_loader/efi_watchdog.c > index f5fb9117717..c21d8086074 100644 > --- a/lib/efi_loader/efi_watchdog.c > +++ b/lib/efi_loader/efi_watchdog.c > @@ -5,6 +5,8 @@ > * Copyright (c) 2017 Heinrich Schuchardt > */ > > +#define LOG_CATEGORY LOGC_EFI > + > #include > > /* Conversion factor from seconds to multiples of 100ns */ > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v2 5/5] efi_loader: use include in ARM EFI linker script

2025-01-17 Thread Ilias Apalodimas
and added to the .reloc > -* section. > -*/ > - *(.rel.dyn) > - *(.rel.plt) > - *(.rel.got) > - *(.rel.data) > - *(.rel.data*) > - *(.rel.reloc) > - *(.eh_frame) > - *(.note.GNU-stack) > - *(.dynsym) > - *(.dynstr) > - *(.note.gnu.build-id) > - *(.comment) > - } > -} > +INCLUDE lib/efi_loader/elf_efi.ldsi > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v2 4/5] efi_loader: correct SizeOfCode, SizeOfInitializedData

2025-01-17 Thread Ilias Apalodimas
/* SizeOfInitializedData */ > + .long _etext - _start /* SizeOfCode */ > + .long _data_size /* SizeOfInitializedData */ > .long 0 /* SizeOfUninitializedData */ > .long _start - ImageBase /* AddressOfEntryPoint */ > .long _start - ImageBase /* BaseOfCode */ > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 3/7] configs: e850-96: Enable more EFI features

2025-01-16 Thread Ilias Apalodimas
G_CLK_EXYNOS850=y > CONFIG_SUPPORT_EMMC_BOOT=y > CONFIG_MMC_DW=y > +CONFIG_DM_RTC=y > +CONFIG_RTC_EMULATION=y > CONFIG_SOC_SAMSUNG=y > CONFIG_EXYNOS_PMU=y > CONFIG_EXYNOS_USI=y > -- > 2.39.5 > Up to you, but I'd remove CONFIG_CMD_BOOTEFI_SELFTEST in any case Reviewed-by: Ilias Apalodimas

Re: [PATCH] bloblist: Drop BSD license

2025-01-16 Thread Ilias Apalodimas
On Wed, 15 Jan 2025 at 03:18, Simon Glass wrote: > > Hi Ilias, > > On Tue, 14 Jan 2025 at 12:34, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Tue, 14 Jan 2025 at 15:15, Simon Glass wrote: > > > > > > Hi Ilias, > > >

Re: [PATCH 2/6] tmp: add TPM2_PCR_Allocate command

2025-01-16 Thread Ilias Apalodimas
On Thu, 16 Jan 2025 at 20:14, Raymond Mao wrote: > > Hi Ilias, > > On Thu, 16 Jan 2025 at 07:37, Ilias Apalodimas > wrote: >> >> Hi Raymond, >> >> On Wed, 15 Jan 2025 at 22:02, Raymond Mao wrote: >> > >> > TPM2_PCR_Allocate command is

Re: [PATCH 1/1] Makefile: let clean remove capsule_in.capsule*.efi-capsule

2025-01-16 Thread Ilias Apalodimas
# Directories & files removed with 'make mrproper' > MRPROPER_DIRS += include/config include/generated spl tpl vpl \ > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v5 3/3] tpm: get tpm event log from bloblist

2025-01-16 Thread Ilias Apalodimas
On Wed, 15 Jan 2025 at 03:17, Simon Glass wrote: > > Hi Raymond, > > On Tue, 14 Jan 2025 at 08:20, Raymond Mao wrote: > > > > Get tpm event log from bloblist instead of FDT when bloblist is > > enabled and valid from previous boot stage. > > > > As a fallback, when no event log from previous stag

Re: [PATCH v5 2/3] tcg2: decouple eventlog size from efi

2025-01-16 Thread Ilias Apalodimas
log.buffer, 0xff, CONFIG_TPM2_EVENT_LOG_SIZE); > > /* > * The log header is defined to be in SHA1 event log entry format. > @@ -939,7 +940,7 @@ static efi_status_t efi_init_event_log(void) > * platforms can use different ways to do so. > */ > elog.log = event_log.buffer; > - elog.log_size = TPM2_EVENT_LOG_SIZE; > + elog.log_size = CONFIG_TPM2_EVENT_LOG_SIZE; > rc = tcg2_log_prepare_buffer(dev, &elog, false); > if (rc) { > ret = (rc == -ENOBUFS) ? EFI_BUFFER_TOO_SMALL : > EFI_DEVICE_ERROR; > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 6/6] board: qemu-arm: select TPM_PCR_ALLOCATE

2025-01-16 Thread Ilias Apalodimas
STING=y > CONFIG_MBEDTLS_LIB=y > CONFIG_TPM=y > CONFIG_GENERATE_SMBIOS_TABLE_VERBOSE=y > +CONFIG_TPM_PCR_ALLOCATE=y > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 4/6] tpm: add PCR allocate into the eventlog handling

2025-01-16 Thread Ilias Apalodimas
goto pcr_allocate; > if (rc) > return rc; > } > @@ -617,6 +594,11 @@ int tcg2_log_prepare_buffer(struct udevice *dev, struct > tcg2_event_log *elog, > elog->found = log.found; > } > > +pcr_allocate: > + rc = tpm2_pcr_allocate(dev, log_active); > + if (rc) > + return rc; > + > if (elog->found) > return 0; > > -- > 2.25.1 > With the naming changes on patch #3 Reviewed-by: Ilias Apalodimas

Re: [PATCH 3/6] tpm: add wrapper and helper APIs for PCR allocate

2025-01-16 Thread Ilias Apalodimas
On Wed, 15 Jan 2025 at 22:02, Raymond Mao wrote: > > Add PCR allocate wrapper APIs for using in tcg2 protocol. > The wrapper proceeds a PCR allocate command, followed by a > shutdown command. We have lib/tpm_tcg2.c does any of the functions belong to that file? Unless we expect the non-TCG versio

Re: [PATCH 2/6] tmp: add TPM2_PCR_Allocate command

2025-01-16 Thread Ilias Apalodimas
Hi Raymond, On Wed, 15 Jan 2025 at 22:02, Raymond Mao wrote: > > TPM2_PCR_Allocate command is required to re-configurate reconfigure > a TPM device > to enable or disable algorithms in run-time, thus this patch introduces > the implementation of PCR allocate APIs and adds related cmd functions

Re: [PATCH 1/6] tpm: add TPM2_Shutdown command

2025-01-16 Thread Ilias Apalodimas
e *dev, enum > tpm_startup_type mode) > case TPM_ST_DEACTIVATED: > return -EINVAL; > } > - return tpm2_startup(dev, type); > + return tpm2_startup(dev, true, type); > } else { > return -ENOSYS; > } > @@ -60,7 +60,7 @@ u32 tpm_resume(struct udevice *dev) > if (tpm_is_v1(dev)) > return tpm1_startup(dev, TPM_ST_STATE); > else if (tpm_is_v2(dev)) > - return tpm2_startup(dev, TPM2_SU_STATE); > + return tpm2_startup(dev, true, TPM2_SU_STATE); > else > return -ENOSYS; > } > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH] dfu: Prevent set_dfu_alt_info() from overwriting a previous value

2025-01-16 Thread Ilias Apalodimas
Hi Mattijs, On Thu, 16 Jan 2025 at 10:37, Mattijs Korpershoek wrote: > > Hi Jon, > > Sorry for the (very) late reply. I had some long holidays in between and > since this is a difficult topic for me, I kept pushing this to the end > of my backlog. > > On mer., déc. 18, 2024 at 17:09, Jon Humphrey

Re: [PATCH 4/4] efi_loader: use include in ARM EFI linker script

2025-01-15 Thread Ilias Apalodimas
On Wed, 15 Jan 2025 at 10:53, Heinrich Schuchardt wrote: > > On 15.01.25 09:06, Ilias Apalodimas wrote: > > Hi Heinrich > > > > > > On Tue, 14 Jan 2025 at 12:30, Heinrich Schuchardt > > wrote: > >> > >> Use the same include as arm64 for the

Re: [PATCH 4/4] efi_loader: use include in ARM EFI linker script

2025-01-15 Thread Ilias Apalodimas
Hi Heinrich On Tue, 14 Jan 2025 at 12:30, Heinrich Schuchardt wrote: > > Use the same include as arm64 for the linker script. > > Adjust the 32-bit ARM PE-COFF header accordingly and harmonize it with the > 64-bit ARM header. > > Signed-off-by: Heinrich Schuchardt > --- > arch/arm/lib/crt0_arm

Re: [PATCH 3/4] efi_loader: use INCLUDE in EFI linker scripts

2025-01-15 Thread Ilias Apalodimas
ta) > + *(.data1) > + *(.data.*) > + *(.got.plt) > + *(.got) > + > + /* > +* The EFI loader doesn't seem to like a .bss section, so we > +* stick it all into .data: > +*/ > + . = ALIGN(16); > + _bss = .; > + *(.sbss) > + *(.scommon) > + *(.dynbss) > + *(.bss) > + *(.bss.*) > + *(COMMON) > + . = ALIGN(512); > + _bss_end = .; > + _edata = .; > + } :data > + _data_size = _edata - _data; > + > + . = ALIGN(4096); > + .dynsym : { *(.dynsym) } > + . = ALIGN(4096); > + .dynstr : { *(.dynstr) } > + . = ALIGN(4096); > + .note.gnu.build-id : { *(.note.gnu.build-id) } > + /DISCARD/ : { > + *(.rel.reloc) > + *(.eh_frame) > + *(.note.GNU-stack) > + } > + .comment 0 : { *(.comment) } > +} > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 2/4] scripts/Makefile.lib: add -L option to LD command for EFI binaries

2025-01-15 Thread Ilias Apalodimas
/lib/$(EFI_LDS) > > $(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S) FORCE > $(call if_changed_dep,as_o_S) > -- > 2.47.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH] bloblist: Drop BSD license

2025-01-14 Thread Ilias Apalodimas
Hi Simon, On Tue, 14 Jan 2025 at 15:15, Simon Glass wrote: > > Hi Ilias, > > On Tue, 14 Jan 2025 at 01:40, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Fri, 10 Jan 2025 at 16:54, Simon Glass wrote: > > > > > > Hi again Il

Re: [PATCH] bloblist: Drop BSD license

2025-01-14 Thread Ilias Apalodimas
Hi Simon, On Fri, 10 Jan 2025 at 16:54, Simon Glass wrote: > > Hi again Ilias, > > On Thu, 2 Jan 2025 at 18:41, Simon Glass wrote: > > > > Hi Ilias, > > > > On Fri, 3 Jan 2025 at 08:15, Ilias Apalodimas > > wrote: > > > > >

Re: [PATCH 1/2] efi_loader: efi_setup: Add efi_start_obj_list() to efi_setup.c

2025-01-10 Thread Ilias Apalodimas
Hi Simon, On Fri, 10 Jan 2025 at 15:41, Simon Glass wrote: > > Hi Heinrich, > > On Fri, 3 Jan 2025 at 12:55, Heinrich Schuchardt wrote: > > > > On 06.12.24 18:30, Adriano Cordova wrote: > > > The command bootefi calls efi_init_obj_list to do the efi set up > > > before launching an .efi payload,

Re: [PATCH v3 2/2] tpm: get tpm event log from bloblist

2025-01-10 Thread Ilias Apalodimas
On Thu, 9 Jan 2025 at 17:09, Raymond Mao wrote: > > Get tpm event log from bloblist instead of FDT when bloblist is > enabled and valid from previous boot stage. > > As a fallback, when no event log from previous stage is observed > and no user buffer is passed, malloc an 8KB buffer to initialize

Re: [PATCH 2/3] test: unit tests for strstr() and strnstr()

2025-01-09 Thread Ilias Apalodimas
static int lib_strstr(struct unit_test_state *uts) > +{ > + const char *s1 = "Itsy Bitsy Teenie Weenie"; > + const char *s2 = "eenie"; > + const char *s3 = "easy"; > + > + ut_asserteq_ptr(&s1[12], strstr(s1, s2)); > + ut_asserteq_ptr(&s1[13], strstr(&s1[3], &s2[1])); > + ut_assertnull(strstr(s1, s3)); > + ut_asserteq_ptr(&s1[2], strstr(s1, &s3[2])); > + ut_asserteq_ptr(&s1[8], strstr(&s1[5], &s3[2])); > + > + return 0; > +} > +LIB_TEST(lib_strstr, 0); > -- > 2.47.1 > Acked-by: Ilias Apalodimas

Re: Simon Glass's future with Das U-Boot project?

2025-01-08 Thread Ilias Apalodimas
Hi Tom, On Thu, Jan 02, 2025 at 10:13:13AM -0600, Tom Rini wrote: > Hey all, > > While I had hoped that the quiet of the last week or so had meant that > things would perhaps return to how they had been before, Simon's large > patch series and then comments on the TPM+bloblist patch have shown > o

Pull request for tpm-master-07012025

2025-01-07 Thread Ilias Apalodimas
the mismatched algorithms. Heinrich Schuchardt (1): tpm: update descriptions in tpm headers Ilias Apalodimas (7): tpm: Rename tpm2_is_active_pcr() tpm: Rename tpm2_allow_extend() tpm: Don't create an EventLog i

Re: [PATCH v2 2/2] tpm: get tpm event log from bloblist

2025-01-07 Thread Ilias Apalodimas
On Tue, 7 Jan 2025 at 17:03, Raymond Mao wrote: > > Get tpm event log from bloblist instead of FDT when bloblist is > enabled and valid from previous boot stage. > > Signed-off-by: Raymond Mao > --- > Changes in v2 > - Remove patch dependency. > - Remove the fallback to FDT when BLOBLIST is selec

Re: [PATCH v2 1/2] bloblist: add api to get blob with size

2025-01-07 Thread Ilias Apalodimas
IST_SIZE, 0, 0)); > ut_asserteq(sizeof(struct bloblist_hdr), bloblist_get_size()); > ut_asserteq(TEST_BLOBLIST_SIZE, bloblist_get_total_size()); > @@ -114,6 +116,8 @@ static int bloblist_test_blob(struct unit_test_state *uts) > ut_asserteq_addr(rec + 1, data);

Re: [PATCH 2/8] efi_loader: Fix display of addresses in log

2025-01-07 Thread Ilias Apalodimas
On Tue, 7 Jan 2025 at 15:58, Simon Glass wrote: > > Hi Ilias, > > On Tue, 7 Jan 2025 at 06:37, Ilias Apalodimas > wrote: > > > > Hi Simon, > > > > On Mon, 6 Jan 2025 at 16:48, Simon Glass wrote: > > > > > > The allocate/free-pages

Re: [PATCH 3/4] efi_loader: install DXE services table

2025-01-07 Thread Ilias Apalodimas
On Tue, 7 Jan 2025 at 19:19, Heinrich Schuchardt wrote: > > On 07.01.25 14:30, Ilias Apalodimas wrote: > > On Thu, 2 Jan 2025 at 20:11, Heinrich Schuchardt > > wrote: > >> > >> The debug version of the UEFI shell requires a DXE services table to exist. >

Re: [PATCH 2/8] efi_loader: Fix display of addresses in log

2025-01-07 Thread Ilias Apalodimas
Hi Simon, On Mon, 6 Jan 2025 at 16:48, Simon Glass wrote: > > The allocate/free-pages functions return an address, so there is no need > to convert it. Fix this. > > Signed-off-by: Simon Glass > Fixes: c824a96d76d ("efi_loader: Use the log with memory-related...") I can't find that commit in -m

Re: [PATCH 4/4] efi_loader: print image load address in StartImage

2025-01-07 Thread Ilias Apalodimas
gt; - EFI_PRINT("Jumping into 0x%p\n", image_obj->entry); > + EFI_PRINT("Starting image loaded at 0x%p, entry point 0x%p\n", > + info->image_base, image_obj->entry); > ret = EFI_CALL(image_obj->entry(image_handle, &systab)); > > /* > -- > 2.47.1 > With or without the cast removed Reviewed-by: Ilias Apalodimas

Re: [PATCH 3/4] efi_loader: install DXE services table

2025-01-07 Thread Ilias Apalodimas
On Thu, 2 Jan 2025 at 20:11, Heinrich Schuchardt wrote: > > The debug version of the UEFI shell requires a DXE services table to exist. > > Implement the table and let all DXE functions return EFI_UNSUPPORTED. > > Signed-off-by: Heinrich Schuchardt > --- > include/efi_dxe.h | 54 ++

Re: [PATCH 2/4] efi_loader: build with HII configuration protocol

2025-01-07 Thread Ilias Apalodimas
&efi_guid_hii_config_routing_protocol, > + &efi_hii_config_routing, > #endif > NULL); > efi_root->type = EFI_OBJECT_TYPE_U_BOOT_FIRMWARE; > -- > 2.47.1 > Acked-by: Ilias Apalodimas

Re: [PATCH 1/4] efi_loader: implement a HOB list

2025-01-07 Thread Ilias Apalodimas
Hi Heinrich, [...] > + > +/** > + * efi_hob_list_register() - install HOB list > + * > + * The EFI shell on X86 requires a HOB list > + * > + * Return: status code > + */ > +efi_status_t efi_hob_list_register(void) > +{ > + struct efi_hob_header *hob; > + > + hob = efi_alloc(sizeo

Re: [PATCH 1/1] tpm: update descriptions in tpm-v2.h header

2025-01-07 Thread Ilias Apalodimas
Hi Miquel, On Mon, 30 Dec 2024 at 10:49, Miquel Raynal wrote: > > On 24/12/2024 at 23:00:49 +01, Heinrich Schuchardt > wrote: > > > * Provide a link to 'TPM 2.0 Library Specification' > > * Remove outdated comment for TPM2_NUM_PCR_BANKS. > > The value 16 can be found in the current standard >

Re: [PATCH] efi_loader: Fix section alignment on EFI binaries

2025-01-07 Thread Ilias Apalodimas
Hi Heinrich On Fri, 3 Jan 2025 at 22:20, Heinrich Schuchardt wrote: > > On 10.12.24 17:01, Ilias Apalodimas wrote: > > When creating EFI binaries, the alignment of the text section isn't > > correctly factored in. As a result trying to load signed EFI binaries &

Re: [PATCH v2 02/33] bloblist: Drop BSD license

2025-01-07 Thread Ilias Apalodimas
On Mon, 6 Jan 2025 at 16:32, Simon Glass wrote: > > Linaro has decided to write their own version of bloblist from scratch, > so there is no point in having a non-GPL license on this file. Change > it, to better fit with the U-Boot project. > > Signed-off-by: Simon Glass > Link: https://review.tr

Re: [PATCH] bloblist: Drop BSD license

2025-01-02 Thread Ilias Apalodimas
Apologies for the formatting, replying on mobile. On Wed, Jan 1, 2025, 21:58 Simon Glass wrote: > Linaro has decided to write their own version of bloblist from scratch, > so there is no point in having a non-GPL license on this file. Change > it, to better fit with the U-Boot project. > Apart

Re: [PATCH 1/1] tpm: update descriptions in tpm-v2.h header

2024-12-27 Thread Ilias Apalodimas
lected PCRs > + */ > struct tpms_pcr_selection { > u16 hash; > u8 size_of_select; > u8 pcr_select[TPM2_PCR_SELECT_MAX]; > } __packed; > > -/* TPML_PCR_SELECTION Structure */ > +/** > + * struct tpml_pcr_selection - TPML_PCR_SELECTION structur

Re: [PATCH 00/11] Tpm exit with error when algorithm dismatches

2024-12-23 Thread Ilias Apalodimas
n all above cases, tpm_tcg2 should exit with error and prompt logs. > > Moveover, this series include miscellaneous fixes and refactoring to > simplify the logics in tpm and tpm_tcg2. > > Ilias Apalodimas (8): > efi_loader: Don't warn if the TCG2 FinalEvents table is not inst

Re: [PATCH 05/11] tpm: add flag in hash_algo_list and API to check if algorithm is supported

2024-12-23 Thread Ilias Apalodimas
algorithm is > supported by U-Boot. > > Suggested-by: Ilias Apalodimas > Signed-off-by: Ilias Apalodimas > Signed-off-by: Raymond Mao > --- > include/tpm-v2.h | 37 + > lib/tpm-v2.c | 14 +- > lib/tpm_tcg2.c | 17 +

Re: [PATCH 04/11] tpm: refactor tcg2_get_pcr_info()

2024-12-23 Thread Ilias Apalodimas
printf("%s: unknown algorithm %x\n", __func__, >pcrs.selection[i].hash); > } > } > > - *pcr_banks = pcrs.count; > + *bank_num = pcrs.count; > > return 0; > } > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH 11/11] tpm: add kconfig control in tcg2_create_digest()

2024-12-23 Thread Ilias Apalodimas
sha512_finish(&ctx_512, final); > len = TPM2_SHA512_DIGEST_SIZE; > break; > +#endif > default: > printf("%s: unsupported algorithm %x\n", __func__, >priv->active_banks[i]); > -- > 2.25.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v3 4/7] efi_loader: Add a version of efi_binary_run() with more parameters

2024-12-22 Thread Ilias Apalodimas
Hi Heinrich On Sun, 22 Dec 2024 at 14:45, Heinrich Schuchardt wrote: > > On 12/19/24 03:38, Simon Glass wrote: > > This uses a few global variables at present. With the bootflow we have > > the required parameters, so add a function which accepts these. Update > > the existing function to call th

Re: [PATCH v3 4/7] efi_loader: Add a version of efi_binary_run() with more parameters

2024-12-21 Thread Ilias Apalodimas
d. > + * > + * Return: status code > + */ > +efi_status_t efi_binary_run(void *image, size_t size, void *fdt) > +{ > + return _efi_binary_run(image, size, fdt, bootefi_device_path, > + bootefi_image_path); > } > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v3 3/7] efi_loader: Update efi_run_image() to accept image and device path

2024-12-21 Thread Ilias Apalodimas
fi_run_image(image, size); > + return efi_run_image(image_ptr, size, bootefi_device_path, > +bootefi_image_path); > } https://lore.kernel.org/u-boot/CAC_iWj+5-uoXq9BanaOSxedVgbBYNFQ2AZVqka+J7iwMv=e...@mail.gmail.com/ I thought you said the _ptr was dropped. Anyway Reviewed-by: Ilias Apalodimas We can drop it later or in v3 if one is needed Thanks /Ilias > -- > 2.34.1 >

Re: [PATCH v3 1/7] efi_loader: Refactor device and image paths into a function

2024-12-21 Thread Ilias Apalodimas
On Sat, 21 Dec 2024 at 10:21, Ilias Apalodimas wrote: > > Hi Simon, > I don't see any of the requested changes from v2 on this one. Ah you changed it to static instead. That's fine we can move it to the dp helpers. if someone else needs it. Reviewed-by: Ilias Apalodimas

Re: [PATCH v3 1/7] efi_loader: Refactor device and image paths into a function

2024-12-21 Thread Ilias Apalodimas
Hi Simon, I don't see any of the requested changes from v2 on this one. Cheers /Ilias On Thu, 19 Dec 2024 at 04:39, Simon Glass wrote: > > Move this code into a function so it can be called from elsewhere. > > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Make calculate_paths() static

Re: [PATCH v2 3/5] board_init_f_r(): use static calls

2024-12-21 Thread Ilias Apalodimas
+ CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);)) > +} > > void board_init_f_r(void) > { > - if (initcall_run_list(init_sequence_f_r)) > - hang(); > + initcall_run_f_r(); > > /* > * The pre-relocation drivers may be using memory that has now gone > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas

Re: [PATCH v2 2/5] board_init_f(): use static calls

2024-12-21 Thread Ilias Apalodimas
Hi Jerome [...] > + (INITCALL(board_postclk_init);)) > + INITCALL(env_init); /* initialize environment */ > + INITCALL(init_baud_rate); /* initialze baudrate settings */ > + INITCALL(serial_init); /* serial communications setup

Re: [PATCH v2 0/4] Add pmem node for preserving distro ISO's

2024-12-19 Thread Ilias Apalodimas
. The installation would fail > with the failure to locate certain packages. > > > Changes since V1: > * s/ommit/remove in the commit message > * s/rfom/from in the commit message > * Add a period at the end of the sentence in the commit message > * Use log_err() to print the

Re: [PATCH] imx: Fix usable memory ranges for imx8m SOCs

2024-12-18 Thread Ilias Apalodimas
Hi Tom, On Wed, 18 Dec 2024 at 16:34, Tom Rini wrote: > > On Wed, Dec 18, 2024 at 11:24:45AM +0200, Ilias Apalodimas wrote: > > Thanks Frieder > > > > On Wed, 18 Dec 2024 at 11:17, Frieder Schrempf > > wrote: > > > > > > On 18.12.24 10:00 AM, Ili

Re: [PATCH 2/5] board_init_f(): use static calls

2024-12-18 Thread Ilias Apalodimas
Hi Jerome On Tue, 17 Dec 2024 at 18:00, Jerome Forissier wrote: > > Make static calls instead of iterating over the init_sequence_f arrays. > Tested on a KV260 board (xilinx_zynqmp_kria_defconfig). > > - With LTO enabled, the code size reported by bloat-o-meter is 1184 > bytes less (-0.11%) > -

Re: [PATCH 1/5] common: board: Simplify array with function pointers with CONFIG_IS_ENABLED

2024-12-18 Thread Ilias Apalodimas
On Wed, 18 Dec 2024 at 14:15, Jerome Forissier wrote: > > > > On 12/18/24 13:03, Ilias Apalodimas wrote: > > Hi Jerome, > > > > > > This doesn't apply on -master, can you rebase it? OR was it meant for -next? > > The series is based on -next indeed.

Re: [PATCH 1/5] common: board: Simplify array with function pointers with CONFIG_IS_ENABLED

2024-12-18 Thread Ilias Apalodimas
On Wed, 18 Dec 2024 at 14:03, Ilias Apalodimas wrote: > > Hi Jerome, > > > This doesn't apply on -master, can you rebase it? OR was it meant for -next? nvm it's on -next > > Thanks > /Ilias > > On Tue, 17 Dec 2024 at 18:00, Jerome Forissier > wrote:

Re: [PATCH 1/5] common: board: Simplify array with function pointers with CONFIG_IS_ENABLED

2024-12-18 Thread Ilias Apalodimas
Hi Jerome, This doesn't apply on -master, can you rebase it? OR was it meant for -next? Thanks /Ilias On Tue, 17 Dec 2024 at 18:00, Jerome Forissier wrote: > > From: Michal Simek > > Convert all simple cases where current ifdef is used with using > CONFIG_IS_ENABLED. > The change doesn't have

Re: [PATCH] zynqmp: Remove usb init initialization for Kria

2024-12-18 Thread Ilias Apalodimas
run tpm_kv260; fi;\ > -if test ${card1_name} = SCK-KR-G; then run kr260_setup; run tpm_reset; fi;\ > +if test ${card1_name} = SCK-KV-G; then run tpm_kv260; fi;\ > +if test ${card1_name} = SCK-KR-G; then run tpm_reset; fi;\ > if test ${card1_name} = SCK-KD-G; then run kd240_setup; run tpm_kd240; fi;\ > run tpm_setup > -- > 2.43.0 > Acked-by: Ilias Apalodimas

Re: [PATCH] imx: Fix usable memory ranges for imx8m SOCs

2024-12-18 Thread Ilias Apalodimas
Thanks Frieder On Wed, 18 Dec 2024 at 11:17, Frieder Schrempf wrote: > > On 18.12.24 10:00 AM, Ilias Apalodimas wrote: > > commit e27bddff4b97 ("imx8m: Restrict usable memory to space below 4G > > boundary") > > tried to adjust the usable memory limits on a 4G

[PATCH] imx: Fix usable memory ranges for imx8m SOCs

2024-12-18 Thread Ilias Apalodimas
people can figure out the broken scenarios in the future. Suggested-by: Sughosh Ganu Fixes: commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank") Signed-off-by: Ilias Apalodimas --- arch/arm/mach-imx/imx8m/soc.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v2 0/8] Cleanup the LMB subsystem

2024-12-17 Thread Ilias Apalodimas
l the functions - Added a patch that removes lmb_align_down() - Picked up r-b tags. Tom I kept your on patch #3 since I only changed the name of the function and assumed you are ok with it. Ilias Apalodimas (8): lmb: Remove lmb_align_down() lmb: Move enum lmb_flags to a u32 lmb: Remove

[PATCH v2 8/8] lmb: Rename _lmb_alloc_addr() to lmb_alloc_addr_flags()

2024-12-17 Thread Ilias Apalodimas
lmb_alloc_addr_flags() is a wrapper for _lmb_alloc_addr() and it's the only function using it. Rename _lmb_alloc_addr() to lmb_alloc_addr_flags() and remove the wrapper. Reviewed-by: Sam Protsenko Tested-by: Sam Protsenko Signed-off-by: Ilias Apalodimas --- include/lmb.h | 2 +- lib/

[PATCH v2 7/8] lmb: Remove lmb_alloc_base_flags()

2024-12-17 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- boot/image-board.c | 18 +++--- boot/image-fdt.c| 5 +++-- include/lmb.h | 7 +++ lib/efi_loader/efi_memory.c | 4 ++-- lib/lmb.c | 19 +++ test/lib/lmb.c | 8 +

[PATCH v2 6/8] lmb: Remove lmb_alloc_addr_flags()

2024-12-17 Thread Ilias Apalodimas
ned-off-by: Ilias Apalodimas --- fs/fs.c | 2 +- include/lmb.h | 10 -- lib/efi_loader/efi_memory.c | 2 +- lib/lmb.c | 15 ++- test/lib/lmb.c | 34 +- 5 files changed, 25 inserti

[PATCH v2 5/8] lmb: Remove lmb_add_region()

2024-12-17 Thread Ilias Apalodimas
There's no point defining a function that's called only once just to avoid passing the flags. Remove the wrapper and just call lmb_add_region_flags(). Acked-by: Sughosh Ganu Reviewed-by: Heinrich Schuchardt Reviewed-by: Sam Protsenko Tested-by: Sam Protsenko Signed-off-by: Ilias

[PATCH v2 4/8] lmb: Rename free_mem to available_mem

2024-12-17 Thread Ilias Apalodimas
senko Signed-off-by: Ilias Apalodimas --- include/lmb.h | 4 ++-- lib/lmb.c | 34 +- test/cmd/bdinfo.c | 2 +- test/lib/lmb.c| 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 3abe24d

[PATCH v2 3/8] lmb: Remove lmb_reserve_flags()

2024-12-17 Thread Ilias Apalodimas
ed-by: Sam Protsenko Signed-off-by: Ilias Apalodimas --- arch/powerpc/cpu/mpc85xx/mp.c | 2 +- arch/powerpc/lib/misc.c | 2 +- boot/bootm.c | 3 ++- boot/image-board.c| 2 +- boot/image-fdt.c | 6 ++--- cmd/booti.c | 2 +- c

[PATCH v2 2/8] lmb: Move enum lmb_flags to a u32

2024-12-17 Thread Ilias Apalodimas
LMB flags is not an enum anymore. It's currently used as a bitmask in various places of our code. So make it a u32 which is more appropriate when dealing with masks. Reviewed-by: Sam Protsenko Tested-by: Sam Protsenko Signed-off-by: Ilias Apalodimas --- boot/image-fdt.c | 4 ++-- in

[PATCH v2 1/8] lmb: Remove lmb_align_down()

2024-12-17 Thread Ilias Apalodimas
We already have a macro for this. Use it instead of adding yet another variant for alignment. Reviewed-by: Sam Protsenko Tested-by: Sam Protsenko Signed-off-by: Ilias Apalodimas --- lib/lmb.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/lmb.c b/lib

  1   2   3   4   5   6   7   8   9   10   >