Changeset 1389
- Timestamp:
- 07/26/11 00:44:09 (10 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
chipset_enable.c (modified) (2 diffs)
-
flashrom.8 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/chipset_enable.c
r1386 r1389 31 31 #include <string.h> 32 32 #include <unistd.h> 33 #include <inttypes.h> 34 #include <errno.h> 33 35 #include "flash.h" 34 36 #include "programmer.h" … … 312 314 idsel = extract_programmer_param("fwh_idsel"); 313 315 if (idsel && strlen(idsel)) { 314 fwh_conf = (uint32_t)strtoul(idsel, NULL, 0); 315 316 /* FIXME: Need to undo this on shutdown. */ 317 msg_pinfo("\nSetting IDSEL=0x%x for top 16 MB", fwh_conf); 318 rpci_write_long(dev, 0xd0, fwh_conf); 319 rpci_write_word(dev, 0xd4, fwh_conf); 316 uint64_t fwh_idsel_old; 317 uint64_t fwh_idsel; 318 errno = 0; 319 /* Base 16, nothing else makes sense. */ 320 fwh_idsel = (uint64_t)strtoull(idsel, NULL, 16); 321 if (errno) { 322 msg_perr("Error: fwh_idsel= specified, but value could " 323 "not be converted.\n"); 324 goto idsel_garbage_out; 325 } 326 if (fwh_idsel & 0xffff000000000000ULL) { 327 msg_perr("Error: fwh_idsel= specified, but value had " 328 "unusued bits set.\n"); 329 goto idsel_garbage_out; 330 } 331 fwh_idsel_old = pci_read_long(dev, 0xd0); 332 fwh_idsel_old <<= 16; 333 fwh_idsel_old |= pci_read_word(dev, 0xd4); 334 msg_pdbg("\nSetting IDSEL from 0x%012" PRIx64 " to " 335 "0x%012" PRIx64 " for top 16 MB.", fwh_idsel_old, 336 fwh_idsel); 337 rpci_write_long(dev, 0xd0, (fwh_idsel >> 16) & 0xffffffff); 338 rpci_write_word(dev, 0xd4, fwh_idsel & 0xffff); 320 339 /* FIXME: Decode settings are not changed. */ 321 340 } else if (idsel) { 322 msg_perr("Error: idsel= specified, but no number given.\n"); 341 msg_perr("Error: fwh_idsel= specified, but no value given.\n"); 342 idsel_garbage_out: 323 343 free(idsel); 324 344 /* FIXME: Return failure here once internal_init() starts -
trunk/flashrom.8
r1387 r1389 300 300 report so we can diagnose the problem. 301 301 .sp 302 If you have an Intel chipset with an ICH6 or later southbridge and if you want 303 to set specific IDSEL values for a non-default flash chip or an embedded 304 controller (EC), you can use the 305 .sp 306 .B " flashrom \-p internal:fwh_idsel=value" 307 .sp 308 syntax where value is the 48-bit hexadecimal raw value to be written in the 309 IDSEL registers of the Intel southbridge. The upper 32 bits use one hex digit 310 each per 512 kB range between 0xffc00000 and 0xffffffff, and the lower 16 bits 311 use one hex digit each per 1024 kB range between 0xff400000 and 0xff7fffff. 312 The rightmost hex digit corresponds with the lowest address range. All address 313 ranges have a corresponding sister range 4 MB below with identical IDSEL 314 settings. The default value for ICH7 is given in the example below. 315 .sp 316 Example: 317 .B "flashrom \-p internal:fwh_idsel=0x001122334567" 318 .sp 302 319 Using flashrom on laptops is dangerous and may easily make your hardware 303 320 unusable (see also the
Note: See TracChangeset
for help on using the changeset viewer.
