aboutsummaryrefslogtreecommitdiffstats
path: root/fmap.c
Commit message (Collapse)AuthorAgeFilesLines
* fmap.{c,h}: update copyright year and nameNikolai Artemiev2020-10-301-1/+1
| | | | | | | | | | | Looks like the year should be 2010 based on cros git history. Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Change-Id: I7c27e682bd09f7b1ba0398dc231b9360aed1c26b Reviewed-on: https://review.coreboot.org/c/flashrom/+/46440 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Fix -Wsign-compare troubleNico Huber2019-07-311-2/+2
| | | | | | | | | | | Mostly by changing to `unsigned` types where applicable, sometimes `signed` types, and casting as a last resort. Change-Id: I08895543ffb7a48058bcf91ef6500ca113f2d305 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/30409 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
* fmap.c: Remove unneeded 'else'Elyes HAOUAS2019-06-211-5/+3
| | | | | | | | | | 'else' is not needed after a 'break' or 'return'. Change-Id: I5df4d8075be012b9edf7be520d611042d9945094 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/flashrom/+/33345 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* fmap: Fix length calculation in error messageNico Huber2018-12-211-1/+1
| | | | | | | | Change-Id: Ie0f448970de6a7829f304448e0835eaeb7d103a3 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/30152 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* Add support to get layout from fmap (e.g. coreboot rom)Arthur Heymans2018-10-231-0/+333
Flashmap, or simply fmap, is a binary data format for describing region offsets, sizes, and certain attributes and is widely used by coreboot. This patch adds support for the fmap data format version 1.1 and adds --fmap and --fmap-file arguments. Using --fmap will make flashrom to search the ROM content for fmap data. Using --fmap-file will make flashrom search a supplied file for fmap data. An example of how to update the COREBOOT region of a ROM: flashrom -p programmer --fmap -w coreboot.rom -i COREBOOT flashrom -p programmer --fmap-file coreboot.rom -w coreboot.rom -i COREBOOT The fmap functions are mostly copied from cbfstool. Currently it is made mutually exclusive with other layout options until we are more clever about this input. Change-Id: I0e7fad38ed79a84d41358e1f175c36d255786c12 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/23203 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Tested-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Nico Huber <nico.h@gmx.de>