Add basic low-level operatations for CXL-capable PCI devices #12415
Add basic low-level operatations for CXL-capable PCI devices #12415gonzoua wants to merge 7 commits intotianocore:masterfrom
Conversation
Add CXL CDAT structure definitions to Cxl30.h Signed-off-by: Nick Graves <nicholasgraves@google.com> Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
|
Thanks for this contribution. High level feedback before even having looked at the actual code: MdePkg is meant for protocols and other definitions that are derived from an external (i.e., non-edk2) spec, e.g., UEFI, PI, ACPI, etc. As I understand from the commit log, the CxlIo protocol being proposed here is not defined in such a spec today. So there are two options:
I think the second option is more appropriate here, and we can always start a parallel track to promote the protocol once it lands in one of the industry specifications. (Btw no need to go and repaint everything right way - we can take a bit of time to review and discuss the implementation first) |
839cdf2 to
045be1f
Compare
- Add Data Object Exchange registers to the PCIe headers. - Add Data Object Exchange bits to the CXL 3.0 headers. Signed-off-by: Nick Graves <nicholasgraves@google.com> Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Add the rest of the CDAT structures described in the specification. Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Create a CXL protocol for interacting with CXL endpoint devices. CXL devices are necessarily also PCI devices, so the PCI IO protocol is also provided as part of the CXL protocol. The protocol provides access to the following operations for CXL devices: - Read from a DVSEC register block - Write to a DVSEC register block - Perform DOE transaction This set of operation is sufficient to implement BIOS-level CXL functionality. Signed-off-by: Nick Graves <nicholasgraves@google.com> Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Add CxlDxe driver that provides CxlIo protocol. Co-authored-by: Abhishek Narvaria <abhi.n@samsung.com> Co-authored-by: Alok Rathore <alok.rathore@samsung.com> Co-authored-by: Nick Graves <nicholasgraves@google.com> Co-authored-by: Ryan Heise <heiserya@google.com> Co-authored-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com> Co-authored-by: Sweta Kumari <s5.kumari@samsung.com> Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Include CXL support in the form of CxlDxe to OVMF package. Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Add a 'cxl' command to list and query CXL devices. Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
|
@gonzoua can you please add some comments as to what you're changing with each update? |
|
@leiflindholm Do you mean comments for PR iterations (force-pushes)? Series of force-pushes up until commit 045be1f was a CI faliures clean-up: there was a number of issues with Doxygen comments and implicit int types conversion that caused VS build to fail. Commit 3ee87dd push - addressed @ardbiesheuvel's comment. I moved the CxlIo protocol to MdeModulePkg and switched it to using EDKII prefix/namespace. Commit 198c86b push - commit message fix, I forgot to change MdePkg to MdeModulePkg in the previous modification. |
Description
The pull request introduced a new CxlIo protocol that provides a basic operations to communicate with CXL-capable devices:
CxlDxe driver implements the protocol and binds it to CXL-capable PCI devices.
Driver code is partially based on two patchsets:
The patchsets' authors are attributed in the commit message.
On the Google's side @NicholasGraves and Ryan Heise did most of the work on the CxlIo design and implementation. The development history was squashed for brevity.
The PR also introduces
cxlcommand for a basic introspection of CXL devices:How This Was Tested
Build
Test
Start QEMU:
Navigate menu and start UEFI shell, in shell use the following commands
Integration Instructions
N/A