From d731a24ff1b9f148609fa5052449caaab129e260 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Fri, 7 Dec 2018 14:49:20 +0100 Subject: src/cpu/intel: Set get_ia32_fsb function common Add get_ia32_fsb returns FSB values in MHz of intel's CPUs. Also add get_ia32_fsb_x3 function. It returns round up 3 * get_ia32_fsb. Change-Id: I232bf88de7ebba6ac5865db046ce79e9b2f3ed28 Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/30103 Reviewed-by: Nico Huber Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/include/cpu/intel/fsb.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/include/cpu/intel/fsb.h (limited to 'src/include/cpu') diff --git a/src/include/cpu/intel/fsb.h b/src/include/cpu/intel/fsb.h new file mode 100644 index 0000000000..49f3b17aae --- /dev/null +++ b/src/include/cpu/intel/fsb.h @@ -0,0 +1,30 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef CPU_INTEL_FSB_H +#define CPU_INTEL_FSB_H + +/* + * This function returns: + * the system bus speed value in MHz + * -1 if FSB is not found + * -2 if the CPU is not supported + */ +int get_ia32_fsb(void); + +/* + * This function returns round up 3 * get_ia32_fsb() + */ +int get_ia32_fsb_x3(void); + +#endif /* CPU_INTEL_FSB_H */ -- cgit v1.2.3