Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
TARGET=cm5for the Raspberry Pi Compute Module 5 (BCM2712, Cortex-A76) with the same feature set as the CM4 port: signed RAM boot, eMMC A/B disk boot, Linux FIT boot, RAUC A/B and FIPS 140-3.What it adds
hal/cm5.c,hal/cm5.h,hal/cm5.ld,hal/cm5.its- HAL (debug PL011, 40-bit identity MMU, watchdog, optional RAM log ring), linker script and FIT sourceconfig/examples/cm5.config,cm5_emmc.config,cm5_emmc_linux.config,cm5_emmc_rauc.configtest-app/app_cm5.c,tools/unit-tests/unit-cm5-sdhci.c, six CI build jobs, a CM5 section indocs/Targets.mdTouches shared code
hal/rpi_common.c,hal/rpi_common.h- the SoC-independent Raspberry Pi code moved out ofhal/cm4.cunchanged (firmware DTB capture and bootargs, RAUC slot arbiter, FIPS heap and RNG200 seed, SDHCI glue, timer). The CM4 keeps itsCM4_*option names, mapped inhal/cm4.h.src/boot_aarch64_start.S- the CM4 startup path also servesTARGET_cm5;cm4_fw_dtbis nowrpi_fw_dtb.src/sdhci.c- two opt-in options, both off for existing targets.SDHCI_TC_OVER_DATA_TIMEOUTtreats Transfer Complete with Data Timeout Error as a completed transfer, as the SDHCI specification defines, and waits for DAT0 before the next command.SDHCI_WRITE_SINGLE_BLOCKissues one CMD24 per block. The BCM2712 controller raises Data Timeout Error at the write CRC status with polled PIO, which stops a multi-block write. Covered byunit-sdhci-write-tc-timeout.Testing
Validated on a CM5 (4 GB, eMMC) on the CM5 IO board: signed RAM boot and refusal of a corrupted image, eMMC A/B version selection, rollback refusal and failover, Linux 6.18 FIT boot, RAUC slot order, try-counter writeback and failover, and a sealed FIPS 140-3 boot. The console was read from the RAM log ring (
CM5_LOG_RING); output on the physical debug UART has not been checked yet.CM4 regression on hardware with
cm4_emmc_rauc.config: verified FIT boot into Linux through RAUC slot A.CM5 Lite (microSD) and SDMA transfers are not validated. Multi-block eMMC writes on the BCM2712 controller are not supported; the cause of the late CRC status is not understood.