From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [tegrarcm PATCH 2/2] tegrarcm: Add support for loading MTS
Date: Wed, 11 Mar 2015 11:46:29 +0100 [thread overview]
Message-ID: <20150311104624.GP19577@ulmo.nvidia.com> (raw)
In-Reply-To: <1421194802-28198-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3773 bytes --]
On Tue, Jan 13, 2015 at 04:20:02PM -0800, Jimmy Zhang wrote:
> From: Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> The Denver CPU in Tegra132 requires microcode to be loaded before CPU
> initialization. There are two microcode files required, "preboot" MTS
> and MTS proper. Add support for loading MTS from either the binary
> versions checked in or from the command line.
>
> Signed-off-by: Allen Martin <amartin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> src/Makefile.am | 14 +-
> src/bin2h.sh | 9 ++
> src/main.c | 241 ++++++++++++++++++++++++++++++++--
> src/miniloader/tegra132-mts.h | 13 ++
> src/miniloader/tegra132-preboot-mts.h | 13 ++
> src/nv3p.c | 19 +++
> src/nv3p.h | 9 ++
> src/rcm.h | 1 +
> src/tegrarcm.1.in | 7 +
> 9 files changed, 314 insertions(+), 12 deletions(-)
> create mode 100755 src/bin2h.sh
> create mode 100644 src/miniloader/tegra132-mts.h
> create mode 100644 src/miniloader/tegra132-preboot-mts.h
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index d0d45cad4fee..0e9ff1bbd7f3 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1,6 +1,14 @@
> AM_CFLAGS = -Wall -std=c99
> AM_CPPFLAGS = -isystem /usr/include/$(CRYPTOLIB) $(LIBUSB_CFLAGS)
>
> +MTS_FIRMWARE_DIR ?= ../../mts-firmware
> +
> +miniloader/mts_si.h: $(MTS_FIRMWARE_DIR)/mts_si bin2h.sh
> + ./bin2h.sh $< $@
> +
> +miniloader/mts_preboot_si.h: $(MTS_FIRMWARE_DIR)/mts_preboot_si bin2h.sh
> + ./bin2h.sh $< $@
> +
> bin_PROGRAMS = tegrarcm
> tegrarcm_SOURCES = \
> main.c \
Given that these binaries now live in an external repository I think it
makes sense not to generate them in this fashion. The problem is that a
future chip might also require MTS files, in which case it becomes very
unclear where to put which, what version of the binaries to use, etc.
To avoid all that I'd just go with the command-line options and rely on
them exclusively for specifying the MTS binaries to use. In fact I think
we should make that the default for the miniloader as well going forward
to avoid having to further bloat the tegrarcm binary with every new SoC
generation.
> @@ -117,6 +131,16 @@ static void usage(char *progname)
> fprintf(stderr, "\t\tminiloader\n");
> fprintf(stderr, "\t--miniloader_entry=<mlentry>\n");
> fprintf(stderr, "\t\tSpecify the entry point for the miniloader\n");
> + fprintf(stderr, "\t--preboot=pbfile\n");
> + fprintf(stderr, "\t\tRead the preboot mts ucode from file instead of using built-in\n");
> + fprintf(stderr, "\t\tpreboot mts\n");
> + fprintf(stderr, "\t--preboot_entry=<pbentry>\n");
Can we please change this to --preboot-entry...
> + fprintf(stderr, "\t\tSpecify the entry point for the preboot mts ucode\n");
> + fprintf(stderr, "\t--mts=mtsfile\n");
> + fprintf(stderr, "\t\tRead the mts ucode from file instead of using built-in\n");
> + fprintf(stderr, "\t\tmts\n");
> + fprintf(stderr, "\t--mts_entry=<mtsentry>\n");
and this to --mts-entry? I know we've used underscores in the past, but
they are very unconventional in command-line options and I mistype them
every time.
I have local patches to convert the existing command-line options from
underscores to dashes as well. I'll send those out after these patches
have been applied.
There are a couple of other nitpicks, but since I have changes in my
tree (among other things Tegra210 support) that I need to rebase on this
anyway, how about I take over these two patches and resend them as part
of another series?
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-11 10:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 0:20 [tegrarcm PATCH 0/2] Add T132 support Jimmy Zhang
[not found] ` <1421194802-28198-1-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-01-14 0:20 ` [tegrarcm PATCH 1/2] tegrarcm: Add Tegra132 support Jimmy Zhang
[not found] ` <1421194802-28198-2-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-03-11 10:38 ` Thierry Reding
2015-01-14 0:20 ` [tegrarcm PATCH 2/2] tegrarcm: Add support for loading MTS Jimmy Zhang
[not found] ` <1421194802-28198-3-git-send-email-jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-03-11 10:46 ` Thierry Reding [this message]
[not found] ` <20150311104624.GP19577-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-03-11 15:37 ` Stephen Warren
[not found] ` <b7c1cba9c31042d4a8be3756f5f78455-wO81nVYWzR5AOoK4uxnQ11aTQe2KTcn/@public.gmane.org>
2015-03-12 7:51 ` Thierry Reding
2015-01-14 17:03 ` [tegrarcm PATCH 0/2] Add T132 support Stephen Warren
2015-03-11 10:34 ` Thierry Reding
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=20150311104624.GP19577@ulmo.nvidia.com \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@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.