mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Joel Fernandes <joelagnelf@nvidia.com>,
	linux-kernel@vger.kernel.org, Danilo Krummrich <dakr@kernel.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jonathan Corbet <corbet@lwn.net>
Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Alexandre Courbot <acourbot@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Shirish Baskaran <sbaskaran@nvidia.com>,
	Alistair Popple <apopple@nvidia.com>,
	Timur Tabi <ttabi@nvidia.com>, Ben Skeggs <bskeggs@nvidia.com>,
	rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 4/7] nova-core: docs: Document fwsec operation and layout
Date: Mon, 5 May 2025 10:52:11 +0700	[thread overview]
Message-ID: <aBg163CasSBtciQH@archie.me> (raw)
In-Reply-To: <20250503040802.1411285-5-joelagnelf@nvidia.com>

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

On Sat, May 03, 2025 at 12:07:56AM -0400, Joel Fernandes wrote:
> +.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +=========================
> +FWSEC (Firmware Security)
> +=========================

Separate SPDX line from title heading.

> +Here is a block diagram of the FWSEC memory layout::

Add blank line before actual diagram below.

> + ┌───────────────────────────────────────────────────────────────┐
> + │                         FWSEC ROM image (type 0xE0)           │
> + │                                                               │
> + │  ┌─────────────────────────────────┐                          │
> + │  │     PMU Falcon Ucode Table      │                          │
> + │  │     (PmuLookupTable)            │                          │
> + │  │  ┌─────────────────────────┐    │                          │
> + │  │  │ Table Header            │    │                          │
> + │  │  │ - version: 0x01         │    │                          │
> + │  │  │ - header_size: 6        │    │                          │
> + │  │  │ - entry_size: 6         │    │                          │
> + │  │  │ - entry_count: N        │    │                          │
> + │  │  │ - desc_version:3(unused)│    │                          │
> + │  │  └─────────────────────────┘    │                          │
> + │  │         ...                     │                          │
> + │  │  ┌─────────────────────────┐    │                          │
> + │  │  │ Entry for FWSEC (0x85)  │    │                          │
> + │  │  │ (PmuLookupTableEntry)   │    │                          │
> + │  │  │ - app_id: 0x85 (FWSEC)  │ ───┼────┐                     │
> + │  │  │ - target_id: 0x01 (PMU) │    │    │                     │
> + │  │  │ - data: offset ─────────┼────┼────┼───┐ look up FWSEC   │
> + │  │  └─────────────────────────┘    │    │   │ application.    │
> + │  └─────────────────────────────────┘    │   │                 │
> + │                                         │   │                 │
> + │                                         │   │                 │
> + │  ┌─────────────────────────────────┐    │   │                 │
> + │  │     FWSEC Ucode Component       │<───┘   │                 │
> + │  │     (aka Falcon data)           │        │                 │
> + │  │  ┌─────────────────────────┐    │        │                 │
> + │  │  │ FalconUCodeDescV3       │<───┼────────┘                 │
> + │  │  │ - hdr                   │    │                          │
> + │  │  │ - stored_size           │    │                          │
> + │  │  │ - pkc_data_offset       │    │                          │
> + │  │  │ - interface_offset ─────┼────┼────────────────┐         │
> + │  │  │ - imem_phys_base        │    │                │         │
> + │  │  │ - imem_load_size        │    │                │         │
> + │  │  │ - imem_virt_base        │    │                │         │
> + │  │  │ - dmem_phys_base        │    │                │         │
> + │  │  │ - dmem_load_size        │    │                │         │
> + │  │  │ - engine_id_mask        │    │                │         │
> + │  │  │ - ucode_id              │    │                │         │
> + │  │  │ - signature_count       │    │    look up sig │         │
> + │  │  │ - signature_versions --------------+          │         │
> + │  │  └─────────────────────────┘    │     │          │         │
> + │  │         (no gap)                │     │          │         │
> + │  │  ┌─────────────────────────┐    │     │          │         │
> + │  │  │ Signatures Section      │<───┼─────┘          │         │
> + │  │  │ (384 bytes per sig)     │    │                │         │
> + │  │  │ - RSA-3K Signature 1    │    │                │         │
> + │  │  │ - RSA-3K Signature 2    │    │                │         │
> + │  │  │   ...                   │    │                │         │
> + │  │  └─────────────────────────┘    │                │         │
> + │  │                                 │                │         │
> + │  │  ┌─────────────────────────┐    │                │         │
> + │  │  │ IMEM Section (Code)     │    │                │         │
> + │  │  │                         │    │                │         │
> + │  │  │ Contains instruction    │    │                │         │
> + │  │  │ code etc.               │    │                │         │
> + │  │  └─────────────────────────┘    │                │         │
> + │  │                                 │                │         │
> + │  │  ┌─────────────────────────┐    │                │         │
> + │  │  │ DMEM Section (Data)     │    │                │         │
> + │  │  │                         │    │                │         │
> + │  │  │ ┌─────────────────────┐ │    │                │         │
> + │  │  │ │ Application         │ │<───┼────────────────┘         │
> + │  │  │ │ Interface Table     │ │    │                          │
> + │  │  │ │ (FalconAppifHdrV1)  │ │    │                          │
> + │  │  │ │ Header:             │ │    │                          │
> + │  │  │ │ - version: 0x01     │ │    │                          │
> + │  │  │ │ - header_size: 4    │ │    │                          │
> + │  │  │ │ - entry_size: 8     │ │    │                          │
> + │  │  │ │ - entry_count: N    │ │    │                          │
> + │  │  │ │                     │ │    │                          │
> + │  │  │ │ Entries:            │ │    │                          │
> + │  │  │ │ ┌─────────────────┐ │ │    │                          │
> + │  │  │ │ │ DEVINIT (ID 1)  │ │ │    │                          │
> + │  │  │ │ │ - id: 0x01      │ │ │    │                          │
> + │  │  │ │ │ - dmemOffset X ─┼─┼─┼────┐                          │
> + │  │  │ │ └─────────────────┘ │ │    │                          │
> + │  │  │ │ ┌─────────────────┐ │ │    │                          │
> + │  │  │ │ │ DMEMMAPPER(ID 4)│ │ │    │                          │
> + │  │  │ │ │ - id: 0x04      │ │ │    │ Used only for DevInit    │
> + │  │  │ │ │  (NVFW_FALCON_  │ │ │    │ application (not FWSEC)  │
> + │  │  │ │ │   APPIF_ID_DMEMMAPPER)   │                          │
> + │  │  │ │ │ - dmemOffset Y ─┼─┼─┼────┼─────┐                    │
> + │  │  │ │ └─────────────────┘ │ │    │     │                    │
> + │  │  │ └─────────────────────┘ │    │     │                    │
> + │  │  │                         │    │     │                    │
> + │  │  │ ┌─────────────────────┐ │    │     │                    │
> + │  │  │ │ DEVINIT Engine      │<┼────┘     │ Used by FWSEC      │
> + │  │  │ │ Interface           │ │    │     │         app.       │
> + │  │  │ └─────────────────────┘ │    │     │                    │
> + │  │  │                         │    │     │                    │
> + │  │  │ ┌─────────────────────┐ │    │     │                    │
> + │  │  │ │ DMEM Mapper (ID 4)  │<┼────+─────┘                    │
> + │  │  │ │ (FalconAppifDmemmapperV3)  │                          │
> + │  │  │ │ - signature: "DMAP" │ │    │                          │
> + │  │  │ │ - version: 0x0003   │ │    │                          │
> + │  │  │ │ - Size: 64 bytes    │ │    │                          │
> + │  │  │ │ - cmd_in_buffer_off │ │────┼────────────┐             │
> + │  │  │ │ - cmd_in_buffer_size│ │    │            │             │
> + │  │  │ │ - cmd_out_buffer_off│ │────┼────────────┼─────┐       │
> + │  │  │ │ - cmd_out_buffer_sz │ │    │            │     │       │
> + │  │  │ │ - init_cmd          │ │    │            │     │       │
> + │  │  │ │ - features          │ │    │            │     │       │
> + │  │  │ │ - cmd_mask0/1       │ │    │            │     │       │
> + │  │  │ └─────────────────────┘ │    │            │     │       │
> + │  │  │                         │    │            │     │       │
> + │  │  │ ┌─────────────────────┐ │    │            │     │       │
> + │  │  │ │ Command Input Buffer│<┼────┼────────────┘     │       │
> + │  │  │ │ - Command data      │ │    │                  │       │
> + │  │  │ │ - Arguments         │ │    │                  │       │
> + │  │  │ └─────────────────────┘ │    │                  │       │
> + │  │  │                         │    │                  │       │
> + │  │  │ ┌─────────────────────┐ │    │                  │       │
> + │  │  │ │ Command Output      │<┼────┼──────────────────┘       │
> + │  │  │ │ Buffer              │ │    │                          │
> + │  │  │ │ - Results           │ │    │                          │
> + │  │  │ │ - Status            │ │    │                          │
> + │  │  │ └─────────────────────┘ │    │                          │
> + │  │  └─────────────────────────┘    │                          │
> + │  └─────────────────────────────────┘                          │
> + │                                                               │
> + └───────────────────────────────────────────────────────────────┘

The diagram can look messy on certain fonts in htmldocs output. Please
use ASCII dash (-) and vertical bar (|) instead of Unicode box decoration
variant (─ and │).

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-05-05  3:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-03  4:07 [PATCH v2 0/7] Documentation for nova-core Joel Fernandes
2025-05-03  4:07 ` [PATCH v2 1/7] nova-core: doc: Add code comments related to devinit Joel Fernandes
2025-05-03  4:07 ` [PATCH v2 2/7] nova-core: doc: Clarify sysmembar operations Joel Fernandes
2025-05-03  4:07 ` [PATCH v2 3/7] nova-core: docs: Document vbios layout Joel Fernandes
2025-05-05  3:00   ` Bagas Sanjaya
2025-05-05  3:12     ` Bagas Sanjaya
2025-05-03  4:07 ` [PATCH v2 4/7] nova-core: docs: Document fwsec operation and layout Joel Fernandes
2025-05-05  3:52   ` Bagas Sanjaya [this message]
2025-05-06 16:26   ` Zhi Wang
2025-05-09 20:56     ` Joel Fernandes
2025-05-03  4:07 ` [PATCH v2 5/7] docs: nova-core: Document devinit process Joel Fernandes
2025-05-05  4:04   ` Bagas Sanjaya
2025-05-05 22:15     ` Joel Fernandes
2025-05-03  4:07 ` [PATCH v2 6/7] docs: nova-core: Document basics of the Falcon Joel Fernandes
2025-05-05  4:14   ` Bagas Sanjaya
2025-05-05 21:37     ` Joel Fernandes
2025-05-03  4:07 ` [PATCH v2 7/7] gpu: nova-core: Clarify falcon code Joel Fernandes
2025-05-06 16:21   ` Zhi Wang
2025-05-09 20:59     ` Joel Fernandes
2025-06-30 10:37 ` [PATCH v2 0/7] Documentation for nova-core Danilo Krummrich
2025-06-30 11:33   ` 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=aBg163CasSBtciQH@archie.me \
    --to=bagasdotme@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=apopple@nvidia.com \
    --cc=bskeggs@nvidia.com \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sbaskaran@nvidia.com \
    --cc=simona@ffwll.ch \
    --cc=ttabi@nvidia.com \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®