1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

hwaccess: add endianness converting deserialization functions

Add functions like
  `uint32_t read_le32(const void *base, size_t offset);`
Read a 32 bit unsigned from a base with an offset.
Having prototypes and a macro generated implementation makes it easier
to read, understand and spot errors in one of them.

Change-Id: Idde177acf8bc5f94cd046b6539dc31532c98e452
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/31016
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Thomas Heijligen
2022-02-19 22:31:32 +01:00
committed by Nico Huber
parent c456944170
commit 82604bd738
4 changed files with 58 additions and 1 deletions

View File

@ -378,7 +378,7 @@ CHIP_OBJS = jedec.o stm50.o w39.o w29ee011.o \
# Library code.
LIB_OBJS = libflashrom.o layout.o flashrom.o udelay.o programmer.o programmer_table.o \
helpers.o ich_descriptors.o fmap.o platform/endian_$(ENDIAN).o
helpers.o ich_descriptors.o fmap.o platform/endian_$(ENDIAN).o platform/memaccess.o
###############################################################################