From 190011e47c6187479db69344ccf87762009af444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 25 Mar 2013 12:48:49 +0200 Subject: AMD: Drop six copies of wrmsr_amd and rdmsr_amd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on comments in cpu/x86/msr.h for wrmsr/rdmsr, and for symmetry, I have added __attribute__((always_inline)) for these. Change-Id: Ia0a34c15241f9fbc8c78763386028ddcbe6690b1 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/2898 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel Reviewed-by: Marc Jones --- src/cpu/amd/model_10xxx/model_10xxx_init.c | 20 -------------------- src/cpu/amd/model_10xxx/processor_name.c | 3 +-- 2 files changed, 1 insertion(+), 22 deletions(-) (limited to 'src/cpu/amd/model_10xxx') diff --git a/src/cpu/amd/model_10xxx/model_10xxx_init.c b/src/cpu/amd/model_10xxx/model_10xxx_init.c index 01ae319e22..c6cf64a5a4 100644 --- a/src/cpu/amd/model_10xxx/model_10xxx_init.c +++ b/src/cpu/amd/model_10xxx/model_10xxx_init.c @@ -38,26 +38,6 @@ #define MCI_STATUS 0x401 -msr_t rdmsr_amd(u32 index) -{ - msr_t result; - __asm__ __volatile__( - "rdmsr" - :"=a"(result.lo), "=d"(result.hi) - :"c"(index), "D"(0x9c5a203a) - ); - return result; -} - -void wrmsr_amd(u32 index, msr_t msr) -{ - __asm__ __volatile__( - "wrmsr" - : /* No outputs */ - :"c"(index), "a"(msr.lo), "d"(msr.hi), "D"(0x9c5a203a) - ); -} - static void model_10xxx_init(device_t dev) { u8 i; diff --git a/src/cpu/amd/model_10xxx/processor_name.c b/src/cpu/amd/model_10xxx/processor_name.c index 62040d9a51..b16e9ba0fd 100644 --- a/src/cpu/amd/model_10xxx/processor_name.c +++ b/src/cpu/amd/model_10xxx/processor_name.c @@ -29,11 +29,10 @@ #include #include #include +#include #include #include -extern void wrmsr_amd(u32 index, msr_t msr); - /* The maximum length of CPU names is 48 bytes, including the final NULL byte. * If you change these names your BIOS will _NOT_ pass the AMD validation and * your mainboard will not be posted on the AMD Recommended Motherboard Website -- cgit v1.2.3