aboutsummaryrefslogtreecommitdiff
path: root/src/ec/hp/kbc1126/Kconfig
diff options
context:
space:
mode:
authorBill XIE <persmule@hardenedlinux.org>2021-03-20 21:06:11 +0800
committerNico Huber <nico.h@gmx.de>2021-12-21 18:13:45 +0000
commitf0215b4cae32be8ddee3435941988d5efd84dad6 (patch)
tree56c0c988b2356b8f8a66f7e8664860847fb80816 /src/ec/hp/kbc1126/Kconfig
parenta4dddfc3a3a48727ebcec727a0b1fd87eb4c14ad (diff)
arch/x86: Init firmware pointer for EC SMSC KBC1098/KBC1126 at build time
According to util/kbc1126/README.md, for these ECs to work, the address and size of their two firmware should be written to $s-0x100` (`$s` means the image size, done with kbc1126_ec_insert), which means that every existing section (especially those used to store code) should not overlap this address, otherwise the bootblock will get damaged when inserting firmwares of the EC. In this commit, ecfw_ptr is a structure initialized at build time according to CONFIG_KBC1126_FW1_OFFSET and CONFIG_KBC1126_FW2_OFFSET (to do so, they should be redefined as hex), and linked to CONFIG_ECFW_PTR_ADDR within bootblock, so kbc1126_ec_insert is not needed at build time any more. Test passed on Elitebook Folio 9470m. Signed-off-by: Bill XIE <persmule@hardenedlinux.org> Change-Id: I4f0de0c4d7283e630242fbe84a46e0547783c49e Reviewed-on: https://review.coreboot.org/c/coreboot/+/51671 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/ec/hp/kbc1126/Kconfig')
-rw-r--r--src/ec/hp/kbc1126/Kconfig14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ec/hp/kbc1126/Kconfig b/src/ec/hp/kbc1126/Kconfig
index cb4ddec7e4..5e6edd6a69 100644
--- a/src/ec/hp/kbc1126/Kconfig
+++ b/src/ec/hp/kbc1126/Kconfig
@@ -27,6 +27,12 @@ config KBC1126_FIRMWARE
Select this option to add the two firmware blobs for KBC1126.
You need these two blobs to power on your machine.
+config ECFW_PTR_ADDR
+ default 0xffffff00
+
+config ECFW_PTR_SIZE
+ default 8
+
config KBC1126_FW1
string "KBC1126 firmware #1 path and filename"
depends on KBC1126_FIRMWARE
@@ -37,9 +43,9 @@ config KBC1126_FW1
vendor firmware.
config KBC1126_FW1_OFFSET
- string "Offset of KBC1126 firmware #1"
+ hex "Offset of KBC1126 firmware #1"
depends on KBC1126_FIRMWARE
- default "0xfffe8000"
+ default 0xfffe8000
config KBC1126_FW2
string "KBC1126 filename #2 path and filename"
@@ -51,8 +57,8 @@ config KBC1126_FW2
vendor firmware.
config KBC1126_FW2_OFFSET
- string "Offset of KBC1126 firmware #2"
+ hex "Offset of KBC1126 firmware #2"
depends on KBC1126_FIRMWARE
- default "0xfffd0000"
+ default 0xfffd0000
endif