All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 15/25] x86: Add a simple command to show FSP HOB information
Date: Mon, 15 Dec 2014 23:34:48 +0100	[thread overview]
Message-ID: <20141215223447.GD27866@amd> (raw)
In-Reply-To: <1417705357-19389-1-git-send-email-bmeng.cn@gmail.com>

Hi!


> +static char *hob_type[] = {
> +	"reserved",
> +	"Hand-off",
> +	"Memory Allocation",
> +	"Resource Descriptor",
> +	"GUID Extension",
> +	"Firmware Volumn",

"volume?" ?

> +int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> +{
> +	EFI_PEI_HOB_POINTERS hob;
> +	UINT16 type;
> +	char *desc;
> +	int i = 0;
> +
> +	hob.Raw = (UINT8 *)gd->arch.hob_list;

> +	printf("HOB list address: 0x%08x\n\n", (unsigned int)hob.Raw);
> +
> +	printf(" No. | Address  | Type                 | Length in Bytes \n");
> +	printf("-----|----------|----------------------|-----------------\n");
> +	while (!END_OF_HOB_LIST(hob)) {
> +		printf(" %-3d | %08x |", i, (unsigned int)hob.Raw);
> +		type = hob.Header->HobType;

Can we get rid of camelCase easily?

> +		if (type == EFI_HOB_TYPE_UNUSED)
> +			desc = "*Unused*";
> +		else if (type == EFI_HOB_TYPE_END_OF_HOB_LIST)
> +			desc = "**END OF HOB**";
> +		else if (type >= HOB_TYPE_MIN && type <= HOB_TYPE_MAX)
> +			desc = hob_type[type];
> +		else
> +			desc = "!!!Invalid Type!!!";

I'd put there less stars and !s...

> +U_BOOT_CMD(
> +	hob,	1,	1,	do_hob,
> +	"print FSP Hand-Off Block information",

You might what to spell out "FSP"... it is help text after all.

Thanks,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2014-12-15 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 15:02 [U-Boot] [PATCH 15/25] x86: Add a simple command to show FSP HOB information Bin Meng
2014-12-04 23:42 ` Simon Glass
2014-12-05  9:11   ` Bin Meng
2014-12-15 22:34 ` Pavel Machek [this message]
2014-12-17  8:13   ` Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141215223447.GD27866@amd \
    --to=pavel@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.