[U-Boot] [RFC PATCH 0/2] bootstage: record and publish boot progress timing
Simon Glass
sjg at chromium.org
Sun Oct 16 20:40:44 CEST 2011
This patch is the first baby step in creating a simple boot progress timing
feature in U-Boot.
Previous discussion on this were here:
http://lists.denx.de/pipermail/u-boot/2011-May/thread.html#92584
A request was made to unify this with show_boot_progress(). There are many
ways to do this, and I propose the following:
1. Create bootstage.h with the intent of replacing integers with enums. This
will allow the values to be easily changed or rationalised later as required.
It also makes it more explicit that (for example) 15 means we are about to
run an OS.
2. Change show_boot_progress() to use these enums. This first patch just
shows doing this with one (commonly used) integer value.
3. Create bootstage.c file which permits recording of bootstage timestamps.
4. Change the existing show_boot_progress() handlers within board files to
use a provided bootstage progress handler instead. This is easy enough as
there are few users.
5. Change show_boot_progress() to call into bootstage, which in turns calls
the board-provided progress handler, if defined, after recording a timestamp.
The function signature will stay the same for now.
Please advise if you don't like the above approach or have a better idea.
Also I am not sure how best to deal with these pan-arch and pan-maintainer
patches. Should they be split into lots of little patches for each or can
they be applied to U-Boot's master so everyone can pick them up? It is not
as bad as it sounds since few files make a lot of use of
show_boot_progress().
If I get as far as 5, I will think about where to go next then. Ultimately I
would like boot timing available from before U-Boot to user space in Linux.
See RFC patch for Linux here:
http://lwn.net/Articles/460432/
and discussion here:
http://comments.gmane.org/gmane.linux.kernel/1194861
Simon Glass (2):
Create an initial header for boot progress integers
bootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress()
arch/arm/lib/bootm.c | 2 +-
arch/avr32/lib/bootm.c | 2 +-
arch/m68k/lib/bootm.c | 2 +-
arch/microblaze/lib/bootm.c | 2 +-
arch/mips/lib/bootm.c | 2 +-
arch/mips/lib/bootm_qemu_mips.c | 2 +-
arch/powerpc/lib/bootm.c | 2 +-
board/csb226/csb226.c | 12 +++++++++---
board/innokom/innokom.c | 8 +++++---
board/pcs440ep/pcs440ep.c | 3 +--
board/sixnet/sixnet.c | 2 +-
common/cmd_bootm.c | 8 ++++----
include/bootstage.h | 32 ++++++++++++++++++++++++++++++++
13 files changed, 59 insertions(+), 20 deletions(-)
create mode 100644 include/bootstage.h
--
1.7.3.1
More information about the U-Boot
mailing list