[RFC] request_sdram_region: print error message

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 17 05:12:12 PDT 2019

On Thu, Jun 13, 2019 at 03:58:48PM +0300, Antony Pavlov wrote:
> I have found that MIPS memory misconfiguration leads to
> request_sdram_region() errors. But mem_malloc_resource()
> has no error checks for request_sdram_region() result.
> MIPS memory mapping needs additional changes this commit
> is just RFC on request_sdram_region().
> Can we embed error message into request_sdram_region()?

In create_vector_table() failure of request_sdram_region() is expected
and not an error, so putting an error message into
request_sdram_region() is not a good idea. What we could do though
is to print an error message based on a "verbose" input flag.

> The commid introduce necessary chages but I have no idea
> how to change this part of arch/arm/cpu/mmu.c:
>     if (!request_sdram_region("ttb", (unsigned long)ttb, SZ_16K))
>         /*
>          * This can mean that:
>          * - the early MMU code has put the ttb into a place
>          *   which we don't have inside our available memory
>          * - Somebody else has occupied the ttb region which means
>          *   the ttb will get corrupted.
>          */
>         pr_crit("Critical Error: Can't request SDRAM region for ttb at %p\n",
>                 ttb);

I think the message should stay like it is.


Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

More information about the barebox mailing list