Hi,
attached patches implement libpayload support and improve life for DOS based flashrom, too:
1.physmap-allow-NULL changes the physmap* behaviour to use -1 as error code instead of 0. That way, 1:1 mapped memory can be supported properly because 0 is not a magic number anymore. -1 on the other hand is a rather unlikely memory offset, so that should be safe.
2.support-libpayload adds libpayload implementations of various functions and data structures and improves compatibility to libpayload by #ifdefing out various include statements, as well as file access related code. Some parts look weird, but I had to work around name clashes (eg. msr_t)
flashrom.c is mostly unchanged, but my local changes beyond those in the patch aren't suitable for upstream. Any flashrom-as-payload project requires some entirely new frontend, but I hope that some libflashrom-type effort benefits from these patches and simplifies any frontend work later on.
Both patches are Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Regards, Patrick