History log of /u-boot/arch/arm/mach-imx/ele_ahab.c
Revision Date Author Comments
# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6a718588 30-Apr-2024 Tom Rini <trini@konsulko.com>

global: Make <asm/global_data.h> include <asm/u-boot.h>

This follows the example of RISC-V where <asm/global_data.h> includes
<asm/u-boot.h> directly as "gd" includes a reference to bd_info already
and so the first must include the second anyhow. We then remove
<asm/u-boot.h> from all of the places which include references to "gd"
an so have <asm/global_data.h> already.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 371d0b55 30-Apr-2024 Tom Rini <trini@konsulko.com>

arm: imx: Remove <common.h> and add needed includes

Remove <common.h> from all mach-imx, CPU specific sub-directories and
include/asm/arch-mx* files and when needed add missing include files
directly.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 6bb74584 21-Mar-2024 Mathieu Othacehe <othacehe@gnu.org>

imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# ab12179b 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Check header before calling spl_load_imx_container

Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# d401e0b2 14-Oct-2023 Sean Anderson <seanga2@gmail.com>

arm: imx: Add function to validate i.MX8 containers

Add a function to abstract the common task of validating i.MX8 container
image headers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 31e5ec23 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_api: support program secure fuse and return lifecycle

Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse
Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# ef5bdfc2 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: ele_ahab: use hextoul

Use hextoul which looks a bit simpler.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# d3ee9dbd 15-Jun-2023 Peng Fan <peng.fan@nxp.com>

imx: use generic name ele(EdgeLockSecure Enclave)

Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave
code including comment, folder and API name to ELE to align.

Signed-off-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 569dab88 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# fe787f27 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>


# 07816f08 30-Jan-2023 Ye Li <ye.li@nxp.com>

imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>