Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc
("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
This commit is contained in:
33
cmd/Kconfig
33
cmd/Kconfig
@@ -1236,6 +1236,14 @@ config CMD_FUSE
|
||||
which control the behaviour of the device. The command uses the
|
||||
fuse_...() API.
|
||||
|
||||
config CMD_FUSE_WRITEBUFF
|
||||
bool "Support for the fuse writebuff"
|
||||
depends on CMD_FUSE
|
||||
help
|
||||
This allows programming fuses, which control the behaviour of
|
||||
the device, using a structured buffer in memory. The command
|
||||
uses the fuse_writebuff() API.
|
||||
|
||||
config CMD_GPIO
|
||||
bool "gpio"
|
||||
help
|
||||
@@ -1602,6 +1610,7 @@ config CMD_READ
|
||||
config CMD_REMOTEPROC
|
||||
bool "remoteproc"
|
||||
depends on REMOTEPROC
|
||||
default y if ARCH_K3
|
||||
help
|
||||
Support for Remote Processor control
|
||||
|
||||
@@ -2059,7 +2068,7 @@ config CMD_SNTP
|
||||
|
||||
config CMD_LINK_LOCAL
|
||||
bool "linklocal"
|
||||
select LIB_RAND
|
||||
depends on (LIB_RAND || LIB_HW_RAND)
|
||||
help
|
||||
Acquire a network IP address using the link-local protocol
|
||||
|
||||
@@ -2168,6 +2177,28 @@ config WGET_HTTPS
|
||||
help
|
||||
Enable TLS over http for wget.
|
||||
|
||||
config WGET_CACERT
|
||||
bool "wget cacert"
|
||||
depends on CMD_WGET
|
||||
depends on WGET_HTTPS
|
||||
help
|
||||
Adds the "cacert" sub-command to wget to provide root certificates
|
||||
to the HTTPS engine. Must be in DER format.
|
||||
|
||||
config WGET_BUILTIN_CACERT
|
||||
bool "Built-in CA certificates"
|
||||
depends on WGET_HTTPS
|
||||
select BUILD_BIN2C
|
||||
|
||||
config WGET_BUILTIN_CACERT_PATH
|
||||
string "Path to root certificates"
|
||||
depends on WGET_BUILTIN_CACERT
|
||||
default "cacert.crt"
|
||||
help
|
||||
Set this to the path to a DER-encoded X509 file containing
|
||||
Certification Authority certificates, a.k.a. root certificates, for
|
||||
the purpose of authenticating HTTPS connections.
|
||||
|
||||
config CMD_PXE
|
||||
bool "pxe"
|
||||
select PXE_UTILS
|
||||
|
@@ -155,7 +155,6 @@ obj-$(CONFIG_CMD_QFW) += qfw.o
|
||||
obj-$(CONFIG_CMD_READ) += read.o
|
||||
obj-$(CONFIG_CMD_WRITE) += read.o
|
||||
obj-$(CONFIG_CMD_REGINFO) += reginfo.o
|
||||
obj-$(CONFIG_CMD_REISER) += reiser.o
|
||||
obj-$(CONFIG_CMD_REMOTEPROC) += remoteproc.o
|
||||
obj-$(CONFIG_CMD_RNG) += rng.o
|
||||
obj-$(CONFIG_CMD_KASLRSEED) += kaslrseed.o
|
||||
|
59
cmd/acpi.c
59
cmd/acpi.c
@@ -7,6 +7,7 @@
|
||||
#include <display_options.h>
|
||||
#include <log.h>
|
||||
#include <mapmem.h>
|
||||
#include <tables_csum.h>
|
||||
#include <acpi/acpi_table.h>
|
||||
#include <asm/acpi_table.h>
|
||||
#include <asm/global_data.h>
|
||||
@@ -15,6 +16,17 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static const char *show_checksum(void *ptr, uint size, bool chksums)
|
||||
{
|
||||
uint checksum;
|
||||
|
||||
if (!chksums)
|
||||
return "";
|
||||
checksum = table_compute_checksum(ptr, size);
|
||||
|
||||
return checksum ? " bad" : " OK";
|
||||
}
|
||||
|
||||
/**
|
||||
* dump_hdr() - Dump an ACPI header
|
||||
*
|
||||
@@ -23,16 +35,17 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
*
|
||||
* @hdr: ACPI header to dump
|
||||
*/
|
||||
static void dump_hdr(struct acpi_table_header *hdr)
|
||||
static void dump_hdr(struct acpi_table_header *hdr, bool chksums)
|
||||
{
|
||||
bool has_hdr = memcmp(hdr->signature, "FACS", ACPI_NAME_LEN);
|
||||
|
||||
printf("%.*s %16lx %5x", ACPI_NAME_LEN, hdr->signature,
|
||||
(ulong)map_to_sysmem(hdr), hdr->length);
|
||||
if (has_hdr) {
|
||||
printf(" v%02d %.6s %.8s %x %.4s %x\n", hdr->revision,
|
||||
printf(" v%02d %.6s %.8s %x %.4s %x%s\n", hdr->revision,
|
||||
hdr->oem_id, hdr->oem_table_id, hdr->oem_revision,
|
||||
hdr->creator_id, hdr->creator_revision);
|
||||
hdr->creator_id, hdr->creator_revision,
|
||||
show_checksum(hdr, hdr->length, chksums));
|
||||
} else {
|
||||
printf("\n");
|
||||
}
|
||||
@@ -52,22 +65,22 @@ static int dump_table_name(const char *sig)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void list_fadt(struct acpi_fadt *fadt)
|
||||
static void list_fadt(struct acpi_fadt *fadt, bool chksums)
|
||||
{
|
||||
if (fadt->header.revision >= 3 && fadt->x_dsdt)
|
||||
dump_hdr(nomap_sysmem(fadt->x_dsdt, 0));
|
||||
dump_hdr(nomap_sysmem(fadt->x_dsdt, 0), chksums);
|
||||
else if (fadt->dsdt)
|
||||
dump_hdr(nomap_sysmem(fadt->dsdt, 0));
|
||||
if (!IS_ENABLED(CONFIG_X86) &&
|
||||
dump_hdr(nomap_sysmem(fadt->dsdt, 0), chksums);
|
||||
if (!IS_ENABLED(CONFIG_X86) && !IS_ENABLED(CONFIG_SANDBOX) &&
|
||||
!(fadt->flags & ACPI_FADT_HW_REDUCED_ACPI))
|
||||
log_err("FADT not ACPI-hardware-reduced-compliant\n");
|
||||
if (fadt->header.revision >= 3 && fadt->x_firmware_ctrl)
|
||||
dump_hdr(nomap_sysmem(fadt->x_firmware_ctrl, 0));
|
||||
dump_hdr(nomap_sysmem(fadt->x_firmware_ctrl, 0), chksums);
|
||||
else if (fadt->firmware_ctrl)
|
||||
dump_hdr(nomap_sysmem(fadt->firmware_ctrl, 0));
|
||||
dump_hdr(nomap_sysmem(fadt->firmware_ctrl, 0), chksums);
|
||||
}
|
||||
|
||||
static void list_rsdt(struct acpi_rsdp *rsdp)
|
||||
static void list_rsdt(struct acpi_rsdp *rsdp, bool chksums)
|
||||
{
|
||||
int len, i, count;
|
||||
struct acpi_rsdt *rsdt;
|
||||
@@ -75,11 +88,11 @@ static void list_rsdt(struct acpi_rsdp *rsdp)
|
||||
|
||||
if (rsdp->rsdt_address) {
|
||||
rsdt = nomap_sysmem(rsdp->rsdt_address, 0);
|
||||
dump_hdr(&rsdt->header);
|
||||
dump_hdr(&rsdt->header, chksums);
|
||||
}
|
||||
if (rsdp->xsdt_address) {
|
||||
xsdt = nomap_sysmem(rsdp->xsdt_address, 0);
|
||||
dump_hdr(&xsdt->header);
|
||||
dump_hdr(&xsdt->header, chksums);
|
||||
len = xsdt->header.length - sizeof(xsdt->header);
|
||||
count = len / sizeof(u64);
|
||||
} else if (rsdp->rsdt_address) {
|
||||
@@ -100,24 +113,28 @@ static void list_rsdt(struct acpi_rsdp *rsdp)
|
||||
if (!entry)
|
||||
break;
|
||||
hdr = nomap_sysmem(entry, 0);
|
||||
dump_hdr(hdr);
|
||||
dump_hdr(hdr, chksums);
|
||||
if (!memcmp(hdr->signature, "FACP", ACPI_NAME_LEN))
|
||||
list_fadt((struct acpi_fadt *)hdr);
|
||||
list_fadt((struct acpi_fadt *)hdr, chksums);
|
||||
}
|
||||
}
|
||||
|
||||
static void list_rsdp(struct acpi_rsdp *rsdp)
|
||||
static void list_rsdp(struct acpi_rsdp *rsdp, bool chksums)
|
||||
{
|
||||
printf("RSDP %16lx %5x v%02d %.6s\n", (ulong)map_to_sysmem(rsdp),
|
||||
rsdp->length, rsdp->revision, rsdp->oem_id);
|
||||
list_rsdt(rsdp);
|
||||
printf("RSDP %16lx %5x v%02d %.6s%s%s\n",
|
||||
(ulong)map_to_sysmem(rsdp), rsdp->length, rsdp->revision,
|
||||
rsdp->oem_id, show_checksum(rsdp, 0x14, chksums),
|
||||
show_checksum(rsdp, rsdp->length, chksums));
|
||||
list_rsdt(rsdp, chksums);
|
||||
}
|
||||
|
||||
static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
struct acpi_rsdp *rsdp;
|
||||
bool chksums;
|
||||
|
||||
chksums = argc >= 2 && !strcmp("-c", argv[1]);
|
||||
rsdp = map_sysmem(gd_acpi_start(), 0);
|
||||
if (!rsdp) {
|
||||
printf("No ACPI tables present\n");
|
||||
@@ -125,7 +142,7 @@ static int do_acpi_list(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
}
|
||||
printf("Name Base Size Detail\n"
|
||||
"---- ---------------- ----- ----------------------------\n");
|
||||
list_rsdp(rsdp);
|
||||
list_rsdp(rsdp, chksums);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -187,13 +204,13 @@ static int do_acpi_dump(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
}
|
||||
|
||||
U_BOOT_LONGHELP(acpi,
|
||||
"list - list ACPI tables\n"
|
||||
"list [-c] - list ACPI tables [check checksums]\n"
|
||||
"acpi items [-d] - List/dump each piece of ACPI data from devices\n"
|
||||
"acpi set [<addr>] - Set or show address of ACPI tables\n"
|
||||
"acpi dump <name> - Dump ACPI table");
|
||||
|
||||
U_BOOT_CMD_WITH_SUBCMDS(acpi, "ACPI tables", acpi_help_text,
|
||||
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_acpi_list),
|
||||
U_BOOT_SUBCMD_MKENT(list, 2, 1, do_acpi_list),
|
||||
U_BOOT_SUBCMD_MKENT(items, 2, 1, do_acpi_items),
|
||||
U_BOOT_SUBCMD_MKENT(set, 2, 1, do_acpi_set),
|
||||
U_BOOT_SUBCMD_MKENT(dump, 2, 1, do_acpi_dump));
|
||||
|
@@ -62,13 +62,18 @@ static int do_blkmap_map_mem(struct map_ctx *ctx, int argc, char *const argv[])
|
||||
{
|
||||
phys_addr_t addr;
|
||||
int err;
|
||||
bool preserve = false;
|
||||
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
addr = hextoul(argv[1], NULL);
|
||||
|
||||
err = blkmap_map_pmem(ctx->dev, ctx->blknr, ctx->blkcnt, addr);
|
||||
if (argc == 3 && !strcmp(argv[2], "preserve"))
|
||||
preserve = true;
|
||||
|
||||
err = blkmap_map_pmem(ctx->dev, ctx->blknr, ctx->blkcnt, addr,
|
||||
preserve);
|
||||
if (err) {
|
||||
printf("Unable to map %#llx at block 0x" LBAF ": %d\n",
|
||||
(unsigned long long)addr, ctx->blknr, err);
|
||||
@@ -221,7 +226,7 @@ U_BOOT_CMD_WITH_SUBCMDS(
|
||||
"blkmap create <label> - create device\n"
|
||||
"blkmap destroy <label> - destroy device\n"
|
||||
"blkmap map <label> <blk#> <cnt> linear <interface> <dev> <blk#> - device mapping\n"
|
||||
"blkmap map <label> <blk#> <cnt> mem <addr> - memory mapping\n",
|
||||
"blkmap map <label> <blk#> <cnt> mem <addr> [preserve] - memory mapping\n",
|
||||
U_BOOT_SUBCMD_MKENT(info, 2, 1, do_blkmap_common),
|
||||
U_BOOT_SUBCMD_MKENT(part, 2, 1, do_blkmap_common),
|
||||
U_BOOT_SUBCMD_MKENT(dev, 4, 1, do_blkmap_common),
|
||||
|
@@ -173,7 +173,7 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
std->cur_bootflow = NULL;
|
||||
|
||||
flags = 0;
|
||||
flags = BOOTFLOWIF_ONLY_BOOTABLE;
|
||||
if (list)
|
||||
flags |= BOOTFLOWIF_SHOW;
|
||||
if (all)
|
||||
|
42
cmd/fs.c
42
cmd/fs.c
@@ -85,6 +85,34 @@ U_BOOT_CMD(
|
||||
" device type 'interface' instance 'dev'."
|
||||
);
|
||||
|
||||
static int do_mkdir_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_ANY);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
mkdir, 4, 1, do_mkdir_wrapper,
|
||||
"create a directory",
|
||||
"<interface> [<dev[:part]>] <directory>\n"
|
||||
" - Create a directory 'directory' of partition 'part' on\n"
|
||||
" device type 'interface' instance 'dev'."
|
||||
);
|
||||
|
||||
static int do_rm_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
return do_rm(cmdtp, flag, argc, argv, FS_TYPE_ANY);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
rm, 4, 1, do_rm_wrapper,
|
||||
"delete a file",
|
||||
"<interface> [<dev[:part]>] <filename>\n"
|
||||
" - delete a file with the name 'filename' on\n"
|
||||
" device type 'interface' instance 'dev'."
|
||||
);
|
||||
|
||||
static int do_fstype_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
@@ -110,3 +138,17 @@ U_BOOT_CMD(
|
||||
fstypes, 1, 1, do_fstypes_wrapper,
|
||||
"List supported filesystem types", ""
|
||||
);
|
||||
|
||||
static int do_mv_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
return do_mv(cmdtp, flag, argc, argv, FS_TYPE_ANY);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
mv, 5, 1, do_mv_wrapper,
|
||||
"rename/move a file/directory",
|
||||
"<interface> [<dev[:part]>] <old_path> <new_path>\n"
|
||||
" - renames/moves a file/directory in 'dev' on 'interface' from\n"
|
||||
" 'old_path' to 'new_path'"
|
||||
);
|
||||
|
63
cmd/fuse.c
63
cmd/fuse.c
@@ -15,17 +15,6 @@
|
||||
#include <vsprintf.h>
|
||||
#include <linux/errno.h>
|
||||
|
||||
static int strtou32(const char *str, unsigned int base, u32 *result)
|
||||
{
|
||||
char *ep;
|
||||
|
||||
*result = simple_strtoul(str, &ep, base);
|
||||
if (ep == str || *ep != '\0')
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int confirm_prog(void)
|
||||
{
|
||||
puts("Warning: Programming fuses is an irreversible operation!\n"
|
||||
@@ -54,14 +43,25 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
argc -= 2 + confirmed;
|
||||
argv += 2 + confirmed;
|
||||
|
||||
if (argc < 2 || strtou32(argv[0], 0, &bank) ||
|
||||
strtou32(argv[1], 0, &word))
|
||||
return CMD_RET_USAGE;
|
||||
if (IS_ENABLED(CONFIG_CMD_FUSE_WRITEBUFF) && !strcmp(op, "writebuff")) {
|
||||
if (argc == 1)
|
||||
addr = simple_strtoul(argv[0], NULL, 16);
|
||||
else
|
||||
return CMD_RET_USAGE;
|
||||
} else {
|
||||
if (argc < 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
bank = simple_strtoul(argv[0], NULL, 0);
|
||||
word = simple_strtoul(argv[1], NULL, 0);
|
||||
}
|
||||
|
||||
if (!strcmp(op, "read")) {
|
||||
if (argc == 2)
|
||||
cnt = 1;
|
||||
else if (argc != 3 || strtou32(argv[2], 0, &cnt))
|
||||
else if (argc == 3)
|
||||
cnt = simple_strtoul(argv[2], NULL, 0);
|
||||
else
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
printf("Reading bank %u:\n", bank);
|
||||
@@ -79,7 +79,9 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
} else if (!strcmp(op, "readm")) {
|
||||
if (argc == 3)
|
||||
cnt = 1;
|
||||
else if (argc != 4 || strtou32(argv[3], 0, &cnt))
|
||||
else if (argc == 4)
|
||||
cnt = simple_strtoul(argv[3], NULL, 0);
|
||||
else
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
addr = simple_strtoul(argv[2], NULL, 16);
|
||||
@@ -99,7 +101,9 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
|
||||
unmap_sysmem(start);
|
||||
} else if (!strcmp(op, "cmp")) {
|
||||
if (argc != 3 || strtou32(argv[2], 0, &cmp))
|
||||
if (argc == 3)
|
||||
cmp = simple_strtoul(argv[2], NULL, 0);
|
||||
else
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
printf("Comparing bank %u:\n", bank);
|
||||
@@ -119,7 +123,9 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
} else if (!strcmp(op, "sense")) {
|
||||
if (argc == 2)
|
||||
cnt = 1;
|
||||
else if (argc != 3 || strtou32(argv[2], 0, &cnt))
|
||||
else if (argc == 3)
|
||||
cnt = simple_strtoul(argv[2], NULL, 0);
|
||||
else
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
printf("Sensing bank %u:\n", bank);
|
||||
@@ -139,8 +145,7 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
for (i = 2; i < argc; i++, word++) {
|
||||
if (strtou32(argv[i], 16, &val))
|
||||
return CMD_RET_USAGE;
|
||||
val = simple_strtoul(argv[i], NULL, 16);
|
||||
|
||||
printf("Programming bank %u word 0x%.8x to 0x%.8x...\n",
|
||||
bank, word, val);
|
||||
@@ -155,8 +160,7 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
for (i = 2; i < argc; i++, word++) {
|
||||
if (strtou32(argv[i], 16, &val))
|
||||
return CMD_RET_USAGE;
|
||||
val = simple_strtoul(argv[i], NULL, 16);
|
||||
|
||||
printf("Overriding bank %u word 0x%.8x with "
|
||||
"0x%.8x...\n", bank, word, val);
|
||||
@@ -164,6 +168,15 @@ static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
} else if (IS_ENABLED(CONFIG_CMD_FUSE_WRITEBUFF) && !strcmp(op, "writebuff")) {
|
||||
printf("Programming fuses using a structured buffer in memory "
|
||||
"starting at addr 0x%lx\n", addr);
|
||||
if (!confirmed && !confirm_prog())
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
ret = fuse_writebuff(addr);
|
||||
if (ret)
|
||||
goto err;
|
||||
} else {
|
||||
return CMD_RET_USAGE;
|
||||
}
|
||||
@@ -189,5 +202,9 @@ U_BOOT_CMD(
|
||||
"fuse prog [-y] <bank> <word> <hexval> [<hexval>...] - program 1 or\n"
|
||||
" several fuse words, starting at 'word' (PERMANENT)\n"
|
||||
"fuse override <bank> <word> <hexval> [<hexval>...] - override 1 or\n"
|
||||
" several fuse words, starting at 'word'"
|
||||
" several fuse words, starting at 'word'\n"
|
||||
#ifdef CONFIG_CMD_FUSE_WRITEBUFF
|
||||
"fuse writebuff [-y] <addr> - program fuse data\n"
|
||||
" using a structured buffer in memory starting at 'addr'\n"
|
||||
#endif /* CONFIG_CMD_FUSE_WRITEBUFF */
|
||||
);
|
||||
|
@@ -15,6 +15,10 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
void __weak arch_dump_mem_attrs(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void print_region(const char *name, ulong base, ulong size, ulong *uptop)
|
||||
{
|
||||
ulong end = base + size;
|
||||
@@ -58,6 +62,8 @@ static int do_meminfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
if (!IS_ENABLED(CONFIG_CMD_MEMINFO_MAP))
|
||||
return 0;
|
||||
|
||||
arch_dump_mem_attrs();
|
||||
|
||||
printf("\n%-12s %8s %8s %8s %8s\n", "Region", "Base", "Size", "End",
|
||||
"Gap");
|
||||
printf("------------------------------------------------\n");
|
||||
|
@@ -27,9 +27,24 @@ U_BOOT_CMD(dns, 3, 1, do_dns, "lookup the IP of a hostname",
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CMD_WGET)
|
||||
U_BOOT_CMD(wget, 3, 1, do_wget,
|
||||
"boot image via network using HTTP/HTTPS protocol",
|
||||
U_BOOT_CMD(wget, 4, 1, do_wget,
|
||||
"boot image via network using HTTP/HTTPS protocol"
|
||||
#if defined(CONFIG_WGET_CACERT)
|
||||
"\nwget cacert - configure wget root certificates"
|
||||
#endif
|
||||
,
|
||||
"[loadAddress] url\n"
|
||||
"wget [loadAddress] [host:]path"
|
||||
"wget [loadAddress] [host:]path\n"
|
||||
" - load file"
|
||||
#if defined(CONFIG_WGET_CACERT)
|
||||
"\nwget cacert <address> <length>\n"
|
||||
" - provide CA certificates (0 0 to remove current)"
|
||||
"\nwget cacert none|optional|required\n"
|
||||
" - set server certificate verification mode (default: optional)"
|
||||
#if defined(CONFIG_WGET_BUILTIN_CACERT)
|
||||
"\nwget cacert builtin\n"
|
||||
" - use the builtin CA certificates"
|
||||
#endif
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
@@ -13,8 +13,8 @@
|
||||
static int do_mtrr_set(int cpu_select, uint reg, int argc, char *const argv[])
|
||||
{
|
||||
const char *typename = argv[0];
|
||||
uint32_t start, size;
|
||||
uint64_t base, mask;
|
||||
u64 start, size;
|
||||
u64 base, mask;
|
||||
int type = -1;
|
||||
bool valid;
|
||||
int ret;
|
||||
@@ -26,13 +26,12 @@ static int do_mtrr_set(int cpu_select, uint reg, int argc, char *const argv[])
|
||||
printf("Invalid type name %s\n", typename);
|
||||
return CMD_RET_USAGE;
|
||||
}
|
||||
start = hextoul(argv[1], NULL);
|
||||
size = hextoul(argv[2], NULL);
|
||||
start = hextoull(argv[1], NULL);
|
||||
size = hextoull(argv[2], NULL);
|
||||
|
||||
base = start | type;
|
||||
valid = native_read_msr(MTRR_PHYS_MASK_MSR(reg)) & MTRR_PHYS_MASK_VALID;
|
||||
mask = ~((uint64_t)size - 1);
|
||||
mask &= (1ULL << CONFIG_CPU_ADDR_BITS) - 1;
|
||||
mask = mtrr_to_mask(size);
|
||||
if (valid)
|
||||
mask |= MTRR_PHYS_MASK_VALID;
|
||||
|
||||
|
Reference in New Issue
Block a user