r/coreboot • • 10h ago

Dual-Slot Coreboot (`4.20` RO + `26.09` RW_A) with EDK2 `uefipayload_2608`, Secure Boot, and Auto-Fallback Beeps on HP ProBook 640 G1 (i7-4810MQ)

2 Upvotes

Earlier I posted I managed to get coreboot 4.2 onto hp probook 640g1
Now I managed to move the changes onto coreboot 26.09 , the changes on both 4.2 and 26.09

Dual-Slot Coreboot (4.20 RO + 26.09 RW_A) with EDK2 uefipayload_2608, Secure Boot, and Auto-Fallback Beeps on HP ProBook 640 G1 (i7-4810MQ)

I finally got a dual-slot vboot (RO + RW_A) Coreboot setup running on my HP ProBook 640 G1, keeping a known-good Coreboot 4.20 (uefipayload_202304) safety net in WP_RO while running Coreboot 26.09 (main) + EDK2 uefipayload_2608 out of RW_SECTION_A — pure UEFI (no SeaBIOS), with Secure Boot enabled, Win+A manual recovery, CMOS watchdog auto-fallback, and a 2-beep PC speaker alert when booting the RO fallback.


Hardware Specs

  • Laptop: HP ProBook 640 G1
  • CPU: Intel Core i7-4810MQ @ 2.80 GHz (Haswell C0, CPUID 0x306c3, microcode 0x28)
  • Chipset: Intel QM87 PCH (8086:8c4f)
  • Memory: 8 GiB DDR3-1600
  • TPM: Infineon SLB9635 TT 1.2
  • EC / Super I/O: SMSC KBC1126 + MEC1322 + LPC47N217
  • SPI Flash: 16 MiB (0x1000000 bytes)
  • Payload: Pure UEFI via EDK2 (uefipayload_2608 in RW_A, uefipayload_202304 in WP_RO; no SeaBIOS)

Flash Layout (vboot-rwa.fmd / FMAP Regions)

The 16 MiB flash is partitioned so that the Intel descriptor/ME (SI_ALL), the updatable RW_SECTION_A (26.09), the shared MRC/UEFI variable stores, and the read-only fallback WP_RO (4.20) never step on each other. Because RO and RW_A have separate MRC cache regions (RECOVERY_MRC_CACHE vs RW_MRC_CACHE) and SMMSTORE is marked PRESERVE, switching between 26.09 and 4.20 keeps UEFI variables/Secure Boot state intact and avoids MRC cache thrashing.

RegionOffset RangeSizePurpose
SI_ALL0x000000 - 0x9fffff10 MiBIntel Flash Descriptor, GbE, and Management Engine
- SI_DESC0x000000 - 0x000fff4 KiBFlash Descriptor
- SI_GBE0x001000 - 0x002fff8 KiBIntel Gigabit Ethernet NVM
- SI_ME0x003000 - 0x9fffff10,473,472 BIntel ME region
SI_BIOS0xa00000 - 0xffffff6 MiB (6,291,456 B)BIOS / Coreboot region
RW_SECTION_A0xa00000 - 0xcbffff2,883,584 BActive RW slot (coreboot-26.09 + uefipayload_2608)
- VBLOCK_A0xa00000 - 0xa0ffff64 KiBvboot verification block for RW_A
- FW_MAIN_A (CBFS)0xa10000 - 0xcbffbf2,817,984 Bcoreboot-26.09 stages + EDK2 uefipayload_2608
- RW_FWID_A0xcbffc0 - 0xcbffff64 BRW firmware ID string
UNIFIED_MRC_CACHE0xcc0000 - 0xcdffff128 KiBSplit MRC cache so RO and RW_A stay isolated
- RECOVERY_MRC_CACHE0xcc0000 - 0xccffff64 KiBMRC cache used by WP_RO (4.20)
- RW_MRC_CACHE0xcd0000 - 0xcdffff64 KiBMRC cache used by RW_SECTION_A (26.09)
RW_NVRAM (PRESERVE)0xce0000 - 0xce1fff8 KiBPreserved RW NVRAM
RW_VPD (PRESERVE)0xce2000 - 0xce2fff4 KiBPreserved RW Vital Product Data
SMMSTORE (PRESERVE)0xcf0000 - 0xd2ffff256 KiBUEFI NVRAM variables & Secure Boot keys
WP_RO0xd30000 - 0xffffff2,949,120 BRead-only recovery slot (coreboot-4.20 + uefipayload_202304)
- FMAP0xd30000 - 0xd307ff2 KiBFlash Map table
- RO_FRID0xd30800 - 0xd3083f64 BRO firmware ID string
- RO_PADDING0xd30840 - 0xd30fff1,984 BAlignment padding
- RO_VPD (PRESERVE)0xd31000 - 0xd31fff4 KiBPreserved RO Vital Product Data
- GBB0xd32000 - 0xd4ffff120 KiBGoogle Binary Block (vboot keys, flags, BMPs)
- COREBOOT (CBFS)0xd50000 - 0xffffff2,818,048 Bcoreboot-4.20 stages + EDK2 uefipayload_202304

Features & Architecture

  1. Dual-Slot vboot (WP_RO + RW_SECTION_A)

    • WP_RO (4.20 branch hp-640g1-edk2): Runs bootblock + verstage, verifies VBLOCK_A / FW_MAIN_A, and either jumps into RW_SECTION_A (FW_MAIN_A @ 0xa10000) or falls back to COREBOOT @ 0xd50000.
    • RW_SECTION_A (26.09 branch main-640g1-edk2): Runs coreboot-26.09 + EDK2 uefipayload_2608, allowing fast updates to RW_SECTION_A without risking a brick.
  2. CMOS 0x3A Auto-Fallback Watchdog

    • Before jumping to RW_SECTION_A, RO writes 0xA5 to CMOS offset 0x3A.
    • Once RW_SECTION_A reaches BS_PAYLOAD_LOAD, it clears CMOS 0x3A.
    • If a bad RW_A build hangs or crashes before reaching the payload, the next boot sees 0x3A == 0xA5 and automatically falls back to WP_RO (4.20).
    • Uses CONFIG_VBOOT_MOCK_SECDATA=y so vboot doesn't lock out across test builds.
  3. 2-Beep PC Speaker Fallback Alert

    • Whenever the system enters WP_RO recovery/fallback mode (4.20), it plays two 880 Hz beeps (beep(880, 120) x2 via pc80/i8254.h) so you immediately know it booted the RO fallback even without display/serial output.
  4. Win+A Manual Recovery Override

    • Added an i8042 keyboard scan in src/mainboard/hp/probook_640_g1/vboot.c: holding Win+A during early boot forces vboot recovery mode and drops straight into WP_RO (4.20).
  5. Secure Boot Enabled

    • EDK2 uefipayload_2608 boots with Secure Boot active (sbctl status: Secure Boot: ✓ Enabled, Vendor Keys: microsoft builtin-db).

Key Fixes Needed for Coreboot 26.09 (main)

  • Memory SPD addresses: Added spd_addresses = "{0x50, 0, 0x52, 0}" in devicetree.cb so Haswell MRC detects both SO-DIMM slots on main.
  • LynxPoint PCIe teardown guard: Guarded registers 0x338 / 0x328 / 0x408 in pcie.c during teardown.
  • CBFS size fit: Enabled CONFIG_COMPRESS_RAMSTAGE_LZ4=y so coreboot-26.09 + uefipayload_2608 fits cleanly inside FW_MAIN_A (2,817,984 bytes).
  • RO -> RW_A Compatibility Shims: Handled the RO (4.20) to RW_A (26.09) vboot ABI mismatch (vboot_get_context: RO/RW vboot ABI mismatch, reinitializing RW context) and CAR _fmap_cache / _cbfs_mcache handoff so 26.09 romstage/postcar/ramstage boot cleanly from 4.20's verstage.
  • Helper Tooling: Added bootlog_probook640g1.sh --spi for reading/summarizing CBMEM/SPI boot logs directly.

Boot Logs

Current coreboot-26.09 (RW_SECTION_A / FW_MAIN_A) Boot Summary

=== Boot Summary ===
[DEBUG]  TPM: command 0x14 returned 0x0
[DEBUG]  FMAP: area FW_MAIN_A found @ a10000 (2817984 bytes)
[DEBUG]  FMAP: area COREBOOT found @ d50000 (2818048 bytes)
[NOTE ]  coreboot-26.09-846-g07684235aaaf-dirty Sun Nov 29 21:53:35 UTC 2026 x86_32 romstage starting (log level: 7)...
[WARN ]  vboot_get_context: RO/RW vboot ABI mismatch, reinitializing RW context
[DEBUG]  FMAP: area RW_MRC_CACHE found @ cd0000 (65536 bytes)
[INFO ]  MRC: version mismatch: 2 vs 1
[DEBUG]  FMAP: area COREBOOT found @ d50000 (2818048 bytes)
[DEBUG]  FMAP: area FW_MAIN_A found @ a10000 (2817984 bytes)
[DEBUG]  FMAP: area RW_MRC_CACHE found @ cd0000 (65536 bytes)
[DEBUG]  MRC: Checking cached data update for 'RW_MRC_CACHE'.
[DEBUG]  MRC: cache data 'RW_MRC_CACHE' needs update.
[DEBUG]  MRC: updated 'RW_MRC_CACHE'.
[NOTE ]  coreboot-26.09-846-g07684235aaaf-dirty Sun Nov 29 21:53:35 UTC 2026 x86_32 postcar starting (log level: 7)...
[DEBUG]  FMAP: area FW_MAIN_A found @ a10000 (2817984 bytes)
[NOTE ]  coreboot-26.09-846-g07684235aaaf-dirty Sun Nov 29 21:53:35 UTC 2026 x86_32 ramstage starting (log level: 7)...
[ERROR]  PNP: 004e.3 74 not allocated
[DEBUG]  FMAP: area FW_MAIN_A found @ a10000 (2817984 bytes)
[ERROR]  ME MBP: unknown item 0x20104 @ dw offset 0x6
[WARN ]  CBFS: 'fallback/slic' not found.
====================

coreboot-4.20 (WP_RO / COREBOOT) Fallback Boot Summary (via Win+A / Recovery + 2 Beeps)

=== Boot Summary ===
[INFO ]  VB2:vb2_check_recovery() Recovery reason from previous boot: 0x0 / 0x0
[INFO ]  VB2:vb2_check_recovery() Recovery was requested manually
[INFO ]  VB2:vb2_check_recovery() We have a recovery request: 0x2 / 0x0
[INFO ]  Recovery requested (1009000e)
[DEBUG]  TPM: command 0x14 returned 0x0
[DEBUG]  TPM: command 0x14 returned 0x0
[DEBUG]  FMAP: area COREBOOT found @ d50000 (2818048 bytes)
[NOTE ]  coreboot-4.20-73-g63bbf0fe23 Sun Nov 29 21:59:03 UTC 2026 x86_32 romstage starting (log level: 7)...
[DEBUG]  FMAP: area RECOVERY_MRC_CACHE found @ cc0000 (65536 bytes)
[DEBUG]  FMAP: area COREBOOT found @ d50000 (2818048 bytes)
[DEBUG]  FMAP: area RECOVERY_MRC_CACHE found @ cc0000 (65536 bytes)
[DEBUG]  MRC: Checking cached data update for 'RECOVERY_MRC_CACHE'.
[DEBUG]  MRC: 'RECOVERY_MRC_CACHE' does not need update.
[NOTE ]  coreboot-4.20-73-g63bbf0fe23 Sun Nov 29 21:59:03 UTC 2026 x86_32 ramstage starting (log level: 7)...
[WARN ]  PCI: Leftover static devices:
[WARN ]  PCI: 00:1f.5
[WARN ]  PCI: Check your devicetree.cb.
[ERROR]  PNP: 004e.3 74 not allocated
[DEBUG]  FMAP: area COREBOOT found @ d50000 (2818048 bytes)
[WARN ]  ELOG: Unable to find RW_ELOG in FMAP
[ERROR]  ME MBP: unknown item 0x20104 @ dw offset 0x6
[WARN ]  CBFS: 'fallback/slic' not found.
[WARN ]  SMBIOS type 15 log address invalid.
====================

r/coreboot • • 12h ago

Is coreboot / libreboot available for risc-v socs and sbcs?

5 Upvotes

Does coreboot / libreboot work with risc-v all in one computer system on chips for single board computers? If it does so, which ones are supported?