mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
hv: cpu: use the physical address limit from CPUID when available
Per SDM Vol. 2:
If CPUID.80000008H:EAX[7:0] is supported, the maximum physical address
number supported should come from this field.
This patch gets the maximum physical address number from CPUID leaf
0x80000008 and calculates the physical address mask when the leaf is
available.
Currently ACRN does not support platforms w/o this leaf and will panic
on such platforms.
Also call get_cpu_capabilities() earlier since the physical address mask
is required for initializing paging.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -115,6 +115,7 @@
|
||||
#define CPUID_EXTEND_FEATURE 7
|
||||
#define CPUID_MAX_EXTENDED_FUNCTION 0x80000000
|
||||
#define CPUID_EXTEND_FUNCTION_1 0x80000001
|
||||
#define CPUID_EXTEND_ADDRESS_SIZE 0x80000008
|
||||
|
||||
static inline void __cpuid(uint32_t *eax, uint32_t *ebx,
|
||||
uint32_t *ecx, uint32_t *edx)
|
||||
|
||||
Reference in New Issue
Block a user