From 8fa64816ae22ff9e5fdcc00b153010459edb45f4 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 12 Aug 2009 09:27:45 +0000 Subject: Fix up MSR handling to support more OSes than Linux. Corresponding to flashrom svn r677. Signed-off-by: Stefan Reinauer Acked-by: Carl-Daniel Hailfinger --- flash.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'flash.h') diff --git a/flash.h b/flash.h index 7383b5d52..b421cf962 100644 --- a/flash.h +++ b/flash.h @@ -3,7 +3,7 @@ * * Copyright (C) 2000 Silicon Integrated System Corporation * Copyright (C) 2000 Ronald G. Minnich - * Copyright (C) 2005-2007 coresystems GmbH + * 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); -- cgit v1.2.3