Files
u-boot/cmd/x86/qfw_x86.c
Simon Glass 2fdacb4753 qfw: Add a subcommand to decode the QEMU E820 data
Provide a simple command to display the memory map described by this
table.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-09 23:33:25 +02:00

26 lines
448 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* x86-specific qfw commands
*
* Copyright 2025 Simon Glass <sjg@chromium.org>
*/
#include <abuf.h>
#include <command.h>
#include <qfw.h>
#include <asm/e820.h>
int cmd_qfw_e820(struct udevice *dev)
{
struct abuf tab;
int ret;
ret = qfw_get_file(dev, "etc/e820", &tab);
if (ret)
return CMD_RET_FAILURE;
e820_dump(tab.data, tab.size / sizeof(struct e820_entry));
abuf_uninit(&tab);
return 0;
}