From: Andrew Fish <afish@apple.com>
To: Michael Zimmermann <sigmaepsilon92@gmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>,
Yonghong Zhu <yonghong.zhu@intel.com>,
Liming Gao <liming.gao@intel.com>,
Feng Tian <feng.tian@intel.com>, Star Zeng <star.zeng@intel.com>
Subject: Re: how to load drivers from additional FV's?
Date: Wed, 15 Mar 2017 08:12:13 -0700 [thread overview]
Message-ID: <0E70E103-15A9-4F36-97A6-6D2D387A7963@apple.com> (raw)
In-Reply-To: <CAN9vWDJO4cyK-tZF7DyB--42D23E6aQ15JhC3yNv83NSR-DiUw@mail.gmail.com>
> On Mar 15, 2017, at 5:23 AM, Michael Zimmermann <sigmaepsilon92@gmail.com> wrote:
>
> I'm trying to add another FV section FVMAIN_COMPACT so I can keep
> Platform specific drivers in a separate, included fdf.
>
> I did this:
> FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
> SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF
> PROCESSING_REQUIRED = TRUE {
> SECTION FV_IMAGE = FVMAIN
> SECTION FV_IMAGE = FVMAINPLATFORM
> }
> }
>
> The image builds file and using uefitool I can verify that the new FV
> is inside the compressed section.
> But none of the drivers gets discovered/loaded and I get 'Protocol not
> present!!' errors.
>
Michael,
This looks like an implementation restriction. Please file a bug.
CoreProcessFvImageFile() will only grab the 1st instance (hard coded to 0) of EFI_SECTION_FIRMWARE_VOLUME_IMAGE and your example has 2 sections.
Maybe the CoreProcessFvImageFile() should loop on instance. I assume the device path will be OK, but some one should check on that.
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c#L975
//
// Read the first (and only the first) firmware volume section
//
SectionType = EFI_SECTION_FIRMWARE_VOLUME_IMAGE;
FvHeader = NULL;
FvAlignment = 0;
Buffer = NULL;
BufferSize = 0;
AlignedBuffer = NULL;
Status = Fv->ReadSection (
Fv,
DriverName,
SectionType,
0,
&Buffer,
&BufferSize,
&AuthenticationStatus
);
Thanks,
Andrew Fish
> Thanks
> Michael
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2017-03-15 15:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 12:23 how to load drivers from additional FV's? Michael Zimmermann
2017-03-15 15:07 ` Laszlo Ersek
2017-03-15 15:13 ` Andrew Fish
2017-03-15 15:28 ` Michael Zimmermann
2017-03-15 15:44 ` Andrew Fish
2017-03-15 15:38 ` Laszlo Ersek
2017-03-15 15:54 ` Andrew Fish
2017-03-15 16:07 ` Michael Zimmermann
2017-03-16 2:29 ` Gao, Liming
2017-03-16 2:32 ` Andrew Fish
2017-03-16 11:20 ` Laszlo Ersek
2017-03-16 12:20 ` Michael Zimmermann
2017-03-16 12:27 ` Laszlo Ersek
2017-03-16 12:33 ` Michael Zimmermann
2017-03-16 14:33 ` Andrew Fish
2017-03-15 15:12 ` Andrew Fish [this message]
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-list 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=0E70E103-15A9-4F36-97A6-6D2D387A7963@apple.com \
--to=devel@edk2.groups.io \
/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