On 08/29/14 10:14, Ard Biesheuvel wrote:
> On 29 August 2014 09:53, Ard Biesheuvel <[email protected]> wrote:
>> build.py...
>> /home/ard/build/uefi-next/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc(...):
>> error 1001: Module type [SEC] is not supported by library instance
>> [/home/ard/build/uefi-next/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf]
>> consumed by
>> [/home/ard/build/uefi-next/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf]
>>
>> which i am trying to bisect now.
>>
>
> OK, it turns out Olivier has submitted an incompatible change here:
>
> af16798ef77da84487ed8e64bc955fbd12ac9b1f
> [EmbeddedPkg/FdtLib: Added support to load Fdt from Semihosting]
>
> which adds functionality to FdtLib which makes it depend on the boot
> services table.
> I am going to go ahead and split that into two libraries, hopefully
> Olivier will be ok with that once he gets around to looking into this
> stuff
That's case (2) then.
And, indeed, it's *very* important to keep FdtLib a BASE library, with
no dependencies on any UEFI-phase-specifics. I recently had a short
email chat with David Gibson, where I said
Wow, David (CC'd :)) *actually* meant this code to be embedded in
firmware.
and he said
Yes, yes I did. [...]
I deliberately kept the dependencies in libfdt to an absolute
minimum to make it easy to use in limited environments. It uses a
small handful of string.h functions, and that's it. No malloc
required, no stdio required.
So that's how it should remain in edk2 as well. (At least, such a
compatible version should remain available.)
Hm, let's see af16798ef77da84487ed8e64bc955fbd12ac9b1f.
- New function InstallFdtIntoConfigurationTable() is not needed for
modules that only want to parse the DTB. For a SEC module eg., the UEFI
configuration table doesn't exist.
- New function InstallFdtFromSemihosting() is similarly unrelated to DTB
parsing. It's a way to retrieve the DTB, and just as use-case specific
as our own peculiar way in virt. Doesn't belong to the base library.
My proposal (trivial, of course):
- revert this commit
- simply introduce another library (new lib class even) in EmbeddedPkg
- add a lib instance implementing this class, with these new functions
- new lib instance should depend on (unmodified) FdtLib
- add new lib class dependency to originally dependent modules
Thanks!
Laszlo
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel