diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2013-07-13 23:21:05 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-07-13 23:21:05 +0000 |
commit | 11990da1d3a4ca913ed5b85888a37188c4a621db (patch) | |
tree | 5c905e082327d5714b6a09d30ae38e210d610ca9 /physmap.c | |
parent | 6bf5fe78f1064b56275056b2a90ea4e1c34e42be (diff) | |
download | flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.tar.gz flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.tar.bz2 flashrom-11990da1d3a4ca913ed5b85888a37188c4a621db.zip |
Various cross-platform fixes
Improve compilation with libpayload (compiling flashrom.c and
linking is still broken):
- disable Ponyprog (which enforced serial.c compilation)
- make errno available where it is needed
Fix internal.c for non-x86 and enable cb parsing on ARM.
Fix mingw builds by using its __USE_MINGW_ANSI_STDIO macro
and gnu_printf definition for printf format style checking.
See http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf
This requires inclusion of stdio.h in flash.h.
Fix order of libraries in the Makefile:
FEATURE_LIBS needs to come *after* PCILIBS in case ZLIB is needed by it.
Corresponding to flashrom svn r1697.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'physmap.c')
-rw-r--r-- | physmap.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -24,14 +24,14 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <errno.h> #include "flash.h" #include "hwaccess.h" -/* Do we need any file access or ioctl for physmap or MSR? */ #if !defined(__DJGPP__) && !defined(__LIBPAYLOAD__) +/* No file access needed/possible to get mmap access permissions or access MSR. */ #include <sys/stat.h> #include <fcntl.h> -#include <errno.h> #endif #ifdef __DJGPP__ @@ -120,15 +120,6 @@ void *sys_physmap(unsigned long phys_addr, size_t len) void physunmap(void *virt_addr, size_t len) { } - -int setup_cpu_msr(int cpu) -{ - return 0; -} - -void cleanup_cpu_msr(void) -{ -} #elif defined(__MACH__) && defined(__APPLE__) #define MEM_DEV "DirectHW" @@ -569,6 +560,15 @@ int libpayload_wrmsr(int addr, msr_t msr) _wrmsr(addr, msr.lo | ((unsigned long long)msr.hi << 32)); return 0; } + +int setup_cpu_msr(int cpu) +{ + return 0; +} + +void cleanup_cpu_msr(void) +{ +} #else /* default MSR implementation */ msr_t rdmsr(int addr) |