soc: nuvoton: add Composite EAT mailbox client - #578
Open
helloxiling wants to merge 5 commits into
Open
Conversation
NPCM clients can be removed while the threaded mailbox IRQ is handling a response. The existing shutdown path frees channel metadata before the mailbox core clears the client pointer. This can race the controller handler and client callback. Keep channel metadata for the controller lifetime, mark it inactive before shutdown, and synchronize the IRQ. Also acknowledge inactive doorbells so the shared IRQ cannot retrigger indefinitely. Signed-off-by: xilingsun <xilingsun@microsoft.com>
Describe the NPCM845 mailbox client used to request signed Composite EAT tokens from TIP firmware. Document the scratchpad resource, mailbox doorbell, and fixed ABI version 1 reserved-memory layout. Signed-off-by: xilingsun <xilingsun@microsoft.com>
Define a versioned ioctl interface for submitting a bounded Composite EAT request and receiving the signed response. Use aligned 64-bit user pointers for an identical compat layout, publish all firmware status values, and reserve ioctl type 0xE6. Signed-off-by: xilingsun <xilingsun@microsoft.com>
Add an ioctl-only NPCM mailbox client that copies a bounded request into the ABI version 1 shared-memory window. Return the signed Composite EAT response generated by TIP firmware. Serialize submissions, correlate request and response IDs, and quarantine timed-out shared memory until the matching late response. Validate firmware metadata, support compat ioctl, and keep open file descriptors safe across driver removal. Signed-off-by: xilingsun <xilingsun@microsoft.com>
Exercise the stable ioctl layout, request and response bounds, and fixed shared-memory geometry. Also cover request ID wraparound, in-flight rejection, stale responses, and timeout quarantine recovery. The suite is hardware independent and remains optional unless KUNIT_ALL_TESTS is selected. Signed-off-by: xilingsun <xilingsun@microsoft.com>
helloxiling
marked this pull request as ready for review
August 25, 2026 04:35
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.
Depends on #576 (
mailbox: synchronize NPCM channel shutdown).GitHub requires the base branch to exist in the upstream repository, while the
dependency branch currently exists only in the contributor fork. Therefore this
draft temporarily includes the #576 mailbox commit followed by the four
Composite EAT commits. After #576 merges, this branch will be rebased onto the
updated
NPCM-6.12-OpenBMCtarget so the mailbox commit drops from the diff. Thefour-commit client series will then be revalidated before leaving draft status.
Summary
/dev/npcm-composite-eat, an ioctl-only mailbox clientFeature gating
CONFIG_NPCM_COMPOSITE_EATdefaults to disabled. The generic client PR does not add or enable a board node. With the option disabled, the driver object and symbols are absent.ABI v1
0x11; mailbox channel 4 / notification0x100xF0800E60..0xF0800E7F0x06201000, size0x50000x1000; response region0x40000xE6, command 1; structure size 48 bytesValidation
git diff --check: passW=1affected-directory build: pass