Commit 64fe6a98 authored by Liao Xuan's avatar Liao Xuan
Browse files

x86/amd_nb: Add support for Hygon family 18h model 7h

hygon inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9VW6G


CVE: NA

---------------------------

Add Hygon family 18h model 7h processor support for amd_nb.

Signed-off-by: default avatarLiao Xuan <liaoxuan@hygon.cn>
parent 6a6cc2b6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -281,6 +281,7 @@ static int get_df_register(struct pci_dev *misc, u8 func, int offset, u32 *value
				device = PCI_DEVICE_ID_HYGON_18H_M04H_DF_F1;
			break;
		case 0x6:
		case 0x7:
			device = PCI_DEVICE_ID_HYGON_18H_M05H_DF_F1;
			break;
		default:
@@ -289,6 +290,7 @@ static int get_df_register(struct pci_dev *misc, u8 func, int offset, u32 *value
	} else if (func == 5) {
		switch (boot_cpu_data.x86_model) {
		case 0x6:
		case 0x7:
			device = PCI_DEVICE_ID_HYGON_18H_M06H_DF_F5;
			break;
		default:
@@ -321,7 +323,8 @@ int get_df_id(struct pci_dev *misc, u8 *id)
	u32 value;
	int ret;

	if (boot_cpu_data.x86_model == 0x6) {
	if (boot_cpu_data.x86_model >= 0x6 &&
	    boot_cpu_data.x86_model <= 0x7) {
		/* F5x180[19:16]: DF ID */
		ret = get_df_register(misc, 5, 0x180, &value);
		*id = (value >> 16) & 0xf;