Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Zynq Ultrascale-based System Board
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
DIOT Zynq Ultrascale-based System Board
Commits
42a40879
Commit
42a40879
authored
Jul 18, 2022
by
Alén Arias Vázquez
😎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove GW info
parent
bacb2c32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
66 deletions
+0
-66
diot_util.c
...t-spec/meta-user/recipes-apps/diot-util/files/diot_util.c
+0
-66
No files found.
sw/petalinux/project-spec/meta-user/recipes-apps/diot-util/files/diot_util.c
View file @
42a40879
...
...
@@ -78,7 +78,6 @@ struct string_map boot_mode_db[] = {
{
"nandboot"
,
"nand"
},
};
struct
command_entry
commands_list
[]
=
{
{
.
cmd_name
=
"status"
,
.
cmd_func
=
cmd_print_status
,
.
cmd_help_string
=
"Print status
\n
"
,
.
cmd_params
=
NULL
},
{
.
cmd_name
=
"exit"
,
.
cmd_func
=
cmd_exit
,
.
cmd_help_string
=
"quit program
\n
"
,
.
cmd_params
=
NULL
},
...
...
@@ -141,68 +140,6 @@ int cmd_exit(char *params)
exit
(
0
);
}
static
void
print_gw_info
(
void
)
{
struct
tm
build_date_s
;
char
name_c
[
9
]
=
{
[
0
...
8
]
=
0
};
char
build_date_c
[
80
]
=
{
[
0
...
79
]
=
0
};
char
git_tag_c
[
9
]
=
{
[
0
...
8
]
=
0
};
char
core_id_c
[
4
]
=
{
[
0
...
3
]
=
0
};
uintptr_t
auxaddr
=
FPGA_DEVICE_ADDR
;
int
fd
=
open
(
"/dev/mem"
,
O_RDWR
|
O_SYNC
);
if
(
fd
<
0
)
{
perror
(
"Failed in Open device"
);
return
fd
;
}
uint32_t
*
regs_32b
=
mmap
(
0
,
4096
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
auxaddr
);
if
(
regs_32b
==
MAP_FAILED
)
{
close
(
fd
);
perror
(
"Failed in Mmap device"
);
return
-
2
;
}
//! Read Core ID
uint32_t
aux_core_id
=
bswap_32
(
regs_32b
[
16
]);
memcpy
(
&
core_id_c
,
&
aux_core_id
,
4
);
//! Read Project Name
uint64_t
name_u64
=
bswap_64
(((
uint64_t
)
regs_32b
[
18
]
<<
32
)
+
(
uint64_t
)
regs_32b
[
17
]);
memcpy
(
&
name_c
,
&
name_u64
,
8
);
//! Read Build Date
time_t
date
=
(
time_t
)
regs_32b
[
19
];
build_date_s
=
*
localtime
(
&
date
);
strftime
(
build_date_c
,
sizeof
(
build_date_c
),
"%a %Y-%m-%d %H:%M:%S"
,
&
build_date_s
);
//! Read String Tag
uint64_t
git_tag_u64
=
bswap_64
(((
uint64_t
)
regs_32b
[
35
]
<<
32
)
+
(
uint64_t
)
regs_32b
[
34
]);
memcpy
(
&
git_tag_c
,
&
git_tag_u64
,
8
);
printf
(
"Gateware version information:
\n
"
);
printf
(
"VENDOR ID : %08x
\n
"
,
regs_32b
[
0
]);
printf
(
"DEVICE ID : %08x
\n
"
,
regs_32b
[
1
]);
printf
(
"VERSION : %08x
\n
"
,
regs_32b
[
2
]);
printf
(
"Byte Order Map : %08x
\n
"
,
regs_32b
[
3
]);
printf
(
"Source ID : %08x%08x%08x%08x
\n
"
,
regs_32b
[
7
],
regs_32b
[
6
],
regs_32b
[
5
],
regs_32b
[
4
]);
printf
(
"Capability Mask : %08x
\n
"
,
regs_32b
[
8
]);
printf
(
"UUID : %08x%08x%08x%08x
\n
"
,
regs_32b
[
15
],
regs_32b
[
14
],
regs_32b
[
13
],
regs_32b
[
12
]);
printf
(
"IP CORE ID : %s
\n
"
,
core_id_c
);
printf
(
"NAME : %s
\n
"
,
name_c
);
printf
(
"BUILD DATE : %s
\n
"
,
build_date_c
);
printf
(
"GIT HASH : %08x%08x%08x%08x%08x
\n
"
,
regs_32b
[
24
],
regs_32b
[
23
],
regs_32b
[
22
],
regs_32b
[
21
],
regs_32b
[
20
]);
printf
(
"DNA : %08x%08x%08x
\n
"
,
regs_32b
[
27
],
regs_32b
[
26
],
regs_32b
[
25
]);
printf
(
"GIT TAG : %s
\n\n
"
,
git_tag_c
);
close
(
fd
);
return
;
}
static
void
print_slot_status
(
void
)
{
int
i
;
...
...
@@ -446,9 +383,6 @@ int cmd_print_status(char *params)
printf
(
"----------------------------+--------------+
\n
"
);
printf
(
"
\n
"
);
//! Added FPGA DEVICE Info
print_gw_info
();
print_slot_status
();
printf
(
"
\n
"
);
print_fmc_status
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment