2090985_ja-JP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2090985_ja-JP

2090985_ja-JP

CAAM RNG の有効化により iMx8MM でカーネル oops が発生する

こんにちは、NXPさん

当社ではカスタム ハードウェア上で linux-imx 6.6.36 を実行しています。カーネルは起動時に次のバグをスローします。
11.037497] caamアルゴリズムが/proc/cryptoに登録されました
[ 11.043580] caam 30900000.crypto:/proc/cryptoに登録されたcaam pkcアルゴリズム
[ 11.051276] caam 30900000.crypto:rng crypto API alg が登録された prng-caam
[ 11.058214] caam 30900000.crypto:rng-caamの登録
[ 11.063516] caam_jr 30902000.jr:ジョブリングエラー: irqstate: 00000103
[ 11.069865] ------------[ここでカット]------------
[ 11.074488] /ドライバ/crypto/caam/jr.c:286 にカーネルバグがあります。
[ 11.079803] 内部エラー: おっと - BUG: 00000000f2000800 [#1] PREEMPT SMP
[ 11.086593] リンクされているモジュール: caam_jr(+) caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic snd_soc_imx_card secvio caam error snd_soc_fsl_sai snd_soc_fsl_utils imx_pcm_dma imx_sdma leds_gpio overlay snd_usb_audio snd_hwdep snd_usbmidi_lib snd_ump

CAAM RNG を無効にすると ( CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API を設定解除することにより)、カーネルは正常に起動します。
オリジナルのimx8_v8_defconfigをそのまま使用しています。また、JR1のセキュリティ設定がIMX-ATFの設定と一致していることを確認するために、以下のアドレスを読み取っています。

0x30900018、値は0x00000001
私たちは imx scarthgap リリースを使用していますhttps://github.com/nxp-imx/imx-manifest/blob/imx-linux-scarthgap/imx-6.6.36-2.1.0.xml
また、imx ATF や imx8mm.dtsi ヘッダー内の crypto/CAAM 関連ノードには変更は加えられていません。
また、CAAM レジスタは独自のものであるため、どのレジスタをチェックすればよいのかさえわかりません。
何かアイデアはありますか?

 



Re: CAAM RNG activation causes a kernel oops on iMx8MM

ここでも、 i.MX8MMYocto scarthgapリリースを使用すると同じ問題が発生し、問題なくCAAM機能を完全にアクティブ化する必要があります。

何か手がかりは?


Starting kernel ...
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.52-lts-next-g4fb516caac5f-dirty (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.42.0.20240723) #1 SMP PREEMPT Fri Nov 14 12:43:43 UTC 2025
...
[ 7.977664] caam algorithms registered in /proc/crypto
[ 7.986745] caam 30900000.crypto: caam pkc algorithms registered in /proc/crypto
[ 8.008003] caam 30900000.crypto: rng crypto API alg registered prng-caam
[ OK ] Stopped 8.015193] caam 30900000.crypto: registering rng-caam
;39mVirtual Console Setup.
[ 8.023446] caam_jr 30902000.jr: job ring error: irqstate: 00000103
[ 8.032264] ------------[ cut here ]------------
[ 8.036884] kernel BUG at /drivers/crypto/caam/jr.c:286!
[ 8.042199] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[ 8.048990] Modules linked in: caam_jr(+) caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic at24 caam secvio error fuse
[ 8.065294] CPU: 0 PID: 211 Comm: systemd-random- Not tainted 6.6.52-lts-next-g4fb516caac5f-dirty #1

Re: CAAM RNG activation causes a kernel oops on iMx8MM

こんにちは@Bio_TICFSL

それは致命的なエラーではないことはわかっています。ただし、NXP が提供するマニフェストを使用しているため、CAAM 機能は問題なく完全にアクティブ化されると予想されます。CAAM の TRNG を使用したいと考えています。
何が問題なのでしょうか?


Re: CAAM RNG activation causes a kernel oops on iMx8MM

こんにちは、

Linuxにおけるカーネルoopsは、カーネルが無効なメモリアクセスなどの内部エラーを検出したときに発生します。これは致命的ではないエラーですが、対処しないとシステムが不安定になり、カーネルパニックを引き起こす可能性があります。 

 

よろしくお願いします。

Re: CAAM RNG activation causes a kernel oops on iMx8MM

この問題の解決策は、 u-bootドキュメントファイルmx8m_secure_boot.txtに記載されています。

1.4.1 Avoiding Kernel crash in closed devices
----------------------------------------------

For devices prior to HAB v4.4.0, the HAB code locks the Job Ring and DECO
master ID registers in closed configuration. In case the user specific
application requires any changes in CAAM MID registers it's necessary to
add the "Unlock CAAM MID" command in CSF file.

The current NXP BSP implementation expects the CAAM registers to be unlocked
when configuring CAAM to operate in non-secure TrustZone world.

The Unlock command is already included by default in the signed HDMI and
DisplayPort firmwares. On i.MX8MM, i.MX8MN and i.MX8MP devices or in case the
HDMI or DisplayPort controllers are disabled in i.MX8M, users must ensure this
command is included in SPL CSF.

- Add Unlock MID command in csf_spl.txt:

  [Unlock]
      Engine = CAAM
      Features = MID

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎12-08-2025 12:44 AM
更新者: