Commit graph

5,334 commits

Author SHA1 Message Date
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
Maxim Polyakov
7408c2757e intelp2m/patform/tgl: 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: I637ee4769b13199edadd10afbbd12f9fc37fec81
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-17 04:24:53 +00:00
Maxim Polyakov
1edfffbe84 intelp2m/patform/jsl: 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: Ie2acd675a6239768d23593cd5ca273b56480a890
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85549
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-17 04:24:38 +00:00
Maxim Polyakov
244fd406e9 intelp2m/patform/cnl: 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: Icb0b6506a07b96903e6bc7994e5f97d483d0a330
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85548
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-17 04:24:25 +00:00
Ariel Otilibili
845bdef386 util/lint: Clear syntax warnings in Python 3.12
Since Python 3.12, invalid escape sequences produce a SyntaxWarning;
in the future, they will produce SyntaxError.

Using raw strings clear out the warning.

Below the command used for checking the fix worked.

```
$ python3 util/lint/checkpatch_json.py
```

Link: https://docs.python.org/3.12/whatsnew/3.12.html#other-language-changes
Change-Id: I0177dc7f0d3013759879320afdb6ab548d356bc7
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85771
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-01-17 00:34:29 +00:00
Nicholas Chin
922d2845d6 util/find_usbdebug: Check for lsusb and lspci
Add a check to make sure lsusb and lspci are installed, as the script
relies on them to function properly. Previously, if lsusb was not
installed, the script proceeded as if nothing was wrong, but never found
any devices plugged into the debug port. If lspci was not found, the
script exited saying that no EHCI debug capable controller was found.
The "command not found" messages that normally would have been shown in
these situations was not being shown, as stderr is redirected to
/dev/null to hide error messages that don't matter as per the comment
near the top of the script.

Change-Id: Ib56a20aab9552aa6321c2fb9ad0d2ca7d6cd00c7
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85796
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Riku Viitanen <riku.viitanen@protonmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-01-16 23:18:06 +00:00
Ariel Otilibili
29759ee6b9 util/cbfstool: Refine type and signatures
As suggested by the linter:

> Prefer 'unsigned long' over 'unsigned long int' as the int is
> unnecessary

In fmap_bsearch(), removed needless assignment of offset; it is already
set to 0 in the search loop.

fmap_find() uses the return value of fmap_bsearch(); and is declared as
'long int'. Per the linter warnings, replaced 'long int' by 'long'.

> Prefer 'long' over 'long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Change-Id: If94e70778d0302552f151c31d3073524162faf9e
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85786
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-01-12 07:54:27 +00:00
Matt DeVillier
78a4101bfb util/chromeos/crosfirmware: Add special handling for REEF board
The layout of an extracted REEF shellball doesn't conform to the
usual ones used by other boards, so add a special-case handler for it.

TEST= run `bash croshfirmware.sh reef` and receive the correct firmware
image for the board.

Change-Id: Ib391f30a77b6aa75aa130ffb525e6e1d1239a588
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85873
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 02:20:45 +00:00
Elyes Haouas
f2caaf3e7f lint/checkpatch: Add __aligned to the list of attribute notes
This updates the script to upstream version 6.8
2f9dadba5b

Change-Id: I9274e8b5ed5ada27c290c462b0c59eccf1b0b60d
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81949
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-01-10 13:46:38 +00:00
Maximilian Brune
c52ffcede3 cbfs: Remove remnants of ext-win-*
Since commit 34a7e66faa ("util/cbfstool: Add a new mechanism to
provide a memory map") the ext-win-base and ext-win-size option has been
replaced with the "--mmap" option.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I33cfb59d9dbe88c4f618301ac1506e3281b1a483
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85619
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2025-01-05 03:38:28 +00:00
Elyes Haouas
c09fd09edf tree: Use "true", "false" for has_power_resource
has_power_resource is a boolean, so use true, false instead of 0, 1.

Change-Id: I25b86ef577e072cfe3ef5dc2447113f11c51f747
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85813
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-12-31 02:43:07 +00:00
Elyes Haouas
67b140a949 tree: Use "true", "false" for fine_grained_control
fine_grained_control is a boolean, so use true false instead of 0, 1.

Change-Id: I036818ab32563a1ce092c003bc7ae5c2c8ad3d10
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85812
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-30 22:19:43 +00:00
Dinesh Gehlot
d90b1322ab commonlib: Refactor CSE sync eventLog
This patch enhances the readability of the CSE sync event
ELOG_TYPE_FW_CSE_SYNC by updating the event naming from "early and late
bootstage" to "pre and post memory."

BUG=b:379585294
TEST=boot verified on google/rex0 and google/rex64
without change:
```
rex-rev3 ~ # elogtool list
rex64-rev3 ~ # /media/usb/elogtool list
3 | 2024-01-01 22:25:59-0800 | Firmware CSE sync | Late CSE Sync
```
with change:
```
rex64-rev3 ~ # elogtool list
3 | 2024-12-17 02:22:36-0800 | Firmware CSE sync | Post RAM CSE Sync
```

Change-Id: Ia5db3ffb43b2ceac821de72ef9e88ed62e617d41
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85622
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-23 01:57:13 +00:00
Felix Singer
78f610a0ae util/docker/doc.coreboot.org: Allow git to work in envs owned by root
Depending on the environment, the /data-in directory might be owned by
root and recent git versions refuse to work in these. So explicitly
mark /data-in as a safe environment.

Change-Id: Ia534928f759e50c2dfb1df8af653dee74c734603
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85727
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-12-22 22:27:23 +00:00
Felix Singer
38ee22f6da util/docker/doc.coreboot.org: Use Alpine minor instead of point releases
There is no reason to stick to the point releases. So use the 3.19 base
image referring to the latest minor release instead. Also, update
installed packages to latest versions from that release.

Change-Id: Ic947f99ae7231918ec2e6105f8f3050a17fd1176
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85726
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-12-22 22:27:18 +00:00
Felix Singer
0196c3b6a4 util/docker/doc.coreboot.org: Get rid of bash workarounds
It seems the .bashrc is not loaded as intended and thus the bash
mechanisms never worked. So drop the bash invocations and replace them
with the ash shell. Also, don't modify the PATH variable since this is
done by the activation script.

Change-Id: I544a15c86c212e91ece59b583fb61dad37fca337
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85725
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-12-22 22:27:13 +00:00
Felix Singer
897b46693b util/docker/doc.coreboot.org: Don't create volumes
Volumes are mounted with the command line parameter. Using the VOLUME
directive creates a persistent storage in a standard path, which is not
intended. So drop that and create equal directories in order to keep the
container working.

Change-Id: I9b3551cca34d846aba5ca5c89162f82baa6de768
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85724
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-22 22:27:08 +00:00
Felix Singer
306660c2de util/crossgcc: Update CMake from 3.30.2 to 3.31.3
Change-Id: I573dace3b752a0d3c4614ece9c0845f8334e2857
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85168
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-12-21 15:17:22 +00:00
Elyes Haouas
1fda7027c0 util/crossgcc: Update ACPICA from 20230628 to 20241212
This to upgrade iasl from 20230628 to 20241212.

Change-Id: I4ae7073e46084024360ac0dd44e0df666cb32269
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84787
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-12-21 05:59:20 +00:00
Matt Turner
9eb4c5aff8 util/ifdtool: Fix memory leaks
This allows building coreboot with AddressSanitizer on ChromeOS.
Otherwise these memory leaks are detected which cause the build to fail.

Change-Id: Ife6114db99278c9a3fb8271410486b057ef822f6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85684
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-20 20:50:48 +00:00
Dinesh Gehlot
5af5e66686 util/cbfstool: eliminate late sign of life event
The purpose of the late sign-of-life (SOL) event was to add logs for
the CSE sync at the payload. However, recent changes have decoupled CSE
sync and SOL events, resulting in redundant event logging. This update
eliminates the superfluous late SOL event logs.

BUG=b:379585294
TEST=boot verified on google/rex0 and google/rex64

without change:
```
rex-rev3 ~ # elogtool list
rex64-rev3 ~ # /media/usb/elogtool list
0 | 2024-01-01 22:50:19-0800 | Log area cleared | 250
1 | 2024-01-01 22:50:59-0800 | System boot | 30
2 | 2024-01-01 22:50:59-0800 | Firmware Splash Screen | Enabled
3 | 2024-01-01 22:51:00-0800 | Power Fail
4 | 2024-01-01 22:51:00-0800 | SUS Power Fail
5 | 2024-01-01 22:51:00-0800 | ACPI Wake | S5
6 | 2024-01-01 22:51:00-0800 | Wake Source | Power Button | 0
7 | 2024-01-01 22:51:00-0800 | Late Sign of Life  | CSE Sync Late SOL Screen Shown
8 | 2024-01-01 22:51:00-0800 | Firmware CSE sync | CSE Sync at Payload
```
with change:
```
rex64-rev3 ~ # elogtool list
0 | 2024-12-17 02:42:23-0800 | Log area cleared | 141
1 | 2024-12-17 02:43:14-0800 | System boot | 81
2 | 2024-12-17 02:43:14-0800 | Firmware Splash Screen | Enabled
3 | 2024-12-17 02:43:16-0800 | Power Fail
4 | 2024-12-17 02:43:16-0800 | SUS Power Fail
5 | 2024-12-17 02:43:16-0800 | ACPI Wake | S5
6 | 2024-12-17 02:43:16-0800 | Wake Source | Power Button | 0
7 | 2024-12-17 02:43:16-0800 | Firmware CSE sync | CSE Sync at Payload
```

Change-Id: I53baecb3ca0cef5e0e18732e02832e8331e000d0
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85621
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-12-19 14:30:23 +00:00
Jon Murphy
e3150e819d util/crossgcc: Add libstdcxx target
Add target for building libstdcxx for a cross compile target using the
GCC source downloaded for a cross compiler build and linking against a
specified libc implementation.

BUG=NONE
TEST=Build libstdc++ for cross compilers, link against generated library
./util/crossgcc/buildgcc -t -p arm-eabi -P libstdcxx -l c,c++ -j128 \
--libstdcxx_include /tmp/picolibc

Change-Id: Ie0c06ffaeab632c27a992dee8abcc403cceabeed
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85275
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-12-19 06:59:19 +00:00
Vince Liu
0b252ef8b4 util/mtkheader: Add GFH header for mt8189 bootblock code
Set bootblock load address for bootROM.

BUG=b:379008996
BRANCH=none
TEST=Build Pass.

Change-Id: I47078272880a89e81c851ede307cdc306b1c79ac
Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85598
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-12-18 02:08:42 +00:00
Dinesh Gehlot
673075f102 util/cbfstool: Add eventLog support for ELOG_TYPE_FW_CSE_SYNC
This patch introduces logging for the ELOG_TYPE_FW_CSE_SYNC event. This
event logs data related to CSE synchronization, along with the relevant
boot stage information.

BUG=b:305898363
TEST=boot verified on google/rex0 and google/rex64

Change-Id: I4d6d3c4e07ab8677feb6a8acf8d4c6604ab704b8
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85218
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-16 03:30:21 +00:00
Maxim Polyakov
8ad1ee9b0a util/intelp2m: Print the current project version
Print the current project version in the console and in the generated
file with the pad configuration. This makes support easier, since we
know which version of the utility was used and whether we need to
re-generate the configuration file if an error was made in the latest
changes in the code. The version string includes several parts:

  {major}.{minor}-{last commit in the intelp2m directory}-{?dirty}

The major is incremented if a new platform is added, minor - if changes
in functionality are made. Add dirty if the changes were not taken into
account using git.

Use the following command to print the version:

  make version

Change-Id: Id2fd0757c003004af976309a44dbbfff0eb517a7
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67321
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-04 18:17:40 +00:00
Maxim Polyakov
1b9c312273 intelp2m/patform/sunrise: Add unit tests
- The generated map of long and short macros should correspond to the
  reference ones for all pads (INTEL-SUNRISE-PCH/PAD-MAP). The test
  suite is based on the generated macros of a real platform.
- generated field macros should correspond to the RO_FIELDS mask
  (INTEL-SUNRISE-PCH/MASK);
- macros generated from the zero values bits of the DW registers should
  correspond to the reference ones (INTEL-SUNRISE-PCH/EMRTY).

Use the following command in the console to run all the tests in the
project:

make test

Change-Id: I15c7483f120a330849d4bad036427be205b0911c
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67132
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2024-12-04 18:16:16 +00:00
Maxim Polyakov
2394795279 intelp2m/patform/lewisburg: Add unit tests
- The generated map of long and short macros should correspond to the
  reference ones for all pads (INTEL-LEWISBURG-PCH/PAD-MAP). The test
  suite is based on the generated macros of a real platform.
- generated field macros should correspond to the RO_FIELDS mask
  (INTEL-LEWISBURG-PCH/MASK);
- macros generated from the zero values bits of the DW registers should
  correspond to the reference ones (INTEL-LEWISBURG-PCH/EMRTY).

Change-Id: Iec18462be8428c3f37d546332211a730ee589a2d
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67133
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2024-12-04 18:16:00 +00:00
Maxim Polyakov
bce3363412 intelp2m/patform/apollolake: Add unit tests
- The generated map of long and short macros should correspond to
  the reference ones for all pads (INTEL-APOLLO-PCH/PAD-MAP). The
  test suite is based on the generated macros of a real platform.
- generated field macros should correspond to the RO_FIELDS mask
  (INTEL-APOLLO-PCH/MASK);
- macros generated from the zero values bits of the DW registers
  should correspond to the reference ones (INTEL-APOLLO-PCH/EMRTY).

Change-Id: I1c47edb31d24930068486c74147c5fbc9b18b4b6
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67134
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-04 18:15:44 +00:00
Maxim Polyakov
6abf66c8f3 util/intelp2m/parser/template: Add unit test
Change-Id: I1612a7d18bf53479cbe53ca0ba761b67e795c16b
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67135
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-04 18:15:10 +00:00
Yu-Ping Wu
e24b7c72cc util/ifdtool: Fix invalid pointer dereference
When calculating the GPR0 protection range, currently the offsets of
"CSE data partition offset" and FPT are not checked. Invalid pointer
dereference may lead to segmentation fault.

Ensure the offset is within the image size before accessing the pointer.

Change-Id: Ic9557d8fc8ae9e4c12114ee170bfc90d5e149df9
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85016
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2024-11-13 23:31:55 +00:00
Felix Singer
7980b6ed47 util/scripts/update_submodule: Extend commit ids to 12 chars
Checkpatch suggests to use 12 chars of the commit id. So adjust the
submodule update script in order to be consistent.

Change-Id: I0e356066b6598f586054f940684c26b6e5db2169
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-11-13 16:23:55 +00:00
Nicholas Chin
05a13e7ed9 sconfig: Move (WEAK_)DEV_PTR from device.h to static.h
Similar to commit 8651731537 ("sconfig: Move config_of_soc from
device.h to static.h"), move these macros to static.h to separate
dependencies on device.h and static.h. These macros resolve to device
alises that are declared in the generated static_devices.h header, so
move them to static.h which includes static_devices.h.

Since static.h remains included in device.h, any source that uses these
macros should still compile correctly. Subsequent commits will add
static.h to files that need them, after which static.h can be dropped
from device.h.

Change-Id: I1c76ad749769591da9c102b11eb618e93b68bd7c
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84676
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-11-10 10:35:44 +00:00
Matt DeVillier
cfe1e921dd util/crosfirmware: Add support for parsing from manifest.json
Some ChromeOS recovery images, such as for GRUNT, support multiple
boards / multiple bios/ec images, but do not break them out in a
'models' subdirectory like modern recovery images do. Instead,
they use a manifest.json to map the board name to the correct
bios/ec images. Add support for parsing out the info from here.

TEST=run `util/chromeos/crosfirmware.sh kasumi` and verify
that the correct shellball firmware is extracted from the recovery
image.

Change-Id: I64153ba16cb8328d65a0f088d05f04a969f6810f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-11-08 19:22:37 +00:00