public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER
@ 2021-07-14 20:34 Arti Gupta
  2021-07-15  4:14 ` [edk2-devel] " Andrew Fish
  0 siblings, 1 reply; 3+ messages in thread
From: Arti Gupta @ 2021-07-14 20:34 UTC (permalink / raw)
  To: devel@edk2.groups.io

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

Hello,


I am seeing that the BaseCryptLib in ARM is declared as a DXE_DRIVER instead of a DXE_RUNTIME_DRIVER, however it has a RuntimeMemAllocation.c which registers for the virtualaddresschange event so that tells me that the lib is expected to live in runtime. Is this bug known? What are the next steps for getting this fixed?



Thanks,
Arti

[-- Attachment #2: Type: text/html, Size: 2105 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER
  2021-07-14 20:34 BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER Arti Gupta
@ 2021-07-15  4:14 ` Andrew Fish
  2021-07-17  4:21   ` [EXTERNAL] " Arti Gupta
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Fish @ 2021-07-15  4:14 UTC (permalink / raw)
  To: edk2-devel-groups-io, arti.gupta

[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]

Arti,

Can you be a little more specific? Which INF file? How is it used? Sorry I don’t know a lot about this library. 

The different INF files pull in different allocation strategies for the common library code. 

https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
SysCall/RuntimeMemAllocation.c
https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
 SysCall/BaseMemAllocation.c

The most important line in the INF is:

LIBRARY_CLASS                  = BaseCryptLib|DXE_RUNTIME_DRIVER

or

LIBRARY_CLASS                  = BaseCryptLib|DXE_DRIVER DXE_CORE UEFI_APPLICATION UEFI_DRIVER

The list after the | is what module types this library can be linked into. I don’t remember what issue a wrong MODULE_TYPE for a library would cause. I think the LIBRARY_CLASS list may override the MODULE_TYPE in terms of how this library gets consumed. 

Thanks,

Andrew Fish

> On Jul 14, 2021, at 1:34 PM, Arti Gupta via groups.io <arti.gupta=microsoft.com@groups.io> wrote:
> 
> Hello,
>
> I am seeing that the BaseCryptLib in ARM is declared as a DXE_DRIVER instead of a DXE_RUNTIME_DRIVER, however it has a RuntimeMemAllocation.c which registers for the virtualaddresschange event so that tells me that the lib is expected to live in runtime. Is this bug known? What are the next steps for getting this fixed?
>
> Thanks,
> Arti
> 


[-- Attachment #2: Type: text/html, Size: 7536 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EXTERNAL] Re: [edk2-devel] BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER
  2021-07-15  4:14 ` [edk2-devel] " Andrew Fish
@ 2021-07-17  4:21   ` Arti Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Arti Gupta @ 2021-07-17  4:21 UTC (permalink / raw)
  To: Andrew Fish, edk2-devel-groups-io

[-- Attachment #1: Type: text/plain, Size: 3154 bytes --]

Thank you Andrew, you are right. I missed the fact that there are 2 INFs in there.

From: Andrew Fish <afish@apple.com>
Sent: Wednesday, July 14, 2021 9:14 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Arti Gupta <arti.gupta@microsoft.com>
Subject: [EXTERNAL] Re: [edk2-devel] BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER

Arti,

Can you be a little more specific? Which INF file? How is it used? Sorry I don't know a lot about this library.

The different INF files pull in different allocation strategies for the common library code.

https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FCryptoPkg%2FLibrary%2FBaseCryptLib%2FRuntimeCryptLib.inf&data=04%7C01%7Carti.gupta%40microsoft.com%7C9a0bceb1743449d13bdf08d947470322%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637619193528251436%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=l8ZQyxKzbJtGrcdwBpr9ayjex0NZ0k%2FoYW6QxHsClPI%3D&reserved=0>
SysCall/RuntimeMemAllocation.c
https://github.com/tianocore/edk2/blob/master/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FCryptoPkg%2FLibrary%2FBaseCryptLib%2FBaseCryptLib.inf&data=04%7C01%7Carti.gupta%40microsoft.com%7C9a0bceb1743449d13bdf08d947470322%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637619193528251436%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=%2FLD37K8PZCqCDzNWL53WQPwx5PYMZYIvtCA0lT88RsM%3D&reserved=0>
SysCall/BaseMemAllocation.c

The most important line in the INF is:

LIBRARY_CLASS                  = BaseCryptLib|DXE_RUNTIME_DRIVER

or

LIBRARY_CLASS                  = BaseCryptLib|DXE_DRIVER DXE_CORE UEFI_APPLICATION UEFI_DRIVER

The list after the | is what module types this library can be linked into. I don't remember what issue a wrong MODULE_TYPE for a library would cause. I think the LIBRARY_CLASS list may override the MODULE_TYPE in terms of how this library gets consumed.

Thanks,

Andrew Fish


On Jul 14, 2021, at 1:34 PM, Arti Gupta via groups.io<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.io%2F&data=04%7C01%7Carti.gupta%40microsoft.com%7C9a0bceb1743449d13bdf08d947470322%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637619193528261394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=H%2BE00BTI2lFvJjRtlz2pendG2ZHh4pO8zMvVffUT1Vg%3D&reserved=0> <arti.gupta=microsoft.com@groups.io<mailto:arti.gupta=microsoft.com@groups.io>> wrote:

Hello,

I am seeing that the BaseCryptLib in ARM is declared as a DXE_DRIVER instead of a DXE_RUNTIME_DRIVER, however it has a RuntimeMemAllocation.c which registers for the virtualaddresschange event so that tells me that the lib is expected to live in runtime. Is this bug known? What are the next steps for getting this fixed?

Thanks,
Arti



[-- Attachment #2: Type: text/html, Size: 9784 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-17  4:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-14 20:34 BaseCryptLib in ARM incorrectly marked as a DXE_DRIVER Arti Gupta
2021-07-15  4:14 ` [edk2-devel] " Andrew Fish
2021-07-17  4:21   ` [EXTERNAL] " Arti Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox