Leah Rowe
0e1e0fd0e8
Reapply "coreboot/x2e_n150: fix mismatching fsp header"
...
This reverts commit 154c5ff319 .
this one is still needed, for x2e n150
2026-05-19 12:07:03 +01:00
Leah Rowe
ad2d082bc2
Revert "cb/default: use rev 62c8197dd25376cb7b18d272af167cb176d28bcf"
...
This reverts commit fedeb6ecd8 .
this, along with several other updates, have been reverted.
dell 3050 micro had boot issues, on the update. i therefore
revert the recent revision update, pending further investigation.
2026-05-19 11:54:05 +01:00
Leah Rowe
9a132f96a2
Revert "coreboot: never, ever use Werror"
...
This reverts commit 2ecfe63b5f .
2026-05-19 11:53:54 +01:00
Leah Rowe
e90e1df74d
Revert "consolidate haswell iommu patches"
...
This reverts commit f60350344a .
2026-05-19 11:53:46 +01:00
Leah Rowe
154c5ff319
Revert "coreboot/x2e_n150: fix mismatching fsp header"
...
This reverts commit 0aa019d323 .
2026-05-19 11:53:36 +01:00
Leah Rowe
0aa019d323
coreboot/x2e_n150: fix mismatching fsp header
...
thanks to sirlami on irc for pointing this out.
due to lbmk blob policy, we must not distribute
fsp except as the full, concatenated binary, thus
complying with intel's license. it is removed from
builds before release, re-inserted via vendor
inject scripts in the usual way.
a while ago, coreboot updated fsp but i had to keep
it on the earlier version for this board, lest old
releases no longer match vendor insertion; the new
fsp version also wasnet well tested, and didn't seem
to contain any changes reported that pertained to
our use of it.
the fsp headers do not match the fsp binary in use,
causing boot issues for users on topton x2e n150.
this patch should fix the issue, as reported by
sirlami who is the one who found and first tested
this fix; i'm simply changing the configuration,
as per sirlami's guidance.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-05-05 23:21:30 +01:00
Leah Rowe
f60350344a
consolidate haswell iommu patches
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-23 23:14:25 +01:00
Leah Rowe
2ecfe63b5f
coreboot: never, ever use Werror
...
not even once
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-23 21:55:11 +01:00
Leah Rowe
fedeb6ecd8
cb/default: use rev 62c8197dd25376cb7b18d272af167cb176d28bcf
...
this brings the following changes from upstream, since the previous revision:
* 62c8197dd2 mb/google/calypso: Implement ramstage boot logic and QUP firmware loading
* 86c6c748ed mainboard/google/calypso: Update board name in board_info.txt
* 4298078683 mb/google/calypso: Implement `platform_romstage_main` and `platform_romstage_postram`
* 1c79360b44 soc/qualcomm/calypso: Split CPUCP binary into RO and RW regions
* fc1ba3d9b3 soc/qualcomm/calypso: Add soc_prepare_bl31_handoff hook
* 03aaebef7e soc/qualcomm/calypso: Enable CBFS preloading for BL31 and BL32
* e242958a7d soc/qualcomm/calypso: Add weak mainboard_soc_init hook
* 24160f6e3d soc/qualcomm/calypso: Add late init boot state entry
* 10a2805216 soc/qualcomm/calypso: Implement cbmem_top_chipset()
* 9cb549b4e7 mb/google/calypso: Select SOC_QUALCOMM_CDT
* ef4aa128e2 soc/qc/calypso: Introduce CDT_DATA region
* d9c36cb483 soc/qualcomm/calypso: Include cdt.c in romstage compilation
* e2115d2079 soc/qualcomm/calypso: Update apdp.mbn path to use BLOB_VARIANT
* 9fc7c2e3b2 soc/qc/calypso: Implement frequency-based QSPI GPIO drive strength
* 6c566de88d soc/qualcomm/calypso: Make SPI bus frequency configurable via Kconfig
* ef24143cc4 editorconfig: Explicitly set indent_size
* 559eafd2c6 arch/x86/acpi_bert_storage: Add CPER_SEC_PLATFORM_MEM_GUID
* 967ac0be68 soc/amd/common/block/cpu/mcax: Fill generic HEST entry
* 6395a3f1a2 soc/amd/common/block/cpu/mcax: Add helper to identify bank
* 441926d0df soc/amd/common/block/cpu/mcax: Add method to read FRU text from MSR
* ff4ce4fa8a cbfstool: Rename COREBOOT_TS to COREBOOT_B
* 8a50ec739b nb/intel/gm45: Name IOMMU registers and addresses
* 4e56d573ae sb/intel/i82801gx: Drop `SPIBARx` macros
* df5e587623 soc/qc/x1p42100:: Select Secure OS options in X1P42100 Kconfig
* 8ce11782b3 vc/intel/fsp/fsp2_0/wildcatlake: Expose the VccsaShutdown UPD
* a3f7ec15e9 mb/google/nissa/var/pujjoniru: Modify RAM ID table
* 8cbaa8d894 mb/google/fatcat/var/ruby: Change fingerprint enable pin power state
* bf848a6f80 mb/google/bluey: Configure LID_OPEN_S3 GPIO as input without pull
* 0af0b50a3c mainboard/google/fatcat: Disable CPU ratio override on low battery
* 6082e79232 sb/intel/wildcatpoint: Use some Lynx Point ME code
* 1775f25ccc sb/intel/lynxpoint: Make `intel_me_finalize()` static
* 43abc2d1c2 sb/intel/lynxpoint/me.h: Align MKHI macros with Wildcat Point
* e357e3c6bb sb/intel/lynxpoint: Add `intel_me_hsio_version()`
* fab9b2ad97 sb/intel/lynxpoint/me.h: Move function declarations to bottom
* 5d23973369 sb/intel/wildcatpoint: Add parameters to `intel_me_status()`
* 5c1bf73ab9 sb/intel/lynxpoint/me_status.c: Better handle unknown values
* a66bd85e75 sb/intel/wildcatpoint: Replace ME structs with unions
* 7ff29551a4 sb/intel/wildcatpoint/me.h: Align with Lynx Point
* 18e29adc30 sb/intel/lynxpoint/early_me.c: Use northbridge defines
* 1f376aebde sb/intel/wildcatpoint/cfr.c: Use Lynx Point's file
* dccf924a2c sb/intel/lynxpoint: Split a few things off pch.h
* 917880c002 broadwell/wildcatpoint: Decouple headers
* 7812ceb6dc haswell/lynxpoint: Add `fixed_eq` to USB3 config
* 9f90e930cf nb/intel/broadwell: Drop temporary macros
* 9a587c54d7 nb/intel/broadwell: Drop `mainboard_fill_pei_data()`
* 1c2efb8f2b mb/hp/elitebook_820_g2: Set `ec_present` from devtree
* 99affc7f58 nb/intel/broadwell: Separate NB/PCH finalise steps
* 165261ba7d nb/intel/haswell: Tidy up includes
* f2e24e5230 nb/intel/haswell: Unify more cosmetics with Broadwell
* a1af3759cd sb/intel/{lynx,wildcat}point: Drop `SPIBARx` macros
* 9a45e0949f util/amdfwtool: Add PSP directory entry type 0x8e (SFDR)
* 40eb28ec6b mb/google/ocelot/var/ocicat: Enable UFS inline encryption
* 328534098f mb/google/ocelot/var/matsu: Enable UFS inline encryption
* 108006e49a sb/intel/*: Centralize BIOS_CNTL macros
* a22f97f3ff drivers/intel/touch/chip: Fix typo in *device* in comment
* 8121a3dd72 soc/amd/common/block/psp: Add mailbox interface for ROM Armor
* 367e323fd0 mb/google/rauru: Implement Priority Mutex for parallel boot alignment
* 5b49e6d976 soc/mediatek/common: Implement Shared Resource Mutex for DMA safety
* c5f901ba4b fw_config: Always declare fw_config_probe_mainboard_override
* c39b0318de mb/google/rauru/sapphire: Override PANEL_ID in fw_config
* 104aed9a5c lib/fw_config: Add mainboard override hook
* bcfd9a87ee mb/google/bluey: Add is_low_res_panel helper for logo scaling
* fd1ad83256 mb/google/bluey: Implement platform_use_secondary_logo
* 5b811635e7 lib: Add support for secondary resolution bootsplash logos
* a0502589a3 mb/google/bluey/mica: Add vdd and vtsp gpio to depthcharge
* 026e1f60b6 drv/i2c/{rv3028c7, rx6110sa}: Use bool for config options where possible
* cf7e468d32 payloads/Kconfig: fix dead default for PAYLOAD_FIT_SUPPORT
* a7ded1bea6 soc/qualcomm/x1p42100: Use mainboard-specific paths for ADSP blobs
* 387c317058 ec/starlabs/merlin: apply settings without enabled PNP devices
* c0ca77265b util/lint: fix miniconfig check for CONFIG_MAINBOARD_DIR/HAVE references
* 4064b5de37 payloads/external/edk2: build-local FMP cert PCD for capsule updates
* 6e95ade0cb nb/intel/haswell/gma.c: Add Broadwell IDs
* aa9ff8895f nb/intel/haswell/gma.c: Add Broadwell GT PM init
* b75d086f86 nb/intel/haswell/gma.c: Replace GT register tables
* 892d68a8c8 nb/intel/haswell/gma.c: Init CDCLK before gfxinit
* f7412bf209 nb/intel/haswell/gma.c: Add support for Broadwell CDCLK
* 65fdf4754e nb/intel/haswell/gma.c: Enable power well later
* 625ba6ed9d nb/intel/haswell: Drop native gfx init leftovers
* 8443582672 drivers/intel/gma: Drop unneeded DDI stuff
* 6ca4e93632 nb/intel/haswell/gma.c: Update PM init steps
* c8320ab9f6 nb/intel/haswell/gma.c: Avoid using invalid GTT resource
* a5e124b6d0 nb/intel/haswell/gma.c: Fix PCI driver variable name
* 5e0cf0e730 util/cbfstool: don't invalidate MH cache unnecessarily
* 1754d90560 cbfstool/bzImage: Fix out-of-bound read with very short input file
* df2afe0b22 cbfstool/fv: Fix out-of-bound read with very short input file
* 9e600ac8dd cbfstool/fit: Fix out-of-bound read with very short input file
* d9085c1a7b cbfstool/elfheaders: Fix out-of-bound read with very short input file
* 27cdca23c1 mb/google/ocelot: add alternate clock request support
* 5409e52b5f soc/qualcomm/x1p42100: Increase TTB size from to 64K for Bluey
* 07c6b36ab3 mb/google/bluey: Add support for PWM-based backlight control
* a3011baad1 soc/qualcomm/common: Correct GPIO offset for master PMIC
* eaad3ecd4d mainboard/google/bluey: Use generic naming for backlight PMIC GPIO
* f457508572 mainboard/google/bluey: Add touchscreen power control via GPIO
* bcaaac5804 soc/amd/cezanne/Kconfig: add FSP binaries for V2000A
* 5cff8485cb 3rdparty/amd_blobs: advance submodule pointer
* 45cc75fe50 soc/amd/common/pci: Add host bridge _PRT method for root-bus devices
* 434c92b908 acpi/acpigen_pci: Add devfn-based _PRT entry helpers
* 64193f07f6 mb/google/dedede/var/blipper: Add stop_gpio, stop_delays to GTCH7503
* f4b98a0ba3 drivers/amd/ftpm: Disable pre ramstage
* 5bbb46481f soc/mediatek: Refactor MT6685 PMIC driver to use lazy initialization
* cbd0b52c5e lib/delay: Optimize mdelay and delay in cooperative multitasking
* c8ac5953e9 ec/lenovo/h8: Respect H8_HAS_LEDLOGO configuration
* 643efabd2a mb/google/ocelot: enable BayHub & Genesys SD Card
* 87f9bd1235 Revert "soc/qualcomm/x1p42100: Select APDP and Ramdump configurations"
* 3b44256255 soc/amd/common/block/psp: Check backup flash busy flag
* c47cbaa3ac lib/cbfs.c: deduplicate checking/querying type on _cbfs*_alloc()
* 7f3a299dc8 mb/asus/h61-series: Add Asus P8H61-M LX2
* 054318251c mb/asus/h61m-a_usb3/hda_verb.c: Drop extraneous codec verbs
* ae9ffa965d acpi/acpigen_ps2_keybd: Map CONTEXTUAL_INSERT
* 0223a54137 include/input-event-codes.h: Update to upstream
* c61c56e2da soc/qualcomm/common: Adjust GPIO base for master PMIC
* 888d9a4170 mb/google/bluey: Initialize ADSP boot reason in boot
* 053ddab917 drv/i2c/{rv3028c7,rx6110sa}: Change date format in final-hook
* 4b8bb72cbb mb/siemens/mc_ehl{6,8}: Enable sync of external RTC to CMOS RTC
* 91e5644fb0 mb/siemens/mc_rpl1: Enable external RTC RV3028-C7
* baad6487e7 cbfstool: Improve lexer error message
* e8a3bb81db treewide: Remove WARNINGS_ARE_ERRORS
* a2d386749d soc/amd/glinda: Mark sleep button as control-method only
* f7d5afbc18 soc/amd/phoenix: Mark sleep button as control-method only
* 5b0dd4933a soc/amd/mendocino: Mark sleep button as control-method only
* 81f77fd608 soc/amd/picasso: Set ACPI_FADT_SLEEP_BUTTON flag at SoC level
* 30341a6d01 soc/amd/cezanne: Mark sleep button as control-method only
* d19104a3ba soc/qc/x1p42100: Implement frequency-based QSPI GPIO drive strength
* f75dc1b17c soc/qualcomm/common: Allow SoC override for QSPI GPIO configuration
* 48acc27551 mb/google/bluey: Select 75MHz SPI frequency for board models
* 4ce87ee626 soc/qualcomm/x1p42100: Make SPI bus frequency configurable via Kconfig
* bd89a3df97 soc/qc/x1p42100: Move Display and LPASS initialization to late stage
* 3d08ec12df soc/qualcomm/x1p42100: Enable CBFS preloading for BL31 and BL32
* 8e0e61c48f mb/google/bluey: Call setup_usb_late directly in mainboard_soc_init
* 1e6e64eeca payloads/ext/.gitignore: Add coreDOOM build directory
* be555d8614 payloads/ext/.gitignore: Sort alphabetically
* 2942c415db mb/asus: Add ASUS Z87-K (Haswell)
* 7721bb3b72 soc/amd/glinda: Pass SMMSTORE region to amdfwtool
* 9439a4e6f7 util/amdfwtool: Introduce table granularity
* a3bb1d2f21 ifdtool/ifdtool.c: Update FMAP template generation
* 246e795b13 amdfwtool: Support directories greater than 4MiB
* a8a682b430 mb/google/atria: Enable additional devices
* d888458899 mb/google/atria/var/atria: Add initial storage configuration
* 18e9062b88 mb/google/ocelot: Move HDMI GPIOs to early bootblock stage
* 1b61c8f721 google/fatcat: Provide hook at the entry of BS_DEV_INIT_CHIPS
* f40fc7b290 mb/google: Refactor MediaTek boards to use include/baseboard/ namespace
* 357f2c8350 mb/google/oak: Rename WRITE_PROTECT macro to GPIO_WP
* 63f2426042 mb/google/bluey: Enable DAM sink sensor Z1 optimization for Quartz
* b19b4f15d7 mb/google/bluey: Add support for DAM sink sensor Z1 optimization
* 8d51c6537a mb/siemens/mc_rpl1: Enable I2C1 bus
* 140cb7b6df drv/i2c/rv3028c7: Add feature to sync date and time into CMOS RTC
* d7c188f6c2 mb/starlabs/*: expose PS/2 keyboard ACPI node only
* 481657b45f mb/starlabs/common: Gate Intel-specific settings
* 5eb5f3a9bb mb/google/ocelot: Enable UFS inline encryption
* 18b960be65 soc/qualcomm/x1p42100: Remove unused cpucp_prepare() declaration
* b7bff5afea mb/amd/crater/devicetree_v2000a.cb: Update GPP port config
* b74ab281bd mb/google/fatcat/var/lapis: Disable touchpanel wake-up configuration
* 3bc8a9fec1 soc/amd/common/block/spi: Add ROM Armor checks
* acd79afe9a soc/amd/glinda: Fill in cache defaults
* e18df21852 soc/amd/cezanne/Kconfig: Add 64 Bit support for V2000A
* 842b74a0e4 mb/amd/crater/ec.c: Fix calculation of reg in log message
* 81de3098f8 mb/amd/crater: Disable PCIe feature programming
* 37a1035ddc soc/mediatek/common: Log firmware splash screen status
* 586389eafd mb/google/bluey: Skip SoC debug features in recovery mode
* 8aa6763cea soc/qualcomm: Allow skipping SoC debug features in recovery
* cb51506c64 mb/starlabs/adl: Correct selection of EC_STARLABS_FAN
* 8103a5ff9c mainboard/opencellular/elgon/Kconfig: fix dead default for FMDFILE
* ec0d1946e7 soc/qualcomm: Remove HAVE_CBFS_FILE_OPTION_BACKEND
* f8a7a5c02e mainboard/google/bluey: Move display startup to mainboard_soc_init
* 5fc9a1065b soc/qualcomm/x1p42100: Support board-specific SoC initialization
* a5fb73a737 soc/intel/pantherlake: Limit active displays for portrait panels
* d1c1627ede mb/google/bluey: Update GPIO configuraton for AMP enable pin
* 83442b749f mb/google/bluey: Refactor peripheral init and adjust display timing
* fb184d4f3d mb/google/bluey: Consolidate peripheral init and fix PCIe timing
* 5a24200a97 util/cbfstool: avoid creating an image with only COREBOOT_TS
* bf8a8a7aaf mb/google/fatcat: Enable CNVi WWAN coexistence for CELLULAR_PCIE
* d9956b0bcf soc/intel/pantherlake: Add CNVi WWAN coexistence support
* e71531558e acpi/acpigen_ps2_keybd: Map navigation shortcut keys without numpad
* a2bf34ee1c soc/mediatek/mt8196: Relocate FRAMEBUFFER to 0x90200000
* 19e69dde5f vc/intel/fsp/fsp2_0/pantherlake: Update the PTL FSP full headers
* 69f0093d54 mb/google/bluey: Optimize NVMe power sequencing in romstage
* 2a6b546ca2 soc/qualcomm/x1p42100: Add support to power off PCIe Endpoint
* 904aea246f soc/qc/x1p42100: Implement soc_prepare_bl31_handoff to throttle QSPI
* fb81f6f6ce arch/arm64: Add soc_prepare_bl31_handoff() hook
* 66c68e0168 soc/qualcomm/common: Add qspi_set_bus_clock() helper
* 86e45bf52d mb/apple/macbook21: Improve variant name and reintroduce overridetree.cb
* 198aabff32 soc/intel/xeon_sp: Add more defines for register SMM_FEATURE_CONTROL
* 4c3e63e7fd mb/asus/p8z77-v_lx2: Change super I/O chip to nct5535d
* d93eb115b0 util/liveiso: Update nixos to 25.11
* 54b518da64 mb/asus/h61-series: Add P8H61-I R2.0 variant (it8771e)
* 74105264e0 util/kconfig/confdata.c: fix -Werror=discarded-qualifiers
* ece067d8be util/amdtool/cpu.c: Report SME-HMK state
* 14824c7307 util/amdtool/cpu.c: Fix reporting of SEV features
* b7dd49d68d security/tpm/tspi/crtm.c: remove superfluous logging
* 371ef274f9 lib/cbfs.c: don't skip CBFS verification in SMM
* 9e04f49a7a x86: define toolchain for SMM
* 98b0fc0e56 mb/google/atria/var/atria: Add TPM configuration
* 0eadf8856e mb/google/atria/var/atria: Add initial I2C configuration
* 81cdb782f6 mb/google/atria: Add GPE configuration
* 7e0e36d412 mb/google/atria: Select configuration for CHROMEOS and VBOOT
* 1493066f74 mb/google/atria: Add EC support
* df8d6f9a57 mb/google/atria: Add memory initialization support
* 7402845e29 mb/google/atria: Add console UART configuration
* 3b6f1d3817 mb/google/atria/var/atria: Add initial GPIO configuration
* 5d4f18e412 mb/google/atria/var/atria: Add GPIO stub configuration
* 9bf6b9096e mb/google/atria: Add atria variant support
* f6caf8bf42 mb/google/atria: Add initial mainboard
* 6a5f9c8a23 util/intelmetool: Use separate src and build directories
* 7d7499449d soc/amd/cezanne: Drop selection of SOC_AMD_COMMON_BLOCK_SPI_DWORD_ACCESS
* ff0467b96e mb/google/brya: Set CFR storage default to CBI value on taeko/taniks
* 815dc9d445 mb/system76/mtl: Enable EnableTcssCovTypeA configs
* 49f9e95c8d util/lint/lint-stable-005-board-status: Add "All-in-One" category
* f4df60e306 intel/block/pcie/rtd3: Implement _PR3
* d3b7103c9d .gitignore: ignore extended-junit.xml files
* 2d8f4958c5 payloads/ext/.gitignore: match tint tarball
* 5ea3c7f7fa payloads/ext/.gitignore: match MemTest86+ new src dir
* 53c2fc39ac soc/intel/alderlake: Remove ADL_P_ID_9 from PCH SA device list
* 21f79fb69b util/intelmetool: Add Raptor Lake-S PCI ID
* b9399443c0 soc/intel/alderlake: Add Raptor Lake-S 8+12 (0xa740) support
* c9685501f5 mb/asus/maximus_vi(i)_impact: Update HDA codec name
* dfe5b08978 soc/intel/pantherlake: Add UFS inline encryption support
* 4e4a2f85bb mb/siemens/{mc_ehl6,mc_ehl7}: Set IccMax IA to 15A
* 76be626491 soc/intel/elkhartlake: Expose IccMax IA domain to devicetree
* 5267cae13a utils/crossgcc: Update NASM from 2.16.03 to 3.01
* 3ef459a968 utils/crossgcc: Update acpica from 20250807 to 20251212
* e518885dce utils/crossgcc: Update GCC from 14.2.0 to 15.2.0
* a425b57634 soc/qc/x1p42100: Update eDP lane/PHY handling and add BPC selection
* a309c042e2 mb/google/bluey: Log firmware splash screen status to BIOS and ELOG
* 52da3306cc mb/google/bluey: Refactor and clean up display initialization
* ab360c9195 mb/google/bluey: Guard Debug Access Port (DAP) configuration with Kconfig
* b11e7b4afa soc/qualcomm/x1p42100: Enable memory chip information filtering
* 722f8e630d soc/qualcomm/common: Filter undefined memory chip entries
* 4e1d6cee0c soc/qualcomm/x1p42100: Select APDP and Ramdump configurations
* 6d73c02606 soc/qualcomm/x1p42100: Use correct path for APDP binary
* 7dc8ae735a mb/google/bluey: Move apdp and ramdump regions to RW only
* 08bff09608 vc/amd/fsp/renoir/FspUpd.h: Fix comment for FSP signatures
* f2f1a5814f mb/amd/crater/Kconfig: Change SOC to V2000A
* 661a1aa5a2 mb/google/skywalker: Create R2d2 variant
* 9a59f1a5ac mb/asus: Add Maximus VII Ranger (Haswell/Broadwell)
* 87af5c2aef mb/asus: Add Maximus VI Hero (Haswell)
* ae3bec1c7c soc/amd/cezanne/Kconfig: Enable Cache on S3 resume
* ce444c4c76 soc/amd/cezanne: Add V2000A SOC
* 621d722ab8 soc/amd/cezanne/Kconfig: Extend bus numbers to 256 for renoir
* 0cbc9e9c57 soc/amd/cezanne/Kconfig: Remove ADD_FSP_BINARIES from RENOIR
* 4369c463fc soc/amd/common/block/spi: Increase SPI write speed by 27%
* 630a6e66c1 mb/asus/maximus_vii_impact: Update comment for USBDEBUG_HCD_INDEX
* f89717ecc3 soc/qualcomm/x1p42100: Remove dummy regions around framebuffer
* b6ca7755f3 utils/crossgcc: Update binutils from 2.45 to 2.45.1
* 2227096f55 arch/arm64: Add support for COOP_MULTITASKING
* e7d4cc6813 lib: Add comprehensive stack checking for cooperative threads
* 66cb3e79a4 util/find_usbdebug: Add missing 9 Series PCH rate matching hub IDs
* d1da8ec7bb util/autoport: Use official chipset names
* 40df3567c6 mb/google/bluey: Avoid using uninitialized EDID data
* 02e5c1c39c mb/google/calypso: Add dependency on I2C_TPM for DRIVER_TPM_I2C_ADDR
* b8bd5a5639 mb/google/calypso: Add Calypso board variant to Kconfig
* 201392d363 mb/google/calypso: Rename mensa mainboard directory to calypso
* b1a374e635 mb/google/mensa: Reduce RW_CDT partition size to 4K
* eaaa63791a mb/google/mensa: Change fingerprint interface from SPI to USB
* e187893fa9 mb/google/mensa: Rename Kconfig symbols from MENSA to CALYPSO
* c22ab9f535 mb/google/bluey: Select SOC_QUALCOMM_CDT and shrink RW_CDT partition
* a4ee53610f soc/qualcomm/x1p42100: Include cdt.c in romstage compilation
* 598504962e soc/qualcomm/common: Read and populate CDT data
* f3f8e7f61c memlayout: Introduce CDT_DATA region
* b6a87477d7 soc/qualcomm/common: Introduce SOC_QUALCOMM_CDT Kconfig option
* 681c5a219b mb/google/bluey: Enable DAP for Quenbi and Mica variants
* 8792766e05 mb/google/bluey: Support configurable DAP SMBs Slave IDs
* 7d863336bc mb/google/bluey: Increase charging rail stabilization delay to 5s
* 6fa8d2c415 mb/google/bluey: Select splash logo based on panel resolution
* 7a533becf2 soc/qualcomm/common: Add debug dump for mem_chip_info
* f502f316f2 mb/google/*: Add disable_heci1_at_pre_boot to CFR ME options
* e3111a3dc2 soc/intel/common/cse: Add CFR override for disabling HECI1 at end of boot
* 15529219c9 soc/amd/common/block/cpu: Enable cache on S3 resume
* 53561b7903 soc/amd/common/block/spi: Enable SPI_FLASH_SFDP for all SoC
* 4e522f49b6 drivers/ck505: Add pre and post hooks
* 83977273f1 mb/asus: Add ASUS Maximus VI Impact (Haswell)
* 1e49b5c385 mb/starlabs/starfighter: fix touchpad settings not being applied
* 1f05ba35b9 mb/starlabs/starfighter: Add missing WiFi and Bluetooth controls
* 049a580bbf mb/lenovo/sklkbl_thinkpad: Enable TBT support for T580
* ec6856785d sb/ricoh/rl5c476: Fix building for 64-bit targets
* 4a5422fb99 lib/thread: Use standard doubly linked list API
* 41d55fae84 commonlib/list: Add list_pop()
* 25d3809ea3 payloads/edk2: Update default MrChromebox branch from 2511 to 2603
* 577f30851d util/chromeos/crosfirmware: Update recovery inventory parsing
* 7dfe91fe0b soc/intel/cometlake: Always select PMC_IPC_ACPI_INTERFACE
* 653e2fee68 mb/amd/crater: add and use APCB recovery file
* 7222e5911b acpi/dsdt_top.asl: Add hook to enable routing in APIC mode
* 9f65c47ea7 lib/timestamp: Fix get_us_since_boot()
* 6bd55cf269 soc/amd/cezanne: Select SOC_AMD_COMMON_BLOCK_HDA
* 3cd83d2ce0 mb/google/bluey: Reset eDP and disable backlight on display stop
* e5a73dc9e6 mb/google/bluey: Use common APIs to configure PMIC GPIOs
* 4c784a6f3a soc/qualcomm/x1p42100: Define PMIC slave IDs
* 355658054a soc/qualcomm/x1p42100: Include new PMIC GPIO APIs in ramstage
* a3bf18f3b2 soc/qualcomm/common: Add APIs to configure PMIC GPIOs
* 1b2c0f8aca mb/google/bluey: Switch fingerprint sensor to USB interface
* 3976f8ed0d mb/supermicro/x11-lga1151-series: Enable SATA hotplug
* bc2092acd4 mb/google/jecht: Add CFR options for CPU undervolt
* 8d2e8295c5 mb/google/jecht: Add CFR PL1/PL2 package power overrides
* d1633f5cc1 mb/google/beltino: Add CFR options for CPU undervolt
* ef8f4d7ac5 mb/google/beltino: Add CFR PL1/PL2 package power overrides
* 32f16591aa mb/google/puff: Add CFR options for CPU undervolt
* a612fdce4f mb/google/puff: Add CFR PL1/PL2 package power overrides
* faf5f0ea9e mb/google/fizz: Add CFR options for CPU undervolt
* e9239d2308 soc/intel/skylake: Add support for OC mailbox programming
* 1654e0a1de soc/intel/cannonlake: Add support for OC mailbox programming
* aaa396d571 cpu/intel/haswell: Add support for OC mailbox programming
* fa68b66686 drivers/intel/oc_mailbox: Add OC_MAILBOX undervolt driver
* b137be4d8f soc/amd/cezanne: Fix USB3 port aliases and USB port order
* b9e6bc61ce soc/amd/cezanne/acpi: Guard RTC workaround with CONFIG(CHROMEOS)
* 912817d316 Revert "mb/google/bluey: Temporarily skip display init in normal mode"
* ce74ab0d21 soc/qc/x1p42100: Remove framebuffer from generic MMIO reporting
* 889c42c177 device/pciexp_device: Fix SR-IOV detection
* 5a3e8f3076 soc/amd/glinda: Use SPI_FLASH_SFDP
* 67845716da drivers/spi/spi_flash_sfdp: Parse JEDEC SFDP
* a95ee50a7b mb/starlabs/adl/{i5,hz}: increase speaker output power to 2.5W
* 601bbd87bd mb/google/zork/vilboz: Set proximity INT as GPI for non-ChromeOS
* cbbf961526 arch/x86/acpi_bert_storage: Clear allocated structure
* 84c1b81540 Revert "soc/intel/common/power_limit: Raise PsysPL1 when package PL1 is above TDP"
* a5941ba5f8 soc/amd/common/psp: add support for early PSP v2 access via SMN
* b514b1e671 soc/amd/common/psp/Makefile: make ftpm.c build more conditional
* 40e56f2358 soc/qc/x1p42100: Define and reserve framebuffer region
* 499ab15def mb/google/bluey: Implement display initialization hooks
* 382f5e0cd4 mb/google/bluey: Add support for firmware splash screen
* c120e1b9fc mb/google/bluey: Temporarily skip display init in normal mode
* c6e0f28814 soc/qualcomm/x1p42100: Add eDP display support
* 61706268a6 soc/intel/common: Replace numbers with mask constants in power limits
* 38addfb24f mb/google/bluey: Power on NVMe rail earlier in boot
* 2f752c6341 util/cbfstool/flashmap/fmap.c: Fix buffer overflow
* 96a91bbaf9 mb/siemens/mc_ehl8: Reduce I2C clock rate to 100kHz
* 012bf817a9 soc/intel/common/block/power_limit: Remove unnecessary rdmsr
* 654f328474 soc/intel/common/power_limit: Don't disable package PL1 in MCHBAR
* f7bb12e423 mb/google/bluey: Set GPIO206 as output low on Bluey
* f0211870e0 soc/amd/{turin,genoa}_poc: Select SOC_AMD_COMMON_BLOCK_HAS_ESPI1
* f6cd320061 acpi/acpigen_pci_root_resource_producer.c: Report TPM MMIO in domain 0
* bb0e107ebd soc/intel/common: Add hardware limit validation for power overrides
* c803ca2ed6 amd/common/block/pci/acpi_prt.c: Add SoC hook to get GSI base
* 8e57010d88 mb/google/bluey: Use slow charging if battery is less than 2%
* 432703dd7a mb/siemens/mc_ehl7: Deactivate IGD
* eda62af9dd mb/google/bluey: Implement slow-to-fast charging transition logic
* 1dc346e61e cpu/intel/haswell: Add option-backed PL1/PL2 overrides and package limit lock
* 0d95bb5158 mb/google/fizz: Add CFR PL1/PL2 package power overrides
* 6c10b07146 mb/google/fizz: Refactor mainboard_set_power_limits()
* 976149a2f7 soc/intel/common/power_limit: Raise PsysPL1 when package PL1 is above TDP
* bdf757aa86 soc/intel/common/power_limit: Add option-driven PL1/PL2 overrides and locking
* f45d6e696a mb/google/bluey: Configure sink sensor for DAM port
* 63fc231480 AUTHORS: Update with new authors from the 26.03 release
* f67b5ed6fd util/release: add get_new_authors helper
* 7bcb90047e mb/google/nissa/var/pujjoniru: Add 2 Micron modules to RAM id table
* c683673095 mb/google/nissa/var/yavilla: Add RAM ID H58G56BK8BX068
* 66ed61a73c b/google/brox/var/lotso: Add RAM ID for MT62F1G32D2DS-031RF WT:C
* 6d3e13a33a mb/google/bluey: Conditionally enable FP rails in normal boot
* 137b9c59ea mb/google/var/fatcat/lapis: adjust 'cirrus,detect-us' property to improve the noise situation
* d381d33a39 soc/soc/amd/glinda: Hook up STX VBIOS
* 1b284012b8 mb/starlabs/starfighter: add configurable touchpad tuning
* 97d616b927 soc/amd/common/block/spi: Add helper functions
* 102b9b42ae mb/google/skyrim/var/frostflow: Add non-ChromeOS TBMC support
* d012a678e2 mb/google/guybrush/var/dewatt: Add non-ChromeOS TBMC support
* 7eb70b259b mb/google/zork: Set correct SYSTEM_TYPE for all variants
* dbd05fc2da mb/google/kahlee: Set correct SYSTEM_TYPE for all variants
* 45378e6fc2 mb/google/guybrush/dewatt: Mark board as convertible
* 227dbbad4a mb/google/skyrim: Use GpioInt wake for touchpad and fingerprint reader
* fe445f4b9d mb/google/skyrim: Use level-triggered IRQ for touchpad and touchscreen
* 49803f2130 mb/google/guybrush: Use GpioInt wake for touchpad and fingerprint reader
* 62abc7aca0 mb/google/guybrush: Switch touchpad IRQ to level triggering
* 65858ad5c9 mb/google/zork/var/vilboz: Guard GPIO for SAR sensor
* fd5b6323ea mb/google/zork: Use GpioInt wake for touchpad and fingerprint reader
* e2c419bc44 mb/google/zork: Use level-triggered IRQ for touchscreens
* 30b8524ff5 soc/qualcomm/calypso: Enable basic PCIe support
* ba3b83e51e mb/google/mensa: Implement SKU ID retrieval
* 888cc7f92a mb/google/mensa: Initialize FP GPIOs in bootblock
* a6921f7fb9 soc/qualcomm/calypso: Add placeholder for early clock initialization
* 421c21c6cf soc/qualcomm/calypso: Initialize QSPI and QUPv3 in bootblock
* 0fc956cd2d mb/google/mensa: Set correct Kconfig defaults for peripherals
* 8dbf88a300 soc/qualcomm/calypso: Add QUP Serial Engine (SE) entries
* 79b6dde1a5 soc/qualcomm/calypso: Set correct Kconfig defaults for peripherals
* dde131c555 mb/google/mensa: Add initial support for Mensa
* 38e8eadfa7 soc/qualcomm/calypso: Add initial SoC skeleton for Calypso
* c7a7fbbf2c soc/qualcomm: Add support for QUPV3 wrapper 3
* cb05d160d4 soc/qualcomm/x1p42100: Rename SOC_QUALCOMM_BASE to include SoC name
* b8ed516097 mb/google/bluey: Defer display initialization based on boot mode
* 9bfab15070 docs/mb/hp: fix link to Sure Start whitepaper, add another
* e839059435 mainboard/starlabs/common: enable OPAL S3 unlock
* 9fc27f4b15 soc/intel/common/pcie/rtd3: Add RTD3 support for OPAL S3 unlock
* 468f8131ec security/tcg/opal_s3: hook into default SMI/resume paths
* 36a4d92239 util/amdfwtool: Fix APOB_NV quirk
* e57478e238 treewide: Apply nonstring attribute to unterminated strings
* 492b7c7c09 soc/amd/common/block/psp: Add commands for A/B recovery
* cf541343a9 ec/lenovo/h8: Implement LOGO LED
* 7609822730 mb/starlabs/*: disable TCO Intruder SMI
* 26d005fb30 mb/starlabs/starfighter: use safe shared panel PWM frequency
* 25eee46bbc mb/starlabs/starbook/{adl,rpl,tgl}: raise panel PWM frequency
* bfaadde071 mb/starlabs/starbook/{adl_n,mtl}: raise panel PWM frequency
* d4bfac6564 mb/starlabs/adl/i5: use safe shared panel PWM frequency
* 1ca1c60019 mb/starlabs/adl/hz: raise panel PWM frequency to 10kHz
* e970b9b0df mb/starlabs/adl/hz: restore panel minimum brightness
* 9f6ae2b5a2 mb/starlabs/starbook/{adl,rpl,tgl}: fix panel timings
* f13a9cb910 mb/starlabs/adl/i5: fix panel timing values against datasheet
* d0e2b5df61 mb/starlabs/starbook/{adl_n,mtl}: fix panel timings
* f1bc59e66e mb/starlabs/starfighter: fix panel timing values against datasheet
* 040ff1ff39 mb/starlabs/adl/hz: fix panel timing values against datasheet
* ed261d5447 mainboard/starlabs/common: include acpi_gnvs.h in gnvs.c
* f1505f5e46 mb/google/zork: Add MKBP support
* a5b5591d31 mb/google/reef: Add MKBP support
* 134b3e050a mb/google/octopus: Add MKBP support
* caf980b3fa mb/google/hatch: Add MKBP support
* 1a75cd1da2 mb/google/glados: Add MKBP support
* f1e95c5536 mb/qemu/riscv: Intialize PCI root bus
* c5e905fa21 util/mec152x/Makefile: Include commonlib/bsd/compiler.h
* 576515394c util/amdfwtool: Use uint8_t for bitfields
* 800d3dbef4 soc/qualcomm/x1p42100: Support separate RO/RW CPUCP binaries
* c0e82f6963 3rdparty/amd_blobs: advance submodule pointer
* 82de37d171 libpayload: Makefile.mk: Fix unrecognized option '--no-weak'
* e021937f35 soc/amd/glinda: Add RAS Kconfig options
* e232934f6f mb/google/nissa: Create dirkson variant
* 79c98cca80 mb/google/volteer: Add non-ChromeOS TBMC support for 360/flip variants
* f867d8f76b mb/google/dedede: Add non-ChromeOS TBMC support for 360/flip variants
* 25ad0950a8 mb/google/brya: Add non-ChromeOS TBMC support for 360/flip variants
* a8615bed6b mb/google/cyan: Add support for EC mode change event
* 8f5477d92d mb/google/volteer: Set correct SYSTEM_TYPE for all variants
* 7b87cda615 mb/google/reef: Set correct SYSTEM_TYPE for all variants
* 7995a1d3ea mb/google/octopus: Set correct SYSTEM_TYPE for all variants
* 14ef332242 mb/google/hatch: Set correct SYSTEM_TYPE for all variants
* 3f10068936 mb/google/glados/var/caroline: Mark board as convertible
* 025c0edeb2 mb/google/dedede: Set correct SYSTEM_TYPE for all variants
* c049dcc271 mb/google/brya: Set correct SYSTEM_TYPE for all variants
* ecab793650 ec/chromeec: Add Kconfig and asl for vendor tablet ACPI
* 1769b10be0 mb/google/bluey: Lower CPU frequency to 710.4MHz for low-power boot
* 710df33471 mb/google/bluey: Signal ADSP to skip Type-C port resets during boot
* 521e7949c1 mb/google/bluey: Add support to reduce CPU clock to minimum frequency during OFF‑mode charging
* 9a86b9f729 mb/google/bluey: Integrate ADSP load and LPASS bring-up into charging flow
* 8beca96470 soc/qualcomm/x1p42100: Add LPASS bring-up sequence for ADSP cold boot
* a58f752d0f soc/qualcomm/common: add CBCR disable and config helpers
* 2e3e690023 soc/qualcomm/x1p42100: Support to load ADSP Lite firmware
* 1c6f4618b6 mb/google/bluey: Allow charger behind DAM
* 94dd3f3bba soc/qualcomm/x1p42100: Increase boot CPU frequency to 3.0GHz
* da36276955 smbios: Add smbios_cache_speed() implementation
* 6f7f27e6c1 soc/qualcomm: Relocate translation tables to DRAM
* 4320fe713a mb/google/brask/var/constitution: Generate RAM ID for Samsung K4UBE3D4AA-MGCR
* d43421da65 mb/google/nissa/var/quandiso: Generate RAM ID for SL5D32G32C2A-HC0
* 28fbd247f6 spd/lp5x: Generate initial SPD for SL5D32G32C2A-HC0
* d72d7d1ba0 soc/amd/common/block/spi: Check if ROM Armor is enforced
* cd8072191d soc/amd/common/block/psp: Get ROM Armor state from HSTI
* b42d148171 soc/qualcomm/x1p42100: Define CPUCP region and map in MMU
* 92fa2bbd09 soc/qualcomm/x1p42100: Disable compression for CPUCP payload
* 6c8a2a6ea1 soc/amd/glinda: Use VBIOS from amd_blobs
* ff7bc7d2d1 drivers/amd/ftpm: Fix compilation
* ab63331423 mainboard/starlabs/lite: Remove unused header
* a19b5b4b17 mainboard/starlabs/starfighter: Remove unused header
* c4e44caef8 mainboard/starlabs/starbook: Remove unused headers
* b0ff1cdd28 mainboard/starlabs/adl: Remove unused headers
* d319b33114 mainboard/starlabs/common: Remove unused headers
* b137044a39 ec/starlabs/merlin: Remove unused halt.h
* 7bc3561803 ec/starlabs/merlin: Include stdint
* e657f5da15 mainboard/starlabs: drop redundant vbt.bin overrides
* b7faa4c51a amdfwtool: Allow to set bios entry 0x6d (AMD_BIOS_NV_ST)
* 8e04206f28 amdfwtool: mark AMD_BIOS_APOB_NV BIOS directory entry as writable
* 8549c6894a amdfwtool: Make NVRAM regions writeable
* 1928db74a1 Documentation: Finalize 26.03 release notes
* aa27204240 mb/google/fatcat/variants/moonstone: Implement BOE touchscreen power timing
* dc41e46b7f google/fatcat: Move mainboard_pre_dev_init_chips hook to BS_ON_EXIT
* 3f46d6fd93 mb/google/bluey: Use safe SPMI reads for battery current telemetry
* 2f93e4331e soc/qualcomm/common: Add spmi_read8_safe helper with retry logic
* 444691603d mb/google/bluey: Support RTC wake-up boot mode
* 941597e52f {commonlib, libpayload}: Add RTC_WAKE to boot_mode_t
* 34f67580b5 ec/google/chromeec: Add API to check for RTC host event
* b00bfdd1e0 mb/google/bluey: Refactor SE firmware loading into early/late stages
* 1f2ea3c13e mb/google/bluey: Initiate PCIe link training in romstage
* f56a936c54 soc/qualcomm/x1p42100: Allow asynchronous PCIe initialization
* f1baed6f79 soc/qualcomm/common: Implement asynchronous PCIe initialization
* 8a90e46346 soc/qualcomm/x1p42100: Increase CBFS_MCACHE size to 22K
* 4b227a4aa6 arch/arm64: Add debug API to dump MMU page table configuration
* 99d409d3ba arch/arm64: Add support for TTB relocation to DRAM
* 493770d730 mb/starlabs/starfighter/mtl: add speaker idle CFR option
* f3c656b76a soc/intel/common/block/smm: drain sync smi around smmstore
* a215e07533 mb/google/nissa/var/craask: Add H58G56CK8BX146 to RAM ID table
* a7773d3ab3 mb/google/fatcat: Modifying parameters for AC only
* 05246a5934 mb/asus: Add Maximus VII Impact (Haswell/Broadwell)
* 0f30eed3e8 Doc/nb/intel/haswell: Fix typo
* 5e146277ae Doc/nb/intel/haswell: Drop outdated section about SPD addresses
* 86b3901ba5 mb/google/bluey: Monitor thermal sensors during charging
* 657bd42548 soc/qualcomm/x1p42100: Define TSENS controllers and thermal zones
* 53529b1d93 soc/qualcomm/common: Add Qualcomm TSENS support
* 9e7c787f6d soc/qualcomm/x1p42100: Add 806 MHz CPU clock definition
* e5c99fe9e0 Documentation: Add coreboot release 26.06 template
* 8791c5292d Documentation/releases: Update release notes for 26.03 release
* 1063e564e7 Documentation/vboot: Update list of vboot-enabled devices
* 8ff1a9a08c vc/tcg/opal: add OPAL packet builder for S3 unlock
* 30cd6efc29 util/amdfwtool: rename Faegan SoC to Krackan2e
* 1555a1a235 util/amdfwtool: rename Glinda SoC to Strix
* dc315c8f51 soc/amd/common/block/psp: Drop send_psp_command_smm
* 49f53bbb38 include/acpi/acpi_pld.h: Fix order of colour components
* e0bc32ce61 mb/google/brya: Add CFR-based storage selection for taeko/taniks
* db3e23d505 lib/fw_config: Add mainboard hook for selective probe override
* 225fd5e448 3rdparty/intel-microcode: Update to upstream main
* ac5722a66f 3rdparty/fsp: Update to upstream master
* 7bfad23a15 mb/google/bluey: Enable GBB_FLAG_ENABLE_ADB for development
* a649c82f7a security/vboot: Add option for enabling ADB via GBB flag
* 4943cfe4d0 soc/intel/pantherlake: Remove unsupported WCL CPU ID mappings
* 9a40f080ac security/tcg/opal_s3: add OPAL NVMe Security Send/Receive helpers
* 537f2acc67 vc/intel: add TCG storage core subset for OPAL S3
* fbd755341a security/tcg: add OPAL S3 unlock Kconfig
* 42a114e23f mb/google/nissa/var/teliks: Generate RAM ID for BWMYAX32P8A-32G
* a6b7fa5474 mb/google/brask/var/moxoe: Disable SAGV
* d74cf143fe mb/google/brask/var/kulnex: Disable SAGV
* 09d689561a soc/mediatek/common: dsi: Fix CPHY hfp_byte error check
* 674000732d drivers/intel/dtbt: Skip mailbox commands on downstream bridges
* b03b42285e soc/intel/{mtl,ptl}/fsp_params: Program PcieRpSlotImplemented
* e17cc395af soc/intel/alderlake/fsp_params: Drop !! in builtin root port check
* 11e9550e0c soc/intel/common/smm: Use cpu/x86 save_state ops
* ce1db1f54a cpu/x86/smm: reserve SMRAM for OPAL S3 state
* 9422dacdb8 mb/google/brask/var/moxoe: Remove weak symbols for memory config
* 53222f1ccb mb/google/brask/var/kulnex: Remove weak symbols for memory config
* 5bb8b30c03 nb/intel/haswell: Enable SA clock gating later
* a0be26ef5f nb/intel/haswell: Fix IOMMU early init
* 60994cf395 nb/intel/haswell/early_peg.c: Simplify implementation
* fed6f9494d nb/intel/haswell: Move early PEG stuff to separate file
* 76290e8cdc nb/intel/haswell: Move PEG device macros to header
* e7cfcec7a7 nb/intel/haswell: Use `report_cpu_info()` from CPU code
* f730ec6992 cpu/intel/haswell/report_cpu_info.c: Update CPUID info
* f249991e9d cpu/intel/haswell: Fix CPUID macros
* 96ab0c9942 nb/intel/broadwell: Move `report_cpu_info()` to CPU code
* 7c35218c88 nb/intel/broadwell/report_platform.c: Constify string array
* 4ea3450e45 nb/intel/broadwell: Use registers from Haswell
* 342d77a0dd nb/intel/broadwell: Rename `MCH_PAIR` to `INTRDIRCTL`
* 31f4c30a08 nb/intel/broadwell: Clean up cosmetics
* 53bc76856c nb/intel/broadwell/gma.c: Retype some variables
* 1172a4e6ee mb/google/brya/var/yavilla: Set LGD touchscreen HID address to 0x01
* 5c20d9ce76 3rdparty/amd_blobs: advance submodule pointer
* 817394f12c Makefile.mk: generate EDK2 update capsule
* bf037f3961 mb/emu/qemu-sbsa: Add GIC ITS and IORT for PCI MSI support
* e69bfef7c0 mb/emu/qemu-sbsa: Set io_port_mmio_base for PCI I/O port support
* dc7bf7e3f9 mb/google/bluey: Enable source mode on debug access port
* e9e4f7609c mb/google/bluey: Move QUP-GSI init/load to normal boot path
* 19e1b5c44b soc/mediatek/mt8196: Change dsi-phy1 & dsi-phy2 control method
* e6fb0faf7b soc/qualcomm/x1p42100: Skip redundant MMU toggling for QCLib
* deb510afeb cpu/x86/smm: add OPAL S3 CBMEM scratch
* 513899c3c8 vc/amd/opensil/phoenix_poc: Adjust headers from Genoa to Phoenix
* a616a589a2 vc/amd/opensil: Add Phoenix OpenSIL POC directory as a copy of Genoa
* 71effade58 mb/google/eve: Work around CLKREQ# timing erratum
* faf12bcacd soc/intel/skl: Allow disabling CLKREQ# independently of SrcClk
* 07e4cc0cc3 mb/google/fatcat: Set CPU ratio override in devicetree
* 94168f10bc Reland "mb/google/bluey: Configure GPIOs for USB camera"
* 975613717a mainboard/starlabs/starfighter: Convert SPD sources to JSON
* dda351b895 mainboard/starlabs/adl: Convert SPD sources to JSON
* 5202b1371d mainboard/starlabs/adl: Convert i5 SPD sources to JSON
* 2c9f1600e0 src/lib: Generate spd.hex from JSON at build time
* 9a8d22dcaa util/spd_tools: Improve spd_gen CLI for Make
* 3249ad1d7f mb/google/rex: Add SOF chip driver to screebo, kanix, karis
* 88eea9da6d vendorcode/amd/opensil/turin_poc: Pass microcode pointer to OpenSIL
* 39017d2257 amd/microcode: Add API to obtain address on microcode update block
* 6ce607eee4 mb/emu/qemu-sbsa: Add missing PCIe ACPI methods
* 5458b34de6 soc/intel/meteorlake: Use Arrow Lake FSP
* bd2c7443f3 soc/intel/ptl: Add ISCLK for controlling PCIe clock source
* 5e8cf41845 mb/google/bluey/mica: Add MAINBOARD_NO_USB_A_PORT configuration
* 2107e48c09 mb/google/nissa/var/telith: Generate RAM ID for BWMYAX32P8A-32G
* 1d17c9522f mb/google/trulo/var/kaladin: Add LGD touchscreen
* 4d9cb5336f mainboard/starlabs: drop display_native_res VBT toggle
* 9bb822dbf8 Update vboot submodule from 2024 to upstream main 2026
* 0be563503a mb/google/rauru: Support new bias IC TPS65130RGER
* 5d6061d0ba util/amdfwtool: add support for Strix Halo SoC
* 391d5f3cb4 mb/google/ocelot/var/ojal: Enable dtt and ish based on FW config
* df470521a7 mb/asus/p8x7x-series: Enable single PS/2 port role control
* a402a87405 mb/asus/p8z77-v_le_plus/cmos.layout: Extend checksummed area
* bbbc655b15 Revert "mb/google/bluey: Configure GPIOs for USB camera"
* fc312590d1 drivers/efi: Derive ESRT version from LOCALVERSION
* baae037f25 mb/google/bluey/mica: Add PS8820 re-timer configuration
* 40abf7946c mb/starlabs/adl/hz: Add missing cnvi_bt_core parameter
* 35dbfac13a mb/google/rex/var/karis: Add H58G56CK8BX146 to RAM ID table
* 4734da172b memlayout: Introduce PRERAM and POSTRAM TTB regions
* 0be9f20be4 soc/intel/pantherlake: Add icc_max settings for WCL SKU
* bf5aa04d8b soc/qc/common: Configure framebuffer as uncacheable
* ee3aef1c72 mb/google/bluey: Add AC unplug detection and charging status indication
* 0449fb45a6 mb/google/bluey: Refactor and secure low-power charging boot path
* b7ca29ba92 mb/google/bluey: Power off if charger applet fails to enable charging
* ddac3082ea mb/google/fatcat: Enable ChromeOS EC LED control for variants
* a1173d9bc1 mb/google/bluey: Enable ChromeEC LED control for Quartz and Mica
* eb5bdf06b9 soc/intel/pantherlake: Add power state thresholds for WCL
* bf6b14e4f7 mb/google/ocelot: Add VR_DOMAIN_IA for fast_vmode_i_trip
* 026bac6de7 arch/x86/ioapic: Add Kconfig option to keep pre-allocated IOAPIC ID
* d251282f2d Kconfig: move IOAPIC option to x86 Kconfig
* 1bdfc97c54 lib/cbfs: Enable LZ4 decompression in pre-RAM stages
* 1965a8740d mb/google/brox/var/caboc: Set LGD touchscreen HID address to 0x01
* 50ce94d715 Revert "soc/intel/pantherlake: Fix DDR5 channel mapping"
* ea58a467f1 Revert "soc/intel/pantherlake: Fill in SPD data on both channels of DDR5 memory"
* 92a430baee mb/google/fatcat/var/lapis: Modify parameters to reduce acoustic noise
* 4caf5ab903 soc/qualcomm/sc7280: Fix extended EDID read over I2C-over-AUX
* fd5f062446 mb/asus/p8x7x-series/*tree.cb: Consolidate gen1_dec into baseboard
* 6200d53e31 mb/google/bluey: Use LPASS GPIO configure API for Soundwire GPIOs
* 1d8c536d79 soc/qualcomm/x1p42100: Add API to configure LPASS GPIO
* 1e1b63c23b commonlib/device_tree: Utilize list_move() in dt_copy_subtree()
* 89048780c0 commonlib/list: Add list_move()
* 00e3b9989c lib: Rename devtree_update to mb_devtree_update
* b1194a838b mb/starlabs: Use common devtree_update mechanism
* 346a4ccaef mb/google/fatcat/moonstone: Add Samsung LPDDR5 memory parts
* fd6c0aa55b util/scripts: Add spd-decode for LPDDR5 SPD hex
* 2ac2df0eda sb/intel/wildcatpoint/pcie.c: Reorder some steps
* 59ac2cb2c0 sb/intel/wildcatpoint/pcie.c: Drop redundant write
* 44901340bf sb/intel/wildcatpoint/pcie.c: Ensure OBFF is disabled
* d74570b01e sb/intel/wildcatpoint/acpi: Use Lynx Point files
* 9541171de4 sb/intel/wildcatpoint/acpi: Move platform.asl to mainboards
* 762b564f3b mb/google/bluey: Add timeout for charging rail stabilization
* 61657cff8f spd/lp5: Add SPD for SK hynix H58G56DK9BX068
* 8aa0ea4062 soc/intel/pantherlake: Keep default values for TdcTimeWindow
* c97e740981 mb/google/ocelot: Fix fast_vmode_i_trip indexing in devicetree
* aaddb83491 soc/intel/pantherlake: Configure TDC IRMS mode for WCL IA domain
* f12d2997fc lib/cbfs: Don't include unused LZ4 code to shrink postcar stage
* c772a88b1d configs: Remove starbook/adl option table config
* dfc2c45ff4 util/inteltool: Add support for Wellsburg
* 23db1b3686 mb/google/bluey/mica: Add mainboard part number
* b5a703e5a0 mb/google/skywalker: Add mainboard_prepare_cr50_reset()
* 8a4937bf8f soc/mediatek: Add mtk_mipi_panel_poweroff()
* a300b135c3 soc/mediatek/mt8196: Call mtk_mmu_disable_l2c_sram via boot state
* 510e43d8bd soc/mediatek/mt8196: Move WATCHDOG_TOMBSTONE from SRAM to SRAM_L2C
* 2f88fec014 mb/google/bluey/mica: Add TPM I2C and EC SPI configuration
* 1b5df51c51 soc/intel: Fix Kconfig select order
* b52236fe9e soc/intel/pantherlake: Switch to common finalize implementation
* 5c56b9ff72 soc/intel/meteorlake: Switch to common finalize implementation
* ae932349bf soc/intel/common/block: Add common finalize implementation
* c9ba628d51 soc/intel/elkhartlake: Switch to common global reset implementation
* 73e89322ce soc/intel/jasperlake: Switch to common global reset implementation
* 0277c75bdd soc/intel/cannonlake: Switch to common global reset implementation
* 2ff987f906 soc/intel/tigerlake: Switch to common global reset implementation
* 0d4b934726 soc/intel/pantherlake: Switch to common global reset implementation
* 5c85dcda7f soc/intel/meteorlake: Switch to common global reset implementation
* b2a533c918 soc/intel/alderlake: Switch to common global reset implementation
* e4ea840114 soc/intel/common: Add common global reset implementation
* 7d8acb88c5 soc/intel/pantherlake: Switch to common PMC lockdown driver
* 4da2622964 soc/intel/meteorlake: Switch to common PMC lockdown driver
* 19fe81f08f soc/intel/alderlake: Switch to common PMC lockdown driver
* e160f3c506 soc/intel/common/feature: Add common PMC lockdown driver
* fec793e01d sb/intel/wildcatpoint/acpi: Add CID for GPIO device
* bacb55e348 nb/intel/broadwell/acpi.c: Use Haswell's file
* 3e89a234ef nb/intel/broadwell/acpi.c: Align with Haswell
* 958bc5cdff nb/intel/broadwell: Move `size_of_dnvs()` to southbridge
* 35694d2ea4 nb/intel/broadwell: Move device NVS to southbridge
* 3d4f2efcf7 nb/intel/broadwell/bootblock.c: Use Haswell's file
* 7240bbabe9 nb/intel/broadwell/acpi.c: Drop unneeded includes
* 4eb0fd7bea nb/intel/broadwell: Move PCH headers to wildcatpoint
* 0bc5746188 soc/intel/broadwell: Move to nb/intel/broadwell
* d740cee2d9 soc/intel/broadwell/pch: Move to sb/intel/wildcatpoint
* 0d2a0512fd sb/intel/lynxpoint: Configure IOSF Port and Grant Count
* 8b69dcccb2 sb/intel/lynxpoint/pcie.c: Add additional disable steps
* 381ce51ec4 sb/intel/lynxpoint/acpi: Add HIDs for Wildcat Point
* 6953c591ba sb/intel/lynxpoint/acpi/serialio.asl: Add more _PS0/_PS3 methods
* 0e9c2f53b0 haswell/broadwell: Move CPU bus ops to CPU code
* e0715bc0f9 soc/intel/pantherlake: Disable PCIe PM in compliance test mode
* bce8d28a59 MAINTAINERS: Add Nicholas Chin for autoport
* b6ebb24a48 util/spd_tools/src/spd_gen/lp5.go: Support LP5X 9600Mbps
* 13bf2d9566 mb/google/fatcat: Enable C1 and package C-state auto-demotion
* 56e645d942 mb/google/fatcat: Change Gen4 and Gen5 NVMe power sequence
* 8998999eb3 Haswell NRI: Add dumping of CAPID registers
* 343f439801 util/inteltool: set amb registers dumping error print to stdout
* 26006cc217 util/ifdtool: show overlapping region name and range details
* 93444a0ce0 mb/emul/qemu-[q35,i440fx]: Create ICQR interrupt resource locally and use defined offset
* 036af49b1d mb/emul/qemu-q35: Add a _DIS method for gsi_link devices
* f5c9c1c166 mb/google/bluey: Move ADSP QUP-I2C init to normal boot path
* 61c69ebfa8 mb/starlabs: Drop PCIe detect-timeout/hotplug workarounds
* baadfed999 mb/starlabs/adl: Add NVMe power sequencing
* 49a5b949ca mb/starlabs/starbook: Add NVMe/WiFi power sequencing
* 279406cd14 mb/starlabs/starfighter: Add NVMe port power sequence
* 0306eb0723 mb/starlabs/common: add NVMe power sequencing helper
* cfbf8f3953 starlabs: drop CMOS option tables
* 9dac2b9e53 ec/starlabs/merlin: persist settings via EFI options
* 3fa3818e41 starlabs: add ACPI SMI bridge for EFI options
* 484e39c068 mp_init: Pass microcode size to MPinit
* ea1a722d2b soc/intel/xeon_sp: Move microcode loading
* 08e3ad9e03 mb/google/brox/var/juchi: Add 2 memory parts and generate DRAM IDs
* ba6de6c866 mb/google/fatcat/var/ruby: Set ISH GP1 gpio pin to NC
* fb2e8b5e1e mainboard/google/bluey: Enable charging debug access in common path
* ca9b46d341 soc/mediatek: Add common low battery poweroff handling
* c222118cbf soc/qualcomm/x1p42100: Remove redundant VBUS enablement logic
* 2c58402339 soc/qualcomm/x1p42100: Configure OTG buck for USB host
* 10f0a87824 soc/qualcomm/sc7280: Update console message type non-fatal
* 270e84e59f vc/chromeos: Provide inline fallbacks for Chromebook Plus branding
* fe506bfe84 ec/google/chromeec: Add Kconfig for AP-controlled LED sync
* 12710eafff mb/google/bluey: Implement off-mode charging applet
* a1dd5f05b0 ec/google/chromeec: Add interface for offmode heartbeat command
* 125d9c8643 soc/qualcomm/x1p42100: Add logic for secure boot blob paths
* 6de3d04c4e Kconfig: Add Kconfig for signed secure blobs
* 0a6142dfbe soc/amd/turin_poc: Add SPI TPM SoC-specific initialization
* dde872911a mainboard/starlabs: drop unused TJ_MAX option
* 724176a218 mainboard/starlabs: namespace PL4 powercap setting
* 5156ec4533 mainboard/starlabs/adl: move SSDT hook to variant
* ffad2454c4 mainboard/starlabs/adl: drop redundant ASPM CFR guard
* 14fcb3baf8 mainboard/starlabs/adl: move CFR callbacks to variant
* 7f02993393 mainboard/starlabs: move starlite under adl/
* e02dc13b87 mainboard/starlabs: move Byte under adl/
* 3ea94fb2dc mb/starlabs/starfighter: Enable the card reader
* 56f588eec6 mb/starlabs/*: Don't consider fan presence for default power profile
* 19df8826d7 mb/starlabs/starlite_adl: Disable the card reader by default
* c940d20696 soc/intel: Consolidate common code macro definitions in pci_devs.h
* d03957e10f soc/intel/tigerlake: Use common PCH client SMI handler
* 402da237bc soc/intel/pantherlake: Use common PCH client SMI handler
* eb205e379a soc/intel/meteorlake: Use common PCH client SMI handler
* f0021f84ec soc/intel/alderlake: Use common PCH client SMI handler
* 4b73479c38 soc/intel/common/feature/smihandler: Add common PCH client SMI handler
* 2eb37453e5 soc/intel/meteorlake: Use common pmutil driver
* f0be882d9f soc/intel/pantherlake: Use common pmutil driver
* 2b70ce3fbf soc/intel/alderlake: Use common pmutil driver
* cc31cc0ab2 soc/intel/common/feature/pmutil: Add common pmutil driver
* 189f8d1a86 soc/intel/elkhartlake: Switch to common eSPI/LPC initialization
* aeb9db4467 soc/intel/jasperlake: Switch to common eSPI/LPC initialization
* 05006995b6 soc/intel/tigerlake: Switch to common eSPI/LPC initialization
* 7278030fa6 soc/intel/pantherlake: Switch to common eSPI/LPC initialization
* 4fe7e7fa36 soc/intel/meteorlake: Switch to common eSPI/LPC initialization
* 34be3842a1 soc/intel/alderlake: Switch to common eSPI/LPC initialization
* 0464f1032a soc/intel/common/feature/espi: Add common eSPI/LPC initialization
* f780b7c576 soc/intel/tigerlake: Use common SoundWire driver
* 620a33f1c8 soc/intel/pantherlake: Use common SoundWire driver
* ffc67b2938 soc/intel/meteorlake: Use common SoundWire driver
* ef364d623d soc/intel/alderlake: Use common SoundWire driver
* 74d4fac210 soc/intel/common/feature/soundwire: Add common SoundWire driver
* 7bee4f5efb mb/starlabs: Drop explicit devtree_update calls
* f8494fbeae lib: Add devtree_update bootstate hook
* 69242d5bb1 drivers/usb/acpi: Add DSM function 3 support for Intel Bluetooth
* 50e92c9cf1 mb/lenovo/m920q: Rename to reflect use for m720q variant as well
* e0c26a05d4 ec/starlabs/merlin: fix OSFG suspend comment
* ce5c915344 drivers/spi/flashconsole.c: Fix flashconsole
* c2eea0c96c mainboard/starlabs/adl: add Bluetooth RTD3 CFR option
* 7847a54eed mb/lenovo: Convert PNP device to generic device
* 091ae533b9 mb/lenovo/t430: Merge into t430 into t530
* 3a5e4660bb mb/lenovo/t530: Unify GEN_DEC entries
* 416875e93e mb/lenovo/t430|t530: Reduces differences in code
* 57f96b83fe mb/google/link/hda_verb: Remove presence detect flag from internal sources
* 6be9ee7ce4 mb/google/link: Use AZALIA_PIN_DESC macros for pin widgets
* 8718db133a mb/google/fatcat/var/lapis: Add 2 Micron modules to RAM id table
* f9f43d862d spd/lp5: Add Micron memory part
* c57b88d74d mb/google/brox/var/lotso: delete mb_get_channel_disable_mask
* 8ba58ef800 mb/samsung/lumpy: Correct NID 0x08 HDA pin config macro usage
* 38988a727e util/mediatek: Reduce non-boot related BROM settings
* e84415b8f8 mb/google/nissa/var/yaviks: Add micron memory to RAM ID table
* 08dcaf404c mb/google/nissa/var/yavilla: Add micron memory to RAM ID table
* 523242b2b9 google/bluey: Add RW_CDT region to flash map
* 5e46ac1364 mb/google/bluey: Resize WP_RO and add RW_UNUSED region
* 08f2f3a21b Haswell NRI: Implement 1D margin training
* 098a5cf16e mb/google/ocelot: Configure CDCLK frequency for display
* 7b205808e4 mb/google/rauru: Disable CHROMEOS_USE_EC_WATCHDOG_FLAG
* b1e8f87b30 mb/google/rauru: Enable MEDIATEK_WDT_RESET_BY_SW
* f4825e5c12 soc/amd/common: Add I3C driver
* cf5d6f1c88 soc/intel/common/block/gspi: Simplify Makefile using all-$()
* 56ede20f10 soc/intel/pantherlake: Use common SPI device function driver
* 4bdeb73635 soc/intel/meteorlake: Use common SPI device function driver
* 8ecff12528 soc/intel/alderlake: Use common SPI device function driver
* 0aea05411d soc/intel/tigerlake: Use common SPI device function driver
* 47f3e7e3cc soc/intel/jasperlake: Use common SPI device function driver
* 91520ab096 soc/intel/common/feature/spi: Add common SPI device function driver
* 0668959a92 soc/intel/skylake: Use common GSPI devfn mapping
* 45d3ab84a8 soc/intel/cannonlake: Use common GSPI devfn mapping
* 4aae5fb66d soc/intel/elkhartlake: Use common GSPI devfn mapping
* 78ef2d0433 soc/intel/jasperlake: Use common GSPI devfn mapping
* 66a6c25ef8 soc/intel/tigerlake: Use common GSPI devfn mapping
* 3c92c8402a soc/intel/pantherlake: Use common GSPI devfn mapping
* 6459039b76 soc/intel/meteorlake: Use common GSPI devfn mapping
* 039f21b5e3 soc/intel/alderlake: Use common GSPI devfn mapping
* a4bc3131a5 soc/intel/common/feature/gspi: Add common devfn mapping
* 253689aebb sb/intel/lynxpoint/acpi/xhci.asl: Guard PCH-LP methods
* 72ecebf0c3 soc/intel/broadwell/acpi/xhci.asl: Use macros for constants
* 813edbbde8 sb/intel/lynxpoint/acpi/xhci.asl: Use macros for constants
* 3cde265c28 sb/intel/lynxpoint/acpi/xhci.asl: Drop redundant writes
* a59ddda11e Doc/mb/protectli/fw6: describe revisions and more variants
* d5161611a4 soc/intel/pantherlake: Use common I2C devfn mapping
* 78e36f8c78 soc/intel/meteorlake: Use common I2C devfn mapping
* f703f2800c soc/intel/skylake: Use common I2C devfn mapping
* 7f922438be soc/intel/cannonlake: Use common I2C devfn mapping
* a0ba812a09 soc/intel/jasperlake: Use common I2C devfn mapping
* 83325f354b soc/intel/tigerlake: Use common I2C devfn mapping
* fe728d62c9 soc/intel/elkhartlake: Use common I2C devfn mapping
* 749bae2f94 soc/intel/alderlake: Use common I2C devfn mapping
* b21e861ab5 soc/intel/common/feature/i2c: Add common devfn mapping
* 34c156427d soc/intel/common/block/lpc: Fix AMASK decoding in window detection
* b50c219557 soc/intel: Use centralized emergency battery shutdown hook
* a96f1a464b mb/google/bluey: Use common platform hook for emergency shutdown
* 5c44e689ee vc/google/chromeos: Add platform hook for emergency battery shutdown
* 086d3a3232 mb/google/fatcat: Enable ChromeOS EC LEDs in romstage
* 2a821d8db6 mb/google/bluey: Early enablement of lightbar
* d39f406f55 mb/google/bluey: Disable lightbar during low-power charging boot
* b68ba24244 ec/google/chromeec: Add API to turn on lightbar
* 5f9a1ad962 ec/google/chromeec: Add API to turn off lightbar
* 4028996c9d mb/google/nissa/var/pujjoquince: Add support for Micron MT62F1G32D2DS-031RF
* 800db242bd {soc,sb}/intel: Drop named object from ASL `GPLD` method
* 57e30e6b9d mb/google/brask/var/moxoe: Switch memory to DDR5
* c069dc3eb1 mb/google/fatcat/var/ruby: Add settings for resolving EE noise
* 5ac3e40282 mb/google/brox/var/caboc: Probe LGD touchscreen by fw_config
* 61ce86ea3e mb/siemens/mc_ehl6: Reduce clock rate for I2C1
* acd8f42410 soc/intel/skylake: Use common UART device list driver
* a69d537e61 soc/intel/cannonlake: Use common UART device list driver
* e31d32443e Revert "mb/google/fatcat: Fix Gen4 SSD power sequencing"
* 7b4fb78e34 soc/intel/elkhartlake: Use common UART device list driver
* bb95093b8f soc/intel/jasperlake: Use common UART device list driver
* 61dc1e04e0 soc/intel/tigerlake: Use common UART device list driver
* 38baf0c5f6 soc/intel/meteorlake: Use common UART device list driver
* 44fcbf84b3 soc/intel/snowridge: Move defines to soc/pci_devs.h
* dfcd63370d cpu/intel: Use existing defines for MTRR_CAP_MSR
* fd2cdf206d cpu/intel/smm/gen1: Optimize cpu_has_alternative_smrr
* f96644e774 nb/intel/haswell: Do not print ME status twice
* d9bc4740da nb/intel/haswell: Fix DDR frequency reporting
* 6a1b016184 nb/intel/haswell: Tidy up memory info prints
* f89ac4e6ce soc/mediatek/common: Adjust splash logo bottom margin
* f01e11ac5c vc/intel/fsp/fsp2_0/wildcatlake: Update WCL FSP headers to version WCL.3515.03
* 326e33b82d soc/intel/pantherlake: Use common UART device list driver
* 3337e56b50 soc/intel/alderlake: Use common UART device list driver
* bb941824ca soc/intel/common/feature/uart: Add common UART device list driver
* 78295974f8 soc/intel/common: Add feature directory for SoC-specific common code
* f691421daf soc/intel/common: Replace CFR enums with booleans
* 24870f54e0 soc/intel/skylake: Replace CFR enums with booleans
* 666e66800c soc/intel/tigerlake: Replace CFR enums with booleans
* 12f99ab067 soc/intel/alderlake: Replace CFR enums with booleans
* 47bc0a727c soc/intel/jasperlake: Replace CFR enums with booleans
* 1b0147f05b soc/intel/meteorlake: Replace CFR enums with booleans
* b935d5b058 soc/intel/cannonlake: Replace CFR enums with booleans
* daa32be457 soc/intel/apollolake: Replace CFR enums with booleans
* 90f9d9e7c6 mb/google/poppy: Replace CFR enums with booleans
* 6b481c73dd mb/google/hatch: Replace CFR enums with booleans
* 9a58dc7fee mb/google/auron: Replace CFR enums with booleans
* e7c05d666c mb/google/volteer: Replace CFR enums with booleans
* 71b7167396 mb/lenovo/sklkbl_thinkpad: Replace CFR enums with booleans
* ed10b36edf ec/google/chromeec: Replace CFR enums with booleans
* d19e5d2550 ec/lenovo/pmh7: Replace CFR enums with booleans
* 0ff3c3d2ec ec/lenovo/h8: Replace CFR enums with booleans
* f9f81e4839 mb/lenovo/x220: Replace CFR enums with booleans
* 7e8850a862 mb/google/*/cfr.c: Drop initial empty line
* 220669643b soc/qualcomm: Add Kconfig to skip redundant MMU toggling
* c9578eac24 mb/google/ocelot: Add THC-SPI Touchscreen support in fw_config
* d88e98cf49 mb/google/fatcat/lapis: Remove RTD3 config for SSD
* 24866fefef mb/google/fatcat/var/lapis: Add UFSC bit of new FP MCU
* 33d873324e mb/lenovo/*: Drop unused ACPI code
* 571dbbe345 mb/lenovo/t430: Move TPM in devicetree.cb
* 06446dd0ac dram/ddr3: Add speed in MT/s
* bf148cae0a lib/dimm_info_util.c: Handle 16-bit memory bus extension for ECC
* a3923d678f ec/starlabs/merlin: fix ITE CMOS index mapping
* e47952c3a7 mb/asus/p8x7x-series: Enable common SIO ASL code
* e82ecc739d sio/nuvoton/nct6776: Switch to common init code
* e72a325c40 sio/nuvoton/nct{5535,6779}d: Use new common init code
* 65c4ea0bfb superio/acpi/pnp_kbc.asl: Allow changing device and PNP IDs
* 2de0c9575d sio/nuvoton/nct6776: Switch to common Nuvoton ASL code
* 94a356e0c8 sio/nuvoton/nct5535d: Use common ASL code
* 4cee52e457 sio/nuvoton/nct6791d: Enable common ASL code
* c30802d6fb sio/nuvoton/nct6779d: Enable common ASL code
* 7876bcaa86 sio/nuvoton: Implement common ramstage keyboard/ACPI init routines
* afeca9f422 mb/starlabs: disable TCO INTRUDER# SMI by default
* c996684f40 intel/smm: make TCO INTRUDER# SMI optional
* 339ef9b5c9 soc/intel/common/block/lpc: Improve automatic window opening
* f1e4de7fbf mb/google/dedede/var/galtic: Add fw_config option for touchpad type
* 08b05f56a6 Revert "mb/google/dedede/galtic: Add CFR option for touchpad type"
* ed5a993f0f mb/google/fatcat/lapis: Enable eSOL feature
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-23 21:33:31 +01:00
Leah Rowe
9b01115c5a
dell-flash-unlock: fix errno handling
...
and remove pedantic flags in makefile
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 03:38:30 +01:00
Leah Rowe
a64cdaa300
nvmutil: remove pedantic flag
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 03:33:33 +01:00
Leah Rowe
c4e8c4fa25
spkmodem-recv: remove pedantic flag
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 03:33:03 +01:00
Leah Rowe
46574146f5
spkmodem-recv: remove buggy errno usage
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 03:32:46 +01:00
Leah Rowe
3b7ac395f4
nvmutil: fix cast
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 03:17:14 +01:00
Leah Rowe
d6658eb062
util/nvmutil: fix errno zero on exit return
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 03:15:41 +01:00
Leah Rowe
40cb95b15e
nvmutil: fix bad return status on error
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 02:54:00 +01:00
Leah Rowe
4bf88a8081
nvmutil: use uintptr for gbe. check regular file.
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-22 02:53:15 +01:00
Leah Rowe
48e949263b
switch spkmodem_decode back to spkmodem_recv
...
this version is more tested. i'll merge _decode back
once it's better tested. it contains a lot of invasive
changes, whereas recv is much closer to the original GNU
code that i inherited, that i also know works quite well.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 19:11:45 +01:00
Leah Rowe
7b5349e85d
disable lbutils on non-linux systems
...
i should probably test musl as well, on linux
libreboot-utils is stable on the glibc systems i tested
with linux. it is quite buggy on bsd systems.
it's irresponsible to let users compile this until i've
properly tested the code. putting this error in for now.
i made lbmk use the old nvmutil version for now, and retro
fitted several improvements to i/o there from lbutils,
changes that i know are stable on bsd.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 19:05:26 +01:00
Leah Rowe
b947150f8a
nvmutil: don't rely on errno for errors
...
adapted from the changes made in lbutils
i'm just patching this crappy code. lbutils doesn't
work properly on openbsd yet, and i just want nvmutil
to work properly there, so i'm using the old code for
now, on openbsd.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 19:02:29 +01:00
Leah Rowe
4bf96fbc1e
nvmutil-standalone: add eintr safety
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 17:38:31 +01:00
Leah Rowe
dec63fc274
add gitignore
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 17:03:18 +01:00
Leah Rowe
2d33754a5c
fix make file
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 13:54:01 +01:00
Leah Rowe
6d3341c637
nope. use nvmutil from libreboot 26.01
...
guaranteed not to break on openbsd (tm)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 13:50:54 +01:00
Leah Rowe
b1b1d2cf0c
remove pledge in nvmutil
...
don't fix it for now. this version was buggy.
i'm only using nvmutil for now, until i properly
fix all the memory issues in lbutils on openbsd.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 13:48:27 +01:00
Leah Rowe
6f9f0f7321
fix nvmutil Makefile for openbsd
...
same fix i did for lbutils
the nvmutil version is the same one used before
lbutils was introduced. just before.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 13:44:36 +01:00
Leah Rowe
7f4f07fc40
use old nvmutil for now, in lbmk
...
i'm trying to make nvmutil work on openbsd. the new code
in lbutils is a bit buggy, likely somewhere in mkhtemp.
i'm still debugging it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 13:39:29 +01:00
Leah Rowe
4b5aca8ff8
now mkhtemp works on openbsd!
...
yay
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 06:42:08 +01:00
Leah Rowe
e097eb5483
lbutils: don't use stack memory for path strings
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 06:39:50 +01:00
Leah Rowe
7faf014a84
further makefile cleanup in lbutils
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 06:09:08 +01:00
Leah Rowe
0205c0e6b0
lbutils: remove xpledge/xunveil, just call them direct
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 05:54:50 +01:00
Leah Rowe
7ff5d925bf
fix bsd
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 05:49:32 +01:00
Leah Rowe
59fefd9c57
tidy up lbutils makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-21 05:47:25 +01:00
Leah Rowe
7619bfed65
lbutils/mkhtemp: correct return value check
...
check if above or equal to zero, except where
counterindicated. this is the usual way on unix,
where a command returns -1 on error, or above/equal
to zero on success.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-10 22:59:08 +01:00
Leah Rowe
9dab2ffa29
lbutils/mkhtemp: use openat_on_eintr
...
missing EINTR handling fixed
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-10 22:59:08 +01:00
Leah Rowe
f055809c17
lbutils/file: only override EEXIST if not set
...
in the linux fast path, we are universally overriding
errno with EEXIST, which pollutes errno in case of
debugging under fault condition. this is inconsistent
with posix and also leah.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-10 22:59:08 +01:00
Leah Rowe
fc3c7b9c3e
lbutils/file: tidy up mkhtemp_tmpfile_linux
...
make failure more obvious. no behavioural change.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-10 22:59:08 +01:00
Leah Rowe
7eecc42b92
Merge pull request 'supermicro x11ssh_f: Enable SATA hotplug' ( #419 ) from noisytoot/supermicro-x11ssh-f-sata-hotplug into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/419
2026-04-10 23:57:20 +02:00
Ron Nazarov
4a7feba7cd
supermicro x11ssh_f: Enable SATA hotplug
...
See the commit message in the patch:
Before this patch, hotplugging only worked to replace drives (if you
tried to plug a drive into a SATA port that no drive was plugged in to
at boot, it wouldn't be detected) and you'd have to manually rescan
the bus (echo "- - -" > /sys/class/scsi_host/host*/scan) to make
plugs/unplugs get detected by the operating system.
Now, hotplugging works for all ports (tested and working on Supermicro
X11SSH-LN4F) and there's no need to manually rescan (it sometimes
takes a few seconds for unplugs to be detected, but plugs are detected
instantly).
Also submitted upstream as https://review.coreboot.org/c/coreboot/+/91824
2026-04-10 20:21:53 +01:00
Leah Rowe
63ec707698
lbutils/file: ignore close err if errno is EINTR
...
but DONT LOOP IT. see comment.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 21:05:08 +01:00
Leah Rowe
2d69d45e26
remove dead code
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 20:36:05 +01:00
Leah Rowe
6b67e12428
lbutils/file: don't eintr loop fcntl
...
not indicated. the way we use it is basically like
stat, to check that a file exists / is a file.
just err the fuck out
nuance: SETLK is non-blocking (no wait).
we should loop on SETLKW, but we don't use that.
in this codebase, we use SETLK for locking a
tmpfile, but because of race conditions and
wanting to make another file quickly, we just
try again with a newly generated name, with a
certain number of retries, so we justt use SETLK
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 20:17:26 +01:00
Leah Rowe
a6d2de4e88
libreboot-utils: don't loop lseek on EINTR
...
not necessary.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 19:17:32 +01:00
Leah Rowe
d12ca7fd8e
lbutils/file: don't use undefined USE_OPENAT
...
clang -Weverything told me to
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 19:09:26 +01:00
Leah Rowe
736a2504bb
lbutils/file: don't loop EINTR on close()
...
state is undefined after EINTR. just abort universally.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 17:43:43 +01:00
Leah Rowe
249ae57c29
lbutils/file: fix implicit conversion on openat2
...
as dictated by clang -Weverything
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 17:33:01 +01:00
Leah Rowe
c48a962eaf
lbutils/file: fix overflow check
...
clang -Weverything:
lib/file.c:165:49: warning: implicit conversion changes signedness: 'ssize_t' (aka 'long') to 'size_t' (aka 'unsigned long') [-Wsign-conversion]
165 | if (if_err(rval >= 0 && (size_t)rval > (nrw - rc), EOVERFLOW))
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 17:29:28 +01:00
Leah Rowe
3d24aa98f9
lbutils: remove more unused macros
...
detected via clang -Weverything
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 16:50:50 +01:00
Leah Rowe
ae5e74554a
lbutils/file: remove unused macro
...
not needed here (detected with clang -Weverything)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 16:49:19 +01:00
Leah Rowe
fb81b7b736
lbutils/file: rename rw_file_exact
...
call it rw_exact, so that it's closer to
the name rw. it matches naming more closely;
the alternative was to call rw rw_file
but read/write can handle more than just files!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 16:20:12 +01:00
Leah Rowe
f68cedf202
libreboot-utils/file: never retry file rw on zero
...
even with a timer, it's possible that on a buggy system,
we may keep writing even though the outcome is zero. if
a system comes back with zero bytes written, that is a
fatal bug and we should stop.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 16:19:46 +01:00
Leah Rowe
5b465d3af6
lbutils: remove -Werror
...
the actual warn flags are still there.
leaving Werror in production is ill advised.
i can (and will) still fix build errors as
i see them.
as a result of this, i now also see more info
when i type:
make strict
(this uses clang with -Weverything)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 15:02:52 +01:00
Leah Rowe
9dc141bafa
lbutils/rand: close fd on urandom error
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 14:35:24 +01:00
Leah Rowe
a879114734
lbutils: remove rw on_eintr functions. just use rw
...
rw is enough. i unified everything there.
next commit will remove rw_type and instead
run positional i/o depending on whether the
offset is zero. i'm simplifying the API a lot.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 14:29:39 +01:00
Leah Rowe
229a283604
lbutils: portable options in Makefile
...
add options for building with urandom+openat and
arc4+openat. useful for emulating a bsd / old linux
environment in modern linux distros, for portability
testing.
these options are not recommended for everyday use.
just use make without any special options, and the
code has build-time OS detection for features like
randomisation/openat2.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 13:03:30 +01:00
Leah Rowe
4e72555ac7
lbutils: support using arc4random on linux
...
-DUSE_ARC4=1
use that
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 12:44:38 +01:00
Leah Rowe
44004191cb
lbutils: don't set USE_OPENAT and USE_URANDOM
...
these can be set explicitly in the compiler flags,
e.g.
make CC="cc -DUSE_OPENAT=1 -DUSE_URANDOM=1"
these options, if set to 1, will cause you to use
the code as if it were running on non-linux systems
such as openbsd. of course, some differences will
still exist, but this is useful for portability
testing when compiling on linux.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 12:30:55 +01:00
Leah Rowe
2c40ad7816
lbutils: only use GNU SOURCE for syscall
...
and remove manual prototypes; fchmod, realpath
and so on rely on the _XOPEN_SOURCE macro.
the POSIX macro wasn't needed: _XOPEN_SOURCE
is sufficient.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 11:52:53 +01:00
Leah Rowe
716140b80f
libreboot-utils: don't use the GNU SOURCE macro
...
use the POSIX one
declare prototypes where necessary.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 11:00:58 +01:00
Leah Rowe
b7b34413e7
libreboot-utils: fix clang hell mode
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 10:23:48 +01:00
Leah Rowe
d100ea1d2f
libreboot-utils: always use strict cc flags
...
otherwise, i will end up with a mess like the
one i recently fixed.
we always want to use correct C. the current
spec is set to c99, with -pedantic turned on.
flags now:
-Os -Wall -Wextra -std=c99 -pedantic -Werror
if you do: make hell, you get (uses clang):
-Os -Wall -Wextra -std=c99 -pedantic -Werror -Weverything
i initially loosened up the Makefile rules, so
that the code would be more "portable", but
every compiler worth caring about has these
flags, and turning them on is advisable,
especially pedantic and -std, because you want
to have some guarantee that the compiler is
generating correct code; if the standard is
left ambiguous, you could be introducing subtle
bugs when people compile it, because who knows
what spec the compiler is using?
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 10:11:30 +01:00
Leah Rowe
861f56375a
libreboot-utils: fix ALL compiler warnings
...
i wasn't using strict mode enough in make:
make strict
now it compiles cleanly. mostly removing
unused variables, fixing implicit conversions,
etc.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 10:03:41 +01:00
Leah Rowe
d91dd0ad81
fix coreboot/fam15h build error on arch
...
In file included from /home/user/lbmk/src/coreboot/fam15h/util/cbfstool/partitioned_file.h:19,
from /home/user/lbmk/src/coreboot/fam15h/util/cbfstool/partitioned_file.c:16:
/home/user/lbmk/src/coreboot/fam15h/util/cbfstool/common.h:34:16: error: expected ‘)’ before ‘__attribute__’
34 | #define unused __attribute__((unused))
| ^~~~~~~~~~~~~
In file included from /home/user/lbmk/src/coreboot/fam15h/util/cbfstool/common.h:25:
/home/user/lbmk/src/coreboot/fam15h/src/commonlib/include/commonlib/helpers.h:137:40: error: expected identifier or ‘(’ before ‘)’ token
137 | #define __unused __attribute__((unused))
^ this removes that error
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 08:25:54 +01:00
Leah Rowe
9cd86eb584
coreboot/default: fix vboot build error on arch
...
or any newer linux really.
new gcc is much stricter about const chars.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 08:13:56 +01:00
Leah Rowe
e9a975b1f7
fix u-boot builds on arch linux
...
gnu changed a flag for like, no fucking reason
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 07:42:32 +01:00
Leah Rowe
df5bb1c894
libreboot-utils: loop fcntl on eintr
...
but i can't write a generic function for this,
because fcntl is a variadic function, so wrapping
cannot be done cleanly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 06:17:25 +01:00
Leah Rowe
f90af15502
safer macro
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-04-01 06:10:57 +01:00
Leah Rowe
e731893208
util/nvmutil: call usage if argc below 3
...
otherwise, we invoke the state machine in weird
conditions, where some pointers may not be initialised.
we could handle this properly, but why?
therefore, the errhook is called after the argc
check.
this patch fixes a Speicherzugriffsfehler that
i got while running nvmutil with below 3 arguments
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 17:54:48 +01:00
Leah Rowe
d2abde5303
libreboot-utils: stricter errno handling
...
where possible, try not to clobber sys errno. override
it only when relatively safe.
also: when a syscall succeeds, it may set errno. this
is rare, but permitted (nothing specified against it
in specs, and the specs say that errno is undefined
on success).
i'm not libc, but i'm wrapping around it, so i need
to be careful in how i handle the errno value.
also:
i removed the requirement for directories to be
executable, in mkhtemp.c, because this isn't required
and will only break certain setups.
in world_writeable and sticky, i made the checks stricter:
the faccessat check was being skipped on some paths, so
i've closed that loophole now.
i also generally cleaned up some code, as part of the errno
handling refactoring, where it made sense to do so, plus a
few other bits of code cleanup.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 17:49:23 +01:00
Leah Rowe
c0fd88155a
lbutils/rand: add missing error handle
...
accidentally removed in previous refactor
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 14:14:44 +01:00
Leah Rowe
6d9f162f5b
lbutils/file: only support real pread/pwrite
...
the portable version was written for fun, but
it's bloat, and makes the code hard to read.
every unix since about 2005 has these functions.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 12:22:42 +01:00
Leah Rowe
a769537554
lbutils/file: don't alllow EAGAIN/EWOULDBLOCK
...
a non-blocking file descriptor could be used while
errno is set to these. this would create an infinite
loop. it's better that we only allow EINTR.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 12:06:33 +01:00
Leah Rowe
bca09eebf3
lbutils/file: remove ETXTBSY from exemption on io
...
obsolete. ripe for abuse. do not permit this error.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 12:04:37 +01:00
Leah Rowe
277c0c8e87
lbutils/file: don't reset errno on successful io
...
some io syscalls may set errno on success. this patch
honours that. we try to preserve caller errno, but it
is important for debugging not to clobber it.
if fs_err_retry errs, then we don't reset errno.
if fs_err is successful but errno wasn't set, we
restore caller errno. this is done by setting errno
to zero in callers, which also restore caller errno.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 12:03:46 +01:00
Leah Rowe
aacf9fb6c9
libreboot-utils: unified EINTR loop handling
...
absolutely unified.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 11:45:21 +01:00
Leah Rowe
f2dd830c7b
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 07:47:15 +01:00
Leah Rowe
2f7623ff06
libreboot-utils: unified max path lengths
...
just use PATH_MAX like a normal person
with additional safety
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-31 07:42:40 +01:00
Leah Rowe
fb5f1b4ed1
correct exit status
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-30 07:12:25 +01:00
Leah Rowe
9400f4ea0b
be reasonable
...
8GB of entropy is a tad extreme
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-30 07:04:26 +01:00
Leah Rowe
da20b75bea
libreboot-utils: more flexible string usage
...
i previously used error status and set return values
indirectly. i still do that, but where possible, i
also now return the real value.
this is because these string functions can no longer
return with error status; on error, they all abort.
this forces the program maintainer to keep their code
reliable, and removes the need to check the error status
after using syscalls, because these libc wrappers mitigate
that and make use of libc for you, including errors.
this is part of a general effort to promote safe use
of the C programming language, especially in libreboot!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-30 06:25:52 +01:00
Leah Rowe
b96708bd3a
lbutils: strict string functions - abort on err
...
on the conditions where these functions encounter
an unexpected error, we currently return -1
this means that the caller must check. which means
the caller won't check. nobody does. i often forget.
force the caller (me) to be correct, instead.
the current calling convention is that the real
return value is stored in a pointer, provided inside
the function signature, on a given string function,
and the function's return value is merely an indicator.
this calling convention is retained for now; the next
patch will change it, such that the real value is also
the function's return value. this is more flexible.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-30 03:03:14 +01:00
Leah Rowe
9d4302deb2
libreboot-utils: optimised string functions
...
operate per word, not per byte
this is also done on sdup, which uses a slightly
inefficient method: the new string allocation is
that of the maximum size, rather than what we
need. for example, if you wanted a 20 character
string (21 including null), you would still allocate
4096 bytes if that was the maximum length.
it's a bit naughty, and i have half a mind to
keep sdup on the old implementation, but i'll leave
it be for now.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-30 01:53:17 +01:00
Leah Rowe
7fb0b2f692
libreboot-utils: safe memcmp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 23:55:38 +01:00
Leah Rowe
01aa95ec15
Revert "lbmk: use mkhtemp in libreboot's build system"
...
This reverts commit e54862fccc .
nope. not ready yet. will fix it later.
2026-03-29 16:25:41 +01:00
Leah Rowe
e54862fccc
lbmk: use mkhtemp in libreboot's build system
...
i added a fake -t option, which doesn't actually
read optarg, so that -t usage can just override
the normal template. mkhtemp isn't ready for
distros yet, but it's ready for lbmk.
i hacked the makefile to also copy the binary to
mktemp, and i set PATH in lbmk so that this binary
is used insttead of the one on your system.
that way, upstream projects use it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 16:08:00 +01:00
Leah Rowe
8657d084d2
util/nvmutil: re-add cleanup
...
delete tmpfiles after operation. fixes a bug where
tmpfiles are left behind after running the dump
command.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 14:37:51 +01:00
Leah Rowe
e4016eb32c
lbutils hexdump: reduce width on smaller integers
...
showing the size for 64-bit high integers seems silly
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 14:26:56 +01:00
Leah Rowe
ac04a5f50a
libreboot-utils/lib: loop eintr on [p]read/[p]write
...
i forgot to do this!
with this, I/O should be bullet proof now.
i already loop this on other I/O commands.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 14:15:34 +01:00
Leah Rowe
a56903a7b0
mkhtemp: rename variable for clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 13:53:55 +01:00
Leah Rowe
b70ee41c5c
hexdump performance test, part 1
...
spoiler alert: it's slow as molasses
part 2 will be presented at a later date
(yes, please don't fill 8GB of memory with
random data and hexdump it)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 13:42:37 +01:00
Leah Rowe
cec3de5c9e
mkhtemp: generalised string concatenation
...
scatn in strings.c was buggy, so i replaced it; it
concatenates any number of things.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 10:35:33 +01:00
Leah Rowe
1539aff302
lbutils: simplify getprogname usage
...
the functions no longer return errors, so i don't
need to handle them.
furthermore, the handling in state.c is redundant,
so i've removed that too.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 09:30:10 +01:00
Leah Rowe
c2a70b7de0
libreboot-utils: simplify random tmpdir namegen
...
generalise it in rand.c because this logic will
be useful for other programs in the future.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 09:18:36 +01:00
Leah Rowe
45edcf33f7
lbutils: rename mkrbuf to rmalloc
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 08:37:32 +01:00
Leah Rowe
6e4839d356
libreboot-utils: simplify lbgetprogname
...
make it more reliable; it can't segfault
now, under any circumstance. not even
once.
the problem arised when lbsetname was not
called in a program, before calling the
function: lbgetprogname. a segfault would
occur, due to it being NULL.
not every os/libc has getprogname, so i have
my own implementation.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 08:20:09 +01:00
Leah Rowe
909b321f3a
lbutils makefile: use c99 in strict mode
...
not c90
i use stdint now on a few files. i had this
idea in my head to use C89 for some reason,
but this is pointless.
c99 however is worthy as a minimum, because
for example, compilers like tcc will adhere
to its spec (for the most part), so this is
the minimum reasonable requirement on modern
unix systems.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 07:30:29 +01:00
Leah Rowe
afe2e71c01
util/nvmutil: better hexdump
...
this is a more generic one that i implemented
for "lottery.c" (which is really just a tester
of my rset function in lib/rand.c)
i could probably actually write a full hexdump
program in libreboot-utils to be honest.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 07:22:34 +01:00
Leah Rowe
546565f321
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 07:09:06 +01:00
Leah Rowe
ab79f2b113
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 09:27:55 +00:00
Leah Rowe
5b26343e24
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 09:17:44 +00:00
Leah Rowe
16bc9feda8
mkhtemp: use O_NOFOLLOW in same_dir
...
we have a policy:
symlinks do not exist.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 09:16:05 +00:00
Leah Rowe
93ecd26306
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 09:12:15 +00:00
Leah Rowe
c4ff9e5763
lbutils env_tmpdir: use static strings for fallback
...
i currently return pointers to these, without copying.
they can fade because of this. make them static, since that
is what they should be anyway.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 09:07:40 +00:00
Leah Rowe
6643d9c1fa
lbutils: unify xopen and open_on_eintr
...
use open_on_eintr for gbe files
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 09:03:18 +00:00
Leah Rowe
4ecdadb7a6
libreboot-utils: unified errno handling on returns
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 08:32:27 +00:00
Leah Rowe
49cac232d8
libreboot-utils: much stricter open() handling
...
abort on error, and do EINTR looping
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 08:09:14 +00:00
Leah Rowe
03dd3c2894
lbutils/file ffree_and_set_null: err if null
...
free can take a null, that's fine, but my pointer
to the pointer being freed should not be null. that
is a bug.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 07:47:31 +00:00
Leah Rowe
63984a4a6a
libreboot-utils: much stricter close() handling
...
remove close_warn and close_no_err
make close_on_eintr a void, and abort
on error instead of returning -1.
a failed file closure is a world-ending
event. burn accordingly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 07:30:55 +00:00
Leah Rowe
fd26c6e631
util/mkhtemp: fix wrongful errno reset
...
on error state, i was resetting errno
unconditionally, which would then mask
the real error.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 07:06:22 +00:00
Leah Rowe
0f1a22174f
libreboot-utils: unified error handling
...
i now use a singleton hook function per program:
nvmutil, mkhtemp and lottery
call this at the startup of your program:
(void) errhook(exit_cleanup);
then provide that function. make it static,
so that each program has its own version.
if you're writing a program that handles lots
of files for example, and you want to do certain
cleanup on exit (including error exit), this can
be quite useful.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 06:53:37 +00:00
Leah Rowe
55f0e6ac8e
libreboot-utils: simplified pledge/unveil usage
...
i no longer care about openbsd 5.9. we assume unveil
is available, as has been the case for the past 12
years.
i use wrappers for unveil and pledge, which means that
i call them on every os. on OSes that don't have these,
i just return. it's somewhat inelegant, but also means
that i see errors more easily, e.g. misnamed variables
inside previous ifdef OpenBSD blocks.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 05:49:41 +00:00
Leah Rowe
7f39ce5f9b
libreboot-utils: extremely safe(ish) malloc usage
...
yes, a common thing in C programs is one or all
of the following:
* use after frees
* double free (on non-NULL pointer)
* over-writing currently used pointer (mem leak)
i try to reduce the chance of this in my software,
by running free() through a filter function,
free_if_not_null, that returns if a function
is being freed twice - because it sets NULL
after freeing, but will only free if it's not
null already.
this patch adds two functions: smalloc and vmalloc,
for strings and voids. using these makes the program
abort if:
* non-null pointer given for initialisation
* pointer to pointer is null (of course)
* size of zero given, for malloc (zero bytes)
i myself was caught out by this change, prompting
me to make the following fix in fs_dirname_basename()
inside lib/file.c:
- char *buf;
+ char *buf = NULL;
Yes.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 04:25:14 +00:00
Leah Rowe
cec9a25c2a
nvmutil: clamp rand (rejection sampling)
...
clamp rand to eliminate modulo sampling; high
values on the randomisation will bias the result.
not really critical for mac addresses, but there's
no reason not to have this. this patches reduces
the chance that two libreboot users will generate
the same mac addresses!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 03:10:46 +00:00
Leah Rowe
f4f1670909
util/nvmutil: tidy up hextonum
...
i had a bunch of hacks in here because i was
previously using very buggy rand. now it's ok.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 03:08:52 +00:00
Leah Rowe
998528c404
rand.c: fix initialisation bug in mrkbuf
...
should be null on bad return
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 02:27:00 +00:00
Leah Rowe
29296fc513
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 22:58:12 +00:00
Leah Rowe
1e23ee26b1
header
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 21:41:12 +00:00
Leah Rowe
0cc4ff7b3b
util/libreboot-utils: fix div by zero in rsize
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 17:14:10 +00:00
Leah Rowe
db6e817ded
util/libreboot-utils: finish implementing hell
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 16:56:40 +00:00
Leah Rowe
5d6344292a
challenge
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 02:28:27 +00:00
Leah Rowe
a29a3ac6f6
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 23:02:00 +00:00
Leah Rowe
1a09efbbbe
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 19:44:23 +00:00
Leah Rowe
d1ba9bae03
further cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 13:09:43 +00:00
Leah Rowe
10ecf32e33
libreboot-utils: improved randomness test
...
and the module bias handling is fully correct
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 10:52:11 +00:00
Leah Rowe
8e8f7bced4
mkhtemp rand: fix theoretical integer overflow
...
extremely theoretical, with a T. T for theoretical.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 09:04:30 +00:00
Leah Rowe
d6087901c1
rand/libreboot/utils: prevent div by zero
...
not really a thing. bufsiz would never be zero,
unless the demon takes over linux
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 08:59:03 +00:00
Leah Rowe
cf16d07df9
rand: fix modulo bias in rmalloc
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 08:56:15 +00:00
Leah Rowe
dbc99be9a0
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 07:04:23 +00:00
Leah Rowe
b211706559
improve 3
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
4d4285e63c
improve 2
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
fe259bd042
improve
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1900e18dae
phrasing
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f7bd4b9472
nvmutil: remove errno handle in hextonum
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
5e049df024
REAL_POS_IO enable by default in nvmutil
...
(for real pwrite/pread. don't use the compatibility
one - it works perfectly, but using it is pointless
and may have unknown bugs, even though i know it's
probably perfect)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
5ea7fe22b2
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
c2c24b7a24
nvmutil: fix lseek call when read pos i/o enabled
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
3d3193bb80
mkhtemp readme
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
8522b5c391
more cleanup on rand.c
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e151179d14
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
c4ff47a8ed
fix makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f4f3fe3e0a
libreboot-utils: tidy up rand.c
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
58ce1d74c0
libreboot-utils: new function, scatn()
...
concatenate an arbitrary number of strings,
pointed to by char **
i'll use this and the next function, dcatn,
in an upcoming feature planned for mkhtemp.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b84c929e64
rmalloc
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e0319f0116
util/libreboot-utils: randomisation test
...
to test the effectiveness of the rand function
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
dc7a02da2d
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
c66f381e90
mkrstr
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1e79219bea
lbutils: new function, mkrbuf (random malloc)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
ee4f765719
lbutils: close fd on rset failure
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e8c4bccd86
further clarify intentt
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
4034b211ce
lbutils, rset: err if zero bytes requested
...
similar to the logic about other failure states
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b26837c4dc
dot
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e44ea5d794
lbutils: also check null!
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
7b3c8cf7ec
lbutils: clarify design regarding urandom/getrandom
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
34f26319d7
lbutils, rand: err on zero return (fatal)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
bce1099509
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
0626bf48f4
lbutils: cast to prevent ub in rset()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
50e3b1f45d
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
0d86fd38df
fix offset on urandom falback
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a6f76ac4ee
libreboot-utils: tidy up rand
...
make it more efficient. much lower rejection
rate now, about 2-5%. deal with bias, but also
get numbers in bulk. not too many.
i'd say this is about right in terms of performance
balance. 64 bytes == 8 large integers.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
cbe48caf1b
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a70ede850d
libreboot-utils: replace rlong() with rset()
...
now you can send an arbitrary number of bytes
with random numbers
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
00b56c0278
libreboot-utils: tidy up rand
...
also re-add /dev/urandom support, as a config option
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
6c8cf9a9e0
util/mkhtemp: use /dev/urandom *if enabled*
...
build-time option. do not allow fallback; on
a system where getrandom is used, it should
be used exclusively.
on some systems, getrandom may not be available,
even if they have a newer kernel.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
718095b0fe
util/mkhtemp: extremely hardened mkhtemp
...
This will also be used in lbmk itself at some point,
which currently just uses regular mktemp, for tmpdir
handling during the build process.
Renamed util/nvmutil to util/libreboot-utils, which
now contains two tools. The new tool, mkhtemp, is a
hardened implementation of mktemp, which nvmutil
also uses now. Still experimental, but good enough
for nvmutil.
Mkhtemp attempts to provide TOCTOU resistance on
Linux, by using modern features in Linux such as
Openat2 (syscall) with O_EXCL and O_TMPFILE,
and many various security checks e.g.
inode/dev during creation. Checks are done constantly,
to try to detect race conditions. The code is very
strict about things like sticky bits in world writeable
directories, also ownership (it can be made to bar even
root access on files and directories it doesn't own).
It's a security-first implementation of mktemp, likely
even more secure than the OpenBSD mkstemp, but more
auditing and testing is needed - more features are
also planned, including a compatibility mode to make
it also work like traditional mktemp/mkstemp. The
intention, once this becomes stable, is that it will
become a modern drop-in replacement for mkstemp on
Linux and BSD systems.
Some legacy code has been removed, and in general
cleaned up. I wrote mkhtemp for nvmutil, as part of
its atomic write behaviour, but mktemp was the last
remaining liability, so I rewrote that too!
Docs/manpage/website will be made for mkhtemp once
the code is mature.
Other changes have also been made. This is from another
experimental branch of Libreboot, that I'm pushing
early. For example, nvmutil's state machine has been
tidied up, moving more logic back into main.
Mktemp is historically prone to race conditions,
e.g. symlink attacks, directory replacement, remounting
during operation, all sorts of things. Mkhtemp has
been written to solve, or otherwise mitigate, that
problem. Mkhtemp is currently experimental and will
require a major cleanup at some point, but it
already works well enough, and you can in fact use
it; at this time, the -d, -p and -q flags are
supported, and you can add a custom template at
the end, e.g.
mkhtemp -p test -d
Eventually, I will make this have complete parity
with the GNU and BSD implementations, so that it is
fully useable on existing setups, while optionally
providing the hardening as well.
A lot of code has also been tidied up. I didn't
track the changes I made with this one, because
it was a major re-write of nvmutil; it is now
libreboot-utils, and I will continue to write
more programs in here over time. It's basically
now a bunch of hardened wrappers around various
libc functions, e.g. there is also a secure I/O
wrapper for read/write.
There is a custom randomisation function, rlong,
which simply uses arc4random or getrandom, on
BSD and Linux respectively. Efforts are made to
make it as reliable as possible, to the extent
that it never returns with failure; in the unlikely
event that it fails, it aborts. It also sleeps
between failure, to mitigate certain DoS attacks.
You can just go in util/libreboot-utils and
type make, then you will have the nvmutil and
mkhtemp binaries, which you can just use. It
all works. Everything was massively rewritten.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Todd Baker
c2ad2f9b40
Add Dell OptiPlex 3040 Micro support
...
Adds libreboot support for the Dell OptiPlex 3040 Micro based on the
OptiPlex 3050 Micro (same Skylake H110 PCH-H platform). Key differences:
DDR3L SODIMMs, Pentium G4400T-class CPUs (Skylake only), Realtek ALC3234
HDA, and Boot Guard neutralization via deguard.
Tested and booted on hardware.
Signed-off-by: Todd Baker <todd_baker@student.uml.edu >
2026-03-26 06:59:42 +00:00
AlguienSasaki
417b85b464
Added full support for the X280
2026-03-26 06:59:42 +00:00
duchy
1586482c15
Added missing dependency
2026-03-26 06:59:42 +00:00
duchy
0c2de61a7e
Added missing dependency
2026-03-26 06:59:42 +00:00
Ron Nazarov
92610cc92b
Enable CBFS file option backend on T480s
...
It was already enabled on the other sky/kabylake thinkpads.
2026-03-26 06:59:42 +00:00
Leah Rowe
6d70a0dc56
nvmutil: fix unveil call
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f7072fc4c0
util/nvmutil: better getrandom safety
...
err if buf NULL, len -1
also getrandom may return fewer bytes, so
loop that too.
why can't linux be like bsd? bsd is:
arc4random_buf(buf, len);
no checks needed. it never errs.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
49413b7d6b
fix variable name
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
bd5fc60dd9
util/nvmutil: re-add fallback timer rand
...
for 1989
enabled via ifdef. not enabled by default.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
59b9215a97
util/nvmutil: remove arandom fallback on rand
...
openbsd 2.1 has arc4random, which we detect here.
arandom was apparently added much later, so this
is dead code. remove it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a3e3cdc057
util/nvmutil: rand: use getrandom on newer linux
...
we still fall back to the old /dev/urandom read
on older linux, via runtime detection (ENOSYS).
getrandom is better, because it guarantees entropy
via blocking, and works even when /dev/urandom
is unavailable.
it has the same practical benefit as arc4random,
which i use on bsd. linux can have arc4random,
but not every linux libc has it, so it's better
to use getrandom on linux.
older linux will fall back to /dev/urandom
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
bad5688ae9
util/nvmutil: buffered urandom reads
...
also generally tidied the code and made
it more robust e.g. retries
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
0e105e8135
tidy some comments
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1c210e3857
nvmutil: make tmpdir string much more random
...
more random characters
i added support for higher than the standard 6
characters so i can go nuts
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
113f2db37c
util/nvmutil: hardened mkstemp
...
200 retries, not 100.
and open with O_NOFOLLOW and O_CLOEXEC
check X on mkstemp
support more than 6 X in mkstemp
make PATH_LEN 4096
1024 is a bit low
make default mkstemp length 4096
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
7cc584fe0e
nvmutil: rename lseek_loop to lseek_on_eintr
...
that's what it does!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f4ea610014
nvmutil: rename x_i_close to close_on_eintr
...
that's what it does. waits for eintr to stop firing
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
d9f2aff95c
nvmutil: don't have finite eintr wait
...
this is technically incorrect. we don't control
faults in the hardware.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
81ac8eead9
nvmutil: rename x_i_fsync to fsync_on_eintr
...
that's what it does. waits on eintr.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
2ddb9019c8
util/rename: rename x_i_fsync
...
rename to fsync_on_eintr, because that's what it does
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
861cc85580
nvmutil: remove memcmp/memcpy/strrchr/rename
...
i had this idea in my head of later porting this
to k&r c for fun. but screw it.
compiling on everything since 1989 is enough
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1b82927843
util/nvmutil: tidy up includes
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
aff629f571
util/nvmutil: major cleanup
...
handle init in xstatus()
it's now a singleton design
also tidied up some other code
also removed todo.c. bloat.
will do all those anyway.
too much change. i just kept
touching the code until it
looked good
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
3010781df6
now remove the .empty files
...
but git still has these directories
in history now, so people should have
it now when cloning.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
c189c9c483
util/nvmutil: add obj dir to git
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
331a1af6df
util/nvmutil: add rule to create lib objdir
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a5a4e3d215
nvmutil: move lib files to lib/
...
only keep nvmutil.c in main
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
275f8e6f05
util/nvmutil: put objects in obj/
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
98aa88ad44
nvmutil makefile: use portable assignments
...
question mark respects environmental variables
but isn't portable
you can just pass as argument on the command line
question mark is more useful for build systems,
but i'm not really bothered. the old way works.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
0fea4f69e0
nvmutil: split nvmutil.c into multiple files
...
this is a big program now. act like it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a7fa5c3bf4
util/nvmutil: remove global variable x
...
make a singleton function instead
now there are technically no global variables,
so i can more easily start splitting this up
into multiple linked programs
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
411076b499
nvmutil: disable arc4random on obsd below 2.1
...
arc4random added in openbsd 2,1
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b60a243a87
util/nvmutil: initialise st in tmpdir
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
321b0ac07c
util/nvmutil: use strlen for tmpdir length
...
sizeof includes the null
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
3256c3fcb8
nvmutil tmpdir: check world-writeable / sticky bits
...
must be world writeable and not have sticky bits
a bit theoretical, but we're also reading TMPDIR,
which could be anything
due to how this is called, it defaults back to /tmp
if null is returned, so itt's safe
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
21cd0b7a91
nvmutil: fix modulo bias in mkstemp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
65ed83d2e7
util/nvmutil: limit EAGAIN/EINTR retries
...
set it really high though, so it's still
basically reliably
an EINTR/EAGAIN storm could cause problems
in prw()
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
232b069492
util/nvmutil: use real fsync
...
that function i added was a load of crap. it
worked, but it was a bit dumb, and crap.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1197d43923
nvmutil: don't disable blocking on random
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
7fd8869c20
re-add arc4random in nvmutil
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a3b8f1e8eb
util/nvmutil: remove randomness fallback
...
not secure. i'll just re-add arc4random
and use urandom as the fallback
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e3a007a8ae
nvmutil: don't read urandom fd if fd not open
...
yeah. obvious bug
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
cdce83d19e
nvmutil: new urandom fd every time (rlong)
...
otherwise, a stale descriptor could be manipulated
easily by an attacker over time
very theoretical to be honest
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a400409517
util/nvmutil: fix typo in unveil call
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
4260327edc
util/nvmutil: fix rlong static variables
...
whoops
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
5a9e5017ea
nvmutil: remove redundant srand call
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e57dc2efcb
nvmutil: remove redundant check
...
the actual cat function just writes to stdout
we need only check that the input is null, which
i've now done.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a3eeedf2d8
util/nvmutil: obsessively check null cmd
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
5b808d4f26
util/nvmutil: tidy up variables
...
where feasible, don't assign them at declaration
this is especially important for the next change
i'm working on
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f63837888c
stricter S_ISREG check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e087d2cf77
nvmutil: even stronger double-run protection
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
562dc92325
util/nvmutil: guard against running twice
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
bb6acae8f4
nvmutil: make commands check themselves
...
check yourself before you execute yourself
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1057bebce5
util/nvmutil: check file flags properly
...
masking O_ACCMODE tells you which flag it is
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
72dab46dbc
util/nvmutil: tighter pledge and unveil
...
call it sooner. set new_state afterward.
i had to uncouple nv from some functions
for this, and i also added some extra
checks especially at exit, about whether
to touch nv (whether it is initialised)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
6e6b1dd366
util/nvmutil: stricter work buf check
...
check it right after initialisation
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f5104c5893
79-character rule must be obeyed
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
182ea65774
util/nvmutil: fix comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
3871b60124
util/nvmutil: default to clang on make-hell
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
5d7e516e33
util/nvmutil: tidy up memcmp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
2fe71dfb90
nvmutil: add suffixes to makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
2457944d75
nvmutil: tidy up the makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
92580f0659
util/nvmutil: portable default make rules
...
older compilers might not have -std for example.
the code is portable, but old compilers can't
compile with just "make", you have to add lots
of flags
i will now use "make strict" and "make hell"
in testing, but otherwise make without flags
are fine.
move the current strictness to command:
make strict
added an extra command:
make hell
hell uses -Weverything, and is useful with
clang's strict testing, on which i only got
a very small number of errors (it's way less
than a lot of programs would get with this
flag, because -Weverything is REALLY STRICT):
ja, mich nvmutil$ make hell CC=clang
clang -I. -Wall -Wextra -pedantic -std=c90 -Os -Werror -Weverything nvmutil.c -o nvmutil
In file included from nvmutil.c:35:
./nvmutil.h:225:16: error: padding struct 'struct commands' with 1 byte to align 'rw_size' [-Werror,-Wpadded]
225 | unsigned long rw_size; /* within the 4KB GbE part */
| ^
./nvmutil.h:217:8: error: padding size of 'struct commands' with 4 bytes to alignment boundary [-Werror,-Wpadded]
217 | struct commands {
| ^
./nvmutil.h:235:8: error: padding size of 'struct xfile' with 4 bytes to alignment boundary [-Werror,-Wpadded]
235 | struct xfile {
| ^
./nvmutil.h:288:16: error: padding struct 'struct xstate' with 4 bytes to align 'xsize' [-Werror,-Wpadded]
288 | unsigned long xsize;
| ^
nvmutil.c:617:43: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
617 | _r = rw_file_exact(f->gbe_fd, f->buf, f->gbe_file_size,
| ~~~~~~~~~~~~~ ~~~^~~~~~~~~~~~~
nvmutil.c:626:43: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
626 | _r = rw_file_exact(f->tmp_fd, f->buf, f->gbe_file_size,
| ~~~~~~~~~~~~~ ~~~^~~~~~~~~~~~~
nvmutil.c:654:46: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
654 | _r = rw_file_exact(f->tmp_fd, f->bufcmp, f->gbe_file_size,
| ~~~~~~~~~~~~~ ~~~^~~~~~~~~~~~~
nvmutil.c:661:39: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
661 | if (x_i_memcmp(f->buf, f->bufcmp, f->gbe_file_size) != 0)
| ~~~~~~~~~~ ~~~^~~~~~~~~~~~~
nvmutil.c:702:23: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion]
702 | f->part_valid[_p] = good_checksum(_p);
| ~ ^~~~~~~~~~~~~~~~~
nvmutil.c:1045:21: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion]
1045 | f->part_valid[0] = good_checksum(0);
| ~ ^~~~~~~~~~~~~~~~
nvmutil.c:1046:21: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion]
1046 | f->part_valid[1] = good_checksum(1);
| ~ ^~~~~~~~~~~~~~~~
nvmutil.c:1170:45: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
1170 | (unsigned long)(p * (f->gbe_file_size >> 1)));
| ~ ~~~~~~~~~~~~~~~~~^~~~
nvmutil.c:1269:37: error: implicit conversion loses integer precision: 'int' to 'unsigned short' [-Werror,-Wimplicit-int-conversion]
1269 | return (unsigned short)f->buf[pos] |
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1270 | ((unsigned short)f->buf[pos + 1] << 8);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvmutil.c:1610:9: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
1609 | r = rw_file_exact(f->tmp_fd, f->bufcmp,
| ~~~~~~~~~~~~~
1610 | f->gbe_file_size, 0, IO_PREAD,
| ~~~^~~~~~~~~~~~~
nvmutil.c:1618:9: error: implicit conversion changes signedness: 'off_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
1617 | r = rw_file_exact(dest_fd, f->bufcmp,
| ~~~~~~~~~~~~~
1618 | f->gbe_file_size, 0, IO_PWRITE,
| ~~~^~~~~~~~~~~~~
nvmutil.c:1609:6: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
1609 | r = rw_file_exact(f->tmp_fd, f->bufcmp,
| ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1610 | f->gbe_file_size, 0, IO_PREAD,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1611 | NO_LOOP_EAGAIN, LOOP_EINTR,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1612 | MAX_ZERO_RW_RETRY, OFF_ERR);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvmutil.c:1617:6: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
1617 | r = rw_file_exact(dest_fd, f->bufcmp,
| ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1618 | f->gbe_file_size, 0, IO_PWRITE,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1619 | NO_LOOP_EAGAIN, LOOP_EINTR,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1620 | MAX_ZERO_RW_RETRY, OFF_ERR);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvmutil.c:1936:45: error: implicit conversion changes signedness: 'long' to 'unsigned long' [-Werror,-Wsign-conversion]
1936 | if (rv >= 0 && (unsigned long)rv > (nrw - rc))
| ~ ^~
nvmutil.c:2193:27: error: signed shift result (0x8000000000000000) sets the sign bit of the shift expression's type ('long') and becomes negative [-Werror,-Wshift-sign-overflow]
2193 | if (nrw > (unsigned long)X_LONG_MAX)
| ^~~~~~~~~~
./nvmutil.h:147:38: note: expanded from macro 'X_LONG_MAX'
147 | #define X_LONG_MAX ((long)(~((long)1 << (sizeof(long)*CHAR_BIT-1))))
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Makefile:42: hell] Fehler 1
in a future commit, i intend to fix all of these issues,
so that the code reliably compiles in hell-mode.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
ac0451c0b8
util/nvmutil: move asserts to header
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
611217e57e
nvmutil: extremely defensive CHAR_BIT test
...
this program needs bits to be 8
some obscure systems set it to something else
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
38022c5d47
util/nvmutil: add defensive buffer check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
400369b361
util/nvmutil: remove stale comment
...
and add another
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b6d176189e
util/nvmutil: fix randomness in mkstemp
...
i need to re-initialise r each time.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
4688dee7cb
util/nvmutil: split up copy_gbe
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
60a6d3861c
util/nvmuti: make fsync_dir() generic
...
yes, this begins the next phase of nvmutil:
remove global status in functions that should be
generic, and make functions that are not generic,
generic. make everything as re-useable in a library
as possible.
most of the program is error control, as it should
be, but much of it is mixed in with functions
that really should just be split up for libraries.
so that is what i'm now beginning.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
c1c49c3945
prototype for new_state() in nvmutil
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
50695c9fbd
util/nvmutil: split up nvmutil.c
...
i still use a global variable, but now only
one, which is a structure containing the
state of the entire program
now i can easily start modifying it to make
functions generic, and then i can start
making parts of it into easy libraries
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b1a51d7e5c
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
2703c9c938
util/nvmutil: start removing global state
...
for now still actually global, but i'm gradually
putting variables into a single global stucture
which will then allow me to make everything
local, which would then allow me to start
splitting up the program and modularising it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
292f504524
nvmutil: stronger entropy_jitter()
...
run it for a bit longer
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
464fb5c0d8
util/nvmutil: don't use strcpy
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
cf8cb4bdcc
util/nvmutil: check fd path in try_fdpath
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
ab8929808f
util/nvmutil: add bound check to x_try_fdpath
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
8911d2c1dd
another comment
...
it's a pretty insane hack. i should probably
just use normal fchmod
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
c6ae1d5ea2
comment
...
also improved the macro, making it stricter
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
6e6ab09cb0
cleanup (fix potential overflow in mkstemp)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
47a654a870
fsync_dir: abort if path length is empty
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
d0a125c16d
nvmutil: prevent theoretical overflow on time()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
28820d169c
also O_NOFOLLOW
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
1207b1bb72
util/nvmutil: dir fsync with O_DIRECTORY
...
guards against replacement attacks, on systems
that support this flag
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
ddb0bc314d
util/nvmutil: fix mkstemp randomness
...
i made the string longer, but forgot
to adjust it. the new random function
is also better
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b951ef2433
cast
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
251ba82ccb
util/nvmutil: more reliable fallback crypto
...
we assume the fallback will be rare, so now we
make the mix static and keep xoring it, on the
theory that the number of failures on urandom
will be random, and tthat the fallback may only
apply once or twice in thousands of calls.
the time jitter is adjusted; rather than judge
the difference between two points close to each
other in time, we judge tthe randomness in
difference of time elapsed. this mitigates fast
CPUs being very fast and introducing rounding
errors, and also improves performonce on much
slower CPUs
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
a575a47733
util/nvmutil: use real rename() syscall
...
i was being cute earlier, but the rewrite
defeats the purpose of atomic file handling
in nvmutil, by not actually renaming! it was
more like, doing an actual copy, which meant
that corruption is likely during power loss
i've commented the code because i may
use it in a library in the future.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
8e2921f1ce
nvmutil: harden against hardlink attacks
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
4871f4fda7
redundancy
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
0237c9c9c6
util/nvmutil: loop EINTR on fsync
...
this improves reliability, making it more
likely that data actually gets synced,
since fsync can return -1 with EINTR,
indicating that a re-try should be
attempted.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5ce5ac2994
pointer safety
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7b62a1653b
don't use PATH_MAX
...
unreliable
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1883325cd0
macro safety
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2b3966feba
util/nvmutil: portable S_IFMT
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7650ab051f
util/nvmutil: remove integer typedefs
...
better to just use standard names
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
445e96aefc
util/nvmutil: remove global statics
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
28a499e556
util/nvmutil: fix unveil usage
...
arandom probably isn't available on super old obsd right??????
rather, unveil isn't. on systems that have arandom
yet we should not unveil something that may not
exist on modern systems
just don't unveil arandom, and don't check arandom
if unveil is enabled
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
96dde65d16
util/nvmutil: proper /dev/fd search in fchmod
...
some systems may not even have it
works with /dev/fd (bsd/mac etc)
works with linux (/proc/self/fd)
and falls back on super old systems
that have neither
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
120241f1cf
util/nvmutil: tidy up makefile options
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
c46a634288
nope. put -Werror in the makefile
...
not compiling without it is a bug
don't let the default exclude it
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
71ce22a938
nvmutil makefile: define WERROR but blank it
...
settting it to -Werror is wrong, should set
it not -Werror.
however, put the WERROR variable in the make
command. that way, i could test with
make WERROR=-Werror
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
af40114be7
util/nvmutil: portable fchmod
...
and with that, now the code compiles on gcc
with -std=c90 -pedantic
with -Werror and -Wall -Wextra
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a0fd201b31
Revert "util/nvmutil: don't use fsync()"
...
This reverts commit bdb43afac6edef21a15f99b8c3beac01be8b86f7.
2026-03-26 06:59:41 +00:00
Leah Rowe
e6b53e8aed
util/nvmutil: longer string in mkstemp
...
have A-Z too, for more randomness
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ad5a4771bf
util/nvmutil: don't use mktemp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
f365969d34
util/nvmutil: don't declare libc prototypes
...
i no longer use -Werror
these can actually conflict on some weird
systems, so better just remove them
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5927c175df
util/nvmutil: portable memcpy/memcmp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
612783bc24
util/nvmutil: more portable close()
...
close may set errno to EINTR, which could
cause weird edge case behaviour in our
prw() functtion
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
26d8807b79
util/nvmutil: more secure tmpdir()
...
use stat instead of access (race conditions)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1ce06b01e0
util/nvmutil: fix O_NONBLOCK fallback
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
15cbafe20b
util/nvmutil: more secure mkstemp
...
try a few more times until success
explicitly return EEXIST when needed
we try multiple times and check more
thoroughly if a file exists, thus
reducing the risk of race conditions
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
24c4e715e6
util/nvmutil: more reliable TMPDIR handling
...
more portable
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0e0fcd5a81
util/nvmutil: don't use fsync()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4233f76fee
util/nvmutil: more portable functtions
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
64835e67fd
util/nvmutil: add portable malloc extern
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0043446f60
util/nvmutil: don't use size_t/ssize_t
...
not portable. some old systems don't have it,
or handle it very poorly
unsigned long is a reasonable way to refer
to indexes inside pointters
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a8fe2c79db
util/nvmutil: don't use SSIZE_MAX (not portable)
...
some old systems don't have ssize_t or size_t
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
6c37d2aa4b
util/nvmutil: typeset size_t explicitly
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ae43dc391f
util/nvmutil: run-time CHAR_BIT test
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ab806d2546
util/nvmutil: lower default PATH_LEN
...
older unix needed lower
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
9bdd91131d
util/nvmutil: portable struct timeval
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ea71010f85
util/nvmutil: portable S_ISREG
...
very old libc doesn't have it
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
6a898dff72
mktemp prototype
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ff458943c3
util/nvmutil: portable gettimeofday
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e9d90e8aca
util/nvmutil: use portable mkstemp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2a6a63fef3
util/nvmutil: better urandom portability
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
609076d98b
util/nvmutil: use local tmpfile on openbsd
...
if the global file is created on a different file
system than the gbe file, unveil would trigger an
abort trap, since we rely on created a second
temporary file, whose path we can't know ahead
of time.
i could get rid of unveil, or unveil a directory,
but neither is acceptable. just use localtmp on
openbsd. a temporary file is created next to
the gbe file, in the same directory.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
381b7e3abb
util/nvmutil: /dev/random fallback
...
now the custom fallback code is very unlikely
to ever actually be used, on any system,
except really old systems.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
d7dea02fba
add -I. to nvmutil makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5b8ea71bbd
re-add strict flags
...
i need these. can always turn them off
when running make if you need to
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e795e42f66
also remove -Wextra
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7f14693e6c
util/nvmutil: more portable Makefile
...
-Werror removed, for older compilers
actual warnings still there
-std is configurable now
e.g.
make CSTD=-c90
make CSTD=-c99
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
824fade5e9
util/nvmuttil: don't use arc4random
...
i have urandom again. it's enough
the fallback rand implementation
is used if needed
now i don't have to worry about any
weird version of unix from 1992 and
deal with weird hacks. in fact, with
this change, my code will probably
compile on irix now
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
04b215dd6d
util/nvmutil: re-enable urandom reads
...
i had to loosen the pledges for the new i/o
framework, which needs more permissions
as a result, i can now open urandom in
this function statically, rather than
in nvmutil's control logic
and because of that, it's less buggy now
arc4random is disabled on linux by default,
because it's not universally available
on all libc, and only since about 2022
in some glibc versions
better for portability to let linux users
justt use urandom
the new logic is different. now it falls
back to rand per-byte, but in practise
it almost never will.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b4b194f94c
util/nvmutil: remove arc4random on linux
...
linux only had it since 2022.
lots of people will complain if i leave this enabled.
not all libc have it either
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5d8b19fb75
util/nvmutil: fix cat
...
i simplified it in the last commits, but i sttill
need this loop to properly handle parts
otherwise yeah, all it's doing is copying a file
verbatim. duh.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
af7ab6f786
util/nvmutil: double-verify r/w using tmp files
...
we now read twice, verify the two, to make sure
one read isn't faulty
we operate on a tmp file, then rename back. this
reduces the risk of power cuts corrupting data
we properly verify the contents that we wrote
back
inspired largely by flashprog. i wanted to have
an insanely over-engineered and extremely safe
tool that edits intel gbe nvm files
and now i have one. the only one in existence.
i'm basically writing my own libc code at this
point, to be honest. i'll probably start puttting
these functions in libraries
e.g. that tmpfile generator
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1556ca7173
nvmutil: use O_CLOEXEC on gbe files
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0d6bb8d747
util/nvmutil: fix verified first, in prw loop
...
yes, because otherwise if the offset is still
wrong, we allow junk to be written. bad!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
31835eb8e3
set errno
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4b667f0d19
util/nvmutil: stricter return in pread
...
we were returning if verified is not off, but we
were not doing the check soon enough.
now it's clearer: just after either a reset,
or we found out offset doesn't match, we
return sooner.
otherwise, we read, and we verify again right
after. in the old code, we verified twice in
a row.
this is just more optimal, for error handling.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
572f00e7b7
no, break instead
...
in the last patch, i return, which then avoids
resetting the offset.
prw is very careful not to return early.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
d890a6b138
util/nvmutil pread: rw_over_nrw exit, not set
...
otherwise, if it's -1 and errno happens to be
EINTR or EAGAIN, we might loop on what is a
real error. this bug fixes that edge case.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7f192b4344
nvmutil: stronger race-condition check on prw
...
do it per read, in the fallback pread/pwrite
per read/write that is
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a050e5a563
util/nvmutil: fix theoretical buffer overflow
...
i already guard offsets in io_args, but it's best
to be thorough here.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
8d81e8f68b
util/nvmutil: prevent underflow in comparison
...
we already check before that rv is not negative,
and it starts at zero, but it's good to guard
it here just in case (for future re-factoring).
if rv is negative, it could convert (casted to
size_t) to a huge number (we don't want that).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
d148985e61
comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b09f52547f
util/nvmutil: extra race-condition check in prw
...
even with OFF_RESET, we still want some error checking.
if the check fails again immediately after, then it
suggests that another program really is modifying the
file, so we should stop.
the first check is done on the theory that another
program *was* working on it, but now isn't.
once again, this isn't perfect. use read pread/pwrite
if you need thread safety (and even then, you still
need to actually check your code)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
8c0946e9ba
util/nvmutil: safer xstrxcmp() - overflow fix
...
if a points to a buffer shorter than maxlen,
and the string is not null-terminated early,
the loop may read may overflow
e.g.
char buf[3] = {'a', 'b', 'c'};
xstrxcmp(buf, "abc", 50);
this is undefined behaviour, and a bug. C allows
reading past arrays only if the memory exists,
but we can't guarantee that
to fix it, we check the condition for return,
namely NULL character, before using the character
again. This avoids reading further from a multiple
times so we exit as soon as we encounter NULL
this also avoids multiple reads from memory, though
a compiler would optimise that anyway
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
02dcee0bf7
phrasing
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
66a9166004
util/nvmutil: stricter rw_gbe_file_exact
...
we repeat these stteps later, but it's still good
to be exact here. these lower functions can
change.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
210f17b9d7
cast
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7530881adc
comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2c66b813ef
util/nvmutil: stricter lseep_loop return offset
...
we currently reset just fine, but a partial success
where the previous offset is not the same as the
original should also be considered failure.
this patch therefore makes the return much stricter,
making the code return an error if this occurs,
which in nvmutil would then cause a program exit.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
00f92b33e1
util/nvmutil: only use srand on fallback rand
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0ff1cac40c
nvmutil: add missing check to io_args
...
accidentally removed this in a rebase
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4b69645c88
util/nvmutil: add flock to pledge promises
...
otherwise, gbe.bin locking won't work!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
46bbb4d8e4
util/nvmutil: tidy up io_args
...
i don't like it grouped together. do it
all separate, for clarity.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
402f5cacbd
util/nvmutil: tidy up err()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2d46837475
util/nvmutil: re-add io_args()
...
unified arg check for prw and rw_file_exact
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7263125d60
util/nvmutil: rw_file_exact: check inputs also
...
we check them in prw, but we used to rely
on prw because we called that first. no more.
it's correct to also check them here anyway,
in case i ever call another function here.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a89747a5c8
util/nvmutil: rw_over_nrw: err if nrw is zero
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
13006f2516
util/nvmutil: rw: safer bound check
...
avoid pointer-range overflow arithmetic. this
patch doesn't change behaviour, but makes an
overflow impossible.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
f0f2e03476
util/nvmutil rw: make off_reset a toggle
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
d62780948f
util/nvmutil: rw_file_exact: explicit casts
...
don't do it inside functions. some compilers may
be inconsistent, ditto several auditing tools.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1583947625
util/nvmutil: fix potential overflow in rw
...
off is signed, so converting that to unsigned
is better than converting rc (unsigned)
to signed. i had the right idea, but got
it wrong in the earlier version. this
should fix potential overflow issues.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e4802d4013
util/nvmutil: rw file: guard rc before addition
...
otherwise, it could still overflow
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
37526fc1c1
nvmutil: toggle for fd thread-safety err state
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1d4a57ab26
util/nvmutil: clean up pwrite/pread case
...
some unused variables if enabled. hide them.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
6d338e1fa4
util/nvmutil: partially mitigate fd offset race
...
our fallback pwrite/pread behaviour still does not
properly replicate the safety of real pwrite/pread
i intend to put this i/o code into a library for use
in other programs; nvmutil is single-threaded so
this change is largely redundant (but can't hurt)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
291c8a9a8b
util/nvmutil: tidy up rw_file_exact
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fe9900e7a1
comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a78e156346
util/nvmutil: cleanup
...
remove ptr casts to ulong. size_t is better.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4558993df4
nope, use size_t
...
despite my cast, size_t is better for mem index
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ddd300493b
util/nvmutil: use ulong on ptr casts
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2de5c6332e
util/nvmutil: remove rw_file_once
...
we don't need it anymore.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
3b9761fbed
util/nvmutil: move looping logic to rw_file_exact
...
rw_file_once was doing what rw_file_exact should be
doing
_once does what it says: once
we were passing an offset (rc) to it that it was not
meaningfully using.
this makes the code now more robust, especially if
we later swap out or break _once - then we don't
get weird behaviour (if there is a regression).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
c825d80198
nvmutil: move increment logic to rw_file_exact
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4a3951a4d9
nvmutil: fix redundant check
...
we already check not-zero in the next if
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a3354d2598
util/nvmutil: cast gbe file size on ptr cmp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1606f79c74
util/nvmutil: even safer pointer comparison
...
we assert now that ulong is the size of a pointer,
therefore we know that it can fit a pointer reliably.
this code is written for c90 spec so lacks uintptr
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b88c81869b
util/nvmutil: safer pointer comparison
...
technically we're never supposed to do arithmetic on
pointers (there's uintptr for that)
very anal fix
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5b4168c763
util/nvmutil: enable arc4random on linux
...
not available on older systems. can just pass
the relevant flag in the compiler:
HAVE_ARC4RANDOM_BUF=0 at build time if you need
the fallback.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
8ccdde57e1
util/nvmutil: re-add arc4random
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
94632f3394
util/nvmutil: 5 retries, not 10
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
3c42608d6d
util/nvmutil: check if gbe.bin is seekable
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5f6038af5d
util/nvmutil: check inode during post-verify
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
30e953dc8f
util/nvmutil: warn about gbe.bin hard links
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b8246acf19
util/nvmutil: guard file replacement attacks
...
i already also guard other toctuo attacks :)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e162d63ae6
util/nvmutil: guard against unlinking file
...
if someone deletes gbe.bin while operating, nvmutil
will now abort
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7eadaf2894
util/nvmutil: don't use /dev/urandom
...
too over engineered and cumbersome.
the new security in prw() makes it brittle,
and i'd rather not move checks outside of it.
the fallback rand is random enough.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
64389b696b
util/nvmutil: fix file check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
c5c629d776
util/nvmutil: fix cast check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ec98e3143c
util/nvmutil: more aggressive file checking
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b231e28c93
util/nvmutil: prevent overflow in rw_file_exact
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
9ca9b54828
util/nvmutil: verify final offset in pwrite/pread
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b86f415a3e
util/nvmutil: check regular file in rw_file_exact
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
d34552b400
util/nvmutil: fix if (PWRITE)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0612798ecf
util/nvmutil: don't check o_append in prw
...
slow, per call. prw should be generic.
do it just for gbe files, once
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
026cbacbe2
util/nvmutil: configurable eintr/eagain
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2eb045927b
util/nvmutil: configurable retries/pread
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
72365f6447
util/nvmutil: support real pwrite/pread
...
build flag
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
c27dedfeea
util/nvmutil: better commented I/O functions
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
33fa991141
util/nvmutil: make eintr/eagain setup clearer
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
caebecf6c6
nvmutil: fix rval in close_files
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0867507fc8
util/nvmutil: don't check write checksums on partial
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
3fba84ad95
util/nvmutil: don't recurse err/close_files
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
897c7490b5
util/nvmutil: restore pad before reading to it
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
bae8999b80
util/nvmutil: don't show checksum on bad pwrite
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
6c29a07ca0
util/nvmutil: always restore saved errno
...
the last lseek there is only there to reset
state, so its errors are irrelevant.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a12f502af8
util/nvmutil: post-write verification report
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2f80ac76ae
util/nvmutil: optimise fsync / write check
...
write all at once, then sync all at once,
then verify all at once.
this increases the chancce that all data
gets written first, in the case of power
less, because fsync may take a while on
some systems.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7c73218438
util/nvmutil: set EIO on bad memcmp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
3f17cd3ebc
util/nvmutil: split up rw_gbe_file_part
...
the post-verification stage deserves a function
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
df18e65835
util/nvmutil: detect partial gbe rw
...
we already covered this in prw() which is
what ultimately gets called, but still.
it's logically correct not to check it here.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fe16b79537
util/nvmutil: verify gbe contents after writing
...
read it back and check. sync to disk first.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ce13599b99
util/nvmutil: consistent types
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
637d9a09c0
util/nvmutil: handle zero return in rw_file_exact
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0cceb58867
util/nvmutil: rename lseek_eintr
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
8a7d73c223
util/nvmutil: fix lseek eintr err check
...
it should be is equal, not not equal
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
100cb2014e
util/nvmutil: rename err_eagain() to try_err()
...
makes more sense in code
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b345caa25c
util/nvmutil: make EINTR configurable in prw()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4a5a3bae45
util/nvmutil: tidy up prw()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fe959f9fb8
util/nvmutil: extra overflow check in prw
...
compliant posix systems should never meet this
check, but i put it here.
spec != implementation
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b60c42dcd0
util/nvmutil: extra overflow check in prw
...
do it at the very end
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
742b39be8c
util/nvmutil: handle EAGAIN in prw()
...
the cat function can be greatly simplified
handle it conditionally, because not all
functions should use it
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7e8f375d9a
util/nvmutil: split up rw_file_exact
...
move the gbe-specific parts out of it
what remains is a relatively generic
function; a very conservative implementation,
wrapping around libc functions but with
a few additional safety checks.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e71f977468
util/nvmutil: add negative off check to prw
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fb57cedded
util/nvmutil: also do libc check on normal io
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2a83a8ec43
util/nvmutil: properly reset lseek on error
...
don't return. set r instead. this will fall through
and return the same way, but with proper reset.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
935d082a51
util/nvmutil: move libc check to prw()
...
this still gets done from rw_once, but
it's generic enough that we want it in
our prw() wrapper function.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
07fa9bbc1f
util/nvmutil: remove io_args()
...
most of it can be done in rw_file_once
truly general checks have been moved to prw(),
so that the function is more general purpose.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4bb64c8d37
util/nvmutil: move EINTR handle to prw()
...
this way, we now have a universal function
that is reusable elsewhere, with the same
redundancy. the rw_once and rw_exact functions
still get this redundancy, through prw
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
223932c5f8
util/nvmutil: simplify i/o
...
we can just fall through to nrw and decide
what function ta call there - either read/write
immediately and return, or fall back to the
portable positional implementation.
this also means we don't have to call io_args
in every function, since everything now runs
through prw()
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
8071d7eaa8
util/nvmutil: cast rnum pointer check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
74077f9903
util/nvmutil: allow ushort to be 32-bit
...
no need to limit it here
rename ux to uint. no number specified.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
4c0ec27b4e
util/nvmutil: fix int assert
...
it can be higher than 32-bit, it's fine
the current check breaks some newer systems
accordingly, u32 becomes ux, x meaning x bits
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
dc6df36fe5
util/nvmutil: more asserts
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
23fee345fd
util/nvmutil: nicer typedefs
...
now that i'm not using stdint, i can use sane
typedef names
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
9cfae27bf4
util/nvmutil: remove stdint feature macro
...
and remove stdint
i don't need it. i typedef these ints myself
and i assert their size
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
888107764d
util/nvmutil: safer offset check (use subtraction)
...
don't allow overflows
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
abc484713a
util/nvmutil: check null pointer in io_args
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e1cd978f01
util/nvmutil: check overflow in io_args
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5f8593b581
util/nvmutil: fix offset validation
...
i didn't take into account partial writes, in io_args
this fixes it
unfortunately, this means i have to loosen the offset
check a bit, but it's fine
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
6ad09f55e0
util/nvmutil: restrict pointers in io_args
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
8e555f444c
util/nvmutil: check gbe file type before write
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
47936f52e9
util/nvmutil: check gbe file size before write
...
re-check. very unlikely since the program doesn't run
for very long, but we have to check if the file has
changed. this is a basic check of file size.
we could probably check the contents too, but that
would be overkill.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
551470cf6f
util/nvmutil: lock gbe file
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
afcdae1350
util/nvmutil: don't allow symlinks
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
98466398f9
nvmutil: fix bound check in last commit
...
i was fixing the size, but it should be calculated
properly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e44b297db5
util/nvmutul: remove unused arg in io_args
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
83f67bf02a
util/nvmutil: block bad offset in io_args
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
14ab4c1b25
util/nvmutil: stricter i/o arg checks
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
386f715a29
util/nvmutil: stricter i/o length check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
d8be79432c
util/nvmutil: rename len to nrw in i/o
...
consistent with prw()
i prefer nrw (number of rw operations)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5ece694e67
util/nvmutil: tidy up prw()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
3e08c0724b
util/nvmutil: block O_APPEND in prw()
...
O_APPEND allows writes at EOF, thus breaking
positional read/write
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
7836a2bbc6
util/nvmutil: stricter i/o errors
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
0c9bcaaba8
util/nvmutil: fix entropy issue
...
the time difference used here could go negative, which
would overflow in the xor op on mix, leading to a biased
entropy pool. we want to ensure that they numbers do
not overflow, because here they are cast to unsigned
which would then produce very large numbers.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
475c50932e
nvmutil: cast integer in printf
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
6f26bd5db7
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1abc40997f
util/nvmutil: check defines/enum via assert
...
not at runtime
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
435b67327e
util/nvmutil: r_type check in rw_gbe_file_part
...
i already send the right arg anyway. this is a
preventative bug fix against future maintenance.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
54536b0454
util/nvmutil: remove pointless check
...
already checked below, then err()
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
f99921d717
util/nvmutil: add missing cast
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
ddf13a7e74
util/nvmutil: err in rw_file_exact on zero return
...
zero never occurs, because rw_file_once never returns zero,
but only rw_file_once determines that. rw_file_exact must
handle every possible error.
right now, if that call returns zero, rw_file_exact would
have an infinite loop.
this doesn't actually happen at the moment, so this is a
preventative bug fix.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a0ca693d42
util/nvmutil: increment rc at end of rw_file_exact
...
for fussy static analysers and/or compilers
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1dbd679c0c
util/nvmutil: further tidy up prw()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
e239a3107f
util/nvmutil: clean up i/o functions
...
properly verify the value of the arguments, with
asserts.
add simpler runtime checks in-function, on prw,
rw_file_once and rw_file_exact.
variable names in english now, and the code is
cleaner, while being functionally equivalent.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
347e39bab7
util/nvmutil: further tidy up rw_file_once
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
b4154dd29b
util/nvmutil: minor cleanup: rw_file_once
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
a85f2898e2
util/nvmutil: remove dead code
...
useless check. will never be true.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fdd99a9a45
util/nvmutil: remove pointless comment
...
itt's totally obvious
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
5f6a721fa0
util/nvmutil: reduced indentation in rw_file_once
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
172cbd4497
util/spkmodem-decode: add CHAR_BIT define
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
273bd992dd
spkmodem-decode: edge detection *and* amplitude
...
for pulses, we currently use amplitude detection.
edge detection is better, because weak / low gain
signals will be more reliable. if audio is coming
in on/from a system that does automatic gain
adjustment, this once again is more robust too.
microphones and speakers (which people often use
with spkmodem if nothing else available) often
clamp amplitude, to an extent that this software
may not detect those pulses reliably that way.
so we detect slope edges instead. this causes
very little performance penalty (use of abs(),
that's about it)
however, edge detection is inherently vulnerable
to noise, so we will also detect amplitude. this
acts as an effective noise filter, while still
improving pulse detection.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
2aa1ccfd8a
spkmodem-decode: reset calibration accumulators
...
in select_separator_tone, i never reset these
after computing their average.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fd94bff968
util/spkmodem-decode: remove dead code
...
this check no longer applies (never triggers)
is_signal_valid already guarantees that the separator
tone is valid.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
1b73308c51
spkmodem-decode: small cleanup in decode_pulse
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
cad667faee
spkmodem-decode: don't select sep tone on bad signal
...
otherwise, calibration could collect garbage data.
this improves noise mitigation.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
15079d02bd
spkmodem-decode: ignore invalid frames when setting bits
...
bits are currently assembled even on invalid frames. this
patch fixes that - the bug is also in the GNU version.
this reduces the chance of noise/calibration from creating
corrupt character output during operation.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
3245333c53
spkmodem-decode: reset char if separator disappears
...
improves reliability in the case when audio cuts out,
mic glitches, laptop audio power saving, etc.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:41 +00:00
Leah Rowe
fe6da7a238
spkmodem-decode: fix single-tone learning bug
...
enforce at least two tones. this mitigates the
chance of random noise being treated as a real
tone, and reduces the chance of broken
thresholds versus freq min/max e.g.
freq min 31, max 32 and threshold 31
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
9e94cc017a
spkmodem-decode: enforce calibrated seperator range
...
we weren't actually using what we calculated. this patch
fixes that, thus preventing random noise / microphone
clicks, random artifacts and such from being treated
as real frames (the purpose of is_valid_signal is
partly noise suppression).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
9d24b78340
spkmodem-decode: fix wrong sample count
...
in handle audio, i do the number of samples
per frame, and one more. e.g. 241 instead of
240. this bug is in the original GNU version
too. this patch fixes it.
this means that the output could slowly go
out of sync with calculated timings. the
patch fixes that. in practise, the decoder
is not that sensitive, and the code would
adjust anyway (automatic timing adjustment),
but ideally we want to not *cause* such
issues even if we mitigate them.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
8085de594b
Revert "util/spkmodem-decode: fix 3-frame timeout"
...
This reverts commit dbf0c3ccc2 .
2026-03-26 06:59:40 +00:00
Leah Rowe
1d0e44c23a
util/spkmodem-decode: clarify frame count on check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
a049f2df39
util/spkmodem-decode: static asserts
...
assert integer sizes, important in this program because
we make several implicit assumptions about word sizes,
and integers need to be of a certain size.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
681f580053
util/spkmodem-decode: annotate prototypes
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
7c88154cd2
util/spkmodem-decode: rename function for clarity
...
collect_separator should be select_separator, to bring
it in line with select_low_tone
this just makes the code a bit easier to read
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
fff2447606
util/spkmodem-decode: tidy up indentation
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
6ed722b73b
fix typo in comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
4fff5121e8
util/spkmodem-decode: fix 3-frame timeout
...
i accidentally left this reset here during a
previous refactor.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
feb69bd946
util/spkmodem-decode: rename auto_detect_tone
...
auto seems redundant. detect implies auto.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
402e0ca7cc
spkmodem-decode: learn tone per frame, not sample
...
the fir filter produces stable frequencies per frame,
but learning per sample (within a frame) means we
record the same value roughly 240 times.
here, we are syncing up at just the right moment
instead, and only at that moment, this increasing
both performance and reliability.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
84b0b8a543
spkmodem-decode: fix learn_samples increment
...
oops!!!
another mistake during refactoring. right now it
doesn't increment before being checked, so learning
can go forever in an infinite loop
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
011c65ddf4
spkmodem-decode: don't dump learn_samples in silence check
...
oops
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
a5d40166ce
util/spkmodem-decode: split up auto_detect_tone
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
68fb740da2
util/spkmodem-decode: separate silence check
...
i conflated two separate tests in a previous change.
the silence check was defeated by still checking f
alongside it, which would be set, thus satisfying
the condition, and proceeding, which defeats the
purpose of the silence check (ignore false signal
that is actually noise) - so in the original patch
that i wrote, the extra checks actually do nothing.
this patch fixes that, and makes the logic a bit
clearer.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:40 +00:00
Leah Rowe
4dc39990e1
util/spkmodem-decode: don't run decode in col_sep_tone
...
otherwise, it runs twice
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:39 +00:00
Leah Rowe
7e29d53667
util/spkmodem-decode: guard against silence in tone-detect
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:04 +00:00
Leah Rowe
a81dde3d08
util/spkmodem-decode: split up handle_audio()
...
this enables the separated code to have reduced
indentation
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:02 +00:00
Leah Rowe
e8d46de0e1
util/spkmodem-decode: also auto-detect separator
...
the tone detection currently only tracks data, not
the separator. track both instead, for improved
detection reliability.
e.g.
separator tone e.g: 9
data low tone e.g: 18
data high tone e.g: 24
two fir windows produce e.g.
freq data 9 sep 0
then 18, 9
then 24, 9
18, 9
so we take min(data, separator)
that gives 9,9,9,9
now we have the separator cluster
however, if both windows are active during transitions,
you can also capture the higher clusters, which would
allow freq_max to grow
so when you learn e.g.:
freq min = 9
freq max 24
then the learned threshold would be:
(9 + 24) / 2 = 16
and now you know how to separate the tones
fir already suppresses noise so the pulse should
be reliable. so freq/sep only go non-zero when an
actual tone exists
this should now result in being able to sync with
spkmodem encoders with no prior knowledge of the
correct tone frequences. we just use maths.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:58:19 +00:00
Leah Rowe
745e888edf
util/spkmodem-decode: simplify valid_signal
...
since we have auto-detection now, we only need to know
that two signals exist, not that they are valid, since
the auto-detection now handles validation and fallback.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:58:19 +00:00
Leah Rowe
5b4c3c537e
util/spkmodem-decode: automatic tone detection
...
a continuation of the previous patch. this waits for
currently one second, before defaulting to the hardcoded
value. otherwise, it tries to use whatever timing it
gets automatically.
this way, the program should now reconfigure its own
timing, without intervention by the user, if the timing
differs from sensible defaults.
this is because spkmodem is implementation-defined;
it's just however coreboot and/or GRUB happen to set
it up, and on the hardware in question.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:58:19 +00:00
Leah Rowe
78b71f867f
util/spkmodem-decode: automatic tone calibration
...
current logic is hardcoded, as in the original spkmodem-recv.
with this change, small differences are observed and averaged,
then the detection thresholds are adjusted accordingly.
the existing macros serve as a baseline, but real signals
differ. with this change, we therefore account for possible
drift in timings, which can change in real-time; the old
code could possibly get out of sync beccause of that, which
may have resulted in corrupt characters on the screen. this
change therefore should make the output a bit more stable.
the detection window is continually adjusted, so that the
output timings don't drift.
the tolerances are automatically adjusted based on base
timings (see new define in patch)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:58:16 +00:00
Leah Rowe
d03f80b893
util-spkmodem-decode: tidy up print_stats
...
make the frequencies clearer in printf
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
4f26620e88
util/spkmodem-decode: do getopt first
...
much cleaner. do it right after zero-init memset.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
a0c8fd519e
util/spkmodem-decode: init argv0 before pledge
...
otherwise, it'll be empty/undefined
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
a60be4028a
util/spkmodem-decode: frequency meter in debug
...
useful timing now displayed
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
6eff58aa7d
util/spkmodem-recv: reset char precisely on timeout
...
instead of when it goes above, do it precisely on the
timeout. otherwise, if by sheer chance the signal
pauses and we reset the byte - sure, ok, but it's a
bit tight and we run the risk of advancing another
frame, depending on the timing.
this is a minor edge case, probably rarely ever
triggered in practise.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
30d5ca5146
rename util/spkmodem-recv to spkmodem-decode
...
it's no longer resembling the original util at all,
so a rename seems indicated. yes.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
a31cfa4592
add missing star
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:05 +00:00
Leah Rowe
cefae03502
util/spkmodem-recv: extensive commenting
...
and with this, i'm now pretty much done modifying grub's
crappy code. this experiment started in 2023 has now
pretty much concluded.
the original GNU code was poorly written, hardcoded
everywhere, and not documented or commented at all.
i had to learn what the code is doing through inference
instead, and i'm pretty sure that these explanations
cover everything. i hope?
maybe the frenchman can explain anything i missed. haha.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:49:01 +00:00
Leah Rowe
78d583e5ec
util/spkmodem: explain what the defines are
...
and calculate some of them instead of hard coding
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:47:55 +00:00
Leah Rowe
2a32e498c8
useful comments
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 20:06:23 +00:00
Leah Rowe
8ccaff0d8e
util/spkmodem-recv: also cache sep_pos in decode
...
yet another optimisation for weaker compilers - but
some modern compilers may not optimise well for this
code either.
this reduces the amount of references to the struct,
which is very expensive (48000 times per second) on
very old CPUs.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 19:57:24 +00:00
Leah Rowe
9f41591a46
util/spkmodem-recv: optimise decode_pulse
...
the frame[] array is never actually used meaningfully.
that setting of frame[ringpos] on the decode_state is
only set here, but then the value isn't really used at
all. the entire size of the annay is used for sizeof
in print_stats, but then we can just declare that
manually. since we also know that this value never
changes, we can use a global define for the sizeof entry
in print_stats, thereby simplifying operation further
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 19:54:52 +00:00
Leah Rowe
a7c69c3233
util/spkmodem-recv: clean up decode_pulse
...
make it easier to read by clearer variable naming.
this change also reduces memory accesses (fewer struct
dereferences - see: struct decoder_state), when using
much weaker/older compilers that don't optimise
properly. this, in the most active part of the code,
which is called.... 48000 times a second. peanuts on
modern CPUs, but on old (early 90s) CPUs it makes a
big difference.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 19:34:44 +00:00
Leah Rowe
3633878e1f
util/spkmodem-recv: byte swap on big endian CPU
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 19:09:58 +00:00
Leah Rowe
594a5a02cd
util/spkmodem-recv: remove errno define
...
may break on modern systems (macro)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 18:45:32 +00:00
Leah Rowe
9375ecc6a4
add endianness check to spkmodem-recv
...
a bit dirty. should handle this at runtime.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 18:37:11 +00:00
Leah Rowe
f7fc5b1651
util/spkmodem-recv: properly handle stdin err
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 18:34:43 +00:00
Leah Rowe
22af92b473
another correction
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 18:25:34 +00:00
Leah Rowe
5b92b00bad
util/nvmutil: fix regression on openbsd
...
when i removed arc4random integration, i forgot
to change this line back. oops!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 18:23:17 +00:00
Leah Rowe
1cce4871e2
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 17:55:54 +00:00
Leah Rowe
cde28a8fbb
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 17:52:05 +00:00
Leah Rowe
08b9595bc5
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 17:31:25 +00:00
Leah Rowe
ab9ee73350
util/nvmutil: mitigate buggy libc i/o
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 16:34:33 +00:00
Leah Rowe
303c382eae
util/nvmutil: implement zero-byte r/w timeout
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 16:24:36 +00:00
Leah Rowe
9656e78c3a
TODO
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 16:16:09 +00:00
Leah Rowe
571c474866
util/nvmutil: add some useful comments
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 16:10:28 +00:00
Leah Rowe
1fb720e1e6
util/nvmutil: split up rw_file_exact
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 16:03:17 +00:00
Leah Rowe
48f124a2e8
fix indentation
...
i was editting this in another editor
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 15:34:10 +00:00
Leah Rowe
f04b796dcc
util/nvmutil: add jitter to fallback_rand entropy
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:36:01 +00:00
Leah Rowe
38c3889f67
util/nvmutil: improved entropy in fallback_rand
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:32:46 +00:00
Leah Rowe
1cee54ee2b
util/nvmutil: remove /dev/random fallback
...
only use the old fallback, or /dev/urandom
/dev/random blocks on some older unix machines,
or in embedded environments that may never
have enough entropy, causing the code to hang.
urandom is most certainly expected to exist on
pretty much anything since the mid 90s.
i could probably re-add the arc4random setup
for BSDs. i'll think about it. gotta do that
portably too.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:26:54 +00:00
Leah Rowe
1ad9ffb482
util/nvmutil: include time.h after types.h
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:16:11 +00:00
Leah Rowe
922344e81e
util/nvmutil: mitigate fast calls to rand
...
if someone calls rhex fast enough, the timestamp
may not change. this mitigates that by adding
a counter value to the mix
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:13:55 +00:00
Leah Rowe
53c5a40007
util/nvmutil: fallback randomiser
...
used when a random device isn't available, on old
unix, or on certain chroot environments.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:10:29 +00:00
Leah Rowe
5ba0b98fbc
util/nvmutil: correct install usage
...
one for directory, then copy the binary
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 14:01:24 +00:00
Leah Rowe
35ba3aef91
util/nvmutil: fix makefile
...
forgot to include the binary in the path
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:56:47 +00:00
Leah Rowe
af1a219e40
util/nvmutil: remove errno extern
...
may break modern systems. and all old systems that
i care about will handle errno just fine.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:54:04 +00:00
Leah Rowe
8269b05a63
util/nvmutil: use install -d instead of mkdir -p
...
-p isn't portable
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:53:02 +00:00
Leah Rowe
e931f66b99
util/nvmutil: fix comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:48:53 +00:00
Leah Rowe
fe630cba5e
util/nvmutil: use chmod instead, in Makefile
...
yeah, why not use a tool that's been around since the
80s?
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:43:20 +00:00
Leah Rowe
478c994f34
util/nvmutil: add -m to install on Makefile
...
also support LDFLAGS
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:42:12 +00:00
Leah Rowe
ea4deb98b5
util/nvmutil: simplify flags on urandom
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:31:35 +00:00
Leah Rowe
55e071c381
util/nvmutil: fix mistake in random check
...
forgot this. oops
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:28:18 +00:00
Leah Rowe
a9e5f9ef4f
util/nvmutil: portable errno
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:25:35 +00:00
Leah Rowe
87b74aadbc
util/nvmutil: fix non-portable variable declaration
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:22:30 +00:00
Leah Rowe
1184dcb05c
util/nvmutil: disable urandom if not found
...
disable random mac address generation on really old
operating systems.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:21:03 +00:00
Leah Rowe
74f2d9a1f3
util/nvmutil: use ECANCELED on checksum err
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 13:10:10 +00:00
Leah Rowe
a40d14fcd6
util/nvmutil: don't use errno for program state
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 12:52:22 +00:00
Leah Rowe
a4f5061297
util/spkmodem-recv: code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 07:13:42 +00:00
Leah Rowe
2479633368
util/spkmodem-recv: optimise pulse check
...
the last change was good, but this code, again,
has to do these calculations 48,000 times a second.
trivial on new computers. but now try it on a
computer from 1992.
we should try to make this as fast as possible :)
older compilers especially don't optimise these
checks. this patch shifts it to one subtraction and
one unsigned comparison, rather than checking less
than or greater than both. often used in... literally
exactly this type of program.
on a good compiler this will compile to an add, cmp
and conditional jump.
less readable, but the results (set 1 or 0) make it
pretty obvious what it does, after a few seconds.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:31:44 +00:00
Leah Rowe
e23cecb496
util/spkmodem-recv: clearer pulse decoding
...
i turned this into abs() call earlier, but this isn't
obviously readable by some people.
make it absolutely clear what this does. also reduces
use of syscalls.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:28:34 +00:00
Leah Rowe
1d2ee1cabc
util/spkmodem-recv: say what freq_sep/data are
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:25:24 +00:00
Leah Rowe
fcecb1229e
util/spkmodem-recv: add a usage function
...
replace the err call in getopt
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:22:25 +00:00
Leah Rowe
69fb0618cc
util/spkmodem-recv: tidy up the getopt loop
...
more knf-compliant
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:20:09 +00:00
Leah Rowe
65a6205dab
util/spkmodem-recv: allow short sample reads
...
fread() may return short reads, whereas the current
code assumes either EOF or a full read.
change if to a while. really, it's that simple.
just loop until it's done. i probably b0rked this
myself when refactoring the GNU code.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:17:09 +00:00
Leah Rowe
59f04eba9e
util/spkmodem-recv: don't exit in print_stats
...
i treated ftell errors as fatal, but if fttell fails
with ESPIPE, and someone's using -d, the program may
exit immediately, even though there's no problem.
instead, skip printing the offset (basically no debug).
this fixes a bug that i introduced myself, when i forked
this code, because i added that error check; the GNU
code didn't have any check whatsoever.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:13:44 +00:00
Leah Rowe
9ac0331595
util/spkmodem-recv: buffer calls to fread()
...
we currently read small amounts of data with fread,
repeatedly, which is quite taxing on the CPU, on
very old systems.
48khz audio. 48000 calls to fread() per second?
yeah. let's optimise this.
performance now should be roughly O(1) in practise.
this and the other recent changes means no modulo
or division, reduced branching, memory memory roads,
and lots of buffering.
the buffering here is quite conservative, so the human
won't notice any difference. we're cutting the number
of times we call fread by a factor of several thousand,
but you'll still see text scrolling down pretty quick,
with minimal lag.
the old GNU code i forked was terrible at this.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 05:08:44 +00:00
Leah Rowe
2c3d0b5a3e
util/spkmodem-recv: make new pulse calculation clearer
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:59:42 +00:00
Leah Rowe
62a496ec9e
util/spkmodem-recv: tidy up pulse decoding
...
make it clearer about next/old, in the loop. this also
improves performance on older systems (cache the values
first, don't re-calculate)
again, this is GNU code. but you wouldn't know it, in my
current version. i forked this from GRUB several years
ago and started cleaning it for fun.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:55:18 +00:00
Leah Rowe
1953812efd
util/spkmodem-recv: split up handle_audio()
...
the signal check should be its own function,
for clearer understanding
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:53:05 +00:00
Leah Rowe
a31ccd8c3d
util/spkmodem-recv: tidy up handle_audio
...
frame handling, error checks, pulse decoding and
character decoding are all jumbled up. this patch
separates them a bit, making it clearer.
should also help codegen. this tool is dealing with
high bandwidth text, which on slower computers may
be cumbersome. every optimisation counts.
not really relevant on newer systems.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:49:03 +00:00
Leah Rowe
44c6b453bc
util/spkmodem-recv: optimise ring buffer pos calc
...
instead of computing next every time, just advance
two indexes. another performance optimisation on
older machines, especially old compilers, because
it reduces the amount of logical branching.
the old code was pretty much just advancing two
indexes in lockstep, when getting the next pulse,
but recalculating one of them based on the other,
each time.
this is yet another hangover from the old GNU code
that i forked three years ago.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:44:44 +00:00
Leah Rowe
54936a45a5
util/spkmodem-recv: don't use modulus on decode
...
it's slow on older compilers/systems that don't optimise.
instead, we branch (cheaper) and just do an above or
equal comparison), resetting appropriately or subtracting.
should yield an actually useful performance gain, on older
systems. a bit theoretical on modern systems, which optimise
well (modern compilers will produce assembly code much like
what the new C code is doing)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:39:00 +00:00
Leah Rowe
19e0249a8a
spkmodemrecv makefile: add -c to install
...
a bit pedantic. but that's my intention.
for backwards compatibility with older systems.
this flag means: create the directory. on modern
versions on all systems, it's the default behaviour.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:36:29 +00:00
Leah Rowe
72eed0b12c
util/spkmodem-recv: further portability / cleanup
...
i used a bunch of global variables. that's gone.
added proper externs, including for errno. lots of
old unix systems require this. this version should
be perfectly polished and portable now.
all status is now handled in a struct, making the
code a bit easier to understand, because the variables
now are clearly pertinent to the state of the decoder,
rather than being seemingly random.
some indentation reduced.
also cleaned up ftell/feof usage again. the new code
is a bit more robust when dealing with piped input(which
is literally what this program takes, exclusively)
i started my cleanup of this tool from GNU GRUB in 2023.
i finished it today.
also the Openbsd pledge is more portable now (code made
to compile on pre-pledge openbsd as well)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-12 04:30:40 +00:00
Leah Rowe
bbb8825553
util/nvmutil: further clean up decode_pulse()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:40:34 +00:00
Leah Rowe
42cad20ffd
util/spkmodem-recv: tidy up frame decoding
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:34:43 +00:00
Leah Rowe
bf9c4a67f8
util/spkmodem-recv: handle fread errors
...
also handle EOF condition and exit cleanly.
don't use dirty feof.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:30:22 +00:00
Leah Rowe
9195ff97b7
util/spkmodem-recv: fix getopt prototype
...
i use -pedantic and std=c90
also add the define
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:25:50 +00:00
Leah Rowe
62c0cc68c5
removed some unnecessary things
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:14:51 +00:00
Leah Rowe
361dbef41c
another fix
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:13:33 +00:00
Leah Rowe
7af3015a89
tiny fix
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 23:12:27 +00:00
Leah Rowe
6962404ce5
util/spkmodem-recv: portability and code cleanup
...
borrowing recent improvements from nvmutil
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-11 22:39:16 +00:00
Leah Rowe
977c83873e
util/nvmutil: re-use do_rw() from prw()
...
using a special leah-only technique
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 18:20:47 +00:00
Leah Rowe
5f8fe4fdc3
util/nvmutil: add missing sanitization tests
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 17:17:39 +00:00
Leah Rowe
48f65abb01
util/nvmutil: properly use rc in rw_File_exact
...
subtract and add iteratively
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:57:46 +00:00
Leah Rowe
9eb3895f4e
util/nvmutil: tidy up gbe_cat_buf()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:52:38 +00:00
Leah Rowe
69cf4fe6ed
util/nvmutil: split up rw_file_exact()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:43:47 +00:00
Leah Rowe
454af12153
util/nvmutil: update some comments
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:25:43 +00:00
Leah Rowe
1403bdf1cc
util/nvmutil: re-add EINTR loop check on rw
...
accidentally removed it during re-factor
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:17:33 +00:00
Leah Rowe
f0240df229
util/nvmutil: rename set_err for code clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:14:43 +00:00
Leah Rowe
c41483916a
util/nvmutil: skip errno check in main
...
skip it if there is a valid checksum, to mitigate
erroneous errno state upon exit from run_cmd(),
because we can assume by this point that we
are in fact ready to write at this point.
the check at the end still exists, which will catch
any error set by write, and any error set before
that. this fixes a weird warning on cmd_dump.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:06:13 +00:00
Leah Rowe
13c759bf3a
util/nvmutil: don't reset errno in rw_file_exact
...
reset it in callers instead.
this means that the main function is more generalised.
we know by the time we exit that there is no error.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:02:57 +00:00
Leah Rowe
82dbeb9736
util/nvmutil: reset errno in gbe_cat
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 16:00:16 +00:00
Leah Rowe
9ba84d1117
util/nvmutil: reset errno in gbe_cat_buf
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:58:57 +00:00
Leah Rowe
ca37bef34f
util/nvmutil: fix bad loop in command sanitizer
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:55:05 +00:00
Leah Rowe
9691e7e7db
util/nvmutil: use set_err where appropriate
...
in the new file i/o functions, my own setting
of errno should be done with set_err. this
avoids clobbering what the real libc set.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:50:45 +00:00
Leah Rowe
59eac512eb
util/nvmutil: properly set errno everywhere
...
i set it to ecanceled before. now i set it more
appropriately, for each type of error.
where a real syscall was called, or my file i/o
functions are used, err() is called with errno
itself as input, to avoid clobbering real errno.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:46:30 +00:00
Leah Rowe
3174806b3f
util/nvmutil: fix /dev/random fallback
...
i forgot to set urandom_fd
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:38:30 +00:00
Leah Rowe
318c0eb95b
Revert "util/nvmutil: fix check in command sanitizer"
...
This reverts commit b28076557b .
nope. the check was already correct before.
2026-03-10 15:36:43 +00:00
Leah Rowe
9b6b89250d
util/nvmutil: don't use bad pointer cast in prw
...
in practise it's ok, but some compilers might complain.
all this change costs is a bit of branching inside a
loop, but compilers will sort that out.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:33:50 +00:00
Leah Rowe
b28076557b
util/nvmutil: fix check in command sanitizer
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:30:10 +00:00
Leah Rowe
0b4e298cb1
util/nvmutil: use EINVAL in command sanitizen
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:29:23 +00:00
Leah Rowe
4819dcbc75
util/nvmutil: don't use xopen() for urandom
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:27:24 +00:00
Leah Rowe
9427285dce
util/nvmutil: conservative use of errno
...
only use errno itself as the value
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:19:09 +00:00
Leah Rowe
1f953359cb
util/nvmutil: re-try /dev/[u]random on EAGAIN
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:12:12 +00:00
Leah Rowe
b291bbf2e5
util/nvmutil: Make rw_file_exact an ssize_t
...
Use its return value. Don't exit from the function,
but actually treat it like a real syscall.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 15:03:16 +00:00
Leah Rowe
4bc7ba1e4b
util/nvmutil: use O_NONBLOCK on /dev/[u]random
...
on some systems, it is otherwise blocking, but blocking
can be disabled, making access more reliable.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 14:25:43 +00:00
Leah Rowe
c953228bb0
util/nvmutil: fix possible overflow: gbe_x_offset
...
preventative fix, since the values are currently
quite tiny. this new check is the same, but goes
the other way to eliminate overflow.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 14:18:19 +00:00
Leah Rowe
883860d687
util/nvmutil: reset rw_file_exact errno on EINTR
...
this is essentially what it already did, but it
wasn't explicitly stated. now it's clearer.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 14:12:45 +00:00
Leah Rowe
6eefd80efe
util/nvmutil: comment prw()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 14:07:35 +00:00
Leah Rowe
06cb129530
util/nvmutil: better SSIZE_MAX define
...
the old one assumes that ssize_t is signed size_t,
which let's face it, is always true in practise,
but not actually guaranteed!
so now i'm using one that's even more pedantic.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 13:42:43 +00:00
Leah Rowe
79106c5b3d
util/nvmutil: define EXIT_FAILURE/SUCCESS
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 13:34:40 +00:00
Leah Rowe
adfe865afc
util/nvmutil: more sensible errno init
...
just use errno itself as input to err
if unset, it's set to ECANCELED anyway
i really should rewrite the error handling
to not use errno at some point. it's a bit
unreliable, on some unix systems.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 13:32:29 +00:00
Leah Rowe
4202ded96c
util/nvmutil: proper errno status on prw()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 13:21:34 +00:00
Leah Rowe
ee751c27ed
util/nvmutil: reset errno if EINTR on lseek
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 12:32:42 +00:00
Leah Rowe
bbe6de44e8
util/nvmutil: stricter errno on prw()
...
we want the first error to be the one shown,
when returning negative
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 11:25:27 +00:00
Leah Rowe
5603fa51d2
util/nvmutil: fix printf c89/c90 specifiers
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 11:15:43 +00:00
Leah Rowe
7431046ea6
util/nvmutil: reset part_valid
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 11:08:42 +00:00
Leah Rowe
632c85ce1c
util/nvmutil: restore errno if lseek resets it
...
if it resets it on success, that is!
theoretically possible. we must preserve errno.
normally i'm a bit more casual about it, but this
function is replicating libc, so i must be strict
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 11:06:31 +00:00
Leah Rowe
8d156bcf35
util/nvmutil: fix another printf specifier
...
ditto to last commit
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 11:02:39 +00:00
Leah Rowe
fa859d80d5
util/nvmutil: fix bad print specifier (c90)
...
size_t may be unsigned long long, but lu
is for unsigned long. the integer is small
enough that we don't need to worry, so let's
just cast it accordingly (inside err)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:58:41 +00:00
Leah Rowe
6778a4ed98
util/nvmutil: only inc num_invalid on bad checksum
...
this fixes a regression that i introduced
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:56:56 +00:00
Leah Rowe
e3e02fa657
util/nvmutil: restore errno on failed offset restore
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:53:11 +00:00
Leah Rowe
6408570fa1
util/nvmutil: don't leave part_valid untouched
...
always set it. the current logic only sets it if
valid, but invalid doesn't, relying on global
initialisation. this check sets it explicitly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:48:16 +00:00
Leah Rowe
090a702b74
util/nvmutil: remove unused st variable
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:44:27 +00:00
Leah Rowe
cbd7ad13a3
util/nvmutil: check whether a file is a file
...
and not, say, a socket or a directory, or
a character device, or something else.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:35:51 +00:00
Leah Rowe
91a6395e5c
util/nvmutil: preserve errno during i/o
...
do not clobber errno
yeah we're basically being libc now
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:26:12 +00:00
Leah Rowe
5a005eff9e
util/nvmutil prw: always restore original offset
...
it currently only does so on success, but errors will
leave the file descriptor corrupted.
reset it accordingly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:24:16 +00:00
Leah Rowe
890d1a2ff6
util/nvmutil: err if file offset fails
...
currently it returns success, if restoring a
previous offset failed. this leaves descriptor
corrupted when the caller thinks otherwise
return -1 instead, so that the caller can treat
it as an error, relying on whatever lseek had
set for errno
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:18:25 +00:00
Leah Rowe
b56cfbcc54
util/nvmutil: fix buffer overread in prw()
...
edge case scenario, unlikely to actually trigger.
now impossible to trigger.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:14:25 +00:00
Leah Rowe
19ee28161e
util/nvmutil: fix rc overflow bug in rw_file_exact
...
check that it's below len, not above it. that way, it
will now exit if it goes above (which it shouldn't,
but it theoretically could if the code was changed
and there was a regression or subtle edge case)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 10:00:20 +00:00
Leah Rowe
6d27853f56
util/nvmutil: use C90 instead of C99
...
with the other changes made recently, super old
compilers now work.
yes, i needed to change some specifiers in printf.
typedefs provided for uint, and a define included
X OPEN SOURCE 500. and asserts for integers.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 09:25:27 +00:00
Leah Rowe
f2d982e9b3
util/nvmutil: define O_BINARY flag
...
use it
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 09:17:45 +00:00
Leah Rowe
630852b7be
util/nvmutil: fix indent on ifdefs
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 09:15:55 +00:00
Leah Rowe
e9a593b2c0
util/nvmutil: define SIZE_MAX if not defined
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 09:10:43 +00:00
Leah Rowe
7620d1d126
util/nvmutil: remove arc4random for portability
...
just use /dev/urandom and fall back to /dev/random
this is what i was doing for years. this combined
with other changes, and the new prw() function
for i/o, means portability should be pretty high
now. i will actually start testing nvmutil on old
bsd systems from the 90s later.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 09:07:15 +00:00
Leah Rowe
21f8d323f4
util/nvmutil: portable pread/pwrite
...
not thread-safe
lucky we're single-threaded!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 09:04:20 +00:00
Leah Rowe
5ae5d53751
wip
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 08:44:56 +00:00
Leah Rowe
edb1508a59
util/nvmutil: more reliable stdint.h check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 08:26:20 +00:00
Leah Rowe
2a20251ad6
util/nvmutil: reset errno before run_cmd
...
in case any stale errors are present.
at this point, we know that the code is likely
safe and that nothing happened, because we quite
obsessively call err() before that point.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 07:12:55 +00:00
Leah Rowe
d2cd126775
util/nvmutil: explicitly check cmd nullptr
...
null isn't guaranteed to be zero
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 07:05:34 +00:00
Leah Rowe
978c30a961
util/nvmutil: safer SSIZE_MAX define
...
the current one assumes two's compliment and no
padding bits. i assert two's compliment earlier
in code, but it doesn't guarantee:
sizeof(ssize_t) == sizeof(size_t)
it's theoretically possible that size_t=64
and ssize_t=32, and then the macro would break.
this new version uses SIZE_MAX instead, without
subtraction, but halves it using a bit shift.
this may still break, but it should work nicely.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:56:02 +00:00
Leah Rowe
a6d0146a3b
util/nvmutil: fix a bad cast (or lack thereof)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:53:39 +00:00
Leah Rowe
e26511c8b8
util/nvmutil: err if unsupported rw_type on i/o
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:51:47 +00:00
Leah Rowe
0a55f286c1
util/nvmutil: rename badly named off_t assert
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:43:13 +00:00
Leah Rowe
0f035e208e
util/nvmutil: assert two's compliment integers
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:35:17 +00:00
Leah Rowe
6392eb18b6
util/nvmutil: add assert for int
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:31:04 +00:00
Leah Rowe
83f3a059b9
util/nvmutil: add assert for off_t
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:30:52 +00:00
Leah Rowe
6ad7eaef32
Revert "util/nvmutil: don't use zx printf specifier"
...
This reverts commit ba3cf14faa .
2026-03-10 06:18:29 +00:00
Leah Rowe
90fada0a23
util/nvmutil: explain errval handling in err()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:17:04 +00:00
Leah Rowe
2fda988da6
util/nvmutil: make rc size_t (not ssize_t)
...
i overlooked this when writing. it's comparing
to a length which is size_t, so let's avoid
an unnecessary cast.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:11:31 +00:00
Leah Rowe
ba3cf14faa
util/nvmutil: don't use zx printf specifier
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:10:20 +00:00
Leah Rowe
2f1f129753
util/nvmutil: add portable asserts for integers
...
we need this to be the case for our code, that char
and uint8_t are 8 bits, and that uint16_t and uint32_t
are 16- and 32-bit.
these asserts protect us in case it's not (it will cause
a compile time error).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 06:07:21 +00:00
Leah Rowe
9747ca4151
util/nvmutil: abort if I/O len exceeds SSIZE_MAX
...
in rw_file_exact
otherwise, if length exceeds SSIZE_MAX, we could
hit an overflow
the buffers and lengths we deal with are relatively
small anyway, so this fix is preventative
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 05:33:12 +00:00
Leah Rowe
93a4ec3497
util/nvmutil: annotate the prototypes
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 05:11:32 +00:00
Leah Rowe
f53a8d4f18
util/nvmutil: unified gbe file part I/O
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 04:58:24 +00:00
Leah Rowe
baca2d8883
util/nvmutil: remove stale define
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 04:20:55 +00:00
Leah Rowe
80f3aac62d
util/nvmutil: unified I/O: stdout, urandom and gbe
...
everything is a file
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 04:13:02 +00:00
Leah Rowe
6402a0fbe9
util/nvmutil: unified urandom/gbe file reading
...
like before, but with the newly correct logic
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 03:08:09 +00:00
Leah Rowe
4131402589
util/nvmutil: safer read_gbe_file_exact
...
it now retries infinitely on EINTR, except when the return
of pread is precisely zero, at which point it errs.
this is better than having an arbitrary maximum like before,
and increases robustness on unreliable file systems, e.g.
NFS shares.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 02:48:34 +00:00
Leah Rowe
0c23474322
util/nvmutil: report checksum in cmd_dump
...
as it should be!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 01:51:18 +00:00
Leah Rowe
84a9e8f89b
util/nvmutil: reduce checksum report verbosity
...
only print a message what arg_part is set. this
means that a checksum error message won't be printed
on cat commands.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 01:38:22 +00:00
Leah Rowe
007dece09e
util/nvmutil: unified io flags
...
don't hardcode it per command logically. do it in
the command table instead.
this also fixes a bug where the cat commands did
not set the permissions read-only.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 01:29:12 +00:00
Leah Rowe
bb9010fdc1
util/nvmutil: require good checksum on cat
...
since the cat command can be used to create bad
gbe files, if the checksums don't match. my rule
is that nvmutil must never be used to destroy
data, only correct it (e.g. a file with just one
valid part can have it copied to the other part,
but you can't copy a bad part - and i removed
the "brick" command).
i *did* disable checksum requirements on the
dump command. with this, you can check the nvm
area and it tells you what the correct checksum
could be. then you could just correct it in a
hex editor if you wanted to, quite easily.
the idea is to slow down the act of destroying
or corrupting data as much as possible. someone
wily enough can use a hex editor to patch up some
files just fine.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 01:04:28 +00:00
Leah Rowe
08b1d95874
util/nvmutil: initialise w in gbe_cat_buf
...
no build error at the moment, nor would there be if
using clang or gcc, but i imagine some buggy compilers
might complain.
remember: portability. i also want this code to compile
on old, buggy compilers.
logically, this initialisation is redundant.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 00:53:53 +00:00
Leah Rowe
8f3bc13ac5
util/nvmutil: simplify the cat command
...
the current test is a bit over-engineered, so
i simplified it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-10 00:46:18 +00:00
Leah Rowe
aa67cf087d
util/nvmutil: add cat16 and cat128 commands
...
these take any file size of gbe file: 8KB, 16KB
or 128KB. so does the normal cat.
then you can use cat, cat16 or cat128. these
output to stdout, the corresponding size in KB.
0xFF padding used on the larger files. on the
larger files, the first 4KB of each half is the
GbE parts, and everything else is 0xFF padding.
now you can resize gbe files easily, example:
./nvmutil gbe128.bin > gbe8.bin
yes
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 23:47:22 +00:00
Leah Rowe
66f1640552
util/nvmutil: nope. rename out back to cat.
...
it *is* cat. it's catting two GbE parts. so its cat.
(two 4KB areas, plus padding when i add cat16/cat128)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 22:54:38 +00:00
Leah Rowe
724c9bb36c
util/nvmutil: rename cat to out
...
it doesn't cat. it outputs one file.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 22:34:28 +00:00
Leah Rowe
3d6e2637d6
util/nvmutil: remove stale comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 22:25:39 +00:00
Leah Rowe
1e45d19f5d
util/nvmutil: added a "cat" command
...
with this, you can read 16KB and 128KB files, and output
them to stdout, but it outputs 8KB
for example:
./nvmutil gbe128.bin > gbe8.bin
now you have a 8KB file
i could probably easily add cat16 and cat128 too.
nvmutil reads two 4KB parts regardless of GbE file
size (one from the first 4KB of each half of the
file), so this was easy to implement.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 22:18:51 +00:00
Leah Rowe
7d64b8ea8d
util/nvmutil: allow dump without good checksums
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 21:49:07 +00:00
Leah Rowe
45ea92a077
util/nvmutil: fix bad cast conversion
...
don't cast unsigned to signed.
no behaviour is changed, but this will prevent some
silly compilers complaining about -Wsign-conversion
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 21:12:59 +00:00
Leah Rowe
b5af1bf3ac
util/nvmutil: add guard in rhex()
...
i removed this before, but it's good to put it
here defensively, in case i ever mess up
the urandom read function again.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 21:08:36 +00:00
Leah Rowe
f8ddb6ef84
util/nvmutil: fix EINTR detection on urandom read
...
i forgot to handle it in the previous refactor
not really a problem in practise, since the first
read probably succeeds anyway.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 21:06:18 +00:00
Leah Rowe
c59b3b7638
util/nvmutil: reorder some functions linearly
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 20:47:45 +00:00
Leah Rowe
0f9ce929b4
util/nvmutil: tidy up gbe/urandom reading
...
split them up into their own functions, since they
no longer operate according to the same policy.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 20:41:12 +00:00
Leah Rowe
1f4ab21403
util/nvmutil: fix a bad comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 18:11:34 +00:00
Leah Rowe
61968ec2b9
util/nvmutil: explicitly reset file descriptors
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:53:56 +00:00
Leah Rowe
b69863e51f
util/nvmutil: fix indentation in rhex()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:46:46 +00:00
Leah Rowe
cd63f1a7f3
util/nvmutil: remove unused variable in rhex
...
on bsd
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:45:50 +00:00
Leah Rowe
646e349893
util/nvmutil: fix bsd build issue
...
urandom_fd is unavailable on bsd
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:44:48 +00:00
Leah Rowe
85cc3071bb
util/nvmutil: even safer rhex()
...
also handles possible overflows in read_gbe_file_exact
it removes dead code on both paths: arc4random and
urandom
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:41:29 +00:00
Leah Rowe
b2a3edd170
util/nvmutil: only check n in rhex on linux
...
not bsd
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:33:23 +00:00
Leah Rowe
8f719f80b8
util/nvmutil: safer calculated_checksum
...
we rely on uint16_t wrapping, but some platforms may
behave weirdly.
cast as uint32_t and then cast back, on return, with
an explicit mask beforehand.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:08:54 +00:00
Leah Rowe
61015dbc6c
util/nvmutil: much safer rhex()
...
n could be zero under weird regression cases
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 17:02:14 +00:00
Leah Rowe
f34d020a20
util/nvmutil: tidy up hexdump()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 16:54:42 +00:00
Leah Rowe
d3b567edcf
util/nvmutil: assert uint16_t as 16-bits
...
some platforms might get this wrong. define it
explicitly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 16:52:42 +00:00
Leah Rowe
afebfe7389
util/nvmutil: safer cast in nvm_word
...
cast buf[x] directly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 16:41:40 +00:00
Leah Rowe
2d4567238a
util/nvmutil: define _FILE_OFFSET_BITS
...
some older systems have 32-bit off_t. this makes them
have 64-bit off_t
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 16:34:59 +00:00
Leah Rowe
48b8be7a24
util/nvmutil: include sys/types.h
...
some older systems need it for pread/pwrite
it must come before stat.h
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 16:33:30 +00:00
Leah Rowe
31bd21a466
util/nvmutil: use even older define for pread
...
with this new define, we can target even older systems
from the late 90s.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 16:29:05 +00:00
Leah Rowe
8fc0f4fa07
util/nvmutil: tidied up a comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 15:32:26 +00:00
Leah Rowe
681967c386
util/nvmutil: don't include not-needed inttypes.h
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 15:30:03 +00:00
Leah Rowe
2773736dfc
util/nvmutil: reset errno on urandom partial read
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 15:00:52 +00:00
Leah Rowe
62964b42ed
util/nvmutil: consistent file location on err()
...
put it at the start of the message
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 14:47:33 +00:00
Leah Rowe
f2a5f2de45
move nvmutil .gitignore rules to util/nvmutil/
...
i plan to release this as a standalone utility at
some point, once it's perfect (on its current
feature set)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 14:38:21 +00:00
Leah Rowe
7e0b052412
util/nvmutil: remove empty ChangeLog/README
...
i will write a *manpage* at some point. for now, the
documentation on libreboot.org shall suffice.
i'm nearly ready to submit this code to coreboot.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 14:35:44 +00:00
Leah Rowe
f05a273cb4
util/nvmutil: clean up the Makefile
...
that option there is already defined in the code
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 14:33:21 +00:00
Leah Rowe
3f566d3250
util/nvmutil: tidy up the main comment header
...
merge it into one
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 14:32:15 +00:00
Leah Rowe
4fd6bdc4ef
util/nvmutil: say what the program does!
...
and with this, i'm probably done for a while
i've obsessively audited this code for a week
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 07:03:55 +00:00
Leah Rowe
f266e2a16c
util/nvmutil: standardised Makefile (add all)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:46:12 +00:00
Leah Rowe
c96254be8b
util/nvmutil: Makefile cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:38:18 +00:00
Leah Rowe
6a4ad68273
util/nvmutil: add phone section to Makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:33:52 +00:00
Leah Rowe
ec1e6bd7e8
util/nvmutil: safer / more portable install
...
explicitly declare the directory path for the given
file (nvmutil), otherwise it's implementation-defined;
on some systems, /bin/nvmutil means a directory named
nvmutil could then contain nvmutil.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:31:52 +00:00
Leah Rowe
1446df01f2
util/nvmutil: create install dir in Makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:30:14 +00:00
Leah Rowe
9f75a23a84
util/nvmutil: fix target in Makefile
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:28:50 +00:00
Leah Rowe
d0bf316edf
util/nvmutil: directly compare fd/urandom_fd
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:24:22 +00:00
Leah Rowe
dbc7fadcbc
util/nvmutil: allow partial reads of /dev/urandom
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 06:09:34 +00:00
Leah Rowe
e092b2ce0b
util/nvmutil: explicit cast in nvm_word
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 05:31:51 +00:00
Leah Rowe
3b73ea4288
util/nvmutil: clarify CFLAGS in code
...
makefile is correct, but lots of people don't read it.
putting it iin code helps people avoid confusion.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 05:25:58 +00:00
Leah Rowe
3b188b4d2b
util/nvmutil: specifically enable -std=c99
...
I also needed: #define _POSIX_C_SOURCE 200809L
I use -pedantic with -Wall -Wextra -Werror, which
forces very strict error handling and ISO C; this
means pread and pwrite aren't available.
The define fixes this.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 05:18:53 +00:00
Leah Rowe
532d723ccd
util/nvmutil: fix indentation in setmac
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 04:37:48 +00:00
Leah Rowe
14c2588772
util/nvmutil: err sooner, on bad command
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 04:04:12 +00:00
Leah Rowe
1a60eabcfe
util/nvmutil: print expected checksums
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 03:56:50 +00:00
Leah Rowe
c27f8b709a
util/nvmutil: rename cmd helper functions
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 03:29:08 +00:00
Leah Rowe
2cf1d1bed8
util/nvmutil: remove MAC address short-commands
...
only allow the long form: setmac [MAC]
specifying gbe.bin just shows the help/usage now.
this is a safety feature, so that someone doesn't
accidentally write the gbe file. we want it to be
that the user specifically requested setmac.
setmac with mac address as the 3rd argument is
also disabled. this is done as part of a general
simplification and safety improvement to nvmutil.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 03:25:33 +00:00
Leah Rowe
aeb076b30e
util/nvmutil: remove cmd_brick
...
this is an extremely dangerous feature, and serves
no purpose to the user.
this change is part of a series of extreme safety
improvements, part of a larger nvmutil audit.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 02:23:22 +00:00
Leah Rowe
0c64907a9e
util/nvmutil: remove the setchecksum command
...
This feature is extremely dangerous, and we should
discourage against its use.
This is part of a series of changes that I've made
to make the code safer. You should only ever run
this on a valid GbE file, and nothing else.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 02:19:24 +00:00
Leah Rowe
f7dfb0d265
util/nvmutil: re-order functions by execution
...
linear, top-down order. re-order the prototypes
also some general cleanup:
argc enums now validated. ifdefs for pledge
and arc4random now use a consistent naming
scheme.
feature change:
the "dump" command now fails if both checksums
are invalid, and won't show anything.
my next commit will disable setchecksum when
both checksums are invalid. this and the other
insane auditing i've done over the last few
days has been part of a major effort to make
nvmutil extremely safe, and robust.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 02:12:28 +00:00
Leah Rowe
a6e271c86d
util/nvmutil: unified checksum update
...
setchecksum and setmac update the checksum.
other commands don't.
this patch unified the logic, handling it
in write_gbe based on command[].chksum_write
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 01:20:59 +00:00
Leah Rowe
39cdd562d8
util/nvmutil: don't pledge on OLD openbsd
...
only pledge/unveil where available, on versions
that have it. this patch disables it on older
versions, allowing nvmutil to compile.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-09 00:20:30 +00:00
Leah Rowe
db440bd71d
util/nvmutil: make write_mac_part() a void
...
its return value is never used, in the current code.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 23:42:11 +00:00
Leah Rowe
5dc3f323c3
util/nvmutil: fix typo in message
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 23:40:12 +00:00
Leah Rowe
07f9f607ab
util/nvmutil: don't re-calculate skip_part
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 23:39:13 +00:00
Leah Rowe
dbd4d6d84a
util/nvmutil: limit rw size on specific commands
...
i previously had this as a speed optimisation, but
removed it because it wouldn't make any real speed
difference, on most modern file systems / kernels.
however, this also has the dual purpose of ensuring
only what was verified gets written, on operations
that only touch the NVM area, since this relies on
checksum verification.
therefore, i have re-added this feature, but under
the new design of nvmutil. it is done policy-based,
instead of having if/else for specific commands.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 23:32:08 +00:00
Leah Rowe
70da9c3940
util/nvmutil: better error message for bin check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 23:06:01 +00:00
Leah Rowe
4d6732dade
util/nvmutil: EINTR looping on write_gbe_file
...
up to a maximum number of retries
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 23:03:42 +00:00
Leah Rowe
163bf8beac
util/nvmutil: clean up obsessive comments
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 22:41:03 +00:00
Leah Rowe
848d575cea
util/nvmutil: policy-only cmd_swap and cmd_copy
...
their functions now only return. not needed anymore.
these commands are still available, but they no longer
need helper functions.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 22:17:25 +00:00
Leah Rowe
61188ee9dc
util/nvmutil: remove redundant checksum checks
...
we centralise this now. better not to over-engineer
our over-engineering.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 22:11:39 +00:00
Leah Rowe
c012d4ea5b
util/nvmutil: clean up a few binary checks
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 22:06:09 +00:00
Leah Rowe
bd64d118f5
util/nvmutil: fix check in set_err()
...
errno must never be negative
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 21:37:53 +00:00
Leah Rowe
61e7147505
util/nvmutil: fix bad arc4random check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 21:16:18 +00:00
Leah Rowe
c425c74c54
util/nvmutil: improved clarity on checksum check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 21:03:06 +00:00
Leah Rowe
6abc150e89
util/nvmutil: close files in err()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 20:57:30 +00:00
Leah Rowe
840f79fd82
util/nvmutil: only close gbe fd if opened
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 20:50:44 +00:00
Leah Rowe
1400508400
util/nvmutil: generalised checksum verification
...
the existing verification is retained, an a few commands.
this is an additional security mechanism. redundancy is
best.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 20:43:57 +00:00
Leah Rowe
3330f005fd
util/nvmutil: validate ARG_PART and ARG_NOPART
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 17:57:28 +00:00
Leah Rowe
5532a721f5
util/nvmutil: clean up some code
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 17:54:26 +00:00
Leah Rowe
35ffe64765
util/nvmutil: fix 3-arg setmac
...
3-arg arguments were broken, by recent generalisations.
this should fix it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 17:48:22 +00:00
Leah Rowe
a0829f7a27
util/nvmutil: simplified exit error
...
no more command-specific logic here. this should be the
same in the rest of the code now.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 17:24:25 +00:00
Leah Rowe
624ecc4ce1
util/nvmutil: generalise skip-read on copy/brick
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 17:20:36 +00:00
Leah Rowe
dd320601c2
util/nvmutil: remove redundant code
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 17:06:41 +00:00
Leah Rowe
3c55808e27
util/nvmutil: call usage() on cmd validation err
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 16:53:24 +00:00
Leah Rowe
37c04ac218
util/nvmutil: generalised cmd copy/swap
...
now they only set checksums.
and generalised checksumming is next!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 16:06:33 +00:00
Leah Rowe
74224e3dc6
util/nvmutil: print rmac method in setmac
...
get it out of main(), it's bloat there
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 15:20:26 +00:00
Leah Rowe
08de8d98e9
util/nvmutil: additional flag check on write
...
gbe_write already checks this, but we should
also check inside the caller.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 15:10:38 +00:00
Leah Rowe
b5054f68ba
util/nvmutil: don't write gbe file if errno set
...
nice bit of defense here
we absolutely need this code to be bullet proof
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 15:07:29 +00:00
Leah Rowe
1d630f8e36
util/nvmutil: set errno in xstrxcmp
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 15:06:01 +00:00
Leah Rowe
502aeb8653
util/nvmutil: rename word/set_word
...
they should only access the nvm area, so rename
them accordingly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 14:55:53 +00:00
Leah Rowe
e6767d6e47
util/nvmutil: make xstrxcmp() easier to read
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 14:49:57 +00:00
Leah Rowe
6f2e5149f2
util/nvmutil: use N_COMMAND for items(command)
...
make the code slightly easier to read
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 14:37:25 +00:00
Leah Rowe
10507e1436
util/nvmutil: portable, secure strlen function
...
xstrxlen ftw
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 14:30:36 +00:00
Leah Rowe
9be83fa034
util/nvmutil: use xstrxlen for mac length
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 14:16:32 +00:00
Leah Rowe
4a9aea629b
util/nvmutil: use own strnlen function: xstrxlen
...
strnlen is not available on some older systems,
so now we provide our own portable version.
this version also aborts on NULL input, unlike
the standard function.
this version also does not permit empty strings.
this version also does not permit unterminated
strings.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 14:15:12 +00:00
Leah Rowe
0881b584f4
add util/nvmutil/nvmutil to .gitignore
...
oops
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:14 +00:00
Leah Rowe
92bd44676a
util/nvmutil: err if arc4random disused on bsd
...
arc4random is superior, so using /dev/urandom
would be a mistake. we only use that on linux,
or old/weird unix.
we would also use it on linux, but GNU prohibits
nice things (its implementations are spotty, and
old glibc doesn't have it - before 2022 there is
libbsd, but i'm not importing that).
not that it matters. we're not doing encryption.
i'm just a stickler for technical correctness.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:14 +00:00
Leah Rowe
e5d0dee668
util/nvmutil: unified cmd_index reset
...
use the macro, introduced in the previous commit
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:14 +00:00
Leah Rowe
1ff1dca661
util/nvmutil: unified cmd validity check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:14 +00:00
Leah Rowe
5517f81cbe
util/nvmutil: commented some defines
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:13 +00:00
Leah Rowe
be7c965845
util/nvmutil: rename cmd to cmd_index
...
to make it clearer what this variable does
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:13 +00:00
Leah Rowe
a7f97f385c
util/nvmutil: sanitize the command list
...
this is a guard against mistakes by future maintainers
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:11 +00:00
Leah Rowe
8ce1cbe7f4
util/nvmutil: never allow cmd to be negative
...
make cmd a size_t and make the equivalent to NULL
be the number of items in command[]
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:09 +00:00
Leah Rowe
0160b26aee
util/nvmutil: tidy up set_cmd()
...
don't set args here
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:32:06 +00:00
Leah Rowe
de1963fdee
util/nvmutil: do cmd bound check
...
instead of simply checking null, just do a bound check.
this would also cover NULL (-1)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 13:31:59 +00:00
Leah Rowe
ccc58cefbb
util/nvmutil: rename check_cmd_args
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 03:26:43 +00:00
Leah Rowe
ec3ab4059c
util/nvmutil: close random_fd only if used
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 03:22:50 +00:00
Leah Rowe
63fcc0891f
util/nvmutil: Do not allow /dev/urandom on OBSD
...
There, we use arc4random_buf which does not directly
access /dev/urandom on BSD; it uses a userspace method
instead, which bypasses this.
This is therefore much more restrictive, which is
exactly the point of unveil(2) and pledge(2); restrict
your program's operation while ensuring that it has what
it needs, to help with debugging and prevent common bugs.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:47:08 +00:00
Leah Rowe
b1866312bd
util/nvmutil: rename print_mac_address
...
the current name is misleading. this function
specifically converts what's stored in memory,
in the nvm.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:41:46 +00:00
Leah Rowe
1bbc6ac890
util/nvmutil: only open /dev/urandom on setmac
...
otherwise, it's a pointless computation
i also added a guard to mitigate this, in the
read file function. this should have been there
anyway.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:39:53 +00:00
Leah Rowe
9bd7d04b49
util/nvmutil: say what randomiser is used
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:34:26 +00:00
Leah Rowe
c1bfe6a438
util/nvmutil: rename command.args to argc
...
that way, it makes more sense sementantically
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:20:13 +00:00
Leah Rowe
bf30cdd021
util/nvmutil: fix mistake in command
...
accidentally specified invert, for the brick
and setchecksum commands. oops!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:18:34 +00:00
Leah Rowe
4cdf22cf8f
util/nvmutil: minor cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:16:30 +00:00
Leah Rowe
7c3a4e253f
util/nvmutil: remove stale comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:08:40 +00:00
Leah Rowe
26a69321ac
util/nvmutil: use enum for command index
...
if the enum is messed up, this patch also prevents
that. this is not to catch a runtime error, but
to intentionally trip up a maintainer that screws
up, prompting them to fix their future mistake.
we previously used a pointer directly, without
even checking index/NULL - that too is now covered,
except that we now use an indice for command[] and
execute the command from that, rather than directly
declaring a pointer.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 02:04:10 +00:00
Leah Rowe
1d17a8ffcf
util/nvmutil: call it nvmutil in makefile
...
a package manager by the name "nvm" exists, as
i discovered.
this is a courtesy to them.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 01:11:52 +00:00
Leah Rowe
6203f3ae61
util/nvmutil: print mac before setting
...
this way, if a user does e.g.
./nvm gbe.bin bullshit
It will say: bullshit
Right now, it just says invalid length. This
means if the user wanted to type e.g.
./nvm gbe.bin copy 0
but they typed:
./nvm gbe.bin coyp 0
Now it will tell them that it's trying
to set the MAC address "coyp".
This is because if an invalid command is given,
it's treated as a MAC address instead. This is
by design, to allow e.g.
./nvm gbe.bin xx:1x:1x:xx:xx:xx
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 01:11:52 +00:00
Leah Rowe
698d39dd06
util/nvmutil: store invert in command struct
...
handle inversion directly there
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 00:21:58 +00:00
Leah Rowe
50e20fb8bf
util/nvmutil: make cmd an integer
...
point directly to the command table.
run through an intermediary function to check
bounds, for safety.
this will allow me to then set things like
the invert config directly in that struct.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-08 00:16:45 +00:00
Leah Rowe
3148d31798
util/clarity: name the gbe file half size
...
we need only declare it in the centralised gbe_file_offset
function, which determines whether a write to the gbe file
falls specifically within the 4KB range that is the gbe
part.
it is always half of the gbe file size, and then the first
4KB of each half stores the gbe part.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 13:36:46 +00:00
Leah Rowe
96cb52f21a
util/nvmutil: only have newrandom on linux/oldunix
...
these variables newrandom and oldrandom are unused on
BSD systems, and their unused status may trigger
warnings on some compilers.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 13:18:54 +00:00
Leah Rowe
c195e8cc2b
util/nvmutil: tidy up open_dev_urandom
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 10:07:05 +00:00
Leah Rowe
6a505c9162
util/nvmutil: correct type on hextonum()
...
use uint16_t instead
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 03:28:15 +00:00
Leah Rowe
50ce806dfa
util/nvmutil: fix a comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 03:16:20 +00:00
Leah Rowe
a0da88d361
util/nvmutil: fix a comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 03:08:31 +00:00
Leah Rowe
ea1046dc46
util/nvmutil: unambiguous sign conv_argv_part_num
...
yeah, do the verification manually, don't convert
to size_t. this avoids a bunch of theoretical
bugs that i can't be bothered to explain at 3AM
just trust me bro
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 03:00:35 +00:00
Leah Rowe
b98f89c272
util/nvmutil: clean up hextonum()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:50:30 +00:00
Leah Rowe
b8bd1ca65a
util/nvmutil: tidy up some comments
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:44:11 +00:00
Leah Rowe
49eca198da
util/nvmutil: make mac_updated a uint8_t
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:38:36 +00:00
Leah Rowe
ef2937edbd
util/nvmutil: fix prototype indentation
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:37:46 +00:00
Leah Rowe
7bfe134a19
util/nvmutil: reset mac_buf for mac parsing
...
preventative fix for later, if the tool is ever expanded
to have a better command syntax, for supporting more than
one file at a time.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:35:03 +00:00
Leah Rowe
14ad5a9818
util/nvmutil: comment the unhandled errno exit
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:09:56 +00:00
Leah Rowe
90bd395cb1
util/nvmutil: tidy up set_mac_byte
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:05:57 +00:00
Leah Rowe
4619dad0b7
util/nvmutil: further mac address parsing cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 02:00:14 +00:00
Leah Rowe
921144856c
util/nvmutil: tidy up mac parsing code
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 01:39:57 +00:00
Leah Rowe
86357dbe52
util/nvmutil: fix a bad comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 01:28:50 +00:00
Leah Rowe
7e88f53e99
util/nvmutil: tidy up set_mac_byte
...
send the mac address byte directly to check_mac_separator
functionally identicaly, but cleaner, and uses
multiplication instead of division (faster).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 01:21:29 +00:00
Leah Rowe
c02f3166bb
util/nvmutil: make do_read a uint8_t
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 01:11:07 +00:00
Leah Rowe
a9f5cbb542
util/nvmutil: clearer commenting about commands
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 01:09:52 +00:00
Leah Rowe
0084452c4a
util/nvmutil: comment regarding buf
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 01:01:44 +00:00
Leah Rowe
364abddeab
util/nvmutil: minor code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 00:52:57 +00:00
Leah Rowe
68d689336b
util/nvmutil: fix an err string
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 00:10:36 +00:00
Leah Rowe
658ed55bc1
util/nvmutil: tidy up conv_argv_part_num
...
no need for strlen here (1-character string).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 00:08:17 +00:00
Leah Rowe
330b2da20c
util/nvmutil: Shorten a comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 00:04:57 +00:00
Leah Rowe
58182b48c3
util/nvmutil: fix a bad comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 00:03:10 +00:00
Leah Rowe
884a6779f9
util/nvmutil: make gbe_st local, not static/global
...
forgot to remove static when making it local
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-07 00:01:27 +00:00
Leah Rowe
44e6b00626
util/nvmutil: rename rfd to urandom_fd
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:58:04 +00:00
Leah Rowe
9e5736baa9
util/nvmutil: remove reset_global_state
...
it was put there for another change i haven't done yet,
and probably won't. the program currently just runs once
with one operation, on a given file.
the current defaults are initialised just fine without
this function, so let's remove this bloat for now.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:56:19 +00:00
Leah Rowe
13b35ed1fc
util/nvmutil: rename arc4random define
...
specifically refer to the actual function i use.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:51:57 +00:00
Leah Rowe
79c972367e
util/nvmutil: reset errno on /dev/random fallback
...
i didn't catch this before. stale error state would
have passed through, even on ultimate success.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:50:06 +00:00
Leah Rowe
6e47315192
util/nvmutil: remove rval from conv_argv_part_num
...
relic from an earlier uncommitted version
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:42:33 +00:00
Leah Rowe
85b09c4275
util/nvmutil: set part_modified to a uint8_t
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:15:50 +00:00
Leah Rowe
e5b108a764
util/nvmutil: make invert a uint8_t
...
cleaner intention, and shorter
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:14:26 +00:00
Leah Rowe
69c4d70650
util/nvmutil: safer argv part number parsing
...
we now handle signedness properly, which is implementation
defined, on char integers where signed/unsigned is not
specified.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 23:07:29 +00:00
Leah Rowe
9b6f2a2f7e
util/nvmutil: rename check_bound check_nvm_bound
...
this makes the intent clearer, because we only want to
access the 128-byte nvm area here.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 22:39:43 +00:00
Leah Rowe
a7d7f68a5c
util/nvmutil: be clearer about GbE file sizes
...
the partsize variable is also misleading, because it
refers to the full half of a file, which might be
bigger than 4KB. this variable name is a hangover
from when nvmutil only supported 8KB files.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 22:36:08 +00:00
Leah Rowe
e273391792
util/nvmutil: rename fd to fd_ptr in xopen()
...
clearer intent
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 22:26:22 +00:00
Leah Rowe
4635a0eae9
util/nvmutil: cleaned up a few prototypes
...
make them match how they're declared
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 22:20:15 +00:00
Leah Rowe
0f5fcbd883
util/nvmutil: more readable xopen
...
match the argument names of openbsd open(2)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 22:18:26 +00:00
Leah Rowe
2c2bda31ea
util/nvmutil: use unsigned char in hextonum
...
char can be signed or unsigned, and this is often
implementation-defined. this could result in bad
comparisons, so we should specifically cast it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 22:09:56 +00:00
Leah Rowe
f57358ac1e
util/nvmutil: remove redundant break
...
err takes care of it
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:43:11 +00:00
Leah Rowe
f59f45893b
util/nvmutil: rename write_gbe to write_gbe_file
...
for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:39:58 +00:00
Leah Rowe
85877a93bb
util/nvmutil: rename read_gbe to read_gbe_file
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:39:21 +00:00
Leah Rowe
dad1f613fc
util/nvmutil: unified partnum validation
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:35:49 +00:00
Leah Rowe
ed32108613
util/nvmutil: rename global st variable
...
rename it to gbe_st, for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:22:50 +00:00
Leah Rowe
b65c988007
util/nvmutil: full prototypes
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:21:40 +00:00
Leah Rowe
3aa30c5039
util/nvmutil: tidy up read_gbe
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:08:47 +00:00
Leah Rowe
040eee4607
util/nvmutil: tidy up set_mac_nib
...
simplify it again
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 21:06:58 +00:00
Leah Rowe
6b924787be
util/nvmutil: remove unnecessary checck
...
the for loop exits when setting cmd
checking for NULL is pointless
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 20:59:50 +00:00
Leah Rowe
af55dd8959
Revert "util/nvmutil: make invert an unsigned char"
...
This reverts commit 5b120d71e7 .
the others are unsigned char. other variables like this one.
better be consistent.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 20:58:04 +00:00
Leah Rowe
10c8be92aa
util/nvmutil: general code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 20:52:13 +00:00
Leah Rowe
a34d430754
util/nvmutil: cleaner mac address variable names
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 20:34:20 +00:00
Leah Rowe
00e0197cfe
util/nvmutil: general code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 20:11:30 +00:00
Leah Rowe
5b120d71e7
util/nvmutil: make invert an unsigned char
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:59:51 +00:00
Leah Rowe
4bf190a5f5
util/nvmutil: make mac_updated unsigned
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:58:37 +00:00
Leah Rowe
5c90b2453b
util/nvmutil: use size_t in setmac functions
...
not int
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:57:39 +00:00
Leah Rowe
fb805caf6a
util/nvmutil: extra part check in set_checksum
...
it calls word() anyway, but we should still check it here,
since this is quite a critical function.
the other bound checks are done by word(), which this
function uses to add everything up.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:40:28 +00:00
Leah Rowe
f316701d74
util/nvmutil: don't set part in write_mac_part
...
make a helper for cmd_setchecksum with size_t arg,
and use it in write_mac_part.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:35:54 +00:00
Leah Rowe
c6c4e5303e
util/nvmutil: fix duplicated word in comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:30:55 +00:00
Leah Rowe
5d05921875
util/nvmutil: make part_modified an unsigned char
...
better reflects intent
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:28:32 +00:00
Leah Rowe
1aa8f33d50
util/nvmutil: fix bad string in gbe_read_part()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:25:54 +00:00
Leah Rowe
9095722079
util/nvmutil: calculate off AFTER part validation
...
because we check the part first, so we need to know it's
valid before proceeding.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:23:56 +00:00
Leah Rowe
1131240d02
util/nvmutil: made a comment a bit clearer
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:21:02 +00:00
Leah Rowe
72caa5f892
util/nvmutil: fix another printf specifier
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:17:01 +00:00
Leah Rowe
efdf110317
util/nvmutil: remove unnecessary casts
...
now that part numbers are size_t, i don't need them.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:08:55 +00:00
Leah Rowe
d94fbba779
util/nvmutil: fix more bad printf statements
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:04:38 +00:00
Leah Rowe
6d2a1afbd4
util/nvmutil: fix a few bad printf statements
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 19:03:06 +00:00
Leah Rowe
0698c6ada4
util/nvmutil: warn about partial gbe file writes
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 18:55:31 +00:00
Leah Rowe
397fc78e58
util/nvmutil: use size_t for part numbers
...
not int
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 18:45:26 +00:00
Leah Rowe
82fdee91fa
util/nvmutil: clean up file handling
...
inline check_read_or_die
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 18:36:29 +00:00
Leah Rowe
58b17c98fd
util/nvmutil: minor cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 18:25:24 +00:00
Leah Rowe
c8bd98c8a6
util/nvmutil: mem bound check on file read/write
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 18:17:07 +00:00
Leah Rowe
41f7f6352d
util/nvmutil: rename gbe_bound for clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:47:49 +00:00
Leah Rowe
b1abef8881
util/nvmutil: make defines easier to understand
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:44:07 +00:00
Leah Rowe
edca6c2cd3
util/nvmutil: tidy up set_mac_nib
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:35:00 +00:00
Leah Rowe
123e77d07f
util/nvmutil: use portable printf on hexdump
...
lx means unsigned long, and row is size_t which often
is, but this is not guaranteed.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:31:04 +00:00
Leah Rowe
c0a77a7301
util/nvmutil: make the MAC shifting easier to read
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:22:31 +00:00
Leah Rowe
596643a0d5
util/nvmutil: optimise hextonum
...
there is 0x20 of different between a and A
so we can just or 0x20 and compare only lowercase.
we can also cast char (which may me signed on some
systems) to unsigned, and then only check whether
it's lower than 10.
this code results in far less branching (in C),
but a good optimising compiler probably wouldn't
have cared about the old version anyway.
it's just nicer C code.
this also means we no longer need to check for
X, only x.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:07:12 +00:00
Leah Rowe
6023d17b6e
util/nvmutil: fix parenthesis warning in GCC
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 17:01:48 +00:00
Leah Rowe
199dbad96d
util/nvmutil: tidy up set_mac_nib
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:55:23 +00:00
Leah Rowe
9e32456c8c
util/nvmutil: clearer intent on struct data
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:52:02 +00:00
Leah Rowe
7ae2288c10
util/nvmutil: more readable NVM defines
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:49:41 +00:00
Leah Rowe
2f0c189da9
util/nvmutil: more readable SIZE_nKB defines
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:46:01 +00:00
Leah Rowe
7f6d7526cc
util/nvmutil: use arc4random on DragonFly BSD
...
it has arc4random, so we will use it there.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:43:18 +00:00
Leah Rowe
a358a6fe09
util/nvmutil: use strlen instead of strnlen
...
strnlen isn't available on some older unices.
we already know the string will be null-terminated,
because it comes from argv, so runaway reads are
extremely unlikely (read: impossible).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:41:59 +00:00
Leah Rowe
a82c766b8c
util/nvmutil: add bound checks for gbe read/write
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:29:45 +00:00
Leah Rowe
94f5e70366
util/nvmutil: minor code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 16:05:21 +00:00
Leah Rowe
0d4cc9e324
util/nvmutil: clearer macbuff init in set_mac_nib
...
and 1 does the same thing as mod 2, but it's cleaner.
i also now bitshift 3 times instead of times by 8,
which again is clearer in purpose.
i line breaked after h, to make it clear that all of
the next part is being shifted in
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 15:51:46 +00:00
Leah Rowe
7950a31c79
util/nvmutil: don't reset rfd on openbsd
...
it isn't defined there
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 15:02:46 +00:00
Leah Rowe
99543bc632
util/nvmutil: tidy up rhex()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 14:59:35 +00:00
Leah Rowe
a4b9a333a9
util/nvmutil: properly handle sizeof in rhex()
...
sizeof is size_t, so we must act accordingly.
casting it to an int is unacceptable.
this version is also branchless.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 14:53:36 +00:00
Leah Rowe
cc47a756f2
util/nvmutil: make rmac an array, not a literal.
...
this prevents reassignment.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 14:42:57 +00:00
Leah Rowe
e7cbd9441c
util/nvmutil: use arc4random when available
...
fall back to urandom.
also add a /dev/random fallback, for older unices.
with the posix compatibility changes, combined with
this change as above, the code should be portable
now. i expect it to compile on *many* unix systems!
pretty much everything from the last 30 years.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 14:42:29 +00:00
Leah Rowe
95b294db05
util/nvmutil: inline pos calculation on word()
...
we don't need a whole function. i previously did it
for clarity, but simply setting a variable all in
one line is totally fine.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:49:33 +00:00
Leah Rowe
d89d14e911
util/nvmutil: remove pointless check
...
the input is already size_t, which is unsigned
there's no point in checking for negative
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:37:38 +00:00
Leah Rowe
f96a119523
util/nvmutil: cast inside check_bound, not callers
...
the purpose of the cast is to check whether a given
integer would underflow under any circumstance.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:33:42 +00:00
Leah Rowe
a31236b1f8
util/nvmutil: comment regarding endianness
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:30:14 +00:00
Leah Rowe
c7409cce03
util/nvmutil: clean up set_word
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:28:51 +00:00
Leah Rowe
feee6a728f
util/nvmutil: use size_t for offsets in words
...
size_t is generally the size of the address space, so
this is more reliable for our purposes; we're only
working on small buffers, but even so, it's a good
thing to do.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:28:04 +00:00
Leah Rowe
32429f2c37
util/nvmutil: remove the swap() function
...
directly handle swapping in word and set_word
in my testing, x86_64 and arm64 compilers actually produce
more efficient code this way. i previously only did a big
swap on the whole buffer on big-endian CPUs, and directly
accessed without swaps on little-endian, as an optimisation.
however, the old code is actually slower than what the
compiler produces, with the new code!
portability is retained with big-endian host CPUs and
little-endian host CPUs.
this also avoids the complication of memcpy and is just
generally extremely reliable by comparison.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-06 13:02:24 +00:00
Leah Rowe
b3516e8c16
update nvmutil COPYING file (2026 copyright year)
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 11:25:07 +00:00
Leah Rowe
2f2295fc37
util/nvmutil: rhex: don't read twice!
...
we currently never read the 0th byte, so if we need
all 12, and we do when every byte is random, we
read again just to get one byte.
not really a bug, but it is a performance penalty,
so let's fix it!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 10:45:00 +00:00
Leah Rowe
aceafd684a
util/nvmutil: unified file read error handling
...
it must be read perfectly, or else
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 02:34:44 +00:00
Leah Rowe
947211fc3c
util/nvmutil: tidy up cmd_brick
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 02:06:33 +00:00
Leah Rowe
2f782b8a01
util/nvmutil: minor code cleanup
...
mostly style changes
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:59:21 +00:00
Leah Rowe
f727675f6d
util/nvmutil: provide comment about global state
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:48:41 +00:00
Leah Rowe
d6601059fb
util/nvmutil: reset errno on *successful* read
...
otherwise, stale errno from an earlier syscall might
cause a valid read to still fail.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:43:39 +00:00
Leah Rowe
84b4ba48b4
util/nvmutil: don't reset errno in check_read_or_die
...
we want to debug it after the fact; this is now handled,
in the calling functions (unhandled error exceptions).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:39:34 +00:00
Leah Rowe
94415ca73d
util/nvmutil: minor code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:39:11 +00:00
Leah Rowe
75ea8ab175
util/nvmutil: comment regarding memcpy endianness
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:32:34 +00:00
Leah Rowe
ca98d418d5
util/nvmutil: don't usleep on file reads
...
i don't care. it's only 30 tries.
usleep can fail, setting errno, and it can actually
take longer, depending on the environment. it poisons
errno, and makes debugging harder.
just remove it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:29:30 +00:00
Leah Rowe
e28409d80b
util/nvmutil: handle error after check_read_or_die
...
we already exit reliably in that function. the current code
is logically correct, but very weak against future changes.
this extra check is essentially redundant, but prevantative
against future changes.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:27:13 +00:00
Leah Rowe
7d6f1a6b30
util/nvmutil: handle errno after file read
...
errno shouldn't be set, after reading a file successfully.
if it is, that's a bug. handle it accordingly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:23:19 +00:00
Leah Rowe
12778a0ffd
util/nvmutil: simplified zero-mac-address check
...
it's just three words. access them directly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:12:11 +00:00
Leah Rowe
84376fa308
util/nvmutil: don't pass h as param in cmd_setmac
...
it's only needed in one function (tmp variable).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:09:56 +00:00
Leah Rowe
0d4822e700
util/nvmutil: cast SIZE_4KB on the pwrite check
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 01:02:42 +00:00
Leah Rowe
0d3a8749fe
util/nvmutil: usleep 1 on check_read_or_die
...
This prevents hogging the CPU in a tight loop,
while waiting for access.
I've also reduced the number of tries to 30, rather
than 200. This is more conservative, while still
being somewhat permissive.
The addition of the usleep delay probably makes
this more reliable than the previous behaviour of
quickly spinning through 200 tries, but without
hogging CPU resources.
I *could* allow this loop to be infinite, but
I regard infinite spin-lock as an error state.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:57:48 +00:00
Leah Rowe
3d27c77a63
util/nvmutil: reset errno on successful file reads
...
a non-fatal error could have set errno. when we return
from check_read_or_die(), it should be assumed that
all is well.
i don't think this would mask anything important, but
it may be regarded as a preventative bug fix, since
it most likely only prevents false-positives.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:52:40 +00:00
Leah Rowe
6e08614e69
util/nvmutil: reset fd/rfd to negative one
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:51:24 +00:00
Leah Rowe
8143f95b41
util/nvmutil: reset buf in reset_global_state()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:47:45 +00:00
Leah Rowe
3e7148a9b7
util/nvmutil: reset macbuf in reset_global_state
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:46:42 +00:00
Leah Rowe
53a680c063
util/nvmutil: reset errno in reset_global_state
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:44:47 +00:00
Leah Rowe
46a0fe6b8a
util/nvmutil: Comments relating to NVM size limit
...
Part of the code currently assumes we only work on
the smaller NVM area.
I'm adding some comments to make this clear, for
when and if the code is ever expanded to support
operating on the Extended NVM area (just part the
main 128-byte NVM area).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:41:08 +00:00
Leah Rowe
4b42419122
util/nvmutil: remove err_if()
...
use of it was preventing more verbose error messages
on exit.
the code is actually cleaner without it, and easier
to read, because of those verbose error messages.
i also added some comments to cmd_swap/copy and did
some other minor/related cleanup elsewhere.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:30:28 +00:00
Leah Rowe
6efd0429e2
util/nvmutil: improved some error messages
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:07:14 +00:00
Leah Rowe
6035a1bb6a
util/nvmutil: rename valid_read
...
it doesn't just validate, but also exits.
rename it accordingly, to: check_read_or_die
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-04 00:01:28 +00:00
Leah Rowe
be28140741
util/nvmutil: remove redundant casts
...
these just bloat the code
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:55:46 +00:00
Leah Rowe
3b8de31f37
util/nvmutil: more thorough global_state_reset
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:46:01 +00:00
Leah Rowe
704a7beeb4
util/nvmutil: reset fname properly
...
do it after resetting global state.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:42:15 +00:00
Leah Rowe
489f632cab
util/nvmutil: simpler mac address totalling
...
i know it's always going to be 3
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:40:28 +00:00
Leah Rowe
76d6900d69
util/nvmutil: less obscure mac address zero check
...
make it totally clear what's going on.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:37:59 +00:00
Leah Rowe
8c5c4e1b93
util/nvmutil: reset global state in one function
...
split it out of main. this is good hygiene and it's preparation
for a planned expansion in the future, that allows operation
on multiple files.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:29:45 +00:00
Leah Rowe
213626d898
util/nvmutil: reset cmd in main
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:24:46 +00:00
Leah Rowe
306f9087d9
util/nvmutil: reset fname in main
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:23:54 +00:00
Leah Rowe
d0141ca2e4
util/nvmutil: reset part_modified in main
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:23:28 +00:00
Leah Rowe
1e407a2a65
util/nvmutil: reset invert in main
...
currently redundant, but again i might expand this
in the future to allow multiple runs. putting this
here as good practise (currently redundant).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:22:14 +00:00
Leah Rowe
dd109ccf07
util/nvmutil: reset mac in main
...
we currently only run the logic once, but i might
expand nvmutil in the future, so that it can
operate on multiple files. this would require
using a different command syntax, e.g. getop-style
syntax.
this is a preventative bug fix, resetting global
state.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:19:33 +00:00
Leah Rowe
790009f58e
util/nvmutil: reset macbuf in parse_mac_string
...
we only ever use it once, so it's fine, but future
expansion of this code might trip us up.
this is therefore a preventative bug fix.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:17:02 +00:00
Leah Rowe
7b15b020b5
util/nvmutil: use off_t for partsize (pread/pwrite)
...
size_t can truncate on some platforms. it's best to use
the proper variable type (a cast is insufficient).
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:12:15 +00:00
Leah Rowe
ae080c35e4
util/nvmutil: clearer error messages on valid_read
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:09:54 +00:00
Leah Rowe
75bcc46de4
util/nvmutil: comment valid_read for clarity
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 23:00:17 +00:00
Leah Rowe
7a62ad3f62
util/nvmutil: clearer errno reset in valid_read
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 22:57:45 +00:00
Leah Rowe
3268c225d6
util/nvmutil: pass size_t to read, not ssize_t
...
ssize_t is signed, which could be negative.
in practise, we control the value that's going in anyway.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 22:57:18 +00:00
Leah Rowe
3077f51c67
util/nvmutil: use zd for printf in valid_read
...
more portable
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 22:51:50 +00:00
Leah Rowe
cc51ac32d0
util/nvmutil: minor cleanup in usage()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 22:32:24 +00:00
Leah Rowe
ae6db44543
util/nvmutil: minor cleanup in cmd_setmac
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 22:29:21 +00:00
Leah Rowe
8f81ed314a
util/nvmutil: don't use err_if in usage
...
fname isn't set here, and fname is used in err_if
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 22:27:51 +00:00
Leah Rowe
f93a40ecb6
util/nvmutil: rename errval to nvm_errval
...
strtonum implementations in bsd sometimes have this
variable name. rename it to avoid conflict.
also removed the commentt errno values, since i'm
only ever setting it to valid values, as are the
syscalls that i'm using, so it should be ok.
i'm not writing a stub to check errno. that would
be far beyond the scope of nvmutil.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 21:51:13 +00:00
Leah Rowe
21b8de87ff
util/nvmutil: re-try reads if errno is EINTR
...
this is a bit of fault tolerance. a bit bloated too,
but it should make the code more resilient.
we limited the number of retries to 200 retries.
EINTR is when the syscall (read/pread) is interrupted.
we still error out on other conditions; we also still
error out on EINTR if the number of re-tries surpasses
200.
during this re-try loop, if *another* error occurs, we
exit as normal. this is done for both files: the gbe
file, and /dev/urandom.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 21:43:32 +00:00
Leah Rowe
493e3cf069
util/nvmutil: explicitly cast on read/pread/pwrite
...
these functions return ssize_t, so compare explicitly
to that, when using the SIZE_4KB define for example.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 20:38:36 +00:00
Leah Rowe
af5d876bf0
util/nvmutil: remove unnecessary check
...
we can just use errval as argument to set_err,
because set_err itself now properly handles
errno, ensuring that is is never set to zero.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 20:30:52 +00:00
Leah Rowe
418015c232
util/nvmutil: stricter check_bound
...
word/set_word are only meant to operate on the nvm
area (128 bytes), but the current check is against
the entire 4KB block.
swap() only handles the nvm area, as per the design
of nvmutil.
this patch makes the boundary check truer to my real
intent, guarding against future logical errors.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 20:24:26 +00:00
Leah Rowe
80a5b08090
util/nvmutil: set errno only if x is not 0
...
otherwise, some minor edge cases may result in err
printing "success", when we want to signal an error.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 20:15:39 +00:00
Leah Rowe
3f7d89c401
util/nvmutil: consistent errors on close()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:59:35 +00:00
Leah Rowe
fd515e4c28
util/nvmutil: print correct file name for urandom
...
err_if reports fname, not /dev/urandom
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:53:09 +00:00
Leah Rowe
f4e477b549
util/nvmutil: don't bother with strncmp
...
these are strings provided from the shell, which are
guaranteed to always be null-terminated.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:51:25 +00:00
Leah Rowe
687e64a359
util/nvmutil: get rid of arg_cmd
...
it's pointless.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:48:48 +00:00
Leah Rowe
776eee721d
util/nvmutil: use memcpy in word/set_word
...
alignment isn't an issue, but aliasing between uintX_t
types in C means that this code may fail on some weird
systems.
using memcpy here is advisable.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:41:21 +00:00
Leah Rowe
d88991f6bc
util/nvmutil: use strncmp instead of strcmp
...
set a constant maximum length. this seems reasonable,
and it's even quite generous.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:18:47 +00:00
Leah Rowe
bf081914a3
util/nvmutil: remove checkdir()
...
we don't need it. what follows is a call to open(), which
would fail anyway if the path is a directory; further, this
removes a theoretical race condition in the program, and
makes open() happen sooner, making it more likely that we
get the file first, before another program can take it.
checking whether /dev/urandom is a directory is the height
of absurdity.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:11:20 +00:00
Leah Rowe
4325214d82
util/nvmutil: make rhex err_if consistent
...
n + 1 is the same as saying sizeof(rnum) in this case.
we should be clear about that, in code. n is irrelevant
here, since it is only an index for the return value.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:03:58 +00:00
Leah Rowe
668dec36e9
util/nvmutil rhex: check against sizeof(rnum)
...
checking against -1 is incorrect, because we specifically want
to ensure that it always read the number of bytes defined by
the size of rnum.
this still covers the case where the return value is -1, and
therefore makes the error handling much stricter.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 19:00:14 +00:00
Leah Rowe
4775bb2348
util/nvmutil err: filter errval when zero
...
default to ECANCELED if zero
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 18:54:58 +00:00
Leah Rowe
634f4a685d
util/nvmutil: always exit non-zero on err
...
the way err works here now is very different than
the bsd one. here, we ALWAYS exit with EXIT_FAILURE,
and we call set_err with, as argument, the first
argument given to err.
this then sets errno, but the exit value is always
consistent.
that's what happens when i control err(). i make it
even better. the original bsd one is too conservative.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 18:47:14 +00:00
Leah Rowe
3af94efc16
util/nvmutil: more consistent output in usage()
...
and use getnvmprogname
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 18:03:27 +00:00
Leah Rowe
2faea7d890
util/nvmutil: use getnvmprogname in usage
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 18:00:19 +00:00
Leah Rowe
9b18d11878
util/nvmutil: use own implementation of err
...
and getprogname, written as getnvmprogname
this removes a dependency on err.h, which is non-standard.
the remaining code is posix-compliant, or ifdef'd where
use of openbsd pledge is concerned - someone could theoretically
define __OpenBSD__ that isn't and OpenBSD base maintainer, and
then use nvmutil in it, but i so don't care about that evermore
hypothetical individual.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 17:57:27 +00:00
Leah Rowe
0a08045f92
util/nvmutil: close rfd on exit
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 17:30:55 +00:00
Leah Rowe
7c0eb780a9
util/nvmutil: remove unnecessary include
...
dirent.h is no longer needed, because i'm no longer
making use of opendir()
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 17:13:03 +00:00
Leah Rowe
8faa36eb64
util/nvmutil: tidy up write_gbe
...
by handling close() in main, we can reduce the
indendation in write_gbe and generally make it
much easier to read.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 17:09:33 +00:00
Leah Rowe
86665c9d22
util/nvmutil: make the part check easier to read
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:53:01 +00:00
Leah Rowe
531f0c9d38
util/nvmutil: fix style inconsistency
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:45:54 +00:00
Leah Rowe
b03a532c7d
util/nvmutil: use braces on nested ifs
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:43:48 +00:00
Leah Rowe
5bae73c319
util/nvmutil: remove unnecessary global assignment
...
these integers are already initialised to zero.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:39:19 +00:00
Leah Rowe
faf28691b8
util/nvmutil: make swap() easier to understand
...
the swap function reverses the byte order in memory, of
a loaded GbE after after reading it, or before writing
it. this is required (as detected) on big-endian CPUs,
because GbE files store bytes in little-endian order.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:37:55 +00:00
Leah Rowe
624589fcb1
util/nvmutil: declare arg_cmd earlier
...
set it after the argc check
i don't like initialising a const after
declaration, but it compiles, and it keeps
with the style used in the rest of the code.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:29:40 +00:00
Leah Rowe
3983dc44f4
util/nvmutil: don't make op a typedef
...
it's not required
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:26:58 +00:00
Leah Rowe
49c2940421
util/nvmutil: fix arg_cmd initialisation
...
i declare it, using the 3rd argument, which might
not be available if only the file name is declared.
this fixes that.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:20:51 +00:00
Leah Rowe
61fa94d0d2
util/nvmutil: remove COMMAND, MAC_ADDRESS, PARTN
...
these macros serve no purpose except to obfuscate the
code. it's actually cleaner just to refer directly to
argv, and it reduces the chance of contamination later
upon re-factoring.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:15:33 +00:00
Leah Rowe
b3119c8b4d
util/nvmutil: rename op_t to op
...
and op to ops
typedefs not part of any base system e.g. openbsd
base system, or e.g. the libc, should not have _t
in them.
this is a stylistic change, and does not alter any
actual program behaviour.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:06:02 +00:00
Leah Rowe
f03570b674
util/nvmutil: make op a const
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:04:43 +00:00
Leah Rowe
d267cd36cc
util/nvmutil: remove redundant comment
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 16:03:23 +00:00
Leah Rowe
7fefeba076
util/nvmutil: use const char in usage
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:58:46 +00:00
Leah Rowe
f1ee2ff630
util/nvmutil: tidy up set_cmd
...
reduced indentation
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:56:06 +00:00
Leah Rowe
6d8cf8909f
util/nvmutil: split up set_cmd
...
the second half of the function is mostly checking
arguments, and has the hack to set cmd to cmd_setmac
if cmd is unset (no command specified) but argc is
above two.
stylistically, this is more consistent.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:50:20 +00:00
Leah Rowe
9f12aa3b91
util/nvmutil: tidy up final cmd check in set_cmd
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:47:01 +00:00
Leah Rowe
572b7758cf
util/nvmutil: tidy up rhex
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:43:11 +00:00
Leah Rowe
403fd260b5
util/nvmutil: reduce the size of rnum to 12
...
we only need 12 bytes at a maximum
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:41:21 +00:00
Leah Rowe
d9d628e146
util/nvmutil: tidy up check_mac_separator
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:40:33 +00:00
Leah Rowe
036ac6dc39
util/nvmutil: rename openFiles to open_files
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:31:31 +00:00
Leah Rowe
48638e9a22
util/nvm: make variables and functions static
...
i don't intend for this to be used in a library
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:20:20 +00:00
Leah Rowe
dbfd77b388
util/nvmutil: don't use spaces on err_if
...
this is inconsistent with the style in the rest of
the code.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:08:57 +00:00
Leah Rowe
bfb77077b3
util/nvmutil: use const for string literal in op
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:06:39 +00:00
Leah Rowe
a8a9ce32f1
util/nvmutil: no designated initialisers in op
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:04:39 +00:00
Leah Rowe
5517cf923b
util/nvmutil: declare one prototype per line
...
in the same order that functions are declared
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 15:02:15 +00:00
Leah Rowe
e4e5022ab3
util/nvmutil: don't declare variables in for loops
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:50:33 +00:00
Leah Rowe
198843c2e3
util/nvmutil: use size_t on op for loop
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:43:16 +00:00
Leah Rowe
4edcc26849
util/nvmutil: make global variable names clearer
...
each variable is declared on its own line.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:37:10 +00:00
Leah Rowe
91879b7606
util/nvmutil: count the number of items in op
...
don't hardcode it
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:33:46 +00:00
Leah Rowe
d37726c353
util/nvmutil: set fname earlier
...
this fixes the bug where if you specify an invalid command
such as:
./nvm gbe brick 9
part 9 doesn't exist, but fname isn't yet set, here.
same thing applys when running those pledge commands on
openbsd.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:24:19 +00:00
Leah Rowe
65a2f352ee
util/nvmutil: obey the 79-character rule
...
only 79 characters or less, per line.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:15:36 +00:00
Leah Rowe
b8091c7bdc
util/nvmutil: use spaces when calling err_if
...
this is separate from other function calls. err_if
is used as though it was an if, where we always add
a space. it's just a quirk of my coding style.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:14:06 +00:00
Leah Rowe
23cdfdd00a
util/nvmutil: consistent variable/function naming
...
use the same naming scheme throughout
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 14:12:52 +00:00
Leah Rowe
8812a17683
util/nvmutil: use the invert in goodChecksum
...
this way, the correct part number is printed when an invalid
part is being operated on, in cmd copy or swap.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 13:38:39 +00:00
Leah Rowe
3bdefad097
util/nvmutil: readGbe: use inverted part in swap
...
i overlooked this in a previous modification
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 13:23:20 +00:00
Leah Rowe
50942a7a15
util/nvmutil: clean up write_mac_part
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 13:19:22 +00:00
Leah Rowe
d4231e27fa
util/nvmutil: clean up cmd_dump
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 13:17:21 +00:00
Leah Rowe
9044b55c48
util/nvmutil: don't copy data in copy/swap
...
instead, use a single integer, set to 1 if using
these commands (otherwise set to 0) used as an XOR
mask.
use this to invert where data gets read. one quirk
with this is that if a copy operation is performed
from a part with a bad checksum, it's already done
in advance, in memory, but then the check on the
checksum in cmd_copy is now checking the other part,
which will be all zeroes, so i invert that too; this
means now when running cmd_copy, it'll complain about
an invalid part, but the part number is inverted.
it's a small price to pay, because this restores the
previous performance optimisations but without being
as unsafe.
this is also true when doing the swap.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 13:07:39 +00:00
Leah Rowe
98bc523274
util/nvmutil: re-introduce do_read in readGbe
...
lots of block devices use 4KB block size. it makes
sense to have this optimisation here.
i previously removed it, along with the one that
only reads the NVM area - that one is still gone,
because it was largely pointless.
because of this modification returning, i also
re-introduced the check in setWord against
nvmPartModified - otherwise, for example, running
cmd brick 0 would brick part 0 but then write
all zeroes to part 1.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 12:40:50 +00:00
Leah Rowe
6770fa8ef2
util/nvmutil: use read, not pread, on /dev/urandom
...
we always read from offset zero, so use read
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 12:31:53 +00:00
Leah Rowe
188a3d012b
util/nvmutil: clean up checkdir
...
those lines at the end are a hangover from the old opendir-
based implementation.
i also made the output more verbose in that first error
check.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 04:17:25 +00:00
Leah Rowe
c64324467f
util/nvmutil: use separate st variable for urandom
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 04:13:21 +00:00
Leah Rowe
1c10eb524f
util/nvmutil: cleaner directory checking
...
opendir allocates resources and causes a bunch of other
error conditions which we need to catch.
use of stat is more efficient here.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 04:11:29 +00:00
Leah Rowe
b8e0513123
util/nvmutil: initialise fname to empty string
...
otherwise, early calls to err_if make use of a NULL string
inside err()
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:57:39 +00:00
Leah Rowe
de5087bbd5
util/nvmutil: fix code formatting on xopen
...
it still had some leftovers from the old macro-style
implementation. it still compiled, but this patch
fixes the function properly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:55:12 +00:00
Leah Rowe
efe2635c12
nvmutil: fix the swap function
...
irrelevant for most users, who are on little endian
anyway, but i broke the swap function on big endian
systems. this fixes it.
the new function uses an intermediate variable instead
of xor swapping, but i accidentally left some relics of
of the old xor swaps in place. this fixes that.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:50:22 +00:00
Leah Rowe
c721d6f4f4
util/nvmutil: use EXIT_FAILURE/SUCCESS for exits
...
this, in conjunction with the centralised exit scheme now
used by nvmutil, means that we have portable exit status.
notwithstanding the use of non-portable unix functions, and
especially the use of non-standard err.c (which GNU and BSD
libc implementations all have anyway, as does musl).
this code should now run on essentially any computer with
Linux or BSD on it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:43:06 +00:00
Leah Rowe
e4b8bb4875
util/nvmutil: make err_if a function, not a macro
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:38:45 +00:00
Leah Rowe
c98d5c743f
util/nvmutil: properly cast void use of set_err
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:35:37 +00:00
Leah Rowe
7213bba0c5
util/nvmutil: don't exit with errno as status
...
exit with 0 or 1, as is proper.
errno is an int, but the return value on a shell
can be e.g. byte, and depending how that number (errno)
is valued, could overflow and cause a zero exit, where
you want a non-zero exit.
the code has been changed, in such a way to maintain
current behaviour (don't change errno), except that when
errno is set upon exit, the exit value is now one.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 03:31:09 +00:00
Leah Rowe
490f311d05
util/nvmutil: split up cmd_setmac
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 02:50:03 +00:00
Leah Rowe
3cbaa7ead8
util/nvmutil: rename some functions for clarity
...
also re-order the prototypes
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 02:32:42 +00:00
Leah Rowe
707fabab38
util/nvmutil: split up parseMacString
...
split it into smaller, more readable functions
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 02:25:11 +00:00
Leah Rowe
d9c307d5a3
util/nvmutil: remove useless gbe variable
...
use buf directly
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 01:50:21 +00:00
Leah Rowe
a7cc8143a7
util/nvmutil: cmd copy/swap: use word/setWord
...
this means that we make use of the boundary checks. it's just
a safer way of handling these functions.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 01:18:23 +00:00
Leah Rowe
566ae72ca3
util/nvmutil: remove variable nvmPartChanged
...
pointless optimisation. we know that when a user requests an
operation that would write, it will probably result in a change.
therefore, this change is the real optimisation. to avoid
writing the same half of a file twice, when using cmd_copy,
we check (in writeGbe) whether gbe part 0 and 1 are the same;
if they are, then we only loop once. this is important, because
otherwise we would call swap() twice.
this means that the optimisations in cmd_copy and cmd_swap must
be removed. the point of this and other changes is to improve
memory safety in nvmutil, so frivolous use of pointers has to go.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 01:07:59 +00:00
Leah Rowe
dfbb3c5d9e
util/nvmutil: merge nvmalloc with readGbe
...
it's so simply now, all it does is set the gbe pointers
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 00:41:05 +00:00
Leah Rowe
2b01e023ab
util/nvmutil: remove do_read
...
pointless code complication, that doesn't yield a noticeable
performance increase.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 00:40:07 +00:00
Leah Rowe
1bfc89e3ad
util/nvmutil: read in fixed 4KB blocks
...
modern file systems work in 4KB blocks. reading only
a small part of it doesn't really make much difference
in terms of performance.
simplify the code instead.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 00:34:31 +00:00
Leah Rowe
1d078c9daf
util/nvmutil: use fixed buffer
...
modern malloc implementations make the optimisation here
pretty pointless.
modern computers make this modification pointless.
i'm not planning to run nvmutil on a VAX. openbsd removed
support for it ages ago. 8KB fixed buffer is fine.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 00:20:16 +00:00
Leah Rowe
0ccb790fc0
util/nvmutil: remove pointless arg in openFiles
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-03 00:11:49 +00:00
Leah Rowe
6dd91134bd
util/nvmutil: don't use xor swap
...
it doesn't save any time on modern systems, and it's just
confusing for some people to read. i mean, i understand it
instinctively, but normal people do it with a swap variable.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 23:29:00 +00:00
Leah Rowe
53e386d2b5
util/nvmutil: don't use size_t as pointer
...
the only reason i did this was for that xor swap, but we
can just use an intermediary value
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 23:26:02 +00:00
Leah Rowe
3248b8f651
util/nvmutil: don't capitalise set_err
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 23:04:03 +00:00
Leah Rowe
d3ca9946a9
util/nvmutil: make xopen a function, not a macro
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 23:02:53 +00:00
Leah Rowe
761968e3c4
util/nvmutil: merge block_unveil back with main
...
we always want unveil/pledge calls to be in main, when
possible, so that they are more transparent and easier
to understand when re-factoring, because it's extremely
important that these syscalls be done correctly.
main is small enough now, from other re-factoring changes,
that i'm happy to have this back in main now.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 22:30:19 +00:00
Leah Rowe
589ac92781
util/nvmutil: fix bad bound check
...
the current check is too liberal. make it sticter.
the issue is that the previous check did not take
into account that it's a check on a uint16_t array,
against nf which refers to a number of bytes.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:47:58 +00:00
Leah Rowe
51e4e43c94
util/nvmutil: tidy up the xopen macro
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:41:10 +00:00
Leah Rowe
a34e79f501
util/nvmutil: add boundary checks on word/setWord
...
this was the other complication with doing it as a macro.
for something this fundamental, we really want to ensure
that every access is safe.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:35:00 +00:00
Leah Rowe
4e7d48b5c5
util/nvmutil: make word/setWord a function
...
having this as a macro makes the code quite brittle.
better to have it as a function.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:34:37 +00:00
Leah Rowe
8707695184
util/nvmutil: rename openGbeFile to openFiles
...
merge the urandom handling back into this function.
it's called immediately after in main anyway, so we
may as well. this reduces the size of main.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:06:57 +00:00
Leah Rowe
c4138752c3
util/nvmutil: remove redundant unveil call
...
in the given call, we then do an equivalent call
immediately after that is the same, but without
unveil, so we'll just defer to that.
this changes no behaviour.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:03:00 +00:00
Leah Rowe
a4fe1bfa4d
util/nvmutil: call block_unveil earlier
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 17:01:41 +00:00
Leah Rowe
ea1a9bc786
util/nvmutil: bring pledge in set_io_flag to main
...
in general, we should ensure that the pledge calls only happen
inside main. this means we can more easily see them, in future
re-factoring.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 16:57:50 +00:00
Leah Rowe
46b6b1feb3
util/nvmutil: call set_cmd much earlier
...
this will enable hardening of the pledge syscalls.
it also means that the program will error out much
earlier, when an invalid command is given, rather
than opening a bunch of files first, and it will
do so under reduced privilege already, notwithstanding
the further pledge/unveil hardening that is planned.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 16:46:20 +00:00
Leah Rowe
0106c38217
util/nvmutil: unveil /dev/urandom much earlier
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 16:41:06 +00:00
Leah Rowe
58cf5a1579
util/nvmutil: split xopen handling
...
same as the previous change. i'm going to harden the unveil
and pledge calls next.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 16:38:09 +00:00
Leah Rowe
e5d7c3e3a2
util/nvmutil: split unveil handling
...
urandom in main. this is because i'm going to further
harden the use of pledge and unveil in a future patch,
and this is a prerequisite.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 16:34:59 +00:00
Leah Rowe
896f0ea1df
util/nvmutil: split cmd init to new function
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 16:34:18 +00:00
Leah Rowe
697eda800a
util/nvmutil: split flags init to new function
...
main is getting much smaller now
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 12:55:57 +00:00
Leah Rowe
ab057e006c
util/nvmutil: tidy up main()
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 12:50:18 +00:00
Leah Rowe
6de3968f2b
util/nvmutil: split unveil code to new function
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 12:18:23 +00:00
Leah Rowe
9c23eac148
util/nvmutil: separate usage function
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-02 12:17:07 +00:00
Leah Rowe
7e81c5c630
Re-add x230_12mb corebootfb config
...
also for other variants
i removed it because it was reported broken. it's not.
the removal was always temporary, pending further testing.
next time, i will be more sceptical.
everything works fine.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-26 00:58:06 +00:00
Leah Rowe
1d20042f9a
nvmutil: simplify readGbe and writeGbe
...
the for loop only contains one line
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 14:22:35 +00:00
Leah Rowe
5a414ea4d6
nvmutil: centralise all errno handling
...
do it in the macro. this way, if a given error is
present, it's not overridden. this enables easier
debugging.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 14:01:11 +00:00
Leah Rowe
c64a2655e9
nvmutil: rename ERR to SET_ERR, for clarity
...
i renamed filename to fname, so that certain lines would
still fit within 80 characters without introducing a new
line break.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 13:49:16 +00:00
Leah Rowe
678b9d859b
nvmutil: split pread from readGbe
...
split it into readGbe_part, for code clarity.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 13:45:28 +00:00
Leah Rowe
e1d8773c54
nvmutil: split pwrite handling from writeGbe
...
handle it in a separate function, for clarity.
the main function just checks each part whether it
changed, and then passes control to writeGbe_part.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 13:42:27 +00:00
Leah Rowe
261c41a3c3
nvmutil: simplify a few else statements
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 13:34:35 +00:00
Leah Rowe
8cf2558a6f
nvmutil: don't hardcode errno to ECANCELED
...
use the ERR macro instead, so that an existing value
will not be overridden. this is useful for debugging.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 13:30:15 +00:00
Leah Rowe
50de561ac4
nvmutil: explain a few parts in nvmalloc
...
the current code is optimised for speed, but it's a bit
esoteric, so make it easier to understand.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 11:13:09 +00:00
Leah Rowe
061e6048a8
nvmutil: split malloc handling out of readGbe
...
this has to do with memory allocation, not actual reading
of the gbe file into memory. split it up, for clarity.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 11:10:12 +00:00
Leah Rowe
3d408317b1
nvmutil: further simplify nr/nw error handling
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 11:01:52 +00:00
Leah Rowe
35d8d0993f
util/nvmutil: simplify nr/nw error handling
...
when nf and nr/nw are not the same, we know there
is an error condition, so defer to the following err()
call, but use ERR() there instead of hardcoding use
of ECANCELED.
this actually improves the error handling, by being
more verbose, while reducing the amount of logic.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 09:50:26 +00:00
Leah Rowe
4473179300
util/nvmutil: remove pointless diagnostics
...
we only need to know the number of bytes written or
read under error conditions.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 09:47:36 +00:00
Leah Rowe
45413f1209
util/nvmutil: say part number on read/write report
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-23 09:34:51 +00:00
Leah Rowe
a55af90b6c
vendor.sh: handle mfs in find_me
...
This makes the argument handling easier to understand,
since other arguments are also handled in find_me
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-22 17:18:51 +00:00
Leah Rowe
a938309d35
vendor.sh: handle me_cleaner -p separately
...
this is a special mode that skips FPTR checks, which is
needed on the topton x2e_n150
we currently set this, when MEclean="n", but we may want to
skip cleaning while still checking FPTR on some boards (in
a future lbmk revision)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-22 17:15:24 +00:00
Leah Rowe
177f45355f
vendor.sh: tidied up mecleaner argument handling
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-22 17:06:12 +00:00
Leah Rowe
182c1cd699
Merge pull request 'Provide x270 patch for correct VBT and HDA verb' ( #405 ) from kittywitch/lbmk:x270-patch into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/405
2026-02-22 09:10:47 +01:00
Kat Inskip
913efaebe6
Provide x270 patch for correct VBT and HDA verb
2026-02-21 19:58:12 +00:00
Leah Rowe
0f93368ea0
get.sh: properly initialise _ua
...
it is currently only initialised inside case
conditions. this is fine on most shells, but
some of them can be a bit buggy here.
initialise it empty and then override.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-21 17:44:01 +00:00
Leah Rowe
4021617430
g43t_am3: make it 2mb, not 4mb
...
idk why i made it 4
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-21 16:28:17 +00:00
Leah Rowe
006571187b
remove release=n on x270 port
...
this is a hangover from an earlier work, where we
had some issues prior to merging.
as it is, the port is ready for a future release.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-21 08:33:08 +00:00
Leah Rowe
2edd583aee
Add ThinkPad X270 coreboot port from Kat Inskip
...
Courtesy of Kat Inskip who ported this board.
Headphone output doesn't work at the moment, due to incorrect verb.
Intel VBT is also wrong. Both are taken from another board.
This will be amended later with the correct verb and VBT.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-21 08:26:44 +00:00
Leah Rowe
1068acd2c0
coreboot/default: new rev ed5a993f
...
latest coreboot rev as of literally today
this is in preparation for a thinkpad x270 port
using a WIP patch that was contributed
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-19 15:36:22 +00:00
Leah Rowe
e6d9b82c62
Merge pull request 'supermicro x11ssh_f: Use deguard-configured ME image instead of SPS and disable ME HECI in devicetree' ( #404 ) from noisytoot/supermicro-x11ssh-f into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/404
2026-02-19 15:35:59 +01:00
Leah Rowe
a2c5715589
util/grubpo: new util, for grub PO files
...
this is the program I recently wrote, that generated
the submodule entries for the GRUB PO file fix
this utility is for reference only. i'll probably do
away with the fix at some point, replacing it with
my own git-based submodule repository, containing the
PO files. this would make things easier, and then
that repository would contain the utility instead.
i'm just putting this in lbmk for now, so that we
have it somewhere.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-19 12:24:47 +00:00
Leah Rowe
5a8ad2d311
util/nvmutil: general code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-19 12:23:57 +00:00
Leah Rowe
a95cf1feeb
util/spkmodem_recv: general code cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-19 12:21:35 +00:00
Ron Nazarov
47bf8e69e8
supermicro x11ssh_f: Remove release="n"
...
Since we have redundant downloads for the ME image now, it's no longer
required.
2026-02-14 20:59:14 +00:00
Ron Nazarov
1017f16c3e
supermicro x11ssh_f: Disable ME HECI in devicetree
...
Since we always use me_cleaner, this speeds up boot time by preventing
coreboot from wasting a few seconds waiting for HECI.
2026-02-14 20:17:41 +00:00
Ron Nazarov
80be5ce87e
supermicro x11ssh_f: Use deguard-configured ME image instead of SPS
...
Using the same ME image as the 3050 Micro. This fixes the lack of a
backup download URL for the ME and speeds up boot time, since MRC
caching is working with ME (unlike SPS).
Unfortunately, since the MFS partition must be preserved, this does
mean we need a larger ME region than with me_cleaned SPS.
2026-02-14 20:00:14 +00:00
Ron Nazarov
3c416c6396
Delete unused config/ifd/supermicro-x11-lga1151-series directory
...
Left over from the hyphen -> underscore renaming commit.
2026-02-14 19:46:04 +00:00
Leah Rowe
d5a1de820b
supermicro x11ssh_f: set release="n"
...
the lack of redundancy in Intel ME downloading is a current
release blocker with this board, so set it to release=n for
now.
it is quite possible to use deguard on this board, which does
have redundant downloading when used with lbmk.
although the board doesn't have bootguard, it is still possible
to use deguard. you can configure the generic ME image that it
fetches, and reconfigure it for each machine.
i've asked ron to look into this, on their test board.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-14 12:58:06 +00:00
Leah Rowe
c0399adab3
supermicro x11ssh_f: use underscores in dir names
...
i don't like hyphens in file names, because of how lbmk
has historically handled directories and files in the past;
i've removed a lot of eval statements, to the extent that
it's no longer likely to be a problem (it's barely used now),
but i previously had a problem with using hyphens in config
names.
this design flaw (in lbmk) was fixed ages ago, but i still
maintain this policy. since that time, i use hyphens only.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-14 12:58:01 +00:00
Leah Rowe
a14fbfd23a
Merge pull request 'Added Danish Keymap dkqwerty.gkb' ( #402 ) from nieldk/lbmk:master into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/402
2026-02-14 12:15:57 +01:00
Leah Rowe
fb754a187c
Merge pull request 'Add Supermicro X11SSH-F/LN4F port' ( #403 ) from noisytoot/supermicro-x11ssh-f into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/403
2026-02-14 12:15:06 +01:00
Ron Nazarov
2e98da9688
Add Supermicro X11SSH-F/LN4F port
...
Surprisingly, SeaBIOS VGA output works (coreboot documentation says it
doesn't).
I'm using a static CMOS option table currently (like most other boards
supported in libreboot), but maybe it would be better to switch to the
CBFS file option table. The default option table enables
hyperthreading, overriding the compile-time setting.
I'm also using a ME/SPS image extracted from the official BIOS update
for this board. Unfortunately, https://www.supermicro.com/Bios/ * is
excluded from crawlers in robots.txt so it's not in archive.org, so I
haven't been able to find a backup download URL. I also needed to set
the user-agent for fetching the update to "curl/8.6.0" because the
default user-agent override used by lbmk resulted in a 403 error.
deguard is not required (there's no bootguard on this board).
SPS does not implement CPU replacement detection which means that the
MRC cache does not work and RAM training needs to happen on every
boot. To avoid this it may be possible to run ME instead of SPS on
this board, but I tried both the ME image used on the OptiPlex 3050
Micro in libreboot and one from the ASRock C236 WSI and they both hung
at "[INFO ] POST: 0x92" (POSTCODE_FSP_MEMORY_INIT).
The memtest86+ build included with libreboot doesn't work with USB
keyboards and this board doesn't have a PS/2 port, which is annoying.
2026-02-14 02:50:42 +00:00
Niel Nielsen
1099d30f7b
Added Danish Keymap dkqwerty.gkb
2026-02-08 15:46:35 +01:00
Leah Rowe
8f128e6728
GRUB: don't download po files in bootstrap
...
The files it downloads are not versioned, and they could
change any time. GRUB has no way to deterministically grab
these.
I've removed GRUB's local for grabbing these, instead
mirroring them myself and checking hashes; no hashes seem
to have been provided by the upstream at Translation Project,
so I just used the hashes I had on the files it had, when
I downloaded them.
From now on, I can just re-download these and re-calculate
the hashes as desired, over time, when updating GRUB revisions.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-02-01 22:09:33 +01:00
Leah Rowe
1cf3181537
Libreboot 26.01 release
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-30 07:14:30 +00:00
Leah Rowe
e42eef2d2a
Merge pull request 'Update config/dependencies/void' ( #400 ) from lucius1664/lbmk:master into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/400
2026-01-30 08:11:39 +01:00
lucius1664
466b01b17e
Update config/dependencies/void
2026-01-27 13:14:22 +01:00
Leah Rowe
bc5e0bbbbb
fix config/submodule/
...
I accidentally removed a bunch of links in a previous change,
that isn't pushed yet.
due to gitignore rules, files in config/submodule/ have to be
added manually using -f with the git add command. as a result,
i need to be very careful when making changes, especially
temporary changes.
lbmk wasn't downloading files properly, because upstreams weren't
defined. this patch fixes that.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-26 06:27:58 +00:00
Leah Rowe
a808333c04
Libreboot 26.01 RC4 Magnanimous Max
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-21 01:20:43 +00:00
Leah Rowe
baeec45f50
use newer ME on e7240
...
i accidentally picked an older version from Dell update
A16. this update uses A29.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-21 01:18:06 +00:00
Leah Rowe
fc2a521446
Libreboot 26.01 RC3 Magnanimous Max
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-21 00:01:38 +00:00
Leah Rowe
e91377b509
cb/default: new rev fcd716d9a2, 14 January 2026
...
This brings the following changes from upstream:
* fcd716d9a2 mb/google/ocelot: Limit Power Limit when battery is missing
* d246e2ca7e tests/Makefile.common: Fix inverted USE_SYSTEM_CMOCKA condition
* e64507638e tests/lib/ux_locales-test: Avoid double quotes in CMUnitTest.name
* 4427a34b6b drivers/intel/fsp2_0: Fix string length handling in timestamp printing
* 40dbe0807d Documentation/mb: Add missing entry for starfighter_mtl
* f070e0add8 mb/starlabs/byte_adl: Fix WOL
* fc20f238f6 mb/starlabs/*: Select DRIVERS_EFI_FW_INFO
* 225e635ea1 soc/amd/common/block/spi: Operate on multiple SPI flashes
* b9bd924847 soc/amd/common/block/spi: Implement boot_device_spi_cs()
* d7d4b67c6a commonlib/mipi/cmd: Remove unnecessary 'const void *' cast
* 5af56ddf92 mb/google/skywalker: Implement lb_board() to pass LB_TAG_PANEL_POWEROFF
* d110cf4669 commonlib/mipi/cmd: Add mipi_panel_get_commands_len()
* 0ee48a475c drivers/mipi: Add power-off commands for TM_TL121BVMS07_00C
* a974b7668e soc/intel/*: Disable InternalGfx w/o iGPU to prevent FSP-M/S crash
* 18ffcafa61 mb/google/bluey/quartz: Adjust PS8820 init sequence
* 532543027a mb/siemens/{mc_ehl6,mc_ehl7}: Configure GPIO GPP_G5 (SD CD) pull-up
* d420e1fb87 mb/siemens/mc_ehl8: Switch from LPSS UART to legacy 8250 I/O UART
* 483c3e51ae mb/siemens/mc_ehl8: Configure I2C and SMB devices
* d810257008 mb/siemens/mc_ehl8: Configure PCIe root ports
* cf2c2555f4 mb/siemens/mc_ehl8: Add new board variant based on mc_ehl1
* a12663fd88 drivers/spi: Allow SoC to provide the SPI flash CS index
* cacc11de4f include/cpu/x86/msr.h: Update return types from int -> bool
* d5fb4becd5 mb/google/nissa/var/yavilla: Update DTT parameters
* 3b18467e8a payloads/ipxe: Unconditionally restore config files post-build
* 4374bbd37b payloads/ipxe: Update and use the stable version
* c0998983d0 ec/google/chromeec: Fix uninitialized buffer in cbi_get_uint32()
* 03b47f947f soc/mediatek: Add mtk_get_mipi_panel_data() API
* 8cfc71d9e0 libpayload: Pass panel power-off commands to payloads
* d94d4b8a25 mb/starlabs/starlite_adl: Add trace length for the card reader
* 0f450a8d9c mb/starlabs/starlite: Set card_reader fallback value to 0
* 94672e2b45 sb/intel/ibexpeak: Remove 6/7 series chipset PCI IDs
* 2fc8051679 util/autoport: Factor out getting sorted Kconfig option names
* 01d82febb2 util/autoport: Separate handling of Kconfig selects
* b7763a5973 mb/google/fatcat: Implement Google Rex touchscreen integration
* 3f5807ce10 mb/siemens/mc_ehl7: Deactivate SATA interface
* 5f76f78383 mb/siemens/mc_ehl7: Deactivate GbE and PSE GbE 0
* b5ad97a268 mb/google/nissa/var/gothrax: Add wifi sar table
* 7351e663d2 mb/google/nissa: Enable early EC SW sync & eSOL for gothrax/epic
* f9b917d391 soc/qualcomm/x1p42100: Relocate CBMEM top below XBL log
* a306987ae4 util/superiotool: Add experimental Nuvoton NPCD378 support
* 139f6c3e64 mb/google/brya/var/redrix: Configure cameras for Windows/Linux ACPI mode
* 3883118ed9 mb/google/brya/var/kano: Configure cameras for Windows/Linux ACPI mode
* ae7b75fb0d mb/lenovo/sklkbl_thinkpad/cfr.c: Fix X280 build error
* 7639118729 drivers/amd/opensil: Add hooks to populate CBMEM_ID_MEMINFO
* 23f0b0b313 util/xcompile/xcompile: Fix clang target parameter
* f712c965e4 payloads/edk2: Update default MrChromebox branch from 2508 to 2511
* b4917ed44d payloads/edk2: rework serial output configuration
* 282c27c95c arch/x86/acpi_bert_storage.c: Allow vendor specific BERT entries
* 00fbc08b76 Reapply "soc/mediatek/mt8196: Call fsp_init via boot state"
* e6c5ee6450 mb/google/hatch/var/kohaku: Add Samsung S-pen driver support
* b890ca0648 mb/google/brya/var/yaviks: select USE_MTCL only if CHROMEOS
* a8737c5f86 mb/google/cyan: Set CBFS_SIZE default to match IFD BIOS size
* 72af15f1de mb/google/zork: Fix missing comma in CFR object list
* 5db16ea6fc soc/intel/pantherlake: Fix incorrect use of logical OR for TDP selection
* 2c58e525e8 soc/intel/ptl: Add ACPI IOST support
* 52aeb078ce soc/intel/common/acpi: Add IOST device
* d62764df87 soc/intel/common/block/p2sb: Add SSDT function for SoC-specific features
* 96b4754c35 soc/intel: Add CPU ID support for Nova Lake
* b741e2274e acpi: Add enums for TPM2 start method
* 6fd865f409 drivers/amd/ftpm: Add fTPM driver for PSP emulated CRB TPMs
* c09352d58d soc/intel/pantherlake: Update PS1 threshold to the latest recommendations
* 093ae8eeaa mb/siemens/mc_ehl7: Enable reboot after HW Watchdog expiry
* ddf4748c22 mb/siemens/mc_ehl7: Deactivate RTC
* e8ac9ffcd9 mb/siemens/mc_ehl7: Add new board variant based on mc_ehl6
* 94e6e5cd0d mb/google/ocelot: Add option to enable VGA mode 12
* fbf0087918 mb/google/ocelot/var/ocicat: Use GPP_F10 for ISH
* f2788e963f device: Rename PCI_EXP_SEC_CAP_ID -> PCI_CAP_ID_SEC_PCIE
* e01baafbe2 include/cper.h: Add check information structures
* a6407000f1 mipi/panel: Add 'poweroff' field to panel_serializable_data
* b4fbc59c6f treewide: Move mipi_panel_parse_commands() to commonlib
* 1d2b399fd7 lib: Rename `fill_lb_framebuffer` to `get_lb_framebuffer`
* 5f86aba4b3 soc/intel/common: Enable high address support for MCHBAR in ACPI
* f00a2ff7b8 arch/x86/ioapic.c: Support 8-bit IOAPIC IDs
* 3c3fbbaabf arch/x86/acpi_bert_storage.c: Remove unused variable
* 9f4132712f soc/intel/alderlake: add chipsetinit support
* a5c0307e9c commonlib/device_tree: Add dt_add_reserved_memory_region helper
* a3a556f05d mb/google/fatcat/var/ruby: Add wifi SAR table
* 8bc1372f72 sb/intel/common/spi: Prevent transfers across 4KiB boundaries
* 95ad028274 drivers/smmstore: Use lookup_store() for memory-mapped reads
* c421847fe2 util/crossgcc: Fix GNAT detection for gnat-15
* 292d7b9d3d Revert "soc/mediatek/mt8196: Call fsp_init via boot state"
* e705c39009 libpayload/arch/arm64/mmu: Add CB_MEM_TAG to usedmem_ranges
* 18a986c5fe soc/amd/cmn/block/cpu/mca: Support MCA_SYND1 and MCA_SYND2
* c45e153dfb mb/google/bluey/var/quartz: Enable PS8820 support
* e303357cb9 soc/qualcomm/x1p42100: Call mainboard Type-C config hook
* f9efe53cb0 mb/google/bluey: Implement PS8820 retimer configuration
* 657bcd32d9 mb/google/bluey: Add Kconfig for PS8820 retimer support
* 17a52ce94e soc/qualcomm/x1p42100: Add mainboard USB Type-C config hook
* 16cb8d0d0c mb/google/bluey: Add power sequencing for USB-C1 retimer
* 5034f8629f soc/intel/common: Add spinlock protection to fast SPI flash operations
* ceaa41c9e4 drv/intel/mipi_camera: Verify SSDB only for camera sensors
* ede97ef9da mb/google/volteer: Add IPUA device and sensor names
* 65cbf312af mb/google/volteer: Convert MIPI camera cfg from static ASL to devicetree
* 2aca802e85 mb/google/brya/acpi/cnvi_bt_reset: Fix BT re-enumeration under Windows
* 524ad684af mb/google/brya/var/taeko: Fix SOF speaker topology selection
* 829b8be432 libpayload: Add bulk with timeout callback to USB
* f4fe5514fe mb/google/ocelot/var/kodkod: Update gpio settings for NC pins
* c7f0697867 coreboot_tables: Add new CBMEM ID to hold the PCI RB aperture info
* 3ded43722a soc/amd/cmn/block/acpi/ivrs: Use less PCI accesses
* 1da7c31810 include/cpu/x86/msr.h: Add MCA related MSRs
* 7deb82d744 mb/google/bluey: Configure QUPV3_0_SE3 and QUPV3_0_SE7 for USB-C0 and USB-C1 Retimer I2C access
* b00d2ad5c2 vc/intel/fsp/fsp2_0/pantherlake: Update PTL FSP headers to FSP 3442.07
* b7ad850fd6 mb/google/bluey: Add percentage symbol to battery level log
* ae48ff8c0b drivers/wwan/fm: Use _EVT method to enhance GPIO event handling
* 7ed7abbd92 acpigen_ps2_keybd: map screenlock
* 6b52f82df2 util/amdfwtool: Remove AMD_FW_GFXIMU_2 entry
* b9145e1588 util/amdfwtool: Remove duplicated AMD_TA_IKEK
* e393fd00a4 include/cper.h: Update cper_ia32x64_context_t
* 14a7a2315e soc/mediatek/mt8196: Call fsp_init via boot state
* 82f9c593ab payloads/libpayload: Add support for RISC-V 64-bit architecture
* 4decc72c23 drivers/intel/touch: Change ELAN device name for Google's Rex touch device
* 17b36286c8 mb/google/hatch/var/kindred: Drop VBT for KLED variant
* cf280eaa7f amdblocks/root_complex.h: Add new IOHC base addresses
* ba0483c94a soc/amd/common/Makefile.mk: Strip quotes from AMDFW_CONFIG_FILE
* b2b1eb3c5a soc/amd/common/block/smn: Add simple SMN I/O accessors
* f8c10eda36 mb/google/nissa/var/gothrax: Add Rayson parts to RAM ID table
* 0c26c4494d mainboard/google/bluey: Enable display clocks and MMCX power rail
* e1e7b9b203 soc/qualcomm/x1p42100: Add API to enable display clocks
* 02e6f2a214 soc/qualcomm/x1p42100: Add API to intialize RPMh resources for display
* dc162f84be soc/qualcomm/common: Add RPMh driver support
* 999dd8905a lib/bootmem: Replace conditional return with assert in bootmem_add_range_from
* eb814f3b12 lib/bootmem: Remove forward declaration of bootmem_range_string
* 6f394ce50d coreboot_tables: Update CB_MEM_TAG and LB_MEM_TAG values to 17
* 6966885290 mb/google/skywalker: Extend MIPI panel delay to meet T3 timing
* 273e84976b mb/asus/p8z77-v: Apply vendor PCH interrupt mapping
* 573c37a518 sio/nuvoton/common: Refactor nuvoton_pnp_*_config_state()
* 0c2a3002d9 mb/asrock/z87_extreme4: Temporarily refactor nuvoton_pnp_*_conf_state()
* 19deb55f02 mb/asrock/fatal1ty_z87_professional: Temporarily refactor nuvoton_pnp_*()
* 3d980dae22 mb/google/nissa/var/rull: Add 3 DDR modules to RAM id table
* 4030fc5f91 device/Kconfig: Gate early libgfxinit default on ChromeOS
* b8402a8dfc src/qualcomm/common: Remove display buffer region declarations
* 7896d94c76 soc/qualcomm/x1p42100: Avoid reserving display buffer region
* fe0e14d716 soc/qualcomm/x1p42100: Skip SHRM meta firmware load in ramdump mode
* 56013ce0ff mainboard/google/bluey: Skip SHRM firmware load/reset in ramdump mode
* b8680d53ac mb/google/ocelot/var/ocicat: Add fw_config definitions with UFSC
* c3ff1addde mb/google/ocelot/var/ocicat: Add WIFI SAR table
* 9b5d985838 mb/google/ocelot/var/ocicat: Update audio settings
* 091e8140ea spd/lp5: Add SPD for RS1G32LO5D2FDB-23BT
* bc240baba5 Documentation: Add method for GRUB2 to load seabios from drive
* 02c57577f3 superio/nuvoton: Add common ACPI ASL code
* 7273a5b932 mb/asus/p8x7x-series: Move CONFIG_SUPERIO_PNP_BASE to sio/nuvoton
* 40eca2934f soc/mediatek/common: Track firmware splash screen rendering completion
* 49d34a6f6c mb/google/skywalker: Add MIPI panel GPIOs via lb_gpio
* b354b49d58 libpayload: Increase SYSINFO_MAX_GPIOS to 10
* 25d159a7ec mb/google/skywalker: Use FW_CONFIG for storage and dual init support
* 4063a4c3f1 mb/google/skywalker: Create variant Mace
* a1e9cd3669 mb/google/bluey: Configure QUPV3_2_SE4 for ADSP I2C access
* 2b9653cf34 arch/x86/acpi_bert_storage.c: rename check -> proc_err_info
* a3236ef110 arch/x86/acpi_bert_storage.c: Fix array size calculation
* e3fc4a1f69 ec/starlabs/merlin: Reorganize Kconfig and guard options properly
* 4a07174d0e util/cbfstool: Fix RISC-V relocations
* d912ae91b0 mb/google/bluey: Configure GPIOs for USB camera
* a27a7f0c11 mb/google/trulo/var/kaladin: Decrease G2 touch stop delay time to 150 ms
* 3bebadd347 mb/google/bluey: Enable dynamic SoC calculation and log battery level
* bab8ca2bd0 ec/google/chromeec: Refactor Battery SoC calculation
* 02b3674198 ec/google/chromeec: Add SoC calculation from battery dynamic info
* 06c83d473b ec/google/chromeec: Add function to read battery state of charge
* 7c3d45d94f drivers/usb/intel_bluetooth: Correct S-state level for power resource
* 091ac10059 soc/intel/cnvi: Correct S-state level for CNVP
* 4631f94e51 drivers/usb/intel_bluetooth: Advertise D2 for S0W
* ea045bd322 soc/intel/cnvi: Re-enable Bluetooth on reset timeout
* ffac7d90da soc/intel/cnvi: Correct error values for _RST
* f24a2f35bf mb/asrock: Correct vendor name ASROCK to ASRock
* aeb9dcf2fa libpayload: Add new memory type CB_MEM_TAG
* c093b52c20 soc/mediatek: Correct BIAS_ON value to get bias ready
* 531c24cd0a Documentation: Fix typo in 'particularly'
* 331e93cbd2 libpayload/tests: Disable generation of lcov HTML
* 7d38a96c44 mb/google/skywalker: Create variant Vader
* 75333ea7c8 mb/google/bluey: Refactor is_pd_sync_required function
* 3f00ecb05c soc/intel/pantherlake: Add ChromeOS board-specific TDP setting
* 1dfa80f02c soc/intel/pantherlake: Add configurable TDP support
* dc68f5b265 soc/intel/pantherlake: Let common code set PL1 to TDP
* bb3f40627d util/autoport: Fix style issue in generated code
* 94b326469b mb/google/bluey: Increase FW_MAIN_A/B slot size to 8.5MB
* e6c3250912 mipi/panel: Remove pic_width and pic_height from dsc_config
* 456403d9ba soc/mediatek/mt8196: Stop using dsc_config.pic_width
* 7d50f63213 soc/mediatek: Drop mtk_ddp_soc_mode_set()
* 61c9450d62 soc/mediatek/common: Pass dsi_regs to mtk_dsi_cphy_timing()
* ba5b5ea406 soc/mediatek/mt8196: Move DPM and SPM initialization
* 206025754f libpayload/tests: Remove unrecognized flag --ignore-errors inconsistent
* 82c06da584 3rdparty/fsp: Update to upstream master
* c5eecee5e9 mb/google/rex: Add IPUA device and sensor names
* bceb2c83ad mb/{google/intel}: Fix/add missing MIPI camera SSDB lanes_used/link_used
* de4148888c tests: Disable generation of lcov HTML
* 188cd88ac7 soc/mediatek/mt8196: Correct MIPI register control
* 080ca011fe Documentation: Finalize 25.12 release notes
* 695041a9bf mb/starlabs/*: Increase size of SMMSTORE region to 512KB
* 975e48faaf mb/starlabs/starlite_adl: Add CFR option for charge LED brightness
* 951c28c1bf mb/starlabs/starfighter: Add CFR options for power/charge LED brightness
* ab2c69c4f3 mb/starlabs/starbook: Add CFR options for power/charge LED brightness
* 84ff3d3d12 ec/starlabs/merlin: Add charge LED brightness control
* ac170631d5 mb/starlabs/starlite: Fix ddr5 entry
* 0e217cf1d3 soc/mediatek/mt8196: Increase FRAMEBUFFER to 32MiB
* 003ea85115 soc/mediatek/mt8196: Support logo display on DISP_PATH_DUAL_MIPI path
* 7e7ba6fb11 security/lockdown/lockdown.c: option to lock COREBOOT and BOOTBLOCK
* 56a7ae4389 soc/mediatek/mt8196: Notify MCUPM to support MTE
* 7c7feca258 CBFS verification: support Top Swap redundancy
* 739808011a Makefile.mk: don't add bootblock after other files
* cbac0d7a25 Makefile.mk,cpu/intel/fit/Makefile.mk: introduce CBFS_REGIONS
* f773a0faac cpu/intel/fit/Makefile.mk: make FIT in TOPSWAP point at MCU in COREBOOT_TS
* fa80ab0146 src/Kconfig: add MAINBOARD_NEEDS_CMOS_OPTIONS
* 59d438f5c7 mb/google/bluey: Remove GSCVD region from Bluey and BlueyH variants
* 7c4d9e0862 mb/google/*: Update Kconfig names with all known board names
* 35be1ab679 configs: Build test ramstage zstd compressed
* 2d99da12a9 commonlib/bsd: Add zstd support
* 4ca5e9c8c6 rules.h: Add ENV_RAMSTAGE_LOADER
* 0421ef2cd8 util/cbfstool: Add zstd support
* 0302b2ee07 lib/xxhash: Move to commonlib/bsd
* 76e9635346 amdfwread: Parse and print directory sizes
* a3adf4898b mb/google/brya/var/pujjocento: Add 2 Micron modules to RAM id table
* d1e1003217 spd/lp5: Add SPD for MT62F2G32D4DS-031RFWT:C
* d528561130 mb/google/bluey: Use PMIC for off-mode detection
* 65833355ca tests: Disable gcov warnings
* 060d18f070 soc/mediatek/mt8196: Add DSI dual channel
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-20 23:53:12 +00:00
Leah Rowe
86cbf66b78
NEW MAINBOARD: Dell Latitude E7240 from Iru Cai
...
Thank you Iru Cai for this coreboot port.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-20 22:23:10 +00:00
Leah Rowe
a494c3c2e2
Revert "coreboot/default: don't remove fsp files"
...
This reverts commit 2e6f6e2579 .
This was a stupid revert. I don't remember why I even did it.
Better to make the releases *not* take up an extra 100MB per
source file, until I actually need these extra files.
2026-01-20 12:15:45 +00:00
Leah Rowe
f22d4b1c49
u-boot: update configs
...
i did: ./mk -u u-boot
otherwise, building u-boot asks for user input
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-20 12:06:15 +00:00
Leah Rowe
778ae1653a
fix grub version name in xhci_nvme
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-20 12:03:01 +00:00
Leah Rowe
9ea35f3866
Libreboot 26.01 RC2, or: Magnanimous Max
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-20 04:32:50 +00:00
Leah Rowe
b538749c83
remove T480/T580 thunderbolt driver
...
it causes s3 resume to break on t480s
more testing needed across the board(s)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-20 04:32:34 +00:00
Leah Rowe
4e33b40655
re-add deleted grub border patch
...
accidentally deleted it during rebase
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-19 16:33:13 +00:00
Leah Rowe
d22f7f9633
update grub to 2.14
...
This brings these extra changes:
* eaa3b8f0f Bump version to 2.15
* d38d6a1a9 Release 2.14
* 35bfd6c47 build: Add grub-core/tests/crypto_cipher_mode_vectors.h file to EXTRA_DIST
* ac042f3f5 configure: Print a more helpful error if autoconf-archive is not installed
* e37d02158 kern/ieee1275/openfw: Add a check for invalid partition number
* f94eae0f8 grub-mkimage: Do not generate empty SBAT metadata
* 1aa0dd0c0 configure: Defer check for -mcmodel=large until PIC/PIE checks are done
* ff1edd975 util/grub-mkimagexx: Stop generating unaligned appended signatures
* 51ebc6f67 tests: Add functional tests for ecb/cbc helpers
* caaf50b9a osdep/aros/hostdisk: Fix use-after-free bug during MsgPort deletion
* 18f08826f kern/efi/sb: Enable loading GRUB_FILE_TYPE_CRYPTODISK_ENCRYPTION_KEY and GRUB_FILE_TYPE_CRYPTODISK_DETACHED_HEADER
NOTE: This patch was reversed:
* ac042f3f5 configure: Print a more helpful error if autoconf-archive is not installed
Because it quite unhelpfully broke the build.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-19 16:03:51 +00:00
Leah Rowe
21d5050fb4
delete x230* corebootfb configs for now
...
a user reported that there is just a black screen at bootup
in 26.01 rc1 on these, but txtmode works.
only their x230 broke in corebootfb. their t430 and x200 they
tested worked fine.
txtmode works. this bug didn't affect 25.06, according to this
user.
no harm deleting these for now. i'll test it myself later (the
user isn't being very helpful with reporting) and fix whatever
the problem is.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-19 13:47:44 +00:00
Leah Rowe
2e6f6e2579
coreboot/default: don't remove fsp files
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-06 22:18:54 +00:00
Leah Rowe
bbfee155ba
fix fsp extraction for topton x2e n150
...
coreboot updated the fsp file. we know the old one worked,
so no point testing the new one so close to a stable lbmk
release.
i've modified 3rdparty/fsp/ to re-add the old one as another
file, so that other boards are unaffected, and updated the
Kconfig so that the special file is used for x2e n150 only.
more specifically, added a second fsp submodule.
it's a bit dirty, but avoids bloating lbmk.git
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-01-06 22:17:05 +00:00
Leah Rowe
d5351aee37
inject: fix mac address insertion
...
during previous re-factoring, i sorted variable initialisations.
that was all well and good, but prior to that, i initialised
the new_mac string to empty at first, and then to
the "xx" letters; the latter made the first initialisation
redundant, but in the re-factoring, I put the blanking of
the string afterward.
this disabled mac address insertion, because the way the script
works is precisely to avoid mac address insertion when the mac
string is empty. this is used when running the "nuke" command.
silly me.
yes, i'm very silly. very very silly. so silly.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-25 13:41:37 +01:00
Leah Rowe
a59fc6a353
Libreboot 26.01 RC1 Tenacious Tomato
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-25 01:11:59 +01:00
Leah Rowe
b259f3493d
update pcsx-redux openbios
...
use revision:
b745534eb231d3699ec57949f16a9a7bd5b79385
This brings the following upstream changes:
* b745534e Merge pull request #1957 from wheremyfoodat/splash
|\
| * 33adecd6 Merge branch 'main' into splash
| |\
| |/
|/|
* | d01e438e Merge pull request #1979 from nicolasnoble/upgrade-fmt
|\ \
| * | ae8c5cb8 Updating fmt to 12.1.0
|/ /
* | fd9959a8 Merge pull request #1978 from malucard/all
|\ \
| * | 3ecd98e6 change deprecated fmt::localtime to std::localtime
|/ /
| * eec812e3 Nix: Stop using the outdated version of stb from nixpkgs (#7 )
| * 836a0e10 Merge branch 'main' into splash
| |\
| |/
|/|
* | e90d74d6 Merge pull request #1968 from wheremyfoodat/fix-coroutine
|\ \
| * | 62a23f8f Fix coroutine build on AppleClang 17
* | | a56a96be Merge pull request #1974 from njfox/aur-ci-dependencies
|\ \ \
| * | | 98d10525 add --syncdeps to install missing PKGBUILD dependencies
| |/ /
* | | 3c155400 Merge pull request #1977 from aybe/fix-icon-overlay
|\ \ \
| * | | 79de997d Fix spurious folder icon overlay
* | | | 1d573efa Merge pull request #1976 from aybe/fix-missing-directory-extension
|\ \ \ \
| * | | | b13b80c7 Render directory node fully (including extension)
| |/ / /
* | | | 1a678f42 Merge pull request #1975 from aybe/fix-wrong-c-drive
|\ \ \ \
| |/ / /
|/| | |
| * | | c37d0597 Fix C:\ showing current directory
|/ / /
* / / 47d83a2b Padding isos to 2 minutes instead of 2 seconds.
|/ /
* | 718f0912 Merge pull request #1962 from njfox/aur-ci
|\ \
| * \ c70d85e4 Merge branch 'main' into aur-ci
| |\ \
| |/ /
|/| |
* | | 87f8e861 Merge pull request #1964 from nicolasnoble/tpageloc-fix
|\ \ \
| * \ \ acdc7e50 Merge branch 'main' into tpageloc-fix
| |\ \ \
| |/ / /
|/| | |
* | | | a11e5ed6 Merge pull request #1965 from nicolasnoble/brew-hotfix
|\ \ \ \
| * | | | d6e15260 Now fixing psyqo...
| * | | | a7035f32 Fixing OpenBIOS build under 15.2...
| * | | | 909eb220 Also patching gcc now.
| * | | | c319254e Adding zlib patch for binutils on macos...
| * | | | d56b30e3 Derp.
| * | | | 00bd1db0 Upgrading gcc and gdb as well...
| * | | | 27e6fab9 Adding verbose mode.
| * | | | 5cb9084d Restoring readme properly.
| * | | | d911c2b1 Updating to binutils 2.45.
| * | | | a759cb84 Fixing https://github.com/orgs/Homebrew/discussions/6351
|/ / / /
| * / / 6de0f096 Properly returning a TPageLoc on TPageAttr::getPageLoc
|/ / /
| * | 98c53855 Merge branch 'main' into aur-ci
| |\ \
| |/ /
|/| |
* | | a285e14e Merge pull request #1955 from wheremyfoodat/mac-bundle
|\ \ \
| * | | 97b9651b MacOS bundle script: Enable game mode support, list app as game
| * | | 0e0fabf2 MacOS bundle script: Clean up temporary image files
* | | | 1d54cbe6 Merge pull request #1958 from wheremyfoodat/aa64-flush-cache
|\ \ \ \
| * | | | 053eb573 arm64 JIT: Fix broken cache invalidation
| |/ / /
* | | | 52d9ddc5 Merge pull request #1956 from wheremyfoodat/jit-fixes
|\ \ \ \
| * | | | 4dd04425 a64 JIT: Fix setRWX function returning nothing on Apple
| |/ / /
* | | | 4e846d89 Merge pull request #1959 from wheremyfoodat/no-portable
|\ \ \ \
| * | | | 169788fb Add --no-portable flag
| |/ / /
* | | | 7bce4ecd Merge pull request #1960 from wheremyfoodat/remove-dynarec-dump
|\ \ \ \
| * | | | 8c995593 arm64 JIT: Don't unconditionally dump a JIT dump in the user's files
| |/ / /
* | | | 3a8ddc79 Merge pull request #1963 from njfox/openbios-fix-function-signatures
|\ \ \ \
| |/ / /
|/| | |
| * | | 98d9684b move pointer asterisk to be consistent
| * | | e7ad2b1e fix function definitions to include correct argument types
|/ / /
| * | bdaa1fe9 remove duplicate git dependency
| * | 53326672 combine dependency updates/installation and fix indentation
| * | f4d1f073 build against PR and push instead of master
|/ /
| * cdec82a4 Fix VS project files
| * 587ce8e9 GUI: Better splash image, bug fixes
| * 0b73a07a Add splash screen generation script
| * 3c4afbb6 Initial splash image draft
|/
* 4f4a00fe Merge pull request #1953 from cleverca22/fix-submodules
|\
| * 2bc000e8 fix submodules
* | a4d6bcc4 Merge pull request #1954 from yaz0r/gdb_sharedmem
|\ \
| |/
|/|
| * 390ccf63 Address comments
| * 07e9b472 Add monitor command to retrieve the shared memory name. Only for wram so far.
|/
* 1b0cbe5e Merge pull request #1952 from yaz0r/gdbfix
|\
| * b4e77deb Fix GDB packet p (readRegister)
|/
* a2a6d77c Merge pull request #1951 from nicolasnoble/linuxdeploy
|\
| * 2388bcb1 Switching to linuxdeploy.
|/
* ec1154ad Merge pull request #1950 from grumpycoders/revert-1947-appimage-bullshit
|\
| * 5a66d37f Revert "Sorting out yet another AppImage breakage."
|/
* a1f02931 Merge pull request #1940 from Forceh91/patch-1
|\
| * e23f9d01 Re-adding all examples.
| * f1b8694b Fixing test suite.
| * 78b4e9f1 Merge branch 'main' into patch-1
| |\
| |/
|/|
* | b62b506f Merge pull request #1944 from eliasdaler/authoring_quiet
|\ \
| * \ 572e18ba Merge branch 'main' into authoring_quiet
| |\ \
| |/ /
|/| |
* | | cb651973 Merge pull request #1946 from nicolasnoble/pcsx-io-fixes
|\ \ \
| * \ \ fca66d17 Merge branch 'main' into pcsx-io-fixes
| |\ \ \
| |/ / /
|/| | |
* | | | b2066c72 Merge pull request #1947 from nicolasnoble/appimage-bullshit
* | | | e5244aea Sorting out yet another AppImage breakage.
/ / /
* / / e1be0936 Fixing accesses to the pcsx IO system.
/ /
* / 0fbc4206 autoring: add -q option
/
* eaff5ed2 Merge branch 'main' into patch-1
* c0fa3b2f chore: nitpick changes from coderabbit
* 3b3e7986 chore: create readme with community examples
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-24 19:14:43 +01:00
Leah Rowe
a4ad3afdbb
bump flashprog rev: ffcf92fb, December 2025
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-24 19:02:08 +01:00
Leah Rowe
68e0b5dddc
init.sh: Explicitly export UTF-8 locale
...
C.UTF-8, instead of just C.
This fixes a build issue in GRUB on my Arch Linux test bench.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-24 17:16:10 +01:00
Leah Rowe
b990d54cff
grub modules: add more gcry_ ciphers
...
Since the libgcrypt update in GRUB, which imported
GNU's own Argon2 implementation, other ciphers have
also been introduced.
This patch adds them to lbmk's GRUB build.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-24 02:35:30 +01:00
Leah Rowe
5df6b924d7
bump seabios revision
...
by the time i'd done this, i'd realised that seabios only
modified some documentation upstream. the code has not
changed since last update, upstream.
no point scrapping the update now. now we have slightly
better documentation for seabios!
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-24 01:58:24 +01:00
Leah Rowe
9228a0c02c
update grub again, to 25b7f6b93
...
i had a build error before, when trying this absolute
most up to dave revision.
i found that it was this patch:
commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960
Author: Nicholas Vinson <nvinson234@gmail.com >
Date: Tue Nov 18 19:38:07 2025 -0500
For now, I just revert it.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-24 01:47:28 +01:00
Leah Rowe
512cce0770
GRUB: update to rev 2.14-rc1 December 2025
...
The argon2 patches were dropped (PHC implementation),
because GRUB has now its own Argon2 KDF implementation
as part of its recent libgcrypt update.
Argon2 support is therefore retained, but GNU's implementation
has replaced the one that Libreboot previously used.
This brings in the following upstream changes:
* 280715ec6 Release 2.14~rc1
* e549317e1 windows: Fix symbol table generation during module conversion from PE to ELF
* a340750f9 windows: Fix relocation sections generation during module conversion from PE to ELF
* c602035a9 loader/efi/linux: Fix compile error with Clang
* f62269767 build: Add tpm2key.asn file for reference to dist archive
* 46be4488f build: Include new zstd test support files in dist archive
* fa79d5ea9 build: Include MAINTAINERS and SECURITY files in dist archive
* 8271bcc13 build: Add appended signatures header file to EXTRA_DIST
* 11845da2b lib/xzembed/xz_dec_stream: Replace grub_memcpy() call with memcpy()
* 7ded35fea bootstrap: Fix patching warnings
* 4129e9ad6 tss2: Always init out buffer before calling tpm2_submit_command_real()
* 000e48b42 fs/ntfs: Correct next_attribute validation
* 5ff9c43cf kern/ieee1275/init: Use net config for boot location instead of firmware bootpath
* c2cae77ab net/tftp: Fix NULL pointer dereference in grub_net_udp_close()
* fadc94b91 net/dns: Prevent UAF and double free
* cd24e2591 net/bootp: Prevent a UAF in network interface unregister
* fca6c0afd docs: Document lsmemregions and memtools commands
* 42c099786 commands/memtools: Add lsmemregions command
* 20211246a tests/file_filter: Add zstd tests
* 092449f63 tests/file_filter: Add zstd test file
* 356dcac9a tests/file_filter: Regenerate gpg keys
* 8ea83c3ee io/zstdio: Implement zstdio decompression
* 7c22c1000 fs/btrfs: Update doc link for bootloader support
* 6435551a6 docs: Add Btrfs env block and special env vars
* b63447748 util/grub.d/00_header.in: Wire grub.cfg to use env_block when present
* e4e177661 fs/btrfs: Add environment block to reserved header area
* d6525f0e6 util/grub-editenv: Add probe call for external envblk
* 4b5ea8dca util/grub-editenv: Wire list_variables() to optional fs_envblk
* 84e2bc2f1 util/grub-editenv: Wire unset_variables() to optional fs_envblk
* c7c901916 util/grub-editenv: Wire set_variables() to optional fs_envblk
* 2abdd8cd2 util/grub-editenv: Add fs_envblk write helper
* e4d684cc4 util/grub-editenv: Add fs_envblk open helper
* 512e33ec7 tests: Add "z" length modifier printf tests
* 3c9762b12 kern/misc: Add the "z" length modifier support
* 91ddada64 disk/cryptodisk: Add --hw-accel to enable hardware acceleration
* f8f68f14a libgcrypt: Add hardware acceleration for gcry_sha512
* 70b2f5f08 libgcrypt: Add hardware acceleration for gcry_sha256
* 2158d8e8a libgcrypt: Declare the sha256 shaext function
* 0ff5faf8c libgcrypt: Implement _gcry_get_hw_features()
* 812356191 libgcrypt: Copy sha512 x86_64 assembly files
* 7f9c590af libgcrypt: Copy sha256 x86_64 assembly files
* 8423176f1 lib/hwfeatures-gcry: Enable SSE and AVX for x86_64 EFI
* 06a5b88ba lib/hwfeatures-gcry: Introduce functions to manage hardware features
* d01abd713 configure: Tweak autoconf/automake files to detect x86_64 features
* a122e0262 lib/pbkdf2: Optimize PBKDF2 by reusing HMAC handle
* 961e38b2b lib/crypto: Introduce new HMAC functions to reuse buffers
* 59304a7b5 docs: Document argon2 and argon2_test modules
* 28dbe8a3b kern/misc: Implement faster grub_memcpy() for aligned buffers
* da01eb0c5 tests/util/grub-fs-tester: Use Argon2id for LUKS2 test
* c1bd9fc82 tests: Integrate Argon2 tests into functional_test
* 6a525ee64 tests: Import Argon2 tests from libgcrypt
* 6052fc2cf disk/luks2: Add Argon2 support
* 66b8718f9 argon2: Introduce grub_crypto_argon2()
* de201105d libgcrypt/kdf: Fix 64-bit modulus on 32-bit platforms
* 93544861b libgcrypt/kdf: Remove unsupported KDFs
* 1ff720641 libgcrypt/kdf: Get rid of gpg_err_code_from_errno()
* 0c06a454f libgcrypt/kdf: Implement hash_buffers() for BLAKE2b-512
* bc94dfd54 crypto: Update crypto.h for libgcrypt KDF functions
* 5b81f490c util/import_gcry: Import kdf.c for Argon2
* 6b5c671d3 commands/menuentry: Fix for out of bound access
* 21cdcb125 tests/tpm2_key_protector_test: Add a test for PCR Capping
* afddba012 tpm2_key_protector: Support PCR capping
* ae7a39900 tss2: Implement grub_tcg2_cap_pcr() for emu
* 7b39970e9 tss2: Implement grub_tcg2_cap_pcr() for ieee1275
* 39f98e471 tss2: Implement grub_tcg2_cap_pcr() for EFI
* d47d261ec tss2: Introduce grub_tcg2_cap_pcr()
* b2549b4d3 tss2: Add TPM2_PCR_Event command
* e1b9d92a8 loader/i386/linux: Transfer EDID information to kernel
* a8379e693 fs/hfsplus: Allow reading files created by Mac OS 9
* c5ff0d616 docs: Fix build warnings in libgcrypt and blsuki doc
* fa93f2412 kern/command,commands/extcmd: Perform explicit NULL check in both the unregister helpers
* 9a725391f commands/efi/tpm: Call get_active_pcr_banks() only with TCG2 1.1 or newer
* 894241c85 kern: Include function name on debug and error print functions
* 75a20cc14 kern: Make grub_error() more verbose
* 8abbafa49 net/tcp: Fix TCP port number reused on reboot
* 3dff10a97 docs/grub: Document appended signature
* 0f2dda8cf docs/grub: Document signing GRUB with an appended signature
* 0b59d379f docs/grub: Document signing GRUB under UEFI
* dbfa3d7d7 appended signatures: Verification tests
* 7f68c7195 appended signatures: GRUB commands to manage the hashes
* 6cb58b1c9 appended signatures: GRUB commands to manage the certificates
* ab7b17717 appended signatures: Using db and dbx lists for signature verification
* 97f7001e1 appended signatures: Create db and dbx lists
* b5e872417 appended signatures: Introducing key management environment variable
* 76158ed1a powerpc/ieee1275: Read the db and dbx secure boot variables
* 069f3614e appended signatures: Support verifying appended signatures
* f8e8779d8 powerpc/ieee1275: Enter lockdown based on /ibm, secure-boot
* e95c52f1f appended signatures: Parse X.509 certificates
* a33754979 appended signatures: Parse PKCS#7 signed data
* 3e4ff6ffb appended signatures: Parse ASN1 node
* 7d28bdb0b appended signatures: Import GNUTLS's ASN.1 description files
* 1fca5f397 grub-install: Support embedding x509 certificates
* aefe0de22 pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY
* f826cc8b0 crypto: Move storage for grub_crypto_pk_* to crypto.c
* 31cc7dfe5 powerpc/ieee1275: Add support for signing GRUB with an appended signature
* ee789e1a6 lib/b64dec: Use grub_size_t instead of size_t for _gpgrt_b64dec_proc() function definition
* abb8fb6d1 util/grub-mkimagexx: Fix riscv32 relocation offset
* 1f9092bfd libgcrypt: Allow GRUB to build with Clang
* 1d2ee8f8b tests: Add test ISO files to dist package
* dfa3dbf61 tests: Test dates outside of 32-bit Unix range
* 6837293b8 lib/datetime: Support dates outside of 1901..2038 range
* 02788bfdf bootstrap: Ensure shallow gnulib clone works on newer git
* 4e42199f3 docs: Correct some URLs
* 733cc28eb docs: Update Future section to reflect current release
* 54c8573ef docs: Document new libgrypt modules
* 1562dee69 docs: Clarify section heading and fix wording
* cf1b75a14 BUGS: Update to point to bug tracking system
* 236663dfb INSTALL: Document libtasn1 needed for grub-protect
* 7bfb38627 po: Update translations to build with gettext 0.26
* 49e76ad16 term/efi/console: Treat key.scan_code 0x0102 (suspend) as Enter
* de72f3998 util/bash-completion.d/Makefile.am: s/mkrescure/mkrescue/g
* 14c2966c7 blsuki: Add uki command to load Unified Kernel Image entries
* 5190df851 blsuki: Check for mounted /boot in emu
* 51b960132 util/misc.c: Change offset type for grub_util_write_image_at()
* 8cee1c284 blsuki: Add blscfg command to parse Boot Loader Specification snippets
* e016d6d60 kern/misc: Implement grub_strtok()
* 587db89af kern/xen: Add Xen command line parsing
* b2a975bc5 include/xen/xen.h: Add warning comment for cmd_line
* 19c698d12 zfs: Fix LINUX_ROOT_DEVICE when grub-probe fails
* 6898fcf74 relocator: Switch to own page table while moving chunks
* 67a95527b configure: Generate tar-ustar tarball instead of tar-v7
* 29d515b4c build: Add new libgcrypt and libtasn1 related files to EXTRA_DISTS
* eb76b064d build: Add util/import_gcrypt_inth.sed to EXTRA_DISTS
* eb56a6af9 include/xen/xen.h: Rename MAX_GUEST_CMDLINE to GRUB_XEN_MAX_GUEST_CMDLINE
* 80df5e132 loader/arm64/xen_boot: Set correctly bootargs property for modules
* 6831d242a loader/efi/linux: Return correct size from LoadFile2
* f326c5c47 commands/bli: Set LoaderTpm2ActivePcrBanks runtime variable
* 0e367796c docs: Write how to import new libgcrypt
* b930bfa37 libgcrypt: Fix a memory leak
* d48c277c4 libgcrypt: Don't use 64-bit division on platforms where it's slow
* de49514c9 util/import_gcry: Fix pylint warnings
* 334353a97 util/import_gcry: Make compatible with Python 3.4
* 2a6de4209 libgcrypt: Import blake family of hashes
* e54187912 libgcrypt: Ignore sign-compare warnings
* e3b78e49c libgcrypt: Remove now unneeded compilation flag
* e23704ad4 libgcrypt: Fix Coverity warnings
* d65810b01 keccak: Disable acceleration with SSE asm
* f808ef0d2 tests: Add DSA and RSA SEXP tests
* 0739d24cd libgcrypt: Adjust import script, definitions and API users for libgcrypt 1.11
* 3e1c2890b b64dec: Add harness for compilation in GRUB environment
* 5ca0d5e41 b64dec: Import b64dec from gpg-error
* 3312af6e0 libgcrypt: Import libgcrypt 1.11
* a0d4c94ef loader/efi/linux: Use shim loader image handle where available
* 1b9a84e63 loader/efi/chainloader: Use shim loader image handle where available
* e31d0cd7f efi/sb: Add API for retrieving shim loader image handles
* ed7e053a3 efi/sb: Add support for the shim loader protocol
* 70897d3d3 efi: Provide wrappers for load_image, start_image and unload_image
* 030a70fca loader/arm64/xen_boot: Consider alignment calling grub_arch_efi_linux_boot_image()
* e82609a47 loader/arm64/xen_boot: Use bool instead of int
* d1a470b69 loader/arm64/xen_boot: Remove correctly all modules loaded by xen_module command
* cf5e52fa8 dl: Fix grub_dl_is_persistent() for emu
2025-12-23 22:04:30 +01:00
Leah Rowe
8b338404e8
hp8300cmt and dell 780: use legacy verbs
...
see patches. coreboot making changes upstream. these
are used in the meantime.
this prevents build errors. (again, see patches, specifically
the 780 one explains rationale)
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-23 18:49:47 +01:00
Leah Rowe
0ff8110a55
fix 3050micro vbt path again
...
i got the variable wrong, putting the dollar sign inside
the brackets, rather than outside.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-23 12:15:06 +00:00
Leah Rowe
ce302356fc
coreboot/dell3050: fix VBT-related build error
...
During routine build testing, I noticed that the VBT path was
wrong, because this port had been converted into a variant.
This is because of the OptiPlex 5040 port that is under
review on the coreboot Gerrit website.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-23 11:15:43 +00:00
Leah Rowe
2fe3b6ee66
actually enable TBT on T580
...
lbmk uses make-oldconfig before running a build anyway,
so it would have been fine. however, it's best to just
enable it outright.
this change was generated by doing:
./mk -u coreboot t580_vfsp_16mb
which runs make-oldconfig on the configs.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-22 11:58:38 +00:00
Leah Rowe
6e253b3e73
thunderbolt support for thinkpad t580
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-22 11:10:05 +00:00
Leah Rowe
9142c8b419
ThinkPad T580 support.
...
Yes.
Thank you Johann C. Rode for this excellent coreboot port.
You're a star.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-21 14:49:53 +00:00
Leah Rowe
992b03a383
coreboot/default: use 3rdparty/cmocka by default
...
this is used by the coreboot build system, for tests.
upstream tries system cmocka by default, but we want the
one in 3rdparty to be used.
i've changed the default to 0 (try 3rdparty cmocka). you
can still override this at runtime.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-21 14:48:30 +00:00
Leah Rowe
e7628421d7
coreboot/default: add cmocka submodule
...
otherwise, we get the following from coreboot's build
system, when performin operations in it:
tests/Makefile.mk:31: No system cmocka, build from 3rdparty instead...
However, *we* (Libreboot project) patch coreboot's build system,
so as to not download submodules itself, because lbmk handles
them manually. This is because lbmk's submodule handling has some
extra redundancy features.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-21 14:48:30 +00:00
Leah Rowe
946ede9e7d
fix ifdtool build on coreboot/default
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-21 14:48:30 +00:00
Leah Rowe
24f25bf7bc
update deguard
...
this adds the recent kaby thinkpads
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-19 08:17:44 +00:00
Leah Rowe
63b527e8ff
cb/default: bump to rev def7aa7094, December 2025
...
latest coreboot revision of of today / right now at the
time of this commit
this brings the following upstream changes:
* def7aa7094 arch/riscv/smp: Fix race condition
* fc37085ddb Documentation/vboot: Update vboot supported boards list
* 5bb7a83a7a acpi/acpi_apic.c: Generate MADT LAPIC entries based on current mode
* 077191641b vendorcode/amd/opensil/Makefile.mk: Add 0x prefix for BIOS address
* 4b353affd4 soc/amd/common/acpi/lpc.asl: Add HPET device
* 0a867b3971 acpi/ivrs: Fill second EFR image value
* 92f03c0c28 mb/google/ocelot/var/kodkod: Config touchpad I2C frequency
* a923470688 drv/intel/mipi_camera: Remove duplicate comments for DSM methods
* 896984e800 mb/google/bluey/quartz: Enable parallel charging support
* de87ea0efa mb/google/bluey: Add parallel charging infrastructure
* cfb0d8a144 mb/google/bluey: Enable PD negotiation when battery is missing
* ddc1b51b43 mb/google/bluey: Enable PD negotiation in charging modes
* c4ee22e267 Reapply "mb/google/bluey: Implement EC-based off-mode detection"
* a225eefd4c drivers/spi: Add Macronix MX77U51250F chip id
* 793c15a866 mb/google/ocelot: Fix Gen4 SSD power sequencing
* b689671e79 include/acpi/acpi_apei.h: Add MCE APEI structs
* 7a41dc416b include/acpi/acpi_apei.h: Add NMI APEI struct
* 5251284e39 include/acpi/acpi_apei.h: Add PCIe APEI structs
* 53350d5c8d include/acpi/acpi_apei.h: Add internal acpi_head_t struct
* 5001b07f9c drivers/intel/mipi_camera: Add validation and remove unused defaults
* 0f1ae4ae5f drivers/gfx/generic: Add support for non-VGA devices
* ae0d232402 drivers/intel/mipi_camera: Add ACPI device type selection
* 1532eb60ee drv/intel/mipi_camera: Add CVF Support DSM function
* a64b93562d drv/intel/mipi_camera: Add I2C V2 DSM function
* c8f89e00e4 drv/intel/mipi_camera: Refactor DSM generator functions
* ea099e8b8c drivers/intel/mipi_camera: Split DSM generation into per-UUID functions
* 6459a2007a mb/{google,intel}: Add ROM type and address for MIPI camera sensors
* 11ea868b02 mb/google/volteer/var/drobit: Update pl2 minimum value
* 8ed87f71ec mb/google/volteer: Make touchpad wake user-selectable via CFR
* 7e1962a3cc mb/google/hatch: Make touchpad wake user-selectable via CFR
* 152914272c device/azalia: Drop spurious read-back of STATESTS
* 6e074550a5 device/azalia: Repurpose azalia_set_bits() for link-reset only
* ecf202b8e4 device/azalia: Add missing 521us delay after RESET# de-assertion
* d5d27badd4 Documentation: Add coreboot release 26.03 template
* 8e23c46beb Docs/releases: Update release notes for 25.12 release
* 01bc527afa soc/qualcomm/common: Add CMD-DB driver support
* 2277edff88 soc/qualcomm/x1p42100: Split dram_aop region to map dram_aop_cmd_db as non-cacheable
* a4cc178486 soc/qualcomm/common: Map AOP CMD-DB region as uncached region in MMU
* 1b5f105595 mb/google/ocelot/var/ocelot: disable ISH UART0 RX pin
* b67725d3f5 Revert "mb/google/bluey: Implement EC-based off-mode detection"
* 1dc3e45f7c mipi: Support passing user data to mipi_cmd_func_t
* 42c1947d99 mb/google/bluey: Implement EC-based off-mode detection
* e54b82b85b mb/google/ocelot/var/kodkod: Enable pcie_rp5 to allow proper enumeration of pcie_rp6
* 4cc830349c mb/google/rex/var/karis: Add fw_config probe to enable all wifi
* 173a32aa55 MAINTAINERS: Add Jayvik Desai to Google Bluey & Qualcomm SoCs
* f28997dcdd soc/qualcomm/common: Add PD negotiation attribute macro
* b70309350f arch/x86/acpi_bert_storage.c: Fix Error Section GUID compare
* 847d91b82e include/acpi/acpi_apei.h: Update APEI structs for better readability
* 679ea61d4d include/acpi/acpi_apei.h: Add APEI definitions
* eb79807bec soc/qualcomm/x1p42100: Add mainboard hook for QcLib override
* 8ece648c30 soc/qualcomm/common: Use bitwise OR for global_attributes
* 22e54a701d soc/qualcomm/x1p42100: Add AOP, QDSS, and QSEE regions to SSRAM layout
* 4d53aa7704 soc/qualcomm/x1p42100: Relocate PRERAM stack to BSRAM memory
* a26b718d5a soc/qc/x1p42100: Define pre- & post-RAM stack regions in linker script
* 1b599a8844 arch/arm64: Add an alternative entry point for ramstage code
* 641f7ac677 arch/arm64: Introduce distinct PRERAM and POSTRAM stack regions
* 2183326306 soc/qualcomm/x1p42100: Rename qcsdi region to aop_sdi in memlayout
* fad9878a3e vc/intel/fsp/fsp2_0/wildcatlake: Update WCL FSP headers to FSP WCL.3393.02
* 71b79018da util/release/genrelnotes: Restore to saved HEAD instead of origin/main
* 9f6e297399 vc/intel/fsp/mtl: Fix license header in MemInfoHob.h
* 2171af0f5f mb/lenovo/sklkbl_x280: Fix build failure
* a5d3c4c119 mb/lenovo/sklkbl: Fix headphone jack
* 0b4d41004d mb/lenovo/sklkbl: Add Lenovo Thinkpad X280 as a variant
* 9a3818f9b6 soc/mediatek/common: Print DRAM calibration status as string
* 1e8cea55a0 soc/mediatek/common/emi: Cache SDRAM size
* 9203cc827f soc/mediatek/mt8196: Add MTE tag memory to bootmem
* 3d5135fdd0 lib/bootmem: Add memory type for Armv9 MTE tag storage
* 2d45723d87 lib/bootmem: Add bootmem_add_range_from function
* 4f78a40f53 mb/google/ocelot/var/ocicat: Update Touchscreen settings
* 510f1950b4 mb/google/ocelot/var/ocicat: Update devicetree
* 35cb6aea50 mb/google/hatch: Fix CFR pointer
* 8f34fdfab3 Remove <swab.h> and swabXX() functions
* d556bc65c2 mb/google/fatcat/var/ruby: Change GPIO pins to fix audio function
* 6b5a872ce8 soc/mediatek: Pass dsi_regs/mipi_tx_regs to DSI API
* 74c13eead4 soc/mediatek/mt8196: Define dsi_regs/mipi_tx_regs structs
* a3317182ff soc/mediatek/common: Move dsi0 definition to dsi_register_v*.h
* 3607024944 soc/mediatek: Move mtk_dsi_init declaration to display_dsi.h
* 7ef424c75e soc/mediatek/common: Rename mipi_tx to mipi_tx0
* cf0b91d774 soc/mediatek: Move dsi_regs/mipi_tx_regs definitions to soc/dsi_reg.h
* 403a42f1f0 soc/mediatek/mt8173: Fix mipi_tx1 address
* 72010408b5 mb/google/eve: Add CFR option menu support
* c36b149392 mb/google/eve/Makefile: Organize and group entries by stage
* f61ecfa154 mb/google/link: Add CFR option menu support
* 75460f531c mb/google/poppy: Add CFR option to enable/disable IPU cameras
* ae8f2d8cee mb/google/poppy: Add CFR option menu support
* 99d67bae63 mb/google/glados: Add CFR option menu support
* 0d81d38a31 mb/google/skyrim: Add CFR option menu support
* c397821cb6 mb/google/guybrush: Add CFR option menu support
* c1f0be39da mb/google/zork: Add CFR option menu support
* d105934073 mb/google/kahlee: Add CFR option menu support
* 46a32a2b56 mb/google/sarien: Add CFR option menu support
* e3bee6397d mb/google/rex: Add CFR option menu support
* d0345005ad mb/google/brox: Add CFR option menu support
* ee599486ac mb/google/dedede/galtic: Add CFR option for touchpad type
* 7a78543eca mb/google/dedede/drawcia: Add CFR option for touchscreen selection
* 1890c6d165 mb/google/dedede: Add CFR option menu support
* bd89858f09 mb/google/brya: Add CFR option menu support
* a58e0704c7 mb/google/volteer: Add CFR option menu support
* 8b34490137 mb/google/drallion: Add CFR option menu support
* 0762c7d6ee mb/google/drallion/Makefile: Organize and group entries by stage
* 89902e8c80 mb/google/hatch: Add CFR option menu support
* 0f93d154b2 mb/google/octopus: Add CFR option menu support
* f0346845cd mb/google/reef: Add CFR option menu support
* 2b959f4560 mb/google/puff: Add CFR option for automatic fan control
* a8a77f9da2 mb/google/fizz: Add CFR option for automatic fan control
* cde4280796 soc/intel/apollolake: Add CFR objects for existing options
* 2e10f75751 mb/google/sarien: Increase size of SMMSTORE to 512KB
* 91c6a0b5e6 mb/google/reef: Increase size of SMMSTORE to 512KB
* 36a345f99e mb/google/octopus: Increase size of SMMSTORE to 512KB
* d7cb2d2bc5 mb/google/drallion: Increase size of SMMSTORE to 512KB
* d32a372846 drivers/smmstore: Increase default size of store to 512KB
* c109fc92ff libpayload: Add API to get physical memory size
* 519332de10 mb/google/fatcat/var/ruby: Modify VCCCORE VR Fast Vmode ICC limit
* 7f93e2fe29 soc/intel/*: Add CFR option to enable/disable the Intel iGPU
* d5ea359347 soc/intel/**/cfr.h: Fix typo of "ACPI" in UI help text
* 02a2fe7907 Merge coreboot and libpayload <endian.h> into commonlib
* 5eb7b8bd34 payloads/external/edk2/Makefile: Set SMBIOS to 3.0.0
* c3afc13a0a soc/qualcomm/x1p42100: Update memlayout for BL31 region and realign TA region
* 04f83ff7dc cpu/x86/mtrr: Simplify MTRR solution calculation on AMD systems
* 6957f84aa7 soc/qualcomm/x1p42100: Define MDSS domain registers for display clock enablement
* 9a95aef482 soc/qualcomm/common: Add API to enable Lucidole PLL for X1P42100
* 5eaf85d19b soc/intel/skylake: Use CSE reset status for reset
* 84a4cdc6a5 soc/intel/*: Only skip PMC fallback on successful CSE reset
* 4f52ca6ba6 soc/intel/common/cse: Return usable error codes
* 8795680828 cpu/x86/lapic/lapic.c: Set spurious interrupt vector to 0xF
* 41348477e3 sb/intel/common/firmware/Makefile.mk: fix INTEL_IFD_SET_TOP_SWAP_BOOTBLOCK_SIZE
* c11faad2bf mb/google/skywalker: Correct MIPI panel power sequence
* 459cdd09f4 mb/google/rauru: Add variant-specific firmware config
* fee2befc82 3rdparty/blobs: Update to upstream main
* 626789b40a mb/siemens/mc_ehl{1..5}: Unify devicetrees SerialIoI2cPadsTermination
* 0513c45a38 mb/google/nissa/var/pujjoga: Generate RAM ID for MT62F1G32D2DS-031RF WT:C
* 4a5d0dee4a soc/mediatek/mt8189: Correct AUX LDO mask bit definition
* db01aa6cb2 commonlib/device_tree.c: Fix skipping NOP tokens
* 29bec62a22 cpu/x86/Kconfig: Remove SOC_SETS_MSRS option
* f4aeac4276 soc/amd/glinda: Set FSP UPDs from devicetree for USB4
* f68450e39b vendorcode/amd/fsp/glinda: Update FSP UPDs
* 244e8edf18 soc/amd/glinda/Kconfig: Add Faegan SoC as Glinda variant
* 9e5c7eb3f8 soc/amd/glinda: Add XGBE devices
* 87475d693a soc/amd/glinda: Remove set_resets_to_cold
* dcd4f07188 soc/amd/common/fsp: Fill in DIMM voltages
* 8929659d93 soc/amd/common/acpi/lpc.asl: Report ESPI1 fixed resource
* 3053cd2dad soc/amd/common/acpi/lpc.asl: Report fixed base addresses
* 7e1aa974bf soc/mediatek/common: Refactor mtk_ddp_mode_set to support dual DSI and DSC for MIPI
* 3aaeca8378 soc/mediatek/common: Refactor mtk_dsi_dphy_timing
* aeee9450a2 mb/google/ocelot/var/matsu: Add fw_config definitions with UFSC
* 67a7e06c38 drivers/tpm: Remove duplicated op
* ac5c57d24a drivers/tpm/ppi: Fix generated ACPI
* d922ad79c6 mb/google/fatcat/var/ruby: Add firmware configuration fields with UFSC
* 980c269643 mb/google/ocelot/var/ojal: Enable Audio Codec and update FW config
* 8e7975edfd mb/google/ocelot/var/ojal: enable CS42L43 driver options
* 9a6d1d4d69 mb/ocelot/var/ocicat: Modify ocicat Kconfig for bring up
* 94fe4c6926 mb/google/ocelot/var/kodkod: Add wake configuration to cnvi_bluetooth
* e3588d82bc mb/google/ocelot/var/kodkod: Enable CNVi Wi-Fi and BT cores
* 36edc2e371 soc/qualcomm/x1p42100: Add Dload mode detection and ramdump packing
* 26a18c674d acpi: Clear whole FACS table before filling it
* 5a6addca4b mb/google/fatcat/var/ruby: Change GPIO pins to fix audio function
* e6a8143d8b drivers/intel/touch: Add support for new Intel touch I2C _DSD entries
* 25c4501223 device/dram/ddr3: Fill in voltage fields for SMBIOS type 17
* 273a41c4d9 commonlib/memory_info: Introduce new fields to memory_info structure
* abe1ac0744 mb/google/brya/var/uldrenite: Add memory MT62F1G32D2DS-031RF WT:C
* 0599f3e1bd mb/google/bluey: Condition slow charging enablement on charger presence
* 8b3ceacd93 ec/google: Check AC charger presence by reading host event register
* 5b544c67eb mb/google/rauru: Add MIPI panel support with BOE NS130069-M00
* ed9239cd85 mb/google/nissa/var/gothrax: Add Samsung parts to RAM ID table
* 445961c604 soc/qualcomm/common: Add support for loading ramdump image
* 3c563669b5 soc/qualcomm/x1p42100: Add support for APDP image packing in CBFS
* 1d70286d4e soc/qualcomm/common: Add support for loading APDP image
* fc9f828ac0 mainboard/google/bluey: Select VBOOT_ALWAYS_ENABLE_DISPLAY
* c77d256886 {mb, security}: Use EC_REBOOT_FLAG_IMMEDIATE for cold reboots
* 1a0d123ec1 ec/google/chromeec: Update EC headers
* 3bd554feb2 soc/mediatek/mt8196: Align the struct for storing DRAM calibration data
* 33fc33c132 soc/amd/common/block/cpu/noncar: Add support for bootblock CRTM init
* 8b97968e53 soc/amd/common/block/pci/amd_pci_mmconf.c: Support 64bit ECAM MMCONF
* 7a98a62f7b drivers/intel/gma: Unify coding style
* 23b00a06da drivers/intel/gma: Fix brightness handling with valid-cache logic
* 4068ba39f8 soc/intel/common/block/rtc/rtc.c: Top Swap: add Slot B selection mechanism
* a65b874472 mb/dell: Convert OptiPlex 3050 into variant
* 2ce1068542 mb/google/ocelot/var/ojal: Decrease display count from 5 to 4
* b31e62ae5c mb/intel/ptlrvp: Add LPCAMM T3 RVP board support
* 58cdf9e668 soc/intel/pantherlake: Add LPCAMM memory support
* 67777b7671 soc/intel/common: Add LPCAMM memory topology support
* bb18e0b91d mb/google/skyrim: Increase size of SMMSTORE to 512KB
* dd1e54efc0 mb/google/zork: Increase size of SMMSTORE to 512KB
* 60e375fae4 mb/google/guybrush: Increase size of SMMSTORE to 512KB
* eb52862132 mb/google/brox/var/caboc: Update SSD port and FPMCU setting
* 85101704ae mb/ocelot/var/ocicat: Create ocicat variant
* 2975d7220a mb/google/ocelot/var/matsu: Update devicetree
* 0e9d85425e mb/google/ocelot/var/matsu: Fix GPP_V3 internal pull-up configuration
* 4f257a28f8 mb/google/ocelot: Add EC_GOOGLE_CHROMEEC_SKUID config
* db2ac42405 soc/mediatek/common: Refactor DDP mode setting
* d51f780515 mb/siemens/mc_rpl: Correct SMBIOS socket type to BGA1744
* 2f95552802 mb/siemens/mc_ehl: Move Kconfig switch to variants
* 3c49c13995 util/ifdtool: fix typo PSL->MSL
* a87e699f04 mb/lenovo/m900_tiny: Enable Vboot
* afc191357f 3rdparty/intel-microcode: Update to upstream main
* cbfa28b06e mb/google/fatcat/var/ruby: Modify power limit configuration
* f13e800a71 mb/amd/crater/Kconfig: Use A/B recovery scheme for renoir
* 416f67f670 vendorcode/amd/fsp/.../fsp_h_c99.h: Use fsp2_0 structs
* b94a84a792 drivers/efi: Exclude verstage from EFI variable store files
* bae5262c69 include/option: Add verstage stub for UEFI variable store backend
* 2d78478345 drivers/intel/gma: Reapply cached brightness once BCLM is valid
* 2ad08f9d72 drivers/intel/gma: Expose full brightness ladder
* 2e96a71e6f drivers/intel/gma: Cache brightness level
* 36632a08a8 soc/qualcomm/x1p42100: Reserve 33 MB DRAM memory for Display requirement
* 5807b59fc5 mb/google/rauru: Report panel ID for sapphire
* 49da58dccf drivers/mipi: Add support for BOE NS130069-M00 panel
* e9ebcb2918 mb/{google,intel}: Fix MIPI camera VCM type and address configuration
* 30b4383944 mb/{google,intel}: Set SSDB platform field for MIPI camera sensors
* 4c025191c7 drivers/intel/mipi_camera: Remove disable_ssdb_defaults option
* c75236d436 drivers/intel/mipi_camera: Set additional SSDB defaults
* 866b79c9fe drivers/intel/mipi_camera: Always generate PLD for camera sensors
* c6ed8c91fb drivers/intel/mipi_camera: Document more SSDB fields
* 423fbcd06b drivers/intel/mipi_camera: Adopt SSDB sensor SKU bitfield
* aa18a6fe8d drivers/intel/mipi_camera: Codify SSDB field enums
* f8d12a0bdb drivers/intel/mipi_camera: Add SSDB platform subtype enum
* 99cb6415ba drivers/intel/mipi_camera: Rename flash enum to match SSDB field
* c91ea7c582 drivers/intel/mipi_camera: Flesh out SSDB platform enum
* 0361e1a865 drivers/intel/mipi_camera: Verify SSDB struct size at build time
* b5d68e41a2 drivers/intel/mipi_camera: Tidy SSDB comment wrapping
* ab4c2fd0e8 drivers/intel/mipi_camera: Extract SSDB definitions into separate header
* d09ea1c351 cpu/intel: Add SMBIOS Socket BGA1744 type
* d97cb61b50 ec/google/chromeec: Add CFR option for RGB keyboard boot color
* e695731399 ec/google/chromeec: Add RGB keyboard helper functions and enum
* 4eb524ee9d spd/ddr4: Add three more parts
* e4a809d441 spd/ddr4: Double packageBusWidth of dual die package parts to 16
* 8753155f71 mb/google/slippy/var/peppy: Add CFR menu option for touchpad type
* 6f6a10df88 mb/google/slippy: Add CFR option menu support
* e366e0ba7d mb/google/slippy/Makefile: Organize and group entries by stage
* 6be83443e5 mb/google/auron/var/lulu: Add CFR option to enable/disable touchscreen
* 88d3f563b3 mb/google/auron: Add CFR option menu support
* 7ed515d1c3 mb/google/auron/Makefile: Organize and group entries by stage
* e15895b5c4 mb/google/poppy/var/nautilus/acpi: Fix CI02 comment
* 4dc03c54fc mb/google/poppy/var/nocturne: Hide FPR device in ACPI
* e85a0b7ff1 mb/google/puff: Remove unsupported EC features
* 3459502e0c mb/starlabs/starfighter: Enable pmc_shared_sram device
* 9b0af48604 mb/starlabs/starbook/mtl: Update GPIO config
* d3d4571411 soc/intel/common/block/graphics: Use Xeon W-11865MRE IGD PCI ID
* 1cfe413f95 soc/intel/common/block/lpc: Support RM590E eSPI
* c195859748 soc/amd: add ACPI code for I3C controller
* 02342b31df soc/amd/*/memmap.c: Report FCH MMIO regions as reserved
* 5078d32ccc mb/google/brya: Enable ACPI S3 sleep state support
* eb504eb49a mb/samsung/lumpy: Fix HDA pin configuration issues
* afd5e5d444 mb/samsung/lumpy: Convert HDA verbs to use AZALIA_PIN_DESC macros
* 109672a9a9 drivers/intel/gma: Guard legacy brightness fallback
* 908c2b54c6 mb/starlabs/starbook/mtl: Fix Card Reader USB Port
* 796d3b37aa mb/google/fatcat/var/moonstone: Update fw_config definitions with UFSC
* 2ce4e09469 drivers/intel/fsp2_0: Add typedef FSP_UPD_HEADER
* 7afe1e9f9d mb/google/fatcat/var/lapis: Adjust touchpanel power on timing
* 36f4341533 mb/starlabs/starfighter: Add Arrow Lake (285H) variant
* 80cf2008a9 spd/lp5: Add SPD for MT62F1G32D2DS-031RF WT:C
* f1d1c825dc mb/siemens/mc_rpl1: Enable IBECC
* 866a0591f7 mb/siemens/mc_rpl1: Set coreboot ready LED
* 801795d4dd mb/siemens/mc_ehl6: Alphabetize Kconfig options
* 1a11dca12d mb/siemens/mc_ehl6: Send POST codes to NC FPGA via PCI
* fceb033372 mb/siemens/mc_ehl6: Limit PCIe RP7 speed to Gen2
* 760c3f6abc mb/siemens/mc_ehl6: Activate SATA interface port 1
* 54f2652bde mb/siemens/mc_ehl6: Enable auto impedance calibration on GbE 0
* b6e7f3e005 mb/siemens/mc_ehl6: Change GbE LED settings
* aad2b715ea mb/siemens/mc_ehl6: Remove PSE GbE 1
* e19f2b313e mb/siemens/mc_ehl6: Enable PCHHOT_N via GPIO
* 43d5f70576 mb/siemens/mc_ehl6: Enable PTM for all enabled PCIe RPs
* 864e3ca661 mb/siemens/mc_ehl6: Adjust I2C setup
* 31f44f5521 mipi: Add DSC configuration and rate control parameters to panel header
* 743e31939c drivers/intel/fsp2_0/.../fsp/upd.h: Fix excess endif
* 2aadfc2b5e soc/amd/common/block/acpi: Add ACPI HEST table
* cc542c15f4 include/acpi: Move Error definitions/declarations into acpi_apei.h
* 2462e3a027 soc/mediatek/mt8188: Adjust memlayout for bootblock
* 804aab3abb mb/google/fatcat/var/ruby: Modify usb3 port setting
* fecf05c4f2 mb/google/trulo/var/kaladin: Mute speaker amp to prevent pop noise on reboot
* f35cb39de5 soc/amd/cezanne: Increase APOB DRAM size for Renoir
* 384e6e1c37 soc/amd/cezanne: Remove set_resets_to_cold
* 97291b5838 soc/amd/cezanne: Optionally propagate UART0 through ACPI
* 149d11d1d8 soc/amd/cezanne/Kconfig: Select Kconfig to program the PSP_ADDR MSR
* 520bc70b57 mb/amd/crater: Configure UART1 GPIOs
* 0ed1529ce3 src/vc/amd/fsp: fix type 17 DMI info
* e8599956dc mb/amd/crater: Make NVMe reset GPIO configurable
* 67bf203e52 mb/google/nissa/var/guren: Add missing settings for WWAN
* 3dabe4f857 mb/google/brox/var/caboc: Increase I2C0 touchpad tHD to 0.53 us
* 12e763eece device/pci_ids: Add DIDs for TGL-H (GT1 and RM590E)
* 01540f036e mb/google/fatcat/var/ruby: Use spd-11 for MT62F1G32D2DS-020 WT:D and K3KL8L80EM-MGCV
* 14e96b4ef1 mb/google/brox/caboc: Mute speaker amp to prevent pop noise on reboot
* 567186a000 mb/google/bluey: Add support for off-mode charging
* 27fcb8617d commonlib: Add CBMEM ID to store boot mode
* d6132c4c03 mb/google/bluey: Use SOC PMIC API to detect off-mode charging event
* 201ebd48ee soc/qc/x1p42100: Add APIs to read PON reason from PMIC
* 293f3a7f5c soc/qc/spmi: Add API to read byte array
* 9f675eb96b soc/qc/common: Update SPMI_ADDR macro for better type safety
* cb1045a8b8 soc/intel/pantherlake: Update GT domain TDC value for PTL_TDC_1 SKU
* b0ee0c4620 soc/intel/pantherlake: Fix IA domain TDC value for PTL_TDC_2 SKU
* 6dbcf903a5 soc/intel/pantherlake: Add ICC Max and TDC settings for SKU_7
* 2148143ae9 soc/intel/pantherlake: Separate TDC configuration for different TDPs
* c7273c8ddc mb/google/fatcat/var/ruby: Add proto touch panel address
* 8575232317 mb/google/ruby: Migrate to UFSC
* 47101fc224 soc/amd/cezanne/Kconfig: Make AMDFW_CONFIG_FILE configurable
* c9f124a8fb mb/amd/crater/ec: Make macro ENABLE_M2_SSD1 a Kconfig option
* 430e34cd0f mb/amd/crater: Move gpio configuration to early_gpio
* 14b5c004f5 mb/amd/crater/ec: Create function to get board revision
* bd858faee8 mb/amd/crater: Add XGBE support
* f61553c9fa vc/amd/fsp/cezanne: Add Renoir FSP
* 87f8d15c87 ec/google/chromeec/cfr: Fix CFR callback signatures
* 7fb0f14ebe libpayload: arm64: Fix asynchronous exception routing in payload
* b584967d04 mb/google/ocelot: Add wake configuration to cnvi_bluetooth
* fc88b62174 mb/siemens/mc_ehl6: Enable PCIe root ports and clocks
* 5a4c749520 mb/siemens/mc_ehl6: Add new board variant based on mc_ehl2
* f5f304a5f3 mb/google/skywalker: Disable CHROMEOS_USE_EC_WATCHDOG_FLAG
* e4b0410946 soc/mediatek/mt8189: Enable MEDIATEK_WDT_RESET_BY_SW
* 1ae0cebff3 soc/mediatek: Add Kconfig option MEDIATEK_WDT_RESET_BY_SW
* 7d3bf767cc soc/mediatek/mt8189: Move WATCHDOG_TOMBSTONE from SRAM to SRAM_L2C
* a64dd410d8 mb/google/fatcat/var/ruby: Update EN_SPK_PA GPIO pin configuration
* 2f9b4ad6a5 soc/qualcomm/x1p42100: Add DFSR table configuration support
* 51e99de558 soc/intel/common/block/rtc/rtc.c: control Top Swap via CMOS option
* 56be23114e mb/google/rauru: Use chromeos-legacy.fmd for Hylia and Navi
* 10802bac16 spd/lp5: Modify SPD for MT62F1G32D2DS-020 WT:D and K3KL8L80EM-MGCV
* e5d10e5d23 mb/lenovo/t480: Fix headphone jack
* 40b2a2b03c soc/mediatek/mt8196/booker: Refactor CMO property clearing with loop
* 1b0f9c5458 mb/google/nissa/var/telith: Add parade touchscreen support
* ddb3f0b17f drivers/hwid_dmi: Populate SMBIOS product name from CBFS hwid file
* 7a1e63308a acpigen_ps2_keybd: map insert
* 607740999d acpigen_ps2_keybd: map capslock
* a7efa40e39 acpigen_ps2_keybd: map KEY_HOMEPAGE to 0xaa scancode and TK_HOME
* fd603e5102 libpayload: Add CBMEM_ID_MEMINFO to sysinfo
* bae3e02662 include: commonlib: Move memory_info and dimm_info to commonlib
* d03799ec3c soc/mediatek/mt8196: Configure registers and parameters required for MTE
* 7521f3ea83 soc/qualcomm/x1p42100: Define pre and post-RAM DMA coherent regions
* d277b35307 soc/qualcomm/x1p42100: Relocate ddr_information and watchdog tombstone
* 958099b114 soc/qualcomm: Map the post-RAM DMA coherent buffer
* 931fa9c01d memlayout: Introduce PRERAM and POSTRAM DMA coherent regions
* af9d809823 soc/qualcomm/x1p42100: Move coreboot stack to SSRAM
* fec1032ee8 arch/arm64: Add timestamps for Secure OS (BL32) loading
* d0177bd102 soc/qualcomm: Add QCLib execution timestamps
* 0145ebe847 commonlib: Add timestamps for Qualcomm QCLib and ARM TFA
* cf2978f4b6 drivers/vpd: Search VPD info at 0x0 first
* a56a97d167 mb/starlabs/common/cfr: Adjust help text for S0IX
* 541fd14fd9 mb/google/nissa/var/uldren: Increase Touch IC enable delay time
* 0c18e7680a mb/google/fatcat/var/ruby: Remove GPP_D16 and GPP_D17 in fw_config.c
* 237944186e mb/google/nissa/pujjolo: update verb table
* cae53bea52 ec/google/chromeec: Add CFR options for keyboard backlight and fan control
* 1ca1dc6c31 ec/google/chromeec: Add ability to enable auto fan control via setup option
* 450389be05 ec/google/chromeec: Add fan presence helper function
* 9d355a39aa mb/amd/crater/ec.c: Enable power/reset for PCIe lanes
* 141fd11d79 mb/amd/crater: Rename ETH_AIC_SLOT_ONLY -> PCIE_DT_SLOT
* 1e28ff6955 src/mb/amd/crater/port_descriptors_renoir.c: Prettify code
* a48fd9ed7f soc/amd/cezanne: Add SOC_AMD_RENOIR as a Cezanne variant
* 760e19e18f mb/lenovo/sklkbl: Use spd_tools infrastructure for SPD binaries
* 8a83b86254 spd/ddr4: add parts
* 0ef4bd807c mb/google/ocelot/var/ocelot: Update DDR5 memory configs
* 7b11254d58 mb/google/ocelot/var/kodkod: Add overridetree
* aa1d44b644 mb/google/ocelot/var/kodkod: Update gpio settings
* a363007c3b ec/dell/mec5035: Route power button event to host
* 18dbeca5f4 util/autoport/azalia.go: Select CONFIG_AZALIA_USE_LEGACY_VERB_TABLE
* e9c47bf99e drivers/intel/fsp2_0: Add 1-bpp monochrome option for VGA mode 12
* f643141728 mb/google/fatcat: Option to enable monochrome VGA mode 12
* e05492cfb4 soc/intel/pantherlake/romstage: Configure VGA mode 12 monochrome buffer
* d3760cdfdf mb/google/bluey: Configure QUP0 SE5 as I2C
* abc87d533d mb/google/bluey: Introduce config to specify absence of USB-A port
* 872e06d60c mb/samsung/stumpy: inline fan thresholds and drop GNVS programming
* 8401bbd2ff mb/google/fatcat/var/ruby: Change touch panel address
* a4242e5c38 ec/starlabs/merlin: Fix get_ec_value_from_option() value validation
* 567470cbb3 payloads/edk2: Add iPXE EFI support for EDK2 payload
* f40de4e162 payloads/ipxe: Default enable serial output only if CONSOLE_SERIAL
* 962edb7e6d payloads/ipxe: Guard PXE_ROM_ID for non-EFI builds
* a907c6fb8d payloads/ipxe: Default to building from master branch
* 4081793ff2 payloads/external/edk2: Replace dependencies on EDK2_REPO_MRCHROMEBOX
* 10d606bfca soc/intel/common/acpi: Add P2SB write functions
* 7436c59875 util/amdtool: Add support for Phoenix AM5 CPUs
* 8f3626c4b5 util/amdtool: Add utility to dump useful information on AMD CPUs
* 3cf976e51a soc/mediatek/mt8196: Add dual display pipe path
* 14595d64de lib/edid_fill_fb: Add dual pipe flag to lb_framebuffer_flags
* 486b1b51af mb/google/bluey: Cache low battery mode check
* 33418b7e68 soc/qc/x1p42100: Disable compression for peripheral firmware binaries
* 5bfc2d23bb soc/qc/x1p42100:: Select Secure OS options in SoC Kconfig
* f5f943c1c3 bluey/kconfig: Consolidate SPI flash driver selection
* ee59936e83 commonlib/device_tree: Add an API to check if a DT is an overlay
* 0416ac9829 mb/google/var/fatcat/lapis: Modify type-A USB3 port0/1 tx_de_emp
* dfe553aebb util/intelvbttool/Makefile: Add install target
* 493e3d182e payloads/external/iPXE: Allow building EFI target
* 62fc93de90 soc/qualcomm/x1p42100: Add NVMe Power Loss Notification GPIO configuration
* 2b7b89ae31 soc/qualcomm/x1p42100: Update PCIE PHY init sequence
* 91594f4894 drivers/option/cfr.c: Replace memcpy() to avoid uninitialized object
* 04ea4724e2 Makefile.mk: separate bootblocks into BOOTBLOCK and TOPSWAP
* f164feba3e ifittool: allow adding files from a separate region
* 91073f37d7 mb/google/brya: Increase RW_SECTION_* by 256KB for 16MiB boards
* a43498e193 util/inteltool: Enable dumping GPIOs from Tiger Lake IoT PCH
* 04778ddd38 drivers/option/cfr: Remove old sm_object from constructor
* b535db8f1e soc/intel/cmn/usb: Add helper macro for USB 3.0 port TX configuration
* c197643d44 drivers/intel/gma/acpi: Add power management methods for GFX0
* 773997c92d drivers/intel/touch: Avoid returning undefined pointer
* 9dc35142ac soc/amd/stoneyridge: Generate SATA ACPI registers at runtime
* d62653749c payloads/libpayload: Support legacy LZ4 compression format
* 29faf77d4a mb/siemens/mc_rpl1: Limit CPU RP1 to PCIe Gen2 speed
* fad0908c5b soc/intel/alderlake: Make CPU RP PCIe speed configurable
* 04d5201426 treewide: Fix include guards
* 971f10d1d7 mb/google/var/fatcat/lapis: set custom SVID/SSID to load fw for CS35L56
* ace2e540d0 soc/intel/pantherlake: Update CONSOLE_UART_BASE_ADDRESS Kconfig value
* a65d9fe589 mb/google/fatcat: Remove FSP_UGOP_EARLY_SIGN_OF_LIFE from Lapis
* 729918628d 3rdparty/blobs: Update to upstream main
* d4bee96484 mb/lenovo/sklkbl: refactor memory_init_params to use gpio_base2_value()
* 2a9deabc35 commonlib/coreboot_tables.h: Fix lb_smmstorev2 alignment
* 0ba4505024 payloads/external/edk2/Makefile: Configure AP wakeup in UEFI payload
* 87c3373925 mb/google/fatcat: Add FW_CONFIG Support for TAS2563
* e08a35f806 drivers/sof: Add support for tas2563 speaker topology
* a3ea128ecf drivers/i2c/tas2563: Add driver for generating device in SSDT
* 240e17025c src/soc/intel/ptl: Add LPSS UART DMA control
* afa6c31ef5 soc/intel/alderlake/romstage/fsp_params.c: Refactor `pcie_rp_init()`
* ec5b5386d4 soc/intel/mtl/romstage/fsp_params.c: Refactor `pcie_rp_init()`
* 4c5c62bc8d mb/google/fatcat/var/ruby: Modify gpio pin for enabling audio function
* 2804a0d771 mb/google/fatcat/var/lapis: Update fw_config definitions with UFSC
* 0e1742a7e2 mb/google/bluey: Control slow battery charging via boot mode
* 113cef70fd soc/intel: Move USB port macros (2.0/3.0/TCSS) to IA common header
* 3c69295ce4 mb/google/fatcat/var/ruby: Add new supported memory part
* d18cc50e6a soc/intel/xeon_sp: Use common smm_relocate
* d0c936eea1 mb/google/nissa/var/guren: Tune SX9324 register for 5G LTE module
* 8851b5b0e7 soc/intel/pantherlake: Program HDA SVID/SSID
* c917ecf21e soc/intel/{adl,mtl}: Fix CLKSRC handling for compliance mode
* 312d455a93 soc/intel/{adl,mtl}/romstage/fsp_params.c: Fix printf specifier
* 786ac14d48 drivers/option/cfr: Add optional override table for default values
* ea84a29a27 mb/google/trulo/var/pujjoquince: Enable Bayhub LV2 driver
* 84e000b88e libpayload: arm64: Fix alignment for exception_state
* 9210f2fd1c mb/google/fatcat/var/lapis: add ILITEK touchscreen support
* b933a554ba mb/google/var/fatcat/lapis: Modify fw_config for audio and touch
* b3b7b7a027 mb/emulation/qemu-q35/Makefile.mk: Use all-y for memmap.c
* bb3e59051a mb/google/brya: Check power state before process _ON method for BT
* 0f7c54d7d1 mb/google/fatcat/var/felino: Disable card reader in coreboot
* 7946d2d65d mb/google/fatcat/var/felino: Add reset_gpio for SSD RTD3 configuration
* 8e2567c7a9 mb/google/fatcat/var/lapis: Adjust touchpad I2C frequency
* f8da2bf9b2 mb/google/fatcat/var/ruby: Modify camera enable gpio pin.
* 45163509cf util/cbfstool/cbfs-payload-linux.c: Remove TODO
* bdcd65bd7f ec/starlabs/merlin: Add battery capacity offsets
* 224ddb85e3 ec/starlabs/merlin: Choose a better default for GPE SCI
* 696344ac01 ec/starlabs/merlin: Optimise Kconfig defaults
* 649a6a591b ec/starlabs/merlin: Correct Kconfig dependancies
* 0d35c3fcc3 mb/starlabs/starbook: Fix inclusion of CPU RP ASPM option
* 87475ef37f mb/starlabs/common: Move power profile enum to common code
* 98e0ff1e4b mb/starlabs/*: Move DMIC disabling code to common dir
* 082ad480d9 mb/starlabs/*: Separate WiFi and Bluetooth controls
* abf630c96b mb/starlabs/byte_adl: Add wireless CFR object
* a58d99575e mb/starlabs/*: Move CFR object defs to common directory
* 74dcb4c679 mb/starlabs/common: Adjust the includes inline with coreboot
* 6b30e1f46b mb/google/dedede/var/pirika: Add support memory for CXMT CXDB5CBAM-MA-B
* d4e8af407c spd/lp4x: Add CXMT CXDB5CBAM-MA-B memory
* 8d7183a904 ec/google/chromeec: Add option to set keyboard backlight level at boot
* 973d0faf65 util/amdfwtool: Move needs_ish and combo_new_rab to data_parse.c
* 8449a15aed soc/qualcomm/x1p42100: Reduce USB OTG state enable timeout to 20ms
* f4af55a008 spd/lp5: Add SPD for MT62F1G32D2DS-020 WT:D and K3KL8L80EM-MGCV
* 9bea3130b5 mb/google/skywalker: Add AW88081 support for beep sound
* d8bcf242c6 Revert "commonlib/endian: Silence GCC -Warray-bounds false positives"
* 66039a61f1 Revert "commonlib/endian: Restore -Warray-bounds at the end of file"
* c27c9db51b mb/samsung/stumpy: Fix thermal configuration issues
* 288889cd98 mb/google/jecht: Fix thermal configuration issues
* 9fa2d55987 mb/google/beltino: Fix thermal configuration issues
* 76a48b5158 mb/google/beltino: Remove unused GNVS fan configuration
* 8cc8f219bf Documentation/drivers: Add ACPI five-level fan control documentation
* 47c4da36c4 util/amdfwtool/data_parse.c: Remove duplicate MP2_CFG_FILE
* fa23504c59 mb/siemens/mc_rpl: Alphabetize Kconfig options
* 8411fef90f mb/siemens/mc_rpl1: Switch from LPSS UART to legacy 8250 I/O UART
* 534fceb36a mb/siemens/mc_rpl1: Set PCI bridge function for NC_FPGA
* 8ce9255f82 mb/samsung/stumpy: Fix ACPI fan control FNP4 power resource
* f12f292d91 mb/google/intel/*: Fix ACPI fan control FNP4 power resource
* b9b95c917a mb/google/guado: Fix ACPI fan control FNP4 power resource
* 8a518b2134 mb/google/beltino: Fix ACPI fan control FNP4 power resource
* 6d751ef987 payloads/edk2: Drop EDK2_PCO_MMIO_EMMC Kconfig option
* 4423a0b390 payloads/edk2: Drop EDK2_UFS_ENABLE Kconfig option
* a86a5ebf7c payloads/edk2: Update default MrChromebox branch from 2502 to 2508
* 40a8466655 mb/google/fatcat: Add option to enable VGA mode 12
* 824992ddef soc/intel/pantherlake/romstage: Configure VGA mode 12 planar buffer
* 74113f5d5e drivers/intel/fsp2_0: Add options to config VGA mode 12
* 75318743c3 commonlib: Add pKVM DRNG related timestamps
* 2646eeffb2 mb/google/skywalker: Create variant Dooku
* 1b2675e4f2 soc/mediatek/mt8189: Require libbl31.a to exist
* 9c0a914192 libpayload: Fix printf edge cases for precision
* ebc2030ff7 soc/intel/pantherlake: Enable HW managed microphone privacy
* 4d9dacae16 mb/google/fatcat/var/ruby: Modify touchpad device setting to enable function
* 2821e8e2ae soc/intel/ptl: Remove redundant HAVE_BMP_LOGO_COMPRESS_LZMA Kconfig
* eadf2ee4a3 ec/starlabs/merlin/cfr: Replace integer literals with named constants
* 2bbc0f1ad3 mb/starlabs/starbook/{kbl,cml,tgl}: Control USB Bluetooth with wireless
* 2c9596555b mb/google/skyrim: Use edge (vs level) triggering for PS2K
* 0c3f304d5a mb/starlabs/byte_adl: Enable Wake On Lan
* ca5b51ef9c mb/google/bluey: Select QTEE firmware dependent Kconfig
* fe7b75d792 mb/google/fatcat/var/moonstone: Add fw_config touchscreen setting
* cfdaff3f70 commonlib/endian: Restore -Warray-bounds at the end of file
* 32ec29a51e mb/google/fatcat/var/kinmen: Disable RT721 clock stop support
* 4b50bc9e5f payloads/external/U-Boot/Makefile: Add custom repo and tag
* 3d41ac370d payloads/external/U-Boot/Makefile: Remove conditional
* c3b5c8723e ec/google/chromeec: Add function to determine keyboard backlight presence
* 7afd731849 ec/google/chromeec/acpi: Fix long battery string reporting for Windows
* bc475414c7 MAINTAINERS: Add Chen-Tsung Hsieh for MediaTek platforms
* 65dc0bdd7e mainboard/fatcat/lapis: Override PMC GPE configuration
* 4ea33e5ffa mb/google/fatcat/var/lapis: Enable THC HID over I2C mode
* 111da2557a mb/google/fatcat: Preserve VGPIO GPE for THC wake on touch
* e167e56883 mb/google/nissa/var/yavilla: Add stop pin for G2 touchscreen
* 1fa24898e2 soc/intel/common/block/pcie: Move speed helper to pcie_helpers.c
* 66f40a86de ec/starlabs/merlin: Move version offsets to ECDEFs
* 82367b8205 mb/google/ocelot/var/matsu: Add overridetree
* 05c0e16593 mb/google/ocelot/var/matsu: Update GPIO table
* 98c7be30ad mb/google/fatcat/var/moonstone: Support new schematic changes
* 5eafe672e3 vc/intel/fsp: Update WCL FSP headers to 3344_03
* 641eeca835 lib/vga_gfx: Fix left-up and right-up orientations
* a4f067c058 Makefile.mk: Align FMAP COREBOOT region to 4k boundary
* 410506b47c Makefile.mk: Print all FMAP region sizes in hexadecimal format
* c189604f43 mb/goog/ocelot/var/ocelot: Enable rp5 if PCIE WiFi detected
* 4a806a6865 ec/starlabs/merlin: Only show EC FW options for ITE EC
* 04d9a0d0f0 ec/starlabs/merlin/Kconfig: Fix typo in description/help text
* 1eda98a16e mb/siemens/mc_rpl1: Document CLKSRC 2 usage for PCIe RP5
* 1815a204b4 src/mainboard/lenovo: Add smbios_slot_desc, fix register types
* da204a92c1 vc/intel/fsp/wildcatlake: Expose PchHdaMicPrivacyMode
* 105598545e soc/intel/pantherlake: Update thermal design current parameters
* a5b51ab285 mb/google/rex/var/kanix: Add H58G66CK8BX147 to RAM ID table
* d7f427a7d2 util/xcompile: Fix compiler detection on newer Linux distros
* 82d90b1f21 Revert "mb/starlabs/*/rpl: Re-enable GpioOverride"
* 784d8f25f9 mb/google/fatcat/var/ruby: Enable panel touch function
* 56a8c40efa mb/starlabs/starlite_adl: Add missing ACPI entry for USB card reader
* 4047a44b68 sio/nuvoton/common/nuvoton.h: Add common Nuvoton SIO LDNs
* 3a1d6d5ded mb/google/brox/var/caboc: Adjust WWAN power off sequence
* b42f74122c Documentation/mb/lenovo: Adjust docs for Thinkpad T470s/T580
* 70e79f43b1 Haswell NRI: Print and fill in memory-related info
* 1730d05ec3 nb/intel/haswell: Factor out `report_memory_config()`
* 3bbfbd37e1 nb/intel/haswell: Factor out `setup_sdram_meminfo()`
* 3ffb01e9cb mb/siemens/mc_rpl1: Disable I2C1 and enable I2C6
* 4563db2807 mb/google/nissa/var/riven: Add H58G66CK8BX147 to RAM ID table
* a748e8b82b mb/google/fatcat/var/ruby: Enable touchpad function using I2C interface
* a92a2ee5d6 mb/starlabs/byte_adl: Expose fan control option in CFR
* bbb895436f mb/nissa/var/pujjoga: Add single ram configuration
* e2cf7f7dc7 soc/mediatek/common: Fix MMU assertion for framebuffer region
* a5ddfa963f mb/starlabs/starlite_adl: Increase ME region size to match IFD
* 7484a887b8 mb/google/ocelot: Fix EC sync IRQ configuration for board variants
* b1ed60b910 mb/google/fatcat/var/ruby: Disable FSP_UGOP_EARLY_SIGN_OF_LIFE temporarily
* fea1b2abbe mb/google/nissa/var/pujjocento: Adjust touch panel timing for stability
* 8f1c54685a drivers/mipi: Fix pixel clock and enable C-PHY for TM_TL121BVMS07_00C
* 979fdee1d9 soc/mediatek/mt8189: Support MIPI C-PHY interface
* 44635f328c soc/mediatek/common: Add C-PHY support for MIPI DSI
* c63e901b99 mipi: Add panel flags to support C-PHY interface
* 385ae6669b mb/gigabyte/ga-h77m-d3h/devicetree.cb: Re-enable IGD and PCIe VGA
* 2c6cf2c2a8 include/cper.h: Update CPER structures with __packed attribute
* d97644dd3f mb/asrock: Add Z77 Extreme4
* a73db6d451 mb/intel/ptlrvp: Add fw_config support for SPD selection
* 3ef1cf9f84 soc/amd/turin_poc: Add Turin SoC structure as a copy of genoa_poc
* 668d643e5c mb/lenovo/sklkbl_thinkpad: Add Lenovo Thinkpad T470s as a variant
* 8a6f9bf731 ec/google/chromeec: Update EC headers
* 745f1312aa include/cper.h: Update comments to UEFI spec version 2.10
* aab8ad98b6 mb/google/ocelot: Create kodkod variant
* 2279ba80e1 .gitignore: Add .clangd as a "Development friendly file"
* cd4af952e7 mb/google/ocelot/var/ocelot: Update DDR5 memory configs
* 1af54d9784 drivers/intel/touch: Change I2C speed type to i2c_speed enum
* 84a348f4bf ec/starlabs/merlin: Remove the fast charge option
* 1699d455e7 vc/intel/fsp: Update PTL FSP headers to FSP 3373_03
* b87a9795de tree: Use boolean for s3resume
* ec1068883f mb/google/nissa/var/guren: Add initial WWAN related settings
* 752d49a4ff mb/google/fatcat/var/moonstone: Disable RT721 clock stop support
* 155041ad4c soc/qualcomm/x1p42100: Add EUSB2 HS repeater support for USB Type-C
* 6e45016610 intel soc,southbridge: Add Kconfig to set TSBS in IFD during build
* f4271cad0a ifdtool: Add set top swap size PCH strap subcommand
* ab4b82fb3c util/lint: Add a license check exception for .gitkeep files
* 03524780ff soc/qualcomm/x1p42100: Support loading QTEE FW config files
* 50adb3f23c mb/google/bluey: Increase FW_MAIN_A/B slot size to 4.5MB
* bbdf2eab6a soc/mediatek: Rename DSI common files for improved readability
* 8a2c04e04d mb/starlabs/*/rpl: Re-enable GpioOverride
* 9ff9f2904b mb/google/bluey/var/quartz: Enable all spi flash drivers
* f6743fba29 mb/google/fatcat/var/moonstone: Enable Intel DPTF support
* fc736de10e ec/starlabs/merlin: Remove the EC_STARLABS_NEED_ITE_BIN option
* 3dee4cd0c0 soc/intel/pantherlake: Correct Touch Controller Speed Configuration
* 7376761bdf mb/nissa/var/pujjoquince: Modify fingerprint configuration
* 6ffbc9a929 soc/mediatek: Move mtk_dsi_reset() to mtk_dsi_common.c for reuse
* 668ea97075 commonlib/endian: Silence GCC -Warray-bounds false positives
* 4a3cc37cbd crossgcc: Upgrade binutils from version 2.44 to 2.45
* 35d4b3f2f4 arch/arm64: Support to load QTEE firmware in x1P42100
* e38056bef8 amdfwtool: Move ISH before PSP L2
* c1c83df3b5 mb/emulation/qemu-riscv: Enable ACPI by default
* 5daf497df4 arch/riscv: Add ACPI support for riscv
* 5c85793d26 mb/google/fatcat/var/lapis: Add cs42l43 and cs35l56 Soundwire links
* 14fc6c3469 crossgcc: Drop nds32le-elf toolchain from default builds
* fce489e9e5 drivers/intel/touch: Check SoC I2C speed function exists before calling
* 249883d5bf mb/starlabs/starlite_adl: Squash SB and non-SB board variants
* 80861a9f69 mb/starlabs/starlite_adl: Add CFR option for USB card reader
* 5c1a9fa809 mb/google/fatcat: Create ruby variant
* 43df7b14ae mb/var/uldrenite: Fix ISH UART port and VR configuration mismatch
* 1a0b7195f9 mb/google/nissa/var/glassway: Removed the flag of DB_1A for pmc_mux
* 9f0f373ff9 mainboard/amd/crater: Select the option to keep the AMD ACP active in S3
* f04c45acee mb/google/fatcat/var/lapis: enable CS35L56_FAMILY and CS42L43 driver options
* 78e7dcb152 drivers/soundwire/cs42l43: Add optional properties for controlling jack and accessory detect
* f1c973bbff drivers/soundwire/cs42l43: Support Cirrus Logic CS42L43 codec
* 35970abcdf mb/google/nissa/var/dirks: Add H58G56CK8BX146 to RAM ID table
* 402ac7cd81 crossgcc: Upgrade acpica from 20250404 to 20250807
* 3aa312e4c9 soc/mediatek/mt8189: Add DSI path support and update mutex
* 6b93516e02 soc/intel/baytrail/acpi: Add missing MMIO window below 4GB
* 321d8c5b21 soc/intel/braswell/acpi: Add missing MMIO window below 4GB
* 74d7a21382 nb/intel/haswell/acpi: Add missing MMIO window below 4GB
* 07f25bef86 mb/google/ocelot/var/ocelot: fix gpio settings
* 10b0697dc3 soc/intel/pantherlake: Update power limits and voltage regulator parameters
* 163e6a502c mb/starlabs/common: Deduplicate Pin Mix
* 7622a57771 mb/starlabs/common: Move the SMBIOS code to common directory
* e7dd184e5f Makefile.mk: Add support for mainboard vendor common code
* dd3d7dcdfa mb/purism/librem_skl: Add CFR option menu support
* 0d50fdf035 mb/purism/librem_l1um_v2: Add CFR option menu support
* e9a01dea32 mb/purism/librem_jsl: Add CFR option menu support
* 08efea5141 mb/purism/librem_cnl: Add CFR option menu support
* 1d02f139d3 mb/google/fatcat: Add wake configuration to cnvi_bluetooth
* cf97e1bc25 mb/intel/ptlrvp: Add power meter acpi changes
* 7e3883633a mb/google/brox/var/jubilant: Apply fw_config to enable/disable I2C1
* 114d24cd7a lib: Generalize BMP_LOGO help text
* e468e32dfb mb/google/*: Update Kconfig.name with actual device names
* 85d7a1c85f drivers/ipmi: add Block Transfer (BT) interface
* fe26234cf2 mb/google/trulo/var/uldrenite: Update DPTF parameters
* 660f71e704 mb/google/trulo/var/uldrenite: Set GPP_E16 to NC for non-WWAN SKU
* 3747b47df1 mb/lenovo/sklkbl_thinkpad: Add Lenovo Thinkpad T580 as a variant
* d23eaa356f util/lint: maintainers-syntax: Add a check to ensure paths exist
* 079c9c47aa soc/amd/cezanne: Add config option to keep ACP running in ACPI S3 state
* f665e189da mb/starlabs/{starbook/mtl,byte_adl}: Select USB4_PCIE_RESOURCES
* a7a49e5f74 mb/starlabs/starfighter: Correct reference for second TBT port
* f22bcc1d42 mb/starlabs/starbook/rpl: Disconnect unused GPIOs
* a8c70f7578 mb/starlabs/starbook/rpl: Reconfigure TBT GPIOs
* 83aa4417cb mb/starlabs/starbook/rpl: Tidy up GPIO config straps
* 7ad632cbc7 mb/starlabs/starbook/adl: Disconnect unused GPIOs
* d7627a39e8 mb/starlabs/starbook/adl: Tidy up GPIO config straps
* 711d49d4ec mb/starlabs/starbook/adl: Configure additional SSD GPIOs
* 90d87c5941 mb/starlabs/starbook/*: Remove comments for unused GPIOs
* f6b5e26fe7 soc/mediatek/mt8196: Add 24MB framebuffer region
* 815f3f7df2 mb/google/rauru: Increase RW firmware sections size to 1756KB
* 193420fe0b soc/mediatek/common: Add bootsplash support
* bdd4561536 soc/mediatek/mt8196: Add mtk_ddp_ovlsys_start for rendering framebuffer
* 0ff213d711 soc/mediatek/common: Conditionally set up framebuffer
* 5271ac7ac5 soc/qualcomm/x1p42100: Reserve DDR carveout region
* 19feafc018 drivers/intel/fsp2_0/ppi/mp_service_ppi: Support CPU_V2_EXTENDED_TOPOLOGY
* 16feb1bb28 mb/google/brya/var/nissa: Add missing device type to gfx device
* f4ecb69314 util/inteltool: Add Twin Lake UHD Graphics PCI IDs
* ed736a47d8 mb/starlabs/byte_adl: Configure additional SSD GPIOs
* 38525716d8 mb/starlabs/starbook/adl: Re-order the config strap GPIOs
* 2c465c0e21 mb/starlabs/starbook/adl: Re-order GPIOs to match other boards
* 115a6ce36a mb/starlabs/starbook/adl: Correct clock request number in comment
* 1b5aaaefd9 soc/intel/meteorlake: Fix IGD IRQ
* 06de11693f mb/starlabs/starfighter: Fix Thunderbolt disabling code
* 5e36d9ba04 mb/starlabs/starbook/mtl: Update the VBT from 256 to 261
* fba8c14c27 mb/google/brya: add cnvi BT recovery mechanism
* 1fb4a7409b soc/intel/pantherlake: Add VR power state current thresholds
* 59ede353c5 soc/intel/pantherlake: Add Thermal Design Current (TDC) configuration
* c54658d200 soc/intel/pantherlake: Add ICC Max configuration support
* 0d1545ffac soc/intel/pantherlake: Add hysteresis window UPDs support
* 8f24546fc4 vc/intel/fsp/fsp2_0/wildcatlake: Expose Thermal current thresholds and mode
* 04affc3354 mb/google/ocelot: Update gpio's for ALC721 sndw
* 3ac1a2b124 MAINTAINERS: Drop non-existant TPM files from VBOOT
* af8b15ae04 Revert "libpayload: Define UCHAR_MAX/CHAR_MIN/CHAR_MAX"
* 5e64ae2554 mb/starlabs/starbook/mtl: Enable PCH Energy
* 375847acfe soc/intel/meteorlake: Configure PmcPchLpmS0ixSubStateEnableMask
* db0faffdb8 mb/starlabs/*: Add comment about not configuring eSPI GPIOs
* 990ad929a0 mb/starlabs/starbook/tgl: Don't configure eSPI GPIOs
* 7ebcd6763f soc/qualcomm/x1p42100: Handle Type-C polarity for USB4/DP PHY init
* f1708cf21a drivers/intel/touch: Enhance Intel touch driver for new devices
* 55bf4ea07e cpu/x86/topology: Add tile and die ID CPU topology fields
* 0c97aed8ac mb/google/fatcat/var/lapis: Modify touchpad and touchpanel configuration
* 9e4a0a6026 mb/starlabs/starbook/mtl: Don't configure eSPI GPIOs
* 3e0457e087 security/vboot/Makefile.mk: Fix building vboot lib with OpenSIL
* 60ef877d93 mb/google/skywalker: Modify the RST pin naming
* d5a8cec748 soc/intel/meteorlake: Rely on FSP_DIMM_INFO
* e168a516e4 soc/intel/pantherlake: Rely on FSP_DIMM_INFO
* 23419df34c drivers/intel/fsp2_0: Implement API to retrieve DIMM info
* 1f328351e6 mb/starlabs/*: Select SPD_READ_BY_WORD
* 88439b4cd3 mb/starlabs/starbook/mtl: Set the VPU default to disabled
* 8ffa58723a soc/qualcomm/x1p42100: Add USB Type-C support
* 45cedbb992 soc/qualcomm/x1p42100: Add HS/SS PHY support for USB Type-C ports
* b18dfde22a soc/qualcomm/x1p42100: Add Clock support for USB Type-C ports
* c7e4ef822d mb/starlabs/{starbook,starfighter}: Remove DRIVER_TPM_SPI_CHIP
* 0c73e45493 ec/starlabs/merlin: Add disabled option for lid switch
* ac7bb7694d mb/starlabs/starbook/mtl: Configure eSPI GPIO Mux
* b37821ac25 mb/starlabs/*: Unify settings across device VBTs
* ac8765c88a mb/starlabs/*: Correct USB Type-C Port Configuration
* f7512c8647 mb/starlabs/starbook/{adl,rpl}: Remove USB OverCurrent Configuration
* bf67771656 mb/google/fatcat/var/lapis: Update gpio GPP_E07 configuration
* ff5daa0581 MAINTAINERS: Remove '/' from the beginning of paths
* 6bfa257eef MAINTAINERS: Correct the path of cbmem_id.h
* d7ae81132b MAINTAINERS: Correct asus/p8z77-series to asus/p8x7x-series
* ef8eb79636 MAINTAINERS: Rename util/ipqheader to util/qualcomm
* 0965bb9f68 MAINTAINERS: Remove non-existant mainboards
* f5d1505c6b mb/google/fatcat/var/moonstone: Add Elan touchpad support
* 24bfeb154e mb/google/fatcat/var/moonstone: Add focaltech touchscreen support
* 1580346fa7 mb/google/fatcat/var/moonstone: correct the Kconfig settting
* 150647a2fb ec/google/chromeec: Fix ACPI _CRS method generation for LPC memory range
* ffa262db59 Documentation/FIT: reference archived copy of Intel TXT lab handout
* f47e6c3905 MAINTAINERS: Fix typo "copperlake_sp" to "cooperlake_sp"
* 1af0497c12 mb/google/dedede: Fix MAINBOARD_FAMILY conditional
* b4b6c3aa55 mb/google/brya/var/{marasov,mithrax,omnigul}: Add SOF chip driver entries
* 738fd2efc9 util/chromeos/extract_blobs: Add support for command line params
* e59c5abd13 ec/google/chromeec: Add EC_GOOGLE_CHROMEEC_FW_CONFIG_FROM_UFSC
* 341b108a71 mb/starlabs/starfighter: Add missing GPP_A5 definition
* 414f1a61dd vc/intel/fsp/fsp2_0/pantherlake: Expose Thermal current thresholds and mode
* 2e92833172 soc/qualcomm/common/usb/qmpv4_usb_phy: Fix delay value in comment to 10 ms
* b48532c694 soc/mediatek: Refactor MMU configuration for DMA region
* 28a8eaa57b soc/mediatek/mt8192: Clean up memlayout.ld
* bca876849a soc/mediatek/common: Add enable parameter for configure_backlight
* 46ce812c1b mb/google/skywalker: Create variant Grogu
* 98a5445328 MAINTAINERS: Correct paths for Dell Latitude mainboards
* 984ee53de8 mb/asus/p8x7x-series: Introduce CFR setup menu
* 830ec89bca mb/google/bluey: Update mainboard part number for QuenbiH
* c2fcf69e41 arch/x86: Use boolean for flag_is_changeable_p()
* 2a791fcd66 mb/imb-1222/hda: Use AZALIA_PIN_CFG_NC() for disabled SPDIF_OUT2 pin
* 217a7962d0 ec/google/chromeec: Update EC headers
* 59cbb073c2 util/chromeos/crosfirmware.sh: Fix download of ninja (baytrail) recovery
* fba92daed3 soc/qualcomm/x1p42100: Clean up DDR and IMEM memory layout
* 5609174786 mb/google/rauru: Create variant Sapphire
* 386feb720e soc/mediatek/mt8196: Add DVFS support for the second SoC SKU
* 4b93b36170 mb/purism: add missing terminators to azalia codec tables
* a927d124be mb/asus: Replace verb tables with reworked implementation
* 9c0c925fe6 mb/siemens/mc_rpl1: Send POST codes to NC FPGA via PCI
* 10361583b3 mb/siemens/mc_rpl: Add code to wait for legacy devices before PCI scan
* d9979ba6a3 mb/siemens/mc_rpl: Sort includes alphabetically
* d9b609b139 nb/intel/haswell: Use boolean for cbmem_was_initted
* 1f2408f573 console: Fix flushing for slow consoles
* 6a016a784b Documentation: Finalize 25.09 release notes
* a0c5669c1b mb/asrock/imb-1222: Use macros for HDA verb table
* c94ca87d40 mb/google/fatcat/var/kinmen: Enable Intel DPTF support
* fe5f8494f6 docs/releases: Remove outdated "Upcoming release" in titles
* aef86a7e89 mb/google/ocelot/var/ocelot: disable HDA GPIOs by default
* 21f6ccf3a4 soc/intel/pantherlake: Use CPU ID mask for all stepping
* 8bc41fc937 mb/google/trulo/var/pujjocento: Update DTT settings for thermal control
* d5f1ecedf7 {device/azalia_codec,mainboard}: Use node ID enums for Realtek ALC887
* 02059c2250 mb/google/trulo/var/pujjoquince: Disable ISH gpio setting by fw_config
* 58459b8210 mb/var/uldrenite,orisa: Include the variant GPIO header
* 88ad238eca mb/google/skywalker: Fix incorrect GPIO_USB3_HUB_RST_L pull-down
* b8a8800152 mb/google/fatcat/var/lapis: Configure gpio of fingerprint sensor
* 4431848ee6 acpi: Move most of HEST ACPI table to common code
* ce1ced7f6a mb/intel/ptlrvp: Fix WIFI driver device settings under root port 4
* 691a23a272 mb/google/fatcat: Fix WIFI driver device settings under root port 4
* 16bf80b9b1 tests/imd: Fix invalid NULL comparison on uintptr_t
* 6d816b3b43 mb/asus/h610i-plus-d4: Add missing AZALIA_USE_LEGACY_VERB_TABLE
* 6f042c6ae4 lib: coreboot_tables: Fix grammar of *These information* in comment
* bcc7fce590 mb/topton/adl: Add TWL variant (X2E_N150)
* f634121fa4 mb/purism: Replace verb tables with reworked implementation
* 20d4042458 mb/asrock: Replace verb tables with reworked implementation
* 2b7dbf80c9 mb/apple: Replace verb tables with reworked implementation
* 970249694f mb/amd: Replace verb tables with reworked implementation
* 94beaa7ab3 mb/acer: Replace verb tables with reworked implementation
* f3db3a19d5 mb/51nb: Replace verb tables with reworked implementation
* bc92d9a666 nb/intel/haswell/minihd.c: Add reworked verb table implementation
* 69781b9806 soc/intel/broadwell/minihd.c: Add reworked verb table implementation
* 31fc5b06a6 device: Introduce reworked azalia verb table
* 50a59d4464 device: Add Kconfig to prepare for reworked verb table implementation
* a3e2073591 lib/vga_gfx: Add API to render text on a bitmap buffer
* ec2875e38f mb/google/ocelot/var/ojal: Enable FPS and update FW config
* beb0951c1c mb/google/ocelot/var/ojal: Update touchpad config
* bd933b641e mb/google/ocelot/var/ojal: Add overridetree
* 82a9e601bd mb/google/ocelot/var/ojal: Add initial GPIOs config
* 622c504a71 mb/emulation/qemu-riscv: Select DRIVERS_EMULATION_QEMU_FW_CFG
* ba3f529681 drivers/emulation/qemu: Adjust fw_cfg driver for Arm and RISCV
* c1e0384367 arch/riscv/include: Cast 'id' to int in OTHER_HLS()
* 67a3fb6abe mb/asus: Add PRIME H610i-PLUS D4 (Alderlake/LGA1700)
* 4f13f72dbc libpayload: Define UCHAR_MAX/CHAR_MIN/CHAR_MAX
* 7f8c442a09 soc/intel/meteorlake: Correct function naming
* 6d265ca31d device/pci_device: Fix typo in comments
* d4b6b55977 payloads/Kconfig: default to Skiboot payload on PPC64
* cb899b0c4d mb/google/brox/var/caboc: Update HDA verb table
* 15b903e1fd soc/intel/pantherlake: Add DDR5 memory type debug message
* a5252bd5b9 drivers/soundwire/cs35l56: Support Cirrus Logic CS35L56 Smart Amplifier Family
* 7d44128b2f mb/asus/p8z77-m_pro: Enable serial port A instead
* 894c8069fc superio/nuvoton: Add NCT5535D
* 69b0541375 sio/nuvoton/nct6779d: Add power loss resume support
* f61ffb68c9 soc/intel/pantherlake: Remove unused TxDqDqs retraining parameter
* 3a84c93b5b soc/intel/pantherlake: Correct function naming and code style
* 3b34079b19 mb/google/trulo/var/kaladin: Enable External bypass config2 settings
* 61488ffd57 mb/google/skywalker: Add CS35L51 support for beep sound for Padme
* 4a7d779ed0 soc/mediatek/mt8196: Set RTC EOSC calibration to 8 seconds
* 07df08836e Docs/releases: Update release notes for 25.09 release
* 8f52c0774e docs/security/vboot: Update supported board list
* 1f08b36f84 Documentation: Add coreboot release 25.12 template
* 02980f0ea6 soc/amd/common/block/psp: Add comments
* a17a41559a soc/amd/common/block/psp: Add BIOS SPI flash semaphore
* 038262155e soc/amd/common/block/psp/psp_smi_flash: Fix flash busy check
* 67e3579d61 sb/intel/lynxpoint: Enable PCIe Relaxed Order
* 865649edc0 util/docker/jenkins-node: Use the correct branch for encapsulate
* 6af7d299b2 mb/google/skywalker: Add MIPI panel support with TM_TL121BVMS07_00C
* 4fc5f7a843 mb/google/fatcat/var/lapis: Modify the gpio order of mem_id
* 2764a508ad mb/google/fatcat/var/lapis: Add 4 DDR modules to RAM id table
* 886bd1d186 spd/lp5: Add Samsung K3KLALA0EM-MGCU memory part
* 0a6f3e3868 mb/google/brox/var/caboc: Add PDC FW hash to hint romstage init
* cbd1529126 mb/google/brox: Update Auxiliary Firmware Version check
* 0d4c0ee7fc ec/google/chromeec: Add API for AP shutdown command
* bbd72abae5 ec/google/chromeec: Update EC headers
* 21ca3c5f3d mb/intel/ptlrvp: Update CKD/QCK mapping parameters
* 3d7b898ff4 mb/google/ocelot/var/ocelot: Disable ALC721 clock stop support
* c822148f2b mb/google/fatcat/var/lapis: Modify dq/dqs setting
* 78fb910fe2 mb/google/fatcat/var/lapis: Update the configuration of fw_config
* eb3497fae4 mb/google/fatcat/var/lapis: Update tpm i2c configuration
* 3a33217349 mb/google/fatcat/var/lapis: Update thermal strategy
* 36d2dc7cb9 mb/google/ocelot: Update wake event mapping for gspi0
* 59bd0e3206 mb/google/ocelot/var/ocelot: Update USB and TCSS port configuration
* c4627e0dda mb/google/ocelot: Remove FP_PRESENT probe from ISH device configuration
* 8e9ec16f45 mb/google/trulo/var/pujjolo: Add tablet mode fw config for ish fw
* e3a2d1cecf soc/qualcomm/qclib: Improve logging on invalid MRC cache data
* 289c01e6fb mb/google/ocelot: implement variant_memory_sku()
* fbb68982c9 mainboard/google/ocelot: Update PCIe root port for SD card interface
* c98155cbcd soc/intel/pantherlake: Generate TME keys only if TME is enabled
* d8ed977358 mb/google/skywalker: Remove space before tabs in gpio.h
* 1e7908fa9f mb/google/skywalker: Set up all output GPIOs
* 14e6c62c10 mb/google/skywalker: Define all GPIO pins
* 2859a5cba5 mb/{google,intel}/{fatcat,ptlrvp}: Prevent access to disconnected camera
* ffae0f7d73 security/vboot: Extend CROS_EC_HASH_TIMEOUT_MS
* d2345e0c60 mb/google/fatcat: Set `SkipExtGfxScan` FSP-M UPD
* 8953c772cf lib: Fix bad whitespace in add_bmp_logo_file_to_cbfs_call
* ef0c650edf soc/intel/cmn/blk/fast_spi: Cancel DMA transfer before locking
* b3ad2aa3e7 mb/google/ocelot: GPIO config for headphone jack detection
* 508c399bc1 mb/goog/ocelot/var/ocelot: add H58G66CK8BX147 memory option
* d8a3f2aedd mb/goog/ocelot/var/ocelot: add H58GE6AK8BX104 memory option
* f4110cebf6 spd/lp5: Add SPD for H58GE6AK8BX104
* 7acc99c3d2 acpi/acpi_pm: Fix compilation without SMBIOS
* c77d3d67cf mb/google/skywalker: Report panel ID and SKU ID for padme
* 6185983028 soc/intel/pantherlake: Standardize macros for core count and SKUs
* 9a8402adf9 mb/google/trulo/var/kaladin: Update HDA verb table
* 9af9e1d1f4 mb/google/trulo/var/kaladin: Add eMMC DLL settings
* 3b4c446fbb mb/google/bluey: Configure QUP0 SE1 as I2C
* ddf5987c1e drivers/mipi: Add support for TM_TL121BVMS07_00C panel
* 0fec287327 mb/google/nissa/var/dirks: Drive GPIO GPP_D2 high to fix noise issue
* 5a9ca2b040 mb/starlabs/starbook/mtl: Set SPD size to 512
* 79119456a2 soc/amd/common/block/iommu: Add missing newline to debug print
* 81bb2663b7 soc/qualcomm/x1p42100: Select HAVE_CBFS_FILE_OPTION_BACKEND
* bf83dd9927 soc/qualcomm/common/qclib: Introduce runtime debug log level control
* cf3af46e50 mb/google/skywalker: Create variant Padme
* 2b1809e026 mb/google/fatcat: Increase Fast VMode I_TRIP threshold to 63A
* 2a7a0e86cd mb/google/fatcat: Configure Acoustic noise mitigation
* 6c06602c75 mb/google/brya/var/uldrenite: Add fw_config probe for touchpad
* a3b73464b5 soc/qualcomm/x1p42100/usb: Fix code comments and debug messages
* e924021e69 mb/google/trulo/var/kaladin: Add GTH1563 and GTH7503
* d1967d927a spd/lp5: Add SPD for MT62F1G32D2DS-031 WT:C and MT62F2G32D4DS-031 WT:C
* 2e10ddb1ee mb/starlabs/starbook/mtl: Make TCSS notify the IGD of changes
* 47fb46e0e4 vc/intel/fsp/mtl: Update the headers to 5124_47 (13.0.228.64)
* bb760bc9f3 Kconfig: Introduce HAVE_CBFS_FILE_OPTION_BACKEND
* f1b83c8759 mb/google/rex/var/kanix: Add K3KL8L80EM-MGCU to RAM ID table
* bcb3263078 mb/goog/ocelot/var/ocelot: add H58G66BK8BX067 memory option
* 751afeb060 mb/google/brox/var/caboc: Update HDA verb table
* 56700713de mb/google/trulo/var/kaladin: Disable eMMC GPIOs via firmware config
* 93c147c5e6 commonlib/device_tree: Add dt_add_iommu_addr_prop function
* d3d2f0f1c8 mb/google/fatcat/var/moonstone: Add to support ALC1320 Smart Amp
* 1da045f6a5 mb/google/skywalker: Add API support for regulator VCN18
* fe70426dd7 soc/mediatek/common: Add support for regulator VCN18
* f4a123f055 tests: Allow specifying using system Cmocka or building from source
* e7d598ba2c Reland "tests: Allow specifying vboot source directory"
* a348ef46db mb/google/trulo/var/pujjolo: Change setting for lite ISH fw
* 16db59ccef mb/google/rex/var/karis: Add K3KL8L80EM-MGCU to RAM ID table
* 3639648f81 mb/google/fatcat/var/felino: Set GPP_A15 and GPP_B23 as not used
* 8585591596 mb/google/fatcat/var/lapis: Set GPP_A15 as not used
* b9af91dfe1 mb/starlabs/starlite_adl: Drop HDMI entries from verb table
* 461c6a7d31 mb/starlabs/starfighter/rpl: Drop HDMI entries from verb table
* fc3a647579 mb/starlabs/starbook/rpl: Drop HDMI entries from verb table
* a88d9e1033 mb/starlabs/starbook/mtl: Drop HDMI entries from verb table
* 90f94287fd mb/starlabs/starbook/adl_n: Drop HDMI entries from verb table
* 684530ebdc mb/starlabs/starbook/adl: Drop HDMI entries from verb table
* 258da6b1ef mb/goog/ocelot/var/ocelot: add H58G66BK7BX067 memory option
* 883103c77f mb/google/ocelot: Disable memory training progress bar
* f3a49c8b3d mb/google/ocelot/var/ocelot: Disable audio for invalid Audio FW_CONFIG
* be3148575e mainboard/google/ocelot: Set OEM footer logo bottom margin
* 092fca3210 mb/google/fatcat/var/kinmen: Add support ALC1320 Smart Amp
* 4ba1b615db mb/starlabs/starlite_adl: Use macros for HDA verb table
* ca8d6a7512 mb/starlabs/starfighter/rpl: Use macros for HDA verb table
* c30163dace mb/starlabs/starbook/tgl: Use macros for HDA verb table
* 15111ebb21 mb/starlabs/starbook/rpl: Use macros for HDA verb table
* 6d6a280ab2 mb/starlabs/starbook/mtl: Use macros for HDA verb table
* 543f6c2a52 mb/starlabs/starbook/kbl: Use macros for HDA verb table
* 6d7c8f5477 mb/starlabs/starbook/cml: Use macros for HDA verb table
* 515f566840 mb/starlabs/starbook/adl_n: Use macros for HDA verb table
* 4b61d4de5f mb/starlabs/starbook/adl: Use macros for HDA verb table
* 8bc0eddf15 soc/intel/pantherlake: Add support for a new Panther Lake B0 SKU
* 2b84d26f55 payloads/edk2: configure capsule updates
* f3211e9639 soc/intel/pantherlake: Add support for Acoustic Noise Mitigation UPDs
* 2c03fd06a9 mb/google/trulo/var/kaladin: Disable ISH via firmware config
* f8574f7145 soc/intel/ptl: Add Wildcat Lake SKU power map
* b1fe32dd9e mb/{intel,google}/{fatcat,ptlrvp}: Update GPP_A15 GPIO configuration
* 6074ca18d3 mb/google/ocelot: Create matsu variant
* 76e0f64035 mb/google/brya: Update GPIO_PCH_WP for trulo variants
* b69e66721d mb/google/brya: Update GPIO_PCH_WP configuration in trulo baseboard
* 17c623277b mb/google/trulo/var/pujjolo: Change stylus settings
* 7f74155aa4 mb/google/trulo/var/uldrenite: Select USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS
* f373faa9c8 mb/google/trulo/var/uldrenite: Add fw_config probe for storage
* a262cdbc27 mb/intel/ptlrvp: Add wake configuration to cnvi_bluetooth
* 1c0186f280 soc/intel/common/block/cnvi: Add CNVi chip configuration support
* bdbe8b9b6f util/kconfig: Fix xconfig
* 241b940ac7 mb/google/nissa/var/rull: add RAM ID H58G56CK8BX146
* 599d660c4b mb/google/fatcat: Enable support for Realtek EC
* 89a3ae3d80 mb/google/trulo/var/pujjolo: Update GPP_D15 setting
* b849c9daa1 3rdparty/qc_blobs: Update submodule to upstream main
* 8159b2e06c device/azalia_codec: Add header with enums for Realtek node IDs
* 18ae0c48e1 mb/google/fatcat/var/moonstone: Support new schematic changes
* c1f76dd87e mb/google/brya/var/dochi: Add H58G56CK8BX146 to RAM ID table
* 164b4a1d90 mb/google/nissa/var/craask: Add parade touchscreen support
* 492826771e mb/google/bluey: Enable USB support
* 96eb6a3ac1 soc/qualcomm/x1p42100: Add USB Type-A Host support
* 2908a955e5 mb/google/rex/var/kanix: Add H58G56CK8BX146 to RAM ID table
* 7fc414c886 mb/google/trulo/var/kaladin: Enable EC keyboard backlight
* 859cc31e3a mb/google/brox/jubilant: Generate RAM IDs
* a6c15129a7 mb/google/fatcat/var/moonstone: Generate SPD ID for memory module
* 1028f3e846 soc/intel/pantherlake: Add Bluetooth to PME wake source mapping
* 3f926bc110 commonlib/bsd: Add Bluetooth wake source in ELOG event data
* 84ec1493a3 drivers/wifi/generic: Fix typo in header guard comment
* 2e2490256f soc/qualcomm/x1p42100: Add USB clock support for X1P42100
* 159afbc5d5 lib/lzmadecode: Increase decoding speed by 30%
* 0b8ad35ac1 mb/starlabs/byte_adl: Adjust the VBT
* d3cea61907 mb/starlabs/starlite_adl: Adjust the VBT
* 3507992d1d mb/starlabs/starbook/adl_n: Adjust the VBT
* 05cd5a7ab9 mb/google/nissa/var/telith: Generate RAM IDs for telith
* a0bdf3961c soc/qualcomm/common: Add clock reset function support
* cf11722e68 soc/mediatek/mt8189: Enable tracker debug hardware
* 382a7caff3 soc/mediatek/mt8196: Refactor tracker driver to support new platform
* 97f9ebb5c2 mb/google/ocelot: Create ojal variant
* ef1d48ee1d util/lint: Don't check for Kconfig.name in common directory
* 5cb36eb16c util/lint: Don't check for board_info.txt in common directory
* 46b03e682c util/amdfwtool: Handle address mode properly for Turin
* 97cf4a1919 util/amdfwtool/amdfwread: fix offset decision for PSP/BIOS directory lookup
* 73dd7bb046 util/amdfwtool/amdfwread: add initial parsing for EFW structure
* d4da533473 smbios.h: Update smbios_memory_type
* 183589dcbd smbios.h: Update smbios_memory_form_factor
* 58726e58e4 mb/starlabs/starbook/mtl: Adjust the VBT to fix hot plug
* 80df8c336f mb/intel/ptlrvp: Update Kconfig for ptlrvp_chromeec4s and ptlrvp4es support
* ed59c1de34 soc/qualcomm/x1p42100: Update TF-A memory reservation
* 56dbafcff4 soc/intel/pantherlake: Remove UFS support
* 5b46caef93 mainboard/intel/ptlrvp: Remove UFS support
* 621633af9b mainboard/google/fatcat: Remove UFS support
* 5e2f5050ba mb/starlabs/starbook/kbl: Update HDA verb table
* 4626c053dd mb/starlabs/starbook/adl_n: Update HDA verb table
* 6f11c31354 mb/starlabs/starbook/mtl: Update HDA verb table
* b748a5e10b mb/starlabs/{starbook,starfighter}/rpl: Disable GPIO override
* 29ca9c8bfa mb/google/bluey: Disable charging during normal boot
* e82338b0a2 mb/google/bluey: Add boot mode to coreboot tables
* 893a2b008a libpayload: Add coreboot boot mode table
* a45c8441af lib: Add boot mode information to coreboot tables
* c73f30e74b mb/google/nissa/var/riven: Add H58G56CK8BX146 to RAM ID table
* 8c717df03a soc/intel/ptl: Update Wildcat Lake PCIe root port numbering
* afaef0b904 mainboard/google/ocelot: Update GPIO configuration for SLP_S0_GATE
* 97dbfd3098 cpu/intel/car/non-evict: Improve CAR setup
* cd48dc7d69 mb/google/rex/var/karis: Add H58G66CK8BX147 to RAM ID table
* ffbf40f6c0 ec/google/chromeec: Update EC headers
* 517185eca2 mb/google/bluey: Configure touchpad power GPIO
* baf159a1c8 mb/google/bluey: Configure GSC and EC for Quartz
* f8685bb2ee soc/mediatek/mt8189: Enable lastbus debug hardware
* 6e61ea65a8 mb/google/bluey: Add disable slow charging support
* 45d1f9cce4 mb/google/bluey: Move charging functions to dedicated file
* 9fb306f53c soc/qualcomm/x1p42100: Add SPMI driver to ramstage
* ac5bb861d8 mb/google/brya/var/uldrenite: Update HDA verb table
* f2d3051631 ec/lenovo/h8: Turn on PWR LED
* d8de1c4974 ec/lenovo/h8: Disable POST codes
* d5a92542aa mb/google/fatcat/var/fatcat: Disable ALC721 & ALC722 clock stop support
* 3b2962929b lib/timestamp: Init TSC frequency early on x86
* b0a63052b7 sb/intel/bd82x6x: Fix CPU replaced check
* 9ecf04c2bc mb/google/nissa/var/quandiso: Generate RAM ID for MT62F512M32D1DS-023 WT:E
* 16318a32ce spd/lp5x: Generate initial SPD for MT62F512M32D1DS-023 WT:E
* 283c25beec mb/google/trulo/var/kaladin: Select Strauss keyboard to show G icon
* 2709ae443b cpu/x86/entry16.S: Move reset vector to this file
* 53810448fc cpu/x86/reset16.S: Remove handcoded reset vector
* a1b7f5e1b8 mb/siemens/mc_rpl: Disable EIST to improve deterministic behavior
* e6f8900c2d mb/siemens/mc_rpl: Disable S0ix power states
* c71071397f soc/intel/common/fast_spi: Add static bus scanning
* e73b4579c6 mb/siemens/mc_rpl: Disable DPTF
* 77061d8427 mb/google/bluey: Add Quartz board (Qualcomm Hamoa)
* ee1446a791 mainboard/emulation/qemu-q35: Do not compile memmap into SMM
* a7b6590aca mb/google/dedede/var/dexi: Add and use VBT
* 70ce81c86f mb/google/dedede/var/dita: Add and use VBT
* 87f5d4c54a tree: use boolean for PcieRpLtrEnable[]
* 725ab7b066 soc/mediatek/common: Increase WAIT_AUX_READY_TIME_MS
* f02e755364 config/builder/mitac: Hook up public FSP repo and microcode
* fc62ffab48 soc/amd/common/fsp/dmi: Skip parsing when memory type UNKNOWN
* c3071b7150 soc/amd/cezanne/fsp_m_params: add UPD pointer parameter to mb callback
* eb9a673a8e soc/amd/cezanne: Add a Kconfig option for SERIRQ_CONTINUOUS_MODE
* c590e8e75c mb/brya/var/uldrenite: Increase Touch IC enable delay time
* 9996fc58fd mb/siemens/mc_rpl: Disable C1E state via MSR_POWER_CTL
* c58c988b8e mb/siemens/mc_rpl: Remove unused code and power limit functionality
* 8e5e87a1cf mb/siemens/mc_rpl1: Configure CPU power limits to 28W TDP
* 4853f16a59 mb/google/fatcat/var/kinmen: Support new schematic changes
* 9d67120078 mb/google/moonstone: Create moonstone variant
* 00d954977c util/smmstoretool: Support other block sizes
* 4fd3cb35c2 util/cbmem: Change abort() to exit(1) in die()
* 62b6d1e336 mb/siemens/mc_rpl: Enable master bit in PCI config space if allowed
* a8bce33b82 mb/siemens/mc_rpl: Disable Intel Turbo Boost
* 1a9008b261 device/azalia: Use clrsetbits32() and friends
* cbf8527345 device/azalia: Amend the mistake of codec_is_operative()
* 0a328282ec device/azalia: Add enums for HDA verb and parameter IDs
* c15006eb0c soc/intel/alderlake: Add 28W TDP support for RPL-P ID 8 (0xa716)
* d7a996cf44 mb/siemens/mc_rpl1: Enable 4 P-Cores, disable E-Cores
* 2f9273f1f4 mb/siemens/mc_rpl: Select FSP_TYPE_IOT
* 1b14664311 mb/siemens/mc_rpl: Remove unused DPTF settings
* 66a3f2a1b1 mb/siemens/mc_rpl: Disable SaGv
* 993a9c9e14 mb/siemens/mc_rpl1: Configure SATA Ports
* e03f50bf5f mb/siemens/mc_rpl: Enable Siemens NC_FPGA driver
* 699c28c01d sb/intel/bd82x6x: Fix replay issues
* c2110e3161 tree: Use true, false for PcieRpClkReqSupport
* ebab858d92 soc/intel/pantherlake: Enable memory bandwidth compression for IGD
* ad10d4a977 soc/intel/cmn/blk/graphics: Reserve memory compression region
* 8a52418e9a commonlib/device_tree: Fix memory leak in fdt_unflatten()
* 7896f4950c mb/google/skywalker: Turn off UFS power for eMMC SKUs
* 22fe08c04b soc/mediatek/mt8189: Implement UFS power-off API for non-UFS SKUs
* 5f0225a7b5 drivers/intel/fsp2_0: Refactor for earlier graphics memory WC MTRR
* 1c571446ec soc/intel/common/block/systemagent: Increase MTRR region size to 32 MiB
* 67afbf5f96 soc/intel/pantherlake: Add TDP mappings for Panther Lake-U SKUs
* ec69479bdb mb/google/ocelot: Drop redundant SNDW GPIO mapping
* 5f168e9441 mb/google/ocelot/var/ocelot: Conditionally init ALC256 HDA using fw_config
* 152b584167 mb/goog/ocelot/var/ocelot: Add AUDIO_MAX98360_ALC5682I_I2S
* 8f2633cd60 soc/power9/rom_media.c: find CBFS in PNOR
* 44ec090551 ppc64: Kconfig switch for bootblock in SEEPROM, zero HRMOR
* 921027e09b src/lib/cbmem_common: Delete a space(' ') in the source code
* acb86babdf mb/protectli/vault_kbl/mainboard.c: bring back the beep
* 76d45a8219 soc/amd/genoa_poc/root_complex.c: Explain the order of IOHCs
* 8dcfa915f2 soc/amd/common/block/psp: Probe SPI flash early
* 00217275b2 soc/amd/common/block: Don't clobber SPI registers
* c13eadeadb soc/amd/common/block/psp/psp_smi_flash: Fix busy check
* fbcf031181 mb/qemu-riscv: set PCI_IOBASE
* bf0ee592f5 soc/intel/alderlake: Make SATA speed limit configurable
* 482a2d6548 nb/intel/sandybridge/northbridge.c: Disable non-active PEG devices
* 7e73d4ef30 Documentation: mb/erying/tgl: Update documentation
* 73cba1fdea mb/erying/tgl: Introduce CFR
* 23cf7c64f9 mb/erying/tgl: Use booleans in devicetree
* 261b6b4fd1 soc/intel/skylake: Allow generating USB ACPI code
* 23e92a5ac0 mb/erying/tgl: Map remaining USB ports
* 762a535551 mb/erying/tgl: Clean up the GPIO table
* 179b8444c3 soc/intel/xeon-sp/gnr: Hook up public FSP bin and headers
* 42ba7a9e48 soc/intel/xeon_sp/gnr: Add Kconfig symbols for SKUs GNR-AP and GNR-SP
* c732f406c7 mb/google/ocelot: ec.h: Disable sync IRQ, sync IRQ wake capable for OCELOT4ES
* 73961bf680 mb/google/ocelot: Use same mainboard part number for all ocelot variants
* 691d5e84cd mainboard/google/oceot: Drop redundant logo_valignment selection
* b67d88aecb mb/google/bluey: Enable PMIC based slow charging in romstage
* dcb7c317c2 mb/siemens/mc_rpl1: Enable Intel I210 MACPHY driver
* 2b26ea0eda mb/siemens/mc_rpl1: Configure SPI and implement TPM support
* 2bcd7f1522 mb/siemens/mc_rpl1: Adjust UART settings and enable LPSS UART
* 524fd18bd6 mb/siemens/mc_rpl1: Create variant specific Kconfig file
* c7cd4e3305 mb/siemens/mc_rpl: Move SOC selection to baseboard
* 6427e51c4f mb/siemens/mc_rpl1: Adjust USB port settings in devicetree
* 71c4619045 mb/siemens/mc_rpl: Remove unused devices from devicetree and Kconfig
* 296f5968d3 mb/siemens/mc_rpl1: Adjust I2C bus enablement in devicetree
* a1dd6bfc22 mb/siemens/mc_rpl1: Adjust PCIe settings in devicetree
* f94469c2a9 mb/google/nissa/var/pujjolo/pujjoquince: Add wifi sar table
* 6781f458ee mb/google/trulo/var/pujjolo: Enable fivr settings
* 17a88540fd soc/qualcomm/x1p42100: Use SPMI driver
* c1128ae649 soc/qualcomm/cmn: Add SPMI driver
* 0eebd5596b mb/google/fatcat: Create lapis variant
* 4931b978d9 soc/mediatek: Increase CBFS cache to 8MB in memlayout.ld
* 234eb53ed9 nb/intel/sandybridge/raminit: Speed up reading SPD EEPROMs
* 7d57333529 ec/starlabs/merlin: Add a "off" mode for the power LED
* 36624072a6 mb/google/trulo/var/pujjolo: Update wlan rtd3 settings
* 42a5c189b2 mb/lenovo/X220: Add CFR support
* 8509798006 sb/intel/common/smbus: Use proper delay instruction
* 5f7b5fcb19 mb/starlabs/byte: Lower the PL4 value to 65W
* 4a6a0de029 3rdparty/fsp: Update to upstream master
* de98da43fa 3rdparty/intel-microcode: Update to upstream main
* bdee19ba87 soc/qualcomm/x1p42100: Add ASCII memory map diagram to memlayout.ld
* 51a8e238b0 lib: Correct logo bottom margin handling for all panel orientations
* 9999a4aebb mb/google/nissa/var/pujjocento: Change touchscreen properties
* 8d2df573a8 soc/qualcomm/x1p42100/qclib: Support to pack and load CPR binary in CBFS
* a484a6529c soc/qualcomm/common/qclib: Support to declare cpr_settings region
* dc04ee827b mb/google/fatcat/var/kinmen: Generate SPD ID for memory modules
* e7cdf035fb mb/google/brox/var/caboc: Enable RTD3 for SSD to resolve S0ix issue
* cec34128d0 soc/qualcomm/x1p42100: Support to load CPUCP firmware in x1p42100
* a2b6e20509 soc/mediatek/common: Increase per-channel SPMI max byte count to 2
* 6ba2df9be5 soc/mediatek/common: Use polling to reduce eDP HPD wait time
* ee347d8812 soc/qualcomm/common/qclib: Support to load AOP config and meta in CBFS
* 3f4c84513d soc/qualcomm/x1p42100/qclib: Support to pack AOP config and meta in CBFS
* 5de5b519ca mb/prodrive/atlas/vpd.c: Replace union {0} initializers with {} for C23 compliance
* 48207895af lint: Warn about using change IDs for merged changes
* 6acf07022d Doc/contributing: Add clarification on how to reference other commits
* 40d0ec0fa4 Revert "soc/mediatek/common: Remove 200 ms delay from eDP init path"
* 244a34b3d0 cpu/x86/mp_init: Refactor ICR wait logic
* eee5be070a cpu/intel: Use mtrr_use_temp_range()
* e37a53a2fc arch/x86/memcpy: Fix undefined behaviour
* 7c0f7e0b3f vc/intel/fsp: Update PTL FSP headers to FSP 3272_04
* d315f26217 payload/seabios: Update from 1.16.3 to 1.17.0
* c61a762a47 mb/google/bluey: Add QuenbiH board
* 9edf49b008 mb/google/bluey: Add BlueyH board
* 9868417d5e mb/google/bluey: Refactor Kconfig for Hamoa SoC
* 74d91d0b76 mb/google/nissa/var/glassway: Support Memory MICRON MT62F512M32D2DR-031WT:B
* 7eb832b1dc mb/google/skywalker: Configure GPIO GPIO_AP_EDP_BKLTEN as output
* cdd42ccde8 soc/qualcomm/x1p42100: Use 4K for memory region alignment
* 2146ecc8e1 mb/google/brox/caboc: Enable PEG60 with PEG62
* 6925fd69f8 soc/qualcomm: Move common region macros to `soc/memlayout.h`
* d220b65b8f soc/qualcomm/qcs405: Add common include path
* b25939786d soc/qualcomm/x1p42100: Refactor CBMEM top address to use linker symbols
* d6ec4f108d soc/qualcomm/x1p42100: Mark additional reserved memory ranges
* 1b760645b9 soc/qc/x1p42100: Dynamically configure DRAM resources in ramstage
* 276432faf7 soc/qualcomm/common: Add MMU configuration for fragmented DRAM regions
* b4347f11d9 include: Make DRAM an explicit region
* 11c8d423d1 soc/qc/common: Remove ddr_base from qc_mmu_dram_config_post_dram_init
* 73de3f95ac mb/google/bluey: Support hardware watchdog logging
* 25e0a4642c mb/google/brox/var/caboc: Update LAN LED behavior
* e5ff7cb186 mb/google/ocelot/var/ocelot: Update DDI port Configuration
* 8df079c609 mb/lattepanda/mu: Enable CRB TPM (Intel fTPM)
* 6e9c0a26e3 device/device_util: Fix format specifier for DEVICE_PATH_GICC_V3
* 4a82f37525 mb/google/nissa/var/quandiso: Generate new RAM ID
* 17a7c351b8 mb/google/brya/var/kaladin/hda_verb.c: Correct number of entries to 21
* b65b98ace6 mb/goog/ocelot/var/ocelot: switch to H58G56BK8BX068 memory part
* 8097809c8a libpayload: Fix strsep() edge cases
* e38a216368 soc/intel/pantherlake: Rearm and clear only for valid crashlog in PMC
* 510686add4 soc/intel/pantherlake: Rearm crashlog using watcher
* 609eb4c5f1 mb/google/ocelot/var/ocelot: Remove unused I2C controllers
* df7bf9404d soc/mediatek/common: Remove 200 ms delay from eDP init path
* a70bf82036 soc/mediatek/common: Measure eDP initialization time
* 6bb1ba95e1 soc/mediatek/common/dp: Move mtk_edp_init to dptx_common.c
* e49e8c6355 soc/qc/x1p42100: Add memory layouts for CPUCP and TZ regions
* c418a3b843 mb/google/brox/var/caboc: Update WWAN gpio
* 77b52ed3cc mb/google/brox/var/caboc: HDA: Correct number of jacks to 35
* e31fbc493d soc/qualcomm/cmn/qclib: Support reuse of existing DDR training data
* bdcf19f404 mb/google/trulo/var/pujjolo: Add fw config for PDC
* 13897bde9a mb/google/trulo/var/pujjolo: Add wlan rtd3 setting
* 90589d44d2 soc/qualcomm/x1p42100: Reserve DDR memory regions for AOP and BL31
* 2e61995b2f soc/qualcomm/x1p42100: Add support for Hamoa SoC
* 281b01ce5e soc/qualcomm/x1p42100: Remove unused PMIC file from CBFS
* ecbca16bf4 tree: Replace union {0} initializers with {} for C23 compliance
* b74d2b77d2 mb/google/trulo/var/kaladin: Add WIFI SAR table
* 4b46a0690e mb/hp: Add HP ProDesk 600 G1 SFF Business PC (Haswell / NPCD379 SIO)
* 2339508b6c mb/google/trulo/var/pujjolo: Update P-sensor parameters
* cd2a969c82 soc/intel/pantherlake: Remove storage-off related code
* fe6fa36504 mb/asrock: Add SPR 1S server board ASRock Rack SPC741D8-2L2T/BCM
* b486c84b23 mb/google/trulo/var/pujjolo: Update DTT settings for thermal control
* ece0072d1c mb/google/trulo/var/pujjolo: Update verb table to fix pop noise
* 795157a606 mb/google/bluey: Increase MRC cache size
* 34d9305dcc soc/qc/x1p42100: Pack QcLib DTB into CBFS
* 8f09629fb1 spi_flash: Fix initialization of `flags` field in lb_spi_flash
* ab2ef8878c mb/google/trulo/var/pujjocento: Update touchscreen information
* 0bedce05d8 mb/google/nissa/var/pujjocento: Change touchpanel sequence to meet spec
* 543fb60ec4 mb/google/brox/var/lotso: Set slew rate to 1/8
* c114906239 mb/google/trulo/var/pujjocento: Update DTT settings for thermal control
* b603f23088 mb/google/bluey: Avoid using function call table
* dc64b9659d soc/qc/cmn: Refactor qclib_load_and_run function
* e290bb6750 mb/baseboard/ptlrvp: Disable memory training progress bar
* 05a38e2af3 mb/google/fatcat: Disable memory training progress bar
* f789899dac sb/intel/common/gpio: Move register defines
* d6ceaf72da mb/samsung/lumpy: Use gpio_base2_value
* 21639c3771 mb/getac/p470: Use common gpio functions
* 8d4bb94663 sb/intel/common/gpio: Add and use gpio_invert()
* 85306062d8 mb/google/skywalker: Create variant Tarkin
* 1da2f46db8 soc/intel/alderlake: Restore mem_init_override_channel_mask()
* f0d5b25e02 mb/google/trulo/var/kaladin: Add firmware name and gpio for ISH
* 0b3fc8ce2d mb/google/nissa/var/pujjoniru: Decrease cpu power limits
* f01cc9258b mb/google/rex/var/screebo: Use ACPI for touchscreen power sequencing
* ef11f95125 soc/qualcomm/x1p42100: Set 1ms TX delay
* 2c8d157ea4 {drivers, soc/qualcomm/common}: Add configurable delay for UART bitbang
* b0d2d522ea soc/qualcomm/x1p42100: Enable bootblock compression
* 1e11bda5d0 soc/intel/cmn/smbus: Drop use of update_spd_len()
* 910f111891 soc/intel/mtl: Fill in SPD data on both channels of DDR5 memory
* 0da943ed99 soc/intel/meteorlake: Fix DDR5 channel mapping
* 87c9bb3994 soc/intel/adl: Fill in SPD data on both channels of DDR5 memory
* a23be7a6fe mb/google/fatcat/var/francka: Disable ALC721 & ALC722 clock stop support
* 227d434e2d drivers/soundwire/alc711: Support clock stop flag from devicetree
* 49219f1ce1 Docs: Use markdown autolinks instead of Sphinx doc directive
* 6afc1ff9ac soc/mediatek/mt8189: Disable 8189G APU power to reduce power consumption
* 965131e40f soc/mediatek/common: Fix build error by including stdint.h in cpu_id.h
* e49743755d mb/google/ocelot: Select EC_GOOGLE_CHROMEEC_MEC for MCHP variants
* 32b944b77a mb/google/brox/var/caboc: Update hda_verb table
* ba228d160f mb/google/fatcat: Create new kinmen4es variant
* 6a42eb9134 soc/intel/pantherlake: Disable memory training progress bar
* e9cb352706 soc/common/smbus: Support reading SPD5 hubs for DDR5
* cba46a41b7 mainboard/{hardkernel,protectli}: Drop use of DRAM_SUPPORT_DDR5
* a79f341d29 mb/google/trulo/var/pujjolo: Disable mipi camera dmic LED
* 9411c6e7c7 util/amdfwtool: Fix NULL pointer dereference in fill_dir_header
* 280d3a25e8 util/lint/kconfig_lint: Fix operator precedence issue
* fbc2d76ab3 soc/intel/*: Select 'DRAM_SUPPORT_DDRx' as appropriate
* 008f0ec078 util/smmstoretool: Alias EfiImageSecurityDatabaseGuid to "secureboot"
* 88aeb8b7cd util/smmstoretool: Allow setting authenticated variable
* e977560e72 payloads/edk2: Increase non-full-screen menu size
* ac7487d766 mb/google/fatcat: Use same MAINBOARD_PART_NUMBER for felino variants
* 0f84878c89 mb/google/brox: Handle NULL return value in variant_get_auxfw_version_file
* 749fd1a8d8 soc/intel/pantherlake: Use macro for VGA Init Control
* 3c4fb7b729 mb/google/trulo/var/pujjolo: Update verb table
* 2ae0f6cdb9 mb/google/trulo/var/kaladin: Add fw config for ELAN touchscreen
* 53dd93ff14 libpayload/drivers/pci_qcom: Fix address during ATU config
* 54016e273e util/cbmem/sysfs_drv: Fix incompatible pointer type for 'size'
* a9997f2d7f soc/intel/cmn/block: Request bus master in final op for DSP and HDA
* fea789ed63 mb/google/fatcat/var/francka: Use ACPI for touchscreen power sequencing
* 211526ff38 Revert "mb/google/brya: Fix mux_conn index used by ec/google/chromeec"
* 7b91339e55 Revert "mb/google/brya: Fix pmc_mux port mapping for mithrax and felwinter"
* 8a45e505b9 soc/mediatek/common/dp: Change dptx_hal_phy_wait_aux_ldo_ready to static
* 350c977fef soc/intel/pantherlake: Clear crashlog record using watcher
* ae942a70b8 mb/google/trulo/var/kaladin: Update GPIOs table
* 0a4bc79685 mb/google/trulo/var/kaladin: Update USB2 driving settings
* f34bc61ca7 mb/google/trulo/var/pujjolo: Correct the Goodix touchpad description
* d4b735f9f1 mb/google/ocelot: Turn off unused I2C ports
* 190c27d08b mb/google/brya/var/marasov: Add SPD ID for K3KL6L60GM-MGCT and K3KL8L80EM-MGCU
* d79febf356 soc/qc/x1p42100: Enable QcLib, SHRM and AOP firmware load
* db10b681b4 soc/qc/x1p42100: Load and populate QcLib interface table entries
* eee3ea0346 mb/google/bluey: Enable PCIE Feature for bluey
* 6f115f7bf0 soc/qualcomm/x1p42100: Configure Gen4 PHY link for x1p42100
* 823fa6b8f6 soc/qualcomm/common: Integrate QMP PCIe 4.0 PHY 2x2/1x4
* 6bb199d258 mb/google/fatcat/var/fatcat: Move `ISH_GP_x` pads to fw_config.c
* a5212f15ce mb/google/fatcat/var/fatcat: Remove unused GPP_B06 GPIO configuration
* d7415f5d9a mb/google/trulo/var/kaladin: Remove external bypass settings
* 479b39c3e9 mb/google/ocelot: Update wake on touch GPIO
* 7095c99a87 util/cbmem: Add support for CBMEM in sysfs
* eeb15e83cb mb/gigabyte: Add ga-h81m-d2w (ITE8620E superio)
* 5537ce7c2f mb/google/fatcat: Fix GPIO config for headphone jack detection
* 953957e961 mb/google/trulo/var/pujjolo: Change ICCmax at VCCIN_AUX from 25A to 27A
* 87d5c7224b mb/google/trulo/var/pujjolo: Select Strauss keyboard to show G icon
* eb005f5f5c mb/google/brya/var: Clarify comment for 'tcss_aux_ori'
* 85b26f75d2 soc/intel/xeon_sp: Remove fast_spi_cache_bios_region
* fc4911ec35 soc/qualcomm/x1p42100: Add CPU Clock boost support for X1P42100
* 1a9fb29a53 soc/qualcomm/common: Add API to enable Zondaole PLL for X1P42100
* e272b20c85 sb/intel/common: Remove unused function prototype
* c54fde5040 sb/inte/common/gpio: Implement gpio_input() and gpio_output()
* 55bed620a4 mb/dell: Use gpio_base2_value
* 84899e6fb7 sb/intel: Convert set_gpio to gpio_set
* 0c79443ca9 sb/intel/*/gpio: Convert get_gpios to gpio_base2_value
* 69364fc9e0 sb/intel: Convert get_gpio() to gpio_get()
* 2d7891abe2 sb/intel: Add soc/gpio.h
* 6a20caea01 drivers/lenovo/hybrid_graphics: Add missing header
* 04cc15feb4 sb/intel/common/pmutil: Drop unused header
* b44c0ab25b ec/lenovo/pmh7: Include stdbool.h
* b20f6d27e2 device/dram: Rename 'USE_DDRx' config options
* 1ade8247ce mb/google/trulo/var/pujjocento: update hda_verb table for ALC257
* 28848dc4fb mb/google/trulo/var/kaladin: Add elan touchscreen support
* 9a89e3b4c6 mb/google/trulo/var/kaladin: Select USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS
* f84934a203 mb/google/trulo/var/kaladin: Add DRAM part H58G56CK8BX146
* dd76bcc4c3 soc/qc/sc7280: Relocate SHRM firmware load to common Qualcomm path
* 88b10e09b6 mb/google/ocelot: Set TPM_TIS_ACPI_INTERRUPT for all ocelot variants
* c2dfe61016 mb/google/ocelot: Disable CNVi bluetooth core in the baseboard code
* 69e6d96aad mb/google/fatcat: Configure host command ranges for FATCAT4ES variant
* 8bdc170901 mb/google/brox/var/lotso: Update VR domain config
* a6842184ab mb/google/fatcat/var/kinmen: Use ACPI for touchscreen power sequencing
* 712aac780f mb/google/rex/kanix: Use ACPI for touchscreen power sequencing
* 26e6d0be00 mb/google/rex/var/karis: Use ACPI for touchscreen power sequencing
* 00d99a6e9b mb/google/brox/var/lotso: Configure Acoustic noise mitigation
* 4b6ebbdd94 mb/google/skywalker: Initialize clkbuf and srclken in romstage
* f131f0e336 soc/mediatek/mt8189: Add clk_buf and srclken_rc drivers
* 2de0158eec soc/intel/pantherlake: Add asynchronous CBFS file loading support
* eb1b5ee116 soc/intel/cmn/block/fast_spi: Introduce a DMA transfer queue
* 182ba52792 soc/intel/pantherlake: Remove mailbox interface offset
* 2ee78458be soc/intel/pantherlake: Use CONSUMED_BIOS bit
* 9a8ba5b39a {lib, drivers/intel}: Move BMP rendering logic out of SoC code
* a617317775 mb/google/fatcat/var/kinmen: Support SAR table selection via FW_CONFIG
* 92dd8cea59 mb/google/nissa/var/riven: Add parade touchscreen support
* b98f786375 mb/google/fatcat/var/francka: Increase reset delay to 100ms for ILTK0001
* 5f0177ac5d mb/google/trulo/var/pujjolo: Update Stylus IRQ wakeup group
* 5b1a8b53b6 soc/amd/common/i23c_pad_ctrl: add I3C pad config options
* 4b58ec5ac2 soc/amd/common/block/psp: Add fTPM specific bits
* 15bf25de78 Documentation/soc/intel: Update the referenced linuxboot_defconfig
* debfac6352 mb/google/ocelot/var/ocelot: Add wake support for touchpad
* b6425a9a78 soc/amd/common: Add comments about bootblock
* 69888bc7fc util/cbfstool/amdcompress: Bail out on invalid ELF
* 3b008bde8c soc/mediatek/mt8196: Fix intermittent black screen issue
* da33feeb51 soc/mediatek/mt8189: Correct thermal SRAM base address and length
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-19 07:47:18 +00:00
Leah Rowe
aa0e4205d6
re-base the T480 thunderbolt patch
...
i noticed that the enablement patch came first,
before the actual driver. while this functioned
overall, it was obviously flawed in terms of
the resulting git history. the person who sent
the patch previously had 0046- on both patch
names, which meant that alphabetical sorting
caused the enablement patch to be applied
before the driver patch.
furthermore:
it seems that the submitted had manually re-applied
the same Kconfig changes in the enablement patch,
adding their own name - since Kconfig is not
copyrightable anyway, in this specific example, or
otherwise trivial, it's probably fine, but the
original author on the gerrit patch is actually
Matt DeVillier:
https://review.coreboot.org/c/coreboot/+/88490
I have therefore simply re-based by checking out
Matt's patch, on patchset 1.
However, patchset 1 of Matt's patch uses patch
set 16 of:
https://review.coreboot.org/c/coreboot/+/75286
HustlerOne's lbmk merge uses patchset 18:
https://review.coreboot.org/c/coreboot/+/75286/18
The differences between the two can be observed, thus:
https://review.coreboot.org/c/coreboot/+/75286/16..18
It should be clarified that these patches are not
upstreamed yet, but under heavy review on gerrit.
However, testing has revealed that the patch is
mostly stable.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-15 14:06:12 +00:00
Leah Rowe
f3dc54432e
Merge pull request 'T480: Add Thunderbolt support' ( #387 ) from hustlerone/lbmk-alpine_ridge:master into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/387
2025-12-15 14:57:52 +01:00
Hustler One
809e5d29a4
T480(s): Add Thunderbolt support
2025-12-11 14:58:33 +01:00
Leah Rowe
ec8617f27a
coreboot/t480s: fix headphone jack detection
...
this is merged from a patch sent to coreboot by
Matt DeVillier, based upon the work done by
Arthur Heymans for the regular T480
https://review.coreboot.org/c/coreboot/+/90450/2
yes
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-12-10 22:30:09 +00:00
Leah Rowe
724f905aaf
Merge pull request 'T480: Fix headphone jack detection' ( #385 ) from Riku_V/lbmk:t480verbfix into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/385
2025-12-02 22:17:21 +01:00
Riku Viitanen
2dea4b79b2
T480: Fix headphone jack detection
...
Recently, a HDA verb bugfix was merged to coreboot:
https://review.coreboot.org/c/coreboot/+/90023
Tested on a T480. Before the fix, detection *never* worked.
After fix, it seems to reliably work.
TODO: update docs to reflect this.
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com >
2025-12-02 21:58:53 +02:00
Leah Rowe
9d740e9512
grub: add a keyboard layout for norway
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-22 21:26:40 +00:00
Leah Rowe
7a9977af72
rebase recent dell thermal safety patch
...
it didn't apply. i will soon update the coreboot revisions
ready for Libreboot 25.12
just rebase this patch for now
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-18 18:47:23 +00:00
Leah Rowe
efd17fde19
Merge pull request 'removed duplicate "payload_uboot" for e6230_12mb' ( #374 ) from honzo/lbmk:e6230_12mb_deduplicated into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/374
2025-11-18 15:13:22 +01:00
Leah Rowe
d1606ef11f
Merge pull request 'fixed typo in "grub_scan_disk" for macbook11_16mb' ( #375 ) from honzo/lbmk:macbook11_16mb_fixed_typo into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/375
2025-11-18 15:12:48 +01:00
Leah Rowe
48b00ce3c8
Merge pull request 'config/coreboot/default: Disable Latitude early thermal shutdown' ( #376 ) from nic3-14159/lbmk:mec5035-updates into master
...
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/376
2025-11-18 15:12:28 +01:00
Nicholas Chin
c0dab33972
config/coreboot/default: Disable Latitude early thermal shutdown
...
Disable the sudden EC initiated shutdown on the Sandy Bridge/Ivy Bridge
Dell Latitude laptops as soon as the reaches 87 degrees, allowing the
standard CPU thermal throttling mechanisms to work.
Fixes: https://codeberg.org/libreboot/lbmk/issues/202
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com >
2025-11-18 06:48:38 -07:00
libreboot Contributor
fda3ac975a
removed duplicate "payload_uboot" for e6230_12mb
2025-11-16 00:19:36 +00:00
libreboot Contributor
831fa657de
fixed typo in "grub_scan_disk" for macbook11_16mb
2025-11-16 00:18:31 +00:00
Leah Rowe
1b10c072d3
tree.sh: tidy up check_gnu_path
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-15 16:57:48 +00:00
Leah Rowe
7ef7e02f73
lib.sh: reduce indentation in setvars
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-15 16:55:27 +00:00
Leah Rowe
214ed3efd2
get.sh: reduce indendation in fetch_targets
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-15 16:51:59 +00:00
Leah Rowe
9d6af0063b
get.sh: reduce indentation in clone_project
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-15 16:51:10 +00:00
Leah Rowe
d7869a56f5
WIP: chromebook integration script
...
I intend to merge every Chromebook that Mrchromebox supports,
into Libreboot, ready for the Libreboot 25.12 release. Work
is still ongoing, and several changes need to happen in lbmk.
I started working on it a few weeks ago (today is
14 November 2025 as I push this).
Still TODO:
* Automatically create lbmk coreboot targets, based
on the configs present in MrChromebox git
* Re-work git repository management in lbmk, such that
a list of upstreams is used, instead of a hardcoded
list per configuration; this will allow us to use
different remotes across the same project, even where
they diverge. This would then allow us to use the
MrChromebook repository directly, instead of cherry-picking
patches into upstream coreboot
* The note above about remotes would also mean that we can
use MrChromebox's own edk2 repository directly. All of this
would reduce the burden on lbmk.git
* Support building edk2 payloads, exactly mirroring the
setups used on MrChromebox builds
There are some things that need to be checked first, for
boards that use MMC-based or eMMC-based storage, for the
GRUB and SeaBIOS payloads, also U-Boot, because I will
also be using these.
As such, this current script shall sit in lbmk master, but
it is not yet finished.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-11-14 18:22:51 +00:00
Leah Rowe
25f523bbac
get.sh: return clone_project if multi-tree
...
this is the true fix, replacing the fixes previously
reverted.
the problem with the old fix was that it was a hack,
and could result in the archived backup of a code repo
being the wrong one; the destination was the one for
the main repo, but what if we were cloning the backup?
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-17 22:40:29 +01:00
Leah Rowe
bec7e6d4cb
Revert "get.sh: don't frivolously copy tmp git clones"
...
This reverts commit b840cf3a83 .
2025-10-17 22:32:43 +01:00
Leah Rowe
f632b8aed7
Revert "get.sh: remove a redundant check"
...
This reverts commit e2a97455cc .
2025-10-17 22:32:35 +01:00
Leah Rowe
e2a97455cc
get.sh: remove a redundant check
...
loc is never empty.
if it is, it's a bug. don't hide bugs.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-17 21:01:31 +01:00
Leah Rowe
b840cf3a83
get.sh: don't frivolously copy tmp git clones
...
this fixes a regression in a previous patch, this time
also taking account for the different cache locations.
all of get.sh needs to be purged, and re-written clean.
it looks clean. but it's years of hacks.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-17 20:57:18 +01:00
Leah Rowe
2aea7f6229
Revert "get.sh: make forcepull a macro"
...
This reverts commit b3232a7c4a .
2025-10-17 16:07:16 +01:00
Leah Rowe
b3232a7c4a
get.sh: make forcepull a macro
...
:
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-17 14:02:55 +01:00
Leah Rowe
54aa5b7d32
tree.sh: unify -f/-F in case/switch handling
...
they're the same commands, but -F does forcepull
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-17 13:57:14 +01:00
Leah Rowe
96f786b962
tree.sh: convert do_make into a macro
...
use it similarly to if_dry_build/if_not_dry_build
there is nothing cooler than an sh macro
:
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-17 13:29:56 +01:00
Leah Rowe
47f08e2e6d
git: don't use review.coreboot.org as main
...
where backup links are available, use those as main instead.
this is because of the new XBMK_CACHE_MIRROR variable, which
makes --mirror be used
when performed on review.coreboot.org, this also pulls down
all changes from gerrit code review; the github backups for
example only contain the official branches, but gerrit creates
a new ref per merge request.
a user can still run ./mk -F to force pulling all repos,
including the coreboot.org ones, but use of -f will skip the
coreboot.org ones if the backup links worked and contain the
local commit needed, by a given project used in xbmk.
this patch won't change any real-world behaviour for xbmk
users, but it is done as a courtesy to the coreboot project,
in that it largely avoids a sudden surge in coreboot.org's
traffic if lots of users start doing XBMK_CACHE_MIRROR=y
if XBMK_CACHE_MIRROR is not set, or set to anything other
than y, a regular clone is performed, saving cached sources
to cache/clone/ - otherwise, cache/mirror/ is used.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-16 15:57:31 +01:00
Leah Rowe
e1b6ccf69e
xbmk: sort global variables alphabetically
...
also separate some of the special ones.
this makes the variables easier to read/find.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-16 15:46:44 +01:00
Leah Rowe
d84a556bf0
get.sh: use the same directory map as --mirror
...
Don't hardcode the cache directory, and don't store
remotes anymore. This change retains compatibility
in practice, with the older directory location, because
it's extremely unlikely that newly generated locations
would conflict with old ones.
With this new change, non-mirror git clone caches are
now done twice; one directory per remote, rather than
one directory with two remotes.
This is just inherently much more reliable.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-16 14:22:06 +01:00
Leah Rowe
b333ddfe73
get.sh: use --keep-cr on git-am
...
Some repositories might use CR-LF line endings. This option
keeps Git from mangling patches when merging.
Repositories that don't do this, such as ALL repositories
currently used by xbmk, will be unaffected by this change.
This is being done in preparation for importing MrChromebox
edk2, as Intel's own edk2 repository on GitHub uses these.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-16 13:30:55 +01:00
Leah Rowe
d83dd506c2
get.sh: More reliable git remote caching
...
Don't do one repository for all remotes. Do one *clone* per
remote.
This also means that users no longer download information twice,
in practice, because the backup repository will only be downloaded
if the main one didn't work.
Theoretically, this change is makes the process less efficient, but
in practise it's more reliable now.
We do now use --mirror on the git clone command for caches, but we
already did git pull --all before.
This just ensures that we absolutely have all local code.
NOTE:
The new code isn't used by default. To use it, you must do:
export XBMK_CACHE_MIRROR="y"
Otherwise, the old behaviour will continue to be used. This is
because the new code, while correct, puts more strain on upstream
servers (more code being downloaded), and can result in higher amounts
of disk space being used. The old behaviour wasn't broken, so we'll
also support that method.
TODO: perhaps also have a check in place to re-use both caches,
where available, regardless of XBMK_CACHE_MIRROR?
Signed-off-by: Leah Rowe <leah@libreboot.org >
2025-10-16 13:29:59 +01:00