Skip to content

readme: add some highlevel detail around the boot flow.#10609

Open
lgirdwood wants to merge 1 commit intothesofproject:mainfrom
lgirdwood:readme-init
Open

readme: add some highlevel detail around the boot flow.#10609
lgirdwood wants to merge 1 commit intothesofproject:mainfrom
lgirdwood:readme-init

Conversation

@lgirdwood
Copy link
Member

Describe the boot flow and manifest.

Describe the boot flow and manifest.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Copilot AI review requested due to automatic review settings March 9, 2026 12:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds high-level documentation for src/init describing the SOF firmware boot flow (primary/secondary cores) and the extended firmware manifest layout.

Changes:

  • Documented primary core boot sequence, including initialization ordering and key subsystems
  • Documented secondary core boot sequence for cold boot vs restore paths
  • Added an overview of the extended manifest structure embedded in .fw_metadata

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +19
participant sof_init as sof_init (src/init.c)
participant pci as primary_core_init
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Mermaid diagram, pci is used as the participant alias for primary_core_init. This is easy to misread as the PCI bus/subsystem. Consider renaming the alias to something unambiguous (e.g., pcore, pc_init, or primary) to avoid confusion in the rendered diagram.

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +42
Zephyr->>sof_init: SYS_INIT (POST_KERNEL)
sof_init->>pci: Initialize Primary Core Context

pci->>trace: Setup DMA Tracing & Logging
pci->>notify: Setup System Notifiers
pci->>pm: Initialize Runtime Power Management

pci->>platform: Platform-Specific HW Config
note right of platform: e.g., interrupts, IPC windows (Intel, i.MX)

pci->>ams: Init Asynchronous Messaging Service

pci->>mbox: Set Firmware Registers ABI Version

pci->>task: Start SOF Main Processing Task Loop
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Mermaid diagram, pci is used as the participant alias for primary_core_init. This is easy to misread as the PCI bus/subsystem. Consider renaming the alias to something unambiguous (e.g., pcore, pc_init, or primary) to avoid confusion in the rendered diagram.

Copilot uses AI. Check for mistakes.
3. **System Subsystems**:
- Initializes the system notifier (`init_system_notify()`) for inter-component messaging.
- Sets up runtime power management (`pm_runtime_init()`).
4. **Platform-Specific Initialization**: Calls `platform_init()` to allow the specific hardware platform (e.g., Intel cAVS, IMX) to configure its hardware IPs, interrupts, and IPC mailbox memory windows.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform naming is inconsistent: earlier the note uses i.MX, while this line uses IMX. Please standardize the spelling/capitalization (e.g., i.MX) so readers don’t assume these refer to different platforms.

Suggested change
4. **Platform-Specific Initialization**: Calls `platform_init()` to allow the specific hardware platform (e.g., Intel cAVS, IMX) to configure its hardware IPs, interrupts, and IPC mailbox memory windows.
4. **Platform-Specific Initialization**: Calls `platform_init()` to allow the specific hardware platform (e.g., Intel cAVS, i.MX) to configure its hardware IPs, interrupts, and IPC mailbox memory windows.

Copilot uses AI. Check for mistakes.
end
```

1. **Power State Checking**: It checks if the core is cold booting or waking up from a low-power restore state (e.g., D0ix) via `check_restore()`. If returning from power off, it restores state without re-allocating core structures.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence mixes 'low-power restore' (e.g., D0ix) with 'returning from power off', which can be interpreted as a full power-gate/reset scenario. Consider clarifying the exact condition check_restore() covers (retention/restore vs full power-off) so the restore path description is not contradictory.

Suggested change
1. **Power State Checking**: It checks if the core is cold booting or waking up from a low-power restore state (e.g., D0ix) via `check_restore()`. If returning from power off, it restores state without re-allocating core structures.
1. **Power State Checking**: It checks if the core is cold booting or resuming from a low-power retention/restore state (e.g., D0ix) via `check_restore()`. In the restore case, it restores state without re-allocating core structures; in the cold-boot case, it follows the full initialization path described below.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants