Changeset 1021
- Timestamp:
- 05/31/10 00:24:40 (20 months ago)
- Location:
- trunk
- Files:
-
- 25 edited
-
82802ab.c (modified) (1 diff)
-
board_enable.c (modified) (3 diffs)
-
cbtable.c (modified) (1 diff)
-
chipset_enable.c (modified) (1 diff)
-
cli_classic.c (modified) (1 diff)
-
dediprog.c (modified) (1 diff)
-
drkaiser.c (modified) (1 diff)
-
flash.h (modified) (3 diffs)
-
flashrom.c (modified) (1 diff)
-
hwaccess.c (modified) (1 diff)
-
layout.c (modified) (9 diffs)
-
nic3com.c (modified) (1 diff)
-
nicrealtek.c (modified) (1 diff)
-
physmap.c (modified) (3 diffs)
-
print.c (modified) (1 diff)
-
programmer.c (modified) (1 diff)
-
satasii.c (modified) (1 diff)
-
sb600spi.c (modified) (1 diff)
-
sharplhf00l04.c (modified) (1 diff)
-
spi.c (modified) (1 diff)
-
sst49lfxxxc.c (modified) (1 diff)
-
sst_fwhub.c (modified) (1 diff)
-
stm50flw0x0x.c (modified) (1 diff)
-
udelay.c (modified) (3 diffs)
-
wbsio_spi.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/82802ab.c
r991 r1021 27 27 */ 28 28 29 #include <string.h>30 #include <stdlib.h>31 29 #include "flash.h" 32 30 #include "chipdrivers.h" -
trunk/board_enable.c
r1015 r1021 26 26 27 27 #include <string.h> 28 #include <fcntl.h>29 28 #include "flash.h" 30 29 … … 108 107 id = sio_read(port, 0x20); 109 108 if (id != 0x44) { 110 fprintf(stderr,"\nERROR: %s: FDC37B787: Wrong ID 0x%02X.\n",111 name, id);109 msg_perr("\nERROR: %s: FDC37B787: Wrong ID 0x%02X.\n", 110 name, id); 112 111 OUTB(0xAA, port); /* leave conf mode */ 113 112 return -1; … … 119 118 if ((val & 0x1B) != 0x10) /* output, no invert, GPIO */ 120 119 { 121 fprintf(stderr,"\nERROR: %s: GPIO50 mode 0x%02X unexpected.\n",122 name, val);120 msg_perr("\nERROR: %s: GPIO50 mode 0x%02X unexpected.\n", 121 name, val); 123 122 OUTB(0xAA, port); 124 123 return -1; -
trunk/cbtable.c
r997 r1021 23 23 */ 24 24 25 #include <unistd.h> 26 #include <stdio.h> 25 27 #include <stdlib.h> 26 28 #include <sys/types.h> -
trunk/chipset_enable.c
r1016 r1021 28 28 #define _LARGEFILE64_SOURCE 29 29 30 #include <unistd.h> 30 31 #include <stdlib.h> 31 32 #include <string.h> -
trunk/cli_classic.c
r1006 r1021 22 22 */ 23 23 24 #include <stdio.h> 24 25 #include <fcntl.h> 25 26 #include <sys/types.h> -
trunk/dediprog.c
r914 r1021 19 19 20 20 #include <string.h> 21 #include <stdlib.h>22 #include <ctype.h>23 #include <sys/types.h>24 21 #include <usb.h> 25 22 #include "flash.h" -
trunk/drkaiser.c
r911 r1021 20 20 21 21 #include <stdlib.h> 22 #include <string.h>23 #include <sys/types.h>24 22 #include "flash.h" 25 23 -
trunk/flash.h
r1016 r1021 25 25 #define __FLASH_H__ 1 26 26 27 #include <unistd.h>28 27 #include <stdint.h> 29 #include <stdio.h>30 28 #include "hwaccess.h" 31 29 #ifdef _WIN32 … … 33 31 #undef min 34 32 #undef max 33 #endif 34 35 #ifndef NULL 36 #define NULL ((void *) 0) 35 37 #endif 36 38 … … 557 559 extern const char *flashrom_version; 558 560 extern char *chip_to_probe; 559 #define printf_debug(x...) { if (verbose) printf(x); }560 561 void map_flash_registers(struct flashchip *flash); 561 562 int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len); -
trunk/flashrom.c
r1013 r1021 22 22 */ 23 23 24 #include <stdio.h> 24 25 #include <fcntl.h> 25 26 #include <sys/types.h> -
trunk/hwaccess.c
r1013 r1021 22 22 #include <string.h> 23 23 #include <stdlib.h> 24 #include <unistd.h> 24 25 #include <fcntl.h> 25 26 #include <sys/types.h> -
trunk/layout.c
r996 r1021 19 19 */ 20 20 21 #include <stdio.h> 21 22 #include <stdlib.h> 22 23 #include <string.h> … … 74 75 if ((*walk) == 0 || ((*walk) & 0x3ff) != 0 || (*walk) > size || 75 76 mb_part_offset > size || mb_vendor_offset > size) { 76 printf("Flash image seems to be a legacy BIOS. Disabling checks.\n");77 msg_pinfo("Flash image seems to be a legacy BIOS. Disabling checks.\n"); 77 78 return 0; 78 79 } … … 82 83 if (!isprint((unsigned char)*mb_part) || 83 84 !isprint((unsigned char)*mb_vendor)) { 84 printf("Flash image seems to have garbage in the ID location."85 msg_pinfo("Flash image seems to have garbage in the ID location." 85 86 " Disabling checks.\n"); 86 87 return 0; 87 88 } 88 89 89 printf_debug("coreboot last image size "90 msg_pdbg("coreboot last image size " 90 91 "(not ROM size) is %d bytes.\n", *walk); 91 92 92 93 mainboard_part = strdup(mb_part); 93 94 mainboard_vendor = strdup(mb_vendor); 94 printf_debug("Manufacturer: %s\n", mainboard_vendor);95 printf_debug("Mainboard ID: %s\n", mainboard_part);95 msg_pdbg("Manufacturer: %s\n", mainboard_vendor); 96 msg_pdbg("Mainboard ID: %s\n", mainboard_part); 96 97 97 98 /* … … 100 101 */ 101 102 if (!lb_vendor || !lb_part) { 102 printf("Note: If the following flash access fails, "103 msg_pinfo("Note: If the following flash access fails, " 103 104 "try -m <vendor>:<mainboard>.\n"); 104 105 return 0; … … 110 111 if (!strcasecmp(mainboard_vendor, lb_vendor) && 111 112 !strcasecmp(mainboard_part, lb_part)) { 112 printf_debug("This firmware image matches this mainboard.\n");113 msg_pdbg("This firmware image matches this mainboard.\n"); 113 114 } else { 114 115 if (force_boardmismatch) { 115 printf("WARNING: This firmware image does not "116 msg_pinfo("WARNING: This firmware image does not " 116 117 "seem to fit to this machine - forcing it.\n"); 117 118 } else { 118 printf("ERROR: Your firmware image (%s:%s) does not "119 msg_pinfo("ERROR: Your firmware image (%s:%s) does not " 119 120 "appear to\n be correct for the detected " 120 121 "mainboard (%s:%s)\n\nOverride with -p internal:" … … 142 143 143 144 if (!romlayout) { 144 fprintf(stderr,"ERROR: Could not open ROM layout (%s).\n",145 msg_gerr("ERROR: Could not open ROM layout (%s).\n", 145 146 name); 146 147 return -1; … … 160 161 tstr2 = strtok(NULL, ":"); 161 162 if (!tstr1 || !tstr2) { 162 fprintf(stderr,"Error parsing layout file.\n");163 msg_gerr("Error parsing layout file.\n"); 163 164 fclose(romlayout); 164 165 return 1; … … 171 172 172 173 for (i = 0; i < romimages; i++) { 173 printf_debug("romlayout %08x - %08x named %s\n",174 msg_gdbg("romlayout %08x - %08x named %s\n", 174 175 rom_entries[i].start, 175 176 rom_entries[i].end, rom_entries[i].name); … … 188 189 return -1; 189 190 190 printf("Looking for \"%s\"... ", name);191 msg_ginfo("Looking for \"%s\"... ", name); 191 192 192 193 for (i = 0; i < romimages; i++) { 193 194 if (!strcmp(rom_entries[i].name, name)) { 194 195 rom_entries[i].included = 1; 195 printf("found.\n");196 msg_ginfo("found.\n"); 196 197 return i; 197 198 } 198 199 } 199 printf("not found.\n"); // Not found. Error.200 msg_ginfo("not found.\n"); // Not found. Error. 200 201 201 202 return -1; -
trunk/nic3com.c
r1013 r1021 22 22 23 23 #include <stdlib.h> 24 #include <string.h>25 #include <sys/types.h>26 24 #include "flash.h" 27 25 -
trunk/nicrealtek.c
r1013 r1021 22 22 23 23 #include <stdlib.h> 24 #include <string.h>25 #include <sys/types.h>26 24 #include "flash.h" 27 25 -
trunk/physmap.c
r1013 r1021 21 21 */ 22 22 23 #include <unistd.h> 24 #include <stdio.h> 23 25 #include <sys/types.h> 24 26 #include <sys/stat.h> … … 311 313 { 312 314 char msrfilename[64]; 313 memset(msrfilename, 0, 64);314 s printf(msrfilename, "/dev/cpu/%d/msr", cpu);315 memset(msrfilename, 0, sizeof(msrfilename)); 316 snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu/%d/msr", cpu); 315 317 316 318 if (fd_msr != -1) { … … 394 396 { 395 397 char msrfilename[64]; 396 memset(msrfilename, 0, 64);397 s printf(msrfilename, "/dev/cpu%d", cpu);398 memset(msrfilename, 0, sizeof(msrfilename)); 399 snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu%d", cpu); 398 400 399 401 if (fd_msr != -1) { -
trunk/print.c
r1013 r1021 20 20 */ 21 21 22 #include <stdio.h> 22 23 #include <string.h> 23 24 #include <stdlib.h> -
trunk/programmer.c
r829 r1021 19 19 */ 20 20 21 #include <stdlib.h>22 21 #include "flash.h" 23 22 -
trunk/satasii.c
r911 r1021 22 22 23 23 #include <stdlib.h> 24 #include <string.h>25 24 #include "flash.h" 26 25 -
trunk/sb600spi.c
r1013 r1021 24 24 #if defined(__i386__) || defined(__x86_64__) 25 25 26 #include <string.h>27 26 #include "flash.h" 28 27 #include "chipdrivers.h" -
trunk/sharplhf00l04.c
r982 r1021 19 19 */ 20 20 21 #include <stdlib.h>22 21 #include "flash.h" 23 22 #include "chipdrivers.h" -
trunk/spi.c
r1016 r1021 23 23 */ 24 24 25 #include <string.h>26 25 #include "flash.h" 27 26 #include "flashchips.h" -
trunk/sst49lfxxxc.c
r982 r1021 21 21 */ 22 22 23 #include <stdlib.h>24 23 #include "flash.h" 25 24 #include "chipdrivers.h" -
trunk/sst_fwhub.c
r982 r1021 23 23 /* Adapted from the Intel FW hub stuff for 82802ax parts. */ 24 24 25 #include <stdlib.h>26 #include <string.h>27 25 #include "flash.h" 28 26 #include "chipdrivers.h" -
trunk/stm50flw0x0x.c
r985 r1021 28 28 */ 29 29 30 #include <string.h>31 #include <stdlib.h>32 30 #include "flash.h" 33 31 #include "flashchips.h" -
trunk/udelay.c
r992 r1021 20 20 */ 21 21 22 #include <unistd.h> 22 23 #include <sys/time.h> 23 24 #include <stdlib.h> … … 64 65 int i, tries = 0; 65 66 66 printf("Calibrating delay loop... ");67 msg_pinfo("Calibrating delay loop... "); 67 68 68 69 recalibrate: … … 114 115 msg_pdbg("10000 myus = %ld us, ", timeusec); 115 116 116 printf("OK.\n");117 msg_pinfo("OK.\n"); 117 118 } 118 119 -
trunk/wbsio_spi.c
r1013 r1021 21 21 #if defined(__i386__) || defined(__x86_64__) 22 22 23 #include <string.h>24 23 #include "flash.h" 25 24 #include "chipdrivers.h"
Note: See TracChangeset
for help on using the changeset viewer.
