Skip to content
Commit a9f7be50 authored by litchipi's avatar litchipi Committed by Peng Fan
Browse files

mmc: rpmb: Fix driver routing memory alignment with tmp buffer



Fix mmc_rpmb_route_frames() implementation to comply with most MMC
drivers that expect some alignment of MMC data frames in memory.

When called from drivers/tee/optee/rpmb.c, the address passed is not
aligned properly. OP-TEE OS inserts a 6-byte header before a raw RPMB
frame which makes RPMB data buffer not 32bit aligned. To prevent breaking
ABI with OPTEE-OS RPC memrefs, allocate a temporary buffer to copy the
data into an aligned memory.

Many RPMB drivers implicitly expect 32bit alignment of the eMMC frame
including arm_pl180_mmci.c, sandbox_mmc.c and stm32_sdmmc2.c

Signed-off-by: default avatarTimothée Cercueil <timothee.cercueil@st.com>
Signed-off-by: default avatarTimothée Cercueil <litchi.pi@protonmail.com>
Reviewed-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
parent 15f7e0dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment