All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Liming Sun <lsun@mellanox.com>
Cc: Andy Shevchenko <andy@infradead.org>,
	Darren Hart <dvhart@infradead.org>,
	Vadim Pasternak <vadimp@mellanox.com>,
	David Woods <dwoods@mellanox.com>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] platform/mellanox: Add bootctl driver for Mellanox BlueField Soc
Date: Thu, 31 Jan 2019 19:02:18 +0200	[thread overview]
Message-ID: <CAHp75Vfr7+NONzthw=E77BqLb06=wgfmNqu7D01fkcNQMqUCsQ@mail.gmail.com> (raw)
In-Reply-To: <1548953587-12719-1-git-send-email-lsun@mellanox.com>

On Thu, Jan 31, 2019 at 6:53 PM Liming Sun <lsun@mellanox.com> wrote:
>
> This commit adds the bootctl platform driver for Mellanox BlueField
> Soc, which controls the eMMC boot partition swapping and sends SMC
> calls to ATF running at exception level EL3 to program some system
> register. This register is only accessible in secure code and is
> used to enable the watchdog after reboot.
>
> Below are the sequences of a typical use case.
>
>   1. User-space tool upgrades one eMMC boot partition and requests
>      the boot partition swapping;
>
>   2. The bootctl driver handles such request and sends SMC call
>      to ATF. ATF programs register BREADCRUMB0 which has value
>      preserved during software reset. It also programs eMMC to
>      swap the boot partition;
>
>   3. After software reset (rebooting), ATF BL1 (BootRom) checks
>      register BREADCRUMB0 to enable watchdog if configured;
>
>   4. If booting fails, the watchdog timer will trigger rebooting.
>      In such case, ATF BootRom will switch the boot partition
>      to the previous one.

Thanks for an update. My comments below.


> Reviewed-by: David Woods <dwoods@mellanox.com>

I'm not sure I see this guy to review v2. Of course if you consider
all changes minor, you may leave this tag.

> Signed-off-by: Liming Sun <lsun@mellanox.com>
> ---

Here should be a changelog what had been done in new version.
> +/* UUID used to probe ATF service. */

> +static const char * const mlxbf_bootctl_svc_uuid_str =
> +       "89c036b4-e7d7-11e6-8797-001aca00bfc4";

static const char *xxx = ...;

> +/*
> + * UUID structure used to match the returned value from ATF in
> + * four 32-bit words. No need to do endian conversion here.
> + */
> +union mlxbf_bootctl_uuid {
> +       guid_t guid;
> +       u32 words[4];
> +};

I'm not sure it's the best you can do. instead of using union, better
to use conversion from and to corresponding uuid type.

The rest I will comment on v3.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2019-01-31 17:02 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 20:59 [PATCH v1 1/1] platform/mellanox: Add bootctl driver for Mellanox BlueField Soc Liming Sun
2019-01-29 22:03 ` Andy Shevchenko
2019-01-30  6:24   ` Vadim Pasternak
2019-01-30 20:56     ` Liming Sun
2019-01-30 20:47   ` Liming Sun
2019-01-30 21:17     ` Andy Shevchenko
2019-01-31 16:53       ` Liming Sun
2019-01-31 16:53 ` [PATCH v2] " Liming Sun
2019-01-31 17:02   ` Andy Shevchenko [this message]
2019-01-31 17:18     ` Liming Sun
2019-01-31 19:20       ` Liming Sun
2019-01-31 19:19 ` [PATCH v3] " Liming Sun
2019-02-01  5:16 ` [PATCH v1 1/1] " kbuild test robot
2019-02-01  5:16   ` kbuild test robot
2019-02-01 20:48   ` Liming Sun
2019-02-01 20:48     ` Liming Sun
2019-02-01 20:46 ` [PATCH v4] " Liming Sun
2019-02-05 17:21   ` Andy Shevchenko
2019-05-17 17:49     ` Liming Sun
2019-05-17 17:49 ` [PATCH v5 1/2] " Liming Sun
2019-05-20 15:56   ` Greg KH
2019-05-20 18:07     ` Liming Sun
2019-05-20 18:07       ` Liming Sun
2019-05-20 19:12       ` Greg KH
2019-05-20 19:12         ` Greg KH
2019-05-20 20:43         ` Liming Sun
2019-05-20 20:43           ` Liming Sun
2019-05-21  7:58           ` Arnd Bergmann
2019-05-21  7:58             ` Arnd Bergmann
2019-05-22 15:12             ` Liming Sun
2019-05-22 15:12               ` Liming Sun
2019-05-22 13:34   ` Mark Rutland
2019-05-22 14:51     ` Liming Sun
2019-05-22 14:51       ` Liming Sun
2019-05-17 17:49 ` [PATCH v5 2/2] platform/mellanox/mlxbf-bootctl: Add the ABI definitions Liming Sun
2019-05-17 17:59   ` Greg Kroah-Hartman
2019-05-17 20:36     ` Liming Sun
2019-05-17 20:36       ` Liming Sun
2019-05-18  6:35       ` Greg Kroah-Hartman
2019-05-18  6:35         ` Greg Kroah-Hartman
2019-05-20 15:20         ` Liming Sun
2019-05-20 15:20           ` Liming Sun
2019-05-20 15:53           ` Greg Kroah-Hartman
2019-05-20 15:53             ` Greg Kroah-Hartman
2019-10-07 15:48 ` [PATCH v6 1/2] platform/mellanox: Add bootctl driver for Mellanox BlueField Soc Liming Sun
2019-10-07 15:48 ` [PATCH v6 2/2] platform/mellanox/mlxbf-bootctl: Add the ABI definitions Liming Sun

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='CAHp75Vfr7+NONzthw=E77BqLb06=wgfmNqu7D01fkcNQMqUCsQ@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=dwoods@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsun@mellanox.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=vadimp@mellanox.com \
    /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.