From owner-freebsd-arch@FreeBSD.ORG Thu Feb 14 14:03:56 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 52204F25; Thu, 14 Feb 2013 14:03:56 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id EB606692; Thu, 14 Feb 2013 14:03:55 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id F42116EF7; Thu, 14 Feb 2013 14:03:48 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C6F53A478; Thu, 14 Feb 2013 15:03:48 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andriy Gapon Subject: Re: Proposal: Unify printing the function name in panic messages() References: <201302120134.r1C1Ycfh026347@chez.mckusick.com> <201302131504.19142.jhb@freebsd.org> <201302131511.14019.jhb@freebsd.org> <511C002C.8090801@FreeBSD.org> Date: Thu, 14 Feb 2013 15:03:48 +0100 In-Reply-To: <511C002C.8090801@FreeBSD.org> (Andriy Gapon's message of "Wed, 13 Feb 2013 23:05:48 +0200") Message-ID: <86mwv7q9ff.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Adrian Chadd , freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2013 14:03:56 -0000 Andriy Gapon writes: > Something of tangential relevance. In Linux they have some special > trace code to debug ACPI resume issues that stores some IDs/hashes of > trace statements (perhaps somewhat akin to our ktr) to RTC time-of-day > registers. I guess that that was a smart choice because you can count > on presence of those registers and they can be written with simple > outb instructions. They're not really registers, just unused space in non-volatile memory. To the computer, a DS1307-compatible RTC looks like a 64-byte flash chip connected by I2C. IIRC, the RTC stores the date and time in BCD in the lower bytes and the rest is unused, unless you have a high-end chip that uses a few extra bytes to store calibration parameters etc. Storing data there is not *quite* "simple outb instructions" since I2C is an adressable serial bus, but it's not insurmountable, and the type of machines that matter to people working on suspend / resume are pretty much guaranteed to have a DS1307-compatible RTC. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no