summaryrefslogtreecommitdiffstats
path: root/spd.c
diff options
context:
space:
mode:
Diffstat (limited to 'spd.c')
-rw-r--r--spd.c115
1 files changed, 13 insertions, 102 deletions
diff --git a/spd.c b/spd.c
index 0cdfe1e..cef93f0 100644
--- a/spd.c
+++ b/spd.c
@@ -3,7 +3,7 @@
*
* Released under version 2 of the Gnu Puclic License
* ----------------------------------------------------
- * MemTest86+ V4.00 Specific code (GPL V2.0)
+ * MemTest86+ V4.20 Specific code (GPL V2.0)
* By Samuel DEMEULEMEESTER, sdemeule@memtest.org
* http://www.canardpc.com - http://www.memtest.org
*/
@@ -123,6 +123,7 @@ struct pci_smbus_controller {
};
static struct pci_smbus_controller smbcontrollers[] = {
+{0x8086, 0x1C22, "Intel P67", ich5_get_smb, ich5_read_spd},
{0x8086, 0x3B30, "Intel P55", ich5_get_smb, ich5_read_spd},
{0x8086, 0x3A60, "Intel ICH10B", ich5_get_smb, ich5_read_spd},
{0x8086, 0x3A30, "Intel ICH10R", ich5_get_smb, ich5_read_spd},
@@ -233,6 +234,7 @@ void get_spd_spec(void)
curcol++;
// Then print module infos (manufacturer & part number)
+ spd[117] &= 0x0F; // Parity odd or even
for (i = 0; jep106[i].cont_code < 9; i++) {
if (spd[117] == jep106[i].cont_code && spd[118] == jep106[i].hex_byte) {
// We are here if a Jedec manufacturer is detected
@@ -459,106 +461,15 @@ struct ascii_map {
char *name;
};
-struct ascii_map amap[] = {
-{ 0x20, " "},
-{ 0x21, "!"},
-{ 0x22, "'"},
-{ 0x23, "#"},
-{ 0x24, "$"},
-{ 0x25, "%"},
-{ 0x26, "&"},
-{ 0x28, "("},
-{ 0x29, ")"},
-{ 0x2A, "*"},
-{ 0x2B, "+"},
-{ 0x2C, ","},
-{ 0x2D, "-"},
-{ 0x2E, "."},
-{ 0x30, "0"},
-{ 0x31, "1"},
-{ 0x32, "2"},
-{ 0x33, "3"},
-{ 0x34, "4"},
-{ 0x35, "5"},
-{ 0x36, "6"},
-{ 0x38, "8"},
-{ 0x39, "9"},
-{ 0x3A, ":"},
-{ 0x3B, ";"},
-{ 0x3C, "<"},
-{ 0x3D, "="},
-{ 0x3E, ">"},
-{ 0x40, "@"},
-{ 0x41, "A"},
-{ 0x42, "B"},
-{ 0x43, "C"},
-{ 0x44, "D"},
-{ 0x45, "E"},
-{ 0x46, "F"},
-{ 0x47, "G"},
-{ 0x48, "H"},
-{ 0x49, "I"},
-{ 0x4A, "J"},
-{ 0x4B, "K"},
-{ 0x4C, "L"},
-{ 0x4D, "M"},
-{ 0x4E, "N"},
-{ 0x4F, "O"},
-{ 0x50, "P"},
-{ 0x51, "Q"},
-{ 0x52, "R"},
-{ 0x53, "S"},
-{ 0x54, "T"},
-{ 0x55, "U"},
-{ 0x56, "V"},
-{ 0x57, "W"},
-{ 0x58, "X"},
-{ 0x59, "Y"},
-{ 0x5A, "Z"},
-{ 0x5B, "["},
-{ 0x5C, "-"},
-{ 0x5D, "]"},
-{ 0x5E, "^"},
-{ 0x60, "`"},
-{ 0x61, "a"},
-{ 0x62, "b"},
-{ 0x63, "c"},
-{ 0x64, "d"},
-{ 0x65, "e"},
-{ 0x66, "f"},
-{ 0x68, "h"},
-{ 0x69, "i"},
-{ 0x6A, "j"},
-{ 0x6B, "k"},
-{ 0x6C, "l"},
-{ 0x6D, "m"},
-{ 0x6E, "n"},
-{ 0x6F, "o"},
-{ 0x70, "p"},
-{ 0x71, "q"},
-{ 0x72, "r"},
-{ 0x73, "s"},
-{ 0x74, "t"},
-{ 0x75, "u"},
-{ 0x76, "v"},
-{ 0x78, "x"},
-{ 0x79, "y"},
-{ 0x7A, "z"},
-{ 0x7B, "{"},
-{ 0x7C, "|"},
-{ 0x7D, "}"},
-{ 0x7E, "~"},
-{ 0, ""}
-};
-char* convert_hex_to_char(unsigned hex_org){
- int i;
-
- for (i = 0; amap[i].hex_code > 0; i++) {
- if (hex_org == amap[i].hex_code) {
- return amap[i].name;
- }
- }
- return "";
-}
+char* convert_hex_to_char(unsigned hex_org) {
+ static char buf[2] = " ";
+ if (hex_org >= 0x20 && hex_org < 0x80) {
+ buf[0] = hex_org;
+ } else {
+ //buf[0] = '\0';
+ buf[0] = ' ';
+ }
+ return buf;
+} \ No newline at end of file