freebsd-nq/stand
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
..
arm
arm64
common loader: clean up devopen and devclose a bit 2019-12-13 08:41:37 +00:00
defaults
efi Backout 356693. The libsa malloc does provide necessary alignment and 2020-01-13 20:02:27 +00:00
fdt stand/fdt: Scale blob size better as overlays apply 2020-01-09 04:34:42 +00:00
ficl Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
ficl32
forth loader_4th: menu items need to reset color attribute, not switch to white 2019-09-22 16:10:25 +00:00
i386 Add support for Hygon Dhyana Family 18h processor. 2020-01-21 13:22:35 +00:00
kshim
liblua stand: liblua: drop default buffer size to 128 2019-12-12 01:35:56 +00:00
liblua32
libofw Backout 356693. The libsa malloc does provide necessary alignment and 2020-01-13 20:02:27 +00:00
libsa loader: update zfsimpl.c from illumos review suggestions 2020-01-06 19:35:22 +00:00
libsa32
lua lualoader: correct a typo from r354247 2019-12-03 18:44:19 +00:00
man
mips mips: ubldr: use truncated load address for mips32 2019-09-18 01:33:17 +00:00
powerpc [PowerPC] Fix 32-bit ubldr calling convention 2020-01-19 04:13:19 +00:00
sparc64 Move stand/ofw/libofw to stand/libofw. 2020-01-02 04:34:22 +00:00
uboot Backout 356693. The libsa malloc does provide necessary alignment and 2020-01-13 20:02:27 +00:00
usb
userboot loader: userboot/test should accept more than one disk 2019-11-03 09:14:29 +00:00
defs.mk Move stand/ofw/libofw to stand/libofw. 2020-01-02 04:34:22 +00:00
fdt.mk
ficl.mk
loader.mk Add flua to the base system, install to /usr/libexec 2019-11-18 23:21:13 +00:00
lua.mk
Makefile Move stand/ofw/libofw to stand/libofw. 2020-01-02 04:34:22 +00:00
Makefile.amd64
Makefile.inc
uboot.mk