All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Emil Velikov
	<emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alexandre Courbot
	<acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ML nouveau
	<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [Nouveau] [PATCH v2 2/5] core: add support for secure boot
Date: Thu, 21 Jan 2016 22:13:46 +1000	[thread overview]
Message-ID: <56A0CB7A.9010104@gmail.com> (raw)
In-Reply-To: <CACvgo50P8JQ5EkCEMmnGQGO4jMsc0O4cRB1QO04V0KQS7Y8AYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]

On 01/21/2016 10:09 PM, Emil Velikov wrote:
> Hi Alexandre,
> 
> On 18 January 2016 at 06:10, Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> 
> [snip]
>> +static const char *
>> +managed_falcons_names[] = {
>> +       [NVKM_SECBOOT_FALCON_PMU] = "PMU",
>> +       [NVKM_SECBOOT_FALCON_RESERVED] = "<invalid>",
> "<reserved>" perhaps ? we already have one invalid below.
Does <reserved> really mean: "we don't want to tell you?" here? :)

> 
>> +       [NVKM_SECBOOT_FALCON_FECS] = "FECS",
>> +       [NVKM_SECBOOT_FALCON_GPCCS] = "GPCCS",
>> +       [NVKM_SECBOOT_FALCON_END] = "<invalid>",
>> +};
>> +
> 
> [snip]
>> +int
>> +nvkm_secboot_ctor(const struct nvkm_secboot_func *func,
>> +                 struct nvkm_device *device, int index,
>> +                 struct nvkm_secboot *sb)
>> +{
>> +       unsigned long fid;
>> +
>> +       nvkm_subdev_ctor(&nvkm_secboot, device, index, 0, &sb->subdev);
>> +       sb->func = func;
>> +
> Move these two after the switch statement ?
They need to be done here to make the failure path cleanup stuff work
correctly, so it's correct as-is.

> 
>> +       /* setup the performing falcon's base address and masks */
>> +       switch (func->boot_falcon) {
>> +       case NVKM_SECBOOT_FALCON_PMU:
>> +               sb->base = 0x10a000;
>> +               sb->irq_mask = 0x1000000;
>> +               sb->enable_mask = 0x2000;
>> +               break;
>> +       default:
>> +               nvdev_error(device, "invalid secure boot falcon\n");
>> +               return -EINVAL;
>> +       };
>> +
>> +       nvkm_info(&sb->subdev, "securely managed falcons:\n");
>> +       for_each_set_bit(fid, &sb->func->managed_falcons,
>> +                        NVKM_SECBOOT_FALCON_END)
>> +               nvkm_info(&sb->subdev, "- %s\n", managed_falcons_names[fid]);
>> +
>> +       return 0;
>> +}
> 
> Cheers,
> Emil
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-01-21 12:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  6:10 [PATCH v2 0/5] nouveau: add secure boot support for dGPU and Tegra Alexandre Courbot
     [not found] ` <1453097447-12152-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-18  6:10   ` [PATCH v2 1/5] core: add gpuobj memcpy helper functions Alexandre Courbot
2016-01-18  6:10   ` [PATCH v2 2/5] core: add support for secure boot Alexandre Courbot
     [not found]     ` <1453097447-12152-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-21 12:09       ` [Nouveau] " Emil Velikov
     [not found]         ` <CACvgo50P8JQ5EkCEMmnGQGO4jMsc0O4cRB1QO04V0KQS7Y8AYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-21 12:13           ` Ben Skeggs [this message]
     [not found]             ` <56A0CB7A.9010104-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-21 12:31               ` Emil Velikov
     [not found]                 ` <CACvgo53cqvn73=Ks-syi=12eO7vrjRcwKJHpgfHh75hHT0sPkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-25  2:15                   ` [Nouveau] " Alexandre Courbot
     [not found]                     ` <CAAVeFuLXwo0hb7Z_h3+gOA4u+fp0u=zLPuGxFBW+uY0MsQY-aQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-25  2:17                       ` Alexandre Courbot
2016-01-18  6:10   ` [PATCH v2 3/5] gr: support for securely-booted FECS firmware Alexandre Courbot
2016-01-18  6:10   ` [PATCH v2 4/5] secboot/gm200: add secure-boot support Alexandre Courbot
2016-01-18  6:10   ` [PATCH v2 5/5] secboot/gm20b: add secure boot support Alexandre Courbot

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=56A0CB7A.9010104@gmail.com \
    --to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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.