Re: [PATCH] EDAC: altera: Add SDRAM ECC check for U-Boot

From: Borislav Petkov
Date: Wed Mar 16 2022 - 05:59:42 EST


On Sat, Mar 05, 2022 at 09:41:18AM +0800, niravkumar.l.rabara@xxxxxxxxx wrote:
> From: Rabara Niravkumar L <niravkumar.l.rabara@xxxxxxxxx>
>
> A bug in legacy U-Boot causes a crash during SDRAM boot if ECC
> is not enabled in the bitstream but enabled in the Linux config.
>
> Memory mapped read of the ECC Enabled bit was only enabled
> if U-Boot determined ECC was enabled in the bitstream.
>
> The Linux driver checks the ECC enable bit using a memory map
> read. In the ECC disabled bitstream case, U-Boot didn't
> enable ECC register memory map reads and since they are not
> allowed this results in a crash.
>
> This patch always reads the ECC Enable register through a

Avoid having "This patch" or "This commit" in the commit message. It is
tautologically useless.

Also, do

$ git grep 'This patch' Documentation/process

for more details.

I've removed it now but pls pay attention for the future.

> SMC call which is always allowed and it works with legacy
> and current U-Boot.
>
> Signed-off-by: Rabara Niravkumar L <niravkumar.l.rabara@xxxxxxxxx>
> ---
> drivers/edac/altera_edac.c | 40 +++++++++++++++++++++++++++++++++++++-
> 1 file changed, 39 insertions(+), 1 deletion(-)

Applied, thanks.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette