qemu.c 630 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/irq.h>
  8. #include <asm/post.h>
  9. #include <asm/processor.h>
  10. int arch_cpu_init(void)
  11. {
  12. int ret;
  13. post_code(POST_CPU_INIT);
  14. #ifdef CONFIG_SYS_X86_TSC_TIMER
  15. timer_set_base(rdtsc());
  16. #endif
  17. ret = x86_cpu_init_f();
  18. if (ret)
  19. return ret;
  20. return 0;
  21. }
  22. #ifndef CONFIG_EFI_STUB
  23. int print_cpuinfo(void)
  24. {
  25. post_code(POST_CPU_INFO);
  26. return default_print_cpuinfo();
  27. }
  28. #endif
  29. void reset_cpu(ulong addr)
  30. {
  31. /* cold reset */
  32. x86_full_reset();
  33. }
  34. int arch_misc_init(void)
  35. {
  36. pirq_init();
  37. return 0;
  38. }