We use a header for MSR accesses on AMD Geodes that does only exist on 32 bit x86 machines.
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at --- physmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I have not checked other uses of MSRs in flashrom... are there any? Could we use the FreeBSD code path for them or even completely instead the current Geode-specific implementation?
diff --git a/physmap.c b/physmap.c index ca5afd0..a261ccd 100644 --- a/physmap.c +++ b/physmap.c @@ -457,7 +457,7 @@ void cleanup_cpu_msr(void) /* Clear MSR file descriptor. */ fd_msr = -1; } -#elif defined(__OpenBSD__) /* This does only work for certain AMD Geode LX systems see amdmsr(4). */ +#elif defined(__OpenBSD__) && defined (__i386__) /* This does only work for certain AMD Geode LX systems see amdmsr(4). */ #include <sys/ioctl.h> #include <machine/amdmsr.h>