Hi, Samer and Cinnamon,
After internal discussion on your usage model, we suggest to only return
FvFileDevicePath and not return Buffer and Size at new API, that's
+EFI_STATUS
+EFIAPI
+GetSectionFromAnyFvEx (
+ IN CONST EFI_GUID *NameGuid,
+ IN EFI_SECTION_TYPE SectionType,
+ IN UINTN SectionInstance,
- OUT VOID **Buffer,
- OUT UINTN *Size,
+ OUT EFI_DEVICE_PATH_PROTOCOL **FvFileDevicePath
+ );
Of course you can propose a new func name for this new API:)
Thanks
Feng
From: Tian, Feng
Sent: Monday, December 08, 2014 09:43
To: [email protected]
Cc: Tian, Feng
Subject: RE: [edk2] [PATHCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Samer and Cinnamon,
I am not sure if it's valuable for being a library service. Look like you can
put the constructing of the device patch outside the GetSectionFromAnyFvEx()
also.
Anyway I have known your usage model now. Let me raise it to internal for more
discussions.
PS: Why do other APIs in DxeSerivceLib have no such Ex() extensions?
Thanks
Feng
From: El-Haj-Mahmoud, Samer [mailto:[email protected]]
Sent: Saturday, December 06, 2014 03:25
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] [PATHCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Feng,
In addition to Secure Boot, there are other use cases where an application
would like to identify where it was loaded from (by examining the device path
of the image). Without this change, an application embedded in an FV does not
get its device path passed to it using the Image Load service.
From: Shia, Cinnamon
Sent: Wednesday, December 03, 2014 9:41 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] [PATHCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Hello Feng,
Thanks for your reply.
The problem is that if secure boot is enabled, the loadImage() needs device
paths to determine where the image is.
If a NULL device path is passed, it would be treated as an invalid image by
DxeImageVerificationHandler(), which is called in LoadImage().
Thanks,
Cinnamon Shia
From: Tian, Feng [mailto:[email protected]]
Sent: Tuesday, December 02, 2014 1:18 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] [PATCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Hi, Samer
If it's such usage case, why you don't use the below logic?
Status = GetSectionFromAnyFv (
&AppGuid,
EFI_SECTION_PE32,
0,
&AppImageBase,
&AppImageSize
);
Status = gBS->LoadImage (
TRUE,
gImageHandle,
NULL,
AppImageBase,
AppImageSize,
&ImageHandle
);
Status = gBS->StartImage (ImageHandle, NULL, NULL);
It doesn't need construct device path at all.
Thanks
Feng
From: El-Haj-Mahmoud, Samer [mailto:[email protected]]
Sent: Tuesday, December 02, 2014 03:22
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] [PATCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
One possible usage is to be able to load an application from a FV.
* Need to search for the EFI application in all FVs using
GetSectionFromAnyFvEx()
* Once found, the file is loaded from FV to memory (in Buffer and Size
outputs of GetSectionFromAnyFvEx()
* We then need to load and start the image using gBS->LoadImage() and
gBS->StartImage()
* Load image has a DevicePath input parameter of where the image is
loaded from
The original GetSectionFromAnyFv() did not return the device path and was not
suitable for this use case.
Thanks,
--Samer
From: Tian, Feng [mailto:[email protected]]
Sent: Tuesday, November 25, 2014 6:24 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] [PATCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Hi, Samer
As your proposed patch involves interface change, we need review it carefully
and the response may be slow.
Could you let me know at which case/usage model you need to get this FV file's
device path?
Thanks
Feng
From: El-Haj-Mahmoud, Samer [mailto:[email protected]]
Sent: Wednesday, November 26, 2014 06:28
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] [PATCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Resending with actual patch file
Thanks,
--Samer
From: El-Haj-Mahmoud, Samer
Sent: Tuesday, November 25, 2014 4:24 PM
To: [email protected]<mailto:[email protected]>
Subject: [PATCH] MdeModulePkg : Add a new DxeServicesLib
GetSectionFromAnyFvEx() function
Dear MdeModulePkg maintainers,
Please see attached patch
Add a new DxeServicesLib function GetSectionFromAnyFvEx() to search all
firmware volumes for
A specified FFS file, and return the first matching FFS section. The function
is identical to
GetSectionFromAnyFv(), but it also returns a pointer to the FV file device path.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud [email protected]<mailto:[email protected]>
Thanks,
Samer El-Haj-Mahmoud
System Firmware Architect
HP Servers
[email protected]<mailto:[email protected]>
T +1.281.514.5973
C +1.512.659.1523
Hewlett-Packard Company
hp.com/go/proliant/uefi<http://hp.com/go/proliant/uefi>
[Description: Description: C:\Users\elhajmah\HpLogo.png]
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel