intel_cpu_info.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // SPDX-License-Identifier: MIT
  2. /*
  3. * Copyright © 2024 Intel Corporation
  4. *
  5. * Avoid INTEL_<PLATFORM> name collisions between asm/intel-family.h and
  6. * intel_device_info.h by having a separate file.
  7. */
  8. #include "intel_cpu_info.h"
  9. #ifdef CONFIG_X86
  10. #include <asm/cpu_device_id.h>
  11. #include <asm/intel-family.h>
  12. static const struct x86_cpu_id g8_cpu_ids[] = {
  13. X86_MATCH_VFM(INTEL_ALDERLAKE, NULL),
  14. X86_MATCH_VFM(INTEL_ALDERLAKE_L, NULL),
  15. X86_MATCH_VFM(INTEL_COMETLAKE, NULL),
  16. X86_MATCH_VFM(INTEL_KABYLAKE, NULL),
  17. X86_MATCH_VFM(INTEL_KABYLAKE_L, NULL),
  18. X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL),
  19. X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL),
  20. X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL),
  21. X86_MATCH_VFM(INTEL_ROCKETLAKE, NULL),
  22. {}
  23. };
  24. /**
  25. * intel_match_g8_cpu - match current CPU against g8_cpu_ids
  26. *
  27. * This matches current CPU against g8_cpu_ids, which are applicable
  28. * for G8 workaround.
  29. *
  30. * Returns: %true if matches, %false otherwise.
  31. */
  32. bool intel_match_g8_cpu(void)
  33. {
  34. return x86_match_cpu(g8_cpu_ids);
  35. }
  36. #else /* CONFIG_X86 */
  37. bool intel_match_g8_cpu(void) { return false; }
  38. #endif /* CONFIG_X86 */