cpu_x86.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  4. */
  5. #ifndef _ASM_CPU_X86_H
  6. #define _ASM_CPU_X86_H
  7. /**
  8. * cpu_x86_bind() - Bind an x86 CPU with the driver
  9. *
  10. * This updates cpu device's platform data with information from device tree,
  11. * like the processor local apic id.
  12. *
  13. * @dev: Device to check (UCLASS_CPU)
  14. * @return 0 always
  15. */
  16. int cpu_x86_bind(struct udevice *dev);
  17. /**
  18. * cpu_x86_get_desc() - Get a description string for an x86 CPU
  19. *
  20. * This uses cpu_get_name() and is suitable to use as the get_desc() method for
  21. * the CPU uclass.
  22. *
  23. * @dev: Device to check (UCLASS_CPU)
  24. * @buf: Buffer to place string
  25. * @size: Size of string space
  26. * @return: 0 if OK, -ENOSPC if buffer is too small, other -ve on error
  27. */
  28. int cpu_x86_get_desc(struct udevice *dev, char *buf, int size);
  29. /**
  30. * cpu_x86_get_vendor() - Get a vendor string for an x86 CPU
  31. *
  32. * This uses cpu_vendor_name() and is suitable to use as the get_vendor()
  33. * method for the CPU uclass.
  34. *
  35. * @dev: Device to check (UCLASS_CPU)
  36. * @buf: Buffer to place string
  37. * @size: Size of string space
  38. * @return: 0 if OK, -ENOSPC if buffer is too small, other -ve on error
  39. */
  40. int cpu_x86_get_vendor(struct udevice *dev, char *buf, int size);
  41. #endif /* _ASM_CPU_X86_H */