From 08311f5033e3adccb8794b6113d72bf7a76e4d00 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Tue, 19 Apr 2016 07:17:59 +0300 Subject: AGESA vendorcode: Build a common amdlib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having CFLAGS with -Os disables -falign-function, for unlucky builds this may delay entry to ramstage by 600ms. Build the low-level IO functions aligned with -O2 instead. Change-Id: Ice6781666a0834f1e8e60a0c93048ac8472f27d9 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/14414 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/cpu/amd/agesa/family15/fixme.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/cpu') diff --git a/src/cpu/amd/agesa/family15/fixme.c b/src/cpu/amd/agesa/family15/fixme.c index 04162e2c6d..5633007e91 100644 --- a/src/cpu/amd/agesa/family15/fixme.c +++ b/src/cpu/amd/agesa/family15/fixme.c @@ -17,6 +17,35 @@ #include #include "amdlib.h" +UINT64 +MsrRead ( + IN UINT32 MsrAddress + ); + +VOID +MsrWrite ( + IN UINT32 MsrAddress, + IN UINT64 Value + ); + + +UINT64 +MsrRead ( + IN UINT32 MsrAddress + ) +{ + return __readmsr (MsrAddress); +} + +VOID +MsrWrite ( + IN UINT32 MsrAddress, + IN UINT64 Value + ) +{ + __writemsr (MsrAddress, Value); +} + #if !IS_ENABLED(CONFIG_BOARD_AMD_DINAR) void amd_initcpuio(void) { -- cgit v1.2.3