1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

1785 Commits

Author SHA1 Message Date
Stefan Reinauer
b879287c42 CID1130009: Resource leak in sp_opensocket()
Corresponding to flashrom svn r1775.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-04-26 16:12:03 +00:00
Stefan Reinauer
a9c2342791 CID1130007: Resource leak in ogp_spi
Memory leak in ogp_spi_init().

Corresponding to flashrom svn r1774.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-04-26 16:11:50 +00:00
Stefan Reinauer
4c00d09cc0 CID1130008: Resource leak read_romlayout()
Corresponding to flashrom svn r1773.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-04-26 16:11:39 +00:00
Stefan Reinauer
bbdde55d42 CID1130012: Double free in pony_spi_init()
Corresponding to flashrom svn r1772.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-04-26 16:11:30 +00:00
Stefan Reinauer
a54169b3d1 CID1130011: Use after free in ich_descriptor_tool
Corresponding to flashrom svn r1771.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-04-26 16:11:21 +00:00
Stefan Reinauer
f94d9ceaa6 CID1130004: Nesting level does not match indentation
Corresponding to flashrom svn r1770.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-04-26 16:11:07 +00:00
Alexandru Gagniuc
69dd09d881 linux_spi: Stop messing up the units of SPI speed
'speed' is stored in Hz, so rename the variable to 'speed_hz' to
clarify any potential confusion. Also, when printing the speed after
setting it with an ioctl, convert it to kHz to match the units given
in the message.

Corresponding to flashrom svn r1769.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-03-19 17:17:06 +00:00
Alexandru Gagniuc
d29806ffde linux_spi: Fix conversion from kHz to Hz
A kilohertz is exactly 1000 hertz, not 1024 hertz.

Corresponding to flashrom svn r1768.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-03-19 17:17:00 +00:00
Bill Paul
bf8ea49c0c Add support for Intel 82574L to nicintel_spi.c
Corresponding to flashrom svn r1767.

Signed-off-by: Bill Paul <wpaul@windriver.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
2014-03-17 22:07:29 +00:00
François Revol
495fc2c96a Add board enable for ASUS A7V8X-MX
Use the same trick as for the MX-SE variant.
Despite being mentioned as supported on
http://flashrom.org/Supported_hardware flashrom fails to detect the
flash chip without this.

Corresponding to flashrom svn r1766.

Signed-off-by: François Revol <revol@free.fr>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-03-14 08:10:02 +00:00
Carl-Daniel Hailfinger
43eac03945 Clean up physmap, fix unaligned mapping problems
Convert all physmaps in dmi.c to use aligned readonly maps.
Convert all physmaps in cbtable.c to use unaligned readonly maps.
Make physunmap() a generic architecture-independent wrapper.
Add physunmap_unaligned() to complement physmap*_unaligned().

Corresponding to flashrom svn r1765.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-03-05 00:16:16 +00:00
Stefan Tauner
309dd2c7c2 Add board enable for ASUS P5LD2-VM DH
Tested on real hardware by TeslaBIOS.
Besides the usual board_enable stuff the GPIO definitions for the ICH7 DH
were also missing. Apparently Intel forgot to add the PCI IDs for the desktop
version in the spec update, but the normal datasheet mentions the DH
desktop version so this should be fine...

Corresponding to flashrom svn r1764.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-11-21 15:59:52 +00:00
Stefan Tauner
d1045d8b24 Ensure DMI strings used in dmi_compare() are not NULL
Previously the external DMI decoder did not allow this to happen because
all possible pointers were initialized at startup by the output of
'dmidecode -s ...' which has default values for all supported types.

The now active internal DMI decoder does work differently: it scans the
complete DMI table once and copies the available strings. Therefore, strings
that are not set by the firmware are left at their default value of NULL.

A segfault would arise if the following conditions are all true:
 - the firmware sets up a DMI/SMBIOS table which has at least a correct
   checksum, and
 - that table does *not* define at least one of the DMI strings we use
   for matching (as defined by dmi_strings[] in dmi.c), and
 - there exists a board enable whose PCI IDs are matched by the board,
   and which has a DMI string set that ends with a $ anchor, and
 - the user calls the internal programmer of flashrom without the
   optional mainboard parameter.

This was first observed by Gelip on an abit BF6 using the coreboot port
for the abit BE6-II V2.0.
The segfault was reproduced by Idwer Vollering on an ASUS F2A85-M with
the default DMI values of CONFIG_MAINBOARD_SMBIOS_MANUFACTURER etc.
overwritten and a forged board enable matching his board.
Idwer also verified that this patch fixes the problem, thanks a lot!

Corresponding to flashrom svn r1763.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-29 01:38:45 +00:00
Stefan Tauner
2c5b65eb19 Add board enable for abit BF6
Because the board does not have any PCI subsystem IDs set and the
DMI strings are not very specific at all, autodetection has been disabled.
The GPIO was found by roxfan and the patch tested on hardware by Gelip,
thanks!

Corresponding to flashrom svn r1762.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-26 17:02:03 +00:00
Stefan Tauner
92d6a861ce Refactor Intel Chipset Enables
- Combine enable_flash_ich_4e() and enable_flash_ich_dc() to
   enable_flash_ich_fwh().
 - Remove unjustified (chipset) name parameters from various
   enable_flash_ich* functions.
 - Make Poulsbo and Tunnel Creek use generic enables by refining existing
   functions to work with them, including everything in ichspi.c.
 - Refactor enable_flash_ich_fwh_decode() to be called unconditionally for
   all chipsets.
 - Add support for Intel Atom Centerton (S12x0).
 - Recombine ICH2/3/4/5 to CHIPSET_ICH2345 because we treat them equally
   anyway.
 - Move spibar handling out of ich_init_spi() into enable_flash_ich_spi()
 - Various small cleanups.

Corresponding to flashrom svn r1761.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-25 00:33:37 +00:00
Urja Rannikko
8d7ec2a209 programmer_delay: filter 0 usec delays
We use 0 as delay value for some chips. Just skipping these here is the
most elegant, maintainable solution.

Corresponding to flashrom svn r1760.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-21 21:49:08 +00:00
Urja Rannikko
f0111d2ca4 serial: use internal_delay() for timeouts
Using programmer_delay() for timeouts in serial writes could cause a
(theoretically) endless recursion if serial communication is used to
send the programmer the delay command to be executed on the programmer
instead of the host which fails again, following a timeout which
sends...

Corresponding to flashrom svn r1759.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-19 23:35:28 +00:00
Cory Henderson
370f5829e1 Refine support for SST25VF family
- Reorder some models and refine comments.
 - Add SST25VF512A:
   AAI is available but with an uncommon opcode (0xAF). Fully tested
   with Bus Pirate 3.5 running 6.2 beta firmware by Cory.
 - Add SST25VF020 and SST25VF020B.

Corresponding to flashrom svn r1758.

Signed-off-by: Cory Henderson <dcoryh192@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-19 23:09:16 +00:00
Kyösti Mälkki
1d473796bc rayer_spi: Fix Xilinx DLC-5 cable
Pin 6 on LPT controls a pulldown on MISO/TDO signal. Whether there exists
an unbuffered clone is unknown. The author of the original patch confirmed
in private correspondence that the patch was incomplete. There has been
no sign of an unbuffered version on the interwebs, hence just change the
existing driver to disable the pulldown.

Corresponding to flashrom svn r1757.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-02 01:22:17 +00:00
Maksim Kuleshov
acba2ac238 rayer_spi: Add pinout for Wiggler LPT
Corresponding to flashrom svn r1756.

Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2013-10-02 01:22:11 +00:00
Maksim Kuleshov
4dab5c1e07 rayer_spi: Add pinout for Atmel STK200/300
Corresponding to flashrom svn r1755.

Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2013-10-02 01:22:02 +00:00
Maksim Kuleshov
3647b2d5ed rayer_spi: Add pinout for Altera ByteBlasterMV
There is a ByteBlasterII product that is only almost compatible.

Corresponding to flashrom svn r1754.

Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-02 01:21:57 +00:00
Kyösti Mälkki
8b1bdf19b0 rayer_spi: Improve support for different pinouts
Create a list of programmer types with names, test state and linked layouts.
This list could be listed with flashrom -L in follow-up patches.

Handle a bit in status register that is inverted, this will be used
in different future programmer types.

Corresponding to flashrom svn r1753.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-10-02 01:21:45 +00:00
Stefan Tauner
8268fdb902 layout: Verify layout entries before building a new image using them
This fixes a SEGFAULT if a layout entry is included that addresses memory
outside the current chip's address range. flashrom will only abort if the
offending region(s) is/are included else it will just warn.

It will print warnings for regions with negative or zero-length address ranges
and bail out after checking all of them.

Also, abort for non-write operations if a layout file is given because there is
no layout support for other operations yet.

Corresponding to flashrom svn r1751.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-09-23 14:21:06 +00:00
Stefan Tauner
a6a0d2000a sbxxx: Set SPI clock to 16.5 MHz and disable fast reads
Do not rely on broken firmware to set up the SPI configuration correctly.
Some boards fail with flashrom because the firmware chose too high speeds
for the alternate SPI mode which flashrom uses. Temporarily change the
clock to the lowest common value of 16.5 MHz.

Also, disable fast reads just to be safe.

Corresponding to flashrom svn r1750.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-09-15 14:17:39 +00:00
Stefan Tauner
949ccc8a7e layout: Add a method to cleanup layout data structures
Add layout_cleanup() to layout.c and hook it up in cli_classic.c.

Corresponding to flashrom svn r1749.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-09-15 14:01:06 +00:00
Kyösti Mälkki
88ee040ab9 Enable fwh_idsel parameter for C-ICH and ICH2/3/4/5 chipsets
Register locations are different from ICH6, but otherwise appear
to have identical bit specifications and defaults.

Corresponding to flashrom svn r1748.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-14 23:37:01 +00:00
Kyösti Mälkki
78cd0875a2 Use ich_generation parameter in enable functions prior to ICH7
Follow the style used from ICH7 onwards to pass ich_generation
parameter to lower-level functions on older ICH chipsets too.

Corresponding to flashrom svn r1747.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-14 23:36:57 +00:00
Kyösti Mälkki
743babc875 Introduce enable_flash_ich_fwh_decode()
ICH2 (and C-ICH)/3/4/5 also have FWH_SEL1/2 registers but at
different addresses. In preparation for implementing fwh_idsel
parsing for older ICH chipsets extract the parameter handling
and add variables for the offsets.

While FWH_DEC_EN1 is a 16bit register for ICH6, it is two separate
8bit registers on ICH5 and earlier. Implement all accesses with two
byte instructions instead, to prepare for extended support.

Corresponding to flashrom svn r1746.

Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-14 23:36:53 +00:00
Niklas Söderlund
5d3072030a Remove exit call and mayfail parameter from physmap_common()
The only call path where exit was reached was from physmap functions.

Callers of physmap() et al. which were not prepared to handle
ERROR_PTR return values have been adjusted.
physmap_try_ro() has been renamed to physmap_ro() and physmap_common()
slightly refactored due to the now removed *FAIL parameters.

Corresponding to flashrom svn r1745.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-14 09:02:27 +00:00
Niklas Söderlund
2d8b7ef4a8 Remove exit call from sys_physmap_*
All callers are prepared to handle error if ERROR_PTR is returned.
The Manpage mentioning the respective return code is readapted.

Corresponding to flashrom svn r1744.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-13 19:19:25 +00:00
Stefan Tauner
26e7a154a8 Add debug output to programmer_map_flash_region()
While we don't expect addresses with more than 32 bits here, let's
print the whole possible range for debugging anyway.

Corresponding to flashrom svn r1743.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-13 17:21:05 +00:00
Stefan Tauner
c65b8555d5 BSD refinements
Make it easier to compile flashrom under NetBSD and DragonFlyBSD:
 - Use /usr/pkg/ as prefix for includes and linking
 - Use pciutils as include path for the right(tm) libpci

Also, fix date handling in getrevision.sh to work with the various formats for
invoking 'date'. This also uses svn's info --xml output instead of the regular one.

Corresponding to flashrom svn r1742.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-12 15:48:39 +00:00
Stefan Tauner
4442b81fd8 sbxxx: Add detection for the remaining AMD chipset families
Also, correct prettyprinting of the registers of the various families,
and abort if SpiAccessMacRomEn or SpiHostAccessRomEn prohibit full access.

Tested reading/writing on ASRock IMB-A180, and chipset detection on
one of each affected generation by Chris Goodrich from Sage.

Corresponding to flashrom svn r1741.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-09-12 15:48:35 +00:00
Stefan Tauner
d6c17f6528 Makefile: Warn if user tries to compile for libpayload w/o crossgcc
While flashrom is not as picky on compilers as coreboot, there is still a
high probablilty of breakage when one combines libpayload and distribution
compilers. Print a warning if we detect that to give the daring user a hint
how to resolve the explosions potentially following below it.

Corresponding to flashrom svn r1740.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-12 14:04:31 +00:00
Stefan Tauner
6c67f1c128 Fix ROM decoding on VIA VT82C596 and VT82C686A/B
These support an additional bit which we did not turn on yet.
Without this patch they decode up to 512 kB, with this up to 1 MB.

Disentangle the enables of unrelated but mostly compatible chipsets
too, add some more debug output and set the max_rom_decode limits.
Also, make warnings really only warnings.

Corresponding to flashrom svn r1739.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-12 08:38:23 +00:00
Stefan Tauner
beaffd8859 Enable sector erase function for selected ST M50 chips
Affected chips: M50FLW040A, M50FLW040B, M50FLW080A, M50FLW080B.

Corresponding to flashrom svn r1738.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-12 08:29:06 +00:00
Stefan Tauner
8c4602b8ab Add support for ST M50LPW080
Corresponding to flashrom svn r1737.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-12 08:29:00 +00:00
Stefan Tauner
4404f73bd9 Cleanup ST M50 driver
There are two locking strategies used by this umbrella family, one uniform
and one that matches the sector layout of the chip. Refactor the functions
involved and rename the overly complicated file to just stm50.c and the
functions accordingly.

This fixes unlocking of some of the non-uniform chips and gets rid of the
abuse of page_size.

Corresponding to flashrom svn r1736.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-12 08:28:56 +00:00
Sean Nelson
4c6d3a4b73 Add an internal DMI decoder
Previously we had to rely on dmidecode to decode the DMI/SMBIOS table.
This patch integrates a DMI decoder into flashrom. The old behavior of calling
dmidecode can be brought back by using CONFIG_INTERNAL_DMI=no.

Significant portions of this patch were taken from dmidecode, hence add its
authors to the copyright notice (dmidecode is also GPL2+). We do a few things
differently though. First of all we do more bounds checking to prevent accessing
unmapped memory. We do not support disovery via EFI (yet), but memory
scanning only. We handle the chassis-type lock bit correctly which dmidecode
did not for a long while.

The API to the rest of flashrom remains stable, but the output changes slightly.
To share as much code as possible (which actually is not much), i have added
dmi_fill methods that get called in dmi_init. They are reponsible to fill the
dmi_strings array and setting the is_laptop variable. After it is called, dmi_init
prints all dmi_strings. Previously the strings were printed in the order they were
discovered, followed by the chassis-type, which is now output earlier (in dmi_fill).

Because DJGPP does not support strnlen a simple implementation was added
for it.

This is still only available on x86; actually it is not even compiled in for other
architectures at all anymore.

Corresponding to flashrom svn r1735.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-11 23:35:03 +00:00
Stefan Tauner
449abe28ab DOS refinements
This allows to use the DOS library trees stored in a user-specified directory.

I have mirrored the needed patches, sources and binaries (the latter
are properly licensed to allow that) in the flashrom wiki, so use those
URLs instead of the original sources.

Corresponding to flashrom svn r1734.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-11 23:34:57 +00:00
Corey Osgood
cbd566548d Add board enable for Bcom WinNET P680
This patch replaces Alex Mauer's previous patch for this board (from 2008).
Tested to read, erase, and write on 2 different boards, both with AMIC
A29040BL flash chips, using both stock BIOS and coreboot images.

This patch marks the AMIC chip as tested at the same time.

Corresponding to flashrom svn r1733.

Signed-off-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-10 10:42:48 +00:00
Stefan Tauner
97b6c113b1 layout: Rename romlayout_t to romentry_t
The type describes one entry of the whole layout actually.
Using layout_entry_t or something similar would be more correct,
but due to it length we will use "rom" instead of "layout" here and
in upcoming code.

Corresponding to flashrom svn r1732.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-30 22:23:02 +00:00
Stefan Tauner
c70bc8a3c6 layout: Rename romimages to num_rom_entries
Since we are planning to support image files for rom entries, rename the
variable used to count the number of known rom entries to avoid confusion.
There is already num_include_args with similar semantics, hence we use
num_rom_entries.

Corresponding to flashrom svn r1731.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-30 22:22:57 +00:00
Nico Huber
7562f7d7d5 libpayload: Remove file I/O.c
Read_buf_from_file() and write_buf_to_file() use file streams which are
not supported in libpayload.

Corresponding to flashrom svn r1730.

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-30 21:29:45 +00:00
Stefan Tauner
4b02e90743 Add now auto-generated manpage to svn:ignore
I had to touch svn directly, where is my reimbursement?

Corresponding to flashrom svn r1729.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-29 13:15:36 +00:00
Joerg Mayer
a93d9dc54d Automatically add version and date to the manpage
To avoid funny effects of ever changing files tracked by the VCS this patch
moves the manpage data to flashrom.8.tmpl and generates the actual
manpage with a new makefile target if needed.

Corresponding to flashrom svn r1728.

Signed-off-by: Joerg Mayer <jmayer@loplof.de>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-29 00:38:19 +00:00
Stefan Tauner
ec7a35f7ec Improve getrevision.sh
- remove bashism.
 - simplify some git-related code.
 - improved parameter and error handling.
 - additional -d/--date action which is similar to the timestamp action.
 - support for an optional path parameter.
 - there is only one sane time format.
 - and only one sane date format too.
 - use UTC dates and times only.
 - vastly improve git_url() to print the correct remote url and
   "nearest" branch.
 - remove username from repository URLs.
 - add "-dirty" to local revisions if there are uncommitted changes.
 - indicate in local revisions how many git-only commits were done
   since branching from upstream svn.
 - fix svn_revision() fallback to svn info and remove git-svn.
 - print leading r in script instead of hardcode it in the makefile;
   no more "0.9.7-runknown".
 - make retrieving the upstream revision work even in cloned git-svn
   repositories.
 - more abstractions and helper functions.
 - less fragmentation of actual functionality.

Corresponding to flashrom svn r1727.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-29 00:38:14 +00:00
Stefan Tauner
8e19b0414c libpayload: By default build libflashrom.a instead of flashrom
Flashrom won't build nor run as native payload very soon (or ever).
This patch changes a special GNU make variable that allows to select
the default goal which is taken if no goal is given explicitly on
the command line. Normally this would be the first rule in Makefile,
i.e. all. This won't compile if the target OS is libpayload, hence
change it to "libflashrom.a" in that case.

This requires two not completely ancient GNU make features:
 - MAKECMDGOALS
 - .DEFAULT_GOAL

Checking for these with ancient-only GNU make features is non-trivial
and hereby postponed.

Corresponding to flashrom svn r1726.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2013-08-28 09:55:04 +00:00
Stefan Tauner
1dd5d3aa66 Add support for AT45CS1282
This one is even more strange than the AT45DB chips. Like the AT45DB321C
it does not support any power-of-2 page sizes. There is only one asymmetrical
eraser and that uses two opcodes.

Corresponding to flashrom svn r1725.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-08-27 18:02:19 +00:00