Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753004AbbDFVwZ (ORCPT ); Mon, 6 Apr 2015 17:52:25 -0400 Received: from mail.gw90.de ([188.40.100.199]:35529 "EHLO mail.gw90.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbbDFVwX (ORCPT ); Mon, 6 Apr 2015 17:52:23 -0400 X-Greylist: delayed 2324 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 Apr 2015 17:52:23 EDT Message-ID: <1428354795.3395.421.camel@users.sourceforge.net> Subject: Read and publish firmware time stamps and boot time (was: [systemd-devel] bootloader time on a non-EFI bootloader) From: Paul Menzel To: Kay Sievers Cc: Umut Tezduyar Lindskog , systemd-devel@lists.freedesktop.org, coreboot@coreboot.org, grub-devel@gnu.org, seabios@seabios.org, syslinux@zytor.com, linux-kernel@vger.kernel.org Date: Mon, 06 Apr 2015 23:13:15 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-ueEqMnst1Zx+T9bGqEXN" X-Mailer: Evolution 3.12.10-1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3178 Lines: 86 --=-ueEqMnst1Zx+T9bGqEXN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [CC=E2=80=99ing coreboot, GRUB, SeaBIOS, Syslinux project and Linux kernel] Am Montag, den 16.03.2015, 11:38 +0100 schrieb Kay Sievers: > On Mon, Mar 16, 2015 at 11:29 AM, Umut Tezduyar Lindskog wrote: > > I would like to pass the time it was spent in bootloader to systemd. > > Is there a kernel command line to pass this information on non EFI > > bootloader? Or is there an another way? >=20 > No, there isn't anything I know of. >=20 > The kernel boot protocol should probably be extended to accept a block > of values to be passed from the loader to the OS, and be exported > somewhere by the kernel itself to userspace. >=20 > Overloading the kernel command line with that does not sound like the > right approach. We should not support anything like that from systemd. Could that approach please be discussed with all firmware, payload and firmware projects? For example, coreboot (and the depthcharge payload used on Chromebooks and Chromeboxes) already store the time stamps in its CBMEM, which can be read with the utility `cbmem` with `cbmem -t` [1] or with GRUB=E2=80=99s `coreboot_boottime` command. 10 entries total: 10:start of ramstage 9 30:device enumeration 441 (432) 40:device configuration 95,357 (94,915) 50:device enable 99,275 (3,918) 60:device initialization 109,246 (9,971) 70:device setup done 181,906 (72,659) 75:cbmem post 182,274 (368) 80:write tables 182,276 (2) 90:load payload 183,873 (1,597) 99:selfboot jump 283,779 (99,905) GRUB also has a `boottime` command outputting times like how long a module needed to load. One approach would be, that the Linux kernel has drivers to read the different implementations on how to store the boot time and then exports those to userspace. The other approach, and probably more feasible one, is that all firmware projects use the same standard/specification. What is actually needed? Are pairs of project, stage name, time in milliseconds since start of program where each project gets assigned a unique ID. Do you need more data? Thanks, Paul [1] http://review.coreboot.org/gitweb?p=3Dcoreboot.git;a=3Dblob;f=3Dutil/cb= mem/cbmem.c;h=3D4314d3077f2f657190d9afd63234d9621c59eb91;hb=3DHEAD --=-ueEqMnst1Zx+T9bGqEXN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlUi9vIACgkQPX1aK2wOHVh2ZwCgh96dPIDoITWOlw54KLgdwR6y 3HYAni8tLQ9+sHP0VcKdvW2jFfrp6tO4 =je8T -----END PGP SIGNATURE----- --=-ueEqMnst1Zx+T9bGqEXN-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/