From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 27 12:28:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE880106568B for ; Thu, 27 Aug 2009 12:28:32 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id B2EFD8FC2C for ; Thu, 27 Aug 2009 12:28:32 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C1D826D418 for ; Thu, 27 Aug 2009 12:28:31 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9C31F844C4; Thu, 27 Aug 2009 14:28:31 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: freebsd-hackers@freebsd.org References: <200908262253.n7QMrauP063683@wattres.watt.com> <200908271130.18073.erich@apsara.com.sg> <20090827112229.GB14987@britannica.bec.de> Date: Thu, 27 Aug 2009 14:28:31 +0200 In-Reply-To: <20090827112229.GB14987@britannica.bec.de> (Joerg Sonnenberger's message of "Thu, 27 Aug 2009 13:22:29 +0200") Message-ID: <864ort1lw0.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: enable ECC in OS code? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2009 12:28:33 -0000 Joerg Sonnenberger writes: > Erich Dollansky writes: > > how should it be done at OS level at all when the OS is loaded=20 > > into RAM? > Copy the kernel to the video RAM, jump to it, enable ECC, copy back. Not just the kernel - you have to copy all the memory that is currently in use, including interrupt tables, the BIOS configuration space, shadow copies of various ROMs... The CPU will probably not look too kindly on having interrupt descriptors, segment descriptors, page tables etc. in memory accessed through the I/O controller instead of the memory controller. The machine might not even have video RAM! On systems that support ECC, I suspect that the BIOS enables it at the same time as it configures the memory controller, which is one of the very first things it does - literally within a few dozen (or perhaps a few hundred) instructions from CPU reset - using only CPU registers, ROM code, and configuration variables loaded from NVRAM. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no