> On May 30, 2016, at 10:37 AM, Vladimir Olovyannikov 
> <vladimir.olovyanni...@broadcom.com> wrote:
> 
> 
> Hello All,
> 
> I faced an issue with my UEFI implementation (Armv8 64 bit platform).
> I need to convert a device physical address to the virtual on
> VirtualAddressChange event.
> EfiConvertPointer always returns EFI_NOT_FOUND.
> 
> I tried to allocate just an address:
> gBS->AllocatePages(AllocateAddress, EfiRuntimeServicesCode, 1,
> &MyAddress); // Allocate one page
> where MyAddress is 0x65042000.
> Which also returns  EFI_NOT_FOUND.
> 
> I declared this device's memory in the Platform memory lib as
> 
>  // Mydevice
>  // 1MB @0x65000000 (0x65000000 - 0x650fffff)
>  MMUTable[++Index].PhysicalBase    = MY_DEV_BASE;
>  MMUTable[Index].VirtualBase            = MY_DEV_BASE;
>  MMUTable[Index].Length                     = MY_DEV_SZ; // SIZE_1MB
>  MMUTable[Index].Attributes              =
> ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
> 
> I can access this device perfectly from BootServices (read/write) with MMU
> (1:1) on.
> But it is nowhere in virtual table map which
> AllocatePages()/EfiConvertPointer() eventually use.
> 
> Please let me know what I am missing here?
> I have declared this memory as a Runtime with
> 
>  Status = gDS->AddMemorySpace (
>                EfiGcdMemoryTypeMemoryMappedIo,
>                AlignedAddr, SIZE_64KB,
>                EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
>                  );
>  if (!EFI_ERROR (Status)) {
>      Status = gDS->SetMemorySpaceAttributes (
>                    AlignedAddr,
>                    SIZE_64KB,
>                    EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
>                      );
>  }
> 

If you boot to the UEFI shell and dump the memory map what to do you see? 

Thanks,

Andrew Fish

> Thank you,
> Vladimir
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.01.org_mailman_listinfo_edk2-2Ddevel&d=CwICAg&c=Hw-EJUFt2_D9PK5csBJ29kRV40HqSDXWTLPyZ6W8u84&r=4sdzHKz0eU1vXqaUySVmyA&m=dj-PLSCQ4D53smC8eOprHa7aKtcLYkZDhDWnczTquDU&s=jb4N3rlGt6jI92m5sabAKDmsB2T9jdtvYQhw_A91Xi4&e=

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to