From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH] Generate CRC of structure of Global Data for standalone apps
Date: Sun, 04 Sep 2011 08:30:15 +0200 [thread overview]
Message-ID: <4E631AF7.70208@aribaud.net> (raw)
In-Reply-To: <4E62BD34.8060303@gmail.com>
Le 04/09/2011 01:50, Graeme Russ a ?crit :
> On 04/09/11 05:44, Wolfgang Denk wrote:
>> Dear Graeme Russ,
>>
>> In message<4E621E4E.8010703@gmail.com> you wrote:
>>>
>>> Back the original question that spawned this - asked several times and
>>> never answered - Does a modification to the Global Data structure trigger
>>> an increment of XF_VERSION?
>>
>> I don't think so. But I have to admit that I never thoroughly
>> verifyed this either. The standalone code itself is not suposed to
>> reference GD in any way; and the U-Boot routines that the standalone
>> call can call are runnign in the context of the current U-Boot, where
>> everything fits together. So unless somebody misuses something, it
>> should all work out well. At least, that's my theory.
>
> So perhaps this should be removed from exports.h:
>
> #if defined(CONFIG_X86)
> extern gd_t *global_data;
> #endif
>
> And document that standalone applications must not directly access the
> global data structure.
>
> The whole point of the patch was that it is critical that when a standalone
> application accesses global data, the version of the structure that it is
> accessing is exactly the same as the version being accessed by U-Boot.
> There are two ways of handling this:
>
> 1) Add an export function to access global data members by name (reporting
> an error if the member does not exist)
> 2) 'Sign' the structure of the global data (this patch)
Seems like the export function is what we should be aiming for, except
that IMO the list of these functions should match a list of functional
properties that U-Boot standalone applications need regardless to how
these properties are computed, not a list of members that happen to
exist in a structure at a given moment.
> Regards,
>
> Graeme
Amicalement,
--
Albert.
next prev parent reply other threads:[~2011-09-04 6:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-03 11:21 [U-Boot] [RFC][PATCH] Generate CRC of structure of Global Data for standalone apps Graeme Russ
2011-09-03 12:13 ` Wolfgang Denk
2011-09-03 12:32 ` Graeme Russ
2011-09-03 19:44 ` Wolfgang Denk
2011-09-03 23:50 ` Graeme Russ
2011-09-04 6:30 ` Albert ARIBAUD [this message]
2011-09-04 5:56 ` Graeme Russ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E631AF7.70208@aribaud.net \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox