cpuinfo.h 851 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2011 Tobias Klauser <[email protected]>
  4. */
  5. #ifndef _ASM_NIOS2_CPUINFO_H
  6. #define _ASM_NIOS2_CPUINFO_H
  7. #include <linux/types.h>
  8. struct cpuinfo {
  9. /* Core CPU configuration */
  10. char cpu_impl[12];
  11. u32 cpu_clock_freq;
  12. bool mmu;
  13. bool has_div;
  14. bool has_mul;
  15. bool has_mulx;
  16. bool has_bmx;
  17. bool has_cdx;
  18. /* CPU caches */
  19. u32 icache_line_size;
  20. u32 icache_size;
  21. u32 dcache_line_size;
  22. u32 dcache_size;
  23. /* TLB */
  24. u32 tlb_pid_num_bits; /* number of bits used for the PID in TLBMISC */
  25. u32 tlb_num_ways;
  26. u32 tlb_num_ways_log2;
  27. u32 tlb_num_entries;
  28. u32 tlb_num_lines;
  29. u32 tlb_ptr_sz;
  30. /* Addresses */
  31. u32 reset_addr;
  32. u32 exception_addr;
  33. u32 fast_tlb_miss_exc_addr;
  34. };
  35. extern struct cpuinfo cpuinfo;
  36. extern void setup_cpuinfo(void);
  37. #endif /* _ASM_NIOS2_CPUINFO_H */