linux_dsm_epyc7002/drivers/base/firmware_loader
Jari Ruusu f5ae2ea634 Fix built-in early-load Intel microcode alignment
Intel Software Developer's Manual, volume 3, chapter 9.11.6 says:

 "Note that the microcode update must be aligned on a 16-byte boundary
  and the size of the microcode update must be 1-KByte granular"

When early-load Intel microcode is loaded from initramfs, userspace tool
'iucode_tool' has already 16-byte aligned those microcode bits in that
initramfs image.  Image that was created something like this:

 iucode_tool --write-earlyfw=FOO.cpio microcode-files...

However, when early-load Intel microcode is loaded from built-in
firmware BLOB using CONFIG_EXTRA_FIRMWARE= kernel config option, that
16-byte alignment is not guaranteed.

Fix this by forcing all built-in firmware BLOBs to 16-byte alignment.

[ If we end up having other firmware with much bigger alignment
  requirements, we might need to introduce some method for the firmware
  to specify it, this is the minimal "just increase the alignment a bit
  to account for this one special case" patch    - Linus ]

Signed-off-by: Jari Ruusu <jari.ruusu@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-01-15 11:50:37 -08:00
..
builtin Fix built-in early-load Intel microcode alignment 2020-01-15 11:50:37 -08:00
fallback_table.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
fallback.c firmware: Factor out the paged buffer handling code 2019-06-18 09:11:21 +02:00
fallback.h firmware: rename fw_sysfs_fallback to firmware_fallback_sysfs() 2018-05-14 16:43:09 +02:00
firmware.h firmware: Fix missing inline 2019-07-23 10:20:25 +02:00
Kconfig drivers: base: Fix Kconfig indentation 2019-11-20 15:10:25 +01:00
main.c firmware_class: make firmware caching configurable 2019-11-14 08:14:16 +08:00
Makefile firmware_loader: move firmware/ to drivers/base/firmware_loader/builtin/ 2019-01-22 10:23:18 +01:00