From owner-freebsd-bugs@freebsd.org Thu Mar 28 06:46:19 2019 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 29A05154D45F for ; Thu, 28 Mar 2019 06:46:19 +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 B0F4A87ACD for ; Thu, 28 Mar 2019 06:46:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 70AA4154D45E; Thu, 28 Mar 2019 06:46:18 +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 49655154D45D for ; Thu, 28 Mar 2019 06:46:18 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB8EA87AC4 for ; Thu, 28 Mar 2019 06:46:17 +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 0960F1E819 for ; Thu, 28 Mar 2019 06:46:17 +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 x2S6kG4O098305 for ; Thu, 28 Mar 2019 06:46:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x2S6kGWU098304 for bugs@FreeBSD.org; Thu, 28 Mar 2019 06:46:16 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 236513] HP Thin clients T620/T730 ACPI: Only CPU core 0 detects C2 state Date: Thu, 28 Mar 2019 06:46:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: stockhausen@collogia.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 06:46:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236513 --- Comment #32 from stockhausen@collogia.de --- Thanks for the helpful discussion. I think I'm getting a better knowledge a= bout it all. Reading across the AMD documents I think everything works as expect= ed. Or at least quite close. Comparing the T620 plus and the T730 I noticed that the C2 state port is different. 0x1771 and not 0x414. Reason is simple - this port is arbitrary = set by BIOS. Explanation comes from the AMD family 0x15 models 0x30-0x03F devel= oper guide 2.5.3.2.7 BIOS Requirements for Initialization: 1. Initialize MSRC001_0073[CstateAddr] with an available IO address. See 2.5.3.2.6.3 [_CRS]. -> HP chose port 0x1770 for the T730 and 0x413 for the T620 as can be seen = from cpucontrol output root@freebsd:~ # cpucontrol -m 0xC0010073 /dev/cpuctl0 MSR 0xc0010073: 0x00000000 0x00001770 2. Initialize D18F4x11[C:8]. -> I don't know how to read that indexed register 3. Generate ACPI objects as follows 3.a The _CST object should be generated for each core as follows: - Count =3D 1. - Register =3D MSRC001_0073[CstateAddr] + 1. - Type =3D 2. - Latency =3D 400.=20 - Power =3D 0. -> We can see that in the decoded ACPI dump ResourceTemplate () { Register (SystemIO, 0x08, // Bit Width 0x00, // Bit Offset 0x0000000000001771, // Address 0x01, // Access Size ) }, 3.b The _CSD object should be generated for each core as follows: - NumberOfEntries =3D 6. - Revision =3D 0. - Domain =3D CPUID Fn0000_0001_EBX[LocalApicId[7:1]]. - CoordType =3D FEh. (HW_ALL) - NumProcessors =3D 2. - Index =3D 0. -> Also inside the ACPI dump Name (_CSD, Package (0x01) // _CSD: C-State Dependencies { Package (0x06) { 0x06, 0x00, 0x00000000, 0x000000FE, 0x00000002, 0x00000000 } }) 3.b BIOS must declare in the root host bridge _CRS object that the IO addre= ss range from MSRC001_0073[CstateAddr] to MSRC001_0073[CstateAddr]+7 is consum= ed by the host bridge. -> This is missing in the ACPI tables. We need an entry for 8 ports starting from 0x1770.=20 4. Fixed ACPI Description Table (FADT) Entries -> Should not bee neded as FreeBSD is hopefully ACPI 2.0 aware and can read= the _CST object from above. So two question remain A. Is the current ACPI code able to compensate for the missing port allocat= ion ranges in BIOS? If you say yes we have found an error. B. My stupid fix may be totally wrong. Where should I place the port registration in the ACPI tables? --=20 You are receiving this mail because: You are the assignee for the bug.=