[Suit] SUIT architecture examples

David Brown <david.brown@linaro.org> Thu, 21 June 2018 17:20 UTC

Return-Path: <david.brown@linaro.org>
X-Original-To: suit@ietfa.amsl.com
Delivered-To: suit@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5F697130EA8 for <suit@ietfa.amsl.com>; Thu, 21 Jun 2018 10:20:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=linaro.org
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nuslMgrIqoTJ for <suit@ietfa.amsl.com>; Thu, 21 Jun 2018 10:20:45 -0700 (PDT)
Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1988B130E9F for <suit@ietf.org>; Thu, 21 Jun 2018 10:20:44 -0700 (PDT)
Received: by mail-it0-x22e.google.com with SMTP id l6-v6so5867374iti.2 for <suit@ietf.org>; Thu, 21 Jun 2018 10:20:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=UU16dTP6sYgZSPPWYnNvzPFIT7e/AaRidr/XyZxydV8=; b=SAzKP8xfnifj581uEq+czX7d2cejQFNkSilImckndS6MXBFQiSg+fuyUlfr4xQqcwq DhsUwGOSAwJYnbCzijxBYDcm4dCfC+nEU5RnYBUo/lVq1Gg1mp2llus2bVaYy6oLvdbz 8AHJHU0ZyCVVYKSLSaAfMNe2nrJw3zUu9fhqg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=UU16dTP6sYgZSPPWYnNvzPFIT7e/AaRidr/XyZxydV8=; b=iPld7KXa6/JZCU7HMYVnTSbXlrgle6AGEoEMO2UDRYdp+Ps4Wy7Y6uQaB58OrAtC+m mqr9l4qOX167A8IjT9s4leF7BZLPReuiG9GlFBA8+pvKhF/NCvu5OHw7aF/V0uSIwwf5 7HffrpBcII5ioA3pCx85b5xtwaT9GYwPCSdZIHUNeiG/jYUpb8FsBndubdqJ/aM5M2WL ehmHnm/DAotLzrFXHpZXPjiXDvFq0reqnk3orC2QFwa0bSQXjijpJhijKOnmxcThaqtd c3eTjWxXKhufUecOzvVzMDTEWdxDrM5KLMcMED+AZ5mWGiBBiSAMZb/v1NPGddu7rG7Y uwJg==
X-Gm-Message-State: APt69E3akHlU/tj7E5Oxn8GpLgwozPHwlrJRvwxFYlqGRfO9ADdpfQXh sDDKjr9XL3wHZGqrgtUvDVGw3LAtLfA=
X-Google-Smtp-Source: ADUXVKL4K/Zi4RAktcYLaesuaZVlQ6omGhLsyGG1rTgCgixStA9B4NBYkdoIQGZa8CJY8Hpr/Qeysw==
X-Received: by 2002:a02:2341:: with SMTP id u62-v6mr21761858jau.62.1529601643086; Thu, 21 Jun 2018 10:20:43 -0700 (PDT)
Received: from davidb.org ([2601:283:4300:987c::9]) by smtp.gmail.com with ESMTPSA id m76-v6sm2732296ioi.68.2018.06.21.10.20.42 for <suit@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 10:20:42 -0700 (PDT)
Date: Thu, 21 Jun 2018 11:20:40 -0600
From: David Brown <david.brown@linaro.org>
To: suit <suit@ietf.org>
Message-ID: <20180621172040.GA24927@davidb.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Content-Disposition: inline
User-Agent: Mutt/1.9.4 (2018-02-28)
Archived-At: <https://mailarchive.ietf.org/arch/msg/suit/TEsCDez2hIYMqET6zT3mhQDDDLM>
Subject: [Suit] SUIT architecture examples
X-BeenThere: suit@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Software Updates for Internet of Things <suit.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/suit>, <mailto:suit-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/suit/>
List-Post: <mailto:suit@ietf.org>
List-Help: <mailto:suit-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/suit>, <mailto:suit-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jun 2018 17:20:51 -0000

During today's SUIT meeting, we discussed writing up some known
example architectures of systems requiring firmware updates.  Attached
below is a draft of this writeup.

## Architectural examples

Although these documents attempt to define a firmware update
architecture that is applicable to both existing systems, as well as
yet-to-be-conceived systems; it is still helpful to consider existing
architectures.

### Single CPU SoC

The simplest, and currently most common, architecture consists of a
single MCU along with its own peripherals.  These SoCs generally
contain some amount of flash memory for code and fixed data, as well
as RAM for working storage.  These systems either have a single
firmware image, or an immutable bootloader that runs a single image.
A notable characteristic of these SoCs is that the primary code is
generally execute in place (XIP).  Combined with the non-relocatable
nature of the code, firmware updates need to be done in place.

### Single CPU with secure mode

Another configuration consists of a similar architecture to the
previous, with a single CPU.  However, this CPU supports a security
partitioning scheme that allows memory (in addition to other things)
to be divided into secure and non-secure.  There will generally be two
images, one for secure mode, and one for non-secure.  In this
configuration, firmware upgrades will generally be done by the CPU in
secure mode, which is able to write to both areas of the flash device.
In addition, there are requirements to be able to update either image
independently, as well as to update them together atomically, as
specified in the associated manifests.

### Dual CPU, shared memory

This configuration has two or more CPUs in a single SoC that share
memory (flash and RAM).  Generally, they will be a protection
mechanism to prevent one CPU from accessing the other's memory.
Upgrades in this case will typically be done by one of the CPUs, and
is similar to the single CPU with secure mode.

### Dual CPU, other bus

This configuration has two or more CPUs, each having their own memory.
There will be a communication channel between them, but it will be
used as a peripheral, not via shared memory.  In this case, each CPU
will have to be responsible for its own firmware upgrade.  It is
likely that one of the CPUs will be considered a master, and will
direct the other CPU to do the upgrade.  This configuration is
commonly used to offload specific work to other CPUs.  Firmware
dependencies are similar to the other solutions above, sometimes
allowing only one image to be upgraded, other times requiring several
to be upgraded atomically.  Because the updates are happening on
multiple CPUs, upgrading the two images atomically is challenging.