Add format functions to express BCT and bootloader data value

Add a new field to the value_data table, which is the function to
use to format the data value.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Add page_size validation when setting page_size value

The valid page_size value should be a power of two, so add this
check when setting page_size value.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Accept void pointer as input data type for get/set_value functions

This change uses void * as input data type for
cbootimage_soc_config.get/set_value and context_set_value functions.
This makes the functions can accept various data types based on
different tokens.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Add token_supported function

Add a function called token_supported in cbootimage_soc_config.
It is used to check if the input token is supported in specific
tegra soc.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Use block_size and page_size tokens when dump BCT data

Change to use block_size and page_size tokens instead of
block_size_log2 and page_size_log2 tokens when dump BCT
data.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Add Tegra124 bct data access for jtag control and chip uid

Add support for read secure_jtag_control and unique_chip_id from
cfg file and write them into BCT structure, and bct_dump can also
parse the two fields and show the data.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Add update BCT configs feature

This feature reads the BCT data from BCT or BCT with bootloader
appended binary, updates the BCT data based on config file, then
writes to new image file.

Signed-off-by: Penny Chiu <pchiu@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>