freebsd-dev/stand/i386
Konstantin Belousov 2ee49fac82 Add support for Hygon Dhyana Family 18h processor.
As a new x86 CPU vendor, Chengdu Haiguang IC Design Co., Ltd (Hygon)
is a joint venture between AMD and Haiguang Information Technology Co.,
Ltd., aims at providing x86 processors for China server market.

The first generation Hygon processor(Dhyana) shares most architecture
with AMD's family 17h, but with different CPU vendor ID("HygonGenuine")
and PCI vendor ID(0x1d94) and family series number 18h(Hygon negotiated
with AMD to confirm that only Hygon use family 18h).

To enable Hygon Dhyana support in FreeBSD, add new definitions
HYGON_VENDOR_ID("HygonGenuine") and X86_VENDOR_HYGON(0x1d94) to identify
Hygon Dhyana CPU.

Initialize the CPU features(topology, local APIC ext, MSI, TSC, hwpstate,
MCA, DEBUG_CTL, etc) for amd64 and i386 mode by sharing the code path of
AMD family 17h.

The changes have been applied on FreeBSD 13.0-CURRENT and tested
successfully on Hygon Dhyana processor.

References:
[1] Linux kernel patches for Hygon Dhyana, merged in 4.20:

https://git.kernel.org/tip/c9661c1e80b609cd038db7c908e061f0535804ef

[2] MSR and CPUID definition:

https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf

Submitted by:	Pu Wen <puwen@hygon.cn>
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D23163
2020-01-21 13:22:35 +00:00
..
boot0 Centralize several variables. 2018-02-02 06:32:26 +00:00
boot0sio
boot2 Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
btx btx: rename .s files to .S to use Clang IAS 2018-11-26 19:14:33 +00:00
cdboot stand: remove CLANG_NO_IAS from cdboot 2019-08-15 17:32:39 +00:00
common Use symbolic names for int13 calls 2019-12-16 21:52:12 +00:00
gptboot In gptboot, don't assume a partition number is a single digit, 1-9. GPT 2019-12-22 22:33:22 +00:00
gptzfsboot Remove duplicate lz4 implementations 2019-11-02 12:28:04 +00:00
isoboot isoboot, gptboot: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general 2018-08-09 02:06:25 +00:00
libfirewire biospci_write_config args were backwards 2019-01-08 20:01:56 +00:00
libi386 Add support for Hygon Dhyana Family 18h processor. 2020-01-21 13:22:35 +00:00
loader Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
loader_4th Update Makefile.depend files 2019-12-11 17:37:53 +00:00
loader_lua Create a loader for each interpreter for x86 BIOS and all EFI 2018-08-14 18:44:41 +00:00
loader_simp Create a loader for each interpreter for x86 BIOS and all EFI 2018-08-14 18:44:41 +00:00
mbr stand/i386: rename .s to .S to use Clang IAS 2018-12-03 19:16:34 +00:00
pmbr stand/i386: rename .s to .S to use Clang IAS 2018-12-03 19:16:34 +00:00
pxeldr stand: remove CLANG_NO_IAS from pxeldr 2019-08-15 17:59:22 +00:00
zfsboot Remove duplicate lz4 implementations 2019-11-02 12:28:04 +00:00
boot.ldscript
Makefile Remove kgzip and kgzldr. 2019-05-24 05:34:21 +00:00
Makefile.inc Add WITH_PIE knob to build Position Independent Executables 2019-02-15 22:22:38 +00:00