summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* util/cbmem: Provide a way to override coreboot pathWerner Zeh2022-11-291-1/+2
| | | | | | | | | | | | | | | | | Right now cbmem uses a fix path to reach coreboot src path (../../). This makes it impossible to compile cbmem out of the coreboot tree (e.g. copy just the cbmem directory elsewhere and compile). This patch adapts the technique from cbfstool and adds a variable called 'TOP' which points to coreboot root directory and which can be overridden at build time by providing it to make as an argument. This will enable a stand-alone build of cbmem. Change-Id: I2732f75310e10716e5aa74e094e0bf628ad22f0b Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69686 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* util/crossgcc: Use GitHub for downloading IASLFelix Singer2022-11-284-4/+4
| | | | | | | | | | | | | | | | | | | | The download links from acpica.org [1] are not stable, and for some reason they named the release tarballs with .tar_0.gz. Thus, use the tarballs from their GitHub repository generated out of the release tags [2]. Tested locally and also IASL patch applies. [1] https://www.acpica.org/downloads [2] https://github.com/acpica/acpica/tags Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I7b10dd1db4299aaef96bc29023bed874b660aba0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70021 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Makefile.inc: Decrease minimal pagesize from 4 kB to 1 kBPaul Menzel2022-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 12 incorrectly warns about an array out of bounds issue: ``` $ make V=1 # emulation/qemu-i440fx […] CC ramstage/arch/x86/ebda.o x86_64-linux-gnu-gcc-12 -MMD -Isrc -Isrc/include -Isrc/commonlib/include -Isrc/commonlib/bsd/include -Ibuild -I3rdparty/vboot/firmware/include -include src/include/kconfig.h -include src/include/rules.h -include src/commonlib/bsd/include/commonlib/bsd/compiler.h -I3rdparty -D__BUILD_DIR__=\"build\" -Isrc/arch/x86/include -D__ARCH_x86_32__ -pipe -g -nostdinc -std=gnu11 -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough -Wshadow -Wdate-time -Wtype-limits -Wvla -Wdangling-else -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie -Wno-packed-not-aligned -fconserve-stack -Wnull-dereference -Wreturn-type -Wlogical-op -Wduplicated-cond -Wno-unused-but-set-variable -Werror -Os -Wno-address-of-packed-member -m32 -Wl,-b,elf32-i386 -Wl,-melf_i386 -m32 -fuse-ld=bfd -fno-stack-protector -Wl,--build-id=none -fno-delete-null-pointer-checks -Wlogical-op -march=i686 -mno-mmx -MT build/ramstage/arch/x86/ebda.o -D__RAMSTAGE__ -c -o build/ramstage/arch/x86/ebda.o src/arch/x86/ebda.c In file included from src/arch/x86/ebda.c:6: In function 'write_ble8', inlined from 'write_le8' at src/commonlib/include/commonlib/endian.h:155:2, inlined from 'write_le16' at src/commonlib/include/commonlib/endian.h:178:2, inlined from 'setup_ebda' at src/arch/x86/ebda.c:35:2, inlined from 'setup_default_ebda' at src/arch/x86/ebda.c:48:2: src/commonlib/include/commonlib/endian.h:27:26: error: array subscript 0 is outside array bounds of 'void[0]' [-Werror=array-bounds] 27 | *(uint8_t *)dest = val; | ~~~~~~~~~~~~~~~~~^~~~~ […] ``` [In GCC 12 the new parameter `min-pagesize` is added and defaults 4 kB.][1] It treats INTEGER_CST addresses smaller than that as assumed results of pointer arithmetics from NULL while addresses equal or larger than that as expected user constant addresses. For GCC 13 we can represent results from pointer arithmetics on NULL using &MEM[(void*)0 + offset] instead of (void*)offset INTEGER_CSTs. [1]: https://web.archive.org/web/20220711061810/https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 TEST=No compile error with gcc (Debian 12.2.0-3) 12.2.0 Change-Id: I6e36633f42cb4dc5af53212c10c919a86e451ee0 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62830 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* util/testing: Fully clean all but the standard GCC buildMartin Roth2022-11-251-5/+5
| | | | | | | | | | | We don't currently use the artifacts from the Clang or CrOS GCC builds, so don't bother saving them. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I69fe803e4b4213a199d0b76089da443aa769aa92 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69954 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* crossgcc: Upgrade IASL from 20220331 to 20221020Elyes Haouas2022-11-254-2/+2
| | | | | | | | | | Changes: https://acpica.org/node/201 Change-Id: I386a6757a318336bc616091afe0c4ed88cd89583 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68929 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* crossgcc: Upgrade MPFR from 4.1.0 to 4.1.1Elyes Haouas2022-11-253-2/+2
| | | | | | | | | Change-Id: I7679c6751fb02ab670ade923b365c6410a6dc118 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69778 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
* util/lint: Ignore fmd files when evaluating Kconfig symbolsMartin Roth2022-11-241-1/+1
| | | | | | | | | Signed-off-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Change-Id: I5e3ff8ee10fdd3514033e72bd0c2664a4b2f5310 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69918 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* lint/checkpatch: Add XA_STATE and XA_STATE_ORDER to the macro declarationElyes Haouas2022-11-241-1/+2
| | | | | | | | | | This reduce the difference with linux v6.0-rc3. Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Change-Id: Ica20264d744ea8f77b56c63d29e1fafc2e68a869 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67338 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* src/device + util/sconfig: Introduce new device 'mdio'Mario Scheithauer2022-11-246-271/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends the available device paths with a new device 'mdio'. MDIO is the 'Management Data Input/Output' called interface which is used to access an Ethernet PHY behind a MAC to change settings. The real payload data path is not handled by this interface. To address the PHY correctly on the MDIO bus, there is a 5 bit address needed, which often can be configured via pins on the mainboard. Therefore, the new introduced device has an 'addr' field to define its address. If one wants to use a MDIO device in devicetree, the syntax is straight forward (example): device mdio 0x2 on end As the MDIO interface is driven by the MAC, most likely this MDIO device will be hooked in as a child device of the (PCI attached) MAC device. With the new introduced ops_mdio a new interface is added to provide an API for read and write access over MDIO. Change-Id: I6691f92c4233bc30afc9029840b06f74bb1eb4b2 Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com> Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69382 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/release/build-release: Fix style issuesMartin Roth2022-11-231-22/+28
| | | | | | | | | | | | No real functional changes, just cleaning up shellcheck issues, putting braces around variables, add comments and the like. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6e79afc8d725e86ddbf7f4eb4685bed190c20738 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67319 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* crossgcc: Remove leftover "../cmake"Elyes Haouas2022-11-221-1/+1
| | | | | | | | | | | "../cmake" introduced on Change-Id: I3144a83 Remove "../cmake" when the build is done. Change-Id: I289bfaca1fd8d3f004455babd99849ca8aa2d6db Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69869 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* util/crossgcc: Limit LLVM targets to the needed onesFelix Singer2022-11-221-1/+2
| | | | | | | | | | | | | | | | | | | coreboot only supports a small subset of the targets that LLVM supports. It's not needed to enable all possible targets. Thus limit the targets to the following ones: * X86 * RISC-V * AArch32 * AArch64 * PowerPC Change-Id: I9938bf176b5fe2b0a631c3b1ae858f988898a196 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69841 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur.heymans@9elements.com>
* util: Add SPDX license headers to MakefilesMartin Roth2022-11-2224-54/+24
| | | | | | | | | | Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I7cf35132df0bc23f7b6f78014ddd72d58ea2ab8a Reviewed-on: https://review.coreboot.org/c/coreboot/+/68983 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
* util/testing: Allow jenkins builders to skip testing areasMartin Roth2022-11-211-8/+18
| | | | | | | | | | | | | | | | | With the addition of the clang tests, the jenkins builds are taking a really long time to run the tests. This change allows the "what-jenkins-does" build to be split into separate builds on jenkins. Additionally, some jenkins builds like coverity don't need (or want) to build clang or even the linters. Update help with the variables. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I0f8ac68c1bc8f8ff9be62d80db850355e742ee74 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69495 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Add scanbuild test build to what-jenkins-doesMartin Roth2022-11-211-0/+2
| | | | | | | | | | | | This tests building a single target with scanbuild so to make sure that option hasn't been broken. Since it's a different type of build, it hasn't previously been tested with what-jenkins-does. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I8a74dac203f4d38c0cb30a0b64724e6f9095b9dd Reviewed-on: https://review.coreboot.org/c/coreboot/+/69861 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Use new --name argument for abuildMartin Roth2022-11-211-4/+4
| | | | | | | | | | | | This gets rid of the duplicated directory and xml filename and uses the --name argument to abuild instead, which also updates the test name in the junit xml file. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ibe538da42280696190b0a7a0c63fd86a63e40214 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69860 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/abuild: Add --name option to set name of abuild runMartin Roth2022-11-211-11/+37
| | | | | | | | | | | | | | | | | | | Previously, the testclass variable was only updated with the chromeos or Kconfig option values, and the output directory and xml file names were updated independently. With the --name option, all of these can be set simultaneously. This also prevents jenkins from seeing clang and gcc tests as the same because the testclass variable wasn't updated. If --name is not set, all behavior is as it was previously. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I8f52779b92d213386a3eb371d1f30ee32ed48b85 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69859 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Call test-tools target from what-jenkins-doesMartin Roth2022-11-211-9/+9
| | | | | | | | | | | | | Instead of having duplicate lines in the what-jenkins-does target and the test-tools target, make test-tools from what-jenkins-does. Now there's only one place to update when changing the call. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Id62d6bb1e729892ec123ea970ca8a31e03a812d0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69838 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Update ABUILD_OPTIONS with long option namesMartin Roth2022-11-211-3/+3
| | | | | | | | | | | | It's hard to tell what is what with the short option names, so use the long options here. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I1371e098bba1077dedfaffa56287a28656197b40 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69837 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Call test-abuild target from what-jenkins-doesMartin Roth2022-11-211-8/+5
| | | | | | | | | | | | | | | | Instead of having duplicate lines in the what-jenkins-does target and the test-abuild target, make test-abuild from what-jenkins-does. The test-abuild target had not been updated to use the ABUILD_OPTIONS variable, so update it with the commands from what-jenkins-does. Now there's only one place to update when changing the call. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I4552193894c16301defb851eb3db4bdfbfa49803 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69836 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Call test-lint target from what-jenkins-doesMartin Roth2022-11-211-5/+4
| | | | | | | | | | | | | | Instead of having duplicate lines in the what-jenkins-does target and the test-lint target, make test-lint with the --junit argument from what-jenkins-does. Now there's only one place to update when changing the call. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I2f90df76126f453fbcd91f4c4af5d784ac2dbe88 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69835 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/testing: Unify cleanup in all targetsMartin Roth2022-11-211-7/+5
| | | | | | | | | | | | | | | | Instead of having the what-jenkins-does target clean up before building, have it call the test_cleanup target. Clean the tegra targets. Remove distclean from test_cleanup target - I don't think that's expected, and people might be upset by having their .config deleted. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ia9d585df05343365c89e49b1c01dba9ba865003f Reviewed-on: https://review.coreboot.org/c/coreboot/+/69834 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* util/abuild: check for PASSED_BOARDS before trying to show itMartin Roth2022-11-211-1/+3
| | | | | | | | | | | | If no boards are tested by abuild, an error is currently shown because no boards failed, but no boards passed either. Account for this possibility. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I097d3c728ca1acc652d5a1b7b49e57d01b0e513b Reviewed-on: https://review.coreboot.org/c/coreboot/+/69520 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* util/kconfig: Add patch to move Kconfig deps to build/configMartin Roth2022-11-202-0/+65
| | | | | | | | | | | | | | | | | The change being reverted [1] caused all the Kconfig dependency files to be generated at the top level of coreboot's build directory. This reverts that behavior and puts the dependencies back where we're used to them being. [1] https://web.archive.org/web/20220316120807/https://github.com/torvalds/linux/commit/1b9e740a81f91ae338b29ed70455719804957b80 Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ic4b48831705c3206e7c2e09f01d072d1cde9c9c4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69535 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/kconfig: Move Kconfig deps back into build/configMartin Roth2022-11-171-9/+11
| | | | | | | | | | | | | | | | | revert commit 1b9e740a8 (kconfig: fix failing to generate auto.conf) [1] The above change caused all of the enabled kconfig options to be written into the top level build directory. We don't want that, so go back to the old behavior for the coreboot tree. [1] https://web.archive.org/web/20220316120807/https://github.com/torvalds/linux/commit/1b9e740a81f91ae338b29ed70455719804957b80 Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I2904f69a5d85337ad0a6b48590ccd4b4a6e38b70 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69536 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* util/testing: Move check of intel-sec-tool to separate targetMartin Roth2022-11-161-7/+9
| | | | | | | | | | | Testing for the presence of intel-sec-tools doesn't need to happen inside the what-jenkins-does target. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6faa5bd5292ac5cceba9a64fe81939c0e25b9f3e Reviewed-on: https://review.coreboot.org/c/coreboot/+/69519 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
* testing/Makefile.inc: Fix removing clang buildsArthur Heymans2022-11-151-2/+2
| | | | | | | | | | The directory names were wrong. Change-Id: Ia52ca92f22f02a3b91244093ac6a769e6b3b2eb3 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69568 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/superiotool: Add SMSC MEC5035Nicholas Chin2022-11-131-2/+72
| | | | | | | | | | | | | Also comment out the SMSC FDC37M602 which has a conflicting ID and has never had the LDN/register layout anyway. Tested on a Dell Latitude E6400 Change-Id: I5b1900e6ef599c422a1d6eca7a2ac4691d56d874 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69481 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/superiotool: Add Nuvoton NCT6685D/NCT6686DNicholas Chin2022-11-131-0/+67
| | | | | | | | | | | | | | | | There doesn't seem to be a datasheet available for the NCT6685D, but there is one for the NCT6686D. The 85D seems to return the same ID as the 86D, and the registers do seem to be returning valid data other than LDN 0xf which returns all 1s. The LDN and register layout appears to be identical to the NCT6687D-W. Tested on a Lenovo ThinkCentre M900 with a NCT6685D. Change-Id: I4de0e7b86422a14ab9ccb15b7571597611d755d5 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69480 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* util/xcompile: Fix building for clang + 64bitArthur Heymans2022-11-131-2/+9
| | | | | | | | | | | | | -malign-abi does not exist on clang (v15.0.0) and the -ccc-gcc-name variable is not needed anymore. TESTED: This also boots on qemu q35 Change-Id: I7f99ebea18d5c09fdc7ced5c793d57d6fedd2e47 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69232 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* util/testing: Buildtest with clangArthur Heymans2022-11-121-0/+5
| | | | | | | | | | | Some platforms correctly build and boot with clang. Add this to our CI. Change-Id: I82d756e071a0e575db73fbd91167d27cae3ddc18 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62173 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* amdfwtool: Add definition of instance for PSP entryZheng Bao2022-11-122-2/+14
| | | | | | | | Change-Id: I9f6250fd0e26cfae2cc2128ca9413a5621d2df0c Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69044 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* treewide: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarityElyes Haouas2022-11-123-10/+11
| | | | | | | | Change-Id: I2a255cdcbcd38406f008a26fc0ed68d532e7a721 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68267 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* util/amdfwtool/amdfwtool: Don't rewrite macrosElyes Haouas2022-11-122-29/+28
| | | | | | | | Change-Id: Iea9dc65584c751e4d02524582b744ec9732e2c04 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68376 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
* util/amdfwtool: Add more instances some types in BDTArthur Heymans2022-11-111-0/+16
| | | | | | | | | | | | Some hardware uses more instances. Change-Id: Ie4ed2ce0d077013b450df99a88e904c8658cfc2d Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68121 Reviewed-by: Marvin Drees <marvin.drees@9elements.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* util/amdfwtool: Add new typesArthur Heymans2022-11-113-0/+61
| | | | | | | | | | These are used on newer platforms. Change-Id: I20dc77fb6f83dc813e3da5fe30f8f52068fc4662 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68119 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
* util/inteltool: Add support for Elkhart lakeKacper Stojek2022-11-106-0/+595
| | | | | | | | | | | Document: 614109, 601458 Tested on: Protectli vault_ehl (VP2420) Signed-off-by: Kacper Stojek <kacper.stojek@3mdeb.com> Change-Id: I54948741082ca1072642046f64539a4c15ddb578 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68474 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
* util/scripts: Add script to run abuild on specific SOCsMartin Roth2022-11-101-0/+180
| | | | | | | | | | | | | | | This finds all the boards using a specified Kconfig option and runs both CrOS and non-CrOS abuilds on them to make sure they're working. Nobody wants to run the full what-jenkins-does build on their host machine. Hopefully this can help get some tests run locally before pushing to coreboot.org. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ifc71c28bf64a805f203a815a9468ff9fe882aad3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68956 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* cbfstool: Fix possible memory leakShaik Shahina2022-11-092-3/+8
| | | | | | | | | | | | | | | Handle the possible memory leak scenario. Foundby=klocwork BUG=NONE TEST=Boot to OS on Nivviks Change-Id: I01c4643d1e671d9bd9971ac6db8031634fffd61e Signed-off-by: Shaik Shahina <shahina.shaik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69220 Reviewed-by: Shahina Shaik <shahina.shaik@intel.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
* util/cbfstool/bpdt_formats: Fix memory leak issuesSolomon Alan-Dei2022-11-081-2/+2
| | | | | | | | | | | | | | | The functions create_bpdt_hdr and create_cse_layout in bpdt_1_6.c are defined to return pointers but not integers as was previouly implemented. Reported-by: Coverity(CID:1469323) Reported-by: Coverity(CID:1469353) Signed-off-by: Solomon Alan-Dei <alandei.solomon@gmail.com> Change-Id: Idb78d94be7a75a25ad954f062e9e52b1f0b921dc Reviewed-on: https://review.coreboot.org/c/coreboot/+/68986 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
* util/superiotool/fintek.c: Fix F71808A hardware monitor readoutsRavi Mistry2022-11-071-0/+3
| | | | | | | | | | | | | | | | Fix readouts from the hardware monitor on Fintek F71808A Super I/O. The HWM port is +5 to the base address stored in LDN 0x4 at index 0x60/0x61. Referred to util/superiotool/winbond.c and the Linux kernel driver f71882fg. Tested on a HP 500-319na (Memphis-S / IPM87-MP). Signed-off-by: Ravi Mistry <rvstry@protonmail.com> Change-Id: I2b2b98c62f9305c6f4885c2ce3b1444801dcb9d5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62060 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* util/scripts: Add script to show platforms, CPU, type, and date addedMartin Roth2022-11-072-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the script used to generate the list of platforms that were removed from the master branch at each release. Generate a list for the old branch, another for the new, and compare the two. Representative output: ```eval_rst +-------------------------+-------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=========================+===================+============+==========+ | 51nb/x210 | INTEL_KABYLAKE | 2020-03-16 | laptop | | acer/aspire_vn7_572g | INTEL_SKYLAKE | 2022-01-28 | laptop | | acer/g43t-am3 | INTEL_X4X | 2020-09-28 | desktop | | amd/bilby | AMD_PICASSO | 2021-02-17 | eval | | amd/birman | AMD_MORGANA | 2022-10-10 | eval | | system76/whl-u | INTEL_WHISKEYLAKE | 2021-04-14 | laptop | | ti/beaglebone | TI_AM335X | 2013-05-26 | sbc | | up/squared | INTEL_APOLLOLAKE | 2019-05-22 | mini | +-------------------------+-------------------+------------+----------+ ``` Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I4f7265d95df31f3a74aa2aa164f6a094c1139750 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63799 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* util/cbmem: Update formatting for cbmem -l commandMartin Roth2022-11-041-5/+5
| | | | | | | | | | | | | | | | | | Some of the cbmem area names have gotten longer, and were making the output of cbmem -l look bad, so expand the name area to 20 characters. Instead of printing a blank area if the name isn't recognized, call it unknown. Change the method of printing the title to match the way the actual text of the table is printed. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I9d91d21c6ad418d9fee9880550fb6cb9e41e93f0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68644 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
* checkpatch: add Co-authored-by to signature listMichael Niewöhner2022-11-041-0/+1
| | | | | | | | | | | | Co-authored-by is commonly used for changes that have more than one author. Add it to the list to make Jenkins happy. Change-Id: I7f66824febe3be756c64ebf44c94bc653a66f1e1 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69166 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Patrick Georgi <patrick@coreboot.org>
* util/docker/coreboot.org-status: Rewrite parserPatrick Georgi2022-11-037-0/+1158
| | | | | | | | | | | | | | | | | | | | | The current tool is a shell script that mixes data collection and HTML generation and is generally a pain to work with. It takes 15 minutes to run. The new tool is written in go, collects all data first, then generates the output HTML from the data and a single template, and finishes in 10 seconds. The goal in this version is to produce output as similar as possible to the output of the shell script. Some difference will remain because the shell script returns some trash data whose reproduction would require more effort than is worth. Change-Id: I4fab86d24088e4f9eff434c21ce9caa077f3f9e2 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59958 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
* util/eventlog: Correct the capitalization for diagnostics typesHsuan Ting Chen2022-11-021-1/+1
| | | | | | | | | | | | | | | Correct the capitalization of ELOG_CROS_DIAG_TYPE_STORAGE_HEALTH from "Storage Health Info" to "Storage health info", which is already widely used in depthcharge diagnostics tools. BUG=b:254405481 TEST=none Change-Id: Ia6c1df9e8d2ee6f8ae11b962e76b52f3c6663c42 Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69025 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
* util/cbfstool: fix memory leak in compress.cSolomon Alan-Dei2022-11-021-1/+4
| | | | | | | | | | | | | free the memory allocated in lz4_compress function before returning from it. Reported-by: Coverity (CID:1469433) Signed-off-by: Solomon Alan-Dei <alandei.solomon@gmail.com> Change-Id: I8698090d519964348e51fc3b6f2023d06d81fcd5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69021 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* util/release/build-release: Use bash arrays for paramsMartin Roth2022-11-021-8/+11
| | | | | | | | | | | | Instead of using unquoted strings for the command line parameters, use arrays which naturally split into separate elements inside the quotes. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I1c96d5072b98523af4e407cfff8f4d1d28ec3297 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67318 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
* util/kconfig: Uprev to Linux 6.0's kconfigPatrick Georgi2022-10-303-6/+1
| | | | | | | | | | | | | | Only minor changes in kconfig this time that shouldn't affect us. TEST=`util/abuild/abuild -C` output (build.h and build.conf) remains the same Change-Id: I77cc8517128a973c345c41da2c483b78eeaee89f Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68915 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
* util/kconfig: Uprev to Linux 5.19's kconfigPatrick Georgi2022-10-305-31/+35
| | | | | | | | | | | | | | Only minor changes in kconfig this time that shouldn't affect us. TEST=`util/abuild/abuild -C` output (build.h and build.conf) remains the same Change-Id: Icc83c929dd1ea2d98e1a789560ce26886ded1f12 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68914 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>