Hi Wolfram and Geert, On Tue, Jul 8, 2025 at 10:27 PM Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote: > > > > Removing this breaks the direct-mapped FLASH ROM, which may affect > > userspace, and prevents using XIP (but I understand no one cares about > > the latter anymore). > > What is the gain of using rpc-if vs. memory-mapped? Correct me if I'm wrong, but I believe the "SPI Multi I/O Bus Controller" on RZ/A1 is an on-chip device used to interface to the on-board SPI flash memories, like Spansion S25FK512S-16 on the Genmai board. Depending on the board design and the SoC variant there could be a single or two SPI memories in parallel and they may be used in QSPI mode as well. There is also HyperFlash support in some newer SoCs. This device may by the way often be used to boot the SoC using some Mask ROM code. The on-chip hardware device (driven by rpc-if under Linux) lets the device driver programmer access the external memory either by setting up SPI master transfers to read or write the memory, or setting up the so-called memory mapped mode. In the memory mapped mode the SPI master may be programmed with information such as which flash command sequence that should be performed for read accesses. The memory mapped mode also has a single physical memory window that automatically translates read accesses by the CPU to statically initialized SPI master read requests. What Geert refers to as direct-mapped FLASH ROM is probably Linux performing read-only access to the memory window that is part of the "SPI Multi I/O Bus Controller". The configuration has either been set up by the Mask ROM (which happens in case the device boots from the serial flash) or perhaps the boot loader. While the memory mapped read-only mode is kind of cool, for my use case the rpc-if driver (either in the kernel or in U-Boot) is used to access the flash in various ways. Using MTD under Linux seems like a pretty good standard way of for instance programming the flash memory. Also the memory-mapped region is fed into the rpc-if device driver as part of the device resources but I don't know exactly how it is being utilized. And exactly how the "mtd-rom" device node works with XIP is beyond me, but I would be happy to learn if someone could explain. Cheers Magnus