blob: 4d7f3efd1e9b7c4c48e28f5447d796d4fd1bd1d0 [file] [log] [blame]
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +00001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
5 * Copyright (C) 2009 Carl-Daniel Hailfinger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include <string.h>
23#include <stdlib.h>
24#include <time.h>
25#include "flash.h"
26#include "flashchips.h"
27
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +000028#if INTERNAL_SUPPORT == 1
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000029struct board_info_url {
30 const char *vendor;
31 const char *name;
32 const char *url;
33};
34
35struct board_info_notes {
36 const char *vendor;
37 const char *name;
38 const char *note;
39};
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +000040#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000041
42const char *wiki_header = "= Supported devices =\n\n\
43<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
44background-color:#eeeeee; align:right; border:1px solid #aabbcc;\"><small>\n\
45Please do '''not''' edit these tables in the wiki directly, they are \
46generated by pasting '''flashrom -z''' output.<br />\
47'''Last update:''' %s(generated by flashrom %s)\n</small></div>\n";
48
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +000049#if INTERNAL_SUPPORT == 1
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000050const char *chipset_th = "{| border=\"0\" style=\"font-size: smaller\"\n\
51|- bgcolor=\"#6699dd\"\n! align=\"left\" | Vendor\n\
52! align=\"left\" | Southbridge\n! align=\"left\" | PCI IDs\n\
53! align=\"left\" | Status\n\n";
54
55const char *board_th = "{| border=\"0\" style=\"font-size: smaller\" \
56valign=\"top\"\n|- bgcolor=\"#6699dd\"\n! align=\"left\" | Vendor\n\
57! align=\"left\" | Mainboard\n! align=\"left\" | Status\n\n";
58
59const char *board_th2 = "{| border=\"0\" style=\"font-size: smaller\" \
60valign=\"top\"\n|- bgcolor=\"#6699dd\"\n! align=\"left\" | Vendor\n\
61! align=\"left\" | Mainboard\n! align=\"left\" | Required option\n\
62! align=\"left\" | Status\n\n";
63
64const char *board_intro = "\
65\n== Supported mainboards ==\n\n\
66In general, it is very likely that flashrom works out of the box even if your \
67mainboard is not listed below.\n\nThis is a list of mainboards where we have \
68verified that they either do or do not need any special initialization to \
69make flashrom work (given flashrom supports the respective chipset and flash \
70chip), or that they do not yet work at all. If they do not work, support may \
71or may not be added later.\n\n\
72Mainboards which don't appear in the list may or may not work (we don't \
73know, someone has to give it a try). Please report any further verified \
74mainboards on the [[Mailinglist|mailing list]].\n";
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +000075#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000076
77const char *chip_th = "{| border=\"0\" style=\"font-size: smaller\" \
78valign=\"top\"\n|- bgcolor=\"#6699dd\"\n! align=\"left\" | Vendor\n\
79! align=\"left\" | Device\n! align=\"left\" | Size / KB\n\
80! align=\"left\" | Type\n! align=\"left\" colspan=\"4\" | Status\n\n\
81|- bgcolor=\"#6699ff\"\n| colspan=\"4\" | &nbsp;\n\
Carl-Daniel Hailfinger26f72a12010-01-18 07:02:19 +000082| Probe\n| Read\n| Erase\n| Write\n\n";
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000083
84const char *programmer_section = "\
85\n== Supported programmers ==\n\nThis is a list \
86of supported PCI devices flashrom can use as programmer:\n\n{| border=\"0\" \
87valign=\"top\"\n| valign=\"top\"|\n\n{| border=\"0\" style=\"font-size: \
88smaller\" valign=\"top\"\n|- bgcolor=\"#6699dd\"\n! align=\"left\" | Vendor\n\
89! align=\"left\" | Device\n! align=\"left\" | PCI IDs\n\
90! align=\"left\" | Status\n\n";
91
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +000092#if INTERNAL_SUPPORT == 1
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +000093const char *laptop_intro = "\n== Supported laptops/notebooks ==\n\n\
94In general, flashing laptops is more difficult because laptops\n\n\
95* often use the flash chip for stuff besides the BIOS,\n\
96* often have special protection stuff which has to be handled by flashrom,\n\
97* often use flash translation circuits which need drivers in flashrom.\n\n\
98<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
99background-color:#ff6666; align:right; border:1px solid #000000;\">\n\
100'''IMPORTANT:''' At this point we recommend to '''not''' use flashrom on \
101untested laptops unless you have a means to recover from a flashing that goes \
102wrong (a working backup flash chip and/or good soldering skills).\n</div>\n";
103
104/* Please keep these lists alphabetically ordered by vendor/board. */
105const struct board_info_url boards_url[] = {
106 /* Verified working boards that don't need write-enables. */
107 { "Abit", "AX8", "http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?DEFTITLE=Y&fMTYPE=Socket%20939&pMODEL_NAME=AX8" },
108 { "Abit", "Fatal1ty F-I90HD", "http://www.abit.com.tw/page/de/motherboard/motherboard_detail.php?pMODEL_NAME=Fatal1ty+F-I90HD&fMTYPE=LGA775" },
109 { "Advantech", "PCM-5820", "http://www.emacinc.com/sbc_pc_compatible/pcm_5820.htm" },
110 { "ASI", "MB-5BLMP", "http://www.hojerteknik.com/winnet.htm" },
111 { "ASRock", "A770CrossFire", "http://www.asrock.com/mb/overview.asp?Model=A770CrossFire&s=AM2\%2b" },
Idwer Volleringfcd070e2009-12-01 12:55:18 +0000112 { "ASRock", "K8S8X", "http://www.asrock.com/mb/overview.asp?Model=K8S8X" },
Zachary O Dillard9bd5eec2009-12-14 04:11:12 +0000113 { "ASRock", "M3A790GXH/128M" "http://www.asrock.com/MB/overview.asp?Model=M3A790GXH/128M" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000114 { "ASUS", "A7N8X Deluxe", "http://www.asus.com/product.aspx?P_ID=wAsRYm41KTp78MFC" },
115 { "ASUS", "A7N8X-E Deluxe", "http://www.asus.com/product.aspx?P_ID=TmQtPJv4jIxmL9C2" },
Michael Karcher98eff462010-03-24 22:55:56 +0000116 { "ASUS", "A7V133", "ftp://ftp.asus.com.tw/pub/ASUS/mb/socka/kt133a/a7v133/" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000117 { "ASUS", "A7V400-MX", "http://www.asus.com/product.aspx?P_ID=hORgEHRBDLMfwAwx" },
118 { "ASUS", "A7V8X-MX", "http://www.asus.com/product.aspx?P_ID=SEJOOYqfuQPitx2H" },
119 { "ASUS", "A8N-E", "http://www.asus.com/product.aspx?P_ID=DzbA8hgqchMBOVRz" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000120 { "ASUS", "A8NE-FM/S", "http://www.hardwareschotte.de/hardware/preise/proid_1266090/preis_ASUS+A8NE-FM" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000121 { "ASUS", "A8N-SLI", "http://www.asus.com/product.aspx?P_ID=J9FKa8z2xVId3pDK" },
122 { "ASUS", "A8N-SLI Premium", "http://www.asus.com/product.aspx?P_ID=nbulqxniNmzf0mH1" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000123 { "ASUS", "A8V Deluxe", "http://www.asus.com/product.aspx?P_ID=tvpdgPNCPaABZRVU" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000124 { "ASUS", "A8V-E Deluxe", "http://www.asus.com/product.aspx?P_ID=hQBPIJWEZnnGAZEh" },
125 { "ASUS", "A8V-E SE", "http://www.asus.com/product.aspx?P_ID=VMfiJJRYTHM4gXIi" },
Idwer Vollering7a0d9472009-11-16 14:13:09 +0000126 { "ASUS", "K8V", "http://www.asus.com/product.aspx?P_ID=fG2KZOWF7v6MRFRm" },
127 { "ASUS", "K8V SE Deluxe", "http://www.asus.com/product.aspx?P_ID=65HeDI8XM1u6Uy6o" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000128 { "ASUS", "K8V-X SE", "http://www.asus.com/product.aspx?P_ID=lzDXlbBVHkdckHVr" },
129 { "ASUS", "M2A-MX", "http://www.asus.com/product.aspx?P_ID=BmaOnPewi1JgltOZ" },
130 { "ASUS", "M2A-VM", "http://www.asus.com/product.aspx?P_ID=St3pWpym8xXpROQS" },
131 { "ASUS", "M2N-E", "http://www.asus.com/product.aspx?P_ID=NFlvt10av3F7ayQ9" },
132 { "ASUS", "M2V", "http://www.asus.com/product.aspx?P_ID=OqYlEDFfF6ZqZGvp" },
Uwe Hermann57146142009-09-25 01:22:42 +0000133 { "ASUS", "M3A78-EM", "http://www.asus.com/product.aspx?P_ID=KjpYqzmAd9vsTM2D" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000134 { "ASUS", "P2B", "ftp://ftp.asus.com.tw/pub/ASUS/mb/slot1/440bx/p2b/" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000135 { "ASUS", "P2B-D", "ftp://ftp.asus.com.tw/pub/ASUS/mb/slot1/440bx/p2b-d/" },
136 { "ASUS", "P2B-DS", "ftp://ftp.asus.com.tw/pub/ASUS/mb/slot1/440bx/p2b-ds/" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000137 { "ASUS", "P2B-F", "ftp://ftp.asus.com.tw/pub/ASUS/mb/slot1/440bx/p2b-d/" },
138 { "ASUS", "P2L97-S", "ftp://ftp.asus.com.tw/pub/ASUS/mb/slot1/440lx/p2l97-s/" },
Michael Karcherd4e53592010-03-25 09:23:46 +0000139 { "ASUS", "P5B", "ftp://ftp.asus.com.tw/pub/ASUS/mb/socket775/P5B/" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000140 { "ASUS", "P5B-Deluxe", "http://www.asus.com/product.aspx?P_ID=bswT66IBSb2rEWNa" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000141 { "ASUS", "P5KC", "http://www.asus.com/product.aspx?P_ID=fFZ8oUIGmLpwNMjj" },
142 { "ASUS", "P5L-MX", "http://www.asus.com/product.aspx?P_ID=X70d3NCzH2DE9vWH" },
Michael Karchere06a9c82010-03-24 22:56:08 +0000143 { "ASUS", "P6T Deluxe", "http://www.asus.com/product.aspx?P_ID=vXixf82co6Q5v0BZ" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000144 { "ASUS", "P6T Deluxe V2", "http://www.asus.com/product.aspx?P_ID=iRlP8RG9han6saZx" },
145 { "A-Trend", "ATC-6220", "http://www.motherboard.cz/mb/atrend/atc6220.htm" },
146 { "BCOM", "WinNET100", "http://www.coreboot.org/BCOM_WINNET100" },
Idwer Volleringfcd070e2009-12-01 12:55:18 +0000147 { "DFI", "Blood-Iron P35 T2RL", "http://lp.lanparty.com.tw/portal/CM/cmproduct/XX_cmproddetail/XX_WbProdsWindow?itemId=516&downloadFlag=false&action=1" },
Idwer Vollering7a0d9472009-11-16 14:13:09 +0000148 { "Elitegroup", "K7S5A", "http://www.ecs.com.tw/ECSWebSite/Products/ProductsDetail.aspx?detailid=279&CategoryID=1&DetailName=Specification&MenuID=1&LanID=0" },
Uwe Hermann57146142009-09-25 01:22:42 +0000149 { "Elitegroup", "P6VAP-A+", "http://www.ecs.com.tw/ECSWebSite/Products/ProductsDetail.aspx?detailid=117&CategoryID=1&DetailName=Specification&MenuID=1&LanID=0" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000150 { "GIGABYTE", "GA-6BXC", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1445" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000151 { "GIGABYTE", "GA-6BXDU", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1429" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000152 { "GIGABYTE", "GA-6ZMA", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1541" },
Michael Karcherd4e53592010-03-25 09:23:46 +0000153 { "GIGABYTE", "GA-965P-DS4", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2288" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000154 { "GIGABYTE", "GA-EX58-UD4P", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2986" },
155 { "GIGABYTE", "GA-EP35-DS3L", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2778" },
156 { "GIGABYTE", "GA-MA69VM-S2", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2500" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000157 { "GIGABYTE", "GA-MA790GP-DS4H", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2887" },
158 { "GIGABYTE", "GA-MA78GPM-DS2H", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2859" },
Uwe Hermann57146142009-09-25 01:22:42 +0000159 { "GIGABYTE", "GA-MA770T-UD3P", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=3096" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000160 { "Intel", "EP80759", NULL },
161 { "Jetway", "J7F4K1G5D-PB", "http://www.jetway.com.tw/jetway/system/productshow2.asp?id=389&proname=J7F4K1G5D-P" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000162 { "MSI", "MS-6153", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=336" },
Uwe Hermann14b3e1e2009-10-06 20:23:29 +0000163 { "MSI", "MS-6156", "http://uk.ts.fujitsu.com/rl/servicesupport/techsupport/boards/Motherboards/MicroStar/Ms6156/MS6156.htm" },
Michael Karcherb90c2212010-03-24 22:56:14 +0000164 { "MSI", "MS-6330 (K7T Turbo)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=327" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000165 { "MSI", "MS-6570 (K7N2)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=519" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000166 { "MSI", "MS-7065", "http://browse.geekbench.ca/geekbench2/view/53114" },
167 { "MSI", "MS-7168 (Orion)", "http://support.packardbell.co.uk/uk/item/index.php?i=spec_orion&pi=platform_honeymoon_istart" },
168 { "MSI", "MS-7236 (945PL Neo3)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=1173" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000169 { "MSI", "MS-7255 (P4M890M)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=1082" },
170 { "MSI", "MS-7345 (P35 Neo2-FIR)","http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=1261" },
Michael Karcherd4e53592010-03-25 09:23:46 +0000171 { "MSI", "MS-7312 (K9MM-V)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=1104" },
Uwe Hermann57146142009-09-25 01:22:42 +0000172 { "MSI", "MS-7368 (K9AG Neo2-Digital)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=1241" },
Michael Karcherc85fa452010-03-24 22:56:19 +0000173 { "MSI", "MS-7376 (K9A2 Platinum)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=1332" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000174 { "NEC", "PowerMate 2000", "http://support.necam.com/mobilesolutions/hardware/Desktops/pm2000/celeron/" },
175 { "PC Engines", "Alix.1c", "http://pcengines.ch/alix1c.htm" },
176 { "PC Engines", "Alix.2c2", "http://pcengines.ch/alix2c2.htm" },
177 { "PC Engines", "Alix.2c3", "http://pcengines.ch/alix2c3.htm" },
178 { "PC Engines", "Alix.3c3", "http://pcengines.ch/alix3c3.htm" },
179 { "PC Engines", "Alix.3d3", "http://pcengines.ch/alix3d3.htm" },
Michael Karcherd4e53592010-03-25 09:23:46 +0000180 { "PC Engines", "WRAP.2E", "http://pcengines.ch/wrap2e1.htm" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000181 { "RCA", "RM4100", "http://www.settoplinux.org/index.php?title=RCA_RM4100" },
Michael Karcherc85fa452010-03-24 22:56:19 +0000182 { "Shuttle", "FD37", "http://www.shuttle.eu/products/discontinued/barebones/sd37p2/" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000183 { "Sun", "Blade x6250", "http://www.sun.com/servers/blades/x6250/" },
184 { "Supermicro", "H8QC8", "http://www.supermicro.com/Aplus/motherboard/Opteron/nforce/H8QC8.cfm" },
Michael Karcherd4e53592010-03-25 09:23:46 +0000185 { "Supermicro", "X8DTT-F", "http://www.supermicro.com/products/motherboard/QPI/5500/X8DTT-F.cfm" },
Uwe Hermann012b3a12010-01-31 20:13:06 +0000186 { "Tekram", "P6Pro-A5", "http://www.motherboard.cz/mb/tekram/P6Pro-A5.htm" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000187 { "Thomson", "IP1000", "http://www.settoplinux.org/index.php?title=Thomson_IP1000" },
188 { "TriGem", "Lomita", "http://www.e4allupgraders.info/dir1/motherboards/socket370/lomita.shtml" },
189 { "T-Online", "S-100", "http://wiki.freifunk-hannover.de/T-Online_S_100" },
190 { "Tyan", "iS5375-1U", "http://www.tyan.com/product_board_detail.aspx?pid=610" },
191 { "Tyan", "S1846", "http://www.tyan.com/archive/products/html/tsunamiatx.html" },
192 { "Tyan", "S2466", "http://www.tyan.com/product_board_detail.aspx?pid=461" },
193 { "Tyan", "S2881", "http://www.tyan.com/product_board_detail.aspx?pid=115" },
194 { "Tyan", "S2882", "http://www.tyan.com/product_board_detail.aspx?pid=121" },
195 { "Tyan", "S2882-D", "http://www.tyan.com/product_board_detail.aspx?pid=127" },
196 { "Tyan", "S2891", "http://www.tyan.com/product_board_detail.aspx?pid=144" },
197 { "Tyan", "S2892", "http://www.tyan.com/product_board_detail.aspx?pid=145" },
198 { "Tyan", "S2895", "http://www.tyan.com/archive/products/html/thunderk8we.html" },
199 { "Tyan", "S3095", "http://www.tyan.com/product_board_detail.aspx?pid=181" },
200 { "Tyan", "S5180", "http://www.tyan.com/product_board_detail.aspx?pid=456" },
201 { "Tyan", "S5191", "http://www.tyan.com/product_board_detail.aspx?pid=343" },
202 { "Tyan", "S5197", "http://www.tyan.com/product_board_detail.aspx?pid=349" },
203 { "Tyan", "S5211", "http://www.tyan.com/product_board_detail.aspx?pid=591" },
204 { "Tyan", "S5211-1U", "http://www.tyan.com/product_board_detail.aspx?pid=593" },
205 { "Tyan", "S5220", "http://www.tyan.com/product_board_detail.aspx?pid=597" },
206 { "Tyan", "S5375", "http://www.tyan.com/product_board_detail.aspx?pid=566" },
207 { "Tyan", "S5376G2NR/S5376WAG2NR","http://www.tyan.com/product_board_detail.aspx?pid=605" },
208 { "Tyan", "S5377", "http://www.tyan.com/product_SKU_spec.aspx?ProductType=MB&pid=642&SKU=600000017" },
Michael Karcherd4e53592010-03-25 09:23:46 +0000209 { "Tyan", "S5382 (Tempest i5000PW)", "http://www.tyan.com/product_board_detail.aspx?pid=439" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000210 { "Tyan", "S5397", "http://www.tyan.com/product_board_detail.aspx?pid=560" },
211 { "VIA", "EPIA-EX15000G", "http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&motherboard_id=450" },
212 { "VIA", "EPIA-LN", "http://www.via.com.tw/en/products/mainboards/motherboards.jsp?motherboard_id=473" },
213 { "VIA", "EPIA-M700", "http://via.com.tw/servlet/downloadSvl?motherboard_id=670&download_file_id=3700" },
214 { "VIA", "EPIA-NX15000G", "http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&motherboard_id=470" },
215 { "VIA", "NAB74X0", "http://www.via.com.tw/en/products/mainboards/motherboards.jsp?motherboard_id=590" },
216 { "VIA", "pc2500e", "http://www.via.com.tw/en/initiatives/empowered/pc2500_mainboard/index.jsp" },
217 { "VIA", "VB700X", "http://www.via.com.tw/en/products/mainboards/motherboards.jsp?motherboard_id=490" },
218
219 /* Verified working boards that DO need write-enables. */
Michael Karcher98eff462010-03-24 22:55:56 +0000220 { "Abit", "VT6X4", "http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=Slot%201&pMODEL_NAME=VT6X4" },
Uwe Hermann14b3e1e2009-10-06 20:23:29 +0000221 { "Abit", "IP35", "http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=LGA775&pMODEL_NAME=IP35" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000222 { "Abit", "IP35 Pro", "http://www.abit.com.tw/page/de/motherboard/motherboard_detail.php?fMTYPE=LGA775&pMODEL_NAME=IP35%20Pro" },
Michael Karcher8f10d242010-04-11 21:01:06 +0000223 { "Abit", "NF7-S", "http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=Socket%20A&pMODEL_NAME=NF7-S"},
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000224 { "Acorp", "6A815EPD", "http://web.archive.org/web/20021206163652/www.acorp.com.tw/English/default.asp" },
225 { "agami", "Aruma", "http://web.archive.org/web/20080212111524/http://www.agami.com/site/ais-6000-series" },
226 { "Albatron", "PM266A Pro", "http://www.albatron.com.tw/English/Product/MB/pro_detail.asp?rlink=Overview&no=56" }, /* FIXME */
227 { "AOpen", "vKM400Am-S", "http://usa.aopen.com/products_detail.aspx?Auno=824" },
228 { "Artec Group", "DBE61", "http://wiki.thincan.org/DBE61" },
229 { "Artec Group", "DBE62", "http://wiki.thincan.org/DBE62" },
230 { "ASUS", "A7V600-X", "http://www.asus.com/product.aspx?P_ID=L2XYS0rmtCjeOr4k" },
Uwe Hermann14b3e1e2009-10-06 20:23:29 +0000231 { "ASUS", "A7V8X", "http://www.asus.com/product.aspx?P_ID=qfpaGrAy2kLVo0f2" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000232 { "ASUS", "A7V8X-MX SE", "http://www.asus.com/product.aspx?P_ID=1guVBT1qV5oqhHyZ" },
Russ Dillbd622d12010-03-09 16:57:06 +0000233 { "ASUS", "A7V8X-X", "http://www.asus.com/product.aspx?P_ID=YcXfRrWHZ9RKoVmw" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000234 { "ASUS", "M2NBP-VM CSM", "http://www.asus.com/product.aspx?P_ID=MnOfzTGd2KkwG0rF" },
235 { "ASUS", "M2V-MX", "http://www.asus.com/product.aspx?P_ID=7grf8Ci4yxnqzt3z" },
236 { "ASUS", "P4B266", "ftp://ftp.asus.com.tw/pub/ASUS/mb/sock478/p4b266/" },
Michael Karcher6499d5a2010-03-17 06:19:23 +0000237 { "ASUS", "P4C800-E Deluxe", "http://www.asus.com/product.aspx?P_ID=cFuVCr9bXXCckmcK" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000238 { "ASUS", "P4B266-LM", "http://esupport.sony.com/US/perl/swu-list.pl?mdl=PCVRX650" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000239 { "ASUS", "P4P800-E Deluxe", "http://www.asus.com/product.aspx?P_ID=INIJUvLlif7LHp3g" },
Uwe Hermann14b3e1e2009-10-06 20:23:29 +0000240 { "ASUS", "P5ND2-SLI Deluxe", "http://www.asus.com/product.aspx?P_ID=WY7XroDuUImVbgp5" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000241 { "ASUS", "P5A", "ftp://ftp.asus.com.tw/pub/ASUS/mb/sock7/ali/p5a/" },
242 { "Biostar", "P4M80-M4", "http://www.biostar-usa.com/mbdetails.asp?model=p4m80-m4" },
Uwe Hermann14b3e1e2009-10-06 20:23:29 +0000243 { "Dell", "PowerEdge 1850", "http://support.dell.com/support/edocs/systems/pe1850/en/index.htm" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000244 { "Elitegroup", "K7S6A", "http://www.ecs.com.tw/ECSWebSite/Products/ProductsDetail.aspx?detailid=77&CategoryID=1&DetailName=Specification&MenuID=52&LanID=0" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000245 { "Elitegroup", "K7VTA3", "http://www.ecs.com.tw/ECSWebSite/Products/ProductsDetail.aspx?detailid=264&CategoryID=1&DetailName=Specification&MenuID=52&LanID=0" },
246 { "EPoX", "EP-8K5A2", "http://www.epox.com/product.asp?ID=EP-8K5A2" },
Uwe Hermann14b3e1e2009-10-06 20:23:29 +0000247 { "EPoX", "EP-8RDA3+", "http://www.epox.com/product.asp?ID=EP-8RDA3plus" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000248 { "EPoX", "EP-BX3", "http://www.epox.com/product.asp?ID=EP-BX3" },
249 { "GIGABYTE", "GA-2761GXDK", "http://www.computerbase.de/news/hardware/mainboards/amd-systeme/2007/mai/gigabyte_dtx-mainboard/" },
250 { "GIGABYTE", "GA-7VT600", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1666" },
251 { "GIGABYTE", "GA-7ZM", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1366" },
252 { "GIGABYTE", "GA-K8N-SLI", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=1928" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000253 { "GIGABYTE", "GA-M57SLI-S4", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2287" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000254 { "GIGABYTE", "GA-M61P-S3", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2434" },
255 { "GIGABYTE", "GA-MA78G-DS3H", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2800" }, /* TODO: Rev 1.x or 2.x? */
256 { "GIGABYTE", "GA-MA78GM-S2H", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2758" }, /* TODO: Rev. 1.0, 1.1, or 2.x? */
257 { "GIGABYTE", "GA-MA790FX-DQ6", "http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ProductID=2690" },
258 { "HP", "DL145 G3", "http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c00816835&lang=en&cc=us&taskId=101&prodSeriesId=3219755&prodTypeId=15351" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000259 { "HP", "Vectra VL400 PC", "http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c00060658&lang=en&cc=us" },
260 { "HP", "Vectra VL420 SFF PC", "http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c00060661&lang=en&cc=us" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000261 { "IBM", "x3455", "http://www-03.ibm.com/systems/x/hardware/rack/x3455/index.html" },
262 { "Intel", "D201GLY", "http://www.intel.com/support/motherboards/desktop/d201gly/index.htm" },
263 { "IWILL", "DK8-HTX", "http://web.archive.org/web/20060507170150/http://www.iwill.net/product_2.asp?p_id=98" },
264 { "Kontron", "986LCD-M", "http://de.kontron.com/products/boards+and+mezzanines/embedded+motherboards/miniitx+motherboards/986lcdmmitx.html" },
265 { "Mitac", "6513WU", "http://web.archive.org/web/20050313054828/http://www.mitac.com/micweb/products/tyan/6513wu/6513wu.htm" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000266 { "MSI", "MS-6590 (KT4 Ultra)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=502" },
267 { "MSI", "MS-6702E (K8T Neo2-F)","http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=588" },
268 { "MSI", "MS-6712 (KT4V)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=505" },
269 { "MSI", "MS-7005 (651M-L)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=559" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000270 { "MSI", "MS-7046", "http://www.heimir.de/ms7046/" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000271 { "MSI", "MS-7135 (K8N Neo3)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=170" },
272 { "Shuttle", "AK31", "http://www.motherboard.cz/mb/shuttle/AK31.htm" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000273 { "Shuttle", "AK38N", "http://eu.shuttle.com/en/desktopdefault.aspx/tabid-36/558_read-9889/" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000274 { "Shuttle", "FN25", "http://www.shuttle.eu/products/discontinued/barebones/sn25p/?0=" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000275 { "Soyo", "SY-7VCA", "http://www.tomshardware.com/reviews/12-socket-370-motherboards,196-15.html" },
276 { "Tyan", "S2498 (Tomcat K7M)", "http://www.tyan.com/archive/products/html/tomcatk7m.html" },
277 { "VIA", "EPIA-CN", "http://www.via.com.tw/en/products/mainboards/motherboards.jsp?motherboard_id=400" },
278 { "VIA", "EPIA M/MII/...", "http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&motherboard_id=202" }, /* EPIA-MII link for now */
279 { "VIA", "EPIA-N/NL", "http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&motherboard_id=221" }, /* EPIA-N link for now */
280 { "VIA", "EPIA SP", "http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&motherboard_id=261" },
281 { "VIA", "PC3500G", "http://www.via.com.tw/en/initiatives/empowered/pc3500_mainboard/index.jsp" },
282
283 /* Verified non-working boards (for now). */
284 { "Abit", "IS-10", "http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?pMODEL_NAME=IS-10&fMTYPE=Socket+478" },
285 { "ASRock", "K7VT4A+", "http://www.asrock.com/mb/overview.asp?Model=K7VT4A%%2b&s=" },
286 { "ASUS", "MEW-AM", "ftp://ftp.asus.com.tw/pub/ASUS/mb/sock370/810/mew-am/" },
287 { "ASUS", "MEW-VM", "http://www.elhvb.com/mboards/OEM/HP/manual/ASUS%20MEW-VM.htm" },
288 { "ASUS", "P3B-F", "ftp://ftp.asus.com.tw/pub/ASUS/mb/slot1/440bx/p3b-f/" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000289 { "ASUS", "P5BV-M", "ftp://ftp.asus.com.tw/pub/ASUS/mb/socket775/P5B-VM/" },
290 { "Biostar", "M6TBA", "ftp://ftp.biostar-usa.com/manuals/M6TBA/" },
291 { "Boser", "HS-6637", "http://www.boser.com.tw/manual/HS-62376637v3.4.pdf" },
292 { "DFI", "855GME-MGF", "http://www.dfi.com.tw/portal/CM/cmproduct/XX_cmproddetail/XX_WbProdsWindow?action=e&downloadType=&windowstate=normal&mode=view&downloadFlag=false&itemId=433" },
293 { "FIC", "VA-502", "ftp://ftp.fic.com.tw/motherboard/manual/socket7/va-502/" },
Michael Karcher25a3c532010-03-24 22:56:02 +0000294 { "MSI", "MS-6178", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=343" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000295 { "MSI", "MS-7260 (K9N Neo)", "http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=255" },
296 { "Soyo", "SY-5VD", "http://www.soyo.com/content/Downloads/163/&c=80&p=464&l=English" },
297 { "Sun", "Fire x4540", "http://www.sun.com/servers/x64/x4540/" },
298 { "Sun", "Fire x4150", "http://www.sun.com/servers/x64/x4150/" },
299 { "Sun", "Fire x4200", "http://www.sun.com/servers/entry/x4200/" },
300 { "Sun", "Fire x4600", "http://www.sun.com/servers/x64/x4600/" },
301
302 /* Verified working laptops. */
Michael Karcher3355f062010-03-24 22:56:23 +0000303 { "Acer", "Aspire 1520", "http://support.acer.com/us/en/acerpanam/notebook/0000/Acer/Aspire1520/Aspire1520nv.shtml" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000304 { "Lenovo", "3000 V100 TF05Cxx", "http://www5.pc.ibm.com/europe/products.nsf/products?openagent&brand=Lenovo3000Notebook&series=Lenovo+3000+V+Series#viewallmodelstop" },
305
306 /* Verified non-working laptops (for now). */
307 { "Acer", "Aspire One", NULL },
308 { "ASUS", "Eee PC 701 4G", "http://www.asus.com/product.aspx?P_ID=h6SPd3tEzLEsrEiS" },
309 { "Dell", "Latitude CPi A366XT", "http://www.coreboot.org/Dell_Latitude_CPi_A366XT" },
310 { "HP/Compaq", "nx9010", "http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c00348514" },
311 { "IBM/Lenovo", "Thinkpad T40p", "http://www.thinkwiki.org/wiki/Category:T40p" },
312 { "IBM/Lenovo", "240", "http://www.stanford.edu/~bresnan//tp240.html" },
313
314 { NULL, NULL, 0 },
315};
316
317/* Please keep these lists alphabetically ordered by vendor/board. */
318const struct board_info_notes boards_notes[] = {
319 /* Verified working boards that don't need write-enables. */
320 { "ASI", "MB-5BLMP", "Used in the IGEL WinNET III thin client." },
Idwer Volleringfcd070e2009-12-01 12:55:18 +0000321 { "ASRock", "K8S8X", "The Super I/O isn't found on this board. See http://www.flashrom.org/pipermail/flashrom/2009-November/000937.html." },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000322 { "ASUS", "A8V-E SE", "See http://www.coreboot.org/pipermail/coreboot/2007-October/026496.html." },
323 { "ASUS", "M2A-VM", "See http://www.coreboot.org/pipermail/coreboot/2007-September/025281.html." },
324 { "BCOM", "WinNET100", "Used in the IGEL-316 thin client." },
Idwer Vollering7a0d9472009-11-16 14:13:09 +0000325 { "GIGABYTE", "GA-7ZM", "Works fine if you remove jumper JP9 on the board and disable the flash protection BIOS option." },
326 { "ASUS", "M2N-E", "If the machine doesn't come up again after flashing, try resetting the NVRAM(CMOS). The MAC address of the onboard network card will change to the value stored in the new image, so backup the old address first. See http://www.flashrom.org/pipermail/flashrom/2009-November/000879.html" },
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000327
328 /* Verified working boards that DO need write-enables. */
329 { "Acer", "Aspire One", "See http://www.coreboot.org/pipermail/coreboot/2009-May/048041.html." },
330
331 /* Verified non-working boards (for now). */
332 { "MSI", "MS-6178", "Immediately powers off if you try to hot-plug the chip. However, this does '''not''' happen if you use coreboot." },
333 { "MSI", "MS-7260 (K9N Neo)", "Interestingly flashrom does not work when the vendor BIOS is booted, but it ''does'' work flawlessly when the machine is booted with coreboot." },
334
335 /* Verified working laptops. */
336 /* None which need comments, yet... */
337
338 /* Verified non-working laptops (for now). */
339 { "Acer", "Aspire One", "http://www.coreboot.org/pipermail/coreboot/2009-May/048041.html" },
340 { "ASUS", "Eee PC 701 4G", "It seems the chip (25X40VSIG) is behind some SPI flash translation layer (likely in the EC, the ENE KB3310)." },
341 { "Dell", "Latitude CPi A366XT", "The laptop immediately powers off if you try to hot-swap the chip. It's not yet tested if write/erase would work on this laptop." },
342 { "HP/Compaq", "nx9010", "Hangs upon '''flashrom -V''' (needs hard power-cycle then)." },
343 { "IBM/Lenovo", "Thinkpad T40p", "Seems to (partially) work at first, but one block/sector cannot be written which then leaves you with a bricked laptop. Maybe this can be investigated and fixed in software later." },
344
345 { NULL, NULL, 0 },
346};
347
348static int url(const char *vendor, const char *board)
349{
350 int i;
351 const struct board_info_url *b = boards_url;
352
353 for (i = 0; b[i].vendor != NULL; i++) {
354 if (!strcmp(vendor, b[i].vendor) && !strcmp(board, b[i].name))
355 return i;
356 }
357
358 return -1;
359}
360
361static int note(const char *vendor, const char *board)
362{
363 int i;
364 const struct board_info_notes *n = boards_notes;
365
366 for (i = 0; n[i].vendor != NULL; i++) {
367 if (!strcmp(vendor, n[i].vendor) && !strcmp(board, n[i].name))
368 return i;
369 }
370
371 return -1;
372}
373
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000374static void print_supported_chipsets_wiki(int cols)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000375{
376 int i, j, enablescount = 0, color = 1;
377 const struct penable *e;
378
379 for (e = chipset_enables; e->vendor_name != NULL; e++)
380 enablescount++;
381
382 printf("\n== Supported chipsets ==\n\nTotal amount of supported "
383 "chipsets: '''%d'''\n\n{| border=\"0\" valign=\"top\"\n| "
384 "valign=\"top\"|\n\n%s", enablescount, chipset_th);
385
386 e = chipset_enables;
387 for (i = 0, j = 0; e[i].vendor_name != NULL; i++, j++) {
388 /* Alternate colors if the vendor changes. */
389 if (i > 0 && strcmp(e[i].vendor_name, e[i - 1].vendor_name))
390 color = !color;
391
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000392 printf("|- bgcolor=\"#%s\"\n| %s || %s "
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000393 "|| %04x:%04x || %s\n", (color) ? "eeeeee" : "dddddd",
394 e[i].vendor_name, e[i].device_name,
395 e[i].vendor_id, e[i].device_id,
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000396 (e[i].status == OK) ? "{{OK}}" : "{{?3}}");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000397
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000398 /* Split table in 'cols' columns. */
399 if (j >= (enablescount / cols + 1)) {
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000400 printf("\n|}\n\n| valign=\"top\"|\n\n%s", chipset_th);
401 j = 0;
402 }
403 }
404
405 printf("\n|}\n\n|}\n");
406}
407
408static void wiki_helper(const char *heading, const char *status,
409 int cols, const struct board_info boards[])
410{
411 int i, j, k, c, boardcount = 0, color = 1, num_notes = 0;
412 const struct board_info *b;
413 const struct board_info_url *u = boards_url;
414 char *notes = calloc(1, 1);
415 char tmp[900 + 1];
416
417 for (b = boards; b->vendor != NULL; b++)
418 boardcount++;
419
420 printf("\n'''%s'''\n\nTotal amount of boards: '''%d'''\n\n"
421 "{| border=\"0\" valign=\"top\"\n| valign=\"top\"|\n\n%s",
422 heading, boardcount, board_th);
423
424 for (i = 0, j = 0, b = boards; b[i].vendor != NULL; i++, j++) {
425 /* Alternate colors if the vendor changes. */
426 if (i > 0 && strcmp(b[i].vendor, b[i - 1].vendor))
427 color = !color;
428
429 k = url(b[i].vendor, b[i].name);
430 c = note(b[i].vendor, b[i].name);
431
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000432 printf("|- bgcolor=\"#%s\"\n| %s || %s%s %s%s ||"
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000433 " {{%s}}", (color) ? "eeeeee" : "dddddd", b[i].vendor,
434 (k != -1 && u[k].url) ? "[" : "",
435 (k != -1 && u[k].url) ? u[k].url : "",
436 b[i].name, (k != -1 && u[k].url) ? "]" : "", status);
437
438 if (c != -1) {
439 printf("<sup>%d</sup>\n", num_notes + 1);
440 snprintf((char *)&tmp, 900, "<sup>%d</sup> %s<br />\n",
441 1 + num_notes++, boards_notes[c].note);
442 notes = strcat_realloc(notes, (char *)&tmp);
443 } else {
444 printf("\n");
445 }
446
447 /* Split table in 'cols' columns. */
448 if (j >= (boardcount / cols + 1)) {
449 printf("\n|}\n\n| valign=\"top\"|\n\n%s", board_th);
450 j = 0;
451 }
452 }
453
454 printf("\n|}\n\n|}\n");
455
456 if (num_notes > 0)
457 printf("\n<small>\n%s</small>\n", notes);
458 free(notes);
459}
460
461static void wiki_helper2(const char *heading, int cols)
462{
463 int i, j, k, boardcount = 0, color = 1;
464 struct board_pciid_enable *b;
465 const struct board_info_url *u = boards_url;
466
467 for (b = board_pciid_enables; b->vendor_name != NULL; b++)
468 boardcount++;
469
470 printf("\n'''%s'''\n\nTotal amount of boards: '''%d'''\n\n"
471 "{| border=\"0\" valign=\"top\"\n| valign=\"top\"|\n\n%s",
472 heading, boardcount, board_th2);
473
474 b = board_pciid_enables;
475 for (i = 0, j = 0; b[i].vendor_name != NULL; i++, j++) {
476 /* Alternate colors if the vendor changes. */
477 if (i > 0 && strcmp(b[i].vendor_name, b[i - 1].vendor_name))
478 color = !color;
479
480 k = url(b[i].vendor_name, b[i].board_name);
481
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000482 printf("|- bgcolor=\"#%s\"\n| %s || %s%s %s%s "
483 "|| %s%s%s%s || {{%s}}\n", (color) ? "eeeeee" : "dddddd",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000484 b[i].vendor_name, (k != -1 && u[k].url) ? "[" : "",
485 (k != -1 && u[k].url) ? u[k].url : "", b[i].board_name,
486 (k != -1 && u[k].url) ? "]" : "",
487 (b[i].lb_vendor) ? "-m " : "&mdash;",
488 (b[i].lb_vendor) ? b[i].lb_vendor : "",
489 (b[i].lb_vendor) ? ":" : "",
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000490 (b[i].lb_vendor) ? b[i].lb_part : "",
491 (b[i].status == OK) ? "OK" : "?3");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000492
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000493 /* Split table in 'cols' columns. */
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000494 if (j >= (boardcount / cols + 1)) {
495 printf("\n|}\n\n| valign=\"top\"|\n\n%s", board_th2);
496 j = 0;
497 }
498 }
499
500 printf("\n|}\n\n|}\n");
501}
502
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000503static void print_supported_boards_wiki(void)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000504{
505 printf("%s", board_intro);
506 wiki_helper("Known good (worked out of the box)", "OK", 3, boards_ok);
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000507 wiki_helper2("Known good (with write-enable code in flashrom)", 2);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000508 wiki_helper("Not supported (yet)", "No", 3, boards_bad);
509
510 printf("%s", laptop_intro);
511 wiki_helper("Known good (worked out of the box)", "OK", 1, laptops_ok);
512 wiki_helper("Not supported (yet)", "No", 1, laptops_bad);
513}
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +0000514#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000515
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000516static void print_supported_chips_wiki(int cols)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000517{
518 int i = 0, c = 1, chipcount = 0;
519 struct flashchip *f, *old = NULL;
520 uint32_t t;
521
522 for (f = flashchips; f->name != NULL; f++)
523 chipcount++;
524
525 printf("\n== Supported chips ==\n\nTotal amount of supported "
526 "chips: '''%d'''\n\n{| border=\"0\" valign=\"top\"\n"
527 "| valign=\"top\"|\n\n%s", chipcount, chip_th);
528
529 for (f = flashchips; f->name != NULL; f++, i++) {
530 /* Don't print "unknown XXXX SPI chip" entries. */
531 if (!strncmp(f->name, "unknown", 7))
532 continue;
533
534 /* Alternate colors if the vendor changes. */
535 if (old != NULL && strcmp(old->vendor, f->vendor))
536 c = !c;
537
538 t = f->tested;
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000539 printf("|- bgcolor=\"#%s\"\n| %s || %s || %d "
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000540 "|| %s || {{%s}} || {{%s}} || {{%s}} || {{%s}}\n",
541 (c == 1) ? "eeeeee" : "dddddd", f->vendor, f->name,
542 f->total_size, flashbuses_to_text(f->bustype),
543 (t & TEST_OK_PROBE) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000544 (t & TEST_BAD_PROBE) ? "No" : "?3",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000545 (t & TEST_OK_READ) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000546 (t & TEST_BAD_READ) ? "No" : "?3",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000547 (t & TEST_OK_ERASE) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000548 (t & TEST_BAD_ERASE) ? "No" : "?3",
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000549 (t & TEST_OK_WRITE) ? "OK" :
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000550 (t & TEST_BAD_WRITE) ? "No" : "?3");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000551
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000552 /* Split table into 'cols' columns. */
553 if (i >= (chipcount / cols + 1)) {
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000554 printf("\n|}\n\n| valign=\"top\"|\n\n%s", chip_th);
555 i = 0;
556 }
557
558 old = f;
559 }
560
561 printf("\n|}\n\n|}\n");
562}
563
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000564static void print_supported_pcidevs_wiki(struct pcidev_status *devs)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000565{
566 int i = 0;
567 static int c = 0;
568
569 /* Alternate colors if the vendor changes. */
570 c = !c;
571
572 for (i = 0; devs[i].vendor_name != NULL; i++) {
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000573 printf("|- bgcolor=\"#%s\"\n| %s || %s || "
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000574 "%04x:%04x || {{%s}}\n", (c) ? "eeeeee" : "dddddd",
575 devs[i].vendor_name, devs[i].device_name,
576 devs[i].vendor_id, devs[i].device_id,
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000577 (devs[i].status == NT) ? "?3" : "OK");
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000578 }
579}
580
Carl-Daniel Hailfingerf5292052009-11-17 09:57:34 +0000581void print_supported_wiki(void)
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000582{
583 time_t t = time(NULL);
584
585 printf(wiki_header, ctime(&t), flashrom_version);
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +0000586#if INTERNAL_SUPPORT == 1
Uwe Hermanna6d9c4b2010-05-24 15:28:12 +0000587 print_supported_chips_wiki(2);
588 print_supported_chipsets_wiki(3);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000589 print_supported_boards_wiki();
Carl-Daniel Hailfinger8841d3e2010-05-15 15:04:37 +0000590#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000591 printf("%s", programmer_section);
592#if NIC3COM_SUPPORT == 1
593 print_supported_pcidevs_wiki(nics_3com);
594#endif
Uwe Hermann829ed842010-05-24 17:39:14 +0000595#if NICREALTEK_SUPPORT == 1
596 print_supported_pcidevs_wiki(nics_realtek);
597 print_supported_pcidevs_wiki(nics_realteksmc1211);
598#endif
Uwe Hermann2b5cb512009-10-06 20:25:48 +0000599#if GFXNVIDIA_SUPPORT == 1
600 print_supported_pcidevs_wiki(gfx_nvidia);
601#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000602#if DRKAISER_SUPPORT == 1
Uwe Hermann07c54c82009-09-25 01:31:51 +0000603 print_supported_pcidevs_wiki(drkaiser_pcidev);
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000604#endif
605#if SATASII_SUPPORT == 1
606 print_supported_pcidevs_wiki(satas_sii);
607#endif
Uwe Hermannddd5c9e2010-02-21 21:17:00 +0000608#if ATAHPT_SUPPORT == 1
609 print_supported_pcidevs_wiki(ata_hpt);
610#endif
Carl-Daniel Hailfinger9c8476b2009-09-16 12:19:03 +0000611 printf("\n|}\n");
612}
613