• Dan Williams's avatar
    cxl/acpi: Introduce cxl_decoder objects · 40ba17af
    Dan Williams authored
    A cxl_decoder is a child of a cxl_port. It represents a hardware decoder
    configuration of an upstream port to one or more of its downstream
    ports. The decoder is either represented in CXL standard HDM decoder
    registers (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder Capability
    Structure), or it is a static decode configuration communicated by
    platform firmware (see the CXL Early Discovery Table: Fixed Memory
    Window Structure).
    
    The firmware described and hardware described decoders differ slightly
    leading to 2 different sub-types of decoders, cxl_decoder_root and
    cxl_decoder_switch. At the root level the decode capabilities restrict
    what can be mapped beneath them. Mid-level switch decoders are
    configured for either acclerator (type-2) or memory-expander (type-3)
    operation, but they are otherwise agnostic to the type of memory
    (volatile vs persistent) being mapped.
    
    Here is an example topology from a single-ported host-bridge environment
    without CFMWS decodes enumerated.
    
        /sys/bus/cxl/devices/root0
        ├── devtype
        ├── dport0 -> ../../../LNXSYSTM:00/LNXSYBUS:00/ACPI0016:00
        ├── port1
        │   ├── decoder1.0
        │   │   ├── devtype
        │   │   ├── locked
        │   │   ├── size
        │   │   ├── start
        │   │   ├── subsystem -> ../../../../../../bus/cxl
        │   │   ├── target_list
        │   │   ├── target_type
        │   │   └── uevent
        │   ├── devtype
        │   ├── dport0 -> ../../../../pci0000:34/0000:34:00.0
        │   ├── subsystem -> ../../../../../bus/cxl
        │   ├── uevent
        │   └── uport -> ../../../../LNXSYSTM:00/LNXSYBUS:00/ACPI0016:00
        ├── subsystem -> ../../../../bus/cxl
        ├── uevent
        └── uport -> ../../ACPI0017:00
    Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    Link: https://lore.kernel.org/r/162325695128.2293823.17519927266014762694.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    40ba17af
sysfs-bus-cxl 4.83 KB