From owner-freebsd-bugs@freebsd.org Mon Dec 14 08:21:29 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16A4A4B30A8 for ; Mon, 14 Dec 2020 08:21:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4CvZ9N719fz4Z41 for ; Mon, 14 Dec 2020 08:21:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id F0A174B3314; Mon, 14 Dec 2020 08:21:28 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F06954B32A6 for ; Mon, 14 Dec 2020 08:21:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CvZ9N6Nx1z4Ymg for ; Mon, 14 Dec 2020 08:21:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDF2B1E845 for ; Mon, 14 Dec 2020 08:21:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BE8LSaf074206 for ; Mon, 14 Dec 2020 08:21:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0BE8LSw7074205 for bugs@FreeBSD.org; Mon, 14 Dec 2020 08:21:28 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 248514] jedec_dimm(4) and imcsmb(4): support of memory controllers in Skylake and newer Intel CPUs Date: Mon, 14 Dec 2020 08:21:28 +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.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: rpokala@panasas.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: 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.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2020 08:21:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248514 --- Comment #10 from Ravi Pokala --- Sorry, this fell off my radar. The problem here is that the iMC-SMBus controller was not really intended f= or use by the OS. During POST, the memory controller uses it to read the SPD information from the DIMMs and configure itself to use their DRAM; during normal operation, the system firmware (the Management Engine?) uses it to r= ead the TSOD temperature from the DIMMs. The hardware has a BUSY indicator, but= it appears to be advisory, and it's possible that firmware does not honor it, which could allow firmware-initiated operations to stomp on OS-initiated operations. And to top it off, I know Intel board firmware disabled OS access to the iMC-SMBus controllers on *Well outright, as part of their security-hardening fixes after Spectre-Meltdown; I suspect other board vendors followed suit. = It's possible that for *Lake, they disabled it from the start. The upshot of all this, is that the controller might not be usable by the O= S on *Lake CPUs. Try adding this line near the start of imcsmb_transfer(): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D orig_cntl_val =3D pci_read_config(sc->imcsmb_pci, sc->regs->smb_cntl, 4); + device_printf(sc->dev, "cntl: 0x%08x\n", orig_cntl_val); cntl_val =3D orig_cntl_val; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I'm particularly interested in bit 26 (0x04000000), SMB_DIS_WRT; if it is s= et, the BIOS has locked the OS out from using the iMC-SMBus controller, and tha= t's game over. :-/ While I appreciate your offer of remote access, I don't have any time to dig into this right now, and probably won't any time in the next few months. --=20 You are receiving this mail because: You are the assignee for the bug.=