It looks to me like if you Free pages, after you free pages you hit this DEBUG 

      if (!(NewType == EfiConventionalMemory ? 1 : 0) ^ (Entry->Type == 
EfiConventionalMemory ? 1 : 0)) {
        DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: Incompatible memory 
        return EFI_NOT_FOUND;

I'm not sure I've thought out all the paths, but would it make more sense if 
you are trying to convert EfiConventionalMemory to EfiConventionalMemory that 
you are trying to free pages that are already freed. That is not very obvious 
from the above DEBUG print.  Could there be an if in the error path to print a 
better DEBUG message for a free pages bug? 

Also to be pedantic the function change names to: CoreConvertPagesEx(). 


Andrew Fish

edk2-devel mailing list

Reply via email to