summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2024-10-23util/cbfstool: Add Intel platform boot policy supportGang Chen
Intel platform boot policy setting blob is linked into FIT table as an FIT4 entry. It is required for server executing CBnT and/or PFR without a PCH. Please refer to chapter 4.6 of the document in below link: https://www.intel.com/content/dam/www/public/us/en/documents/ guides/fit-bios-specification.pdf Tool usage: ./util/cbfstool/ifittool -f <binary> -a -n <cbfs name> -t 4 \ -r COREBOOT -s <max table size> Change-Id: I0f9fc61341430b1a35a44d50b108dcfaf31cd11c Signed-off-by: Gang Chen <gang.c.chen@intel.com> Signed-off-by: Li, Jincheng <jincheng.li@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84305 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-16util/amdtools: update K8 BKDG URLDaniel Maslowski
The document was moved. The current URL gives a 404. Change-Id: If6ca74a8bf47382100da048667976958961b9320 Signed-off-by: Daniel Maslowski <info@orangecms.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84764 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>
2024-10-14mb/google/rex: Add SPDX license headers to template MakefileTyler Wang
According to CB:68982, add SPDX license headers to rex template Makefile. Without this patch, build bot may report build failed. BUG=none TEST=Run create_coreboot_variant.sh and check Makefile Change-Id: I7d100a2303be063590f1389a7eed8f9a52071241 Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84712 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-10-14util/ifdtool/ifdtool.c: Add validation exceptionMaximilian Brune
When validating the FMAP against the IFD, the BIOS region is a somewhat specical case, since the FMAP BIOS region usually does not match the IFD BIOS region. Instead the FMAP region usually resides somewhere inside the IFD BIOS region and the where depends on CONFIG_CBFS_SIZE. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I920a0ee246cfd2b4ae0870256357d4f285e1730d Reviewed-on: https://review.coreboot.org/c/coreboot/+/79368 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2024-10-14util/marvell/doimage_mv: Update CFLAGS to CFLAGS_doimageMartin Roth
Because we import the doimage_mv/Makefile.mk directly into the main coreboot makefile, this was setting a global CFLAGS variable. That's not a huge issue since coreboot doesn't use the global CFLAGS variable, but it should be updated anyway. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Iebe281ca891745c1f993df274ef75b1440059c85 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83857 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2024-10-07util/hda-decoder: Add feature to print configuration defaults as verbsNicholas Sudsgaard
This feature simply goes through pin configurations stored in a file and converts them into their corresponding verbs. This can be useful when trying to find verb data stored inside a binary (e.g. when reverse engineering). Input: 0x16 0x04211040 0x17 0x91170110 0x18 0x40f001f0 Output: address: 0, node ID: 0x16, configuration default: 0x04211040 0x01671c40 0x01671d10 0x01671e21 0x01671f04 address: 0, node ID: 0x17, configuration default: 0x91170110 0x01771c10 0x01771d01 0x01771e17 0x01771f91 address: 0, node ID: 0x18, configuration default: 0x40f001f0 0x01871cf0 0x01871d01 0x01871ef0 0x01871f40 Change-Id: I1fb74ff4b2b654987fd25ee32d0f94e5f2f783e3 Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84669 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-02inteltool: improve support for Elkhart LakeAlexander Couzens
Add support for SPI/flash, LPC/eSPI, MCH and add pci vendor/product description. References: * CPU: Linux kernel * GPU: Linux kernel * GPU: https://dgpu-docs.intel.com/devices/hardware-table.html * Intel Atom x6000E Series, and Intel Pentium and Celeron N and J Series Processors for IoT Applications, February 2023, 636722 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Change-Id: Ida852f3c991cdd036d9c282f9cabceb23c765e25 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75214 Reviewed-by: coreboot org <coreboot.org@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-10-02util/cbfstool: Make sure to only compare PT_LOAD segmentsArthur Heymans
When parsing XIP stages only compare PT_LOAD phdrs. Currently coreboot stages only use PT_LOAD phdrs. Change-Id: I305b25032a3c4a9fdefc76cad77fafdb862a604c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84140 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-10-02arch/arm64: Use -mno-implicit-float with clangArthur Heymans
This fixes building inline assembly that uses SIMD registers. This is for instance the case in the vboot library. Change-Id: I24fa9d9f81430ea3ecd40de4304a10c6e235fece Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81658 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-10-01util/lint: Use bigint for hexadecimal values in handle_rangeSubrata Banik
The `handle_range` function in `kconfig_lint` was failing to correctly handle large hexadecimal values (64-bit value) due to limitations with Perl's handling of standard integers. This commit modifies the function to use the `bigint` pragma, enabling it to handle arbitrarily large integers. This prevents issues with 64-bit hexadecimal values and ensures accurate comparisons for range validation. Change-Id: I402bb9bec9ba5bfb79b4185f35228c41d4a7b674 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84575 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-30inteltool: elkhartlake: keep the same names as coreboot code usesAlexander Couzens
coreboot doesn't have a leading zero in gpio < 10. E.g. G00 -> G0 Change-Id: I4558cec444ae2a081fbc0f49464354df222be6c9 Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84190 Reviewed-by: coreboot org <coreboot.org@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
2024-09-30util/superiotool/ite: Add extra dumps for IT8613E ECMichał Żygowski
IT8613E EC space is divided into 3 banks selectable by EC index 0x06 bits 6:5. Bank0 mostly contains the ITE EC registers known by coreboot's ITE EC driver. Bank1 contains SB_TSI and PECI temperature reading registers. Bank2, however, contains additional registers used to select the temperature source reported in TMPIN reading registers, PECI bridge registers as well as FAN2-5 controls and extra vectors. Dump the additional banks using extra-selectors. Based on non-public IT8613E Preliminary Specification V0.3. TEST=Perform the IT8613E dump on Hardkernel ODROID H4+. Change-Id: Ic8fdc56d1b0fbe811e13bc6b800512af654c1cb6 Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80318 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maxim <max.senia.poliak@gmail.com> Reviewed-by: Alicja Michalska <ahplka19@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Marvin Drees <marvin.drees@9elements.com>
2024-09-28sconfig: Move config_of_soc from device.h to static.hNicholas Chin
Many sources include device.h and thus static.h, but many only need the function declarations and type definitions, not the compiled devicetree from sconfig. This causes many unnecessary recompiles whenever the devicetree is updated due to the dependency. Address this by moving the config_of_soc macro directly into the generated static.h header, as it seems to be the only line in device.h that actually requires static.h. For now, static.h remains included in device.h so that the build is not affected. Subsequent commits will include static.h directly into sources that actually need it, after which it can be dropped from device.h. Some statistics for C objects: Dell Latitude E6400 (GM45/ICH9): 669 total objects 181 depend on static.h 2 require static.h Dell Latitude E6430 (Ivy Bridge/Panther Point): 693 total objects 199 depend on static.h 3 require static.h Lenovo ThinkCentre M700 / M900 Tiny (Kaby Lake): 794 total objects 298 depend on static.h 23 objects require static.h MSI PRO Z690-A (WIFI) DDR4 (Alder Lake): 959 total objects 319 depend on static.h 25 require static.h The number of objects was determined by grepping the build log for calls to CC, the number of objects that depend on static.h was determined by grepping for calls to CC after touching static.h, and the number of objects that actually require the static.h related lines from device.h was determined by grepping for objects that failed to build after removing the static.h lines from device.h and running make with the --keep-going flag. Change-Id: I7c40135bf2815093b81e47201c38b7d0a6ac8fa8 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84431 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-13util/autoport: Make printing of SPDX headers genericNicholas Chin
Previously, Add_gpl() was only used with C and ASL source code files, and was hard coded to use the C /* */ style comment, preventing it from being used with files with other comment styles. Convert this into a generic function for adding arbitrary SPDX license identifiers for arbitrary filetypes. This replaces the hard coded GPL-2.0-or-later string used in gma-mainboard.ads with a call to the new function. This is also used to add SPDX headers to Kconfig and Makefile sources; as previous commits added them to all such files in the tree. Tested against logs from a Latitude E6430 (Ivy Bridge) and Precision M6800 (Haswell) to check that license headers that were already being generated did not change. Change-Id: I24a1ccd0afb7045e878bf6eaae7a23f828a9240d Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83184 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-09-13amdfwtool: Add PSP backup directory for A/B recoveryZheng Bao
Change-Id: Ia5a745c86595554c83cd13a35c312c17987b716b Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75682 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-12amdfwtool: Set the fields when the header is createdZheng Bao
The fields spi_block_size and base_addr of regular PSP header, lookup and reserved of combo header, are constants. So we move the setting statements to the creation functions. Only update the count, size and fletcher in later function file_dir_header. TEST=Binary identical test on all AMD SOC platforms Change-Id: I55c400e45536a57841b01d7c90d3fef9afa53e78 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84130 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-09-12amdfwtool: Add a unified function to add combo entriesZheng Bao
TEST=Binary identical test on all AMD SOC platform with use_combo Change-Id: I41c5c6fb5acf92604dd06becf1eda680a1fab545 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84131 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-12amdfwtool: Add combo new layout for new familyZheng Bao
The new layout definition has a new way to support combo. It packs multiple ISH entries into PSP L1 directory. TEST=Identical test on all AMD platform Change-Id: If573cdeaeb56e95d2fed235c9337fab82d622757 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84233 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-09-11util/lint/lint-final-newlines: Supply dirs in rowMaximilian Brune
This just orders the EXCLUDED_DIRS directories in a row based manner, since there are quite a few them now and it is arguably easier to read and to add new directories if they are written in a row based fashion. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I802aece355bba4900e71824d802c4b2438726e84 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83872 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-09-10util/ifdtool: Exit with failure on unrecognized flagsHsuan Ting Chen
ifdtool will exit with success while encountering an unrecognized flag. For example, -g is a newly introduced flag, when we want to call it with an older version of ifdtool, we will get the return value 0 and cause confusion. This patch change the exit status for unrecognized flags and doesn't change the exit status for -h and -?. BUG=b:362983041 BRANCH=none TEST=futility update --servo --image /var/tmp/image.bin --quirks unlock_csme on the servo host with old ifdtool Signed-off-by: Hsuan Ting Chen <roccochen@google.com> Change-Id: I046ad7ec790cda41a98a1de5cd730d32f65a9067 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84260 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-09util/cbfstool: Print max empty entry size in error messageYu-Ping Wu
Currently, cbfstool prints the following error message when the added file doesn't fit in the region: E: Could not add [file, 1024 bytes (1 KB)@0x0]; too big? It requires manual inspection to know the space left in the region. To make that easier, also print the maximum empty CBFS entry size in the error message: E: Could not add file [header 76 + content 1024 bytes (1 KB)] @0x0; Largest empty slot: 512 bytes Change-Id: I00bcc83abe8b0a33dcd7b75521e6cfccd8953661 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84204 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com>
2024-09-07amdfwtool: Set L2 table size as 0x400Zheng Bao
The Max size of L2 table is 0x400. If we set it to other value, the the A/B recovery image can not boot on Cezanne/Majolica platform. The affected boards are Birman, Chausie, Skyrim, Mayan. Other boards are binary identical. Tested on Skyrim and image can boot. Change-Id: I2c0af6579dbe2a3a61e1fe9c79d69491fd45a5bb Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84194 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-03util/inteltool: Fix format for PCI vendor/device IDsAlexander Couzens
PCI vendor/device IDs are 16 bit. Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Change-Id: I87804a63f04b7461d348a245531542776575eb7a Reviewed-on: https://review.coreboot.org/c/coreboot/+/84186 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-29util/hda-decoder: Protect 'fields' slice if empty stringMaxim Polyakov
This avoids panic if the file contains an empty string or an incorrect configuration: goroutine 1 [running]: main.decodeFile({0x7ffd63da92a0?, 0xc000014070?}, 0x8?) /path/to/coreboot/util/hda-decoder/main.go:72 +0x2ef main.main() /path/to/coreboot/util/hda-decoder/main.go:158 +0x2a5 Change-Id: I9ae8544e52d82e8d8a82a88a85a2de7d2f295ec1 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84101 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-08-28util/scripts: Add script to capture commands from buildMartin Roth
This allows better debugging of the build by writing all the commands run by the build into a file by replacing the standard shell. Run with: make SHELL="${PWD}/util/scripts/capture_commands.sh" This will allow us to verify that the commands being run are posix compliant. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I67efc5096747c2e746642639f88273132e070e49 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83442 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-08-28util/crossgcc: Patch clang to enable linking x86 bare metal targetsArthur Heymans
This allows clang to link x86 bare metal targets. TESTED: Qemu i440fx and q35 boot to payload with both 32 and 64bit code compiled with clang and LTO enabled with updated linker script. Change-Id: I943215c8714e392e52ea35667f2bf21e517c4255 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84032 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-26nb/intel/haswell: Move SPD addresses to devicetreeKeith Hui
Introduce a sandybridge-style devicetree setting for SPD addresses, and use it instead of runtime code in mb_get_spd_map() for all haswell boards without CONFIG(HAVE_SPD_IN_CBFS) - effectively all boards except google/slippy. Patch also covers recently added Z97 boards using Broadwell MRC. Also update util/autoport to match. abuild passes for all affected boards. autoport builds, but otherwise untested. Change-Id: I574aec9cb6a47c8aaf275ae06c7e1fb695534b34 Signed-off-by: Keith Hui <buurin@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79025 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23crossgcc: Upgrade LLVM from 18.1.6 to 18.1.8Elyes Haouas
Change-Id: Id74ba772f105a5c36308b8e1dd803ae50840002b Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83005 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-23crossgcc: Upgrade CMake from 3.29.3 to 3.30.2Elyes Haouas
Change-Id: I0bb1a2a84d81ec03c4468955926f3f0c94276203 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83007 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-23crossgcc: Upgrade GCC from 14.1.0 to 14.2.0Elyes Haouas
Change-Id: I6ffff766fb1fa91ad376c3e7e9aebe17c3288725 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83839 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-23crossgcc: Upgrade binutils from 2.42 to 2.43.1Elyes Haouas
Change-Id: I1c9d1b2e336894ac48ce87e4d3390e9f9557d4f7 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83816 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-23region: Turn region_end() into an inclusive region_last()Nico Huber
The current region_end() implementation is susceptible to overflow if the region is at the end of the addressable space. A common case with the memory-mapped flash of x86 directly below the 32-bit limit. Note: This patch also changes console output to inclusive limits. IMO, to the better. Change-Id: Ic4bd6eced638745b7e845504da74542e4220554a Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79946 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-08-22util/sconfig: Probe device when fw_config is unprovisionedKarthikeyan Ramasubramanian
When fw_config is unprovisioned (eg. in the factory), devices that do not have any probe list are enabled by default and those that have probe list are disabled. On mainboards that support multiple types of boot critical devices (eg. storage) through probing fw_config, all of them are disabled when fw_config is unprovisioned. Hence the devices do not boot to OS. Add sconfig fw_config rule `probe unprovisioned` to enable such devices when fw_config is unprovisioned. BUG=None TEST=Build Brox firmware and boot to OS when fw_config is unprovisioned. Change-Id: I178f821e077912776d654971924d67203a7c43df Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83983 Reviewed-by: Jon Murphy <jpmurphy@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2024-08-20util/find_usbdebug: Add 8/9 Series PCH rate matching hub IDsNicholas Chin
The USB IDs of the EHCI rate matching hubs found in these chipsets were missing, preventing the utility from detecting connected USB devices. Change-Id: I52858e2c75e8a3e1424a13bcddc2f5ec1216164b Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83458 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-20util/cbfstool/cbfs-payload-linux: Add error handlingMaximilian Brune
This adds some error handling to the code that adds the input segments (e.g. kernel, cmdline, initrd...) to the output file. Currently the compress function can fail and coreboot will still build "successfully" leaving whoever build coreboot puzzled. Change-Id: Ie36ad469c73cb3ff9360acc9bbe66c245e8b4a1e Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83617 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-19util/cbfstool/cbfs-payload-linux: Do not compress bzImageMaximilian Brune
Compressing the already compressed bzImage does not yield any fruit. If you are lucky it actually makes the image a little bit smaller. If you are unlucky the image actually gets bigger and since the compressing function is not checked for any errors, coreboot just builds successfully even though the payload is broken through compression. Before this patch you could possibly get this error during compilation: ``` E: LZMA: LzmaEnc_Encode failed 9. ``` and your linux payload would end up something like this in CBFS: ``` FMAP REGION: COREBOOT Name Offset Type Size Comp .... fallback/payload 0x1c9c0 simple elf 511 none .... ``` That doesn't stop coreboot from finishing the build though, since we currently don't check for errors from the compression. That is an issue for another patch though. Tested: Build and run QEMU-Q35 with Linux bzImage as payload. Change-Id: I022982667515ce721d98af534414d9e336b5f35a Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83615 Reviewed-by: coreboot org <coreboot.org@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-14util/liveiso/nixos/graphical: Preconfigure some Gnome settingsFelix Singer
These settings are not a must, but nice to have. The most noteworthy setting is `sleep-inactive-ac-type`, which is set to `nothing` so that the target doesn't go into suspend when AC is used as power supply and it's unused for a while. Change-Id: I9a6e3eb88427f94f504a6b991a98b1b51e11bc19 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83853 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Jan Philipp Groß <jeangrande@mailbox.org>
2024-08-14util/liveiso/nixos/graphical: Replace PulseAudio with PipeWireFelix Singer
PipeWire is the successor of PulseAudio. So use that instead. Change-Id: Ib557925e481ab72a31a64c4bf353a261dff4296d Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83851 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jan Philipp Groß <jeangrande@mailbox.org>
2024-08-11region: Introduce region_create() functionsNico Huber
We introduce two new functions to create region objects. They allow us to check for integer overflows (region_create_untrusted()) or assert their absence (region_create()). This fixes potential overflows in region_overlap() checks in SMI handlers, where we would wrongfully report MMIO as *not* overlapping SMRAM. Also, two cases of strtol() in parse_region() (cbfstool), where the results were implicitly converted to `size_t`, are replaced with the unsigned strtoul(). FIT payload support is left out, as it doesn't use the region API (only the struct). Change-Id: I4ae3e6274c981c9ab4fb1263c2a72fa68ef1c32b Ticket: https://ticket.coreboot.org/issues/522 Found-by: Vadim Zaliva <lord@digamma.ai> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79905 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-08-09coreboot-sdk/Dockerfile: Add 'gettext' and 'xfonts-unifont'Harrie Paijmans
Required for building grub2. BUG=N/A TEST=Build successfully for 'QEMU x86 i440fx/piix4' with GRUB2 payload. Change-Id: I97860f33dd3fde2f6db2f005d65b53cd669403e9 Signed-off-by: Harrie Paijmans <hpaijmans@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83676 Reviewed-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-09util/spd_tools: Add Intel Panther Lake (PTL) platformSubrata Banik
This patch add support for PTL platform to the `spd_tools`. This would be useful to create dynamic SPD for fatcat variants. BUG=b:347669091 TEST=Able to generate SPD for LP5 DRAM part. Change-Id: I55c3f49439fb1ad961c6866f03594431e54279b9 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83822 Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
2024-08-08Makefile: Move `--no-warn-rwx-segments' into xcompileNico Huber
The parameter is not available for binutils older than 2.39. So move it to xcompile to provide backwards compatibility for a bit. Change-Id: I02982769ae2c356f037a747e85d155368bfcb730 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83693 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-08-08util/amdfwtool: add support to specify RPMC NVRAM regionFelix Held
Add support to specify the base and size of the replay-protected monotonic counter (RPMC) non-volatile storage area in the SPI flash. A later patch will use this to tell amdfwtool about the location and size of the corresponding FMAP section. This code is ported from github.com/teslamotors/coreboot/tree/tesla-4.12-amd Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Idafa7d9bf64125bcabd9b47e77147bcffee739e2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83812 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-08-05util/cbfstool/common.h Fix wrong return value docMaximilian Brune
The compressing and decompressing functions return 0 on success and not the other way around. Change-Id: I9f8653aa805c62eb4bfc3560d7880921830c2c59 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83616 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-05util/autoport: Put devicetree devices above chipsAngel Pons
For Sandy/Ivy Bridge boards, this results in northbridge devices ending up north of (above) southbridge devices. Which is the convention pretty much all boards in the tree uses. Change-Id: I9dc2ff13182ff9d92141b1736796749cea49d23a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82406 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-05util/autoport: Use sudo to call log-making programsAngel Pons
Running autoport as root has the annoying side effect of making all generated files owned by root. Prevent this by using sudo to invoke log-making programs (lspci, dmidecode, acpidump, inteltool, ectool, superiotool). These programs either need to be run as root or allow collecting more information if run as root (lspci). In case there's a valid reason not to use sudo, provide a prompt to let autoport run the programs directly, as it originally did. There might be someone trying to run autoport from an OS that lacks sudo. Change-Id: I4bf4ddf8dd2cb930e9b7303e2ea986d8c072aa7a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82404 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-08-05util/autoport: Streamline external program invocationAngel Pons
The original approach to call external programs was rather convoluted and would fall back to running executables inside the current working directory if running them from the location specified in the code did not succeed, swallowing any errors from the first invocation. Rewrite the system around the `LogMakingProgram` concept, a struct to represent a program. Each program has a name, prefixes to try running it from and the arguments to pass to it (if any). Plus, collect error information from failed executions, but only show it when none of the prefixes resulted in a successful invocation. In addition, look for programs in PATH instead of CWD: it is unlikely that all utils will be in the CWD, but utils can be in the PATH after one installs them (`sudo make install`). For coreboot utils, look for them in the utils folder first as the installed versions might not be up-to-date. Furthermore, print out the command about to be executed, as there are some commands (e.g. `ectool` on boards without an EC) that can take a very long time to complete. Change-Id: I144bdf609e0aebd8f6ddebc0eb1216bedebfa313 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82403 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01xcompile: Apply -Wextra with temporary exceptions to GCCFelix Singer
In order to detect more issues in our code, make GCC more picky by enabling -Wextra. Disable a couple of warnings turned on by -Wextra temporarily in order to keep everything compiling and working for now. The warnings may be enabled step by step later. Since xcompiles applies to coreboot and libpayload, add Wextra here instead of the top-level Makefile.mk. Change-Id: I60915cb66581dc2c9b6807335fd0e214b45e76d6 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83347 Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-08-01util/superiotool/fintek: Add missing F81804 name for 0x0215 idMaxim Polyakov
"0x1502 F81804 chipset ID, same for F81966" in https://web.archive.org/web/20240628153609/https://github.com/torvalds/ linux/blob/master/drivers/gpio/gpio-f7188x.c Change-Id: I6889ad8ad861465316333ff997956a05b74c5855 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83018 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31device/path: rename domain path struct element to 'domain_id'Felix Held
Rename the 'domain' element of the 'domain_path' struct to 'domain_id' to clarify that this element is the domain ID. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Suggested-by: Martin Roth <gaumless@gmail.com> Change-Id: I3995deb83a669699434f0073aed0e12b688bf6e7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83677 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-07-31util/superiotool/fintek: Add f81966 register tableMaxim Polyakov
In accordance with the F81962/F81964/F81966/F81967 datasheet: Release Date: Feb, 2018, Version: V0.18P [1]. [1] https://web.archive.org/web/20240707052102/http:// www.jetwaycomputer.com/download/Fintek/F81966_wdt_gpio.zip Change-Id: Ic3418c337883538e47eb181cbe1ad2dc828e12a1 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83019 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-31util/superiotool/fintek: Add f81866 register tableMaxim Polyakov
In accordance with the F81866A datasheet: Release Date: Jan, 2012, Version: V0.14P [1]. [1] https://web.archive.org/web/20240707051837/http://www. jetwaycomputer.com/download/Fintek/F81866_wdt_gpio.zip Change-Id: I4367a1129fe628e7bf05d49678ea1c3718da710b Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83004 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-31util/superiotool: Add extra selectors supportMaxim Polyakov
Some chips (fintek [1,2]) have registers with specific selector-fields that can affect the address space of the device (for example, switch the register bank). At the same time, these registers contain fields that should not change after they are configured in BIOS (for example, set the port to 2E/2F or 4E/4F). In this case, the selector should take into account the mask of the register fields and there is no convenient and easy way to add this in the code in the utility. The selector-fields should be set manually before the dump and this action is done several times. This patch adds an extra-selector mechanism that allows superiotool to make a correct dump in automatic mode. Just add a structure with an index, mask, and value for the selector inside the superio_registers chip for the corresponding LDN to switch the register bank: {FINTEK_F81966_DID, "F81962/F81964/F81966/F81967", { * * * {NOLDN, "Global", {0x28,0x2a,0x2b,0x2c,EOT}, {0x00,0x00,0x00,0x00,EOT}, {.idx = 0x27, .mask = 0xd, .val = 0x1} /* update extra selector */ }, {0x03, "LPT", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {NANA,0x03,0x78,0x07,0x03,0xc2,EOT} /* without extra selector */ }, * * * Tested with Fintek F81966 on Asrock IMB-1222: - run superiotool on Ubuntu and dump the registers for the board with the vendor's firmware; - add the superio chip initialization code to the board configuration in coreboot and build the project; - boot Ubuntu on the board with coreboot and re-dump the registers; - the register values from the board configuration code are the same in both dumps. Found Fintek F81962/F81964/F81966/F81967 (vid=0x3419, id=0x0215) at 0x2e (Global) -- ESEL[27h] 0x00 (Port Select Register) -- idx 02 07 20 21 23 24 25 26 27 28 29 2a 2b 2c 2d val 00 0b 15 02 19 34 5a 23 80 a0 f0 45 02 e3 2e def NA 00 15 02 19 34 00 23 02 a0 00 00 02 0c 28 * * * The changes do not affect the configuration of existing chips, which was tested on the Asrock H110-STX motherboard with Nuvoton NCT5539D (the dump before and after the changes are the same). [1] CB:83004 [2] CB:83019 Change-Id: If56af9f977381e637245bdd26563f5ba7e6cbead Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83196 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-24util/autoport/*.md: List Haswell as supportedNicholas Chin
As of commit 3f0bb2fb0741 (autoport: Add support for Haswell-Lynx Point platform), autoport supports Haswell in addition to Sandy Bridge and Ivy Bridge. Change-Id: Iccc10441389580ff8e89c3718484d25d20970f68 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83609 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-23xcompile: Drop CC_RT_EXTRA_GCC for PPC64Nico Huber
It looks like some unused artifact: The PPC64 Makefile.mk doesn't pick it up. Also, the only other architecture using this (x86) has linker flags there, not compiler flags. Change-Id: I734542db9ee5b62d9a39d303d4092cd83dfef54b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83577 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-07-22util/mtkheader: Add gfh header for mt8196 bootblock codeJarried Lin
TEST=Build Pass. BUG=b:317009620 Change-Id: Ida203a72c23b94b1848418c9727a5788df421eea Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83569 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-07-18util/liveiso/nixos: Install various extractor toolsFelix Singer
Firmware files are packaged in various formats and very often some Windows-only executable is used for unpacking files. These extractors allow to deal with some of them without having to run the executables. Change-Id: I1346807508a6baba801c4d5ed0a575b17e06c8d4 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83522 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-07-16util/liveiso/nixos: Install TPM related toolsFelix Singer
Change-Id: Idbf4f40f495fac6c08a9017bfbff25043d7fbb82 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83463 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2024-07-16util/cbfstool: Add eventLog support for ELOG_TYPE_FW_LATE_SOLSubrata Banik
In order to support logging events for when we show early signs of life to the user during CSE FW syncs add support for the ELOG_TYPE_FW_LATE_SOL type. BUG=b:305898363 TEST=verify event shows in eventlog CSE sync. Change-Id: I862db946f6ff622ac83072e6bf27832732c0c318 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83462 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-07-15util: Add hda-decoderNicholas Sudsgaard
This tool helps take off the burden of manually decoding default configuration registers. Using decoded values can make code more self-documenting compared to shrouding it with magic numbers. This is also written as a module which allows easy integration with other tools written in Go (e.g. autoport). Change-Id: Ib4fb652e178517b2b7aceaac8be005c5b2d3b03e Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80470 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2024-07-14autoport: Add support for Haswell-Lynx Point platformIru Cai
Tested with the following devices (not exhaustive): - Dell Latitude E7240 - Dell Precision M6800 and M4800 - Asrock Z87E-ITX - Asrock Z87M OC Formula - Asrock Fatal1ty Z87 Professional Change-Id: I4f6e8c97b5122101de2f36bba8ba9f8ddd5b813a Signed-off-by: Iru Cai <mytbk920423@gmail.com> Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/30890 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-12amdfwtool: make fields unsignedGeorge Burgess IV
The value stored in `gen` is only ever `1` or `0`. Storing `1` causes Clang to warn, since the only valid values for a 1-bit int are -1 and 0: ``` amdfwtool.c:1487:27: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] 1487 | amd_romsig->efs_gen.gen = EFS_BEFORE_SECOND_GEN; ``` TEST=Rebuilt coreboot; no warning was emitted. Change-Id: Ibd83be8302e8a717db7e7dc86a403b5648976586 Signed-off-by: George Burgess IV <gbiv@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83412 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
2024-07-11sconfig: Provide simple constants for aliased devicesNico Huber
Expose aliased PCI and PNP devices as `pci_/pnp_devfn_t` constants in <static_devices.h>. They will be named `_sdev_<alias>` to have a underscore prefix for consistency and to not collide with the `struct device` objects (with `_dev_` prefix). Change-Id: I2d1cfe12b1e7309f8235c84dd220bd090ebfe1b5 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82764 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-07-10autoport: Drop ioapic, ioapic_irq, and lapic handling for devicetreeNicholas Chin
The ioapic and ioapic_irq keywords are no longer valid tokens as of commit e84b095d3a23 (util/sconfig: Remove unused ioapic and irq keywords), and the associated driver had previously been removed in commit ca5a793ec31c (drivers/generic/ioapic: Drop poor implementation). Thus, drop them from autoport. Also, the IOAPICIRQs map that this code relied on to generate ioapic_irq entries never seems to have been populated by any code in any previous commit, so this appears to have been dead code since autoport was created. The lapic keyword was removed from sconfig in commit 15d5183e4af7 (util/sconfig: Remove lapic devices from devicetree parsers) so remove autoport handling for it as well. Change-Id: Icf2582594b244cf5f726c722eb3a3c12573a2662 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83358 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-10xcompile: Use one line per CLANG_CFLAGS_${TARCH} flagElyes Haouas
Change-Id: I5c649898218a9c5d51d18a35264e9636e3dee179 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83374 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-08util/ifdtool: dump SPI modes from FLCOMPAlexander Goncharov
These fields are documented in the Alder Lake-S Client Platform SPI Programming Guide, but they are not presented in the Skylake-LP Client Platform SPI Programming Guide Change-Id: I624fe5cb28aa3cb207bc48aa8d31b2a71b70bcf2 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83282 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-07-06util/sconfig: Remove unnecessary strdup() callsJakub Czapiga
getopt() optarg value can be used without duplicaing if it is not modified, as it is the case here. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: Ie5a27f64077af1c04b06732cd601145b8becacfd Reviewed-on: https://review.coreboot.org/c/coreboot/+/70525 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-05autoport: Print location of generated sourcesNicholas Chin
Autoport determines the mainboard vendor and board names based on DMI entries, which sometimes doesn't result in the most obvious name. In addition, newcomers may not be familiar with coreboot's directory structure and have no idea where to look. Print out the absolute patch of the generated sources once autoport finishes so that it is easier to locate the files. Change-Id: I4ba00484ac57355d7539fa6e36e0e6df62719f8a Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83344 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-07-05autoport: Factor out GPIO config generationNicholas Chin
Intel chipsets from ICH7 through Lynxpoint use the same GPIO register format and thus mainboards using using these platforms have similar gpio.c files. Factor out the code to generate gpio.c from bd82x6x.go so that it other chipsets added to autoport can use it. This was originally written by Iru Cai in his Haswell autoport patch in CB:30890; I have simply split out the code to a separate commit as it is a separate logical change. TEST=Generated output is identical before and after this patch when run against logs from a Dell Latitude E6430 Change-Id: If1f506f6ad10144bd6acc42505592426bb7193b7 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83286 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-07-05util/liveiso/nixos: Install flashprogFelix Singer
Change-Id: Id0a0de9bbbe2d3b0885bec2abea0a2022a7e1cbb Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83352 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-04util/liveiso/nixos: Update to 24.05Felix Singer
Change-Id: I62dc3a7fd5b8aef467fc547015f23e41d3260122 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83276 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-07-03Revert "util/crossgcc: Update ACPICA from 20230628 to 20240321"Maximilian Brune
This reverts commit 41fdb882f1f0c3cda41651c2e9c920580415a0dc. Reason for revert: The version downloaded does not match the version that is printed out when executing `iasl --version`. coreboot notices that and refuses to compile QEMU-Q35 mainboard. I tested it on 2 different PCs. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I3ce0c5798f14162eaa063a9a64e16e6dbbb9e468 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83296 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-07-02util/ifdtool: fix spacing issuesAlexander Goncharov
Ensure consistent spacing around colons in bit fields, operators, statements and function calls. Found by the linter (check-style). Change-Id: I817b1dcf106cc360a7db56e5b4b0716d5419e2cd Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83281 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-25util/autoport: Move SPDX header before defines in dsdt.aslNicholas Chin
Macros were being printed before the SPDX header in dsdt.asl, so fix this. Previous output: #define BRIGHTNESS_UP \_SB.PCI0.GFX0.INCB #define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB /* SPDX-License-Identifier: GPL-2.0-only */ Change-Id: Idebdcf816911af9d262a114c86461e6fa5bfd1f8 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83187 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-24util/autoport: Remove extra blank lines from generated filesNicholas Chin
The generated dsdt.asl and early_init.c files contained 2 consecutive blank lines, so remove one of them. Change-Id: Iad74098518320c5389cb86badb8737e81dd656ae Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83186 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-23util/autoport: Remove bd82x6x/pch.h from generated mainboard.cNicholas Chin
The southbridge/intel/bd82x6x/pch.h header was previously used to configure a few registers in SPIBAR, but these have since been moved to PCH code and the devicetree, making it unnecessary in mainboard.c Change-Id: I904c95394b4fea73b4990342e647595b5f10335f Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82601 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21coreboot-sdk/Dockerfile: Remove explicit install of 'm4'Elyes Haouas
Remove m4 as an explicity installed package as it will be installed automatically by flex and bison. Change-Id: Ic4f1c5e6f3324429914bf593047d802dfcc0cb30 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82512 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21util/intelp2m: Remove blank line after '{'Maxim Polyakov
The generator inserts into the gpio.h an unnecessary blank line in front of the list of macros in the table. Let's remove this from the template to make the code cleaner. These changes have no effect on the configuration of macros. Change-Id: I1141ca630cb6d9a46be5bce2b434762ef8e6fdd0 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83003 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21util/intelp2m/platforms: Fix DW register number before clear itMaxim Polyakov
This error does not affect the generated files as the tests are running [1, 2, 3]. However, this once again confirms the need to work on updating the utility. [1] CB:67132 [2] CB:67133 [3] CB:67134 Change-Id: I91e74d65977bd5e10589530258d1709ea33f1af5 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83002 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-21util: Move remainings from ipqheader to qualcomm directoryElyes Haouas
With commit 101098c41a ("sdm845: Combine BB with QC-Sec for ROM boot"), most files from ipqheader were moved to the qualcomm directory. Change-Id: I4e5136bd5ec4fd47bbd93cea2e4614fa63a3bd4e Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83028 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-21util/ifdtool: Add Panther Lake platform support under IFDv2Subrata Banik
BUG=b:347669091 TEST=Able to build ifdtool. Change-Id: Id261898932f11f4c9066453bce18fd889996e171 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83141 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-20cbfstool: Read XIP stage alignment requirements from ELFArthur Heymans
On x86_64 romstage can contain page tables and a page table pointer which have an larger alignment requirement of 4096. Instead of hardcoding it, read if from the ELF phdrs. Change-Id: I94e4a4209b7441ecb2966a1342c3d46625771bb8 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82102 Reviewed-by: Shuo Liu <shuo.liu@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-19util: Break up spdx identifier text in scripts & makefilesMartin Roth
The SPDX parsers can find the SPDX identifiers in the scripts and makefiles if they aren't broken up. This unnecessarily confuses things when we're doing license parsing. Change-Id: I215ed047397f342c912f1a969315fa184a124f6a Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80585 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-06-17util/intelp2m: Add support for Emmitsburg macro generationFabian Meyer
Test: Generated GPIO for ASRock Rack SPC741D8-2L2T/BCM. Change-Id: Ib7ded47fb1c0b87ebb3cecaf3e41319ac552b797 Signed-off-by: Fabian Meyer <fabian.meyer@student.kit.edu> Co-authored-by: Yussuf Khalil <yussuf.khalil@kit.edu> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82204 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maxim <max.senia.poliak@gmail.com>
2024-06-17util/autoport: Factor out yes/no prompt handlingAngel Pons
In preparation for introducing other yes/no prompts, factor out the logic into a common function. Change-Id: Iff1f0c6c665a5352013122fb791121a116c434f3 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82402 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-14util/inteltool: Add more Westmere/Ironlake device IDsAngel Pons
The host bridge PCI device ID can be changed by the firmware. There is no documentation about it, though. There's 'official' IDs, which appear in spec updates and Windows drivers, and 'mysterious' IDs, which Intel doesn't want OSes to know about and thus are not listed. For the sake of completeness, add the PCI device IDs for Clarkdale. Though coreboot only supports Arrandale, both of them are Ironlake. It is possible that the Management Engine handles changing the PCI device ID, which would not happen when using a broken ME firmware. Change-Id: I85a48fcf0e0e62f42fe147a5d4e2d557b2143e5b Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60215 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-14util/smmstoretool: add uint64 data typeSergii Dmytruk
It's in particular useful for working with variables that contain 64-bit pointers, like CapsuleUpdateData* global variables defined by UEFI specification. Change-Id: I4b46b41cdc5f69d4ca189659bef1e44f64c0d554 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82611 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2024-06-14util/smmstoretool: fix uint{16,32} not being listed by helpSergii Dmytruk
These data types were added during review of CB:79080 but they weren't added to the help message. Change-Id: I6e79d65c80c292c3f5d2a2611e602db5cc6cf374 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82610 Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2024-06-12util/autoport: Update for recent USB developmentsKeith Hui
Update autoport for: 1. Commit ee126348726b ("nb/sandybridge,sb/bd82x6x: Configure USB from southbridge devicetree") 2. Commit 94625d2aae76 ("sb/intel/bd82x6x: Allow actual USBIRx values for native USB config") As a side effect of #2 above, no more (broken anyway) FIXME comment will be written for usb_port_config. Change-Id: I3b8f44d9de19a7446e2fbcbce1aab6ec6583ebe3 Signed-off-by: Keith Hui <buurin@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82656 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-10util/autoport: Assign SPD addresses in devicetreeAngel Pons
Commit 45e4ab4a660c (mb/*: Update SPD mapping for sandybridge boards) changed the way in which SPD addresses are set up for SNB/IVB boards, but autoport was not updated to reflect these changes. Result is: register "spd_addresses" = "{0x50, 0x51, 0x52, 0x53}" # FIXME: Put proper SPD map here" The stray quote at the end is irritating, but is hard to get rid of without substantial refactoring of autoport's guts. But, given that this is a FIXME comment, anyone using autoport should just drop the comment after verifying the SPD map, so it's not a big deal. In addition, update the corresponding section of the README, which was horrendously out-of-date. Change-Id: I6ad38f53afc4fafb45be7f086723cc0782a965ed Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82405 Reviewed-by: Keith Hui <buurin@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-09util/superiotool: Add support for dumping ITE IT8659E configurationMichał Żygowski
Based on the non-public "ITE IT8659E-I Preliminary Specification V0.7.2 (For H Version)". TEST=Dump IT8659E configuration on the new Protectli platform Change-Id: Ic036f8b99d5bd0107be7850fc4509da1bf020fe5 Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80495 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-07sb/intel/bd82x6x/early_usb.c: Align native current map with MRCKeith Hui
Replace 3 unused values in the map with those found during a Ghidra examination of MRC binary, and on hardwares running vendor firmware (asus/p8z77-m and HP Z210 CMT Workstation). The outgoing values were introduced in commit 216ad2170ca8 ("sb/intel/bd82x6x: Add new USB currents") in anticipation for Gigabyte GA-Z77-DS3H mainboard, but effort to land it was eventually abandoned. Since commit xxxxxxxxxxxx, such values can be placed directly in the port config, so there should be no hurdle should that effort be resurrected. Add a few #defines in pch.h to place some inline documentation on MRC values, but more will be documented in the future when this mapping is introduced MRC-side. Finally, update autoport to match. Change-Id: I195c7f627994e48f7a6e6698589504dc96248cff Signed-off-by: Keith Hui <buurin@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82754 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-06-07util/smmstoretool: explain what happens when no store is foundMaciej Pijanowski
We are going to expose ths tool to end users, and want to take care that the presented information can be consumed by them. The current code simply prints below warnings if we use release binary available for end-user to download: No firmware volume header present No valid firmware volume was found It will be concerning and not clear to end users, they might not understant why it happens, what are the implications, and whether it is something that they should worry about. This commit tries to explain what actually happens here. Change-Id: Iaa2678f5ae7c243811484c0567ced97ae0b3fc0a Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82692 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-06-04util/xcompile: Use new GCC's warning options only if supportedElyes Haouas
Wflex-array-member-not-at-end & Wcalloc-transposed-args are not supported when using GCC older than GCC-14. Use them only when supported. Change-Id: I11c1e729569c8130bd254a10454c5066a72974d6 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82785 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-03util/cbfstool: Fix linux_trampoline.c generationShuo Liu
linux_trampoline.c generation is broken with latest crossgcc-i386 toolchain. Fix the issue to enable the building. ../cbfstool/linux_trampoline.S: Assembler messages: ../cbfstool/linux_trampoline.S:100: Error: no instruction mnemonic suffix given and no register operands; can't size instruction <builtin>: recipe for target '../cbfstool/linux_trampoline.o' failed TEST=Build and boot on intel/archercity CRB cd util/cbfstool/ rm linux_trampoline.c make linux_trampoline.c Change-Id: I7faca296f946bb4e9fd510661357925e5dcf9a6b Signed-off-by: Shuo Liu <shuo.liu@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82704 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-29tree: Use <stdio.h> for snprintfElyes Haouas
<stdio.h> header is used for input/output operations (such as printf, scanf, fopen, etc.). Although some input/output functions can manipulate strings, they do not need to directly include <string.h> because they are declared independently. Change-Id: Ibe2a4ff6f68843a6d99cfdfe182cf2dd922802aa Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82665 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29util/nvidia: Use c11 dialectElyes Haouas
Change-Id: I75909ce85eed549d9094ba6f62d93656621d9f0d Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82679 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29util/superiotool: Use c11 dialectElyes Haouas
Change-Id: Ic03d9ac883a92d52467d563f048446871b928712 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82678 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-27lint-stable-003-whitespace: Exclude DTB filesMaximilian Brune
This excludes Devicetree blob files from the list of files to check for superfluous whitespaces. A DTB file has recently been added in commit 33079b8174 ("lib/device_tree: Add some FDT helper functions"). Change-Id: Ic25ee5361163446370c530cccefa3bf085895d15 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82638 Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Shuo Liu <shuo.liu@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-21lib/device_tree: Add some FDT helper functionsMaximilian Brune
This adds some helper functions for FDT, since more and more mainboards seem to need FDT nowadays. For example our QEMU boards need it in order to know how much RAM is available. Also all RISC-V boards in our tree need FDT. This also adds some tests in order to test said functions. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I2fb1d93c5b3e1cb2f7d9584db52bbce3767b63d8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/81081 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>