[PATCH 0/6] memory: fuse overlapping memory banks

Sascha Hauer sha at pengutronix.de
Tue Jun 1 23:38:27 PDT 2021


On Mon, May 31, 2021 at 09:12:33AM +0200, Ahmad Fatoum wrote:
> The request region code makes sense to ensure drivers don't try to claim
> (I/O) memory region claimed by another driver or by the memory
> allocator. It doesn't make as much sense for registering available
> memory banks, because there is often overlap:
> 
>  - device tree often defines the (minimally) available /memory across
>    variants
>  - subarchitectures like i.MX, STM32MP, OMAP or SAMA5 query the main
>    RAM size from controller registers
> 
> So far, overlap went mostly unnoticed, because the RAM controller
> drivers didn't check for errors. However, if barebox is already running
> from RAM outside that described by the device tree, there will be errors
> and /delete-node/ annotations that need to be added into device trees.
> 
> Upstream device tree can be extended later on with a /memory node, which
> in turn will break barebox. This series fixes all of that. Overlapping
> memory banks are combined into one. Errors are propagated everywhere.
> /delete-node/ memory at X shouldn't be needed for new boards.
> 
> Ahmad Fatoum (6):
>   common: memory: allocate all memory devices at once
>   memory: fuse overlapping memory banks
>   of: propagate errors inside barebox_register_{of,fdt} into initcalls
>   of: warn about of_add_memory_bank errors
>   ARM: <asm/memory.h>: propagate error codes from arm_add_mem_device()
>   ARM: report probe error at arm_add_mem_device() callsites on failure

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list