• M
    edac.h: Add generic layers for describing a memory location · 982216a4
    Mauro Carvalho Chehab 提交于
    The edac core were written with the idea that memory controllers
    are able to directly access csrows, and that the channels are
    used inside a csrows select.
    
    This is not true for FB-DIMM and RAMBUS memory controllers.
    
    Also, some recent advanced memory controllers don't present a per-csrows
    view. Instead, they view memories as DIMMs, instead of ranks, accessed
    via csrow/channel.
    
    So, changes are needed in order to allow the EDAC core to
    work with all types of architectures.
    
    In preparation for handling non-csrows based memory controllers,
    add some memory structs and a macro:
    
    enum hw_event_mc_err_type: describes the type of error
    			   (corrected, uncorrected, fatal)
    
    To be used by the new edac_mc_handle_error function;
    
    enum edac_mc_layer: describes the type of a given memory
    architecture layer (branch, channel, slot, csrow).
    
    struct edac_mc_layer: describes the properties of a memory
    		      layer (type, size, and if the layer
    		      will be used on a virtual csrow.
    
    EDAC_DIMM_PTR() - as the number of layers can vary from 1 to 3,
    this macro converts from an address with up to 3 layers into
    a linear address.
    Reviewed-by: NBorislav Petkov <bp@amd64.org>
    Cc: Doug Thompson <norsk5@yahoo.com>
    Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
    982216a4
edac.h 20.0 KB