blob: 4e99b06122be971d1cb55a6bc34b7e578237ebf6 [file] [log] [blame]
Anastasiia Lukianenko722bc5b2020-08-06 12:42:55 +03001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2020 EPAM Systems Inc.
4 *
5 * XEN para-virtualized block device support
6 */
7
8#include <blk.h>
9#include <common.h>
10#include <command.h>
11
12/* Current I/O Device */
13static int pvblock_curr_device;
14
15int do_pvblock(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
16{
17 return blk_common_cmd(argc, argv, IF_TYPE_PVBLOCK,
18 &pvblock_curr_device);
19}
20
21U_BOOT_CMD(pvblock, 5, 1, do_pvblock,
22 "Xen para-virtualized block device",
23 "info - show available block devices\n"
24 "pvblock device [dev] - show or set current device\n"
25 "pvblock part [dev] - print partition table of one or all devices\n"
26 "pvblock read addr blk# cnt\n"
27 "pvblock write addr blk# cnt - read/write `cnt'"
28 " blocks starting at block `blk#'\n"
29 " to/from memory address `addr'");
30