File: addrmap.c

package info (click to toggle)
u-boot 2025.01-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 330,740 kB
  • sloc: ansic: 2,627,855; python: 60,773; sh: 41,641; asm: 21,854; makefile: 15,048; perl: 12,447; cs: 6,763; cpp: 1,868; yacc: 1,100; lex: 747; awk: 57; tcl: 32; sed: 24
file content (34 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com>
 */

#include <command.h>
#include <addr_map.h>

static int do_addrmap(struct cmd_tbl *cmdtp, int flag, int argc,
		      char *const argv[])
{
	int i;

	printf("           vaddr            paddr             size\n");
	printf("================ ================ ================\n");

	for (i = 0; i < CONFIG_SYS_NUM_ADDR_MAP; i++) {
		if (address_map[i].size == 0)
			continue;

		printf("%16.8lx %16.8llx %16.8llx\n",
		       address_map[i].vaddr,
		       (unsigned long long)address_map[i].paddr,
		       (unsigned long long)address_map[i].size);
	}

	return 0;
}

U_BOOT_CMD(
	addrmap,	1,	1,	do_addrmap,
	"List non-identity virtual-physical memory mappings for 32-bit CPUs",
	""
);