Skip to contentSkip to conversation

Add support for Tegra210

PATCH Superseded Jimmy Zhang 1 participant 3 messages Mar 20, 2015 1 message not in the archive Tegra architecture support

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for Tegra210

Four t210 specific supporting files are added under src/t210 diretory. Comparing T210 bct to T132 bct, the main changes include the size increased to 10240 from 8704. The number of boot devices that can be specified in bct is reduced from 4 to 1. And many new fileds are added to nvboot_sdram_params.

v1: Initial changes
v2: Fix some minor issues found in v1
Removed files src/t210/nvboot_config.h and src/t210/sdram_param.h
that were added unintentionally in v1.

Jimmy Zhang (2):
Add support for Tegra210
Bump to version 1.5

 configure.ac                       |    2 +-
 src/Makefile.am                    |   12 +-
 src/bct_dump.c                     |    1 +
 src/cbootimage.c                   |   10 +-
 src/cbootimage.h                   |    6 +-
 src/data_layout.c                  |    2 +
 src/parse.c                        |    1 +
 src/parse.h                        |  390 ++++++
 src/set.c                          |    6 +
 src/t210/nvbctlib_t210.c           | 2314 ++++++++++++++++++++++++++++++++++++
 src/t210/nvboot_bct_t210.h         |  406 +++++++
 src/t210/nvboot_sdram_param_t210.h |  953 +++++++++++++++
 src/t210/parse_t210.c              |  741 ++++++++++++
 13 files changed, 4835 insertions(+), 9 deletions(-)
 create mode 100644 src/t210/nvbctlib_t210.c
 create mode 100644 src/t210/nvboot_bct_t210.h
 create mode 100644 src/t210/nvboot_sdram_param_t210.h
 create mode 100644 src/t210/parse_t210.c
Signature · 1 line
1.8.1.5

A message that is not in the archive (sent off-list or not yet received): 1426895131-16433-1-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

#2 lore raw

PATCH v2 1/2 Add support for Tegra210

This patch adds support for Tegra210. The command option is

--soc tegra210 or -s tegra210

T210 specific files are added under src/t210 directory.

Main changes from earlier soc are many new fileds are added to structure nvboot_sdram_params and the number of boot devices that can be defined within bct is reduced from 4 to 1.

---
 src/Makefile.am                    |   12 +-
 src/bct_dump.c                     |    1 +
 src/cbootimage.c                   |   10 +-
 src/cbootimage.h                   |    6 +-
 src/data_layout.c                  |    2 +
 src/parse.c                        |    1 +
 src/parse.h                        |  390 ++++++
 src/set.c                          |    6 +
 src/t210/nvbctlib_t210.c           | 2314 ++++++++++++++++++++++++++++++++++++
 src/t210/nvboot_bct_t210.h         |  406 +++++++
 src/t210/nvboot_sdram_param_t210.h |  953 +++++++++++++++
 src/t210/parse_t210.c              |  741 ++++++++++++
 12 files changed, 4834 insertions(+), 8 deletions(-)
 create mode 100644 src/t210/nvbctlib_t210.c
 create mode 100644 src/t210/nvboot_bct_t210.h
 create mode 100644 src/t210/nvboot_sdram_param_t210.h
 create mode 100644 src/t210/parse_t210.c
src/Makefile.am +10 -2
index 90f0bdfaf93c..64c4ea52b8e2 100644
@@ -11,11 +11,13 @@ cbootimage_SOURCES = \
 	aes_ref.c \
 	context.c \
 	parse.c \
+	t210/parse_t210.c \
 	t132/parse_t132.c \
 	t124/parse_t124.c \
 	t114/parse_t114.c \
 	t30/parse_t30.c \
 	t20/parse_t20.c \
+	t210/nvbctlib_t210.c \
 	t132/nvbctlib_t132.c \
 	t124/nvbctlib_t124.c \
 	t114/nvbctlib_t114.c \
@@ -37,7 +39,9 @@ cbootimage_SOURCES = \
 	t124/nvboot_bct_t124.h \
 	t124/nvboot_sdram_param_t124.h \
 	t132/nvboot_bct_t132.h \
-	t132/nvboot_sdram_param_t132.h
+	t132/nvboot_sdram_param_t132.h \
+	t210/nvboot_bct_t210.h \
+	t210/nvboot_sdram_param_t210.h
 
 cbootimage_LDADD = -lm
 
@@ -49,11 +53,13 @@ bct_dump_SOURCES = \
 	aes_ref.c \
 	context.c \
 	parse.c \
+	t210/parse_t210.c \
 	t132/parse_t132.c \
 	t124/parse_t124.c \
 	t114/parse_t114.c \
 	t30/parse_t30.c \
 	t20/parse_t20.c \
+	t210/nvbctlib_t210.c \
 	t132/nvbctlib_t132.c \
 	t124/nvbctlib_t124.c \
 	t114/nvbctlib_t114.c \
@@ -75,4 +81,6 @@ bct_dump_SOURCES = \
 	t124/nvboot_bct_t124.h \
 	t124/nvboot_sdram_param_t124.h \
 	t132/nvboot_bct_t132.h \
-	t132/nvboot_sdram_param_t132.h
+	t132/nvboot_sdram_param_t132.h \
+	t210/nvboot_bct_t210.h \
+	t210/nvboot_sdram_param_t210.h
src/bct_dump.c +1 -0
index e2181b251ff9..be7b85dc72d6 100644
@@ -53,6 +53,7 @@ static value_data const values[] = {
 	{ token_partition_size,      "PartitionSize = ", format_u32_hex8 },
 	{ token_odm_data,            "OdmData       = ", format_u32_hex8 },
 	{ token_secure_jtag_control, "JtagCtrl      = ", format_u32_hex8 },
+	{ token_secure_debug_control, "DebugCtrl     = ", format_u32_hex8 },
 	{ token_unique_chip_id,      "ChipUid       = ", format_chipuid },
 	{ token_bootloader_used,     "# Bootloader used       = ", format_u32 },
 	{ token_bootloaders_max,     "# Bootloaders max       = ", format_u32 },
src/cbootimage.c +6 -4
index 5f746e343634..f0516dd256ee 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2015, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -71,11 +71,11 @@ usage(void)
 	printf("    -gbct                 Generate the new bct file.\n");
 	printf("    -o<ODM_DATA>          Specify the odm_data(in hex).\n");
 	printf("    -t|--tegra NN         Select target device. Must be one of:\n");
-	printf("                          20, 30, 114, 124, 132.\n");
-	printf("                          Default: 20. This option is deprecated\n");
+	printf("                          20, 30, 114, 124, 132, 210.\n");
+	printf("                          Default: 20.\n");
 	printf("    -s|--soc tegraNN      Select target device. Must be one of:\n");
 	printf("                          tegra20, tegra30, tegra114, tegra124,\n");
-	printf("                          tegra132.\n");
+	printf("                          tegra132, tegra210.\n");
 	printf("                          Default: tegra20.\n");
 	printf("    -u|--update           Copy input image data and update bct\n");
 	printf("                          configs into new image file.\n");
@@ -131,6 +131,8 @@ process_command_line(int argc, char *argv[], build_image_context *context)
 				t124_get_soc_config(context, &g_soc_config);
 			} else if (!strcasecmp("132", optarg)) {
 				t132_get_soc_config(context, &g_soc_config);
+			} else if (!strcasecmp("210", optarg)) {
+				t210_get_soc_config(context, &g_soc_config);
 			} else {
 				printf("Unsupported chipname!\n");
 				usage();
src/cbootimage.h +4 -2
index c33e32344df8..9706b2c1edb8 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2015, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -45,10 +45,11 @@
 #define BOOTDATA_VERSION_T114		NVBOOT_BOOTDATA_VERSION(0x35, 0x1)
 #define BOOTDATA_VERSION_T124		NVBOOT_BOOTDATA_VERSION(0x40, 0x1)
 #define BOOTDATA_VERSION_T132		NVBOOT_BOOTDATA_VERSION(0x13, 0x1)
+#define BOOTDATA_VERSION_T210		NVBOOT_BOOTDATA_VERSION(0x21, 0x1)
 
 #define MAX_MTS_SIZE (4 * 1024 * 1024)
 
-#define NVBOOT_CONFIG_TABLE_SIZE_MAX 8704
+#define NVBOOT_CONFIG_TABLE_SIZE_MAX (10 * 1024)
 
 /*
  * Enumerations
@@ -111,6 +112,7 @@ typedef struct build_image_context_rec
 	u_int32_t odm_data; /* The odm data value */
 	u_int8_t unique_chip_id[16]; /* The unique chip uid */
 	u_int8_t secure_jtag_control; /* The flag for enabling jtag control */
+	u_int32_t secure_debug_control; /* The flag for enabling jtag control */
 	u_int8_t update_image; /* The flag for updating image */
 } build_image_context;
 
src/data_layout.c +2 -0
index 01f00ab29f8a..1e1c82b79c01 100644
@@ -1034,6 +1034,8 @@ int data_is_valid_bct(build_image_context *context)
 		return 1;
 	if (if_bct_is_t132_get_soc_config(context, &g_soc_config))
 		return 1;
+	if (if_bct_is_t210_get_soc_config(context, &g_soc_config))
+		return 1;
 
 	return 0;
 }
src/parse.c +1 -0
index f866ad5aa538..8c9824437393 100644
@@ -115,6 +115,7 @@ static parse_item s_top_level_items[] = {
 	{ "OdmData=",       token_odm_data,		parse_value_u32 },
 	{ "ChipUid=",       token_unique_chip_id,	parse_value_chipuid },
 	{ "JtagCtrl=",	    token_secure_jtag_control,	parse_value_u32 },
+	{ "DebugCtrl=",	    token_secure_debug_control,	parse_value_u32 },
 	{ NULL, 0, NULL } /* Must be last */
 };
 
src/parse.h +390 -0

596 lines not on this page · raw message

src/set.c +6 -0
index ff32b53ce5f7..e1498c44f48f 100644
@@ -242,6 +242,12 @@ int context_set_value(build_image_context *context,
 			value, context->bct);
 		break;
 
+	case token_secure_debug_control:
+		context->secure_debug_control = *((u_int32_t *)value);
+		g_soc_config->set_value(token_secure_debug_control,
+			value, context->bct);
+		break;
+
 	case token_unique_chip_id:
 		memcpy(context->unique_chip_id, value, 16);
 		g_soc_config->set_value(token_unique_chip_id,
src/t210/nvbctlib_t210.c new file +2314 -0

2,274 lines not on this page · raw message

src/t210/nvboot_bct_t210.h new file +406 -0

406 lines not on this page · raw message

src/t210/nvboot_sdram_param_t210.h new file +953 -0

953 lines not on this page · raw message

src/t210/parse_t210.c new file +741 -0

741 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.8.1.5

Part of the diff is not shown here. View the raw message.

#3 lore raw

PATCH v2 2/2 Bump to version 1.5

In reply to a message not in the archive

Create a release that includes Tegra210 support.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index cc3999eabead..17264ce8c2d7 100644
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.67])
-AC_INIT([cbootimage], [1.4], [[email protected]])
+AC_INIT([cbootimage], [1.5], [[email protected]])
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([src/cbootimage.c])
 AC_CONFIG_HEADERS([config.h])
Signature · 1 line
1.8.1.5