summaryrefslogtreecommitdiff
path: root/src/include/cpu
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2018-12-07 14:49:20 +0100
committerNico Huber <nico.h@gmx.de>2019-01-27 12:13:09 +0000
commitd731a24ff1b9f148609fa5052449caaab129e260 (patch)
tree3d830326ba066e14a6cc2df9d0f7330fa35af842 /src/include/cpu
parentb58e99dfa56e1cf02e5bc0720872836bf8bded93 (diff)
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 <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/30103 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/cpu')
-rw-r--r--src/include/cpu/intel/fsb.h30
1 files changed, 30 insertions, 0 deletions
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 */