qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/8] device_tree: Add qemu_devtree_setprop_si


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 1/8] device_tree: Add qemu_devtree_setprop_sized_cells() utility functions
Date: Mon, 15 Jul 2013 11:39:21 +0100

On 15 July 2013 11:24, Peter Crosthwaite <address@hidden> wrote:
> On Mon, Jul 15, 2013 at 7:44 PM, Peter Maydell <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]