Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-19 Thread He, Jiangang via groups.io
[AMD Official Use Only - General] UsbHcFreeMemBlock()->IoMmuFreeBuffer()->mIoMmu->FreeBuffer(), which may end up calling PeiFreePages() depending on gEdkiiIoMmuPpiGuid implementation. Surely both will work since UsbHcFreeMemPool() can't be interrupted by any service call to use the memory just

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-19 Thread He, Jiangang via groups.io
[AMD Official Use Only - General] Yes, it is the same issue discussed in https://edk2.groups.io/g/devel/topic/92833071#92165 MdeModulePkg\Bus\Pci\XhciPei\UsbHcMem.c for (Block = Pool->Head->Next; Block != NULL; Block = Pool->Head->Next) { // UsbHcUnlinkMemBlock (Pool->Head, Block);

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-19 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] I will send the update according to the discussion. Thanks Abner > -Original Message- > From: Wu, Hao A > Sent: Tuesday, December 20, 2022 8:27 AM > To: He, Jiangang ; Chang, Abner > ; devel@edk2.groups.io > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray > ;

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-19 Thread Wu, Hao A
Thanks. You are right. I agree with you that aligning with XhciDxe is a better resolution. Best Regards, Hao Wu > -Original Message- > From: He, Jiangang > Sent: Tuesday, December 20, 2022 6:54 AM > To: Wu, Hao A ; Chang, Abner > ; devel@edk2.groups.io > Cc: Lin, Kuei-Hung (Timothy) ;

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-18 Thread Wu, Hao A
Hello, My take is that unlike in DXE, the UsbHcFreeMemBlock() implementation in PEI phase does not perform freeing the memory. So I think both the solution: * Provided at https://edk2.groups.io/g/devel/topic/92833071#92165, which aligns with EhciPei * Mentioned at the end of your previous

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Jiangang, Could you please provide the context of this patch? Thanks Abner > -Original Message- > From: Wu, Hao A > Sent: Monday, December 12, 2022 11:27 AM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Lin, Kuei-Hung (Timothy) ; Ni, Ray > ; Zeng,

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-11 Thread Wu, Hao A
Sorry for a question, may I know what issue was met that leads to the proposed patch? Could you help to check if it is related with the topic discussed in https://edk2.groups.io/g/devel/topic/92833071#92165? Thanks in advance. Best Regards, Hao Wu > -Original Message- > From:

[edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-10 Thread Chang, Abner via groups.io
From: Abner Chang In V2: Add AMD copyright. Unlink the XhciPei memory block when it has been freed. Signed-off-by: Kuei-Hung Lin Cc: Hao A Wu Cc: Ray Ni Cc: Garrett Kirkendall Cc: Abner Chang --- MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c | 29 - 1 file changed, 28