Bin Meng | b2e02d2 | 2014-12-17 15:50:36 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/io.h> |
| 9 | #include <asm/post.h> |
| 10 | #include <asm/arch/fsp/fsp_support.h> |
| 11 | #include <asm/processor.h> |
| 12 | |
| 13 | int arch_cpu_init(void) |
| 14 | { |
| 15 | post_code(POST_CPU_INIT); |
| 16 | #ifdef CONFIG_SYS_X86_TSC_TIMER |
| 17 | timer_set_base(rdtsc()); |
| 18 | #endif |
| 19 | |
| 20 | return x86_cpu_init_f(); |
| 21 | } |
| 22 | |
| 23 | int print_cpuinfo(void) |
| 24 | { |
| 25 | post_code(POST_CPU_INFO); |
| 26 | return default_print_cpuinfo(); |
| 27 | } |
| 28 | |
| 29 | void reset_cpu(ulong addr) |
| 30 | { |
| 31 | /* cold reset */ |
| 32 | outb(0x06, PORT_RESET); |
| 33 | } |
| 34 | |
| 35 | void board_final_cleanup(void) |
| 36 | { |
| 37 | u32 status; |
| 38 | |
| 39 | /* call into FspNotify */ |
| 40 | debug("Calling into FSP (notify phase INIT_PHASE_BOOT): "); |
| 41 | status = fsp_notify(NULL, INIT_PHASE_BOOT); |
| 42 | if (status != FSP_SUCCESS) |
| 43 | debug("fail, error code %x\n", status); |
| 44 | else |
| 45 | debug("OK\n"); |
| 46 | |
| 47 | return; |
| 48 | } |