On Feb 13, 2013, at 11:57 PM, David Woodhouse <[email protected]> wrote:
> On Wed, 2013-02-13 at 16:59 -0800, Andrew Fish wrote: >> I think the best solution may be to to have a PCD feature flag to >> control this feature. If you are constructing code in the edk2 you >> mostly want it to be generic and we can default to turning it on. If >> you are construction code with looser rules you can turn it off. > > I'm dubious about that idea. It is *often* the case that code one > expects *not* to have to port, *does* end up being used in situations > which weren't originally anticipated. Deliberately being lax about one's > own code is one thing, but for us to implement a generic way to *enable* > engineers to be deliberately lax about their code is another. That does > not sound like a recipe for future happiness. > > It's not as if writing portable code which obeys the alignment > constraints of the C language is particularly difficult, surely? > This issue is not an ANSI C memory model conformance issue. It is an artifact of the set of C ABIs that UEFI supports. For example the default alignment for UINT64 on gcc is 32-bit, while in UEFI /Visual Studio it is 64-bit. > Of course, in this particular case it probably serves us right for using > this UTF-16 abomination instead of UTF-8... but that's a different > story :) We outsourced that choice a long time ago to experts. You can guess which camp they were in.... Thanks, Andrew ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
