diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-08-12 09:27:45 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2009-08-12 09:27:45 +0000 |
commit | 8fa64816ae22ff9e5fdcc00b153010459edb45f4 (patch) | |
tree | 171cc242408ff1e317447f3a8f948e0720e4a767 /flash.h | |
parent | 630c79d494668e7c4d41a2eee1a6df578f2b2ecd (diff) | |
download | flashrom-8fa64816ae22ff9e5fdcc00b153010459edb45f4.tar.gz flashrom-8fa64816ae22ff9e5fdcc00b153010459edb45f4.tar.bz2 flashrom-8fa64816ae22ff9e5fdcc00b153010459edb45f4.zip |
Fix up MSR handling to support more OSes than Linux.
Corresponding to flashrom svn r677.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -3,7 +3,7 @@ * * Copyright (C) 2000 Silicon Integrated System Corporation * Copyright (C) 2000 Ronald G. Minnich <rminnich@gmail.com> - * Copyright (C) 2005-2007 coresystems GmbH <stepan@coresystems.de> + * Copyright (C) 2005-2009 coresystems GmbH * Copyright (C) 2006-2009 Carl-Daniel Hailfinger * * This program is free software; you can redistribute it and/or modify @@ -301,6 +301,13 @@ extern unsigned long flashbase; /* physmap.c */ void *physmap(const char *descr, unsigned long phys_addr, size_t len); void physunmap(void *virt_addr, size_t len); +int setup_cpu_msr(int cpu); +void cleanup_cpu_msr(void); +#ifndef __DARWIN__ +typedef struct { uint32_t hi, lo; } msr_t; +msr_t rdmsr(int addr); +int wrmsr(int addr, msr_t msr); +#endif /* internal.c */ struct pci_dev *pci_dev_find_filter(struct pci_filter filter); |