Config.in.riscv 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # RISC-V CPU ISA extensions.
  2. config BR2_RISCV_ISA_RVI
  3. bool
  4. config BR2_RISCV_ISA_RVM
  5. bool
  6. config BR2_RISCV_ISA_RVA
  7. bool
  8. config BR2_RISCV_ISA_RVF
  9. bool
  10. config BR2_RISCV_ISA_RVD
  11. bool
  12. config BR2_RISCV_ISA_RVC
  13. bool
  14. config BR2_RISCV_ISA_RVV
  15. bool
  16. choice
  17. prompt "Target Architecture Variant"
  18. default BR2_riscv_g
  19. config BR2_riscv_g
  20. bool "General purpose (G)"
  21. select BR2_RISCV_ISA_RVI
  22. select BR2_RISCV_ISA_RVM
  23. select BR2_RISCV_ISA_RVA
  24. select BR2_RISCV_ISA_RVF
  25. select BR2_RISCV_ISA_RVD
  26. help
  27. General purpose (G) is equivalent to IMAFD.
  28. config BR2_riscv_custom
  29. bool "Custom architecture"
  30. select BR2_RISCV_ISA_RVI
  31. endchoice
  32. if BR2_riscv_custom
  33. comment "Instruction Set Extensions"
  34. config BR2_RISCV_ISA_CUSTOM_RVM
  35. bool "Integer Multiplication and Division (M)"
  36. select BR2_RISCV_ISA_RVM
  37. config BR2_RISCV_ISA_CUSTOM_RVA
  38. bool "Atomic Instructions (A)"
  39. select BR2_RISCV_ISA_RVA
  40. config BR2_RISCV_ISA_CUSTOM_RVF
  41. bool "Single-precision Floating-point (F)"
  42. select BR2_RISCV_ISA_RVF
  43. config BR2_RISCV_ISA_CUSTOM_RVD
  44. bool "Double-precision Floating-point (D)"
  45. depends on BR2_RISCV_ISA_RVF
  46. select BR2_RISCV_ISA_RVD
  47. config BR2_RISCV_ISA_CUSTOM_RVC
  48. bool "Compressed Instructions (C)"
  49. select BR2_RISCV_ISA_RVC
  50. config BR2_RISCV_ISA_CUSTOM_RVV
  51. bool "Vector Instructions (V)"
  52. select BR2_RISCV_ISA_RVV
  53. select BR2_ARCH_NEEDS_GCC_AT_LEAST_12
  54. endif
  55. choice
  56. prompt "Target Architecture Size"
  57. default BR2_RISCV_64
  58. config BR2_RISCV_32
  59. bool "32-bit"
  60. select BR2_USE_MMU
  61. config BR2_RISCV_64
  62. bool "64-bit"
  63. select BR2_ARCH_IS_64
  64. endchoice
  65. config BR2_RISCV_USE_MMU
  66. bool "MMU support"
  67. default y
  68. depends on BR2_RISCV_64
  69. select BR2_USE_MMU
  70. help
  71. Enable this option if your RISC-V core has a MMU (Memory
  72. Management Unit).
  73. choice
  74. prompt "Target ABI"
  75. default BR2_RISCV_ABI_ILP32D if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  76. default BR2_RISCV_ABI_ILP32F if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  77. default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64
  78. default BR2_RISCV_ABI_LP64D if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  79. default BR2_RISCV_ABI_LP64F if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  80. default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64
  81. config BR2_RISCV_ABI_ILP32
  82. bool "ilp32"
  83. depends on !BR2_ARCH_IS_64
  84. config BR2_RISCV_ABI_ILP32F
  85. bool "ilp32f"
  86. depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  87. config BR2_RISCV_ABI_ILP32D
  88. bool "ilp32d"
  89. depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  90. config BR2_RISCV_ABI_LP64
  91. bool "lp64"
  92. depends on BR2_ARCH_IS_64
  93. config BR2_RISCV_ABI_LP64F
  94. bool "lp64f"
  95. depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
  96. depends on BR2_USE_MMU
  97. config BR2_RISCV_ABI_LP64D
  98. bool "lp64d"
  99. depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
  100. endchoice
  101. config BR2_ARCH
  102. default "riscv32" if !BR2_ARCH_IS_64
  103. default "riscv64" if BR2_ARCH_IS_64
  104. config BR2_NORMALIZED_ARCH
  105. default "riscv"
  106. config BR2_ENDIAN
  107. default "LITTLE"
  108. config BR2_GCC_TARGET_ABI
  109. default "ilp32" if BR2_RISCV_ABI_ILP32
  110. default "ilp32f" if BR2_RISCV_ABI_ILP32F
  111. default "ilp32d" if BR2_RISCV_ABI_ILP32D
  112. default "lp64" if BR2_RISCV_ABI_LP64
  113. default "lp64f" if BR2_RISCV_ABI_LP64F
  114. default "lp64d" if BR2_RISCV_ABI_LP64D
  115. config BR2_READELF_ARCH_NAME
  116. default "RISC-V"
  117. # vim: ft=kconfig
  118. # -*- mode:kconfig; -*-