ULONG ProcessorCount;
PVOID PowerStateHandle;
PVOID ProcessorChangeHandle;
+ PHYSICAL_ADDRESS MaximumPhysicalAddress;
} SYSTEM_CONTEXT, *PSYSTEM_CONTEXT;
static SYSTEM_CONTEXT SystemContext;
VOID
)
{
+ PSYSTEM_CONTEXT Context = &SystemContext;
PHYSICAL_MEMORY_RANGE *Range;
ULONG Index;
NTSTATUS status;
Index,
Start.HighPart, Start.LowPart,
End.HighPart, End.LowPart);
+
+ if (End.QuadPart > Context->MaximumPhysicalAddress.QuadPart)
+ Context->MaximumPhysicalAddress.QuadPart = End.QuadPart;
}
ExFreePool(Range);
+ Info("MaximumPhysicalAddress = %08x.%08x\n",
+ Context->MaximumPhysicalAddress.HighPart,
+ Context->MaximumPhysicalAddress.LowPart);
+
return STATUS_SUCCESS;
fail1:
return status;
}
+XEN_API
+PHYSICAL_ADDRESS
+SystemMaximumPhysicalAddress(
+ VOID
+ )
+{
+ PSYSTEM_CONTEXT Context = &SystemContext;
+
+ return Context->MaximumPhysicalAddress;
+}
+
VOID
SystemTeardown(
VOID
__SystemFree(Context->Madt);
Context->Madt = NULL;
+ Context->MaximumPhysicalAddress.QuadPart = 0;
+
(VOID) InterlockedDecrement(&Context->References);
ASSERT(IsZeroMemory(Context, sizeof (SYSTEM_CONTEXT)));