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>
64 lines
1.5 KiB
Text
64 lines
1.5 KiB
Text
## SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
config EC_HP_KBC1126
|
|
bool
|
|
help
|
|
Interface to SMSC KBC1126 embedded controller in HP laptops.
|
|
|
|
config EC_HP_KBC1126_GPE
|
|
hex
|
|
depends on EC_HP_KBC1126
|
|
default 0x16
|
|
|
|
config EC_HP_KBC1126_ECFW_IN_CBFS
|
|
bool
|
|
depends on EC_HP_KBC1126
|
|
default y
|
|
|
|
if EC_HP_KBC1126_ECFW_IN_CBFS
|
|
|
|
comment "Please select the following otherwise your laptop cannot be powered on."
|
|
|
|
config KBC1126_FIRMWARE
|
|
bool "Add firmware images for KBC1126 EC"
|
|
depends on EC_HP_KBC1126
|
|
default n
|
|
help
|
|
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
|
|
default "fw1.bin"
|
|
help
|
|
The path and filename of the file to use as KBC1126 firmware #1.
|
|
You can use util/kbc1126/kbc1126_ec_dump to dump it from the
|
|
vendor firmware.
|
|
|
|
config KBC1126_FW1_OFFSET
|
|
hex "Offset of KBC1126 firmware #1"
|
|
depends on KBC1126_FIRMWARE
|
|
default 0xfffe8000
|
|
|
|
config KBC1126_FW2
|
|
string "KBC1126 filename #2 path and filename"
|
|
depends on KBC1126_FIRMWARE
|
|
default "fw2.bin"
|
|
help
|
|
The path and filename of the file to use as KBC1126 firmware #2.
|
|
You can use util/kbc1126/kbc1126_ec_dump to dump it from the
|
|
vendor firmware.
|
|
|
|
config KBC1126_FW2_OFFSET
|
|
hex "Offset of KBC1126 firmware #2"
|
|
depends on KBC1126_FIRMWARE
|
|
default 0xfffd0000
|
|
|
|
endif
|