From owner-freebsd-bugs@freebsd.org Fri May 25 09:11:10 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44AC8F7703E for ; Fri, 25 May 2018 09:11:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B67D879168 for ; Fri, 25 May 2018 09:11:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 7A5D4F77038; Fri, 25 May 2018 09:11:09 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55926F77037 for ; Fri, 25 May 2018 09:11:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E16B87915C for ; Fri, 25 May 2018 09:11:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id EF95814B73 for ; Fri, 25 May 2018 09:11:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4P9B7w1031789 for ; Fri, 25 May 2018 09:11:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4P9B7fm031779 for bugs@FreeBSD.org; Fri, 25 May 2018 09:11:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 228480] [amdtemp] Add device id and WIP patch for driver update Date: Fri, 25 May 2018 09:11:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: johalun0@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 09:11:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228480 Bug ID: 228480 Summary: [amdtemp] Add device id and WIP patch for driver update Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: johalun0@gmail.com Created attachment 193681 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D193681&action= =3Dedit Patch for amdtemp.c and amdsmn.c I added a device id 0x15d0 to amdtemp and amdsmn and fixed up amdsmn a bit = wrt pciids struct to match amdtemp and with proper macros. # sysctl dev.amdtemp.3.core0.sensor0: 60.2C dev.amdtemp.3.sensor_offset: 0 dev.amdtemp.3.%parent: hostb0 dev.amdtemp.3.%pnpinfo:=20 dev.amdtemp.3.%location:=20 dev.amdtemp.3.%driver: amdtemp dev.amdtemp.3.%desc: AMD CPU On-Die Thermal Sensors dev.amdtemp.%parent:=20 It seem to show the correct temperature but only for one core. If I attached the device to Data Fabric Function 3 pci id 0x15eb, which is suggested to be the correct way described here:=20 https://patchwork.kernel.org/patch/10381565/=20 I get 4 temperatures in dev.cpu, however they're all 0. The out then is: # sysctl dev.amdtemp.0.core0.sensor0: -0.0C dev.amdtemp.0.sensor_offset: 0 dev.amdtemp.0.%parent: hostb6 dev.amdtemp.0.%pnpinfo:=20 dev.amdtemp.0.%location:=20 dev.amdtemp.0.%driver: amdtemp dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors dev.amdtemp.%parent:=20 dev.cpu.3.temperature: -0.0C dev.cpu.2.temperature: -0.0C dev.cpu.1.temperature: -0.0C dev.cpu.0.temperature: -0.0C Maybe some offset that is not correct.=20 I will continue to tinker with this but I'll post this for now.=20 The motherboard is ASRock A320M-HDV. # dmesg CPU: AMD Ryzen 3 2200G with Radeon Vega Graphics (3493.51-MHz K8-class = CPU) Origin=3D"AuthenticAMD" Id=3D0x810f10 Family=3D0x17 Model=3D0x11 Step= ping=3D0 =20 Features=3D0x178bfbff =20 Features2=3D0x7ed8320b AMD Features=3D0x2e500800 AMD Features2=3D0x35c233ff Structured Extended Features=3D0x209c01a9 XSAVE Features=3D0xf AMD Extended Feature Extensions ID EBX=3D0x1007 SVM: (disabled in BIOS) NP,NRIP,VClean,AFlush,DAssist,NAsids=3D32768 TSC: P-state invariant, performance statistics # pciconf -lv hostb0@pci0:0:0:0: class=3D0x060000 card=3D0x15d01849 chip=3D0x15d0102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI none0@pci0:0:0:2: class=3D0x080600 card=3D0x15d11022 chip=3D0x15d1102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D base peripheral subclass =3D IOMMU hostb1@pci0:0:1:0: class=3D0x060000 card=3D0x00000000 chip=3D0x1452102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge' class =3D bridge subclass =3D HOST-PCI pcib1@pci0:0:1:2: class=3D0x060400 card=3D0x14531022 chip=3D0x15d3102= 2 rev=3D0x00 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D PCI-PCI pcib6@pci0:0:1:6: class=3D0x060400 card=3D0x14531022 chip=3D0x15d3102= 2 rev=3D0x00 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D PCI-PCI hostb2@pci0:0:8:0: class=3D0x060000 card=3D0x00000000 chip=3D0x1452102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge' class =3D bridge subclass =3D HOST-PCI pcib7@pci0:0:8:1: class=3D0x060400 card=3D0x00001022 chip=3D0x15db102= 2 rev=3D0x00 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D PCI-PCI pcib8@pci0:0:8:2: class=3D0x060400 card=3D0x00001022 chip=3D0x15dc102= 2 rev=3D0x00 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D PCI-PCI intsmb0@pci0:0:20:0: class=3D0x0c0500 card=3D0xffff1849 chip=3D0x790b102= 2 rev=3D0x61 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'FCH SMBus Controller' class =3D serial bus subclass =3D SMBus isab0@pci0:0:20:3: class=3D0x060100 card=3D0xffff1849 chip=3D0x790e102= 2 rev=3D0x51 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'FCH LPC Bridge' class =3D bridge subclass =3D PCI-ISA hostb3@pci0:0:24:0: class=3D0x060000 card=3D0x00000000 chip=3D0x15e8102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb4@pci0:0:24:1: class=3D0x060000 card=3D0x00000000 chip=3D0x15e9102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb5@pci0:0:24:2: class=3D0x060000 card=3D0x00000000 chip=3D0x15ea102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb6@pci0:0:24:3: class=3D0x060000 card=3D0x00000000 chip=3D0x15eb102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb7@pci0:0:24:4: class=3D0x060000 card=3D0x00000000 chip=3D0x15ec102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb8@pci0:0:24:5: class=3D0x060000 card=3D0x00000000 chip=3D0x15ed102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb9@pci0:0:24:6: class=3D0x060000 card=3D0x00000000 chip=3D0x15ee102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI hostb10@pci0:0:24:7: class=3D0x060000 card=3D0x00000000 chip=3D0x15ef102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D HOST-PCI xhci0@pci0:21:0:0: class=3D0x0c0330 card=3D0x11421b21 chip=3D0x43bc102= 2 rev=3D0x02 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D serial bus subclass =3D USB ahci0@pci0:21:0:1: class=3D0x010601 card=3D0x10621b21 chip=3D0x43b8102= 2 rev=3D0x02 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D mass storage subclass =3D SATA pcib2@pci0:21:0:2: class=3D0x060400 card=3D0x02011b21 chip=3D0x43b3102= 2 rev=3D0x02 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D bridge subclass =3D PCI-PCI pcib3@pci0:29:4:0: class=3D0x060400 card=3D0x33061b21 chip=3D0x43b4102= 2 rev=3D0x02 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D '300 Series Chipset PCIe Port' class =3D bridge subclass =3D PCI-PCI pcib4@pci0:29:6:0: class=3D0x060400 card=3D0x33061b21 chip=3D0x43b4102= 2 rev=3D0x02 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D '300 Series Chipset PCIe Port' class =3D bridge subclass =3D PCI-PCI pcib5@pci0:29:7:0: class=3D0x060400 card=3D0x33061b21 chip=3D0x43b4102= 2 rev=3D0x02 hdr=3D0x01 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D '300 Series Chipset PCIe Port' class =3D bridge subclass =3D PCI-PCI re0@pci0:37:0:0: class=3D0x020000 card=3D0x81681849 chip=3D0x816810e= c rev=3D0x11 hdr=3D0x00 vendor =3D 'Realtek Semiconductor Co., Ltd.' device =3D 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controll= er' class =3D network subclass =3D ethernet vgapci0@pci0:56:0:0: class=3D0x030000 card=3D0x15dd1002 chip=3D0x15dd100= 2 rev=3D0xc8 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD/ATI]' device =3D 'Radeon Vega 8 Mobile' class =3D display subclass =3D VGA none1@pci0:56:0:1: class=3D0x040300 card=3D0x15de1002 chip=3D0x15de100= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD/ATI]' class =3D multimedia subclass =3D HDA none2@pci0:56:0:2: class=3D0x108000 card=3D0x15df1022 chip=3D0x15df102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D encrypt/decrypt xhci1@pci0:56:0:3: class=3D0x0c0330 card=3D0xffff1849 chip=3D0x15e0102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D serial bus subclass =3D USB xhci2@pci0:56:0:4: class=3D0x0c0330 card=3D0xffff1849 chip=3D0x15e1102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D serial bus subclass =3D USB none3@pci0:56:0:6: class=3D0x040300 card=3D0xd8871849 chip=3D0x15e3102= 2 rev=3D0x00 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' class =3D multimedia subclass =3D HDA ahci1@pci0:57:0:0: class=3D0x010601 card=3D0x79011022 chip=3D0x7901102= 2 rev=3D0x61 hdr=3D0x00 vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'FCH SATA Controller [AHCI mode]' class =3D mass storage subclass =3D SATA --=20 You are receiving this mail because: You are the assignee for the bug.=