On 15 July 2013 11:24, Peter Crosthwaite <peter.crosthwa...@xilinx.com> wrote: > On Mon, Jul 15, 2013 at 7:44 PM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> It's trying to allow the arm/boot code to continue to distinguish >> the two error cases it does currently: >> * RAM start address doesn't fit [a board model error] >> * RAM size doesn't fit [a user error for which a specific >> error message is more friendly and helpful] >> >> It's a fatal error in both cases, but the text is different. >> >> I guess I could put a special purpose "if scells is 1 and >> ram_size > 4GB then fail early" check in boot.c...
> That was what I thinking with the above snippet. It goes with the > caller in this case arm/boot.c. You still need to switch on the return > code in the caller for your multiple error messages so I dont think > you save too much save over just sanity checking args beforehand in > boot.c Yeah, you've convinced me -- it's not worth complicating the heck out of the API for the generic function; I'll put an explicit check in boot.c -- PMM