On Wed, 2 Jan 2019 at 15:23, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote:
>
> On Wed, 2 Jan 2019 at 14:23, Gao, Liming <liming....@intel.com> wrote:
> >
> > Ard:
> >   Why need to change module type? The non-base type library can support 
> > more than one module types, such as 
> > MdeModulePkg\Library\PeiDxeDebugLibReportStatusCode\PeiDxeDebugLibReportStatusCode.inf.
> >  Only if this library has constructor and needs to support cross module 
> > type, it must be set to BASE. For other case, its module type can be kept 
> > as-is. I clarify this rule in 
> > https://lists.01.org/pipermail/edk2-devel/2018-December/033523.html.
> >
>
> Currently, standalone MM on AArch64 requires strict alignment, and we
> only build SEC, PEI_CORE, PEIM and BASE modules with strict alignment.
>
> In general, I think it makes sense to default to BASE type for all
> libraries unless there is a need to using something else, i.e, when
> the library has a constructor that needs to ImageHandle and/or
> SystemTable arguments.

Actually, regardless of whether BASE is more appropriate in general, I
think there is no reason to keep the strict alignment checking in
standalone MM, since the MM core will be invoked with MMU and caches
enabled, and so there is no reason to disallow unaligned accesses
(this is different from SEC and PEI modules on ARM, since they may
execute in place with the caches and MMU off, in which case unaligned
accesses are never permitted)

I will raise this internally. In the mean time, please disregard this
aspect of my feedback. Simply adding MM_STANDALONE to the list of
permitted module types should be sufficient.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to