Perhaps this is the answer ? I see that PhysicalStart is one of the struct
elements - this is returned by GetMemoryMap().
typedef struct {
UINT32 Type;
EFI_PHYSICAL_ADDRESS PhysicalStart;
EFI_VIRTUAL_ADDRESS VirtualStart;
UINT64 NumberOfPages;
UINT64 Attribute;
} EFI_MEMORY_DESCRIPTOR;
EFI MEMORY DESCRIPTOR - PhoenixWiki
| |
| | | | | |
| EFI MEMORY DESCRIPTOR - PhoenixWikiFrom PhoenixWiki Jump to: navigation,
search Prototype typedef struct { UINT32 Type; EFI_PHYSICAL_ADDRESS
PhysicalStart; EFI_VIRTUAL_ADDRESS VirtualStart; |
| |
| View on wiki.phoenix.com | Preview by Yahoo |
| |
| |
Shubha D. [email protected]
[email protected]
On Monday, October 26, 2015 10:30 AM, Shubha Ramani
<[email protected]> wrote:
So I'm trying to call AllocatePages on a known fixed address as follows:
Status=gBS->AllocatePages(AllocateAddress, EfiLoaderData ,
pages,(EFI_PHYSICAL_ADDRESS*)&memory);
I'm reading pages and the addresses from PCI registers.
Here is the problem, when I allocate I get "Incompatible Memory Type" in
ConvertPages for AllocatePages.
I have tried changing the fixed address to something else and I don't get the
error.
How do I find an intersection of allowable address ranges ? What I mean is, I
have to usecertain address ranges in my application - but I want to make sure
they're actually use-able. Will GetMemoryMap()give me available address ranges
which can legally be allocated ? If so then I can find an intersectionbetween
the address range(s) I want to use and what GetMemoryMap() returns.
Thanks,
Shubha Shubha D. [email protected]
[email protected]
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel