diff --git a/Documentation/util.md b/Documentation/util.md index f902ba4fdd..e6d1402c8a 100644 --- a/Documentation/util.md +++ b/Documentation/util.md @@ -70,8 +70,8 @@ into a format which can be used in coreboot's verb table `Go` `C` * __intelmetool__ - Dump interesting things about Management Engine even if hidden `C` -* __intelp2m__ - convert the configuration DW0/1 registers value from -an inteltool dump to coreboot macros. `go` +* __intelp2m__ - Convert the inteltool register dump to gpio.h with GPIO +configuration for porting coreboot to your motherboard. `Go` * __inteltool__ - Provides information about the Intel CPU/chipset hardware configuration (register contents, MSRs, etc). `C` * __intelvbttool__ - Parse VBT from VGA BIOS `C` diff --git a/Documentation/util/intelp2m/gopackages.png b/Documentation/util/intelp2m/gopackages.png deleted file mode 100644 index fb81a1ce1f..0000000000 Binary files a/Documentation/util/intelp2m/gopackages.png and /dev/null differ diff --git a/Documentation/util/intelp2m/index.md b/Documentation/util/intelp2m/index.md index 98b9c009d6..dd7994e19c 100644 --- a/Documentation/util/intelp2m/index.md +++ b/Documentation/util/intelp2m/index.md @@ -1,210 +1,273 @@ Intel Pad to Macro (intelp2m) converter ======================================= -This utility allows one to convert the configuration DW0/1 register -values from an inteltool dump to coreboot macros. +The utility generates `output/gpio.h` with the GPIO configuration for SoC or PCH from intel. +Use it to create coreboot port for your motherboard in the `src/mainboard/your-motherboard` +directory. Depending on the settings, you can create several configuration formats: +- [coreboot macros](../../getting_started/gpio.md); +- [Intel FSP macros](../../soc/intel/fsp/index.md). + +Installing the latest version: + +```bash +go install review.coreboot.org/coreboot.git/util/intelp2m@master +``` + +Including in the project as an external library: + +```bash +go get review.coreboot.org/coreboot.git/util/intelp2m@master +``` + +## Build + +Since the utility is written in Go, you need to install the official +[go-compiler and go-tools](https://go.dev/dl/) to build the executive +image. ```bash cd util/intelp2m make +./intelp2m -version +``` + +Set automatic argument completion: + +```bash +complete -C `pwd`/intelp2m ./intelp2m +``` + +## Demo + +```bash +./intelp2m -platform snr -file parser/testlog/inteltool_test.log +``` + +## Input data + +The chipset register dump obtained using [inteltool](../../util.md) is used as input data. + +```bash +cd util/inteltool +make +sudo ./inteltool -G > inteltool.log +``` + +After this step, you can generate `gpio.h`: + +```bash +./intelp2m -file ../inteltool/inteltool.log +``` + +More details in the help: + +```bash ./intelp2m -h -./intelp2m -file /path/to/inteltool.log ``` ## Platforms -It is possible to use templates for parsing inteltool.log files. -To specify such a pattern, use the option `-t