u-boot/arch/x86/lib/bdinfo.c
Simon Glass 567dfef2fe x86: Show some EFI info with the bdinfo command
It is useful to see some basic EFI info with the command as it forms part
of the information about a board.

Add a hook for this and show the table address as a start.

While here, fix an invalid cast in setup_efi_info(). Note that this
function is using a data structure defined by Linux so we cannot change
it. Also note that ulong is used since this is the standard in U-Boot
(>6k uses), despite there being quite a bit of the more verbose uintptr_t
(930 uses).

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21 03:46:03 +02:00

22 lines
398 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* x86-specific information for the 'bd' command
*
* Copyright 2021 Google LLC
*/
#include <common.h>
#include <efi.h>
#include <init.h>
#include <asm/efi.h>
#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
void arch_print_bdinfo(void)
{
bdinfo_print_num_l("prev table", gd->arch.table);
if (IS_ENABLED(CONFIG_EFI_STUB))
efi_show_bdinfo();
}