search for: cpu_phys_addr

Displaying 1 result from an estimated 1 matches for "cpu_phys_addr".

2012 Sep 26
3
[PATCH v3] xen/tools: Add 64 bits big bar support
...ols/firmware/hvmloader/cacheattr.c b/tools/firmware/hvmloader/cacheattr.c index 646f07f..592b455 100644 --- a/tools/firmware/hvmloader/cacheattr.c +++ b/tools/firmware/hvmloader/cacheattr.c @@ -40,24 +40,33 @@ #define MSR_PAT 0x0277 #define MSR_MTRRdefType 0x02ff +unsigned int cpu_phys_addr(void) +{ + uint32_t eax, ebx, ecx, edx; + unsigned int phys_bits = 36; + /* Find the physical address size for this CPU. */ + cpuid(0x80000000, &eax, &ebx, &ecx, &edx); + if ( eax >= 0x80000008 ) + { + cpuid(0x80000008, &eax, &ebx, &ecx, &...