Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update BARs and Telemetry #248

Merged
merged 4 commits into from
Sep 10, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions src/driver/doc/amdnpu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,28 @@ instance of ERT. Each user channel is bound to its own dedicated mailbox.
PCIe EP
-------

NPU is visible to the x86 as a PCIe device with 3 BARS and an MSI-X interrupt
NPU is visible to the x86 as a PCIe device with multiple BARs and an MSI-X interrupt
mamin506 marked this conversation as resolved.
Show resolved Hide resolved
vector. NPU uses a dedicated high bandwidth SoC level fabric for reading
writing into host memory. Each instance of ERT gets its own dedicated MSI-X
interrupt. MERT gets a single instance of MSI-X interrupt.

TODO, briefly describe the BARs
The number of PCIe BARs varies depending on the specific device.
Based on their functions, PCIe BARs can generally be categorized into the
following types.

* PSP BAR: Expose the AMD PSP(Platform Security Processor) function
mamin506 marked this conversation as resolved.
Show resolved Hide resolved
* SMU BAR: Expose the AMD SMU(System Management Unit) function
mamin506 marked this conversation as resolved.
Show resolved Hide resolved
* SRAM BAR: Expose ring buffers for the mailbox
* Mailbox BAR: Expose the mailbox control registers(head, tail and isr registers etc.)
mamin506 marked this conversation as resolved.
Show resolved Hide resolved
* Public Register BAR: Expose public registers

On specific devices, the above-mentioned BAR type might be combined into a single physical PCIe BAR.
Or a BAR type might require two physical PCIe BARs to fully functional.
mamin506 marked this conversation as resolved.
Show resolved Hide resolved
For example,

* On NPU1 device, PSP, SMU, Public Register BARs are on PCIe BAR index 0.
* On NPU4 device, Mailbox and Public Register BARs are on PCIe BAR index 0.
The PSP BAR has some registers in PCIe BAR index 0 and PCIe BAR index 4.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we change PSP BAR to PSP and say:
The PSP has has some registers in PCIe BAR index 0 and PCIe BAR index 4.

Copy link
Contributor Author

@mamin506 mamin506 Sep 10, 2024

Choose a reason for hiding this comment

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

Because in the bullet item list, I use "PSP BAR", "SMU BAR". Maybe I should said,

A module might require two physical PCIe BARs to be fully functional.
...
The PSP has has some registers in PCIe BAR index 0 (Public Register BAR) and PCIe BAR index 4 (PSP BAR).


Process Isolation Hardware
--------------------------
Expand Down Expand Up @@ -245,7 +261,10 @@ Telemetry
=========

MERT can report various kinds of telemetry information like
mamin506 marked this conversation as resolved.
Show resolved Hide resolved
TODO, list the key ones
* L1 interrupt counter
* DMA counter
* Deep Sleep counter
* etc.


References
Expand Down