Amlogic S4 (S805X2) video decoder firmware for linux-firmware
Subsystems (2)
Dear Xianwei, dear Arden,
Before buying a Chromecast with Google TV HD (boreal, Amlogic S805X2/S4), I would like to sort out the firmware situation.
linux-firmware has meson/vdec/*.bin for GXBB up to SM1 under LICENSES/LICENSE.amlogic_vdec, extracted from Amlogic’s July 2019 release (linux-firmware commits e04cc56d and fb505a69, with Arden in Cc). There is nothing for S4.
In the media_modules sources Google published for boreal [1] (package v0.4.66, commit 1752357, built 2024-12-27), I found:
1. firmware/S805X2/video_ucode.bin and firmware/S805X2G/video_ucode.bin are NEWP packages: only the headers are in plaintext, and the microcode is encrypted and loaded through OP-TEE (TEE_SMC_LOAD_VIDEO_FW).
2. The headers record the CRC32 of the plaintext. Each of the 14 S4 entries has the CRC32 and size of an entry in the generic plaintext package firmware/video_ucode.bin:
- SM1 builds: h264_multi, mpeg12_multi, vc1, xvid_multi, avs_multi,h264_mvc
- G12A builds: hevc, h264_multi_mmu
- T5D builds: vp9_mmu, hevc_mmu, hevc_mmu_swap
- SC2 av1_mmu, T7 avs2_mmu, G12B mjpeg_multi
3. None of them is byte-identical to a file in linux-firmware, and the current package no longer contains the single-instance H.264 and MPEG-1/2 microcode that the mainline driver loads (g12a_h264.bin, gxl_mpeg12.bin).
The files carry no license, so I cannot submit them myself. My questions:
1. Does Amlogic agree to distributing the S4 video decoder firmware in linux-firmware under LICENSE.amlogic_vdec? Concretely, the plaintext builds S4 uses, as meson/vdec/s4_*.bin. Would you prefer to submit them yourself, or to ack a submission from me?
2. The mainline driver loads the microcode from the non-secure world, by pointing (HEVC_)IMEM_DMA_ADR at a coherent buffer. Does this work on S4, or does the DOS block only accept microcode loaded by BL32? If the latter, is the SMC interface documented, and does the BL32 on production S4 devices include the microcode?
3. Does g12a_h264.bin work on S4, or is there an S4 build of the single-instance H.264 microcode? Or should the mainline driver use h264_multi on newer SoCs?
Kind regards,
Paul
[1]: https://nest-open-source.googlesource.com/manifest_repos/media_modules
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Hi Paul,
A colleague of ours([email protected]) knows this part better.
Hi Zhentao,
Could you please take a look? Thanks!
Quoted 58 lines · Paul Menzel
Dear Xianwei, dear Arden,
Before buying a Chromecast with Google TV HD (boreal, Amlogic S805X2/S4), I would like to sort out the firmware situation.
linux-firmware has meson/vdec/*.bin for GXBB up to SM1 under
LICENSES/LICENSE.amlogic_vdec, extracted from Amlogic’s July 2019 release (linux-firmware commitse04cc56dandfb505a69, with Arden in Cc). There is nothing for S4.In the
media_modulessources Google published for boreal [1] (package v0.4.66, commit 1752357, built 2024-12-27), I found:1.
firmware/S805X2/video_ucode.binandfirmware/S805X2G/video_ucode.binare NEWP packages: only the headers are in plaintext, and the microcode is encrypted and loaded through OP-TEE (TEE_SMC_LOAD_VIDEO_FW).2. The headers record the CRC32 of the plaintext. Each of the 14 S4 entries has the CRC32 and size of an entry in the generic plaintext package
firmware/video_ucode.bin:- SM1 builds:
h264_multi,mpeg12_multi, vc1,xvid_multi,avs_multi,h264_mvc
- G12A builds: hevc,h264_multi_mmu
- T5D builds:vp9_mmu,hevc_mmu,hevc_mmu_swap
- SC2av1_mmu, T7avs2_mmu, G12Bmjpeg_multi3. None of them is byte-identical to a file in linux-firmware, and the current package no longer contains the single-instance H.264 and MPEG-1/2 microcode that the mainline driver loads (g12a_h264.bin, gxl_mpeg12.bin).
The files carry no license, so I cannot submit them myself. My questions:
1. Does Amlogic agree to distributing the S4 video decoder firmware in linux-firmware under LICENSE.amlogic_vdec? Concretely, the plaintext builds S4 uses, as meson/vdec/s4_*.bin. Would you prefer to submit them yourself, or to ack a submission from me?
2. The mainline driver loads the microcode from the non-secure world, by pointing (HEVC_)IMEM_DMA_ADR at a coherent buffer. Does this work on S4, or does the DOS block only accept microcode loaded by BL32? If the latter, is the SMC interface documented, and does the BL32 on production S4 devices include the microcode?
3. Does g12a_h264.bin work on S4, or is there an S4 build of the single-instance H.264 microcode? Or should the mainline driver use
h264_multion newer SoCs?Kind regards,
Paul
[1]: https://nest-open-source.googlesource.com/manifest_repos/media_modules
Dear Paul,
Quoted 47 lines
Hi Paul,
A colleague of ours([email protected]) knows this part better.Hi Zhentao,
Could you please take a look? Thanks!Quoted 40 lines · Paul Menzel
Dear Xianwei, dear Arden,
Before buying a Chromecast with Google TV HD (boreal, Amlogic S805X2/S4), I would like to sort out the firmware situation.
linux-firmware has meson/vdec/*.bin for GXBB up to SM1 under
LICENSES/LICENSE.amlogic_vdec, extracted from Amlogic’s July 2019 release (linux-firmware commitse04cc56dandfb505a69, with Arden in Cc). There is nothing for S4.In the
media_modulessources Google published for boreal [1] (package v0.4.66, commit 1752357, built 2024-12-27), I found:1.
firmware/S805X2/video_ucode.binandfirmware/S805X2G/video_ucode.binare NEWP packages: only the headers are in plaintext, and the microcode is encrypted and loaded through OP-TEE (TEE_SMC_LOAD_VIDEO_FW).2. The headers record the CRC32 of the plaintext. Each of the 14 S4 entries has the CRC32 and size of an entry in the generic plaintext package
firmware/video_ucode.bin:- SM1 builds:
h264_multi,mpeg12_multi, vc1,xvid_multi,avs_multi,h264_mvc
- G12A builds: hevc,h264_multi_mmu
- T5D builds:vp9_mmu,hevc_mmu,hevc_mmu_swap
- SC2av1_mmu, T7avs2_mmu, G12Bmjpeg_multi3. None of them is byte-identical to a file in linux-firmware, and the current package no longer contains the single-instance H.264 and MPEG-1/2 microcode that the mainline driver loads (g12a_h264.bin, gxl_mpeg12.bin).
The files carry no license, so I cannot submit them myself. My questions:
1. Does Amlogic agree to distributing the S4 video decoder firmware in linux-firmware under LICENSE.amlogic_vdec? Concretely, the plaintext builds S4 uses, as meson/vdec/s4_*.bin. Would you prefer to submit them yourself, or to ack a submission from me?
In fact, Amlogic is currently working on upstream decoder for the S4, including stateless decoder driver patchset: https://lore.kernel.org/linux-amlogic/[email protected]/ <https://lore.kernel.org/linux-amlogic/[email protected]/>, along with the matching firmware submission: https://lore.kernel.org/linux-amlogic/[email protected]/. The current firmware submission covers the S4 platform and the H.264 codec; we will extend it to more platforms and more codec formats in the future. And of course, we plan to make these submissions ourselves.
Quoted 6 lines
Quoted 6 lines
2. The mainline driver loads the microcode from the non-secure world, by pointing (HEVC_)IMEM_DMA_ADR at a coherent buffer. Does this work on S4, or does the DOS block only accept microcode loaded by BL32? If the latter, is the SMC interface documented, and does the BL32 on production S4 devices include the microcode?
Unlike the legacy chips that already supported in mainline (such as G12, SM1, etc.), the S4 and the newer chips can only accept firmware that is loaded into secure memory by BL32 and then read by the AMRISC hardware currently. The microcode on production devices is also loaded following this same procedure. The legacy chips can support the unsigned firmware loaded by CPU. The stateless decoder for the S4 will also support these legacy chips in the next year.
Quoted 4 lines
Quoted 4 lines
3. Does g12a_h264.bin work on S4, or is there an S4 build of the single-instance H.264 microcode? Or should the mainline driver use
h264_multion newer SoCs?
The g12a_h264.bin does not work on S4, and no more single-instance H264 microcode can run on S4 and the newer SOCs. All the new SOCs can only use the h264_multi firmware.
Quoted 8 lines
Quoted 8 lines
Kind regards,
Paul
[1]: https://nest-open-source.googlesource.com/manifest_repos/media_modules
Best regards,
Zhentao