Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
cxl/mem: Add CDAT table reading from DOE
This patch simply provides some debug print outs of the entries at probe time + a sysfs binary attribute to allow dumping of the whole table. Binary dumping is modelled on /sys/firmware/ACPI/tables/ The ability to dump this table will be very useful for emulation of real devices once they become available as QEMU CXL type 3 device emulation will be able to load this file in. Open questions: * No support here for table updates. Worth including these from the start, or leave that complexity for later? * Worth logging the reported info for debug, or is the binary attribute sufficient? Larger open question of whether to expose this info to userspace or not left for another day! * Where to put the CDAT file? Is it worth a subdirectory? * What is maximum size of the SSLBIS entry - I haven't quite managed to figure that out and this is the record with largest size. We could support dynamic allocation of the record size, but it would add complexity that seems unnecessary. It would not be compliant with the specification for a type 3 memory device to report this record anyway so I'm not that worried about this for now. It will become relevant once we have support for reading CDAT from CXL switches. * cdat.h is formatted in a similar style to pci_regs.h on basis that it may well be helpful to share this header with userspace tools. * Move the generic parts of this out to driver/cxl/cdat.c or leave that until we have other CXL drivers wishing to use this? Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
- Loading branch information