From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Jimmy Zhang <jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [tegrarcm PATCH V2 2/4] Add option --gen-signed-msgs and --signed-msgs-file to generate signed blobs
Date: Mon, 14 Mar 2016 12:58:45 -0600 [thread overview]
Message-ID: <56E709E5.30704@wwwdotorg.org> (raw)
In-Reply-To: <1457744552-30966-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 03/11/2016 06:02 PM, Jimmy Zhang wrote:
> This feature allows generation of signed blobs that can later be used
> to communicate with a PKC-enabled Tegra device without access to the
> PKC. Option --bootloader, --soc and --pkc are also required when generating
> the blob.
>
> Example:
> tegrarcm --gen-signed-msgs --signed-msgs-file rel_1001.bin \
> --bootloader u-boot.bin --loadaddr 0x83d88000 --soc 124 \
> --pkc rsa_priv.der
>
> Where generated signed message files are:
>
> a) rel_1001.bin.qry
> b) rel_1001.bin.ml
> c) rel_1001.bin.bl
> diff --git a/src/main.c b/src/main.c
> +#define FILENAME_MAX_SIZE 256
Why not use the standard PATH_MAX define?
> +static bool is_supported_soc(uint32_t soc, uint16_t *devid)
> +{
> + struct _soc_to_devid {
You can simply write "struct {" there.
> + uint32_t soc;
> + uint16_t usb_devid;
> + } soc_to_devid[] = {
> + {114, USB_DEVID_NVIDIA_TEGRA114},
> + {124, USB_DEVID_NVIDIA_TEGRA124},
> + };
More SoCs are supported than that; the function name seems a bit
generic. Perhaps is_soc_supported_for_signed_msgs()?
> static int initialize_rcm(uint16_t devid, usb_device_t *usb,
> - const char *pkc_keyfile)
> + const char *pkc_keyfile, const char *signed_msgs_file)
> + char query_version_rcm_filename[FILENAME_MAX_SIZE];
You can probably move that inside the "if (signed_msgs_file)" block to
reduce the scope. But ignore this comment if it would complicate the
next patch since the variable is used in more code there (I haven't
looked at that patch yet).
> @@ -466,7 +634,7 @@ static int initialize_miniloader(uint16_t devid, usb_device_t *usb, char *mlfile
> uint32_t miniloader_size;
> uint32_t miniloader_entry;
>
> - // use prebuilt miniloader if not loading from a file
> + // if using miniloader from an exteranl file
Nit: external
next prev parent reply other threads:[~2016-03-14 18:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 1:02 [tegrarcm PATCH V2 0/4] Add support for flashing PKC secured board Jimmy Zhang
[not found] ` <1457744552-30966-1-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-12 1:02 ` [tegrarcm PATCH V2 1/4] Add support for production devices secured with PKC Jimmy Zhang
[not found] ` <1457744552-30966-2-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-14 18:39 ` Stephen Warren
[not found] ` <56E70576.3050000-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-15 0:51 ` Jimmy Zhang
[not found] ` <f0f79d636da2412f8dad980e4114a4c8-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-15 16:20 ` Stephen Warren
2016-03-12 1:02 ` [tegrarcm PATCH V2 2/4] Add option --gen-signed-msgs and --signed-msgs-file to generate signed blobs Jimmy Zhang
[not found] ` <1457744552-30966-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-14 18:58 ` Stephen Warren [this message]
2016-03-12 1:02 ` [tegrarcm PATCH V2 3/4] Add option --download-signed-msgs to download " Jimmy Zhang
[not found] ` <1457744552-30966-4-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-14 19:17 ` Stephen Warren
[not found] ` <56E70E4F.80307-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-14 20:01 ` Jimmy Zhang
[not found] ` <41214cca62234ce1b7f238fa8fcb71aa-wO81nVYWzR7YuxH7O460wFaTQe2KTcn/@public.gmane.org>
2016-03-14 20:16 ` Stephen Warren
[not found] ` <56E71C30.7030503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-03-14 20:24 ` Jimmy Zhang
2016-03-12 1:02 ` [tegrarcm PATCH V2 4/4] Add option --usb-timeout=<value> Jimmy Zhang
[not found] ` <1457744552-30966-5-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-14 18:31 ` Stephen Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E709E5.30704@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=alban.bedel-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org \
--cc=amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.