diff options
author | Tom Rini <trini@konsulko.com> | 2017-04-18 14:31:46 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-18 14:31:46 (GMT) |
commit | 9481f186d0bb06e492f62144cacdb5a8367e3cd2 (patch) | |
tree | e0d3086fbecc06d975fc1065839cb773aef7f315 /arch | |
parent | f83845829aed451d86207f46cd956f3210bd2591 (diff) | |
parent | 363f67a96b2b2f6ec5a211eddf349d7b76a09159 (diff) | |
download | u-boot-9481f186d0bb06e492f62144cacdb5a8367e3cd2.tar.xz |
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/cpu/cpu_x86.c | 6 | ||||
-rw-r--r-- | arch/x86/lib/spl.c | 3 |
2 files changed, 6 insertions, 3 deletions
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; } 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__); |