linux/drivers/cxl
Robert Richter d5b1a27143 cxl/acpi: Extract component registers of restricted hosts from RCRB
A downstream port must be connected to a component register block.
For restricted hosts the base address is determined from the RCRB. The
RCRB is provided by the host's CEDT CHBS entry. Rework CEDT parser to
get the RCRB and add code to extract the component register block from
it.

RCRB's BAR[0..1] point to the component block containing CXL subsystem
component registers. MEMBAR extraction follows the PCI base spec here,
esp. 64 bit extraction and memory range alignment (6.0, 7.5.1.2.1). The
RCRB base address is cached in the cxl_dport per-host bridge so that the
upstream port component registers can be retrieved later by an RCD
(RCIEP) associated with the host bridge.

Note: Right now the component register block is used for HDM decoder
capability only which is optional for RCDs. If unsupported by the RCD,
the HDM init will fail. It is future work to bypass it in this case.

Co-developed-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://lore.kernel.org/r/Y4dsGZ24aJlxSfI1@rric.localdomain
[djbw: introduce devm_cxl_add_rch_dport()]
Link: https://lore.kernel.org/r/166993044524.1882361.2539922887413208807.stgit@dwillia2-xfh.jf.intel.com
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2022-12-03 00:40:29 -08:00
..
core cxl/acpi: Extract component registers of restricted hosts from RCRB 2022-12-03 00:40:29 -08:00
acpi.c cxl/acpi: Extract component registers of restricted hosts from RCRB 2022-12-03 00:40:29 -08:00
cxl.h cxl/acpi: Extract component registers of restricted hosts from RCRB 2022-12-03 00:40:29 -08:00
cxlmem.h cxl/pmem: Refactor nvdimm device registration, delete the workqueue 2022-12-02 23:07:22 -08:00
cxlpci.h cxl/port: Read CDAT table 2022-07-19 15:38:05 -07:00
Kconfig cxl/region: Allocate HPA capacity to regions 2022-07-25 12:18:06 -07:00
Makefile PM: CXL: Disable suspend 2022-04-22 16:09:42 -07:00
mem.c cxl/pmem: Refactor nvdimm device registration, delete the workqueue 2022-12-02 23:07:22 -08:00
pci.c cxl/pmem: Refactor nvdimm device registration, delete the workqueue 2022-12-02 23:07:22 -08:00
pmem.c cxl/pmem: Remove the cxl_pmem_wq and related infrastructure 2022-12-02 23:07:22 -08:00
port.c cxl/port: Read CDAT table 2022-07-19 15:38:05 -07:00