Commit 42a40879 authored by Alén Arias Vázquez's avatar Alén Arias Vázquez 😎

remove GW info

parent bacb2c32
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment