On 03/15/17 13:23, Michael Zimmermann 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.

The FVs need to be exposed to the DXE core via FV HOBs. See
- 9.8.5 "Firmware Volume HOBs" in Volume 2 of the Platform Init 1.5
  spec,
- and more importantly, 5.7 "Firmware Volume HOB" in Volume 3 of the
  same.

You can use the BuildFvHob() function for this.

If the firmware volume contains PEIMs (... as well), then it has to be
exposed to the PEI core too, I think. I think the
PeiServicesInstallFvInfoPpi() function can be used for that. (See 3.3
"PEI" in Volume 3 of the PI spec.)

... I used the PeiFvInitialization() function in
OvmfPkg/PlatformPei/Fv.c as a "cheat sheet" for the above.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to