Patchwork PATCH: whitelist for ThinkPad T500 and R400

login
register
about
Submitter Francis Rowe
Date 2016-03-11 06:55:41
Message ID <56E26BED.8090800@gluglug.org.uk>
Download mbox | patch
Permalink /patch/4419/
State New
Headers show

Comments

Francis Rowe - 2016-03-11 06:55:41
Dear flashrom community,

Attached is my patch adding a whitelist to flashrom, for these laptops:
* ThinkPad R400
* ThinkPad T500

Both laptops were added to coreboot recently, so it makes sense for
flashrom to have a whitelist.

Hope the community finds this useful.

Regards,
Francis Rowe.

PS: This was made on top of stefanct's git repository, pulled from his
github profile.
Stefan Tauner - 2016-03-12 00:58:22
On Fri, 11 Mar 2016 06:55:41 +0000
Francis Rowe <info@gluglug.org.uk> wrote:

> Dear flashrom community,
> 
> Attached is my patch adding a whitelist to flashrom, for these laptops:
> * ThinkPad R400
> * ThinkPad T500
> 
> Both laptops were added to coreboot recently, so it makes sense for
> flashrom to have a whitelist.
> 
> Hope the community finds this useful.
> 


Hello Francis,

thanks for your patch. Yes, they should be added. Could you please also
post the respective lspci logs? IIRC the vendor's flash descriptor
prohibits flashrom from fully working on these machines, right?
Francis Rowe - 2016-03-13 11:45:07
Hi Stefan,

On 12/03/16 00:58, Stefan Tauner wrote:
> Hello Francis, thanks for your patch. Yes, they should be added. Could
you please also post the respective lspci logs? IIRC the vendor's flash
descriptor prohibits flashrom from fully working on these machines, right?

Flash descriptor setting is irrelevant afaik, but yes, it can
write-protect the chip. I don't have ability to get logs at the moment,
but I've been using these whitelists on the laptops they're for, with
all regions set read-write in a [modified] descriptor region that sets
the whole chip read-write, and they do work.

Regards,
Francis Rowe.
Stefan Tauner - 2016-03-13 12:24:28
On Sun, 13 Mar 2016 11:45:07 +0000
Francis Rowe <info@gluglug.org.uk> wrote:

> Hi Stefan,
> 
> On 12/03/16 00:58, Stefan Tauner wrote:
> > Hello Francis, thanks for your patch. Yes, they should be added. Could
> you please also post the respective lspci logs? IIRC the vendor's flash
> descriptor prohibits flashrom from fully working on these machines, right?
> 
> Flash descriptor setting is irrelevant afaik, but yes, it can
> write-protect the chip. I don't have ability to get logs at the moment,
> but I've been using these whitelists on the laptops they're for, with
> all regions set read-write in a [modified] descriptor region that sets
> the whole chip read-write, and they do work.

It's not relevant for the whitelist but for the supported list (the
array in print.c). We definitely do not want to make the impression that
a device works with the firmware it comes with when it does not, cf.
https://www.flashrom.org/Supported_hardware#mobile_devices_ref15
(although that list could be extended a lot... no one cared so far).

Patch

From 52a0b55c77635dc026793e66d516e3aed335706a Mon Sep 17 00:00:00 2001
From: Francis Rowe <info@gluglug.org.uk>
Date: Fri, 11 Mar 2016 06:35:03 +0000
Subject: [PATCH 1/1] New laptops whitelisted: ThinkPad R400 and ThinkPad T500

Support for these laptops was merged in coreboot a while ago, so it makes sense
for flashrom to whitelist them.
---
 board_enable.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board_enable.c b/board_enable.c
index 7b152d1..1d56203 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -2427,7 +2427,9 @@  const struct board_match board_matches[] = {
 	{0x8086, 0x7190,      0,      0,  0x8086, 0x7110,      0,      0, "^SE440BX-2$", NULL, NULL,          P3, "Intel",       "SE440BX-2",             0,   NT, intel_piix4_gpo27_lower},
 	{0x1022, 0x7468,      0,      0,  0x1022, 0x7460,      0,      0, NULL,         "iwill", "dk8_htx",   P3, "IWILL",       "DK8-HTX",               0,   OK, w83627hf_gpio24_raise_2e},
 	{0x8086, 0x27A0, 0x8086, 0x27a0,  0x8086, 0x27b8, 0x8086, 0x27b8, NULL,        "kontron", "986lcd-m", P3, "Kontron",     "986LCD-M",              0,   OK, board_kontron_986lcd_m},
+    {0x8086, 0x2917, 0x17AA, 0x20F5,  0x8086, 0x2930, 0x17AA, 0x20F9, "^ThinkPad R400", NULL, NULL,      P2, "IBM/Lenovo",  "ThinkPad R400",         0,   OK, p2_whitelist_laptop},
 	{0x8086, 0x2917, 0x17AA, 0x20F5,  0x8086, 0x2930, 0x17AA, 0x20F9, "^ThinkPad T400", NULL, NULL,       P2, "IBM/Lenovo",  "ThinkPad T400",         0,   OK, p2_whitelist_laptop},
+    {0x8086, 0x2917, 0x17AA, 0x20F5,  0x8086, 0x2930, 0x17AA, 0x20F9, "^ThinkPad T500", NULL, NULL,      P2, "IBM/Lenovo",  "ThinkPad T500",         0,   OK, p2_whitelist_laptop},
 	{0x8086, 0x1E22, 0x17AA, 0x21F6,  0x8086, 0x1E55, 0x17AA, 0x21F6, "^ThinkPad T530", NULL, NULL,       P2, "IBM/Lenovo",  "ThinkPad T530",         0,   OK, p2_whitelist_laptop},
 	{0x8086, 0x27a0, 0x17aa, 0x2015,  0x8086, 0x27b9, 0x17aa, 0x2009, "^ThinkPad T60", NULL, NULL,        P2, "IBM/Lenovo",  "ThinkPad T60",          0,   OK, p2_whitelist_laptop},
 	{0x8086, 0x27a0, 0x17aa, 0x2017,  0x8086, 0x27b9, 0x17aa, 0x2009, "^ThinkPad T60", NULL, NULL,        P2, "IBM/Lenovo",  "ThinkPad T60(s)",       0,   OK, p2_whitelist_laptop},
-- 
1.9.1