cpu_x86.h 1.3 KB

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