Skip to contentSkip to conversation

ARM: imx: Fix parsing of ROM log event IDs on iMX8M

PATCH In review [email protected] 3 participants 7 messages Apr 14, 2022 – May 21, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: Fix parsing of ROM log event IDs on iMX8M

From: Fedor Ross <[email protected]>

It seems like the ROM log events for the iMX8M are not fully covered by AN12853 i.MX ROMs Log Events, Rev. 0, May 2020. On iMX8M the ROM event ID 0x82 seems to use parameter0 which stops the parsing because the end of list is detected too early.

This patch adds ROM event ID 0x82 and skips the next word if ID 0x82 is parsed.

Fixes a5ee05cf71 ("ARM: imx: Pick correct eMMC boot partition from ROM log")
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/mach-imx/imx8m/soc.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/soc.c +1 -0
index 8171631db1..4df57cb150 100644
@@ -677,6 +677,7 @@ int spl_mmc_emmc_boot_partition(struct mmc *mmc)
 		/* Log entries with 1 parameter, skip 1 */
 		case 0x80: /* Start to perform the device initialization */
 		case 0x81: /* The boot device initialization completes */
+		case 0x82: /* Starts to execute boot device driver pre-config */
 		case 0x8f: /* The boot device initialization fails */
 		case 0x90: /* Start to read data from boot device */
 		case 0x91: /* Reading data from boot device completes */
Signature · 1 line
2.20.1
author
#1 lore raw

Hello Peng,

can you please check the parameter of event 0x82 internally? The AN12853 doesn't mention a parameter for ID 0x82, but we see something else coming out of the bootrom of iMX8MN.

Best regards,
Fedor

Am Do., 14. Apr. 2022 um 18:37 Uhr schrieb <[email protected]>:

Quoted 8 lines

From: Fedor Ross <[email protected]>

It seems like the ROM log events for the iMX8M are not fully covered by AN12853 i.MX ROMs Log Events, Rev. 0, May 2020. On iMX8M the ROM event ID 0x82 seems to use parameter0 which stops the parsing because the end of list is detected too early.

Quoted 5 lines

This patch adds ROM event ID 0x82 and skips the next word if ID 0x82 is parsed.

Fixes a5ee05cf71 ("ARM: imx: Pick correct eMMC boot partition from ROM

log")

Quoted 15 lines
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/mach-imx/imx8m/soc.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/soc.c +0 -0
index 8171631db1..4df57cb150 100644

arch/arm/mach-imx/imx8m/soc.c int spl_mmc_emmc_boot_partition(struct mmc *mmc) · line 678

Quoted 2 lines
arch/arm/mach-imx/imx8m/soc.c +0 -0
@@ -677,6 +677,7 @@ int spl_mmc_emmc_boot_partition(struct mmc *mmc)
                /* Log entries with 1 parameter, skip 1 */
                case 0x80: /* Start to perform the device initialization

*/

arch/arm/mach-imx/imx8m/soc.c int spl_mmc_emmc_boot_partition(struct mmc *mmc) · line 680

Quoted 2 lines
arch/arm/mach-imx/imx8m/soc.c +1 -0
                case 0x81: /* The boot device initialization completes */
+               case 0x82: /* Starts to execute boot device driver

pre-config */

Quoted 6 lines
arch/arm/mach-imx/imx8m/soc.c +0 -1
                case 0x8f: /* The boot device initialization fails */
                case 0x90: /* Start to read data from boot device */
                case 0x91: /* Reading data from boot device completes */
--

2.20.1

author
#2 lore raw

Hello Peng,

just a gentle ping -- did you already had a chance to check the mentioned parameter of event 0x82?

Thanks in advance.

Best regards,
Fedor

Quoted 9 lines · Fedor Ross

Hello Peng,

can you please check the parameter of event 0x82 internally? The AN12853 doesn't mention a parameter for ID 0x82, but we see something else coming out of the bootrom of iMX8MN.

Best regards,
Fedor

author
#3 lore raw

Hello Stefano,

do you know why this is in the state 'Superseded' ?

Thanks in advance.

Best regards,
Fedor

Quoted 21 lines · Fedor Ross

Hello Peng,

just a gentle ping -- did you already had a chance to check the mentioned parameter of event 0x82?

Thanks in advance.

Best regards,
Fedor

Quoted 9 lines · Fedor Ross

Hello Peng,

can you please check the parameter of event 0x82 internally? The AN12853 doesn't mention a parameter for ID 0x82, but we see something else coming out of the bootrom of iMX8MN.

Best regards,
Fedor

#4 lore raw
In reply to Fedor Ross

Hi,

Marek pointed me this thread. I admitted I overlooked this patch. Will check internally and back.

Regards,
Peng.

Quoted 51 lines · Fedor Ross

Hello Peng,

can you please check the parameter of event 0x82 internally? The AN12853 doesn't mention a parameter for ID 0x82, but we see something else coming out of the bootrom of iMX8MN.

Best regards,
Fedor

Am Do., 14. Apr. 2022 um 18:37 Uhr schrieb <[email protected]>:

Quoted 8 lines

From: Fedor Ross <[email protected]>

It seems like the ROM log events for the iMX8M are not fully covered by AN12853 i.MX ROMs Log Events, Rev. 0, May 2020. On iMX8M the ROM event ID 0x82 seems to use parameter0 which stops the parsing because the end of list is detected too early.

Quoted 5 lines

This patch adds ROM event ID 0x82 and skips the next word if ID 0x82 is parsed.

Fixes a5ee05cf71 ("ARM: imx: Pick correct eMMC boot partition from ROM

log")

Quoted 15 lines
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
  arch/arm/mach-imx/imx8m/soc.c | 1 +
  1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/soc.c +0 -0
index 8171631db1..4df57cb150 100644

arch/arm/mach-imx/imx8m/soc.c int spl_mmc_emmc_boot_partition(struct mmc *mmc) · line 678

Quoted 2 lines
arch/arm/mach-imx/imx8m/soc.c +0 -0
@@ -677,6 +677,7 @@ int spl_mmc_emmc_boot_partition(struct mmc *mmc)
                 /* Log entries with 1 parameter, skip 1 */
                 case 0x80: /* Start to perform the device initialization

*/

arch/arm/mach-imx/imx8m/soc.c int spl_mmc_emmc_boot_partition(struct mmc *mmc) · line 680

Quoted 2 lines
arch/arm/mach-imx/imx8m/soc.c +1 -0
                 case 0x81: /* The boot device initialization completes */
+               case 0x82: /* Starts to execute boot device driver

pre-config */

Quoted 6 lines
arch/arm/mach-imx/imx8m/soc.c +0 -1
                 case 0x8f: /* The boot device initialization fails */
                 case 0x90: /* Start to read data from boot device */
                 case 0x91: /* Reading data from boot device completes */
--

2.20.1

Reviewed-by on v1 1/1
#5 lore raw
In reply to [email protected]
Quoted 10 lines · On 4/15/2022 12:36 AM, [email protected] wrote:

From: Fedor Ross <[email protected]>

It seems like the ROM log events for the iMX8M are not fully covered by AN12853 i.MX ROMs Log Events, Rev. 0, May 2020. On iMX8M the ROM event ID 0x82 seems to use parameter0 which stops the parsing because the end of list is detected too early.

This patch adds ROM event ID 0x82 and skips the next word if ID 0x82 is parsed.

Quoted 7 lines
Fixes a5ee05cf71 ("ARM: imx: Pick correct eMMC boot partition from ROM log")
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Quoted 16 lines
---
  arch/arm/mach-imx/imx8m/soc.c | 1 +
  1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/soc.c +1 -0
index 8171631db1..4df57cb150 100644
@@ -677,6 +677,7 @@ int spl_mmc_emmc_boot_partition(struct mmc *mmc)
  		/* Log entries with 1 parameter, skip 1 */
  		case 0x80: /* Start to perform the device initialization */
  		case 0x81: /* The boot device initialization completes */
+		case 0x82: /* Starts to execute boot device driver pre-config */
  		case 0x8f: /* The boot device initialization fails */
  		case 0x90: /* Start to read data from boot device */
  		case 0x91: /* Reading data from boot device completes */
#6 lore raw

PATCH 1/1 ARM: imx: Fix parsing of ROM log event IDs on iMX8M

In reply to [email protected]
Quoted 7 lines

From: Fedor Ross <[email protected]>
It seems like the ROM log events for the iMX8M are not fully covered by AN12853 i.MX ROMs Log Events, Rev. 0, May 2020. On iMX8M the ROM event ID 0x82 seems to use parameter0 which stops the parsing because the end of list is detected too early.
This patch adds ROM event ID 0x82 and skips the next word if ID 0x82 is parsed.

Quoted 7 lines
Fixes a5ee05cf71 ("ARM: imx: Pick correct eMMC boot partition from ROM log")
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================