Issue #571 has been updated by Bill XIE.
The version of factory firmware of my 2170p is F.43.
The latest oem firmware update [HP Notebook System BIOS Update F.72 Rev.A](https://ftp.hp.com/pub/softpaq/sp96001-96500/sp96088.exe) could be downloaded from https://support.hp.com/us-en/drivers/hp-elitebook-2170p-notebook-pc/5245427 by selecting "Windows 10 (64-bit)". ``` $ sha512sum sp96088.exe 940e533b6a276c13a6e46a93795ca84b19877b05e82c0c1795b7fea9cbea63c28e606ef994352fc77c4fdfb2e0c31c5edeefa98b989e1990364dfc6417b25460 sp96088.exe ``` This sp96088.exe contains an MS cabinet archive, and could be extracted with cabextract(1) to obtain another cabinet archive Rom.CAB, which can be extracted to obtain a 5MB Rom.bin, with the same size as the BIOS region of the factory firmware.
As hinted by ver.txt within Rom.CAB, a 256kB volume with type NVRAM (recognized by [UEFITool NE](https://github.com/LongSoft/UEFITool)) at 0x3e0000 of the BIOS region of the factory firmware could be extracted and overwritten (via [UEFITool old engine](https://github.com/LongSoft/UEFITool/commits/old_engine), as UEFITool NE has not been capable of modification yet) onto the volume at the same offset of the Rom.bin. This modified Rom.bin could be insert back into the factory firmware as its BIOS region via ifdtool, and the latest oem firmware (F.72 Rev.A) is obtained.
Oem firmwares (either factory or latest) of SandyBridge/IvyBridge Elitebooks is notorious for refusing to boot from GPT-paritioned hdd via either MBR or EFI, though manually booting from EFI file does work.
The scan codes under the oem firmware (either factory or latest) do conform to the upstream 60-keyboard.hwdb. More importantly, the scan code of backspace (in oem mode defined earlier) is 0x0e: ``` # evtest /dev/input/by-path/platform-i8042-serio-0-event-kbd Input driver version is 1.0.1 Input device ID: bus 0x11 vendor 0x1 product 0x1 version 0xab83 Input device name: "AT Translated Set 2 keyboard" ... Event: time 1732504394.297639, type 4 (EV_MSC), code 4 (MSC_SCAN), value 0e Event: time 1732504394.297639, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 1 Event: time 1732504394.297639, -------------- SYN_REPORT ------------ Event: time 1732504394.368779, type 4 (EV_MSC), code 4 (MSC_SCAN), value 0e Event: time 1732504394.368779, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 0 Event: time 1732504394.368779, -------------- SYN_REPORT ------------ ``` kbc1126_ec_dump could extract EC blobs from Rom.bin (version 63.1C from F.72 Rev.A): ``` $ sha512sum Rom.bin.fw* 44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938 Rom.bin.fw1 09c5b8bab6f258a0303ac502b4900cd4277bd6c43bfd2ef0030df6e918ef3300d04d2979373f8b05f77d1eae1c27ebd01856426b8eed6f215e1fcaed68e0977e Rom.bin.fw2 ``` The larger fw2 is different with the one extracted from the factory firmware (version 63.1A from F.43): ``` $ sha512sum flashregion_1_bios.bin.fw* 44a27359e8e2ecfae910a754617d5ee947d6bba976f2eb53114a97c71b64813da7ab4223749706c9bbcaf1e752c190834ee3b41c297c191b3cac200814e02938 flashregion_1_bios.bin.fw1 6fab77ad3844f0ed965df16d29167fbff4b50cb64a81e5ea234f043ab78f06018905c9075fc73980d5e61c4a7e3ac9d9aa1eecfd816dd9ff97e3776531c4ecb5 flashregion_1_bios.bin.fw2 ``` Under a coreboot image with these EC blobs integrated (either 63.1A or 63.1C), the scan codes conform to Wreg Yek's 61-2170p-kb.hwdb, and the scan code of backspace (in default mode defined earlier) is 0x66: ``` Event: time 1732511777.265566, type 4 (EV_MSC), code 4 (MSC_SCAN), value 66 Event: time 1732511777.265566, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 1 Event: time 1732511777.265566, -------------- SYN_REPORT ------------ Event: time 1732511777.370022, type 4 (EV_MSC), code 4 (MSC_SCAN), value 66 Event: time 1732511777.370022, type 1 (EV_KEY), code 14 (KEY_BACKSPACE), value 0 Event: time 1732511777.370022, -------------- SYN_REPORT ------------ ```
---------------------------------------- Support #571: Keyboard scan codes of HP Elitebook 2170p under coreboot are different with those under oem firmware. https://ticket.coreboot.org/issues/571#change-1977
* Author: Wreg Yek * Status: New * Priority: Normal * Target version: none * Start date: 2024-11-23 * Affected hardware: HP Elitebook 2170p * Affected OS: GNU/Linux with systemd v257-rc1 or later ---------------------------------------- HP Elitebook 2170p is weird compared with many other Elitebooks supported by coreboot, for its keyboard scan codes under coreboot is different with those under oem firmware, regardless of the same set of EC firmware blobs are used.
The scan codes under oem firmware conform to the upstream [60-keyboard.hwdb](https://github.com/systemd/systemd/blob/main/hwdb.d/60-keyboard.hwdb), while after systemd v257-rc1, the `KEYBOARD_KEY_66=pickup_phone` within [upstream](https://github.com/systemd/systemd/commit/93b078c3dd40b10eed34a77d514b1db749...) 60-keyboard.hwdb starts to conflict with the scan codes of backspace key under coreboot, where it is 0x66.
Besides backspace, I have collected the scan codes of all Fn-keys under coreboot into the attached 61-2170p-kb.hwdb, which is adjusted to the default SMBIOS tables of coreboot for Elitebook 2170p, and could be used to walk around the scan code conflict.
---Files-------------------------------- 61-2170p-kb.hwdb (508 Bytes)