• Jithu Joseph's avatar
    platform/x86/intel/ifs: Add current_batch sysfs entry · 4fb858f3
    Jithu Joseph authored
    Initial implementation assumed a single IFS test image file with a
    fixed name ff-mm-ss.scan. (where ff, mm, ss refers to family, model and
    stepping of the core).
    
    Subsequently, it became evident that supporting more than one test
    image file is needed to provide more comprehensive test coverage. (Test
    coverage in this scenario refers to testing more transistors in the core
    to identify faults).
    
    The other alternative of increasing the size of a single scan test image
    file would not work as the  upper bound is limited by the size of memory
    area reserved by BIOS for loading IFS test image.
    
    Introduce "current_batch" file which accepts a number. Writing a
    number to the current_batch file would load the test image file by
    name ff-mm-ss-<xy>.scan, where <xy> is the number written to the
    "current_batch" file in hex. Range check of the input is done to verify
    it not greater than 0xff.
    
    For e.g if the scan test image comprises of 6 files, they would be named:
    
      06-8f-06-01.scan
      06-8f-06-02.scan
      06-8f-06-03.scan
      06-8f-06-04.scan
      06-8f-06-05.scan
      06-8f-06-06.scan
    
    And writing 3 to current_batch would result in loading 06-8f-06-03.scan
    above. The file can also be read to know the currently loaded file.
    
    And testing a system looks like:
    
      for each scan file
      do
      	load the IFS test image file (write to the batch file)
      	for each core
      	do
      		test the core with this set of tests
      	done
      done
    
    Qualify few error messages with the test image file suffix to provide
    better context.
    
      [ bp: Massage commit message. Add link to the discussion. ]
    Signed-off-by: default avatarJithu Joseph <jithu.joseph@intel.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
    Reviewed-by: default avatarSohil Mehta <sohil.mehta@intel.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    Link: https://lore.kernel.org/r/20221107225323.2733518-13-jithu.joseph@intel.com
    4fb858f3
load.c 8.32 KB