coreboot/util/mec152x
Patrick Rudolph e63620012c util: Add Microchip EC FW tool
The Microchip EC can share the SPI flash with the x86 host. Since
it boots first and does power sequencing, there's no problem with
concurrent access happening. Due to various vendor specific flash
layouts used on x86, the EC needs a pointer to it's own firmware.

The pointer resides at flash offset 0 and is read by MEC152x and
MEC1701 and MEC172x ECs, probably others as well.

The introduced tool generates the EC FW PTR at flash offset 0.

Allows to get rid of hand-crafted binary files (EC_SIG) being used
on AMD mainboards that hardcode the offset and must manually being
checked if those match the FMAP.

When there'll be additional firmware regions added it becomes
unconvienient to maintain those by hand.

Usage output:

Usage: ./util/mec152x/mec152xtool <rom-file> <command>
        -h|--help
        -f|--fmap_region_name

Command:
 GEN_ECFW_PTR - Writes the ECFW PTR

Based on https://chromium.googlesource.com/chromiumos/platform/ec/+/08f5a1e6fc2c9467230444ac9b582dcf4d9f0068/chip/mchp/util/pack_ec_mec172x.py

Change-Id: I3b74c9f65643ad4437de29d4aed307b1a2b33286
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87428
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 18:13:10 +00:00
..
description.md util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
main.c util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
Makefile util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
Makefile.mk util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
rom.c util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
rom.h util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
utils.c util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00
utils.h util: Add Microchip EC FW tool 2025-07-17 18:13:10 +00:00