Zephyr policy updates 20260727 - #795
Open
bentheredonethat wants to merge 14 commits into
Open
Conversation
Support current ZynqMP direct-IPM and Versal mailbox signaling, combine contiguous RPMsg carveouts into zephyr,ipc_shm, and improve relation-target diagnostics and Lopper logging. Keep Zephyr memory permissions and linker placement outside the shared OpenAMP transform. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Normalize ZynqMP IPI bindings and local-view RPU memory node names while preserving explicit zephyr,sram, zephyr,memory-region, and zephyr,memory-attr properties during generic domain pruning. Leave MPU permission and linker placement generation to their dedicated assists. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Add ZynqMP Libmetal and domain-access fixtures for Linux UIO and R5 bare-metal endpoints. Verify timer, IPI, interrupt, bus, and shared-memory output through the complete Libmetal workflow. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Add a common Cortex-R memory model for Zephyr linker and MPU generation. Resolve domain-owned memories, normalize permissions and processor-local TCM addresses, infer R5/R52 boot profiles, and validate section placement without requiring an OpenAMP relation or compatible. Keep resource-table section registration in a separate optional OpenAMP extension while allowing the shared model to validate that placement. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Add the standalone zephyr-mpu assist for Cortex-R execution domains. Emit standard zephyr,memory-region and zephyr,memory-attr properties, select the validated boot memory through zephyr,sram, and remove transformation-only policy metadata. Expand R5 DDR ranges to a representable power-of-two MPU aperture while leaving R52 base-limit ranges exact. Retain openamp-zephyr-mpu as a backward-compatible command alias. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Add the standalone zephyr-linker assist and package the Zephyr 4.3 Cortex-R linker ABI. Generate a complete primary script with independent vector, text, rodata, data, BSS, no-init, heap, stack, and constrained custom section placement without requiring a Zephyr source checkout. Emit a resolved layout report and delegate optional resource-table rendering to the OpenAMP extension. Retain openamp-zephyr-linker as a backward-compatible command alias. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Cover R5 TCM boot, R52 TCM and DDR boot, representable R5 DDR MPU apertures, independent and custom linker placement, and Zephyr ABI conflict rejection. Run MPU and linker generation before IMUX and final Zephyr domain transforms to verify conventional metadata and placement survive the complete OpenAMP pipeline. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Document shared OpenAMP processing, dedicated Zephyr MPU and complete-linker generation, generic domain pruning, Libmetal output, responsibility boundaries, and validation in the final workflow. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Flatten readable domain-local linker and section nodes into properties before domain-access pruning. Resolve memory references to phandles and remove temporary metadata. Add direct validation for resolved memories, offsets, unsupported sections, and hierarchy removal. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
bentheredonethat
force-pushed
the
zephyr-policy-updates-20260727-ben
branch
from
August 3, 2026 21:57
7dfc5fc to
fca4a43
Compare
Add standalone Cortex-R5 linker and MPU coverage using a plain Zephyr domain without an OpenAMP compatible, relation, reserved-memory, or resource table. Verify memory-name disambiguation and the public zephyr_linker and zephyr_mpu command paths. Add ZynqMP and Versal OpenAMP demo policies with MPU and linker placement metadata. Place the 4 KiB RAM console at the end of the existing firmware carveout and split the YAML-side RPROC0 region so trace policy remains distinct without requiring a Linux devicetree change. Test the complete transforms and resource-table output against the final firmware and trace carveout layout. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Allow a Zephyr memory policy to mark a region as static when the SoC MPU table already provides its mapping. Keep the region available to linker placement while suppressing a duplicate zephyr,memory-attr entry, so narrower dynamic policies can retain MPU priority over broad static mappings. Document the static flag in the generated workflow and cover R52 TCM and DDR layouts, overlap checks, and linker-managed memory behavior in sanity tests. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Extend the Versal2 OpenAMP reference overlay with Zephyr Cortex-R52 MPU permissions and linker placement metadata. Cover both TCM and DDR boot memory while retaining the existing IPC and resource-table carveout layout. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Add a read-only assist mode that lists IPI controllers owned by a selected processor, existing RPMsg and Libmetal mappings, and usable bidirectional mailbox pairs. Share the platform-neutral discovery and reporting helpers through openamp_xlnx_common while keeping command-line dispatch in the Xilinx OpenAMP assist. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Define the domain-YAML contract used to generate Zephyr Cortex-R linker scripts and conventional MPU memory metadata. Document supported permissions, the static mapping flag, linker section placement, boot profiles, generated properties, and standalone assist commands. Clarify that this policy is independent of OpenAMP relations and identify resource-table placement as an optional OpenAMP-specific extension. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
bentheredonethat
force-pushed
the
zephyr-policy-updates-20260727-ben
branch
from
August 4, 2026 00:11
fca4a43 to
7db3ac0
Compare
Collaborator
|
I'm out of the office, back on Wednesday and will review these then. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @zeddii -- there are spec updates so user can specify Domain YAML linker and MPU characteristics for Zephyr
Importantly, gen_domain_dts does not generate MPU permissions or linker scripts. It preserves the results produced by the dedicated assists.
Hi @sivadur @kedareswararao there are the gen-domain changes for:
It does the following:
Preserves nodes explicitly marked with:
compatible = "zephyr,memory-region";
Preserves nodes referenced from /chosen, including:
zephyr,sram = "...";
zephyr,ipc_shm = "...";
Prevents the generic Zephyr domain transformation from overwriting an already selected zephyr,sram.
Renames R5/R52 memory nodes to match their processor-local reg addresses and updates /chosen references after the rename.
Preserves these generated properties during pruning:
zephyr,memory-region
zephyr,memory-attr
zephyr,sram
Normalizes ZynqMP IPI mailbox properties for Zephyr:
xlnx,ipi-id → local-ipi-id
xlnx,ipi-id → remote-ipi-id
reg-names = "host_ipi_reg"
status = "okay"
Removes incompatible properties from destination mailbox children where required.
Extends the supported-compatible policy for:
Intended execution order
Domain YAML
↓
YAML expansion
↓
zephyr-mpu
├── emits zephyr,memory-region
├── emits zephyr,memory-attr
└── selects /chosen/zephyr,sram
↓
zephyr-linker
├── writes the linker script
└── writes the layout report
↓
gen_domain_dts
├── prunes the domain
├── preserves generated Zephyr metadata
├── fixes local RPU memory names
└── produces the final Zephyr DTS