• Kan Liang's avatar
    perf/x86/intel/uncore: Add Sapphire Rapids server framework · c54c53d9
    Kan Liang authored
    Intel Sapphire Rapids supports a discovery mechanism, that allows an
    uncore driver to discover the different components ("boxes") of the
    chip.
    
    All the generic information of the uncore boxes should be retrieved from
    the discovery tables. This has been enabled with the commit edae1f06
    ("perf/x86/intel/uncore: Parse uncore discovery tables"). Add
    use_discovery to indicate the case. The uncore driver doesn't need to
    hard code the generic information for each uncore box.
    But we still need to enable various functionality that cannot be
    directly discovered.
    
    To support these functionalities, the Sapphire Rapids server framework
    is introduced here. Each specific uncore unit will be added into the
    framework in the following patches.
    
    Add use_discovery to indicate that the discovery mechanism is required
    for the platform. Currently, Intel Sapphire Rapids is one of the
    platforms.
    
    The box ID from the discovery table is the accurate index. Use it if
    applicable.
    
    All the undiscovered platform-specific features will be hard code in the
    spr_uncores[]. Add uncore_type_customized_copy(), instead of the memcpy,
    to only overwrite these features.
    
    The specific uncore unit hasn't been added here. From user's
    perspective, there is nothing changed for now.
    Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
    Link: https://lore.kernel.org/r/1625087320-194204-2-git-send-email-kan.liang@linux.intel.com
    c54c53d9
uncore_discovery.h 3.66 KB