SMBIOS Library
StdWorkarounds.h
Go to the documentation of this file.
1 // vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:cindent:
2 /*
3  * Copyright (C) 2005 Dell Inc.
4  * by Michael Brown <Michael_E_Brown@dell.com>
5  * Licensed under the Open Software License version 2.1
6  *
7  * Alternatively, you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published
9  * by the Free Software Foundation; either version 2 of the License,
10  * or (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  * See the GNU General Public License for more details.
16  */
17 
18 
19 #ifndef STDWORKAROUNDS_H_
20 #define STDWORKAROUNDS_H_
21 
22 // This file will eventually be generated automatically from an XML file.
23 // for now, hand edit.
24 //
25 // This file contains a list of all the BIOS cock-ups that we can work around in
26 // software.
27 
28 namespace smbios
29 {
31  {
32  // Item Type, Offset, Data Type, Data to check(*)
33  { 0xD4, 0x08, TYPE_U8 , { {0x03, 0} } },
34  // ^-- wrong checksum type of 0x3
35  // ^------------ checkType is a single u8
36  // ^------------------- offset 0x8 is the checkType field.
37  //
38  { 0xD4, 0x02, TYPE_U16, { {0x02, 0xd4, 0} } },
39  // ^--- Check the handle as well, only
40  // the third 0xD4 entry is flawed.
41  // Third 0xD4 is handle 0xD402
42  // note little endian notation.
43  // ^----------- The Handle is a U16
44  // ^-------------------- Check the handle at offset 0x2
45  //
46  { 0, 0, 0, { {0} } },
47  //
48  // * -- Data to check is a _union_. initializer syntax for unions
49  // sucks. You can only initialize the first member of a union
50  // in a statically allocated variable.
51  // I have made the first member a (u8 data[8]) so that we can
52  // (messily) initialize any possible combination.
53  };
54 
56  {
57  // Item Type, Offset, Data Type, Data to Change
58  { 0xD4, 0x08, TYPE_U8, {{0x00}} }, //caution here. see datatron def.
59  { 0, 0, 0, {{0}} },
60  };
61 
62  // PE1300 has same bug, but fixup is different
64  {
65  // Item Type, Offset, Data Type, Data to Change
66  { 0xD4, 0x08, TYPE_U8, {{0x01}} }, //caution here. see datatron def.
67  { 0, 0, 0, {{0}} },
68  };
69 
71  { "Invalid Checksum Type", InvalidCheckTypeSymptoms, InvalidCheckTypeFixup };
72  // PE1300 has same symptoms as above, but different fix.
74  { "PE1300 Invalid Checksum Type", InvalidCheckTypeSymptoms, PE1300_InvalidCheckTypeFixup };
75 
76  // System Definitions...
77 
78  const SystemAffected PE0600 = { 0x0134, "A00", "A05" }; // TODO: code to check BIOS
79  const SystemAffected PE0650 = { 0x0141, "A00", "A00" }; // TODO: code to check BIOS
80  const SystemAffected PE1300 = { 0x8E, "A00", "A--" }; // TODO: code to check BIOS
81  const SystemAffected PE1600 = { 0x0135, "A00", "A00" }; // TODO: code to check BIOS
82  const SystemAffected PE1650 = { 0x011B, "A00", "A09" }; // TODO: code to check BIOS
83  const SystemAffected IDS4235 = { 0x8012, "A--", "A--" }; // TODO: code to check BIOS
84  const SystemAffected PE1655 = { 0x0124, "A00", "A00" }; // TODO: code to check BIOS
85  const SystemAffected PE1750 = { 0x014a, "A00", "A00" }; // TODO: code to check BIOS
86  const SystemAffected PE2600 = { 0x0123, "A00", "A03" }; // TODO: code to check BIOS
87  const SystemAffected PE2650 = { 0x0121, "A00", "A10" }; // TODO: code to check BIOS
88  const SystemAffected PE4600 = { 0x0106, "A00", "A08" }; // TODO: code to check BIOS
89  const SystemAffected PE6600 = { 0x0109, "A00", "A08" }; // TODO: code to check BIOS // what about 6650?
90 
91  // Workaround lists for each system listed.
104 
105  // now, put everything together.
106  // not NULL terminated, see numSystemWorkarounds below...
108  {
111  { &PE1300, PE1300_Workarounds }, // Unit tested
113  { &PE1650, PE1650_Workarounds }, // Unit tested
114  { &IDS4235, IDS4235_Workarounds }, // Unit tested
115  { &PE1655, PE1655_Workarounds }, // Unit tested
120  { &PE6600, PE6600_Workarounds }, // Unit tested
121  };
122 
123  // works because list is statically allocated.
125 
126 }
127 
128 #endif /* STDWORKAROUNDS_H_ */