Commit graph

5,466 commits

Author SHA1 Message Date
Zheng Bao
61249065f5 amdfwtool: Move L1 before L2
It is more reasonable. And, in later change, the Level 1 should be
split with Level 2 and combined with EFS.

Change locate_bdt2_bios to locate_bdt_bios. This function is more
flexibile and covers both L1 and L2 BIOS directory table.

Change-Id: I74605013cf53a38686f4e1e5a89a4e6a870f1f4b
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84532
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-26 20:57:01 +00:00
Keith Hui
cd0c7c6466 sb/intel/bd82x6x: Drop xhci_overcurrent_mapping
This is now drawn (indirectly) from main usb_port_config.

Also drop it from autoport.

Change-Id: I8c5e9b2016cf56538de06575181a0a6b738c6a28
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85925
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-26 20:47:59 +00:00
Felix Singer
d6caf33c6f util/scripts/update_submodules: Rework default branch detection
Instead of guessing the default branch by iterating over a list of
branch names, use the branch that is configured as default by upstream.

Change-Id: I628b5a4e5228870c54719577e32dae169b0ceb2e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86803
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2025-03-12 15:21:04 +00:00
Matt DeVillier
53b53ddd1c util/chromeos/crosfirmware: Increase lookahead when parsing bios_image
Newer recovery images change the manifest format yet again, so increase
the lookhead when parsing the bios_image field to ensure we can find it.

TEST=run `./crosfirmware.sh craaskbowl` without erroring out

Change-Id: Idb1862e38a82f3cec8db55993ccf421cf3572c6f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-03-12 12:41:35 +00:00
Nicholas Sudsgaard
30c4e79294 util/lint: Add support for FreeBSD
Change-Id: I9f7ceb2233d5d68b6e6f57faeaa0253390e0e003
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86768
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-03-10 15:17:36 +00:00
Shuo Liu
98f3cf138e cbfstool: Fix the help text
The help text of cbfstool's memory map window assignment option
needs to be corrected to [--mmap flash-base:mmio-base:size] from
[--mmio flash-base:mmio-base:size].

P.S. The option --mmap was initially introduced by
commit 34a7e66faa ("util/cbfstool: Add a new mechanism to
provide a memory map").

Change-Id: I5f8224c8789e642fc68f6ae2242e8e7a7228c8de
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2025-03-10 05:26:46 +00:00
Elyes Haouas
77cd0ce768 coreboot-sdk: Remove unnecessary files
Reduces the size of the Docker image by removing all unnecessary files.

Change-Id: Ib8c658799217c3b6595e3b5fce8f5c8238054c45
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-03-03 22:05:57 +00:00
Alexander Couzens
6789dea1d6 util/intelp2m/platforms: Add support for Elkhart Lake
TEST:
- 'make test' = PASS;
- 'intelp2m -p ehl -file parser/testlog/inteltool_test.log' = no errors.

Change-Id: I0f60d182bc5cc3d0d1d1177fbda0cfe8e2279e46
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84191
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:57:59 +00:00
Maxim Polyakov
864dea8d21 intelp2m/platforms: Rename macro.go to match module name
Change-Id: I5eeb24d668a8d478720ecccf1522238e70dd8a71
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85770
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:57:44 +00:00
Maxim Polyakov
a4f4dc5769 util/intelp2m: Provide GPP group slice from each platform
Instead of a pointer to a function for analyzing the pad name, provide
GPP group slice with pad names to the parser. This will get rid of some
functions and files and make the code cleaner.

TEST:
- 'make test' = PASS;
- 'intelp2m -file parser/testlog/inteltool_test.log' = no errors.

Change-Id: I0d7818d3892450a37bffbf1ffd9524888e4675bf
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85769
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-03-03 21:57:16 +00:00
Maxim Polyakov
da54bd60af Documentation: Update information about intelp2m
Change-Id: I80d5fb5d46b50193e8fecc647d9052a2e29af93f
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71757
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-03-03 21:56:57 +00:00
Maxim Polyakov
9e50202e4c util/intelp2m: Move fields pakage to common
According to the architecture, this is part of the common block.
TEST: 'make test' = PASS

Change-Id: I6390182ab00d9ebd787e8da6f341e3ef85572991
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71235
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:44:31 +00:00
Maxim Polyakov
e833b4661d util/intelp2m: Move remapping reset source to common
TEST: 'make test' = PASS

Change-Id: I315541b12f5f1fdf7c97c2ff8ddd305e30a447cc
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85731
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-03-03 21:44:24 +00:00
Maxim Polyakov
d9c3e51a81 util/intelp2m/platforms/cnl: Add missing VGPIO groups
Change-Id: Ib7c807c343c71e8420feaa481b7f0536a5f36533
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-03-03 21:44:16 +00:00
Maxim Polyakov
85054dbccb util/intelp2m: Rework platforms and fields packages
- embed the base platform and redefine its methods if they differ;
- separate the macro structures from the platform;
- move more functions to common;
- undo use of a single global instance of the microstructure.

TEST:
1) 'make test' = PASS
2) './intelp2m -p cnl -iiii -file inteltool.log' = gpio.h before and
   after the commit is the same.

Change-Id: I2e0aa56efa2430ac6524c6977f8b6fd13113edf9
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71167
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:44:09 +00:00
Maxim Polyakov
e91324707e util/intelp2m: Rewrite parser
- Split the parser code into several packages to make its testing of its
  functions more convenient and detailed. This also makes embedding the
  parser in third-party applications more flexible - there is no need to
  use all the functionality of the parser.

- Clean up code and remove unnecessary objects to make intelp2m simpler
  and more readable.

- Change the common macro format to be consistent with the new parser.

- Rename the results directory containing gpio.h to output to avoid
  confusion with the generator package directory.

- At the moment there is no mechanism for setting the Ownership flag.
  This will be added in later versions.

Tests:
- make test = PASS
- gpio.h for Apollo Lake before and after the patch is the same

Change-Id: I9a29322dd31faf9ae100165f08f207360cbf9f80
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-03-03 21:43:58 +00:00
Maxim Polyakov
2c2e92f7f7 util/intelp2m: Drop non-DWx register analysis support
The utility can parse the value of non-DWx registers, if they are
present in the inteltool dump. However, the functions that allow the
inteltool utility to print the value of such registers have not been
added to the master branch, and it makes no sense to support such
functions in intelp2m, besides, their implementation is far from ideal.
Remove this unused functionality. This will be restored in the future in
a different form and after corresponding changes in inteltool.

TEST: make test = PASS

Change-Id: If5c77ff942a620897c085be4135cb879a0d40a00
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56887
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:43:40 +00:00
Maxim Polyakov
be7eb06131 util/intelp2m: Add logger
Add logging to a file, ./logs.txt by default. --logs option is used to
override this path. Error messages are duplicated to the console.

Change-Id: I97aba146b6d8866a7fa46bac80c27c0896b26cf7
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70542
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:43:28 +00:00
Maxim Polyakov
2e9dd0ade2 util/intelp2m: Update cli options
- Redesign the options format.
- Add automatic completion of arguments for bash.
  [complete -C `pwd`/intelp2m ./intelp2m] to enable

TEST: make test = PASS

Change-Id: I08ff379b99b018b1099aa5d70fea47026bc84045
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70310
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:43:17 +00:00
Maxim Polyakov
a581660031 util/intelp2m/register: Rework package code
Split all methods between DW0 and DW1 to avoid the mistake of using any
DW0 method with DW1 receiver and make the code safer. Also make some
code style fixes.

TEST: make test = PASS

Change-Id: Id64e2a5e29f1d561597004ac83d32e3c80c16ebd
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70309
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-03 21:43:04 +00:00
Maxim Polyakov
5fe0b88b15 util/intelp2m/config: Rework configuration package
- Reduce the number of methods for updating settings and redefine types
  to make the code cleaner and more readable.
- Move the configuration to the p2m package to add settings from new
  utilities based on the intelp2m code.
- Make some code style fixes.

TEST: make test = PASS

Change-Id: Ia1b19ae3122bcf6ec740ae4683d62f31570670b1
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70308
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2025-03-03 21:40:03 +00:00
Maxim Polyakov
1ce69c9db0 util/intelp2m: Drop multi-template support
Exclude the template to parse gpio.h, since coreboot no longer has such
files with raw DW register values. The new GPIO config should be
generated using inteltool.log only.

TEST: make test = PASS

Change-Id: I07124cca487f11641c4e107134efb8cfc29c6731
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70307
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-03-03 21:39:21 +00:00
Shuo Liu
5cc8685fcd util/cbfstool: Add missing \n and use __func__ in debug messages
For adding missing \n, find all potential missings by below script
and apply manual checks and fixes.

grep -nE "(DEBUG|ERROR)\(\".+[^\\n]\"" util/cbfstool/ -r

For using __func__ in debug message, below script is used with
manual checks and fixes.

grep -nE "DEBUG\(.+:" util/cbfstool/ -r

Change-Id: I3e2c225dc16a65470f9f94db89d8ec3711e781c8
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86567
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-27 16:24:53 +00:00
Jakub Czapiga
7dd2cf2f85 util/cbmem: Use uintN_t instead of uN int types
Replace all occurrences of u8, u16, u32 and u64 with their respective
alternatives of uint8_t. There is no need to unnecessarily compress code
by using standard types aliases.

BUG=b:391874512
TEST=Compile cbmem

Change-Id: I4fdb4a31923368342ef218144f8cb44624cd4b2a
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86556
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-02-23 20:14:13 +00:00
Zheng Bao
018c9a6388 amdfwtool: Add combo_index into context
We need to know how many combo entries have been processed.
It will be checked in functions in later change.

Change-Id: I4b026b0630a18d1f46bff98ffe5f11e7f930d7a8
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85590
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-21 13:35:38 +00:00
Zheng Bao
daf32b75c6 amdfwtool: Merge all the steps for A/B recovery into one branch
Clean up the code to make it more logical.
This is for later changes to reorder the PSP Level 1, Level 2, ISH and
BIOS tables.

TEST=Identical test on all AMD platform

Change-Id: I5f7213fd42c7f0ff5ecd9e504a6654cdfb1e3513
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84531
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-21 13:34:41 +00:00
Zheng Bao
4b1c4e7ee8 amdfwtool: Reorder the PSP L2 and BIOS L2 for A/B recovery
For A/B recovery, it is better, even though it is not mandatory, to
put BIOS level 2 table next to its PSP level2. So the relative
addresses of BIOS table are the same. So all the data in B could be a
copy of A.

Identical binary test on all non A/B recovery platform.
Booting test on Majolica with A/B recovery enabled.

Change-Id: Ia25277d307329a2fa66d38d1a7fc21b18246cfe6
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84440
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-02-21 13:32:35 +00:00
Maximilian Brune
7c31377bf9 util/lint/lint-000-license-headers: Add license
This adds the "GPL-2.0 OR MIT" license combination.
It is used in subsequent patches that adds source files originally from
the linux kernel.

OR operator:
https://web.archive.org/web/20240730192545/https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/#d42-disjunctive-or-operator

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I07c508aa6134b063801de36199af9a312a7d6bed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
2025-02-14 17:11:40 +00:00
Maximilian Brune
94d4707649 util/riscv: Add starfive Image building tool
Add the tooling necessary to build an Image that can be found and
started by ROM code of the JH7110 SOC.

source: https://github.com/starfive-tech/Tools

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Iab16c1e1f15f24e85c0ef1a3e838d024e1e49286
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83849
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-14 17:11:34 +00:00
Michael Büchler
a132aba399 board_status/getrevision.sh: Ignore non-annotated tags
Local tags (e.g. to keep track of builds) should not be used to describe
a board status report. This has happened in some cases, e.g. [1].

According to the Git 2.41.0 manual for git-describe, the '--tagged'
parameter is a way to also use any "lightweight (non-annotated) tag" in
addition to annotated tags, which are always used even without this
parameter. All coreboot release tags seem to be annotated, so this
option should be safe to drop.

[1] https://review.coreboot.org/plugins/gitiles/board-status/+/b8c47429bad5afc5cd7f798cad3dece9790a1f83

Signed-off-by: Michael Büchler <michael.buechler@posteo.net>
Change-Id: I54b302415e569a3385559cc85323ce34462042ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79837
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-14 17:10:47 +00:00
Zheng Bao
8a0d68d804 amdfwtool: Set entry address mode based on current table header
The address field of each PSP or BIOS entry defines the location of
the entry.
For the family newer than Cezanne, the upper 2 bits define the address
mode. In table header, the address mode of the table is set. They have
the same definition.
  Address Mode 0: Physical Address
  Address Mode 1: Relative Address to entire BIOS image
  Address Mode 2: Relative Address to PSP/BIOS directory
  Address Mode 3: Relative Address to slot N

In common case, the address mode of entry should be the same as its
table. In spec, it says, "attribute is ignored if the directory
address mode is not 2 or 3",
In the old code, if the header defines address mode as relative BIOS(1),
the entry address mode is not set. That meets the spec. PSP doesn't
use, but amdfwtool can use it to record the address mode and transfer
it to table. That can reduce the code complexity.

Identidal binary test passes on platforms which are not based on
Cezanne, V2000A, Genoa. Booting test passes on Majolica/Cezanne.

Change-Id: I156b315d350d9e7217afc7442ca80277bb7f9095
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84530
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-02-14 16:51:15 +00:00
Subrata Banik
d25a73d9a7 util/cbfstool/eventlog: Add low battery event type
This commit adds a new event type, `ELOG_TYPE_LOW_BATTERY_INDICATOR`,
to the event log. This event is logged when the system boots due to
a low battery condition.  It includes the reason for the shutdown,
currently only supporting "Power Off".

BUG=b:339673254
TEST=Able to capture the eventlog for low battery boot event.

```
> elogtool list
9 | 2025-02-03 09:44:19+0530 | Low Battery Boot  | Power Off
```

Change-Id: I5cc5e5f540657c7dfd174a4928e697a272da813a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2025-02-10 15:14:13 +00:00
Elyes Haouas
594dba56ec tree: Use true false for PcieRpLtrEnable[]
PcieRpLtrEnable[] is a boolean, so use true false.

Change-Id: I4b557683b7897487dedfef0bf77e60b0dab9cbcf
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86193
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-03 06:15:03 +00:00
Elyes Haouas
7073567051 tree: Use true false for PcieRpEnable[]
PcieRpEnable[] is a boolean, so use true false instead of 0 1.

Change-Id: I8e67a33f82b7dfa1864016ccd5cd1b7ec119c528
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86192
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
2025-02-03 06:14:54 +00:00
Jon Murphy
cdcd580bce util/crossgcc/buildgcc: Add riscv64-elf to targets
All of the other targets support invoking the build with the full target
arch name.  RISC does not.  Update the script to allow riscv64-elf to
invoke the build the same way that riscv-elf does to minimize name
mangling and exceptions needed for tooling surrounding the
architecture name in paths. Leave riscv-elf in tact as an option so
we don't break anyone else.

BUG=None
TEST=./util/crossgcc/buildgcc --platform riscv64-elf

Change-Id: Ie737855053e00205ca85f54436c224ab3a1283d9
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2025-01-29 22:16:36 +00:00
Jon Murphy
a299901c23 util/crossgcc: Add missing printf variable
Add the printing of the missing libstdcxx path in the warning string
when the path check fails.  Also resolve the use of the variable in
the conditional statement by surrounding it with quotes.

BUG=None
TEST=Build with invalid libstdcxx path

Change-Id: I195718e43ea842970f5fa986315c9e9f11395362
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86148
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-29 18:47:54 +00:00
Matt DeVillier
2ce7c3946f util/chromeos/crosfirmware: Improve parsing of manifest.json
Some newer boards (like google/skyrim) use a separate line for each
field, so adjust parsing to accommodate that.

TEST=run `bash crosfirmware.sh` for frostflow, grunt, careena.

Change-Id: I3af38d3577f1390c999ad5e6df0fa2c4c4382245
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-01-22 22:04:13 +00:00
Maxim Polyakov
e95fd3e041 util/intelp2m/fields: Add unit tests
Change-Id: I6330855b1c7463a3093b38c54e6cc06c3409009a
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68673
Reviewed-by: Daniel Maslowski <info@orangecms.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-22 20:46:18 +00:00
Maxim Polyakov
7d1c33c9d1 util/intelp2m/parser: Add unit test
Also add an interface for printing macros to override this in the test
and not create a new gpio file for comparison.

Change-Id: I16c9b4451cd4418b49043a925cb879a982a56461
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67701
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-22 20:46:06 +00:00
Riku Viitanen
06ff3381a5 util/autoport/bd82x6x: Output the correct PCH version comment
TEST=Tested with logs from 6-series and 7-series boards.

Change-Id: I5cd99be965b41b49845a9a1072868ba43b445a79
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85823
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2025-01-22 20:35:30 +00:00
Riku Viitanen
66cd477bd7 util/autoport/{bd82x6x,sandybridge}: Don't generate redundant comments
Since the aliases are used and already contain the device name,
there's reason to generate these in the first place.

TEST=Ran autoport with logs from ASRock Z77 Extreme4.

Change-Id: I3378801f5a997a802da61f2b7c4e820f39064019
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85822
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-22 20:35:11 +00:00
Simon Yang
997f7dedf3 elogtool: Correct invalid strings for wake source
elogtool output invalid strings for below two ids:

ELOG_WAKE_SOURCE_PME_TCSS_XDCI    0x2f
ELOG_WAKE_SOURCE_PME_TCSS_DMA     0x30

BUG=None
TEST=None

Change-Id: Ib68434fd675d3d32241b54161297dba66e5ea548
Signed-off-by: Simon Yang <simon1.yang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85155
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-22 20:19:50 +00:00
Nicholas Chin
8dda86c3e1 util/cbfstool: Remove existing file for add-int command
Since add-int is intended for manipulating options stored as integers in
CBFS (such as SeaBIOS runtime config options), removing the file so that
it can be re-added with a new value is a common action. Attempt to
remove the existing integer automatically if it already exists to remove
the need for the extra step.

Change-Id: I5a0ac409fc9b91a4f7c0c35650875d6211ac2b25
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86009
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-22 06:41:31 +00:00
Jon Murphy
2f808d0ab6 util/crossgcc: Update DESTDIR variable use
Update DESTDIR variable use to prevent unintended separation and
globbing.

BUG=None
TEST=./util/crossgcc/buildgcc

Change-Id: I9eb833b11f20b72db88e4094a3297a1d8891bac2
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85718
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-21 20:24:13 +00:00
Nicholas Chin
54673dffb7 util/find_usbdebug: Fix line indented with spaces instead of tabs
Change-Id: Id131f68465330c183c7c6ba4c85cd098dfe9a94e
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86058
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-20 03:23:48 +00:00
Matt DeVillier
9bb805e0c9 util/chromeos/crosfirmware: Improve matching when scanning manifest file
To ensure we find the correct firmware image, match against `$BOARD":`
rather than just `$BOARD`. This fixes an issue where another board (b1)
using the same firmware build or name as the one we are searching for,
causes the grep matching to return empty strings.

TEST=successfully extract the firmware image for CAREENA, which
previously failed.

Change-Id: I2f2a71f0b033938aafc1fd27e2996fe319614b3c
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85935
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-01-19 20:21:08 +00:00
Nicholas Chin
94247e93a2 util/find_usbdebug: Fix lsusb -t parsing for usbutils v016 and newer
Commit e24294ff9ade ("lsusb -t: print ports and busses and devices with
same width") [1] in the usbutils repository changed the format of the
lsusb -t output, breaking the find_usbdebug.sh script. This commit is
present in usbutils version 016 and later.

Use the output of lsusb -V to set the parsing patterns based on the
version in order to maintain compatibility with older versions of
usbutils. A simple integer comparison of the version number is used for
this, which will not work with versions older than v001 as those use a
0.nn version number format. However, since v001 was released in late
2010, it is probably safe to assume that no one will be using a version
of usbutils older than that. Usbutils v016 was released in late 2023 so
there could still conceivably be systems using older versions, such as
Ubuntu 22.04 LTS which is on v014.

TEST=find_usbdebug.sh works as expected with both lsusb v015 and v017

[1] e24294ff9a

Change-Id: Iffa1238b995d387d6e51459f85ae96da52a5c0ff
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85790
Reviewed-by: Jan Philipp Groß <jeangrande@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2025-01-17 05:55:53 +00:00
Maxim Polyakov
4ff7a4a5a0 intelp2m/patform/ebg: Add unit tests
1) Siding one in nibble: DW = 0001 0001 0001 0001
                                <-   <-   <-   <-
2) Siding zero in nibble: DW = 1110 1110 1110 1110
                                 <-   <-   <-   <-
3) Siding one one in nibble: DW = 0011 0011 0011 0011
                                    <-   <-   <-   <-

Change-Id: I10c313aa543a4e07c6685a7ae4e9d665eef7bf75
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-17 04:25:06 +00:00
Maxim Polyakov
2c747794cf intelp2m/patform/mtl: Add unit tests
1) Siding one in nibble: DW = 0001 0001 0001 0001
                                <-   <-   <-   <-
2) Siding zero in nibble: DW = 1110 1110 1110 1110
                                 <-   <-   <-   <-
3) Siding one one in nibble: DW = 0011 0011 0011 0011
                                    <-   <-   <-   <-

Change-Id: I5965f2362626c0ca1f51bf5f4dbe275b76c392ea
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85551
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-17 04:25:02 +00:00
Maxim Polyakov
e28ba75437 intelp2m/patform/adl: Add unit tests
1) Siding one in nibble: DW = 0001 0001 0001 0001
                                <-   <-   <-   <-
2) Siding zero in nibble: DW = 1110 1110 1110 1110
                                 <-   <-   <-   <-
3) Siding one one in nibble: DW = 0011 0011 0011 0011
                                    <-   <-   <-   <-

Change-Id: I1ef3e9eeccdde8824a921ece02edbc4ba1187a00
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85550
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-17 04:24:58 +00:00