Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-19 Thread Zeng, Star
On 2018/10/19 13:28, Ard Biesheuvel wrote: On 19 October 2018 at 13:25, Zeng, Star wrote: Be honest, I am not clear about the history why EfiBootServicesData is required for ESRT. But OS indeed cares about ESRT table, for example, I guess the Firmware in Device Manager for Windows is built

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
On 19 October 2018 at 13:25, Zeng, Star wrote: > Be honest, I am not clear about the history why EfiBootServicesData is > required for ESRT. But OS indeed cares about ESRT table, for example, I guess > the Firmware in Device Manager for Windows is built based on ESRT table. In > fact, I think

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Zeng, Star
Be honest, I am not clear about the history why EfiBootServicesData is required for ESRT. But OS indeed cares about ESRT table, for example, I guess the Firmware in Device Manager for Windows is built based on ESRT table. In fact, I think OS loader can access either EfiBootServicesData or

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
On 19 October 2018 at 13:01, Ard Biesheuvel wrote: > On 19 October 2018 at 12:48, Zeng, Star wrote: >> Ok, thanks and got the case. >> >> DxeCapsuleLibVirtualAddressChangeEvent may be too late as it could not >> allocate pool to do caching. >> I meant registering gEfiSystemResourceTableGuid

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
On 19 October 2018 at 12:48, Zeng, Star wrote: > Ok, thanks and got the case. > > DxeCapsuleLibVirtualAddressChangeEvent may be too late as it could not > allocate pool to do caching. > I meant registering gEfiSystemResourceTableGuid event group > notification(installconfigurationtable will

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Zeng, Star
Ok, thanks and got the case. DxeCapsuleLibVirtualAddressChangeEvent may be too late as it could not allocate pool to do caching. I meant registering gEfiSystemResourceTableGuid event group notification(installconfigurationtable will trigger event group) and do caching in the notification

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
On 19 October 2018 at 12:39, Zeng, Star wrote: > Ard, > > What is the real case you met that has firmware to access ESRT configuration > table at runtime? > When called from the OS, UpdateCapsule() crashes when IsFmpCapsule() is invoked, because it attempts to access the ESRT. The driver uses

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Zeng, Star
Ard, What is the real case you met that has firmware to access ESRT configuration table at runtime? I am thinking about a possible solution with current situation. The consumer can cache ESRT configuration table by a gEfiSystemResourceTableGuid even group notification. Thanks, Star

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
(+ Peter) On 19 October 2018 at 11:46, Zeng, Star wrote: > Hi Ard, > > Thanks for the patch. > > Cc more people who knows ESRT. > > UEFI 2.7 chapter 23.3: > The ESRT shall be stored in memory of type EfiBootServicesData. > > Seeming, we need update UEFI spec if firmware really needs access ESRT

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Zeng, Star
Hi Ard, Thanks for the patch. Cc more people who knows ESRT. UEFI 2.7 chapter 23.3: The ESRT shall be stored in memory of type EfiBootServicesData. Seeming, we need update UEFI spec if firmware really needs access ESRT configuration table at runtime. Thanks, Star -Original Message-

Re: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
On 19 October 2018 at 10:54, Ard Biesheuvel wrote: > Given that the firmware itself may access the ESRT table when the OS > invokes the UpdateCapsule () boot service, *runtime* service > it requires a virtual mapping > and so it needs to be allocated from RtServicesData memory. > >

[edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory

2018-10-18 Thread Ard Biesheuvel
Given that the firmware itself may access the ESRT table when the OS invokes the UpdateCapsule () boot service, it requires a virtual mapping and so it needs to be allocated from RtServicesData memory. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel ---