PcdStatus = PcdSet64S (PcdFlashNvStorageVariableBase64, (UINT32)(UINTN) Ptr);I guess you are referring to that UINT32 cast?
Not sure why it is there. I think you can just drop it.
Can uefi bios manage memory beyond 4G?The X64 builds can do that just fine, although they usually store
everything below 4G, so issues like the one above go unnoticed.