Zephyr policy updates 20260727 - #795
Conversation
fca4a43 to
7db3ac0
Compare
|
I'm out of the office, back on Wednesday and will review these then. |
|
@zeddii ok thank you! |
|
Thanks @bentheredonethat — this is well-structured and the split is right (linker/MPU in dedicated assists, 1. Rebase needed. #790 just merged, and it touches 2. Rename may leave stale references to the renamed node. It looks to me like
3. Guard the IPI id access. In Minor (non-blocking): the rename uses With the rebase + items 2 and 3 addressed, this is good to go. |
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>
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>
7db3ac0 to
c1677ff
Compare
|
@zeddii rebased , updated , pushed! |
Handle Libmetal relations independently from RPMsg relations during Xilinx OpenAMP processing. Resolve each relation mailbox and expose its destination bitmask on the parent UIO IPI controller for Linux consumers. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Use idiomatic truth, identity, membership, and generator checks throughout the Xilinx OpenAMP assists. Tighten relation and mailbox validation, handle missing domains safely, and correct timer and chosen-node references while preserving the existing processing flow. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Update all matching chosen and symbol paths when RPU TCM nodes adopt their processor-local unit addresses. Resolve and sync the tree after structural edits so phandle consumers continue to target the renamed node, and cover chosen, symbol, and phandle references with a regression test. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Only convert ZynqMP mailbox IPI identifiers when the source property exists, avoiding KeyError for otherwise valid mailbox nodes. Retain the existing local and remote identifier conversions when the property is present and cover both paths with focused tests. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
c1677ff to
fd4be07
Compare
Zephyr's ZynqMP and Versal R5 timer configuration refers to the ttc0 nodelabel, while an SDT domain can retain a differently labeled TTC or more than one TTC. Normalize the domain-local result instead of making Zephyr select an arbitrary compatible instance. Preserve an explicitly mapped ttc0 and otherwise promote the first TTC retained by domain access. Accept both cdns,ttc and xlnx,ttcps inputs, update the symbols node, and cover single, multiple, compatible, and non-R5 cases. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
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