summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/cpu.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-06 21:41:51 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-12-15 11:44:10 +0800
commitcaca13f60a526349a00fcc316bd3c0d903b2cd7c (patch)
tree3ef50991f9337c3bffeaca851374beb0650292d0 /arch/x86/cpu/cpu.c
parent642e8487ec629b43b1c5caf846098bfc952be5c0 (diff)
x86: Drop unnecessary cpu code for TPL
We don't need to know every detail about the CPU in TPL. Drop some superfluous functions to reduce code size. Add a simple CPU detection algorithm which just supports Intel and AMD, since we only support TPL on Intel, so far. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/cpu.c')
-rw-r--r--arch/x86/cpu/cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 4e59476fc9..d626e38fd1 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -46,6 +46,7 @@
DECLARE_GLOBAL_DATA_PTR;
+#ifndef CONFIG_TPL_BUILD
static const char *const x86_vendor_name[] = {
[X86_VENDOR_INTEL] = "Intel",
[X86_VENDOR_CYRIX] = "Cyrix",
@@ -58,6 +59,7 @@ static const char *const x86_vendor_name[] = {
[X86_VENDOR_NSC] = "NSC",
[X86_VENDOR_SIS] = "SiS",
};
+#endif
int __weak x86_cleanup_before_linux(void)
{
@@ -114,6 +116,7 @@ int icache_status(void)
return 1;
}
+#ifndef CONFIG_TPL_BUILD
const char *cpu_vendor_name(int vendor)
{
const char *name;
@@ -124,6 +127,7 @@ const char *cpu_vendor_name(int vendor)
return name;
}
+#endif
char *cpu_get_name(char *name)
{