x86/cpu: Create Hygon Dhyana architecture support file
authorPu Wen <puwen@hygon.cn>
Thu, 4 Apr 2019 13:45:03 +0000 (21:45 +0800)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 Jun 2019 14:28:20 +0000 (15:28 +0100)
commitd698382a5e59364d7654f4cbd61e2cb9ee3fcf42
tree90009259db029da3a230335172310d455037c9ff
parenta08243eb4a2626851e2e2c77465b49781710b490
x86/cpu: Create Hygon Dhyana architecture support file

Add x86 architecture support for a new processor: Hygon Dhyana Family
18h. To make Hygon initialization flow more clear, carve out code from
amd.c into a separate file hygon.c, and remove unnecessary code for
Hygon Dhyana.

To identify Hygon Dhyana CPU, add a new vendor type X86_VENDOR_HYGON
and vendor ID "HygonGenuine" for system recognition, and fit the new
x86 vendor lookup mechanism.

Hygon can fully use the function early_init_amd(), so make this common
function non-static and direct call it from Hygon code.

Add a separate hygon_get_topology(), which calculate phys_proc_id from
AcpiId[6](see reference [1]).

Reference:
[1] https://git.kernel.org/tip/e0ceeae708cebf22c990c3d703a4ca187dc837f5

Signed-off-by: Pu Wen <puwen@hygon.cn>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
[Rebase over 0cd074144cb "x86/cpu: Renumber X86_VENDOR_* to form a bitmap" and
             64933920c9b "x86/cpu: Drop cpu_devs[] and $VENDOR_init_cpu() hooks"]
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/cpu-policy/test-cpu-policy.c
xen/arch/x86/cpu/Makefile
xen/arch/x86/cpu/amd.c
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/cpu.h
xen/arch/x86/cpu/hygon.c [new file with mode: 0644]
xen/include/asm-x86/x86-vendors.h
xen/lib/x86/cpuid.c