[coreboot] Fwd: inteltool: first preview for machine-readable output

Sven Schnelle svens at stackframe.org
Fri Feb 11 15:38:26 CET 2011


Hi,

Антон Кочков <anton.kochkov at gmail.com> writes:

At first, can you please give us a few use cases for this patch?

> inteltool: first preview for machine-readable output
> Signed-off-by: Anton Kochkov <anton.kochkov at gmail.com>
> ---
>
> This is only for preview and discussion, it's still ugly and dont safe/clear.

> void machine_readable_printf(reg_t *reg) {
>
> #ifdef XML
> 	printf("<register domain='%s' base='0x%x' offset='0x%x' size='%d' value='0x%x' name='%s' description='%s' />\n",
> 		reg->domain, reg->base_addr, reg->offset, reg->size, reg->value, reg->name, reg->desc);
> #endif

That should probably be an #else, and it should be switchable during
runtime instead of compile time.

> #ifndef XML
> 	printf("domain: %s\n", reg->domain);
> 	printf("base addr: 0x%x\n", reg->base_addr);
> 	printf("offset: 0x%x\n", reg->offset);
> 	printf("size: %d\n", reg->size);
> 	printf("value: 0x%x\n", reg->value);
> 	printf("name: %s\n", reg->name);
> 	printf("description: %s\n", reg->desc);
> #endif
> }




More information about the coreboot mailing list