[if gte mso 9]>

Re: [edk2] EFI_BOOT_SERVICES AllocatePool() hang

Subject: Re: [edk2] EFI_BOOT_SERVICES AllocatePool() hang

From: Debabrata Chattopadhyay <Debabrata.Chattopadhyay@pmcs.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2014-11-28 19:52:45

Hi Andrew,


Thanks for your answer.


Actually the same code is working very well for x64 platforms. But this problem is occurring only for IPF platform.


Also in case I use &ptr , where ptr is a local pointer , instead of  ((void **)&p->ptr) then the  BS->AllocatePool does not hang.
Also since you suggested that there may be a memory corruption early in the driver hence we do the following too, for debug purposes :
This AllocatePool which is hanging , is in Start() call back , which (to the best of my knowledge) is preceded by the DriverEntry and the Supported() callbacks. I cleanup my DriverEntry and Supported() , for debugging purposes , so that the driver entry has the  InstallMultipleProtocolInterfaces call and after that a successful return. And supported has just a successful return . This is to ensure that we are not doing any nasty memory / read / write related stuffs early in the driver uptil the first AllocatePool () .
So the DriverEntry and Supported are just skeleton now. And the first line of code in Start() is the (first call to) AllocatePool().The hang still exists.