• Lukas Wunner's avatar
    efi/cper: Fix endianness of PCIe class code · 6fb9367a
    Lukas Wunner authored
    The CPER parser assumes that the class code is big endian, but at least
    on this edk2-derived Intel Purley platform it's little endian:
    
        efi: EFI v2.50 by EDK II BIOS ID:PLYDCRB1.86B.0119.R05.1701181843
        DMI: Intel Corporation PURLEY/PURLEY, BIOS PLYDCRB1.86B.0119.R05.1701181843 01/18/2017
    
        {1}[Hardware Error]:   device_id: 0000:5d:00.0
        {1}[Hardware Error]:   slot: 0
        {1}[Hardware Error]:   secondary_bus: 0x5e
        {1}[Hardware Error]:   vendor_id: 0x8086, device_id: 0x2030
        {1}[Hardware Error]:   class_code: 000406
                                           ^^^^^^ (should be 060400)
    Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Cc: Ben Dooks <ben.dooks@codethink.co.uk>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
    Cc: Jerry Snitselaar <jsnitsel@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Lyude Paul <lyude@redhat.com>
    Cc: Matthew Garrett <mjg59@google.com>
    Cc: Octavian Purdila <octavian.purdila@intel.com>
    Cc: Peter Jones <pjones@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Scott Talbert <swt@techie.net>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-efi@vger.kernel.org
    Cc: linux-integrity@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191002165904.8819-2-ard.biesheuvel@linaro.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    6fb9367a
cper.c 17.7 KB