From a6eb6769c6baa28d7cfaf04ebab0e9fa5b5b834f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Mar 2017 12:59:20 -0600 Subject: x86: Drop leading spaces in cpu_x86_get_desc() The Intel CPU name can have leading spaces. Remove them since they are not useful. Signed-off-by: Simon Glass Reviewed-by: Bin Meng diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c index 8be14b5..b465b14 100644 --- a/arch/x86/cpu/cpu_x86.c +++ b/arch/x86/cpu/cpu_x86.c @@ -41,10 +41,14 @@ int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size) int cpu_x86_get_desc(struct udevice *dev, char *buf, int size) { + char *ptr; + if (size < CPU_MAX_NAME_LEN) return -ENOSPC; - cpu_get_name(buf); + ptr = cpu_get_name(buf); + if (ptr != buf) + strcpy(buf, ptr); return 0; } -- cgit v0.10.2 From 3ff0900aafb34b32a0f72527f166ae45ed73be7c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Mar 2017 12:59:21 -0600 Subject: x86: Display the SPL banner only once At present on a cold reboot we must reset the CPU to get it to full speed. With 64-bit U-Boot this happens in SPL. At present we print the banner before doing this, the end result being that we print the banner twice. Print the banner a little later (after the CPU is ready) to avoid this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 2b1b450..832a5d7 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -37,8 +37,6 @@ static int x86_spl_init(void) debug("%s: spl_init() failed\n", __func__); return ret; } - preloader_console_init(); - ret = arch_cpu_init(); if (ret) { debug("%s: arch_cpu_init() failed\n", __func__); @@ -49,6 +47,7 @@ static int x86_spl_init(void) debug("%s: arch_cpu_init_dm() failed\n", __func__); return ret; } + preloader_console_init(); ret = print_cpuinfo(); if (ret) { debug("%s: print_cpuinfo() failed\n", __func__); -- cgit v0.10.2 From 363f67a96b2b2f6ec5a211eddf349d7b76a09159 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Mar 2017 12:59:22 -0600 Subject: x86: config: Enable dhrystone command for link Enable this command so we can get an approximate performance measurement. Signed-off-by: Simon Glass Reviewed-by: Bin Meng diff --git a/configs/chromebook_link64_defconfig b/configs/chromebook_link64_defconfig index 3ab34cd..749cfd4 100644 --- a/configs/chromebook_link64_defconfig +++ b/configs/chromebook_link64_defconfig @@ -86,4 +86,5 @@ CONFIG_FRAMEBUFFER_VESA_MODE_11A=y CONFIG_VIDEO_IVYBRIDGE_IGD=y CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_USE_PRIVATE_LIBGCC=y +CONFIG_CMD_DHRYSTONE=y CONFIG_TPM=y diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig index 85b7d5f..5ebb556 100644 --- a/configs/chromebook_link_defconfig +++ b/configs/chromebook_link_defconfig @@ -69,4 +69,5 @@ CONFIG_FRAMEBUFFER_VESA_MODE_11A=y CONFIG_VIDEO_IVYBRIDGE_IGD=y CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_USE_PRIVATE_LIBGCC=y +CONFIG_CMD_DHRYSTONE=y CONFIG_TPM=y -- cgit v0.10.2