This document describes how to apply a patch to the RZ/T2H and RZ/N2H Linux environment to 
reduce the likelihood of the "DDR memory controller issue" reported in the Renesas 
Technical Update.

Technical Update URL:
https://www.renesas.com/ja/document/tcu/ddr-memory-controller-issue?language=en&r=25567515

The part names of the RZ/T2H and RZ/N2H are as follows.

Product | Part Number         | Package       | Cortex-A55  | Cortex-R52 | Security
--------+---------------------+---------------+-------------+------------+---------------
RZ/T2H  | R9A09G077M48GBG#AC0 | 729-pin FCBGA | Quad cores  | Two CPUs   | Available
        | R9A09G077M48GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G077M28GBG#AC0 | 729-pin FCBGA | Dual cores  | Two CPUs   | Available
        | R9A09G077M28GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G077M08GBG#AC0 | 729-pin FCBGA | Single core | Two CPUs   | Available
        | R9A09G077M08GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G077M44GBG#AC0 | 729-pin FCBGA | Quad cores  | Two CPUs   | Not Available
        | R9A09G077M44GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G077M24GBG#AC0 | 729-pin FCBGA | Dual cores  | Two CPUs   | Not Available
        | R9A09G077M24GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G077M04GBG#AC0 | 729-pin FCBGA | Single core | Two CPUs   | Not Available
        | R9A09G077M04GBG#BC0 |               |             |            |
--------+---------------------+---------------+-------------+------------+---------------
RZ/N2H  | R9A09G087M48GBG#AC0 | 576-pin FCBGA | Quad cores  | Two CPUs   | Available
        | R9A09G087M48GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G087M28GBG#AC0 | 576-pin FCBGA | Dual cores  | Two CPUs   | Available
        | R9A09G087M28GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G087M08GBG#AC0 | 576-pin FCBGA | Single core | Two CPUs   | Available
        | R9A09G087M08GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G087M44GBG#AC0 | 576-pin FCBGA | Quad cores  | Two CPUs   | Not Available
        | R9A09G087M44GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G087M24GBG#AC0 | 576-pin FCBGA | Dual cores  | Two CPUs   | Not Available
        | R9A09G087M24GBG#BC0 |               |             |            |
        +---------------------+---------------+-------------+------------+---------------
        | R9A09G087M04GBG#AC0 | 576-pin FCBGA | Single core | Two CPUs   | Not Available
        | R9A09G087M04GBG#BC0 |               |             |            |
--------+---------------------+---------------+-------------+------------+---------------


2025/06/13 How to apply the patch

1) Follow the build instructions in the Linux Startup Guide to build the BSP

~~
Instructions in the Linux Getting Started Guide
~~
$ MACHINE=rzt2h-dev bitbake core-image-minimal (BSP build execution 1~2 hours)
Note) please use "MACHINE=rzn2h-dev", if you are building for RZ/N2H.

2) Patch the Kernel source, force compile the Kernel, and rebuild the BSP

$ MACHINE=rzt2h-dev bitbake linux-renesas -c devshell
$ patch -p1 < /PATH/TO/0002-Mitigation-for-DDR-MEMC-Controller.patch
$ MACHINE=rzt2h-dev bitbake linux-renesas -C compile
$ MACHINE=rzt2h-dev bitbake core-image-minimal


Supplementary information
- Please apply either of the following mitigation software for FSP and Linux.
    for FSP   : r01an7850ej0100-rzt2h-rzn2h-Mitigation-for-DDR-MEMC-Controller.pdf
                 (DDR_MemoryController_issue_FSP_Mitigation.zip)
    for Linux : 0002-Mitigation-for-DDR-MEMC-Controller.patch
                 (DDR_MemoryController_issue_Linux_Mitigation.zip)
- No need to apply this software to the revised product.
