Alexandru Gagniuc | 00b579a | 2012-07-20 00:11:21 -0500 | [diff] [blame] | 1 | ################################################################################ |
| 2 | ## Subdirectories |
| 3 | ################################################################################ |
Alexandru Gagniuc | f64111b | 2013-12-13 20:44:48 -0600 | [diff] [blame] | 4 | subdirs-y += allwinner |
Ronald G. Minnich | fd4519b | 2009-08-12 15:56:17 +0000 | [diff] [blame] | 5 | subdirs-y += amd |
Andrew Wu | 52e665b | 2013-06-19 18:55:08 +0800 | [diff] [blame] | 6 | subdirs-y += dmp |
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 7 | subdirs-y += armltd |
Paul Burton | c1081a4 | 2014-06-14 00:08:02 +0100 | [diff] [blame] | 8 | subdirs-y += imgtec |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 9 | subdirs-y += intel |
Gabe Black | 3c7e939 | 2013-05-26 07:15:57 -0700 | [diff] [blame] | 10 | subdirs-y += ti |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 11 | subdirs-y += via |
Alexandru Gagniuc | cc32842 | 2015-10-04 19:34:08 -0700 | [diff] [blame] | 12 | subdirs-$(CONFIG_ARCH_X86) += x86 |
Gerd Hoffmann | cbf3073 | 2013-05-31 09:23:26 +0200 | [diff] [blame] | 13 | subdirs-$(CONFIG_CPU_QEMU_X86) += qemu-x86 |
Alexandru Gagniuc | 00b579a | 2012-07-20 00:11:21 -0500 | [diff] [blame] | 14 | |
Furquan Shaikh | 99ac98f | 2014-04-23 10:18:48 -0700 | [diff] [blame] | 15 | $(eval $(call create_class_compiler,cpu_microcode,x86_32)) |
Alexandru Gagniuc | 00b579a | 2012-07-20 00:11:21 -0500 | [diff] [blame] | 16 | ################################################################################ |
| 17 | ## Rules for building the microcode blob in CBFS |
| 18 | ################################################################################ |
| 19 | |
Timothy Pearson | 24e6d04 | 2015-10-08 16:58:58 -0500 | [diff] [blame] | 20 | ifneq ($(CONFIG_CPU_MICROCODE_MULTIPLE_FILES), y) |
Timothy Pearson | 855fc1f | 2015-10-14 15:41:49 -0500 | [diff] [blame] | 21 | cbfs-files-$(CONFIG_CPU_MICROCODE_CBFS_GENERATE) += cpu_microcode_blob.bin |
Timothy Pearson | 24e6d04 | 2015-10-08 16:58:58 -0500 | [diff] [blame] | 22 | endif |
Alexandru Gagniuc | 00b579a | 2012-07-20 00:11:21 -0500 | [diff] [blame] | 23 | |
Martin Roth | 4c50269 | 2015-11-05 08:03:45 -0700 | [diff] [blame] | 24 | ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y) |
| 25 | cbfs-files-y += cpu_microcode_blob.bin |
| 26 | cpu_microcode_blob.bin-file = $(objgenerated)/microcode.bin |
| 27 | |
| 28 | $(objgenerated)/microcode.bin: |
| 29 | echo " util/scripts/ucode_h_to_bin.sh $(objgenerated)/microcode.bin \"$(CONFIG_CPU_MICROCODE_HEADER_FILES)\"" |
| 30 | util/scripts/ucode_h_to_bin.sh $(objgenerated)/microcode.bin $(CONFIG_CPU_MICROCODE_HEADER_FILES) |
| 31 | endif |
| 32 | |
Alexandru Gagniuc | 1d85700 | 2015-09-09 22:38:06 -0700 | [diff] [blame] | 33 | # We just mash all microcode binaries together into one binary to rule them all. |
| 34 | # This approach assumes that the microcode binaries are properly padded, and |
| 35 | # their headers specify the correct size. This works fairly well on isolatied |
| 36 | # updates, such as Intel and some AMD microcode, but won't work very well if the |
| 37 | # updates are wrapped in a container, like AMD's microcode update container. If |
| 38 | # there is only one microcode binary (i.e. one container), then we don't have |
| 39 | # this issue, and this rule will continue to work. |
| 40 | $(obj)/cpu_microcode_blob.bin: $$(cpu_microcode_bins) |
Daniele Forsi | 21fbc08 | 2014-08-10 15:18:42 +0200 | [diff] [blame] | 41 | @printf " MICROCODE $(subst $(obj)/,,$(@))\n" |
Alexandru Gagniuc | 1d85700 | 2015-09-09 22:38:06 -0700 | [diff] [blame] | 42 | @echo $(cpu_microcode_bins) |
Alexander Couzens | d1adafe | 2015-10-21 12:02:39 +0200 | [diff] [blame] | 43 | cat /dev/null $+ > $@ |
Aaron Durbin | 32ab283 | 2013-06-11 16:36:37 -0500 | [diff] [blame] | 44 | |
Martin Roth | 4c50269 | 2015-11-05 08:03:45 -0700 | [diff] [blame] | 45 | cpu_microcode_blob.bin-file ?= $(obj)/cpu_microcode_blob.bin |
Alexandru Gagniuc | f55e668 | 2015-09-07 00:35:55 -0700 | [diff] [blame] | 46 | cpu_microcode_blob.bin-type := microcode |
| 47 | |
| 48 | ifneq ($(CONFIG_CPU_MICROCODE_CBFS_LOC),) |
| 49 | cpu_microcode_blob.bin-position := $(CONFIG_CPU_MICROCODE_CBFS_LOC) |
Aaron Durbin | 32ab283 | 2013-06-11 16:36:37 -0500 | [diff] [blame] | 50 | else |
Alexandru Gagniuc | f55e668 | 2015-09-07 00:35:55 -0700 | [diff] [blame] | 51 | cpu_microcode_blob.bin-align := 16 |
Aaron Durbin | 32ab283 | 2013-06-11 16:36:37 -0500 | [diff] [blame] | 52 | endif |