public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* minor regression in U-Boot 2022.04
@ 2022-04-11 22:44 Daniel Golle
  2022-04-12  1:40 ` 回复: " Weijie Gao (高惟杰)
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Golle @ 2022-04-11 22:44 UTC (permalink / raw)
  To: u-boot, Weijie Gao

Hi!

I'm about to bump the U-Boot build for MediaTek MT7622 boards in
OpenWrt to U-Boot 2022.04. While practially everything seems to work
fine, I've noticed an error message early in the serial output which
was not present in U-Boot 2022.01. It is even followed by a bunch of
random characters which are different on every boot (hints to a
read-out-of-bounds on uninitialzed memory or the like):
serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19�CC�

At another boot:
serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19��H�H�UI��$&L�1.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)

This is probably related to recent changes in dm and pinctrl, as there
haven't been any changes to mtk_serial itself.

Log including ROM and ARM Trusted Firmware A serial output:

F0: 102B 0000
F6: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0400 0041 [0000]
G0: 1190 0000
T0: 0000 02AD [000F]
Jump to BL

NOTICE:  BL2: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 (mt7622-snand-2ddr)
NOTICE:  BL2: Built : 12:03:10, Apr 11 2022
NOTICE:  SPI-NAND: W25N01GV (128MB)
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 (mt7622-snand-2ddr)
NOTICE:  BL31: Built : 12:03:10, Apr 11 2022
serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19�CC�
U-Boot 2022.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)

CPU:   MediaTek MT7622
Model: mt7622-bpi-r64
DRAM:  1 GiB
Core:  55 devices, 18 uclasses, devicetree: separate
MMC:   mmc@11230000: 0, mmc@11240000: 1
Loading Environment from UBI... SPI-NAND: W25N01GV (128MB)
...


I will most likely not investigate this any further, but thought it
might be good to let you know.


Best regards


Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 回复: minor regression in U-Boot 2022.04
  2022-04-11 22:44 minor regression in U-Boot 2022.04 Daniel Golle
@ 2022-04-12  1:40 ` Weijie Gao (高惟杰)
  2022-06-28 22:43   ` Daniel Golle
  0 siblings, 1 reply; 4+ messages in thread
From: Weijie Gao (高惟杰) @ 2022-04-12  1:40 UTC (permalink / raw)
  To: Daniel Golle, u-boot@lists.denx.de; +Cc: GSS_MTK_Uboot_upstream

Hi Daniel,

I've also noticed this error message.
It seems that some struct variables containing all zero data of the pinctrl driver are not set to const, which causes these variables to be put into .bss section, instead of .rodata section.
As you know the .bss section does not exist in board_init_f stage, and its place is overlapped by dtb used by u-boot. This will result in incorrect data used by the pinctrl driver.

I'll try to fix it later.

Best Regards

Weijie

-----邮件原件-----
发件人: Daniel Golle <daniel@makrotopia.org> 
发送时间: 2022年4月12日 6:44
收件人: u-boot@lists.denx.de; Weijie Gao (高惟杰) <Weijie.Gao@mediatek.com>
主题: minor regression in U-Boot 2022.04

Hi!

I'm about to bump the U-Boot build for MediaTek MT7622 boards in OpenWrt to U-Boot 2022.04. While practially everything seems to work fine, I've noticed an error message early in the serial output which was not present in U-Boot 2022.01. It is even followed by a bunch of random characters which are different on every boot (hints to a read-out-of-bounds on uninitialzed memory or the like):
serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 CC 

At another boot:
serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19  H H UI  $&L 1.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)

This is probably related to recent changes in dm and pinctrl, as there haven't been any changes to mtk_serial itself.

Log including ROM and ARM Trusted Firmware A serial output:

F0: 102B 0000
F6: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0400 0041 [0000]
G0: 1190 0000
T0: 0000 02AD [000F]
Jump to BL

NOTICE:  BL2: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 (mt7622-snand-2ddr)
NOTICE:  BL2: Built : 12:03:10, Apr 11 2022
NOTICE:  SPI-NAND: W25N01GV (128MB)
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 (mt7622-snand-2ddr)
NOTICE:  BL31: Built : 12:03:10, Apr 11 2022 serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 CC  U-Boot 2022.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)

CPU:   MediaTek MT7622
Model: mt7622-bpi-r64
DRAM:  1 GiB
Core:  55 devices, 18 uclasses, devicetree: separate
MMC:   mmc@11230000: 0, mmc@11240000: 1
Loading Environment from UBI... SPI-NAND: W25N01GV (128MB) ...


I will most likely not investigate this any further, but thought it might be good to let you know.


Best regards


Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 回复: minor regression in U-Boot 2022.04
  2022-04-12  1:40 ` 回复: " Weijie Gao (高惟杰)
@ 2022-06-28 22:43   ` Daniel Golle
  2022-07-13  3:23     ` 回复: " Weijie Gao (高惟杰)
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Golle @ 2022-06-28 22:43 UTC (permalink / raw)
  To: Weijie Gao (高惟杰)
  Cc: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream

Hi Weijie,

On Tue, Apr 12, 2022 at 01:40:00AM +0000, Weijie Gao (高惟杰) wrote:
> Hi Daniel,
> 
> I've also noticed this error message.
> It seems that some struct variables containing all zero data of the pinctrl driver are not set to const, which causes these variables to be put into .bss section, instead of .rodata section.
> As you know the .bss section does not exist in board_init_f stage, and its place is overlapped by dtb used by u-boot. This will result in incorrect data used by the pinctrl driver.
> 
> I'll try to fix it later.

Any news about the gobbled serial output issue?
It would be nice to update uboot-mediatek in OpenWrt to v2022.04, so
MT798x patches will easily apply on top.

Cheers

Daniel


> 
> Best Regards
> 
> Weijie
> 
> -----邮件原件-----
> 发件人: Daniel Golle <daniel@makrotopia.org> 
> 发送时间: 2022年4月12日 6:44
> 收件人: u-boot@lists.denx.de; Weijie Gao (高惟杰) <Weijie.Gao@mediatek.com>
> 主题: minor regression in U-Boot 2022.04
> 
> Hi!
> 
> I'm about to bump the U-Boot build for MediaTek MT7622 boards in OpenWrt to U-Boot 2022.04. While practially everything seems to work fine, I've noticed an error message early in the serial output which was not present in U-Boot 2022.01. It is even followed by a bunch of random characters which are different on every boot (hints to a read-out-of-bounds on uninitialzed memory or the like):
> serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 CC 
> 
> At another boot:
> serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19  H H UI  $&L 1.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)
> 
> This is probably related to recent changes in dm and pinctrl, as there haven't been any changes to mtk_serial itself.
> 
> Log including ROM and ARM Trusted Firmware A serial output:
> 
> F0: 102B 0000
> F6: 0000 0000
> V0: 0000 0000 [0001]
> 00: 0000 0000
> BP: 0400 0041 [0000]
> G0: 1190 0000
> T0: 0000 02AD [000F]
> Jump to BL
> 
> NOTICE:  BL2: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 (mt7622-snand-2ddr)
> NOTICE:  BL2: Built : 12:03:10, Apr 11 2022
> NOTICE:  SPI-NAND: W25N01GV (128MB)
> NOTICE:  BL2: Booting BL31
> NOTICE:  BL31: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 (mt7622-snand-2ddr)
> NOTICE:  BL31: Built : 12:03:10, Apr 11 2022 serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 CC  U-Boot 2022.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)
> 
> CPU:   MediaTek MT7622
> Model: mt7622-bpi-r64
> DRAM:  1 GiB
> Core:  55 devices, 18 uclasses, devicetree: separate
> MMC:   mmc@11230000: 0, mmc@11240000: 1
> Loading Environment from UBI... SPI-NAND: W25N01GV (128MB) ...
> 
> 
> I will most likely not investigate this any further, but thought it might be good to let you know.
> 
> 
> Best regards
> 
> 
> Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 回复: 回复: minor regression in U-Boot 2022.04
  2022-06-28 22:43   ` Daniel Golle
@ 2022-07-13  3:23     ` Weijie Gao (高惟杰)
  0 siblings, 0 replies; 4+ messages in thread
From: Weijie Gao (高惟杰) @ 2022-07-13  3:23 UTC (permalink / raw)
  To: Daniel Golle; +Cc: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream

Hi Daniel,

It turns out that pinctrl uclass can't work properly in board_f stage. Removing pinctrl properties of uart0 node can solve this issue.
I've sent a patch: https://patchwork.ozlabs.org/project/uboot/patch/20220713031639.1452-1-weijie.gao@mediatek.com/

Best Regards,
Weijie

-----邮件原件-----
发件人: Daniel Golle <daniel@makrotopia.org> 
发送时间: 2022年6月29日 6:44
收件人: Weijie Gao (高惟杰) <Weijie.Gao@mediatek.com>
抄送: u-boot@lists.denx.de; GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>
主题: Re: 回复: minor regression in U-Boot 2022.04

Hi Weijie,

On Tue, Apr 12, 2022 at 01:40:00AM +0000, Weijie Gao (高惟杰) wrote:
> Hi Daniel,
> 
> I've also noticed this error message.
> It seems that some struct variables containing all zero data of the pinctrl driver are not set to const, which causes these variables to be put into .bss section, instead of .rodata section.
> As you know the .bss section does not exist in board_init_f stage, and its place is overlapped by dtb used by u-boot. This will result in incorrect data used by the pinctrl driver.
> 
> I'll try to fix it later.

Any news about the gobbled serial output issue?
It would be nice to update uboot-mediatek in OpenWrt to v2022.04, so MT798x patches will easily apply on top.

Cheers

Daniel


> 
> Best Regards
> 
> Weijie
> 
> -----邮件原件-----
> 发件人: Daniel Golle <daniel@makrotopia.org>
> 发送时间: 2022年4月12日 6:44
> 收件人: u-boot@lists.denx.de; Weijie Gao (高惟杰) <Weijie.Gao@mediatek.com>
> 主题: minor regression in U-Boot 2022.04
> 
> Hi!
> 
> I'm about to bump the U-Boot build for MediaTek MT7622 boards in OpenWrt to U-Boot 2022.04. While practially everything seems to work fine, I've noticed an error message early in the serial output which was not present in U-Boot 2022.01. It is even followed by a bunch of random characters which are different on every boot (hints to a read-out-of-bounds on uninitialzed memory or the like):
> serial_mtk serial@11002000: pinctrl_select_state_full: 
> uclass_get_device_by_phandle_id: err=-19 CC
> 
> At another boot:
> serial_mtk serial@11002000: pinctrl_select_state_full: 
> uclass_get_device_by_phandle_id: err=-19  H H UI  $&L 
> 1.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)
> 
> This is probably related to recent changes in dm and pinctrl, as there haven't been any changes to mtk_serial itself.
> 
> Log including ROM and ARM Trusted Firmware A serial output:
> 
> F0: 102B 0000
> F6: 0000 0000
> V0: 0000 0000 [0001]
> 00: 0000 0000
> BP: 0400 0041 [0000]
> G0: 1190 0000
> T0: 0000 02AD [000F]
> Jump to BL
> 
> NOTICE:  BL2: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 
> (mt7622-snand-2ddr)
> NOTICE:  BL2: Built : 12:03:10, Apr 11 2022
> NOTICE:  SPI-NAND: W25N01GV (128MB)
> NOTICE:  BL2: Booting BL31
> NOTICE:  BL31: v2.4(release):OpenWrt v2021-05-08-d2c75b21-2 
> (mt7622-snand-2ddr)
> NOTICE:  BL31: Built : 12:03:10, Apr 11 2022 serial_mtk 
> serial@11002000: pinctrl_select_state_full: 
> uclass_get_device_by_phandle_id: err=-19 CC  U-Boot 
> 2022.04-OpenWrt-r19423-c9c2b01b84 (Apr 11 2022 - 19:25:34 +0000)
> 
> CPU:   MediaTek MT7622
> Model: mt7622-bpi-r64
> DRAM:  1 GiB
> Core:  55 devices, 18 uclasses, devicetree: separate
> MMC:   mmc@11230000: 0, mmc@11240000: 1
> Loading Environment from UBI... SPI-NAND: W25N01GV (128MB) ...
> 
> 
> I will most likely not investigate this any further, but thought it might be good to let you know.
> 
> 
> Best regards
> 
> 
> Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-13  3:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-11 22:44 minor regression in U-Boot 2022.04 Daniel Golle
2022-04-12  1:40 ` 回复: " Weijie Gao (高惟杰)
2022-06-28 22:43   ` Daniel Golle
2022-07-13  3:23     ` 回复: " Weijie Gao (高惟杰)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox